@squaredr/fieldcraft-pro 1.2.0 → 1.4.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-22T5PY6L.mjs +1081 -0
- package/dist/{chunk-4BX7FCXH.mjs → chunk-BK4SMEW4.mjs} +840 -21
- package/dist/{chunk-GNBXIG63.mjs → chunk-BYT2P3I6.mjs} +1264 -88
- package/dist/form-builder/index.d.mts +7 -367
- package/dist/form-builder/index.d.ts +7 -367
- package/dist/form-builder/index.js +1266 -90
- package/dist/form-builder/index.mjs +1 -1
- package/dist/index-nvIvXlmc.d.mts +398 -0
- package/dist/index-nvIvXlmc.d.ts +398 -0
- package/dist/index.d.mts +3 -2
- package/dist/index.d.ts +3 -2
- package/dist/index.js +2926 -335
- package/dist/index.mjs +4 -4
- package/dist/preview-schema-DFvV4y6J.d.mts +66 -0
- package/dist/preview-schema-DFvV4y6J.d.ts +66 -0
- package/dist/response-viewer/index.d.mts +9 -1
- package/dist/response-viewer/index.d.ts +9 -1
- package/dist/response-viewer/index.js +838 -19
- package/dist/response-viewer/index.mjs +1 -1
- package/dist/styles.css +1 -1
- package/dist/theme-editor/index.d.mts +30 -26
- package/dist/theme-editor/index.d.ts +30 -26
- package/dist/theme-editor/index.js +702 -22
- package/dist/theme-editor/index.mjs +1 -1
- package/package.json +8 -6
- package/theme-editor/styles.css +266 -62
- package/dist/chunk-7LQW5QYT.mjs +0 -407
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export { DEFAULT_PALETTE, DEFAULT_SCHEMA, FormBuilder, FormBuilderThemeProvider, QUESTION_TYPE_INFO, addOption, addQuestion, addSection, cleanPreset, duplicateQuestion, duplicateSection, findQuestion, findSection, generateId, generateOptionId, generateQuestionId, generateSectionId, moveOption, moveQuestion, moveSection, removeOption, removeQuestion, removeSection, squaredrDarkPreset, updateOption, updateQuestion, updateSection, useBuilderState, useBuilderTheme, useDragDrop, useUndoRedo } from '../chunk-
|
|
1
|
+
export { DEFAULT_PALETTE, DEFAULT_SCHEMA, FormBuilder, FormBuilderThemeProvider, QUESTION_TYPE_INFO, addOption, addQuestion, addSection, cleanPreset, duplicateQuestion, duplicateSection, findQuestion, findSection, generateId, generateOptionId, generateQuestionId, generateSectionId, moveOption, moveQuestion, moveSection, removeOption, removeQuestion, removeSection, squaredrDarkPreset, updateOption, updateQuestion, updateSection, useBuilderState, useBuilderTheme, useDragDrop, useUndoRedo } from '../chunk-BYT2P3I6.mjs';
|
|
2
2
|
export { cn } from '../chunk-QQ4JZGTD.mjs';
|
|
3
3
|
import '../chunk-VECQKSWS.mjs';
|
|
@@ -0,0 +1,398 @@
|
|
|
1
|
+
import * as react from 'react';
|
|
2
|
+
import { ReactNode } from 'react';
|
|
3
|
+
import { FormEngineSchema, QuestionType, FormEngineTheme, FormEngine, FormResponse, Section, Question, Option } from '@squaredr/fieldcraft-core';
|
|
4
|
+
import { FieldRegistry } from '@squaredr/fieldcraft-react';
|
|
5
|
+
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
6
|
+
import { ClassValue } from 'clsx';
|
|
7
|
+
import * as _dnd_kit_core from '@dnd-kit/core';
|
|
8
|
+
import { DragStartEvent, DragEndEvent } from '@dnd-kit/core';
|
|
9
|
+
|
|
10
|
+
declare const FormBuilder: react.ComponentType<FormBuilderProps>;
|
|
11
|
+
|
|
12
|
+
/**
|
|
13
|
+
* FormBuilder theme configuration.
|
|
14
|
+
* All values are CSS color strings (hex, oklch, hsl, etc.).
|
|
15
|
+
* Set these to customize the builder's appearance.
|
|
16
|
+
*/
|
|
17
|
+
type FormBuilderTheme = {
|
|
18
|
+
/** Main background of the entire builder */
|
|
19
|
+
background?: string;
|
|
20
|
+
/** Primary text color */
|
|
21
|
+
foreground?: string;
|
|
22
|
+
/** Card/panel background */
|
|
23
|
+
card?: string;
|
|
24
|
+
/** Primary accent color (buttons, selection, focus rings) */
|
|
25
|
+
primary?: string;
|
|
26
|
+
/** Text color on primary backgrounds */
|
|
27
|
+
primaryForeground?: string;
|
|
28
|
+
/** Secondary surfaces */
|
|
29
|
+
secondary?: string;
|
|
30
|
+
/** Text on secondary surfaces */
|
|
31
|
+
secondaryForeground?: string;
|
|
32
|
+
/** Muted background (disabled, subtle areas) */
|
|
33
|
+
muted?: string;
|
|
34
|
+
/** Muted text (labels, placeholders) */
|
|
35
|
+
mutedForeground?: string;
|
|
36
|
+
/** Hover/accent background */
|
|
37
|
+
accent?: string;
|
|
38
|
+
/** Text on accent background */
|
|
39
|
+
accentForeground?: string;
|
|
40
|
+
/** Destructive action color */
|
|
41
|
+
destructive?: string;
|
|
42
|
+
/** Text on destructive backgrounds */
|
|
43
|
+
destructiveForeground?: string;
|
|
44
|
+
/** Default border color */
|
|
45
|
+
border?: string;
|
|
46
|
+
/** Input border color */
|
|
47
|
+
input?: string;
|
|
48
|
+
/** Focus ring color */
|
|
49
|
+
ring?: string;
|
|
50
|
+
/** Border radius base (e.g. "6px", "0.375rem") */
|
|
51
|
+
radius?: string;
|
|
52
|
+
/** Surface color for panels/sidebars */
|
|
53
|
+
surface?: string;
|
|
54
|
+
/** Surface hover state */
|
|
55
|
+
surfaceHover?: string;
|
|
56
|
+
/** Main canvas background */
|
|
57
|
+
canvas?: string;
|
|
58
|
+
/** Panel background (palette, property panel) */
|
|
59
|
+
panel?: string;
|
|
60
|
+
/** Strong border color (for emphasis) */
|
|
61
|
+
borderStrong?: string;
|
|
62
|
+
/** Dim text color (secondary labels) */
|
|
63
|
+
textDim?: string;
|
|
64
|
+
};
|
|
65
|
+
|
|
66
|
+
type FormBuilderProps = {
|
|
67
|
+
/** Initial schema to load. If not provided, uses a default empty schema */
|
|
68
|
+
initialSchema?: FormEngineSchema;
|
|
69
|
+
/** URL to fetch schema JSON from on mount. Overrides initialSchema when provided and fetch succeeds. */
|
|
70
|
+
schemaUrl?: string;
|
|
71
|
+
/** Callback when schema changes */
|
|
72
|
+
onChange?: (schema: FormEngineSchema) => void;
|
|
73
|
+
/** Callback when user clicks "Save" */
|
|
74
|
+
onSave?: (schema: FormEngineSchema) => void;
|
|
75
|
+
/** Height of the builder container */
|
|
76
|
+
height?: string | number;
|
|
77
|
+
/** Theme customization — overrides CSS variables for all builder components */
|
|
78
|
+
theme?: FormBuilderTheme;
|
|
79
|
+
/** Additional CSS class name on the root element */
|
|
80
|
+
className?: string;
|
|
81
|
+
/** Extra content rendered in the toolbar, after the Save button */
|
|
82
|
+
toolbarExtra?: ReactNode;
|
|
83
|
+
/** Additional question type metadata — merged with built-in defaults (e.g. telehealth fields) */
|
|
84
|
+
questionTypes?: Record<string, QuestionTypeInfo>;
|
|
85
|
+
/** Additional palette categories — appended to built-in palette (e.g. telehealth categories) */
|
|
86
|
+
palette?: PaletteCategory[];
|
|
87
|
+
/** Configuration for the built-in preview mode renderer */
|
|
88
|
+
preview?: FormBuilderPreviewProps;
|
|
89
|
+
/** Templates to show in the template gallery */
|
|
90
|
+
templates?: FormBuilderTemplate[];
|
|
91
|
+
};
|
|
92
|
+
type FormBuilderPreviewProps = {
|
|
93
|
+
/** Theme passed to FormEngineRenderer in preview mode */
|
|
94
|
+
theme?: FormEngineTheme;
|
|
95
|
+
/** Custom field components for preview (e.g. telehealth fields) */
|
|
96
|
+
components?: FieldRegistry;
|
|
97
|
+
/** Callback when FormEngine is ready in preview mode */
|
|
98
|
+
onReady?: (engine: FormEngine) => void;
|
|
99
|
+
/** Callback when a field value changes in preview mode */
|
|
100
|
+
onFieldChange?: (fieldId: string, value: unknown) => void;
|
|
101
|
+
/** Callback when the preview form is submitted */
|
|
102
|
+
onSubmit?: (response: FormResponse) => void | Promise<void>;
|
|
103
|
+
};
|
|
104
|
+
type FormBuilderTemplate = {
|
|
105
|
+
meta: {
|
|
106
|
+
id: string;
|
|
107
|
+
name: string;
|
|
108
|
+
description: string;
|
|
109
|
+
category: string;
|
|
110
|
+
fieldCount: number;
|
|
111
|
+
sectionCount: number;
|
|
112
|
+
tags?: string[];
|
|
113
|
+
};
|
|
114
|
+
schema: FormEngineSchema;
|
|
115
|
+
};
|
|
116
|
+
type BuilderState = {
|
|
117
|
+
schema: FormEngineSchema;
|
|
118
|
+
selectedItem: SelectedItem | null;
|
|
119
|
+
isDirty: boolean;
|
|
120
|
+
};
|
|
121
|
+
type SelectedItem = {
|
|
122
|
+
type: "question";
|
|
123
|
+
sectionId: string;
|
|
124
|
+
questionId: string;
|
|
125
|
+
} | {
|
|
126
|
+
type: "section";
|
|
127
|
+
sectionId: string;
|
|
128
|
+
};
|
|
129
|
+
type DragItem = {
|
|
130
|
+
type: "palette-item";
|
|
131
|
+
questionType: QuestionType;
|
|
132
|
+
} | {
|
|
133
|
+
type: "question";
|
|
134
|
+
sectionId: string;
|
|
135
|
+
questionId: string;
|
|
136
|
+
questionIndex: number;
|
|
137
|
+
} | {
|
|
138
|
+
type: "section";
|
|
139
|
+
sectionId: string;
|
|
140
|
+
sectionIndex: number;
|
|
141
|
+
};
|
|
142
|
+
type DropTarget = {
|
|
143
|
+
type: "section";
|
|
144
|
+
sectionId: string;
|
|
145
|
+
index: number;
|
|
146
|
+
} | {
|
|
147
|
+
type: "canvas";
|
|
148
|
+
index: number;
|
|
149
|
+
};
|
|
150
|
+
type QuestionTypeCategory = "text" | "numeric" | "selection" | "datetime" | "media" | "advanced" | "structural" | "content" | (string & {});
|
|
151
|
+
type PaletteCategory = {
|
|
152
|
+
category: string;
|
|
153
|
+
label: string;
|
|
154
|
+
types: string[];
|
|
155
|
+
};
|
|
156
|
+
type QuestionTypeInfo = {
|
|
157
|
+
type: QuestionType;
|
|
158
|
+
label: string;
|
|
159
|
+
category: QuestionTypeCategory;
|
|
160
|
+
icon: string;
|
|
161
|
+
description: string;
|
|
162
|
+
defaultConfig?: Record<string, unknown>;
|
|
163
|
+
requiresOptions?: boolean;
|
|
164
|
+
};
|
|
165
|
+
type PropertyPanelTab = "basic" | "validation" | "logic" | "advanced" | "options";
|
|
166
|
+
type MutationAction = {
|
|
167
|
+
type: "add-section";
|
|
168
|
+
section: Section;
|
|
169
|
+
index: number;
|
|
170
|
+
} | {
|
|
171
|
+
type: "remove-section";
|
|
172
|
+
sectionId: string;
|
|
173
|
+
} | {
|
|
174
|
+
type: "update-section";
|
|
175
|
+
sectionId: string;
|
|
176
|
+
updates: Partial<Section>;
|
|
177
|
+
} | {
|
|
178
|
+
type: "move-section";
|
|
179
|
+
sectionId: string;
|
|
180
|
+
newIndex: number;
|
|
181
|
+
} | {
|
|
182
|
+
type: "add-question";
|
|
183
|
+
sectionId: string;
|
|
184
|
+
question: Question;
|
|
185
|
+
index: number;
|
|
186
|
+
} | {
|
|
187
|
+
type: "remove-question";
|
|
188
|
+
sectionId: string;
|
|
189
|
+
questionId: string;
|
|
190
|
+
} | {
|
|
191
|
+
type: "update-question";
|
|
192
|
+
sectionId: string;
|
|
193
|
+
questionId: string;
|
|
194
|
+
updates: Partial<Question>;
|
|
195
|
+
} | {
|
|
196
|
+
type: "move-question";
|
|
197
|
+
sectionId: string;
|
|
198
|
+
questionId: string;
|
|
199
|
+
targetSectionId: string;
|
|
200
|
+
newIndex: number;
|
|
201
|
+
} | {
|
|
202
|
+
type: "duplicate-question";
|
|
203
|
+
sectionId: string;
|
|
204
|
+
questionId: string;
|
|
205
|
+
} | {
|
|
206
|
+
type: "add-option";
|
|
207
|
+
sectionId: string;
|
|
208
|
+
questionId: string;
|
|
209
|
+
option: Option;
|
|
210
|
+
index: number;
|
|
211
|
+
} | {
|
|
212
|
+
type: "remove-option";
|
|
213
|
+
sectionId: string;
|
|
214
|
+
questionId: string;
|
|
215
|
+
optionIndex: number;
|
|
216
|
+
} | {
|
|
217
|
+
type: "update-option";
|
|
218
|
+
sectionId: string;
|
|
219
|
+
questionId: string;
|
|
220
|
+
optionIndex: number;
|
|
221
|
+
updates: Partial<Option>;
|
|
222
|
+
};
|
|
223
|
+
|
|
224
|
+
declare function useBuilderTheme(): FormBuilderTheme;
|
|
225
|
+
type FormBuilderThemeProviderProps = {
|
|
226
|
+
theme?: FormBuilderTheme;
|
|
227
|
+
children: ReactNode;
|
|
228
|
+
};
|
|
229
|
+
declare function FormBuilderThemeProvider({ theme, children }: FormBuilderThemeProviderProps): react_jsx_runtime.JSX.Element;
|
|
230
|
+
|
|
231
|
+
/**
|
|
232
|
+
* Drafting Teal dark theme preset.
|
|
233
|
+
* Matches fieldcraft.squaredr.tech dark mode.
|
|
234
|
+
*/
|
|
235
|
+
declare const squaredrDarkPreset: FormBuilderTheme;
|
|
236
|
+
/**
|
|
237
|
+
* Drafting Teal light theme preset (default).
|
|
238
|
+
* Matches fieldcraft.squaredr.tech light mode.
|
|
239
|
+
*/
|
|
240
|
+
declare const cleanPreset: FormBuilderTheme;
|
|
241
|
+
|
|
242
|
+
/**
|
|
243
|
+
* Metadata for all question types available in the Pro palette.
|
|
244
|
+
* Icons are lucide-react component names (imported dynamically via ICON_MAP).
|
|
245
|
+
*
|
|
246
|
+
* 39 field types — general-purpose form building.
|
|
247
|
+
* Telehealth-specific fields (15) are in @squaredr/fieldcraft-pro-telehealth.
|
|
248
|
+
*/
|
|
249
|
+
declare const QUESTION_TYPE_INFO: Record<string, QuestionTypeInfo>;
|
|
250
|
+
/**
|
|
251
|
+
* Default palette layout with categories (39 Pro field types).
|
|
252
|
+
* Telehealth fields can be appended via FormBuilder's `palette` prop.
|
|
253
|
+
*/
|
|
254
|
+
declare const DEFAULT_PALETTE: ({
|
|
255
|
+
category: "text";
|
|
256
|
+
label: string;
|
|
257
|
+
types: string[];
|
|
258
|
+
} | {
|
|
259
|
+
category: "numeric";
|
|
260
|
+
label: string;
|
|
261
|
+
types: string[];
|
|
262
|
+
} | {
|
|
263
|
+
category: "selection";
|
|
264
|
+
label: string;
|
|
265
|
+
types: string[];
|
|
266
|
+
} | {
|
|
267
|
+
category: "datetime";
|
|
268
|
+
label: string;
|
|
269
|
+
types: string[];
|
|
270
|
+
} | {
|
|
271
|
+
category: "media";
|
|
272
|
+
label: string;
|
|
273
|
+
types: string[];
|
|
274
|
+
} | {
|
|
275
|
+
category: "content";
|
|
276
|
+
label: string;
|
|
277
|
+
types: string[];
|
|
278
|
+
} | {
|
|
279
|
+
category: "structural";
|
|
280
|
+
label: string;
|
|
281
|
+
types: string[];
|
|
282
|
+
} | {
|
|
283
|
+
category: "advanced";
|
|
284
|
+
label: string;
|
|
285
|
+
types: string[];
|
|
286
|
+
})[];
|
|
287
|
+
|
|
288
|
+
/**
|
|
289
|
+
* Generate unique IDs for sections, questions, and options.
|
|
290
|
+
* Format: {prefix}_{timestamp}_{random}
|
|
291
|
+
*/
|
|
292
|
+
declare function generateId(prefix: string): string;
|
|
293
|
+
declare function generateSectionId(): string;
|
|
294
|
+
declare function generateQuestionId(): string;
|
|
295
|
+
declare function generateOptionId(): string;
|
|
296
|
+
|
|
297
|
+
/**
|
|
298
|
+
* Pure functions for mutating FormEngineSchema.
|
|
299
|
+
* All functions return a new schema object (immutable updates).
|
|
300
|
+
*/
|
|
301
|
+
|
|
302
|
+
declare function addSection(schema: FormEngineSchema, section: Section, index: number): FormEngineSchema;
|
|
303
|
+
declare function removeSection(schema: FormEngineSchema, sectionId: string): FormEngineSchema;
|
|
304
|
+
declare function updateSection(schema: FormEngineSchema, sectionId: string, updates: Partial<Section>): FormEngineSchema;
|
|
305
|
+
declare function moveSection(schema: FormEngineSchema, sectionId: string, newIndex: number): FormEngineSchema;
|
|
306
|
+
declare function duplicateSection(schema: FormEngineSchema, sectionId: string): FormEngineSchema;
|
|
307
|
+
declare function addQuestion(schema: FormEngineSchema, sectionId: string, question: Question, index: number): FormEngineSchema;
|
|
308
|
+
declare function removeQuestion(schema: FormEngineSchema, sectionId: string, questionId: string): FormEngineSchema;
|
|
309
|
+
declare function updateQuestion(schema: FormEngineSchema, sectionId: string, questionId: string, updates: Partial<Question>): FormEngineSchema;
|
|
310
|
+
declare function moveQuestion(schema: FormEngineSchema, sectionId: string, questionId: string, targetSectionId: string, newIndex: number): FormEngineSchema;
|
|
311
|
+
declare function duplicateQuestion(schema: FormEngineSchema, sectionId: string, questionId: string): FormEngineSchema;
|
|
312
|
+
declare function addOption(schema: FormEngineSchema, sectionId: string, questionId: string, option: Option, index: number): FormEngineSchema;
|
|
313
|
+
declare function removeOption(schema: FormEngineSchema, sectionId: string, questionId: string, optionIndex: number): FormEngineSchema;
|
|
314
|
+
declare function updateOption(schema: FormEngineSchema, sectionId: string, questionId: string, optionIndex: number, updates: Partial<Option>): FormEngineSchema;
|
|
315
|
+
declare function moveOption(schema: FormEngineSchema, sectionId: string, questionId: string, oldIndex: number, newIndex: number): FormEngineSchema;
|
|
316
|
+
declare function findQuestion(schema: FormEngineSchema, sectionId: string, questionId: string): {
|
|
317
|
+
section: Section;
|
|
318
|
+
question: Question;
|
|
319
|
+
questionIndex: number;
|
|
320
|
+
} | null;
|
|
321
|
+
declare function findSection(schema: FormEngineSchema, sectionId: string): {
|
|
322
|
+
section: Section;
|
|
323
|
+
sectionIndex: number;
|
|
324
|
+
} | null;
|
|
325
|
+
|
|
326
|
+
declare function cn(...inputs: ClassValue[]): string;
|
|
327
|
+
|
|
328
|
+
/**
|
|
329
|
+
* Master state hook for the FormBuilder.
|
|
330
|
+
* Combines schema state, selection, and undo/redo.
|
|
331
|
+
*
|
|
332
|
+
* All mutation callbacks use a ref to read the latest schema,
|
|
333
|
+
* avoiding stale closures when multiple mutations fire in the
|
|
334
|
+
* same render tick.
|
|
335
|
+
*/
|
|
336
|
+
declare function useBuilderState(initialSchema: FormEngineSchema): {
|
|
337
|
+
schema: FormEngineSchema;
|
|
338
|
+
selectedItem: SelectedItem | null;
|
|
339
|
+
isDirty: boolean;
|
|
340
|
+
updateSchema: (newSchema: FormEngineSchema) => void;
|
|
341
|
+
addSection: (section: Section, index: number) => void;
|
|
342
|
+
removeSection: (sectionId: string) => void;
|
|
343
|
+
updateSection: (sectionId: string, updates: Partial<Section>) => void;
|
|
344
|
+
moveSection: (sectionId: string, newIndex: number) => void;
|
|
345
|
+
duplicateSection: (sectionId: string) => void;
|
|
346
|
+
addQuestion: (sectionId: string, question: Question, index: number) => void;
|
|
347
|
+
removeQuestion: (sectionId: string, questionId: string) => void;
|
|
348
|
+
updateQuestion: (sectionId: string, questionId: string, updates: Partial<Question>) => void;
|
|
349
|
+
moveQuestion: (sectionId: string, questionId: string, targetSectionId: string, newIndex: number) => void;
|
|
350
|
+
duplicateQuestion: (sectionId: string, questionId: string) => void;
|
|
351
|
+
selectQuestion: (sectionId: string, questionId: string) => void;
|
|
352
|
+
selectSection: (sectionId: string) => void;
|
|
353
|
+
clearSelection: () => void;
|
|
354
|
+
canUndo: boolean;
|
|
355
|
+
canRedo: boolean;
|
|
356
|
+
undo: () => void;
|
|
357
|
+
redo: () => void;
|
|
358
|
+
resetSchema: (newSchema: FormEngineSchema) => void;
|
|
359
|
+
markClean: () => void;
|
|
360
|
+
};
|
|
361
|
+
type BuilderStateHook = ReturnType<typeof useBuilderState>;
|
|
362
|
+
|
|
363
|
+
type UndoRedoState = {
|
|
364
|
+
canUndo: boolean;
|
|
365
|
+
canRedo: boolean;
|
|
366
|
+
undo: () => void;
|
|
367
|
+
redo: () => void;
|
|
368
|
+
push: (schema: FormEngineSchema) => void;
|
|
369
|
+
clear: () => void;
|
|
370
|
+
};
|
|
371
|
+
/**
|
|
372
|
+
* Hook for undo/redo functionality.
|
|
373
|
+
* Maintains a history stack of schemas with max 50 entries.
|
|
374
|
+
* Uses state for the index so canUndo/canRedo trigger re-renders.
|
|
375
|
+
* The history array is kept in a ref since its identity doesn't
|
|
376
|
+
* need to cause re-renders — only the index matters.
|
|
377
|
+
*/
|
|
378
|
+
declare function useUndoRedo(currentSchema: FormEngineSchema, setSchema: (schema: FormEngineSchema) => void): UndoRedoState;
|
|
379
|
+
|
|
380
|
+
/**
|
|
381
|
+
* Hook to wire up @dnd-kit drag-and-drop.
|
|
382
|
+
* Returns DndContext props and handlers.
|
|
383
|
+
*/
|
|
384
|
+
declare function useDragDrop(builderState: BuilderStateHook): {
|
|
385
|
+
sensors: _dnd_kit_core.SensorDescriptor<_dnd_kit_core.SensorOptions>[];
|
|
386
|
+
handleDragStart: (event: DragStartEvent) => void;
|
|
387
|
+
handleDragEnd: (event: DragEndEvent) => void;
|
|
388
|
+
handleDragCancel: () => void;
|
|
389
|
+
activeDragItem: DragItem | null;
|
|
390
|
+
};
|
|
391
|
+
|
|
392
|
+
/**
|
|
393
|
+
* Default empty schema for new forms.
|
|
394
|
+
* Contains one section with one question to get started.
|
|
395
|
+
*/
|
|
396
|
+
declare const DEFAULT_SCHEMA: FormEngineSchema;
|
|
397
|
+
|
|
398
|
+
export { moveQuestion as A, type BuilderState as B, moveSection as C, DEFAULT_PALETTE as D, removeOption as E, FormBuilder as F, removeQuestion as G, removeSection as H, squaredrDarkPreset as I, updateOption as J, updateQuestion as K, updateSection as L, type MutationAction as M, useBuilderState as N, useBuilderTheme as O, type PaletteCategory as P, QUESTION_TYPE_INFO as Q, useDragDrop as R, type SelectedItem as S, useUndoRedo as T, type UndoRedoState as U, type BuilderStateHook as a, DEFAULT_SCHEMA as b, type DragItem as c, type DropTarget as d, type FormBuilderPreviewProps as e, type FormBuilderProps as f, type FormBuilderTemplate as g, type FormBuilderTheme as h, FormBuilderThemeProvider as i, type PropertyPanelTab as j, type QuestionTypeCategory as k, type QuestionTypeInfo as l, addOption as m, addQuestion as n, addSection as o, cleanPreset as p, cn as q, duplicateQuestion as r, duplicateSection as s, findQuestion as t, findSection as u, generateId as v, generateOptionId as w, generateQuestionId as x, generateSectionId as y, moveOption as z };
|