@package-uploader/ui 1.1.2 → 1.1.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/src/index.css CHANGED
@@ -1687,123 +1687,64 @@ body {
1687
1687
  }
1688
1688
 
1689
1689
  /* ========================================
1690
- BLOCK GROUPING PANEL
1690
+ BLOCK CARDS (visual block preview)
1691
1691
  ======================================== */
1692
1692
 
1693
- .bgp-toggle-btn {
1694
- margin-top: 0.5rem;
1695
- display: inline-flex;
1696
- align-items: center;
1697
- gap: 0.375rem;
1698
- background: var(--color-bg);
1699
- border: 1px solid var(--color-border);
1700
- color: var(--color-text-muted);
1701
- transition: all 0.15s;
1702
- }
1703
-
1704
- .bgp-toggle-btn:hover {
1705
- border-color: var(--color-primary);
1706
- color: var(--color-primary);
1707
- }
1708
-
1709
- .bgp-toggle-btn.active {
1710
- border-color: var(--color-primary);
1711
- color: var(--color-primary);
1712
- background: rgba(37, 99, 235, 0.05);
1713
- }
1714
-
1715
- .bgp-toggle-count {
1716
- background: var(--color-primary);
1717
- color: white;
1718
- font-size: 0.625rem;
1719
- padding: 0.0625rem 0.375rem;
1720
- border-radius: 999px;
1721
- font-weight: 600;
1722
- }
1723
-
1724
- .block-grouping-panel {
1725
- margin-top: 0.5rem;
1726
- border: 1px solid var(--color-border);
1727
- border-radius: var(--radius);
1728
- background: var(--color-bg);
1729
- overflow: hidden;
1730
- }
1731
-
1732
- .bgp-header {
1693
+ .block-cards {
1733
1694
  display: flex;
1734
- align-items: center;
1735
- gap: 0.5rem;
1736
- padding: 0.5rem 0.75rem;
1737
- background: var(--color-bg-secondary);
1738
- border-bottom: 1px solid var(--color-border);
1739
- }
1740
-
1741
- .bgp-title {
1742
- font-size: 0.8rem;
1743
- font-weight: 600;
1744
- color: var(--color-text);
1745
- }
1746
-
1747
- .bgp-count {
1748
- font-size: 0.7rem;
1749
- color: var(--color-primary);
1750
- background: rgba(37, 99, 235, 0.1);
1751
- padding: 0.0625rem 0.375rem;
1752
- border-radius: 999px;
1695
+ flex-direction: column;
1696
+ gap: 3px;
1697
+ padding: 0.375rem 0;
1753
1698
  }
1754
1699
 
1755
- /* Schematic preview */
1756
- .bgp-preview {
1757
- padding: 0.5rem;
1700
+ .block-card {
1758
1701
  display: flex;
1759
1702
  flex-direction: column;
1760
1703
  gap: 0.25rem;
1761
- max-height: 300px;
1762
- overflow-y: auto;
1763
- }
1764
-
1765
- .bgp-block {
1766
- display: flex;
1767
- align-items: center;
1768
- gap: 0.375rem;
1769
- padding: 0.375rem 0.5rem;
1704
+ padding: 0.5rem 0.625rem;
1770
1705
  border-radius: var(--radius-sm);
1706
+ border: 1px solid var(--color-border);
1707
+ border-left: 4px solid var(--block-accent, #6b7280);
1708
+ background: var(--color-bg);
1771
1709
  cursor: pointer;
1772
1710
  transition: all 0.15s;
1773
- border: 1px solid transparent;
1774
- font-size: 0.75rem;
1775
1711
  }
1776
1712
 
1777
- .bgp-block:hover:not(.grouped) {
1778
- background: var(--color-bg-secondary);
1779
- border-color: var(--color-border);
1713
+ .block-card:hover:not(.grouped) {
1714
+ border-color: var(--color-primary);
1715
+ border-left-color: var(--block-accent, #6b7280);
1716
+ background: rgba(37, 99, 235, 0.03);
1780
1717
  }
1781
1718
 
1782
- .bgp-block.selected {
1719
+ .block-card.selected {
1783
1720
  background: rgba(37, 99, 235, 0.08);
1784
1721
  border-color: var(--color-primary);
1722
+ border-left-color: var(--block-accent, #6b7280);
1723
+ box-shadow: 0 0 0 1px rgba(37, 99, 235, 0.2);
1785
1724
  }
1786
1725
 
1787
- .bgp-block.grouped {
1726
+ .block-card.grouped {
1788
1727
  cursor: default;
1789
- opacity: 0.7;
1728
+ opacity: 0.75;
1729
+ background: var(--color-bg-secondary);
1790
1730
  }
1791
1731
 
1792
- .bgp-block-color {
1793
- width: 4px;
1794
- height: 1.25rem;
1795
- border-radius: 2px;
1796
- background: var(--block-color, #6b7280);
1797
- flex-shrink: 0;
1732
+ .block-card-header {
1733
+ display: flex;
1734
+ align-items: center;
1735
+ gap: 0.5rem;
1736
+ min-height: 1.25rem;
1798
1737
  }
1799
1738
 
1800
- .bgp-block-label {
1801
- font-weight: 500;
1739
+ .block-card-type {
1740
+ font-size: 0.8rem;
1741
+ font-weight: 600;
1802
1742
  color: var(--color-text);
1803
1743
  white-space: nowrap;
1804
1744
  }
1805
1745
 
1806
- .bgp-block-title {
1746
+ .block-card-title {
1747
+ font-size: 0.75rem;
1807
1748
  color: var(--color-text-muted);
1808
1749
  overflow: hidden;
1809
1750
  text-overflow: ellipsis;
@@ -1812,22 +1753,33 @@ body {
1812
1753
  min-width: 0;
1813
1754
  }
1814
1755
 
1815
- .bgp-block-check {
1756
+ .block-card-check {
1816
1757
  color: var(--color-primary);
1817
- font-weight: 600;
1758
+ font-weight: 700;
1759
+ font-size: 0.875rem;
1818
1760
  flex-shrink: 0;
1819
1761
  margin-left: auto;
1820
1762
  }
1821
1763
 
1822
- /* Group wrapper in preview */
1823
- .bgp-group-wrapper {
1764
+ .block-card .tree-class-input-sm {
1765
+ margin-left: 0;
1766
+ max-width: 100%;
1767
+ margin-top: 0;
1768
+ }
1769
+
1770
+ /* Group container wrapping adjacent block cards */
1771
+ .block-group-container {
1824
1772
  border: 2px dashed var(--color-primary);
1825
1773
  border-radius: var(--radius);
1826
- padding: 0.25rem;
1774
+ padding: 0.375rem;
1827
1775
  margin: 0.25rem 0;
1828
1776
  background: rgba(37, 99, 235, 0.02);
1829
1777
  }
1830
1778
 
1779
+ .block-group-container .block-card {
1780
+ border-left-width: 3px;
1781
+ }
1782
+
1831
1783
  .bgp-group-header {
1832
1784
  display: flex;
1833
1785
  align-items: center;
@@ -1924,11 +1876,16 @@ body {
1924
1876
  /* Create group controls */
1925
1877
  .bgp-create {
1926
1878
  padding: 0.5rem 0.75rem;
1927
- border-top: 1px solid var(--color-border);
1879
+ margin-top: 0.375rem;
1880
+ border: 1px solid var(--color-border);
1881
+ border-radius: var(--radius-sm);
1928
1882
  background: var(--color-bg-secondary);
1929
1883
  display: flex;
1930
1884
  flex-direction: column;
1931
1885
  gap: 0.375rem;
1886
+ position: sticky;
1887
+ bottom: 0;
1888
+ z-index: 1;
1932
1889
  }
1933
1890
 
1934
1891
  .bgp-create-info {
@@ -1990,3 +1947,158 @@ body {
1990
1947
  text-align: center;
1991
1948
  font-style: italic;
1992
1949
  }
1950
+
1951
+ /* ========================================
1952
+ PREVIEW MODE — Full-screen split layout
1953
+ ======================================== */
1954
+
1955
+ .upload-modal.preview-mode {
1956
+ width: 95vw;
1957
+ max-width: 95vw;
1958
+ height: 90vh;
1959
+ max-height: 90vh;
1960
+ display: flex;
1961
+ flex-direction: column;
1962
+ }
1963
+
1964
+ .upload-modal.preview-mode .modal-header {
1965
+ flex-shrink: 0;
1966
+ }
1967
+
1968
+ .preview-split {
1969
+ display: flex;
1970
+ flex: 1;
1971
+ overflow: hidden;
1972
+ border-top: 1px solid var(--color-border);
1973
+ }
1974
+
1975
+ .preview-split-left {
1976
+ width: 380px;
1977
+ min-width: 320px;
1978
+ overflow-y: auto;
1979
+ border-right: 1px solid var(--color-border);
1980
+ padding: 0.75rem;
1981
+ }
1982
+
1983
+ /* In preview mode, remove max-height on lessons container since the panel scrolls */
1984
+ .preview-split-left .tree-lessons {
1985
+ max-height: none;
1986
+ border: none;
1987
+ padding: 0;
1988
+ }
1989
+
1990
+ .preview-split-right {
1991
+ flex: 1;
1992
+ position: relative;
1993
+ background: var(--color-bg-secondary);
1994
+ }
1995
+
1996
+ .preview-iframe {
1997
+ width: 100%;
1998
+ height: 100%;
1999
+ border: none;
2000
+ }
2001
+
2002
+ .preview-loading {
2003
+ display: flex;
2004
+ flex-direction: column;
2005
+ align-items: center;
2006
+ justify-content: center;
2007
+ height: 100%;
2008
+ gap: 0.75rem;
2009
+ color: var(--color-text-muted);
2010
+ font-size: 0.875rem;
2011
+ }
2012
+
2013
+ /* Preview footer with inline options */
2014
+ .preview-footer {
2015
+ flex-shrink: 0;
2016
+ align-items: center;
2017
+ flex-wrap: wrap;
2018
+ position: relative;
2019
+ }
2020
+
2021
+ .preview-options-toggle {
2022
+ margin-left: 0.5rem;
2023
+ }
2024
+
2025
+ .preview-options-toggle.open {
2026
+ background: var(--color-bg-secondary);
2027
+ }
2028
+
2029
+ .preview-options-panel {
2030
+ position: absolute;
2031
+ bottom: 100%;
2032
+ left: 50%;
2033
+ transform: translateX(-50%);
2034
+ background: var(--color-bg);
2035
+ border: 1px solid var(--color-border);
2036
+ border-radius: var(--radius);
2037
+ padding: 0.75rem;
2038
+ box-shadow: var(--shadow-lg);
2039
+ display: flex;
2040
+ flex-direction: column;
2041
+ gap: 0.5rem;
2042
+ min-width: 250px;
2043
+ margin-bottom: 0.5rem;
2044
+ z-index: 10;
2045
+ }
2046
+
2047
+ .preview-options-panel .upload-link-toggle {
2048
+ font-size: 0.8rem;
2049
+ }
2050
+
2051
+ .preview-option-skin {
2052
+ display: flex;
2053
+ align-items: center;
2054
+ gap: 0.5rem;
2055
+ font-size: 0.8rem;
2056
+ }
2057
+
2058
+ .preview-option-label {
2059
+ color: var(--color-text-muted);
2060
+ white-space: nowrap;
2061
+ }
2062
+
2063
+ .preview-option-input {
2064
+ flex: 1;
2065
+ padding: 0.25rem 0.5rem;
2066
+ font-size: 0.8rem;
2067
+ border: 1px solid var(--color-border);
2068
+ border-radius: var(--radius-sm);
2069
+ background: var(--color-bg);
2070
+ color: var(--color-text);
2071
+ }
2072
+
2073
+ .preview-option-input:focus {
2074
+ outline: none;
2075
+ border-color: var(--color-primary);
2076
+ }
2077
+
2078
+ /* Responsive: stack on smaller screens */
2079
+ @media (max-width: 900px) {
2080
+ .upload-modal.preview-mode {
2081
+ width: 100vw;
2082
+ max-width: 100vw;
2083
+ height: 100vh;
2084
+ max-height: 100vh;
2085
+ border-radius: 0;
2086
+ }
2087
+
2088
+ .preview-split {
2089
+ flex-direction: column;
2090
+ }
2091
+
2092
+ .preview-split-left {
2093
+ width: 100%;
2094
+ min-width: 0;
2095
+ max-height: 40vh;
2096
+ border-right: none;
2097
+ border-bottom: 1px solid var(--color-border);
2098
+ }
2099
+
2100
+ .preview-split-right {
2101
+ flex: 1;
2102
+ min-height: 200px;
2103
+ }
2104
+ }