@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.
- package/LICENSE.txt +51 -51
- package/README.md +139 -139
- package/dist/{chunk-VEP3DOCQ.mjs → chunk-5QXKDYWY.mjs} +103 -19
- package/dist/{chunk-GZIV2XAD.mjs → chunk-7GPX3YIB.mjs} +146 -183
- package/dist/{chunk-J5V6OVZO.mjs → chunk-DWRLPGX5.mjs} +690 -211
- package/dist/{chunk-4TN6YJDF.mjs → chunk-KTIU7VCP.mjs} +971 -214
- package/dist/default-schema-BGxf9Jrg.d.ts +174 -0
- package/dist/default-schema-Bwq8FATF.d.mts +174 -0
- package/dist/form-builder/index.d.mts +14 -170
- package/dist/form-builder/index.d.ts +14 -170
- package/dist/form-builder/index.js +827 -326
- package/dist/form-builder/index.mjs +1 -1
- package/dist/index.d.mts +111 -10
- package/dist/index.d.ts +111 -10
- package/dist/index.js +3525 -971
- package/dist/index.mjs +1424 -124
- package/dist/response-viewer/index.d.mts +1 -1
- package/dist/response-viewer/index.d.ts +1 -1
- package/dist/response-viewer/index.js +146 -183
- package/dist/response-viewer/index.mjs +1 -1
- package/dist/styles.css +2 -2
- package/dist/templates/index.d.mts +1 -1
- package/dist/templates/index.d.ts +1 -1
- package/dist/templates/index.js +103 -19
- package/dist/templates/index.mjs +1 -1
- package/dist/theme-editor/index.d.mts +12 -7
- package/dist/theme-editor/index.d.ts +12 -7
- package/dist/theme-editor/index.js +971 -214
- package/dist/theme-editor/index.mjs +1 -1
- package/dist/{types-bFHsZT1n.d.mts → types-BQOeI3LX.d.mts} +1 -1
- package/dist/{types-bFHsZT1n.d.ts → types-BQOeI3LX.d.ts} +1 -1
- package/package.json +29 -18
- 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
|
-
/**
|
|
42
|
-
|
|
43
|
-
/** Called
|
|
44
|
-
|
|
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):
|
|
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
|
-
/**
|
|
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 };
|