@kilivi/payloadcms-theme-management 0.3.1 → 0.3.3

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.
Files changed (47) hide show
  1. package/dist/fields/ColorPickerField.js +1 -1
  2. package/dist/fields/ColorPickerField.js.map +1 -1
  3. package/dist/fields/ThemeTokenSelectField.d.ts.map +1 -1
  4. package/dist/fields/ThemeTokenSelectField.js +1 -1
  5. package/dist/fields/ThemeTokenSelectField.js.map +1 -1
  6. package/dist/fields/themeConfigurationField.d.ts +3 -2
  7. package/dist/fields/themeConfigurationField.d.ts.map +1 -1
  8. package/dist/fields/themeConfigurationField.js +236 -274
  9. package/dist/fields/themeConfigurationField.js.map +1 -1
  10. package/dist/index.d.ts +1 -0
  11. package/dist/index.d.ts.map +1 -1
  12. package/dist/index.js +61 -10
  13. package/dist/index.js.map +1 -1
  14. package/package.json +1 -1
  15. package/dist/fields/ExtendedThemeAutoPopulateField.d.ts +0 -12
  16. package/dist/fields/ExtendedThemeAutoPopulateField.d.ts.map +0 -1
  17. package/dist/fields/ExtendedThemeAutoPopulateField.js +0 -176
  18. package/dist/fields/ExtendedThemeAutoPopulateField.js.map +0 -1
  19. package/dist/fields/RadiusField.d.ts +0 -3
  20. package/dist/fields/RadiusField.d.ts.map +0 -1
  21. package/dist/fields/RadiusField.js +0 -174
  22. package/dist/fields/RadiusField.js.map +0 -1
  23. package/dist/fields/ThemeLivePreview.css +0 -190
  24. package/dist/fields/ThemeLivePreview.d.ts +0 -3
  25. package/dist/fields/ThemeLivePreview.d.ts.map +0 -1
  26. package/dist/fields/ThemeLivePreview.js +0 -195
  27. package/dist/fields/ThemeLivePreview.js.map +0 -1
  28. package/dist/fields/VISUAL_EXAMPLES.d.ts +0 -153
  29. package/dist/fields/VISUAL_EXAMPLES.d.ts.map +0 -1
  30. package/dist/fields/VISUAL_EXAMPLES.js +0 -148
  31. package/dist/fields/VISUAL_EXAMPLES.js.map +0 -1
  32. package/dist/fields/extendedThemeFields.d.ts +0 -139
  33. package/dist/fields/extendedThemeFields.d.ts.map +0 -1
  34. package/dist/fields/extendedThemeFields.js +0 -489
  35. package/dist/fields/extendedThemeFields.js.map +0 -1
  36. package/dist/views/ThemePreviewLoader.d.ts +0 -7
  37. package/dist/views/ThemePreviewLoader.d.ts.map +0 -1
  38. package/dist/views/ThemePreviewLoader.js +0 -43
  39. package/dist/views/ThemePreviewLoader.js.map +0 -1
  40. package/dist/views/ThemePreviewView.d.ts +0 -10
  41. package/dist/views/ThemePreviewView.d.ts.map +0 -1
  42. package/dist/views/ThemePreviewView.js +0 -43
  43. package/dist/views/ThemePreviewView.js.map +0 -1
  44. package/dist/views/ThemePreviewViewClient.d.ts +0 -7
  45. package/dist/views/ThemePreviewViewClient.d.ts.map +0 -1
  46. package/dist/views/ThemePreviewViewClient.js +0 -12
  47. package/dist/views/ThemePreviewViewClient.js.map +0 -1
