@squaredr/fieldcraft-pro 1.7.0 → 1.9.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.
Files changed (33) hide show
  1. package/LICENSE.txt +51 -51
  2. package/README.md +139 -139
  3. package/dist/{chunk-VEP3DOCQ.mjs → chunk-5QXKDYWY.mjs} +103 -19
  4. package/dist/{chunk-GZIV2XAD.mjs → chunk-7GPX3YIB.mjs} +146 -183
  5. package/dist/{chunk-J5V6OVZO.mjs → chunk-DWRLPGX5.mjs} +690 -211
  6. package/dist/{chunk-4TN6YJDF.mjs → chunk-KTIU7VCP.mjs} +971 -214
  7. package/dist/default-schema-BGxf9Jrg.d.ts +174 -0
  8. package/dist/default-schema-Bwq8FATF.d.mts +174 -0
  9. package/dist/form-builder/index.d.mts +14 -170
  10. package/dist/form-builder/index.d.ts +14 -170
  11. package/dist/form-builder/index.js +827 -326
  12. package/dist/form-builder/index.mjs +1 -1
  13. package/dist/index.d.mts +111 -10
  14. package/dist/index.d.ts +111 -10
  15. package/dist/index.js +3525 -971
  16. package/dist/index.mjs +1424 -124
  17. package/dist/response-viewer/index.d.mts +1 -1
  18. package/dist/response-viewer/index.d.ts +1 -1
  19. package/dist/response-viewer/index.js +146 -183
  20. package/dist/response-viewer/index.mjs +1 -1
  21. package/dist/styles.css +2 -2
  22. package/dist/templates/index.d.mts +1 -1
  23. package/dist/templates/index.d.ts +1 -1
  24. package/dist/templates/index.js +103 -19
  25. package/dist/templates/index.mjs +1 -1
  26. package/dist/theme-editor/index.d.mts +12 -7
  27. package/dist/theme-editor/index.d.ts +12 -7
  28. package/dist/theme-editor/index.js +971 -214
  29. package/dist/theme-editor/index.mjs +1 -1
  30. package/dist/{types-bFHsZT1n.d.mts → types-BQOeI3LX.d.mts} +1 -1
  31. package/dist/{types-bFHsZT1n.d.ts → types-BQOeI3LX.d.ts} +1 -1
  32. package/package.json +29 -18
  33. package/theme-editor/styles.css +497 -466
@@ -1,7 +1,6 @@
1
1
  import * as react from 'react';
2
2
  import { ReactNode } from 'react';
3
3
  import { FormEngineTheme, FormEngineSchema } from '@squaredr/fieldcraft-core';
4
- import * as react_jsx_runtime from 'react/jsx-runtime';
5
4
 
6
5
  /**
7
6
  * ThemeEditor chrome theme configuration.
@@ -38,10 +37,12 @@ type ThemeEditorTheme = {
38
37
  type ThemeEditorProps = {
39
38
  /** Initial theme to load. Defaults to resolving from host page CSS variables. */
40
39
  initialTheme?: FormEngineTheme;
41
- /** Called on every theme change. */
42
- onChange?: (theme: FormEngineTheme) => void;
43
- /** Called when user clicks Save or presses Ctrl+S. */
44
- onSave?: (theme: FormEngineTheme) => void;
40
+ /** Initial preset key (e.g. "clean", "clinical"). Restored from persistence. */
41
+ initialPreset?: string;
42
+ /** Called on every theme change. Includes the active preset key. */
43
+ onChange?: (theme: FormEngineTheme, presetKey?: string) => void;
44
+ /** Called when user clicks Save or presses Ctrl+S. Includes the active preset key. */
45
+ onSave?: (theme: FormEngineTheme, presetKey?: string) => void;
45
46
  /** Editor chrome theme. Controls toolbar, panel, and control appearance. */
46
47
  theme?: ThemeEditorTheme;
47
48
  /** Container height. */
@@ -63,7 +64,7 @@ type ThemeEditorThemeProviderProps = {
63
64
  theme?: ThemeEditorTheme;
64
65
  children: ReactNode;
65
66
  };
66
- declare function ThemeEditorThemeProvider({ theme, children }: ThemeEditorThemeProviderProps): react_jsx_runtime.JSX.Element;
67
+ declare function ThemeEditorThemeProvider({ theme, children }: ThemeEditorThemeProviderProps): react.JSX.Element;
67
68
 
68
69
  /**
69
70
  * Drafting Teal light chrome preset (default).
@@ -93,7 +94,11 @@ declare const PRESET_FAMILIES: Record<string, PresetFamily>;
93
94
  */
94
95
  declare function resolveThemeFromDOM(): FormEngineTheme;
95
96
 
96
- /** Compact schema used in the ThemeEditor live preview panel. */
97
+ /**
98
+ * Comprehensive preview schema used in the ThemeEditor live preview panel.
99
+ * Includes all standard field types so the user can see how their theme
100
+ * affects every element. Uses "classic" displayMode (all sections visible).
101
+ */
97
102
  declare const PREVIEW_SCHEMA: FormEngineSchema;
98
103
 
99
104
  export { PRESET_FAMILIES, PREVIEW_SCHEMA, type PresetFamily, ThemeEditor, type ThemeEditorProps, type ThemeEditorTheme, ThemeEditorThemeProvider, resolveThemeFromDOM, themeEditorDarkPreset, themeEditorLightPreset, useEditorTheme };