@squaredr/fieldcraft-pro 0.0.0
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/dist/chunk-APHGEYG4.mjs +3168 -0
- package/dist/chunk-MQGR25NG.mjs +409 -0
- package/dist/chunk-NIKQEWPG.mjs +467 -0
- package/dist/form-builder/index.d.mts +367 -0
- package/dist/form-builder/index.d.ts +367 -0
- package/dist/form-builder/index.js +3201 -0
- package/dist/form-builder/index.mjs +1 -0
- package/dist/index.d.mts +9 -0
- package/dist/index.d.ts +9 -0
- package/dist/index.js +4111 -0
- package/dist/index.mjs +24 -0
- package/dist/response-viewer/index.d.mts +21 -0
- package/dist/response-viewer/index.d.ts +21 -0
- package/dist/response-viewer/index.js +469 -0
- package/dist/response-viewer/index.mjs +1 -0
- package/dist/styles.css +2 -0
- package/dist/theme-editor/index.d.mts +32 -0
- package/dist/theme-editor/index.d.ts +32 -0
- package/dist/theme-editor/index.js +413 -0
- package/dist/theme-editor/index.mjs +1 -0
- package/dist/theme-editor-styles.css +256 -0
- package/package.json +74 -0
|
@@ -0,0 +1,256 @@
|
|
|
1
|
+
/* FieldCraft Pro Theme Editor
|
|
2
|
+
All colors use CSS custom properties with dark defaults.
|
|
3
|
+
Override on .fcte-root to match your app's theme:
|
|
4
|
+
|
|
5
|
+
.fcte-root {
|
|
6
|
+
--fcte-bg: #ffffff;
|
|
7
|
+
--fcte-surface: #f5f5f5;
|
|
8
|
+
--fcte-text: #1a1a1a;
|
|
9
|
+
--fcte-text-muted: #6b7280;
|
|
10
|
+
--fcte-border: #e0e0e0;
|
|
11
|
+
--fcte-input-bg: #f9fafb;
|
|
12
|
+
--fcte-accent: #2563eb;
|
|
13
|
+
--fcte-accent-text: #ffffff;
|
|
14
|
+
}
|
|
15
|
+
*/
|
|
16
|
+
|
|
17
|
+
.fcte-root {
|
|
18
|
+
/* Configurable tokens — override these to theme the editor UI */
|
|
19
|
+
--fcte-bg: #0a0a0b;
|
|
20
|
+
--fcte-surface: #111113;
|
|
21
|
+
--fcte-surface-hover: #1c1c20;
|
|
22
|
+
--fcte-text: #e8e8ea;
|
|
23
|
+
--fcte-text-muted: #8a8a95;
|
|
24
|
+
--fcte-text-dim: #5a5a66;
|
|
25
|
+
--fcte-border: #1c1c20;
|
|
26
|
+
--fcte-border-strong: #26262c;
|
|
27
|
+
--fcte-input-bg: #17171a;
|
|
28
|
+
--fcte-accent: oklch(0.82 0.14 210);
|
|
29
|
+
--fcte-accent-text: #0a0a0b;
|
|
30
|
+
|
|
31
|
+
display: flex;
|
|
32
|
+
flex-direction: column;
|
|
33
|
+
font-family: system-ui, -apple-system, sans-serif;
|
|
34
|
+
font-size: 13px;
|
|
35
|
+
color: var(--fcte-text);
|
|
36
|
+
background: var(--fcte-bg);
|
|
37
|
+
overflow: hidden;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
/* Toolbar */
|
|
41
|
+
.fcte-toolbar {
|
|
42
|
+
display: flex;
|
|
43
|
+
align-items: center;
|
|
44
|
+
justify-content: space-between;
|
|
45
|
+
padding: 8px 12px;
|
|
46
|
+
border-bottom: 1px solid var(--fcte-border);
|
|
47
|
+
background: var(--fcte-surface);
|
|
48
|
+
gap: 8px;
|
|
49
|
+
flex-shrink: 0;
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
.fcte-toolbar__left {
|
|
53
|
+
display: flex;
|
|
54
|
+
align-items: center;
|
|
55
|
+
gap: 12px;
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
.fcte-toolbar__right {
|
|
59
|
+
display: flex;
|
|
60
|
+
align-items: center;
|
|
61
|
+
gap: 8px;
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
.fcte-toolbar__title {
|
|
65
|
+
font-weight: 600;
|
|
66
|
+
font-size: 14px;
|
|
67
|
+
white-space: nowrap;
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
.fcte-toolbar__preset {
|
|
71
|
+
padding: 4px 8px;
|
|
72
|
+
border-radius: 4px;
|
|
73
|
+
border: 1px solid var(--fcte-border-strong);
|
|
74
|
+
background: var(--fcte-input-bg);
|
|
75
|
+
color: var(--fcte-text);
|
|
76
|
+
font-size: 12px;
|
|
77
|
+
cursor: pointer;
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
/* Buttons */
|
|
81
|
+
.fcte-btn {
|
|
82
|
+
padding: 5px 12px;
|
|
83
|
+
border-radius: 4px;
|
|
84
|
+
border: none;
|
|
85
|
+
font-size: 12px;
|
|
86
|
+
font-weight: 500;
|
|
87
|
+
cursor: pointer;
|
|
88
|
+
white-space: nowrap;
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
.fcte-btn--primary {
|
|
92
|
+
background: var(--fcte-accent);
|
|
93
|
+
color: var(--fcte-accent-text);
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
.fcte-btn--primary:hover {
|
|
97
|
+
opacity: 0.9;
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
.fcte-btn--secondary {
|
|
101
|
+
background: var(--fcte-input-bg);
|
|
102
|
+
color: var(--fcte-text);
|
|
103
|
+
border: 1px solid var(--fcte-border-strong);
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
.fcte-btn--secondary:hover {
|
|
107
|
+
background: var(--fcte-surface-hover);
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
/* Body split */
|
|
111
|
+
.fcte-body {
|
|
112
|
+
display: flex;
|
|
113
|
+
flex: 1;
|
|
114
|
+
min-height: 0;
|
|
115
|
+
overflow: hidden;
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
/* Editor panel */
|
|
119
|
+
.fcte-editor {
|
|
120
|
+
width: 320px;
|
|
121
|
+
min-width: 280px;
|
|
122
|
+
display: flex;
|
|
123
|
+
flex-direction: column;
|
|
124
|
+
border-right: 1px solid var(--fcte-border);
|
|
125
|
+
background: var(--fcte-surface);
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
/* Section tabs */
|
|
129
|
+
.fcte-tabs {
|
|
130
|
+
display: flex;
|
|
131
|
+
border-bottom: 1px solid var(--fcte-border);
|
|
132
|
+
overflow-x: auto;
|
|
133
|
+
flex-shrink: 0;
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
.fcte-tab {
|
|
137
|
+
padding: 8px 12px;
|
|
138
|
+
font-size: 12px;
|
|
139
|
+
font-weight: 500;
|
|
140
|
+
color: var(--fcte-text-muted);
|
|
141
|
+
border: none;
|
|
142
|
+
background: none;
|
|
143
|
+
cursor: pointer;
|
|
144
|
+
white-space: nowrap;
|
|
145
|
+
border-bottom: 2px solid transparent;
|
|
146
|
+
transition: color 0.15s, border-color 0.15s;
|
|
147
|
+
}
|
|
148
|
+
|
|
149
|
+
.fcte-tab:hover {
|
|
150
|
+
color: var(--fcte-text);
|
|
151
|
+
}
|
|
152
|
+
|
|
153
|
+
.fcte-tab--active {
|
|
154
|
+
color: var(--fcte-text);
|
|
155
|
+
border-bottom-color: var(--fcte-accent);
|
|
156
|
+
}
|
|
157
|
+
|
|
158
|
+
/* Fields area */
|
|
159
|
+
.fcte-fields {
|
|
160
|
+
flex: 1;
|
|
161
|
+
overflow-y: auto;
|
|
162
|
+
padding: 12px;
|
|
163
|
+
display: flex;
|
|
164
|
+
flex-direction: column;
|
|
165
|
+
gap: 10px;
|
|
166
|
+
}
|
|
167
|
+
|
|
168
|
+
/* Individual field */
|
|
169
|
+
.fcte-field {
|
|
170
|
+
display: flex;
|
|
171
|
+
flex-direction: column;
|
|
172
|
+
gap: 4px;
|
|
173
|
+
}
|
|
174
|
+
|
|
175
|
+
.fcte-field__label {
|
|
176
|
+
font-size: 11px;
|
|
177
|
+
font-weight: 500;
|
|
178
|
+
color: var(--fcte-text-muted);
|
|
179
|
+
text-transform: uppercase;
|
|
180
|
+
letter-spacing: 0.03em;
|
|
181
|
+
}
|
|
182
|
+
|
|
183
|
+
.fcte-field__color-row {
|
|
184
|
+
display: flex;
|
|
185
|
+
align-items: center;
|
|
186
|
+
gap: 6px;
|
|
187
|
+
}
|
|
188
|
+
|
|
189
|
+
.fcte-field__swatch {
|
|
190
|
+
width: 28px;
|
|
191
|
+
height: 28px;
|
|
192
|
+
border: 1px solid var(--fcte-border-strong);
|
|
193
|
+
border-radius: 4px;
|
|
194
|
+
padding: 0;
|
|
195
|
+
cursor: pointer;
|
|
196
|
+
background: none;
|
|
197
|
+
flex-shrink: 0;
|
|
198
|
+
}
|
|
199
|
+
|
|
200
|
+
.fcte-field__swatch::-webkit-color-swatch-wrapper {
|
|
201
|
+
padding: 2px;
|
|
202
|
+
}
|
|
203
|
+
|
|
204
|
+
.fcte-field__swatch::-webkit-color-swatch {
|
|
205
|
+
border: none;
|
|
206
|
+
border-radius: 2px;
|
|
207
|
+
}
|
|
208
|
+
|
|
209
|
+
.fcte-field__text,
|
|
210
|
+
.fcte-field__select,
|
|
211
|
+
.fcte-field__number {
|
|
212
|
+
padding: 5px 8px;
|
|
213
|
+
border-radius: 4px;
|
|
214
|
+
border: 1px solid var(--fcte-border-strong);
|
|
215
|
+
background: var(--fcte-input-bg);
|
|
216
|
+
color: var(--fcte-text);
|
|
217
|
+
font-size: 12px;
|
|
218
|
+
font-family: inherit;
|
|
219
|
+
width: 100%;
|
|
220
|
+
box-sizing: border-box;
|
|
221
|
+
}
|
|
222
|
+
|
|
223
|
+
.fcte-field__text:focus,
|
|
224
|
+
.fcte-field__select:focus,
|
|
225
|
+
.fcte-field__number:focus {
|
|
226
|
+
outline: none;
|
|
227
|
+
border-color: var(--fcte-accent);
|
|
228
|
+
}
|
|
229
|
+
|
|
230
|
+
.fcte-field__number-row {
|
|
231
|
+
display: flex;
|
|
232
|
+
align-items: center;
|
|
233
|
+
gap: 4px;
|
|
234
|
+
}
|
|
235
|
+
|
|
236
|
+
.fcte-field__number-row .fcte-field__number {
|
|
237
|
+
width: 80px;
|
|
238
|
+
flex-shrink: 0;
|
|
239
|
+
}
|
|
240
|
+
|
|
241
|
+
.fcte-field__suffix {
|
|
242
|
+
font-size: 11px;
|
|
243
|
+
color: var(--fcte-text-dim);
|
|
244
|
+
}
|
|
245
|
+
|
|
246
|
+
/* Preview panel */
|
|
247
|
+
.fcte-preview {
|
|
248
|
+
flex: 1;
|
|
249
|
+
overflow: auto;
|
|
250
|
+
background: var(--fcte-bg);
|
|
251
|
+
}
|
|
252
|
+
|
|
253
|
+
.fcte-preview__inner {
|
|
254
|
+
padding: 24px;
|
|
255
|
+
min-height: 100%;
|
|
256
|
+
}
|
package/package.json
ADDED
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@squaredr/fieldcraft-pro",
|
|
3
|
+
"version": "0.0.0",
|
|
4
|
+
"description": "Pro components for FieldCraft — Form Builder, Response Viewer, Theme Editor",
|
|
5
|
+
"main": "./dist/index.js",
|
|
6
|
+
"module": "./dist/index.mjs",
|
|
7
|
+
"types": "./dist/index.d.ts",
|
|
8
|
+
"exports": {
|
|
9
|
+
".": {
|
|
10
|
+
"types": "./dist/index.d.ts",
|
|
11
|
+
"import": "./dist/index.mjs",
|
|
12
|
+
"require": "./dist/index.js"
|
|
13
|
+
},
|
|
14
|
+
"./form-builder": {
|
|
15
|
+
"types": "./dist/form-builder/index.d.ts",
|
|
16
|
+
"import": "./dist/form-builder/index.mjs",
|
|
17
|
+
"require": "./dist/form-builder/index.js"
|
|
18
|
+
},
|
|
19
|
+
"./response-viewer": {
|
|
20
|
+
"types": "./dist/response-viewer/index.d.ts",
|
|
21
|
+
"import": "./dist/response-viewer/index.mjs",
|
|
22
|
+
"require": "./dist/response-viewer/index.js"
|
|
23
|
+
},
|
|
24
|
+
"./theme-editor": {
|
|
25
|
+
"types": "./dist/theme-editor/index.d.ts",
|
|
26
|
+
"import": "./dist/theme-editor/index.mjs",
|
|
27
|
+
"require": "./dist/theme-editor/index.js"
|
|
28
|
+
},
|
|
29
|
+
"./styles.css": "./dist/styles.css",
|
|
30
|
+
"./theme-editor/styles.css": "./dist/theme-editor-styles.css"
|
|
31
|
+
},
|
|
32
|
+
"files": ["dist"],
|
|
33
|
+
"sideEffects": ["./dist/styles.css", "./dist/theme-editor-styles.css", "*.css"],
|
|
34
|
+
"scripts": {
|
|
35
|
+
"build": "tsup && npx @tailwindcss/cli -i src/form-builder/styles/formbuilder.css -o dist/styles.css --minify && cp src/theme-editor/styles.css dist/theme-editor-styles.css",
|
|
36
|
+
"build:css": "npx @tailwindcss/cli -i src/form-builder/styles/formbuilder.css -o dist/styles.css --minify && cp src/theme-editor/styles.css dist/theme-editor-styles.css",
|
|
37
|
+
"dev": "npx @tailwindcss/cli -i src/form-builder/styles/formbuilder.css -o dist/styles.css && npx concurrently \"npx @tailwindcss/cli -i src/form-builder/styles/formbuilder.css -o dist/styles.css --watch\" \"tsup --watch\"",
|
|
38
|
+
"test": "vitest run",
|
|
39
|
+
"typecheck": "tsc --noEmit",
|
|
40
|
+
"clean": "rm -rf dist"
|
|
41
|
+
},
|
|
42
|
+
"dependencies": {
|
|
43
|
+
"@dnd-kit/core": "^6.1.0",
|
|
44
|
+
"@dnd-kit/sortable": "^8.0.0",
|
|
45
|
+
"@dnd-kit/utilities": "^3.2.2",
|
|
46
|
+
"@squaredr/fieldcraft-pro-license": "workspace:*",
|
|
47
|
+
"clsx": "^2.1.1",
|
|
48
|
+
"lucide-react": "^1.16.0",
|
|
49
|
+
"tailwind-merge": "^3.6.0"
|
|
50
|
+
},
|
|
51
|
+
"peerDependencies": {
|
|
52
|
+
"@squaredr/fieldcraft-core": "^1.2.0",
|
|
53
|
+
"@squaredr/fieldcraft-react": "^1.2.1",
|
|
54
|
+
"react": "^18 || ^19",
|
|
55
|
+
"react-dom": "^18 || ^19"
|
|
56
|
+
},
|
|
57
|
+
"devDependencies": {
|
|
58
|
+
"@squaredr/fieldcraft-core": "^1.2.0",
|
|
59
|
+
"@squaredr/fieldcraft-pro-tsconfig": "workspace:*",
|
|
60
|
+
"@squaredr/fieldcraft-react": "^1.2.1",
|
|
61
|
+
"@tailwindcss/cli": "^4.3.0",
|
|
62
|
+
"@types/react": "^19.2.14",
|
|
63
|
+
"@types/react-dom": "^19.2.3",
|
|
64
|
+
"react": "^19.2.4",
|
|
65
|
+
"react-dom": "^19.2.4",
|
|
66
|
+
"tailwindcss": "^4.3.0",
|
|
67
|
+
"tsup": "^8.0",
|
|
68
|
+
"typescript": "^5.5",
|
|
69
|
+
"vitest": "^2.0"
|
|
70
|
+
},
|
|
71
|
+
"license": "SEE LICENSE IN LICENSE.txt",
|
|
72
|
+
"author": "SquaredR",
|
|
73
|
+
"homepage": "https://squaredr.tech/products/fieldcraft/admin-pro"
|
|
74
|
+
}
|