@@ -1,190 +0,0 @@
1
- /* Theme Live Preview Styles */
2
- .theme-live-preview-container {
3
- position: sticky;
4
- top: 0;
5
- height: 100vh;
6
- overflow-y: auto;
7
- background: var(--theme-elevation-50);
8
- border-left: 1px solid var(--theme-elevation-200);
9
- }
10
-
11
- .theme-live-preview-empty {
12
- display: flex;
13
- align-items: center;
14
- justify-content: center;
15
- height: 100%;
16
- padding: 2rem;
17
- color: var(--theme-elevation-400);
18
- font-size: 0.875rem;
19
- text-align: center;
20
- }
21
-
22
- .preview-header {
23
- position: sticky;
24
- top: 0;
25
- z-index: 10;
26
- background: var(--theme-elevation-0);
27
- border-bottom: 1px solid var(--theme-elevation-200);
28
- padding: 1rem;
29
- display: flex;
30
- justify-content: space-between;
31
- align-items: center;
32
- }
33
-
34
- .preview-header h3 {
35
- margin: 0;
36
- font-size: 1rem;
37
- font-weight: 600;
38
- color: var(--theme-text);
39
- }
40
-
41
- .mode-toggle {
42
- display: flex;
43
- gap: 0.5rem;
44
- background: var(--theme-elevation-100);
45
- padding: 0.25rem;
46
- border-radius: 8px;
47
- }
48
-
49
- .mode-toggle button {
50
- padding: 0.5rem 1rem;
51
- border: none;
52
- background: transparent;
53
- color: var(--theme-text);
54
- font-size: 0.875rem;
55
- font-weight: 500;
56
- cursor: pointer;
57
- border-radius: 6px;
58
- transition: all 0.2s;
59
- }
60
-
61
- .mode-toggle button.active {
62
- background: white;
63
- box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
64
- }
65
-
66
- .preview-content {
67
- padding: 2rem;
68
- min-height: calc(100vh - 80px);
69
- transition: all 0.3s;
70
- }
71
-
72
- .preview-section {
73
- margin-bottom: 2rem;
74
- }
75
-
76
- .preview-section h1 {
77
- font-size: 2rem;
78
- font-weight: 700;
79
- margin: 0 0 0.5rem 0;
80
- }
81
-
82
- .preview-section p {
83
- font-size: 1rem;
84
- margin: 0;
85
- }
86
-
87
- .preview-cards {
88
- display: grid;
89
- grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
90
- gap: 1.5rem;
91
- margin-bottom: 2rem;
92
- }
93
-
94
- .preview-card {
95
- padding: 1.5rem;
96
- border-radius: 12px;
97
- border: 2px solid;
98
- transition: all 0.2s;
99
- }
100
-
101
- .preview-card:hover {
102
- transform: translateY(-2px);
103
- box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
104
- }
105
-
106
- .preview-card h3 {
107
- margin: 0 0 0.5rem 0;
108
- font-size: 1.25rem;
109
- font-weight: 600;
110
- }
111
-
112
- .preview-card p {
113
- margin: 0 0 1rem 0;
114
- font-size: 0.875rem;
115
- }
116
-
117
- .preview-btn-primary,
118
- .preview-btn-secondary,
119
- .preview-btn-destructive {
120
- padding: 0.625rem 1.25rem;
121
- border: none;
122
- border-radius: 8px;
123
- font-weight: 600;
124
- font-size: 0.875rem;
125
- cursor: pointer;
126
- transition: all 0.2s;
127
- }
128
-
129
- .preview-btn-primary:hover,
130
- .preview-btn-secondary:hover,
131
- .preview-btn-destructive:hover {
132
- opacity: 0.9;
133
- transform: translateY(-1px);
134
- }
135
-
136
- .preview-ui-elements {
137
- display: flex;
138
- gap: 1rem;
139
- align-items: center;
140
- flex-wrap: wrap;
141
- margin-bottom: 2rem;
142
- }
143
-
144
- .preview-input {
145
- padding: 0.625rem 1rem;
146
- border: 2px solid;
147
- border-radius: 8px;
148
- font-size: 0.875rem;
149
- min-width: 200px;
150
- transition: all 0.2s;
151
- }
152
-
153
- .preview-input:focus {
154
- outline: none;
155
- border-color: var(--preview-ring, #3b82f6);
156
- box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
157
- }
158
-
159
- .preview-badge {
160
- padding: 0.375rem 0.875rem;
161
- border-radius: 6px;
162
- font-size: 0.75rem;
163
- font-weight: 600;
164
- text-transform: uppercase;
165
- letter-spacing: 0.05em;
166
- }
167
-
168
- .preview-muted {
169
- padding: 1.5rem;
170
- border-radius: 8px;
171
- margin-bottom: 2rem;
172
- }
173
-
174
- .preview-muted p {
175
- margin: 0;
176
- font-size: 0.875rem;
177
- }
178
-
179
- /* Dark mode adjustments */
180
- .theme-live-preview-container[data-mode="dark"] .preview-content {
181
- background: #1a1a1a;
182
- }
183
-
184
- .theme-live-preview-container[data-mode="dark"] .preview-card {
185
- box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
186
- }
187
-
188
- .theme-live-preview-container[data-mode="dark"] .preview-card:hover {
189
- box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4);
190
- }
@@ -1,3 +0,0 @@
1
- export declare const ThemeLivePreview: () => import("react").JSX.Element;
2
- export default ThemeLivePreview;
3
- //# sourceMappingURL=ThemeLivePreview.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"ThemeLivePreview.d.ts","sourceRoot":"","sources":["../../src/fields/ThemeLivePreview.tsx"],"names":[],"mappings":"AAoBA,eAAO,MAAM,gBAAgB,mCA6J5B,CAAA;AAED,eAAe,gBAAgB,CAAA"}
@@ -1,195 +0,0 @@
1
- 'use client';
2
- import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
3
- /**
4
- * Theme Live Preview Component
5
- * Real-time preview of theme configuration
6
- * Inspired by Payload CMS 3 Live Preview
7
- */ import { useFormFields } from '@payloadcms/ui';
8
- import { useState } from 'react';
9
- // Import CSS only in browser environment
10
- // This prevents Node.js from trying to import CSS directly
11
- // which causes ERR_UNKNOWN_FILE_EXTENSION error
12
- if (typeof window !== 'undefined') {
13
- // @ts-expect-error - Dynamic import of CSS is not recognized by TypeScript
14
- import('./ThemeLivePreview.css').catch((err)=>{
15
- console.warn('Failed to load CSS file:', err);
16
- });
17
- }
18
- export const ThemeLivePreview = ()=>{
19
- const allFields = useFormFields(([fields])=>fields);
20
- const [previewMode, setPreviewMode] = useState('light');
21
- const themeConfig = allFields?.themeConfiguration?.value;
22
- // Extract colors from theme configuration
23
- // Support both basic (lightMode/darkMode) and extended (extendedLightMode/extendedDarkMode)
24
- const lightMode = themeConfig?.extendedLightMode || themeConfig?.lightMode;
25
- const darkMode = themeConfig?.extendedDarkMode || themeConfig?.darkMode;
26
- const activeMode = previewMode === 'light' ? lightMode : darkMode;
27
- if (!themeConfig) {
28
- return /*#__PURE__*/ _jsx("div", {
29
- className: "theme-live-preview-empty",
30
- children: /*#__PURE__*/ _jsx("p", {
31
- children: "Configure your theme to see live preview"
32
- })
33
- });
34
- }
35
- return /*#__PURE__*/ _jsxs("div", {
36
- className: "theme-live-preview-container",
37
- "data-mode": previewMode,
38
- children: [
39
- /*#__PURE__*/ _jsxs("div", {
40
- className: "preview-header",
41
- children: [
42
- /*#__PURE__*/ _jsx("h3", {
43
- children: "Live Theme Preview"
44
- }),
45
- /*#__PURE__*/ _jsxs("div", {
46
- className: "mode-toggle",
47
- children: [
48
- /*#__PURE__*/ _jsx("button", {
49
- type: "button",
50
- className: previewMode === 'light' ? 'active' : '',
51
- onClick: ()=>setPreviewMode('light'),
52
- children: "☀️ Light"
53
- }),
54
- /*#__PURE__*/ _jsx("button", {
55
- type: "button",
56
- className: previewMode === 'dark' ? 'active' : '',
57
- onClick: ()=>setPreviewMode('dark'),
58
- children: "🌙 Dark"
59
- })
60
- ]
61
- })
62
- ]
63
- }),
64
- /*#__PURE__*/ _jsxs("div", {
65
- className: "preview-content",
66
- style: {
67
- backgroundColor: activeMode?.background || '#ffffff',
68
- color: activeMode?.foreground || '#000000'
69
- },
70
- children: [
71
- /*#__PURE__*/ _jsxs("div", {
72
- className: "preview-section",
73
- children: [
74
- /*#__PURE__*/ _jsx("h1", {
75
- style: {
76
- color: activeMode?.foreground
77
- },
78
- children: "Welcome to Your Site"
79
- }),
80
- /*#__PURE__*/ _jsx("p", {
81
- style: {
82
- color: activeMode?.mutedForeground
83
- },
84
- children: "This is a live preview of your theme configuration"
85
- })
86
- ]
87
- }),
88
- /*#__PURE__*/ _jsxs("div", {
89
- className: "preview-cards",
90
- children: [
91
- /*#__PURE__*/ _jsxs("div", {
92
- className: "preview-card",
93
- style: {
94
- backgroundColor: activeMode?.card || '#ffffff',
95
- color: activeMode?.cardForeground || '#000000',
96
- borderColor: activeMode?.border || '#e2e8f0'
97
- },
98
- children: [
99
- /*#__PURE__*/ _jsx("h3", {
100
- children: "Featured Content"
101
- }),
102
- /*#__PURE__*/ _jsx("p", {
103
- style: {
104
- color: activeMode?.mutedForeground
105
- },
106
- children: "Card component with theme colors"
107
- }),
108
- /*#__PURE__*/ _jsx("button", {
109
- className: "preview-btn-primary",
110
- style: {
111
- backgroundColor: activeMode?.primary || '#0070f3',
112
- color: activeMode?.primaryForeground || '#ffffff'
113
- },
114
- children: "Primary Action"
115
- })
116
- ]
117
- }),
118
- /*#__PURE__*/ _jsxs("div", {
119
- className: "preview-card",
120
- style: {
121
- backgroundColor: activeMode?.card || '#ffffff',
122
- color: activeMode?.cardForeground || '#000000',
123
- borderColor: activeMode?.border || '#e2e8f0'
124
- },
125
- children: [
126
- /*#__PURE__*/ _jsx("h3", {
127
- children: "Secondary Card"
128
- }),
129
- /*#__PURE__*/ _jsx("p", {
130
- style: {
131
- color: activeMode?.mutedForeground
132
- },
133
- children: "Another card to showcase your theme"
134
- }),
135
- /*#__PURE__*/ _jsx("button", {
136
- className: "preview-btn-secondary",
137
- style: {
138
- backgroundColor: activeMode?.secondary || '#f1f5f9',
139
- color: activeMode?.secondaryForeground || '#0f172a'
140
- },
141
- children: "Secondary"
142
- })
143
- ]
144
- })
145
- ]
146
- }),
147
- /*#__PURE__*/ _jsxs("div", {
148
- className: "preview-ui-elements",
149
- children: [
150
- /*#__PURE__*/ _jsx("input", {
151
- type: "text",
152
- placeholder: "Input field",
153
- className: "preview-input",
154
- style: {
155
- backgroundColor: activeMode?.background,
156
- color: activeMode?.foreground,
157
- borderColor: activeMode?.input || activeMode?.border
158
- }
159
- }),
160
- /*#__PURE__*/ _jsx("div", {
161
- className: "preview-badge",
162
- style: {
163
- backgroundColor: activeMode?.accent || '#f1f5f9',
164
- color: activeMode?.accentForeground || '#0f172a'
165
- },
166
- children: "Accent Badge"
167
- }),
168
- /*#__PURE__*/ _jsx("button", {
169
- className: "preview-btn-destructive",
170
- style: {
171
- backgroundColor: activeMode?.destructive || '#ef4444',
172
- color: activeMode?.destructiveForeground || '#ffffff'
173
- },
174
- children: "Destructive"
175
- })
176
- ]
177
- }),
178
- /*#__PURE__*/ _jsx("div", {
179
- className: "preview-muted",
180
- style: {
181
- backgroundColor: activeMode?.muted || '#f1f5f9',
182
- color: activeMode?.mutedForeground || '#64748b'
183
- },
184
- children: /*#__PURE__*/ _jsx("p", {
185
- children: "Muted background section for less prominent content"
186
- })
187
- })
188
- ]
189
- })
190
- ]
191
- });
192
- };
193
- export default ThemeLivePreview;
194
-
195
- //# sourceMappingURL=ThemeLivePreview.js.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../../src/fields/ThemeLivePreview.tsx"],"sourcesContent":["'use client'\n\n/**\n * Theme Live Preview Component\n * Real-time preview of theme configuration\n * Inspired by Payload CMS 3 Live Preview\n */\nimport { useFormFields } from '@payloadcms/ui'\nimport { useState } from 'react'\n\n// Import CSS only in browser environment\n// This prevents Node.js from trying to import CSS directly\n// which causes ERR_UNKNOWN_FILE_EXTENSION error\nif (typeof window !== 'undefined') {\n // @ts-expect-error - Dynamic import of CSS is not recognized by TypeScript\n import('./ThemeLivePreview.css').catch((err) => {\n console.warn('Failed to load CSS file:', err)\n })\n}\n\nexport const ThemeLivePreview = () => {\n const allFields = useFormFields(([fields]) => fields)\n const [previewMode, setPreviewMode] = useState<'light' | 'dark'>('light')\n\n const themeConfig = allFields?.themeConfiguration?.value as Record<string, unknown> | undefined\n\n // Extract colors from theme configuration\n // Support both basic (lightMode/darkMode) and extended (extendedLightMode/extendedDarkMode)\n const lightMode = (themeConfig?.extendedLightMode || themeConfig?.lightMode) as\n | Record<string, string>\n | undefined\n const darkMode = (themeConfig?.extendedDarkMode || themeConfig?.darkMode) as\n | Record<string, string>\n | undefined\n const activeMode = previewMode === 'light' ? lightMode : darkMode\n\n if (!themeConfig) {\n return (\n <div className=\"theme-live-preview-empty\">\n <p>Configure your theme to see live preview</p>\n </div>\n )\n }\n\n return (\n <div className=\"theme-live-preview-container\" data-mode={previewMode}>\n {/* Mode Toggle */}\n <div className=\"preview-header\">\n <h3>Live Theme Preview</h3>\n <div className=\"mode-toggle\">\n <button\n type=\"button\"\n className={previewMode === 'light' ? 'active' : ''}\n onClick={() => setPreviewMode('light')}\n >\n ☀️ Light\n </button>\n <button\n type=\"button\"\n className={previewMode === 'dark' ? 'active' : ''}\n onClick={() => setPreviewMode('dark')}\n >\n 🌙 Dark\n </button>\n </div>\n </div>\n\n {/* Preview Content */}\n <div\n className=\"preview-content\"\n style={{\n backgroundColor: activeMode?.background || '#ffffff',\n color: activeMode?.foreground || '#000000',\n }}\n >\n {/* Header Section */}\n <div className=\"preview-section\">\n <h1 style={{ color: activeMode?.foreground }}>Welcome to Your Site</h1>\n <p style={{ color: activeMode?.mutedForeground }}>\n This is a live preview of your theme configuration\n </p>\n </div>\n\n {/* Card Section */}\n <div className=\"preview-cards\">\n <div\n className=\"preview-card\"\n style={{\n backgroundColor: activeMode?.card || '#ffffff',\n color: activeMode?.cardForeground || '#000000',\n borderColor: activeMode?.border || '#e2e8f0',\n }}\n >\n <h3>Featured Content</h3>\n <p style={{ color: activeMode?.mutedForeground }}>Card component with theme colors</p>\n <button\n className=\"preview-btn-primary\"\n style={{\n backgroundColor: activeMode?.primary || '#0070f3',\n color: activeMode?.primaryForeground || '#ffffff',\n }}\n >\n Primary Action\n </button>\n </div>\n\n <div\n className=\"preview-card\"\n style={{\n backgroundColor: activeMode?.card || '#ffffff',\n color: activeMode?.cardForeground || '#000000',\n borderColor: activeMode?.border || '#e2e8f0',\n }}\n >\n <h3>Secondary Card</h3>\n <p style={{ color: activeMode?.mutedForeground }}>\n Another card to showcase your theme\n </p>\n <button\n className=\"preview-btn-secondary\"\n style={{\n backgroundColor: activeMode?.secondary || '#f1f5f9',\n color: activeMode?.secondaryForeground || '#0f172a',\n }}\n >\n Secondary\n </button>\n </div>\n </div>\n\n {/* UI Elements */}\n <div className=\"preview-ui-elements\">\n <input\n type=\"text\"\n placeholder=\"Input field\"\n className=\"preview-input\"\n style={{\n backgroundColor: activeMode?.background,\n color: activeMode?.foreground,\n borderColor: activeMode?.input || activeMode?.border,\n }}\n />\n\n <div\n className=\"preview-badge\"\n style={{\n backgroundColor: activeMode?.accent || '#f1f5f9',\n color: activeMode?.accentForeground || '#0f172a',\n }}\n >\n Accent Badge\n </div>\n\n <button\n className=\"preview-btn-destructive\"\n style={{\n backgroundColor: activeMode?.destructive || '#ef4444',\n color: activeMode?.destructiveForeground || '#ffffff',\n }}\n >\n Destructive\n </button>\n </div>\n\n {/* Muted Section */}\n <div\n className=\"preview-muted\"\n style={{\n backgroundColor: activeMode?.muted || '#f1f5f9',\n color: activeMode?.mutedForeground || '#64748b',\n }}\n >\n <p>Muted background section for less prominent content</p>\n </div>\n </div>\n </div>\n )\n}\n\nexport default ThemeLivePreview\n"],"names":["useFormFields","useState","window","catch","err","console","warn","ThemeLivePreview","allFields","fields","previewMode","setPreviewMode","themeConfig","themeConfiguration","value","lightMode","extendedLightMode","darkMode","extendedDarkMode","activeMode","div","className","p","data-mode","h3","button","type","onClick","style","backgroundColor","background","color","foreground","h1","mutedForeground","card","cardForeground","borderColor","border","primary","primaryForeground","secondary","secondaryForeground","input","placeholder","accent","accentForeground","destructive","destructiveForeground","muted"],"mappings":"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"}
@@ -1,153 +0,0 @@
1
- /**
2
- * Enhanced Font Selector - Visual Examples
3
- *
4
- * This file demonstrates how the font selector appears with actual fonts
5
- */
6
- /**
7
- * BEFORE (Standard Payload Select):
8
- *
9
- * ┌──────────────────────────────┐
10
- * │ Body font ▼ │
11
- * ├──────────────────────────────┤
12
- * │ System │
13
- * │ Inter │
14
- * │ Roboto │
15
- * │ Open Sans │
16
- * │ ... │
17
- * └──────────────────────────────┘
18
- *
19
- * Issues:
20
- * - No visual preview of fonts
21
- * - Can't see how font looks
22
- * - Generic dropdown appearance
23
- * - No distinction between fonts
24
- */
25
- /**
26
- * AFTER (Custom Font Selector):
27
- *
28
- * ┌────────────────────────────────────┐
29
- * │ Body font │
30
- * │ ┌────────────────────────────┐ │
31
- * │ │ Inter ▼ │ │
32
- * │ └────────────────────────────┘ │
33
- * └────────────────────────────────────┘
34
- *
35
- * Opens dropdown:
36
- *
37
- * ┌────────────────────────────────────┐
38
- * │ ✓ Inter │
39
- * │ The quick brown fox jumps... │
40
- * │ (rendered in Inter font) │
41
- * ├────────────────────────────────────┤
42
- * │ Roboto │
43
- * │ The quick brown fox jumps... │
44
- * │ (rendered in Roboto font) │
45
- * ├────────────────────────────────────┤
46
- * │ Playfair Display │
47
- * │ The quick brown fox jumps... │
48
- * │ (rendered in Playfair font) │
49
- * └────────────────────────────────────┘
50
- *
51
- * Features:
52
- * ✅ Live font preview
53
- * ✅ Check mark on selected
54
- * ✅ Hover effects
55
- * ✅ Smooth transitions
56
- * ✅ Font category badges
57
- */
58
- /**
59
- * Color Picker BEFORE (Inline Popover):
60
- *
61
- * ┌────────────────────────────────┐
62
- * │ Primary color │
63
- * │ ┌───┐ #3b82f6 │
64
- * │ │███│ ──────────── │
65
- * │ └───┘ │
66
- * │ ┌──────────────────┐ │
67
- * │ │ Color Picker │ │
68
- * │ │ [Hex Wheel] │ │
69
- * │ │ #3b82f6 │ │
70
- * │ └──────────────────┘ │
71
- * └────────────────────────────────┘
72
- *
73
- * Issues:
74
- * - Takes up inline space
75
- * - Hard to use on mobile
76
- * - No quick color swatches
77
- * - Click-outside handling complex
78
- */
79
- /**
80
- * Color Picker AFTER (Modal Drawer):
81
- *
82
- * Field:
83
- * ┌────────────────────────────────┐
84
- * │ Primary color │
85
- * │ ┌───┐ #3b82f6 │
86
- * │ │███│ ──────────── │
87
- * │ └───┘ │
88
- * └────────────────────────────────┘
89
- *
90
- * Click swatch → Opens Modal:
91
- *
92
- * ╔════════════════════════════════╗
93
- * ║ Choose Primary color [×] ║
94
- * ╠════════════════════════════════╣
95
- * ║ ║
96
- * ║ ┌────────────────────┐ ║
97
- * ║ │ │ ║
98
- * ║ │ [Color Wheel] │ ║
99
- * ║ │ │ ║
100
- * ║ └────────────────────┘ ║
101
- * ║ ║
102
- * ║ #3b82f6 [Done] ║
103
- * ║ ║
104
- * ║ Quick Colors: ║
105
- * ║ ┌──┬──┬──┬──┬──┬──┬──┬──┐ ║
106
- * ║ │██│██│██│██│██│██│██│██│ ║
107
- * ║ └──┴──┴──┴──┴──┴──┴──┴──┘ ║
108
- * ║ ║
109
- * ╚════════════════════════════════╝
110
- *
111
- * Features:
112
- * ✅ Full-screen modal (Payload Drawer)
113
- * ✅ Larger color picker (220px)
114
- * ✅ Quick color swatches
115
- * ✅ Better mobile UX
116
- * ✅ Escape key to close
117
- */
118
- /**
119
- * Theme Preset Selector (Already Had Swatches!):
120
- *
121
- * ┌─────────────────────────────────────┐
122
- * │ Cool & Professional ●●●●● │
123
- * │ cool │
124
- * ├─────────────────────────────────────┤
125
- * │ Warm & Inviting ●●●●● │
126
- * │ warm │
127
- * ├─────────────────────────────────────┤
128
- * │ Dark & Modern ●●●●● │
129
- * │ dark │
130
- * └─────────────────────────────────────┘
131
- *
132
- * Legend:
133
- * ● = Color swatch for:
134
- * - Primary
135
- * - Secondary
136
- * - Accent
137
- * - Background
138
- * - Foreground
139
- */
140
- export declare const examples: {
141
- fontSelector: {
142
- before: string;
143
- after: string;
144
- };
145
- colorPicker: {
146
- before: string;
147
- after: string;
148
- };
149
- themePresets: {
150
- status: string;
151
- };
152
- };
153
- //# sourceMappingURL=VISUAL_EXAMPLES.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"VISUAL_EXAMPLES.d.ts","sourceRoot":"","sources":["../../src/fields/VISUAL_EXAMPLES.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH;;;;;;;;;;;;;;;;;;GAkBG;AAEH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgCG;AAEH;;;;;;;;;;;;;;;;;;;;GAoBG;AAEH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAsCG;AAEH;;;;;;;;;;;;;;;;;;;;;GAqBG;AAEH,eAAO,MAAM,QAAQ;;;;;;;;;;;;CAYpB,CAAA"}