cms-block-editor 1.0.14 → 1.0.16
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/README.md +1 -0
- package/dist/index.css +792 -0
- package/dist/index.css.map +1 -1
- package/dist/index.d.mts +195 -1
- package/dist/index.mjs +1015 -17
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -6568,45 +6568,88 @@ import { createContext, useContext, useEffect as useEffect18, useState as useSta
|
|
|
6568
6568
|
// src/themes/lightTheme.ts
|
|
6569
6569
|
var lightTheme = {
|
|
6570
6570
|
name: "light",
|
|
6571
|
+
mode: "light",
|
|
6571
6572
|
colors: {
|
|
6572
6573
|
// Primary colors
|
|
6573
6574
|
primary: "#667eea",
|
|
6574
6575
|
primaryHover: "#5568d3",
|
|
6575
6576
|
primaryLight: "#e0e7ff",
|
|
6576
6577
|
primaryDark: "#4c51bf",
|
|
6578
|
+
primaryContrast: "#ffffff",
|
|
6577
6579
|
// Secondary colors
|
|
6578
6580
|
secondary: "#764ba2",
|
|
6579
6581
|
secondaryHover: "#6a3f8f",
|
|
6582
|
+
secondaryLight: "#f3e8ff",
|
|
6583
|
+
secondaryDark: "#5b2c7d",
|
|
6584
|
+
secondaryContrast: "#ffffff",
|
|
6585
|
+
// Accent colors
|
|
6586
|
+
accent: "#f59e0b",
|
|
6587
|
+
accentHover: "#d97706",
|
|
6588
|
+
accentLight: "#fef3c7",
|
|
6589
|
+
accentDark: "#b45309",
|
|
6580
6590
|
// Neutral colors
|
|
6581
6591
|
background: "#ffffff",
|
|
6592
|
+
backgroundAlt: "#fafafa",
|
|
6582
6593
|
surface: "#f9fafb",
|
|
6594
|
+
surfaceHover: "#f3f4f6",
|
|
6595
|
+
surfaceActive: "#e5e7eb",
|
|
6583
6596
|
border: "#e5e7eb",
|
|
6597
|
+
borderHover: "#d1d5db",
|
|
6584
6598
|
divider: "#d1d5db",
|
|
6599
|
+
overlay: "rgba(0, 0, 0, 0.5)",
|
|
6585
6600
|
// Text colors
|
|
6586
6601
|
textPrimary: "#1f2937",
|
|
6587
6602
|
textSecondary: "#6b7280",
|
|
6588
|
-
|
|
6603
|
+
textTertiary: "#9ca3af",
|
|
6604
|
+
textDisabled: "#d1d5db",
|
|
6605
|
+
textInverse: "#ffffff",
|
|
6589
6606
|
// Status colors
|
|
6590
6607
|
success: "#10b981",
|
|
6608
|
+
successLight: "#d1fae5",
|
|
6609
|
+
successDark: "#065f46",
|
|
6591
6610
|
warning: "#f59e0b",
|
|
6611
|
+
warningLight: "#fef3c7",
|
|
6612
|
+
warningDark: "#b45309",
|
|
6592
6613
|
error: "#ef4444",
|
|
6614
|
+
errorLight: "#fee2e2",
|
|
6615
|
+
errorDark: "#991b1b",
|
|
6593
6616
|
info: "#3b82f6",
|
|
6617
|
+
infoLight: "#dbeafe",
|
|
6618
|
+
infoDark: "#1e40af",
|
|
6594
6619
|
// Editor specific
|
|
6595
6620
|
editorBackground: "#ffffff",
|
|
6596
6621
|
editorText: "#1f2937",
|
|
6597
6622
|
editorPlaceholder: "#9ca3af",
|
|
6623
|
+
editorCursor: "#667eea",
|
|
6598
6624
|
toolbarBackground: "#f9fafb",
|
|
6599
6625
|
toolbarText: "#374151",
|
|
6600
6626
|
toolbarBorder: "#e5e7eb",
|
|
6627
|
+
toolbarIconHover: "#667eea",
|
|
6601
6628
|
// Selection and highlights
|
|
6602
6629
|
selection: "#dbeafe",
|
|
6630
|
+
selectionText: "#1f2937",
|
|
6603
6631
|
highlight: "#fef3c7",
|
|
6604
|
-
|
|
6632
|
+
highlightText: "#1f2937",
|
|
6633
|
+
focus: "#667eea",
|
|
6634
|
+
focusRing: "rgba(102, 126, 234, 0.5)",
|
|
6635
|
+
// Code editor colors
|
|
6636
|
+
codeBackground: "#f3f4f6",
|
|
6637
|
+
codeText: "#1f2937",
|
|
6638
|
+
codeComment: "#6b7280",
|
|
6639
|
+
codeKeyword: "#8b5cf6",
|
|
6640
|
+
codeString: "#10b981",
|
|
6641
|
+
codeNumber: "#f59e0b",
|
|
6642
|
+
codeFunction: "#3b82f6",
|
|
6643
|
+
codeOperator: "#ef4444"
|
|
6605
6644
|
},
|
|
6606
6645
|
typography: {
|
|
6646
|
+
// Font families
|
|
6607
6647
|
fontFamily: '-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif',
|
|
6648
|
+
fontFamilyHeading: '-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif',
|
|
6608
6649
|
fontFamilyMono: 'ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace',
|
|
6609
6650
|
// Font sizes
|
|
6651
|
+
fontSizeXxs: "0.625rem",
|
|
6652
|
+
// 10px
|
|
6610
6653
|
fontSizeXs: "0.75rem",
|
|
6611
6654
|
// 12px
|
|
6612
6655
|
fontSizeSm: "0.875rem",
|
|
@@ -6617,16 +6660,34 @@ var lightTheme = {
|
|
|
6617
6660
|
// 18px
|
|
6618
6661
|
fontSizeXl: "1.25rem",
|
|
6619
6662
|
// 20px
|
|
6663
|
+
fontSizeXxl: "1.5rem",
|
|
6664
|
+
// 24px
|
|
6665
|
+
fontSize3xl: "1.875rem",
|
|
6666
|
+
// 30px
|
|
6667
|
+
fontSize4xl: "2.25rem",
|
|
6668
|
+
// 36px
|
|
6620
6669
|
// Font weights
|
|
6670
|
+
fontWeightLight: 300,
|
|
6621
6671
|
fontWeightNormal: 400,
|
|
6622
6672
|
fontWeightMedium: 500,
|
|
6623
|
-
|
|
6673
|
+
fontWeightSemibold: 600,
|
|
6674
|
+
fontWeightBold: 700,
|
|
6675
|
+
fontWeightExtrabold: 800,
|
|
6624
6676
|
// Line heights
|
|
6625
6677
|
lineHeightTight: 1.25,
|
|
6678
|
+
lineHeightSnug: 1.375,
|
|
6626
6679
|
lineHeightNormal: 1.5,
|
|
6627
|
-
lineHeightRelaxed: 1.
|
|
6680
|
+
lineHeightRelaxed: 1.625,
|
|
6681
|
+
lineHeightLoose: 2,
|
|
6682
|
+
// Letter spacing
|
|
6683
|
+
letterSpacingTight: "-0.025em",
|
|
6684
|
+
letterSpacingNormal: "0",
|
|
6685
|
+
letterSpacingWide: "0.025em",
|
|
6686
|
+
letterSpacingWider: "0.05em"
|
|
6628
6687
|
},
|
|
6629
6688
|
spacing: {
|
|
6689
|
+
xxs: "0.125rem",
|
|
6690
|
+
// 2px
|
|
6630
6691
|
xs: "0.25rem",
|
|
6631
6692
|
// 4px
|
|
6632
6693
|
sm: "0.5rem",
|
|
@@ -6637,105 +6698,272 @@ var lightTheme = {
|
|
|
6637
6698
|
// 24px
|
|
6638
6699
|
xl: "2rem",
|
|
6639
6700
|
// 32px
|
|
6640
|
-
xxl: "3rem"
|
|
6701
|
+
xxl: "3rem",
|
|
6641
6702
|
// 48px
|
|
6703
|
+
xxxl: "4rem"
|
|
6704
|
+
// 64px
|
|
6642
6705
|
},
|
|
6643
6706
|
borderRadius: {
|
|
6644
6707
|
none: "0",
|
|
6708
|
+
xs: "0.125rem",
|
|
6709
|
+
// 2px
|
|
6645
6710
|
sm: "0.25rem",
|
|
6646
6711
|
// 4px
|
|
6647
6712
|
md: "0.5rem",
|
|
6648
6713
|
// 8px
|
|
6649
6714
|
lg: "0.75rem",
|
|
6650
6715
|
// 12px
|
|
6716
|
+
xl: "1rem",
|
|
6717
|
+
// 16px
|
|
6718
|
+
xxl: "1.5rem",
|
|
6719
|
+
// 24px
|
|
6651
6720
|
full: "9999px"
|
|
6652
6721
|
},
|
|
6653
6722
|
shadows: {
|
|
6654
6723
|
none: "none",
|
|
6655
|
-
|
|
6724
|
+
xs: "0 1px 2px 0 rgba(0, 0, 0, 0.05)",
|
|
6725
|
+
sm: "0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06)",
|
|
6656
6726
|
md: "0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06)",
|
|
6657
6727
|
lg: "0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05)",
|
|
6658
|
-
xl: "0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04)"
|
|
6728
|
+
xl: "0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04)",
|
|
6729
|
+
xxl: "0 25px 50px -12px rgba(0, 0, 0, 0.25)",
|
|
6730
|
+
inner: "inset 0 2px 4px 0 rgba(0, 0, 0, 0.06)",
|
|
6731
|
+
outline: "0 0 0 3px rgba(102, 126, 234, 0.5)"
|
|
6732
|
+
},
|
|
6733
|
+
transitions: {
|
|
6734
|
+
fast: "150ms cubic-bezier(0.4, 0, 0.2, 1)",
|
|
6735
|
+
normal: "300ms cubic-bezier(0.4, 0, 0.2, 1)",
|
|
6736
|
+
slow: "500ms cubic-bezier(0.4, 0, 0.2, 1)",
|
|
6737
|
+
verySlow: "700ms cubic-bezier(0.4, 0, 0.2, 1)"
|
|
6738
|
+
},
|
|
6739
|
+
breakpoints: {
|
|
6740
|
+
xs: "480px",
|
|
6741
|
+
sm: "640px",
|
|
6742
|
+
md: "768px",
|
|
6743
|
+
lg: "1024px",
|
|
6744
|
+
xl: "1280px",
|
|
6745
|
+
xxl: "1536px"
|
|
6746
|
+
},
|
|
6747
|
+
zIndex: {
|
|
6748
|
+
dropdown: 1e3,
|
|
6749
|
+
sticky: 1020,
|
|
6750
|
+
fixed: 1030,
|
|
6751
|
+
modalBackdrop: 1040,
|
|
6752
|
+
modal: 1050,
|
|
6753
|
+
popover: 1060,
|
|
6754
|
+
tooltip: 1070
|
|
6755
|
+
},
|
|
6756
|
+
animations: {
|
|
6757
|
+
fadeIn: "fadeIn 0.3s ease-in-out",
|
|
6758
|
+
fadeOut: "fadeOut 0.3s ease-in-out",
|
|
6759
|
+
slideUp: "slideUp 0.3s ease-out",
|
|
6760
|
+
slideDown: "slideDown 0.3s ease-out",
|
|
6761
|
+
slideLeft: "slideLeft 0.3s ease-out",
|
|
6762
|
+
slideRight: "slideRight 0.3s ease-out",
|
|
6763
|
+
scaleUp: "scaleUp 0.2s ease-out",
|
|
6764
|
+
scaleDown: "scaleDown 0.2s ease-out",
|
|
6765
|
+
spin: "spin 1s linear infinite",
|
|
6766
|
+
pulse: "pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite",
|
|
6767
|
+
bounce: "bounce 1s infinite"
|
|
6768
|
+
},
|
|
6769
|
+
gradients: {
|
|
6770
|
+
primary: "linear-gradient(135deg, #667eea 0%, #764ba2 100%)",
|
|
6771
|
+
secondary: "linear-gradient(135deg, #764ba2 0%, #f093fb 100%)",
|
|
6772
|
+
accent: "linear-gradient(135deg, #f59e0b 0%, #ef4444 100%)",
|
|
6773
|
+
sunset: "linear-gradient(135deg, #ff6b6b 0%, #feca57 100%)",
|
|
6774
|
+
ocean: "linear-gradient(135deg, #0891b2 0%, #3b82f6 100%)",
|
|
6775
|
+
forest: "linear-gradient(135deg, #059669 0%, #10b981 100%)",
|
|
6776
|
+
fire: "linear-gradient(135deg, #ef4444 0%, #f97316 100%)",
|
|
6777
|
+
ice: "linear-gradient(135deg, #3b82f6 0%, #06b6d4 100%)",
|
|
6778
|
+
purple: "linear-gradient(135deg, #8b5cf6 0%, #a78bfa 100%)",
|
|
6779
|
+
rainbow: "linear-gradient(135deg, #667eea 0%, #764ba2 25%, #f093fb 50%, #4facfe 75%, #00f2fe 100%)"
|
|
6659
6780
|
}
|
|
6660
6781
|
};
|
|
6661
6782
|
|
|
6662
6783
|
// src/themes/darkTheme.ts
|
|
6663
6784
|
var darkTheme = {
|
|
6664
6785
|
name: "dark",
|
|
6786
|
+
mode: "dark",
|
|
6665
6787
|
colors: {
|
|
6666
6788
|
// Primary colors
|
|
6667
6789
|
primary: "#818cf8",
|
|
6668
6790
|
primaryHover: "#6366f1",
|
|
6669
6791
|
primaryLight: "#312e81",
|
|
6670
6792
|
primaryDark: "#4f46e5",
|
|
6793
|
+
primaryContrast: "#ffffff",
|
|
6671
6794
|
// Secondary colors
|
|
6672
6795
|
secondary: "#a78bfa",
|
|
6673
6796
|
secondaryHover: "#8b5cf6",
|
|
6797
|
+
secondaryLight: "#4c1d95",
|
|
6798
|
+
secondaryDark: "#7c3aed",
|
|
6799
|
+
secondaryContrast: "#ffffff",
|
|
6800
|
+
// Accent colors
|
|
6801
|
+
accent: "#fbbf24",
|
|
6802
|
+
accentHover: "#f59e0b",
|
|
6803
|
+
accentLight: "#78350f",
|
|
6804
|
+
accentDark: "#d97706",
|
|
6674
6805
|
// Neutral colors
|
|
6675
6806
|
background: "#111827",
|
|
6807
|
+
backgroundAlt: "#0f172a",
|
|
6676
6808
|
surface: "#1f2937",
|
|
6809
|
+
surfaceHover: "#374151",
|
|
6810
|
+
surfaceActive: "#4b5563",
|
|
6677
6811
|
border: "#374151",
|
|
6812
|
+
borderHover: "#4b5563",
|
|
6678
6813
|
divider: "#4b5563",
|
|
6814
|
+
overlay: "rgba(0, 0, 0, 0.75)",
|
|
6679
6815
|
// Text colors
|
|
6680
6816
|
textPrimary: "#f9fafb",
|
|
6681
6817
|
textSecondary: "#d1d5db",
|
|
6818
|
+
textTertiary: "#9ca3af",
|
|
6682
6819
|
textDisabled: "#6b7280",
|
|
6820
|
+
textInverse: "#1f2937",
|
|
6683
6821
|
// Status colors
|
|
6684
6822
|
success: "#34d399",
|
|
6823
|
+
successLight: "#064e3b",
|
|
6824
|
+
successDark: "#10b981",
|
|
6685
6825
|
warning: "#fbbf24",
|
|
6826
|
+
warningLight: "#78350f",
|
|
6827
|
+
warningDark: "#f59e0b",
|
|
6686
6828
|
error: "#f87171",
|
|
6829
|
+
errorLight: "#7f1d1d",
|
|
6830
|
+
errorDark: "#ef4444",
|
|
6687
6831
|
info: "#60a5fa",
|
|
6832
|
+
infoLight: "#1e3a8a",
|
|
6833
|
+
infoDark: "#3b82f6",
|
|
6688
6834
|
// Editor specific
|
|
6689
6835
|
editorBackground: "#1f2937",
|
|
6690
6836
|
editorText: "#f9fafb",
|
|
6691
6837
|
editorPlaceholder: "#6b7280",
|
|
6838
|
+
editorCursor: "#818cf8",
|
|
6692
6839
|
toolbarBackground: "#111827",
|
|
6693
6840
|
toolbarText: "#e5e7eb",
|
|
6694
6841
|
toolbarBorder: "#374151",
|
|
6842
|
+
toolbarIconHover: "#818cf8",
|
|
6695
6843
|
// Selection and highlights
|
|
6696
6844
|
selection: "#1e3a8a",
|
|
6845
|
+
selectionText: "#f9fafb",
|
|
6697
6846
|
highlight: "#78350f",
|
|
6698
|
-
|
|
6847
|
+
highlightText: "#f9fafb",
|
|
6848
|
+
focus: "#818cf8",
|
|
6849
|
+
focusRing: "rgba(129, 140, 248, 0.5)",
|
|
6850
|
+
// Code editor colors
|
|
6851
|
+
codeBackground: "#111827",
|
|
6852
|
+
codeText: "#f9fafb",
|
|
6853
|
+
codeComment: "#6b7280",
|
|
6854
|
+
codeKeyword: "#a78bfa",
|
|
6855
|
+
codeString: "#34d399",
|
|
6856
|
+
codeNumber: "#fbbf24",
|
|
6857
|
+
codeFunction: "#60a5fa",
|
|
6858
|
+
codeOperator: "#f87171"
|
|
6699
6859
|
},
|
|
6700
6860
|
typography: {
|
|
6701
6861
|
fontFamily: '-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif',
|
|
6862
|
+
fontFamilyHeading: '-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif',
|
|
6702
6863
|
fontFamilyMono: 'ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace',
|
|
6703
|
-
|
|
6864
|
+
fontSizeXxs: "0.625rem",
|
|
6704
6865
|
fontSizeXs: "0.75rem",
|
|
6705
6866
|
fontSizeSm: "0.875rem",
|
|
6706
6867
|
fontSizeMd: "1rem",
|
|
6707
6868
|
fontSizeLg: "1.125rem",
|
|
6708
6869
|
fontSizeXl: "1.25rem",
|
|
6709
|
-
|
|
6870
|
+
fontSizeXxl: "1.5rem",
|
|
6871
|
+
fontSize3xl: "1.875rem",
|
|
6872
|
+
fontSize4xl: "2.25rem",
|
|
6873
|
+
fontWeightLight: 300,
|
|
6710
6874
|
fontWeightNormal: 400,
|
|
6711
6875
|
fontWeightMedium: 500,
|
|
6712
|
-
|
|
6713
|
-
|
|
6876
|
+
fontWeightSemibold: 600,
|
|
6877
|
+
fontWeightBold: 700,
|
|
6878
|
+
fontWeightExtrabold: 800,
|
|
6714
6879
|
lineHeightTight: 1.25,
|
|
6880
|
+
lineHeightSnug: 1.375,
|
|
6715
6881
|
lineHeightNormal: 1.5,
|
|
6716
|
-
lineHeightRelaxed: 1.
|
|
6882
|
+
lineHeightRelaxed: 1.625,
|
|
6883
|
+
lineHeightLoose: 2,
|
|
6884
|
+
letterSpacingTight: "-0.025em",
|
|
6885
|
+
letterSpacingNormal: "0",
|
|
6886
|
+
letterSpacingWide: "0.025em",
|
|
6887
|
+
letterSpacingWider: "0.05em"
|
|
6717
6888
|
},
|
|
6718
6889
|
spacing: {
|
|
6890
|
+
xxs: "0.125rem",
|
|
6719
6891
|
xs: "0.25rem",
|
|
6720
6892
|
sm: "0.5rem",
|
|
6721
6893
|
md: "1rem",
|
|
6722
6894
|
lg: "1.5rem",
|
|
6723
6895
|
xl: "2rem",
|
|
6724
|
-
xxl: "3rem"
|
|
6896
|
+
xxl: "3rem",
|
|
6897
|
+
xxxl: "4rem"
|
|
6725
6898
|
},
|
|
6726
6899
|
borderRadius: {
|
|
6727
6900
|
none: "0",
|
|
6901
|
+
xs: "0.125rem",
|
|
6728
6902
|
sm: "0.25rem",
|
|
6729
6903
|
md: "0.5rem",
|
|
6730
6904
|
lg: "0.75rem",
|
|
6905
|
+
xl: "1rem",
|
|
6906
|
+
xxl: "1.5rem",
|
|
6731
6907
|
full: "9999px"
|
|
6732
6908
|
},
|
|
6733
6909
|
shadows: {
|
|
6734
6910
|
none: "none",
|
|
6735
|
-
|
|
6911
|
+
xs: "0 1px 2px 0 rgba(0, 0, 0, 0.3)",
|
|
6912
|
+
sm: "0 1px 3px 0 rgba(0, 0, 0, 0.4), 0 1px 2px 0 rgba(0, 0, 0, 0.3)",
|
|
6736
6913
|
md: "0 4px 6px -1px rgba(0, 0, 0, 0.4), 0 2px 4px -1px rgba(0, 0, 0, 0.3)",
|
|
6737
6914
|
lg: "0 10px 15px -3px rgba(0, 0, 0, 0.4), 0 4px 6px -2px rgba(0, 0, 0, 0.3)",
|
|
6738
|
-
xl: "0 20px 25px -5px rgba(0, 0, 0, 0.5), 0 10px 10px -5px rgba(0, 0, 0, 0.4)"
|
|
6915
|
+
xl: "0 20px 25px -5px rgba(0, 0, 0, 0.5), 0 10px 10px -5px rgba(0, 0, 0, 0.4)",
|
|
6916
|
+
xxl: "0 25px 50px -12px rgba(0, 0, 0, 0.6)",
|
|
6917
|
+
inner: "inset 0 2px 4px 0 rgba(0, 0, 0, 0.3)",
|
|
6918
|
+
outline: "0 0 0 3px rgba(129, 140, 248, 0.5)"
|
|
6919
|
+
},
|
|
6920
|
+
transitions: {
|
|
6921
|
+
fast: "150ms cubic-bezier(0.4, 0, 0.2, 1)",
|
|
6922
|
+
normal: "300ms cubic-bezier(0.4, 0, 0.2, 1)",
|
|
6923
|
+
slow: "500ms cubic-bezier(0.4, 0, 0.2, 1)",
|
|
6924
|
+
verySlow: "700ms cubic-bezier(0.4, 0, 0.2, 1)"
|
|
6925
|
+
},
|
|
6926
|
+
breakpoints: {
|
|
6927
|
+
xs: "480px",
|
|
6928
|
+
sm: "640px",
|
|
6929
|
+
md: "768px",
|
|
6930
|
+
lg: "1024px",
|
|
6931
|
+
xl: "1280px",
|
|
6932
|
+
xxl: "1536px"
|
|
6933
|
+
},
|
|
6934
|
+
zIndex: {
|
|
6935
|
+
dropdown: 1e3,
|
|
6936
|
+
sticky: 1020,
|
|
6937
|
+
fixed: 1030,
|
|
6938
|
+
modalBackdrop: 1040,
|
|
6939
|
+
modal: 1050,
|
|
6940
|
+
popover: 1060,
|
|
6941
|
+
tooltip: 1070
|
|
6942
|
+
},
|
|
6943
|
+
animations: {
|
|
6944
|
+
fadeIn: "fadeIn 0.3s ease-in-out",
|
|
6945
|
+
fadeOut: "fadeOut 0.3s ease-in-out",
|
|
6946
|
+
slideUp: "slideUp 0.3s ease-out",
|
|
6947
|
+
slideDown: "slideDown 0.3s ease-out",
|
|
6948
|
+
slideLeft: "slideLeft 0.3s ease-out",
|
|
6949
|
+
slideRight: "slideRight 0.3s ease-out",
|
|
6950
|
+
scaleUp: "scaleUp 0.2s ease-out",
|
|
6951
|
+
scaleDown: "scaleDown 0.2s ease-out",
|
|
6952
|
+
spin: "spin 1s linear infinite",
|
|
6953
|
+
pulse: "pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite",
|
|
6954
|
+
bounce: "bounce 1s infinite"
|
|
6955
|
+
},
|
|
6956
|
+
gradients: {
|
|
6957
|
+
primary: "linear-gradient(135deg, #818cf8 0%, #a78bfa 100%)",
|
|
6958
|
+
secondary: "linear-gradient(135deg, #a78bfa 0%, #c4b5fd 100%)",
|
|
6959
|
+
accent: "linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%)",
|
|
6960
|
+
sunset: "linear-gradient(135deg, #f87171 0%, #fbbf24 100%)",
|
|
6961
|
+
ocean: "linear-gradient(135deg, #06b6d4 0%, #60a5fa 100%)",
|
|
6962
|
+
forest: "linear-gradient(135deg, #10b981 0%, #34d399 100%)",
|
|
6963
|
+
fire: "linear-gradient(135deg, #f87171 0%, #fb923c 100%)",
|
|
6964
|
+
ice: "linear-gradient(135deg, #60a5fa 0%, #22d3ee 100%)",
|
|
6965
|
+
purple: "linear-gradient(135deg, #a78bfa 0%, #c4b5fd 100%)",
|
|
6966
|
+
rainbow: "linear-gradient(135deg, #818cf8 0%, #a78bfa 25%, #c4b5fd 50%, #60a5fa 75%, #22d3ee 100%)"
|
|
6739
6967
|
}
|
|
6740
6968
|
};
|
|
6741
6969
|
|
|
@@ -6870,9 +7098,12 @@ var minimalTheme = {
|
|
|
6870
7098
|
},
|
|
6871
7099
|
borderRadius: {
|
|
6872
7100
|
none: "0",
|
|
7101
|
+
xs: "0",
|
|
6873
7102
|
sm: "0",
|
|
6874
7103
|
md: "0",
|
|
6875
7104
|
lg: "0",
|
|
7105
|
+
xl: "0",
|
|
7106
|
+
xxl: "0",
|
|
6876
7107
|
full: "0"
|
|
6877
7108
|
}
|
|
6878
7109
|
};
|
|
@@ -7117,26 +7348,791 @@ function ThemeSwitcher({
|
|
|
7117
7348
|
] })
|
|
7118
7349
|
] });
|
|
7119
7350
|
}
|
|
7351
|
+
|
|
7352
|
+
// src/themes/ThemeCustomizer.tsx
|
|
7353
|
+
import { useState as useState18 } from "react";
|
|
7354
|
+
|
|
7355
|
+
// src/themes/themeBuilder.ts
|
|
7356
|
+
function deepMerge(target, source) {
|
|
7357
|
+
const result = { ...target };
|
|
7358
|
+
for (const key in source) {
|
|
7359
|
+
if (source[key] && typeof source[key] === "object" && !Array.isArray(source[key])) {
|
|
7360
|
+
result[key] = deepMerge(result[key] || {}, source[key]);
|
|
7361
|
+
} else if (source[key] !== void 0) {
|
|
7362
|
+
result[key] = source[key];
|
|
7363
|
+
}
|
|
7364
|
+
}
|
|
7365
|
+
return result;
|
|
7366
|
+
}
|
|
7367
|
+
function createTheme(baseTheme, override) {
|
|
7368
|
+
return deepMerge(baseTheme, override);
|
|
7369
|
+
}
|
|
7370
|
+
function generateColorVariations(baseColor) {
|
|
7371
|
+
return {
|
|
7372
|
+
base: baseColor,
|
|
7373
|
+
light: adjustBrightness(baseColor, 20),
|
|
7374
|
+
lighter: adjustBrightness(baseColor, 40),
|
|
7375
|
+
dark: adjustBrightness(baseColor, -20),
|
|
7376
|
+
darker: adjustBrightness(baseColor, -40),
|
|
7377
|
+
contrast: getContrastColor(baseColor)
|
|
7378
|
+
};
|
|
7379
|
+
}
|
|
7380
|
+
function adjustBrightness(color, percent) {
|
|
7381
|
+
const hex = color.replace("#", "");
|
|
7382
|
+
const r = parseInt(hex.substring(0, 2), 16);
|
|
7383
|
+
const g = parseInt(hex.substring(2, 4), 16);
|
|
7384
|
+
const b = parseInt(hex.substring(4, 6), 16);
|
|
7385
|
+
const adjust = (value) => {
|
|
7386
|
+
const adjusted = value + value * percent / 100;
|
|
7387
|
+
return Math.max(0, Math.min(255, Math.round(adjusted)));
|
|
7388
|
+
};
|
|
7389
|
+
const newR = adjust(r);
|
|
7390
|
+
const newG = adjust(g);
|
|
7391
|
+
const newB = adjust(b);
|
|
7392
|
+
return `#${newR.toString(16).padStart(2, "0")}${newG.toString(16).padStart(2, "0")}${newB.toString(16).padStart(2, "0")}`;
|
|
7393
|
+
}
|
|
7394
|
+
function getContrastColor(color) {
|
|
7395
|
+
const hex = color.replace("#", "");
|
|
7396
|
+
const r = parseInt(hex.substring(0, 2), 16);
|
|
7397
|
+
const g = parseInt(hex.substring(2, 4), 16);
|
|
7398
|
+
const b = parseInt(hex.substring(4, 6), 16);
|
|
7399
|
+
const luminance = (0.299 * r + 0.587 * g + 0.114 * b) / 255;
|
|
7400
|
+
return luminance > 0.5 ? "#000000" : "#ffffff";
|
|
7401
|
+
}
|
|
7402
|
+
function createGradient(color1, color2, angle = 135) {
|
|
7403
|
+
return `linear-gradient(${angle}deg, ${color1} 0%, ${color2} 100%)`;
|
|
7404
|
+
}
|
|
7405
|
+
function generatePalette(primaryColor) {
|
|
7406
|
+
const primary = generateColorVariations(primaryColor);
|
|
7407
|
+
const secondaryColor = rotateHue(primaryColor, 180);
|
|
7408
|
+
const accentColor = rotateHue(primaryColor, 60);
|
|
7409
|
+
return {
|
|
7410
|
+
primary,
|
|
7411
|
+
secondary: generateColorVariations(secondaryColor),
|
|
7412
|
+
accent: generateColorVariations(accentColor)
|
|
7413
|
+
};
|
|
7414
|
+
}
|
|
7415
|
+
function rotateHue(color, degrees) {
|
|
7416
|
+
const hex = color.replace("#", "");
|
|
7417
|
+
const r = parseInt(hex.substring(0, 2), 16);
|
|
7418
|
+
const g = parseInt(hex.substring(2, 4), 16);
|
|
7419
|
+
const b = parseInt(hex.substring(4, 6), 16);
|
|
7420
|
+
return color;
|
|
7421
|
+
}
|
|
7422
|
+
function validateTheme(theme) {
|
|
7423
|
+
const errors = [];
|
|
7424
|
+
if (!theme.name) {
|
|
7425
|
+
errors.push("Theme name is required");
|
|
7426
|
+
}
|
|
7427
|
+
if (!theme.colors) {
|
|
7428
|
+
errors.push("Theme colors are required");
|
|
7429
|
+
}
|
|
7430
|
+
if (!theme.typography) {
|
|
7431
|
+
errors.push("Theme typography is required");
|
|
7432
|
+
}
|
|
7433
|
+
const colorKeys = Object.keys(theme.colors || {});
|
|
7434
|
+
for (const key of colorKeys) {
|
|
7435
|
+
const color = theme.colors[key];
|
|
7436
|
+
if (typeof color === "string" && !isValidColor(color)) {
|
|
7437
|
+
errors.push(`Invalid color format for ${key}: ${color}`);
|
|
7438
|
+
}
|
|
7439
|
+
}
|
|
7440
|
+
return {
|
|
7441
|
+
valid: errors.length === 0,
|
|
7442
|
+
errors
|
|
7443
|
+
};
|
|
7444
|
+
}
|
|
7445
|
+
function isValidColor(color) {
|
|
7446
|
+
if (/^#([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})$/.test(color)) {
|
|
7447
|
+
return true;
|
|
7448
|
+
}
|
|
7449
|
+
if (/^rgba?\(/.test(color)) {
|
|
7450
|
+
return true;
|
|
7451
|
+
}
|
|
7452
|
+
if (/^hsla?\(/.test(color)) {
|
|
7453
|
+
return true;
|
|
7454
|
+
}
|
|
7455
|
+
const cssColors = ["transparent", "currentColor", "inherit"];
|
|
7456
|
+
if (cssColors.includes(color)) {
|
|
7457
|
+
return true;
|
|
7458
|
+
}
|
|
7459
|
+
return false;
|
|
7460
|
+
}
|
|
7461
|
+
function exportTheme(theme) {
|
|
7462
|
+
return JSON.stringify(theme, null, 2);
|
|
7463
|
+
}
|
|
7464
|
+
function importTheme(json) {
|
|
7465
|
+
try {
|
|
7466
|
+
const theme = JSON.parse(json);
|
|
7467
|
+
const validation = validateTheme(theme);
|
|
7468
|
+
if (!validation.valid) {
|
|
7469
|
+
throw new Error(`Invalid theme: ${validation.errors.join(", ")}`);
|
|
7470
|
+
}
|
|
7471
|
+
return theme;
|
|
7472
|
+
} catch (error) {
|
|
7473
|
+
throw new Error(`Failed to import theme: ${error}`);
|
|
7474
|
+
}
|
|
7475
|
+
}
|
|
7476
|
+
function themeToCSSVariables(theme, prefix = "cms") {
|
|
7477
|
+
const variables = {};
|
|
7478
|
+
Object.entries(theme.colors).forEach(([key, value]) => {
|
|
7479
|
+
variables[`--${prefix}-color-${camelToKebab2(key)}`] = value;
|
|
7480
|
+
});
|
|
7481
|
+
Object.entries(theme.typography).forEach(([key, value]) => {
|
|
7482
|
+
variables[`--${prefix}-typography-${camelToKebab2(key)}`] = String(value);
|
|
7483
|
+
});
|
|
7484
|
+
Object.entries(theme.spacing).forEach(([key, value]) => {
|
|
7485
|
+
variables[`--${prefix}-spacing-${key}`] = value;
|
|
7486
|
+
});
|
|
7487
|
+
Object.entries(theme.borderRadius).forEach(([key, value]) => {
|
|
7488
|
+
variables[`--${prefix}-radius-${key}`] = value;
|
|
7489
|
+
});
|
|
7490
|
+
Object.entries(theme.shadows).forEach(([key, value]) => {
|
|
7491
|
+
variables[`--${prefix}-shadow-${key}`] = value;
|
|
7492
|
+
});
|
|
7493
|
+
Object.entries(theme.transitions).forEach(([key, value]) => {
|
|
7494
|
+
variables[`--${prefix}-transition-${key}`] = value;
|
|
7495
|
+
});
|
|
7496
|
+
Object.entries(theme.zIndex).forEach(([key, value]) => {
|
|
7497
|
+
variables[`--${prefix}-z-${key}`] = String(value);
|
|
7498
|
+
});
|
|
7499
|
+
Object.entries(theme.gradients).forEach(([key, value]) => {
|
|
7500
|
+
variables[`--${prefix}-gradient-${key}`] = value;
|
|
7501
|
+
});
|
|
7502
|
+
return variables;
|
|
7503
|
+
}
|
|
7504
|
+
function camelToKebab2(str) {
|
|
7505
|
+
return str.replace(/([a-z0-9])([A-Z])/g, "$1-$2").toLowerCase();
|
|
7506
|
+
}
|
|
7507
|
+
function generateThemeFromBrand(brandColor, themeName, mode = "light") {
|
|
7508
|
+
const palette = generatePalette(brandColor);
|
|
7509
|
+
return {
|
|
7510
|
+
name: themeName,
|
|
7511
|
+
mode,
|
|
7512
|
+
colors: {
|
|
7513
|
+
primary: palette.primary.base,
|
|
7514
|
+
primaryHover: palette.primary.dark,
|
|
7515
|
+
primaryLight: palette.primary.light,
|
|
7516
|
+
primaryDark: palette.primary.darker,
|
|
7517
|
+
primaryContrast: palette.primary.contrast,
|
|
7518
|
+
secondary: palette.secondary.base,
|
|
7519
|
+
secondaryHover: palette.secondary.dark,
|
|
7520
|
+
secondaryLight: palette.secondary.light,
|
|
7521
|
+
secondaryDark: palette.secondary.darker,
|
|
7522
|
+
secondaryContrast: palette.secondary.contrast,
|
|
7523
|
+
accent: palette.accent.base,
|
|
7524
|
+
accentHover: palette.accent.dark,
|
|
7525
|
+
accentLight: palette.accent.light,
|
|
7526
|
+
accentDark: palette.accent.darker
|
|
7527
|
+
// Other colors will be filled by the base theme
|
|
7528
|
+
}
|
|
7529
|
+
};
|
|
7530
|
+
}
|
|
7531
|
+
|
|
7532
|
+
// src/themes/ThemeCustomizer.tsx
|
|
7533
|
+
import { Fragment as Fragment11, jsx as jsx21, jsxs as jsxs19 } from "react/jsx-runtime";
|
|
7534
|
+
function ThemeCustomizer({ onClose }) {
|
|
7535
|
+
const { theme, setTheme } = useTheme();
|
|
7536
|
+
const [activeTab, setActiveTab] = useState18("colors");
|
|
7537
|
+
const [customTheme, setCustomTheme] = useState18(theme);
|
|
7538
|
+
const [searchQuery, setSearchQuery] = useState18("");
|
|
7539
|
+
const [showColorPicker, setShowColorPicker] = useState18(null);
|
|
7540
|
+
const [history, setHistory] = useState18([theme]);
|
|
7541
|
+
const [historyIndex, setHistoryIndex] = useState18(0);
|
|
7542
|
+
const updateTheme = (override) => {
|
|
7543
|
+
const updated = createTheme(customTheme, override);
|
|
7544
|
+
setCustomTheme(updated);
|
|
7545
|
+
const newHistory = history.slice(0, historyIndex + 1);
|
|
7546
|
+
newHistory.push(updated);
|
|
7547
|
+
setHistory(newHistory);
|
|
7548
|
+
setHistoryIndex(newHistory.length - 1);
|
|
7549
|
+
};
|
|
7550
|
+
const undo = () => {
|
|
7551
|
+
if (historyIndex > 0) {
|
|
7552
|
+
setHistoryIndex(historyIndex - 1);
|
|
7553
|
+
setCustomTheme(history[historyIndex - 1]);
|
|
7554
|
+
}
|
|
7555
|
+
};
|
|
7556
|
+
const redo = () => {
|
|
7557
|
+
if (historyIndex < history.length - 1) {
|
|
7558
|
+
setHistoryIndex(historyIndex + 1);
|
|
7559
|
+
setCustomTheme(history[historyIndex + 1]);
|
|
7560
|
+
}
|
|
7561
|
+
};
|
|
7562
|
+
const applyTheme = () => {
|
|
7563
|
+
setTheme(customTheme);
|
|
7564
|
+
onClose?.();
|
|
7565
|
+
};
|
|
7566
|
+
const resetTheme = () => {
|
|
7567
|
+
setCustomTheme(theme);
|
|
7568
|
+
setHistory([theme]);
|
|
7569
|
+
setHistoryIndex(0);
|
|
7570
|
+
};
|
|
7571
|
+
return /* @__PURE__ */ jsx21("div", { className: "cms-theme-customizer-advanced", children: /* @__PURE__ */ jsx21(
|
|
7572
|
+
ThemeCustomizerContent,
|
|
7573
|
+
{
|
|
7574
|
+
activeTab,
|
|
7575
|
+
setActiveTab,
|
|
7576
|
+
customTheme,
|
|
7577
|
+
updateTheme,
|
|
7578
|
+
searchQuery,
|
|
7579
|
+
setSearchQuery,
|
|
7580
|
+
showColorPicker,
|
|
7581
|
+
setShowColorPicker,
|
|
7582
|
+
onClose,
|
|
7583
|
+
applyTheme,
|
|
7584
|
+
resetTheme,
|
|
7585
|
+
undo,
|
|
7586
|
+
redo,
|
|
7587
|
+
canUndo: historyIndex > 0,
|
|
7588
|
+
canRedo: historyIndex < history.length - 1
|
|
7589
|
+
}
|
|
7590
|
+
) });
|
|
7591
|
+
}
|
|
7592
|
+
function ThemeCustomizerContent(props) {
|
|
7593
|
+
const {
|
|
7594
|
+
activeTab,
|
|
7595
|
+
setActiveTab,
|
|
7596
|
+
customTheme,
|
|
7597
|
+
updateTheme,
|
|
7598
|
+
searchQuery,
|
|
7599
|
+
setSearchQuery,
|
|
7600
|
+
showColorPicker,
|
|
7601
|
+
setShowColorPicker,
|
|
7602
|
+
onClose,
|
|
7603
|
+
applyTheme,
|
|
7604
|
+
resetTheme,
|
|
7605
|
+
undo,
|
|
7606
|
+
redo,
|
|
7607
|
+
canUndo,
|
|
7608
|
+
canRedo
|
|
7609
|
+
} = props;
|
|
7610
|
+
const handleExport = () => {
|
|
7611
|
+
const json = exportTheme(customTheme);
|
|
7612
|
+
const blob = new Blob([json], { type: "application/json" });
|
|
7613
|
+
const url = URL.createObjectURL(blob);
|
|
7614
|
+
const a = document.createElement("a");
|
|
7615
|
+
a.href = url;
|
|
7616
|
+
a.download = `${customTheme.name}-theme.json`;
|
|
7617
|
+
a.click();
|
|
7618
|
+
URL.revokeObjectURL(url);
|
|
7619
|
+
};
|
|
7620
|
+
const handleImport = (event) => {
|
|
7621
|
+
const file = event.target.files?.[0];
|
|
7622
|
+
if (!file) return;
|
|
7623
|
+
const reader = new FileReader();
|
|
7624
|
+
reader.onload = (e) => {
|
|
7625
|
+
try {
|
|
7626
|
+
const json = e.target?.result;
|
|
7627
|
+
const imported = importTheme(json);
|
|
7628
|
+
updateTheme(imported);
|
|
7629
|
+
} catch (error) {
|
|
7630
|
+
alert(`Failed to import theme: ${error}`);
|
|
7631
|
+
}
|
|
7632
|
+
};
|
|
7633
|
+
reader.readAsText(file);
|
|
7634
|
+
};
|
|
7635
|
+
const generateFromBrand = (brandColor) => {
|
|
7636
|
+
const palette = generatePalette(brandColor);
|
|
7637
|
+
updateTheme({
|
|
7638
|
+
colors: {
|
|
7639
|
+
primary: palette.primary.base,
|
|
7640
|
+
primaryHover: palette.primary.dark,
|
|
7641
|
+
primaryLight: palette.primary.light,
|
|
7642
|
+
primaryDark: palette.primary.darker,
|
|
7643
|
+
secondary: palette.secondary.base,
|
|
7644
|
+
secondaryHover: palette.secondary.dark,
|
|
7645
|
+
accent: palette.accent.base
|
|
7646
|
+
}
|
|
7647
|
+
});
|
|
7648
|
+
};
|
|
7649
|
+
return /* @__PURE__ */ jsxs19(Fragment11, { children: [
|
|
7650
|
+
/* @__PURE__ */ jsx21("div", { className: "cms-theme-customizer-overlay", onClick: onClose }),
|
|
7651
|
+
/* @__PURE__ */ jsxs19("div", { className: "cms-theme-customizer-panel-advanced", children: [
|
|
7652
|
+
/* @__PURE__ */ jsxs19("div", { className: "cms-theme-customizer-header-advanced", children: [
|
|
7653
|
+
/* @__PURE__ */ jsxs19("div", { className: "cms-header-left", children: [
|
|
7654
|
+
/* @__PURE__ */ jsx21("h2", { children: "\u{1F3A8} Theme Studio" }),
|
|
7655
|
+
/* @__PURE__ */ jsx21("span", { className: "cms-theme-name-badge", children: customTheme.name })
|
|
7656
|
+
] }),
|
|
7657
|
+
/* @__PURE__ */ jsxs19("div", { className: "cms-header-actions", children: [
|
|
7658
|
+
/* @__PURE__ */ jsx21(
|
|
7659
|
+
"button",
|
|
7660
|
+
{
|
|
7661
|
+
onClick: undo,
|
|
7662
|
+
disabled: !canUndo,
|
|
7663
|
+
className: "cms-icon-btn",
|
|
7664
|
+
title: "Undo (Cmd+Z)",
|
|
7665
|
+
children: "\u21B6"
|
|
7666
|
+
}
|
|
7667
|
+
),
|
|
7668
|
+
/* @__PURE__ */ jsx21(
|
|
7669
|
+
"button",
|
|
7670
|
+
{
|
|
7671
|
+
onClick: redo,
|
|
7672
|
+
disabled: !canRedo,
|
|
7673
|
+
className: "cms-icon-btn",
|
|
7674
|
+
title: "Redo (Cmd+Shift+Z)",
|
|
7675
|
+
children: "\u21B7"
|
|
7676
|
+
}
|
|
7677
|
+
),
|
|
7678
|
+
/* @__PURE__ */ jsx21("button", { onClick: handleExport, className: "cms-icon-btn", title: "Export", children: "\u2B07" }),
|
|
7679
|
+
/* @__PURE__ */ jsxs19("label", { className: "cms-icon-btn", title: "Import", children: [
|
|
7680
|
+
"\u2B06",
|
|
7681
|
+
/* @__PURE__ */ jsx21(
|
|
7682
|
+
"input",
|
|
7683
|
+
{
|
|
7684
|
+
type: "file",
|
|
7685
|
+
accept: ".json",
|
|
7686
|
+
onChange: handleImport,
|
|
7687
|
+
style: { display: "none" }
|
|
7688
|
+
}
|
|
7689
|
+
)
|
|
7690
|
+
] }),
|
|
7691
|
+
/* @__PURE__ */ jsx21("button", { onClick: onClose, className: "cms-close-btn-advanced", children: "\xD7" })
|
|
7692
|
+
] })
|
|
7693
|
+
] }),
|
|
7694
|
+
/* @__PURE__ */ jsx21("div", { className: "cms-search-bar", children: /* @__PURE__ */ jsx21(
|
|
7695
|
+
"input",
|
|
7696
|
+
{
|
|
7697
|
+
type: "text",
|
|
7698
|
+
placeholder: "Search properties...",
|
|
7699
|
+
value: searchQuery,
|
|
7700
|
+
onChange: (e) => setSearchQuery(e.target.value),
|
|
7701
|
+
className: "cms-search-input"
|
|
7702
|
+
}
|
|
7703
|
+
) }),
|
|
7704
|
+
/* @__PURE__ */ jsxs19("div", { className: "cms-theme-tabs-advanced", children: [
|
|
7705
|
+
/* @__PURE__ */ jsx21(TabButton, { active: activeTab === "colors", onClick: () => setActiveTab("colors"), icon: "\u{1F3A8}", children: "Colors" }),
|
|
7706
|
+
/* @__PURE__ */ jsx21(TabButton, { active: activeTab === "typography", onClick: () => setActiveTab("typography"), icon: "Aa", children: "Typography" }),
|
|
7707
|
+
/* @__PURE__ */ jsx21(TabButton, { active: activeTab === "spacing", onClick: () => setActiveTab("spacing"), icon: "\u{1F4CF}", children: "Spacing" }),
|
|
7708
|
+
/* @__PURE__ */ jsx21(TabButton, { active: activeTab === "effects", onClick: () => setActiveTab("effects"), icon: "\u2728", children: "Effects" }),
|
|
7709
|
+
/* @__PURE__ */ jsx21(TabButton, { active: activeTab === "advanced", onClick: () => setActiveTab("advanced"), icon: "\u2699\uFE0F", children: "Advanced" }),
|
|
7710
|
+
/* @__PURE__ */ jsx21(TabButton, { active: activeTab === "preview", onClick: () => setActiveTab("preview"), icon: "\u{1F441}\uFE0F", children: "Preview" })
|
|
7711
|
+
] }),
|
|
7712
|
+
/* @__PURE__ */ jsxs19("div", { className: "cms-theme-content-advanced", children: [
|
|
7713
|
+
activeTab === "colors" && /* @__PURE__ */ jsx21(
|
|
7714
|
+
ColorsTab,
|
|
7715
|
+
{
|
|
7716
|
+
theme: customTheme,
|
|
7717
|
+
updateTheme,
|
|
7718
|
+
searchQuery,
|
|
7719
|
+
showColorPicker,
|
|
7720
|
+
setShowColorPicker,
|
|
7721
|
+
generateFromBrand
|
|
7722
|
+
}
|
|
7723
|
+
),
|
|
7724
|
+
activeTab === "typography" && /* @__PURE__ */ jsx21(TypographyTab, { theme: customTheme, updateTheme, searchQuery }),
|
|
7725
|
+
activeTab === "spacing" && /* @__PURE__ */ jsx21(SpacingTab, { theme: customTheme, updateTheme, searchQuery }),
|
|
7726
|
+
activeTab === "effects" && /* @__PURE__ */ jsx21(EffectsTab, { theme: customTheme, updateTheme, searchQuery }),
|
|
7727
|
+
activeTab === "advanced" && /* @__PURE__ */ jsx21(AdvancedTab, { theme: customTheme, updateTheme }),
|
|
7728
|
+
activeTab === "preview" && /* @__PURE__ */ jsx21(PreviewTab, { theme: customTheme })
|
|
7729
|
+
] }),
|
|
7730
|
+
/* @__PURE__ */ jsxs19("div", { className: "cms-theme-footer-advanced", children: [
|
|
7731
|
+
/* @__PURE__ */ jsx21("button", { onClick: resetTheme, className: "cms-btn-secondary", children: "Reset All" }),
|
|
7732
|
+
/* @__PURE__ */ jsxs19("div", { className: "cms-footer-actions", children: [
|
|
7733
|
+
/* @__PURE__ */ jsx21("button", { onClick: onClose, className: "cms-btn-secondary", children: "Cancel" }),
|
|
7734
|
+
/* @__PURE__ */ jsx21("button", { onClick: applyTheme, className: "cms-btn-primary", children: "Apply Theme" })
|
|
7735
|
+
] })
|
|
7736
|
+
] })
|
|
7737
|
+
] })
|
|
7738
|
+
] });
|
|
7739
|
+
}
|
|
7740
|
+
function TabButton({ active, onClick, icon, children }) {
|
|
7741
|
+
return /* @__PURE__ */ jsxs19(
|
|
7742
|
+
"button",
|
|
7743
|
+
{
|
|
7744
|
+
className: `cms-tab-btn-advanced ${active ? "active" : ""}`,
|
|
7745
|
+
onClick,
|
|
7746
|
+
children: [
|
|
7747
|
+
/* @__PURE__ */ jsx21("span", { className: "cms-tab-icon", children: icon }),
|
|
7748
|
+
/* @__PURE__ */ jsx21("span", { className: "cms-tab-label", children })
|
|
7749
|
+
]
|
|
7750
|
+
}
|
|
7751
|
+
);
|
|
7752
|
+
}
|
|
7753
|
+
function ColorsTab({
|
|
7754
|
+
theme,
|
|
7755
|
+
updateTheme,
|
|
7756
|
+
searchQuery,
|
|
7757
|
+
showColorPicker,
|
|
7758
|
+
setShowColorPicker,
|
|
7759
|
+
generateFromBrand
|
|
7760
|
+
}) {
|
|
7761
|
+
const [brandColor, setBrandColor] = useState18("#667eea");
|
|
7762
|
+
const colorGroups = [
|
|
7763
|
+
{ title: "Primary", keys: ["primary", "primaryHover", "primaryLight", "primaryDark", "primaryContrast"] },
|
|
7764
|
+
{ title: "Secondary", keys: ["secondary", "secondaryHover", "secondaryLight", "secondaryDark", "secondaryContrast"] },
|
|
7765
|
+
{ title: "Accent", keys: ["accent", "accentHover", "accentLight", "accentDark"] },
|
|
7766
|
+
{ title: "Background", keys: ["background", "backgroundAlt", "surface", "surfaceHover", "surfaceActive"] },
|
|
7767
|
+
{ title: "Border", keys: ["border", "borderHover", "divider", "overlay"] },
|
|
7768
|
+
{ title: "Text", keys: ["textPrimary", "textSecondary", "textTertiary", "textDisabled", "textInverse"] },
|
|
7769
|
+
{ title: "Status", keys: ["success", "successLight", "successDark", "warning", "warningLight", "warningDark", "error", "errorLight", "errorDark", "info", "infoLight", "infoDark"] },
|
|
7770
|
+
{ title: "Editor", keys: ["editorBackground", "editorText", "editorPlaceholder", "editorCursor", "toolbarBackground", "toolbarText", "toolbarBorder", "toolbarIconHover"] },
|
|
7771
|
+
{ title: "Selection", keys: ["selection", "selectionText", "highlight", "highlightText", "focus", "focusRing"] },
|
|
7772
|
+
{ title: "Code", keys: ["codeBackground", "codeText", "codeComment", "codeKeyword", "codeString", "codeNumber", "codeFunction", "codeOperator"] }
|
|
7773
|
+
];
|
|
7774
|
+
const filteredGroups = colorGroups.map((group) => ({
|
|
7775
|
+
...group,
|
|
7776
|
+
keys: group.keys.filter(
|
|
7777
|
+
(key) => key.toLowerCase().includes(searchQuery.toLowerCase()) || group.title.toLowerCase().includes(searchQuery.toLowerCase())
|
|
7778
|
+
)
|
|
7779
|
+
})).filter((group) => group.keys.length > 0);
|
|
7780
|
+
return /* @__PURE__ */ jsxs19("div", { className: "cms-colors-tab", children: [
|
|
7781
|
+
/* @__PURE__ */ jsxs19("div", { className: "cms-brand-generator", children: [
|
|
7782
|
+
/* @__PURE__ */ jsx21("h3", { children: "\u{1F3A8} Generate from Brand Color" }),
|
|
7783
|
+
/* @__PURE__ */ jsxs19("div", { className: "cms-brand-input-group", children: [
|
|
7784
|
+
/* @__PURE__ */ jsx21(
|
|
7785
|
+
"input",
|
|
7786
|
+
{
|
|
7787
|
+
type: "color",
|
|
7788
|
+
value: brandColor,
|
|
7789
|
+
onChange: (e) => setBrandColor(e.target.value),
|
|
7790
|
+
className: "cms-brand-color-picker"
|
|
7791
|
+
}
|
|
7792
|
+
),
|
|
7793
|
+
/* @__PURE__ */ jsx21(
|
|
7794
|
+
"input",
|
|
7795
|
+
{
|
|
7796
|
+
type: "text",
|
|
7797
|
+
value: brandColor,
|
|
7798
|
+
onChange: (e) => setBrandColor(e.target.value),
|
|
7799
|
+
className: "cms-brand-color-input",
|
|
7800
|
+
placeholder: "#667eea"
|
|
7801
|
+
}
|
|
7802
|
+
),
|
|
7803
|
+
/* @__PURE__ */ jsx21(
|
|
7804
|
+
"button",
|
|
7805
|
+
{
|
|
7806
|
+
onClick: () => generateFromBrand(brandColor),
|
|
7807
|
+
className: "cms-btn-primary",
|
|
7808
|
+
children: "Generate Palette"
|
|
7809
|
+
}
|
|
7810
|
+
)
|
|
7811
|
+
] })
|
|
7812
|
+
] }),
|
|
7813
|
+
filteredGroups.map((group) => /* @__PURE__ */ jsxs19("div", { className: "cms-color-group", children: [
|
|
7814
|
+
/* @__PURE__ */ jsx21("h3", { children: group.title }),
|
|
7815
|
+
/* @__PURE__ */ jsx21("div", { className: "cms-color-grid-advanced", children: group.keys.map((key) => /* @__PURE__ */ jsx21(
|
|
7816
|
+
AdvancedColorInput,
|
|
7817
|
+
{
|
|
7818
|
+
label: formatLabel(key),
|
|
7819
|
+
value: theme.colors[key],
|
|
7820
|
+
onChange: (value) => updateTheme({ colors: { [key]: value } }),
|
|
7821
|
+
showPicker: showColorPicker === key,
|
|
7822
|
+
onTogglePicker: () => setShowColorPicker(showColorPicker === key ? null : key)
|
|
7823
|
+
},
|
|
7824
|
+
key
|
|
7825
|
+
)) })
|
|
7826
|
+
] }, group.title))
|
|
7827
|
+
] });
|
|
7828
|
+
}
|
|
7829
|
+
function TypographyTab({ theme, updateTheme, searchQuery }) {
|
|
7830
|
+
const typographyGroups = [
|
|
7831
|
+
{ title: "Font Families", keys: ["fontFamily", "fontFamilyHeading", "fontFamilyMono"] },
|
|
7832
|
+
{ title: "Font Sizes", keys: ["fontSizeXxs", "fontSizeXs", "fontSizeSm", "fontSizeMd", "fontSizeLg", "fontSizeXl", "fontSizeXxl", "fontSize3xl", "fontSize4xl"] },
|
|
7833
|
+
{ title: "Font Weights", keys: ["fontWeightLight", "fontWeightNormal", "fontWeightMedium", "fontWeightSemibold", "fontWeightBold", "fontWeightExtrabold"] },
|
|
7834
|
+
{ title: "Line Heights", keys: ["lineHeightTight", "lineHeightSnug", "lineHeightNormal", "lineHeightRelaxed", "lineHeightLoose"] },
|
|
7835
|
+
{ title: "Letter Spacing", keys: ["letterSpacingTight", "letterSpacingNormal", "letterSpacingWide", "letterSpacingWider"] }
|
|
7836
|
+
];
|
|
7837
|
+
const filteredGroups = searchQuery ? typographyGroups.map((group) => ({
|
|
7838
|
+
...group,
|
|
7839
|
+
keys: group.keys.filter(
|
|
7840
|
+
(key) => key.toLowerCase().includes(searchQuery.toLowerCase()) || group.title.toLowerCase().includes(searchQuery.toLowerCase())
|
|
7841
|
+
)
|
|
7842
|
+
})).filter((group) => group.keys.length > 0) : typographyGroups;
|
|
7843
|
+
return /* @__PURE__ */ jsx21("div", { className: "cms-typography-tab", children: filteredGroups.map((group) => /* @__PURE__ */ jsxs19("div", { className: "cms-property-group", children: [
|
|
7844
|
+
/* @__PURE__ */ jsx21("h3", { children: group.title }),
|
|
7845
|
+
/* @__PURE__ */ jsx21("div", { className: "cms-property-grid", children: group.keys.map((key) => /* @__PURE__ */ jsx21(
|
|
7846
|
+
PropertyInput,
|
|
7847
|
+
{
|
|
7848
|
+
label: formatLabel(key),
|
|
7849
|
+
value: theme.typography[key],
|
|
7850
|
+
onChange: (value) => updateTheme({ typography: { [key]: value } }),
|
|
7851
|
+
type: group.title === "Font Weights" ? "number" : "text"
|
|
7852
|
+
},
|
|
7853
|
+
key
|
|
7854
|
+
)) })
|
|
7855
|
+
] }, group.title)) });
|
|
7856
|
+
}
|
|
7857
|
+
function SpacingTab({ theme, updateTheme, searchQuery }) {
|
|
7858
|
+
return /* @__PURE__ */ jsxs19("div", { className: "cms-spacing-tab", children: [
|
|
7859
|
+
/* @__PURE__ */ jsxs19("div", { className: "cms-property-group", children: [
|
|
7860
|
+
/* @__PURE__ */ jsx21("h3", { children: "Spacing Scale" }),
|
|
7861
|
+
/* @__PURE__ */ jsx21("div", { className: "cms-spacing-visual", children: Object.entries(theme.spacing).map(([key, value]) => /* @__PURE__ */ jsxs19("div", { className: "cms-spacing-item", children: [
|
|
7862
|
+
/* @__PURE__ */ jsx21("div", { className: "cms-spacing-label", children: key.toUpperCase() }),
|
|
7863
|
+
/* @__PURE__ */ jsx21("div", { className: "cms-spacing-bar", style: { width: value }, children: /* @__PURE__ */ jsx21("span", { children: value }) }),
|
|
7864
|
+
/* @__PURE__ */ jsx21(
|
|
7865
|
+
"input",
|
|
7866
|
+
{
|
|
7867
|
+
type: "text",
|
|
7868
|
+
value,
|
|
7869
|
+
onChange: (e) => updateTheme({ spacing: { [key]: e.target.value } }),
|
|
7870
|
+
className: "cms-spacing-input"
|
|
7871
|
+
}
|
|
7872
|
+
)
|
|
7873
|
+
] }, key)) })
|
|
7874
|
+
] }),
|
|
7875
|
+
/* @__PURE__ */ jsxs19("div", { className: "cms-property-group", children: [
|
|
7876
|
+
/* @__PURE__ */ jsx21("h3", { children: "Border Radius" }),
|
|
7877
|
+
/* @__PURE__ */ jsx21("div", { className: "cms-radius-grid", children: Object.entries(theme.borderRadius).map(([key, value]) => /* @__PURE__ */ jsxs19("div", { className: "cms-radius-item", children: [
|
|
7878
|
+
/* @__PURE__ */ jsx21("div", { className: "cms-radius-preview", style: { borderRadius: value } }),
|
|
7879
|
+
/* @__PURE__ */ jsx21(
|
|
7880
|
+
PropertyInput,
|
|
7881
|
+
{
|
|
7882
|
+
label: key.toUpperCase(),
|
|
7883
|
+
value,
|
|
7884
|
+
onChange: (newValue) => updateTheme({ borderRadius: { [key]: newValue } })
|
|
7885
|
+
}
|
|
7886
|
+
)
|
|
7887
|
+
] }, key)) })
|
|
7888
|
+
] })
|
|
7889
|
+
] });
|
|
7890
|
+
}
|
|
7891
|
+
function EffectsTab({ theme, updateTheme, searchQuery }) {
|
|
7892
|
+
return /* @__PURE__ */ jsxs19("div", { className: "cms-effects-tab", children: [
|
|
7893
|
+
/* @__PURE__ */ jsxs19("div", { className: "cms-property-group", children: [
|
|
7894
|
+
/* @__PURE__ */ jsx21("h3", { children: "Shadows" }),
|
|
7895
|
+
/* @__PURE__ */ jsx21("div", { className: "cms-shadow-grid", children: Object.entries(theme.shadows).map(([key, value]) => /* @__PURE__ */ jsxs19("div", { className: "cms-shadow-item", children: [
|
|
7896
|
+
/* @__PURE__ */ jsx21("div", { className: "cms-shadow-preview", style: { boxShadow: value } }),
|
|
7897
|
+
/* @__PURE__ */ jsx21(
|
|
7898
|
+
PropertyInput,
|
|
7899
|
+
{
|
|
7900
|
+
label: key.toUpperCase(),
|
|
7901
|
+
value,
|
|
7902
|
+
onChange: (newValue) => updateTheme({ shadows: { [key]: newValue } })
|
|
7903
|
+
}
|
|
7904
|
+
)
|
|
7905
|
+
] }, key)) })
|
|
7906
|
+
] }),
|
|
7907
|
+
/* @__PURE__ */ jsxs19("div", { className: "cms-property-group", children: [
|
|
7908
|
+
/* @__PURE__ */ jsx21("h3", { children: "Transitions" }),
|
|
7909
|
+
/* @__PURE__ */ jsx21("div", { className: "cms-property-grid", children: Object.entries(theme.transitions).map(([key, value]) => /* @__PURE__ */ jsx21(
|
|
7910
|
+
PropertyInput,
|
|
7911
|
+
{
|
|
7912
|
+
label: formatLabel(key),
|
|
7913
|
+
value,
|
|
7914
|
+
onChange: (newValue) => updateTheme({ transitions: { [key]: newValue } })
|
|
7915
|
+
},
|
|
7916
|
+
key
|
|
7917
|
+
)) })
|
|
7918
|
+
] }),
|
|
7919
|
+
/* @__PURE__ */ jsxs19("div", { className: "cms-property-group", children: [
|
|
7920
|
+
/* @__PURE__ */ jsx21("h3", { children: "Gradients" }),
|
|
7921
|
+
/* @__PURE__ */ jsx21("div", { className: "cms-gradient-grid", children: Object.entries(theme.gradients).map(([key, value]) => /* @__PURE__ */ jsxs19("div", { className: "cms-gradient-item", children: [
|
|
7922
|
+
/* @__PURE__ */ jsx21("div", { className: "cms-gradient-preview", style: { background: value } }),
|
|
7923
|
+
/* @__PURE__ */ jsx21(
|
|
7924
|
+
PropertyInput,
|
|
7925
|
+
{
|
|
7926
|
+
label: formatLabel(key),
|
|
7927
|
+
value,
|
|
7928
|
+
onChange: (newValue) => updateTheme({ gradients: { [key]: newValue } })
|
|
7929
|
+
}
|
|
7930
|
+
)
|
|
7931
|
+
] }, key)) })
|
|
7932
|
+
] })
|
|
7933
|
+
] });
|
|
7934
|
+
}
|
|
7935
|
+
function AdvancedTab({ theme, updateTheme }) {
|
|
7936
|
+
const validation = validateTheme(theme);
|
|
7937
|
+
return /* @__PURE__ */ jsxs19("div", { className: "cms-advanced-tab", children: [
|
|
7938
|
+
/* @__PURE__ */ jsxs19("div", { className: "cms-property-group", children: [
|
|
7939
|
+
/* @__PURE__ */ jsx21("h3", { children: "Theme Information" }),
|
|
7940
|
+
/* @__PURE__ */ jsx21(
|
|
7941
|
+
PropertyInput,
|
|
7942
|
+
{
|
|
7943
|
+
label: "Theme Name",
|
|
7944
|
+
value: theme.name,
|
|
7945
|
+
onChange: (value) => updateTheme({ name: value })
|
|
7946
|
+
}
|
|
7947
|
+
),
|
|
7948
|
+
/* @__PURE__ */ jsxs19("div", { className: "cms-theme-mode", children: [
|
|
7949
|
+
/* @__PURE__ */ jsx21("label", { children: "Mode" }),
|
|
7950
|
+
/* @__PURE__ */ jsxs19(
|
|
7951
|
+
"select",
|
|
7952
|
+
{
|
|
7953
|
+
value: theme.mode,
|
|
7954
|
+
onChange: (e) => updateTheme({ mode: e.target.value }),
|
|
7955
|
+
className: "cms-select",
|
|
7956
|
+
children: [
|
|
7957
|
+
/* @__PURE__ */ jsx21("option", { value: "light", children: "Light" }),
|
|
7958
|
+
/* @__PURE__ */ jsx21("option", { value: "dark", children: "Dark" })
|
|
7959
|
+
]
|
|
7960
|
+
}
|
|
7961
|
+
)
|
|
7962
|
+
] })
|
|
7963
|
+
] }),
|
|
7964
|
+
/* @__PURE__ */ jsxs19("div", { className: "cms-property-group", children: [
|
|
7965
|
+
/* @__PURE__ */ jsx21("h3", { children: "Validation" }),
|
|
7966
|
+
/* @__PURE__ */ jsx21("div", { className: `cms-validation ${validation.valid ? "valid" : "invalid"}`, children: validation.valid ? /* @__PURE__ */ jsx21("div", { className: "cms-validation-success", children: "\u2713 Theme is valid" }) : /* @__PURE__ */ jsxs19("div", { className: "cms-validation-errors", children: [
|
|
7967
|
+
/* @__PURE__ */ jsx21("strong", { children: "Errors:" }),
|
|
7968
|
+
/* @__PURE__ */ jsx21("ul", { children: validation.errors.map((error, i) => /* @__PURE__ */ jsx21("li", { children: error }, i)) })
|
|
7969
|
+
] }) })
|
|
7970
|
+
] }),
|
|
7971
|
+
/* @__PURE__ */ jsxs19("div", { className: "cms-property-group", children: [
|
|
7972
|
+
/* @__PURE__ */ jsx21("h3", { children: "Breakpoints" }),
|
|
7973
|
+
/* @__PURE__ */ jsx21("div", { className: "cms-property-grid", children: Object.entries(theme.breakpoints).map(([key, value]) => /* @__PURE__ */ jsx21(
|
|
7974
|
+
PropertyInput,
|
|
7975
|
+
{
|
|
7976
|
+
label: key.toUpperCase(),
|
|
7977
|
+
value,
|
|
7978
|
+
onChange: (newValue) => updateTheme({ breakpoints: { [key]: newValue } })
|
|
7979
|
+
},
|
|
7980
|
+
key
|
|
7981
|
+
)) })
|
|
7982
|
+
] }),
|
|
7983
|
+
/* @__PURE__ */ jsxs19("div", { className: "cms-property-group", children: [
|
|
7984
|
+
/* @__PURE__ */ jsx21("h3", { children: "Z-Index Layers" }),
|
|
7985
|
+
/* @__PURE__ */ jsx21("div", { className: "cms-property-grid", children: Object.entries(theme.zIndex).map(([key, value]) => /* @__PURE__ */ jsx21(
|
|
7986
|
+
PropertyInput,
|
|
7987
|
+
{
|
|
7988
|
+
label: formatLabel(key),
|
|
7989
|
+
value: String(value),
|
|
7990
|
+
onChange: (newValue) => updateTheme({ zIndex: { [key]: Number(newValue) } }),
|
|
7991
|
+
type: "number"
|
|
7992
|
+
},
|
|
7993
|
+
key
|
|
7994
|
+
)) })
|
|
7995
|
+
] })
|
|
7996
|
+
] });
|
|
7997
|
+
}
|
|
7998
|
+
function PreviewTab({ theme }) {
|
|
7999
|
+
return /* @__PURE__ */ jsx21("div", { className: "cms-preview-tab", style: {
|
|
8000
|
+
background: theme.colors.background,
|
|
8001
|
+
color: theme.colors.textPrimary,
|
|
8002
|
+
fontFamily: theme.typography.fontFamily
|
|
8003
|
+
}, children: /* @__PURE__ */ jsxs19("div", { className: "cms-preview-section", children: [
|
|
8004
|
+
/* @__PURE__ */ jsx21("h2", { style: { color: theme.colors.textPrimary }, children: "Theme Preview" }),
|
|
8005
|
+
/* @__PURE__ */ jsxs19("div", { className: "cms-preview-colors", children: [
|
|
8006
|
+
/* @__PURE__ */ jsx21("div", { className: "cms-preview-color-box", style: { background: theme.colors.primary, color: theme.colors.primaryContrast }, children: "Primary" }),
|
|
8007
|
+
/* @__PURE__ */ jsx21("div", { className: "cms-preview-color-box", style: { background: theme.colors.secondary, color: theme.colors.secondaryContrast }, children: "Secondary" }),
|
|
8008
|
+
/* @__PURE__ */ jsx21("div", { className: "cms-preview-color-box", style: { background: theme.colors.accent }, children: "Accent" })
|
|
8009
|
+
] }),
|
|
8010
|
+
/* @__PURE__ */ jsxs19("div", { className: "cms-preview-card", style: {
|
|
8011
|
+
background: theme.colors.surface,
|
|
8012
|
+
borderRadius: theme.borderRadius.lg,
|
|
8013
|
+
boxShadow: theme.shadows.md,
|
|
8014
|
+
padding: theme.spacing.lg
|
|
8015
|
+
}, children: [
|
|
8016
|
+
/* @__PURE__ */ jsx21("h3", { style: { color: theme.colors.textPrimary }, children: "Card Component" }),
|
|
8017
|
+
/* @__PURE__ */ jsx21("p", { style: { color: theme.colors.textSecondary }, children: "This is how your theme looks in a card component with surface background and shadow." }),
|
|
8018
|
+
/* @__PURE__ */ jsx21("button", { style: {
|
|
8019
|
+
background: theme.colors.primary,
|
|
8020
|
+
color: theme.colors.primaryContrast,
|
|
8021
|
+
padding: `${theme.spacing.sm} ${theme.spacing.lg}`,
|
|
8022
|
+
borderRadius: theme.borderRadius.md,
|
|
8023
|
+
border: "none",
|
|
8024
|
+
cursor: "pointer"
|
|
8025
|
+
}, children: "Primary Button" })
|
|
8026
|
+
] }),
|
|
8027
|
+
/* @__PURE__ */ jsxs19("div", { className: "cms-preview-typography", children: [
|
|
8028
|
+
/* @__PURE__ */ jsx21("h1", { style: { fontSize: theme.typography.fontSize4xl }, children: "Heading 1" }),
|
|
8029
|
+
/* @__PURE__ */ jsx21("h2", { style: { fontSize: theme.typography.fontSize3xl }, children: "Heading 2" }),
|
|
8030
|
+
/* @__PURE__ */ jsx21("h3", { style: { fontSize: theme.typography.fontSizeXxl }, children: "Heading 3" }),
|
|
8031
|
+
/* @__PURE__ */ jsx21("p", { style: { fontSize: theme.typography.fontSizeMd, lineHeight: theme.typography.lineHeightNormal }, children: "Body text with normal line height and medium font size." })
|
|
8032
|
+
] })
|
|
8033
|
+
] }) });
|
|
8034
|
+
}
|
|
8035
|
+
function AdvancedColorInput({
|
|
8036
|
+
label,
|
|
8037
|
+
value,
|
|
8038
|
+
onChange,
|
|
8039
|
+
showPicker,
|
|
8040
|
+
onTogglePicker
|
|
8041
|
+
}) {
|
|
8042
|
+
return /* @__PURE__ */ jsxs19("div", { className: "cms-advanced-color-input", children: [
|
|
8043
|
+
/* @__PURE__ */ jsx21("label", { children: label }),
|
|
8044
|
+
/* @__PURE__ */ jsxs19("div", { className: "cms-color-input-wrapper-advanced", children: [
|
|
8045
|
+
/* @__PURE__ */ jsx21(
|
|
8046
|
+
"div",
|
|
8047
|
+
{
|
|
8048
|
+
className: "cms-color-swatch",
|
|
8049
|
+
style: { background: value },
|
|
8050
|
+
onClick: onTogglePicker
|
|
8051
|
+
}
|
|
8052
|
+
),
|
|
8053
|
+
/* @__PURE__ */ jsx21(
|
|
8054
|
+
"input",
|
|
8055
|
+
{
|
|
8056
|
+
type: "text",
|
|
8057
|
+
value,
|
|
8058
|
+
onChange: (e) => onChange(e.target.value),
|
|
8059
|
+
className: "cms-color-text-input",
|
|
8060
|
+
placeholder: "#000000"
|
|
8061
|
+
}
|
|
8062
|
+
),
|
|
8063
|
+
showPicker && /* @__PURE__ */ jsxs19("div", { className: "cms-color-picker-popover", children: [
|
|
8064
|
+
/* @__PURE__ */ jsx21(
|
|
8065
|
+
"input",
|
|
8066
|
+
{
|
|
8067
|
+
type: "color",
|
|
8068
|
+
value,
|
|
8069
|
+
onChange: (e) => onChange(e.target.value),
|
|
8070
|
+
className: "cms-color-picker-native"
|
|
8071
|
+
}
|
|
8072
|
+
),
|
|
8073
|
+
/* @__PURE__ */ jsx21("div", { className: "cms-color-presets", children: ["#667eea", "#764ba2", "#f59e0b", "#10b981", "#ef4444", "#3b82f6", "#8b5cf6", "#ec4899"].map((preset) => /* @__PURE__ */ jsx21(
|
|
8074
|
+
"div",
|
|
8075
|
+
{
|
|
8076
|
+
className: "cms-color-preset",
|
|
8077
|
+
style: { background: preset },
|
|
8078
|
+
onClick: () => onChange(preset)
|
|
8079
|
+
},
|
|
8080
|
+
preset
|
|
8081
|
+
)) })
|
|
8082
|
+
] })
|
|
8083
|
+
] })
|
|
8084
|
+
] });
|
|
8085
|
+
}
|
|
8086
|
+
function PropertyInput({
|
|
8087
|
+
label,
|
|
8088
|
+
value,
|
|
8089
|
+
onChange,
|
|
8090
|
+
type = "text"
|
|
8091
|
+
}) {
|
|
8092
|
+
return /* @__PURE__ */ jsxs19("div", { className: "cms-property-input", children: [
|
|
8093
|
+
/* @__PURE__ */ jsx21("label", { children: label }),
|
|
8094
|
+
/* @__PURE__ */ jsx21(
|
|
8095
|
+
"input",
|
|
8096
|
+
{
|
|
8097
|
+
type,
|
|
8098
|
+
value,
|
|
8099
|
+
onChange: (e) => onChange(e.target.value),
|
|
8100
|
+
className: "cms-property-input-field"
|
|
8101
|
+
}
|
|
8102
|
+
)
|
|
8103
|
+
] });
|
|
8104
|
+
}
|
|
8105
|
+
function formatLabel(key) {
|
|
8106
|
+
return key.replace(/([A-Z])/g, " $1").replace(/^./, (str) => str.toUpperCase()).trim();
|
|
8107
|
+
}
|
|
7120
8108
|
export {
|
|
7121
8109
|
CMSBlockEditor,
|
|
7122
8110
|
CMSRenderer,
|
|
7123
8111
|
ImageNode,
|
|
7124
8112
|
OPEN_IMAGE_EDITOR_COMMAND,
|
|
8113
|
+
ThemeCustomizer,
|
|
7125
8114
|
ThemeProvider,
|
|
7126
8115
|
ThemeSwitcher,
|
|
7127
8116
|
VideoNode,
|
|
7128
8117
|
appendHTML,
|
|
7129
8118
|
copyMarkdownToClipboard,
|
|
8119
|
+
createGradient,
|
|
8120
|
+
createTheme,
|
|
7130
8121
|
darkTheme,
|
|
7131
8122
|
downloadHTML,
|
|
7132
8123
|
downloadMarkdown,
|
|
7133
8124
|
draculaTheme,
|
|
8125
|
+
exportTheme,
|
|
7134
8126
|
exportToHTML,
|
|
7135
8127
|
exportToHTMLWithWrapper,
|
|
7136
8128
|
exportToMarkdown,
|
|
7137
8129
|
forestTheme,
|
|
8130
|
+
generateColorVariations,
|
|
8131
|
+
generatePalette,
|
|
8132
|
+
generateThemeFromBrand,
|
|
7138
8133
|
importFromHTML,
|
|
7139
8134
|
importFromMarkdown,
|
|
8135
|
+
importTheme,
|
|
7140
8136
|
lightTheme,
|
|
7141
8137
|
loadHTMLFromFile,
|
|
7142
8138
|
loadMarkdownFromFile,
|
|
@@ -7148,6 +8144,8 @@ export {
|
|
|
7148
8144
|
presetThemes,
|
|
7149
8145
|
roseTheme,
|
|
7150
8146
|
sunsetTheme,
|
|
7151
|
-
|
|
8147
|
+
themeToCSSVariables,
|
|
8148
|
+
useTheme,
|
|
8149
|
+
validateTheme
|
|
7152
8150
|
};
|
|
7153
8151
|
//# sourceMappingURL=index.mjs.map
|