@thebes/cadmea 1.3.0 → 1.5.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/index/index.d.ts +26 -0
- package/dist/index/index.js +243 -181
- package/dist/index/index.js.map +1 -1
- package/dist/index/server.js +99 -50
- package/dist/index/server.js.map +1 -1
- package/dist/tanstack-start/index.d.ts +15 -0
- package/dist/tanstack-start/index.js +225 -181
- package/dist/tanstack-start/index.js.map +1 -1
- package/dist/tanstack-start/server.js +96 -51
- package/dist/tanstack-start/server.js.map +1 -1
- package/package.json +3 -3
package/dist/index/index.d.ts
CHANGED
|
@@ -87,6 +87,15 @@ interface DraftActions {
|
|
|
87
87
|
saveDraftLabel?: string;
|
|
88
88
|
publishLabel?: string;
|
|
89
89
|
previewLabel?: string;
|
|
90
|
+
/**
|
|
91
|
+
* Opt in to debounced autosave: while the form is dirty, `onSaveDraft` is
|
|
92
|
+
* called automatically after a pause in typing, and a "Saving…/Saved"
|
|
93
|
+
* status shows in the action bar. Off by default (existing consumers keep
|
|
94
|
+
* the manual Save-draft button only).
|
|
95
|
+
*/
|
|
96
|
+
autosave?: boolean;
|
|
97
|
+
/** Debounce window for autosave, in ms. Default 1500. */
|
|
98
|
+
autosaveMs?: number;
|
|
90
99
|
}
|
|
91
100
|
interface CollectionEditProps {
|
|
92
101
|
config: CollectionConfig;
|
|
@@ -119,6 +128,12 @@ interface CollectionEditProps {
|
|
|
119
128
|
* consuming route) since `CollectionEdit` has no router access itself.
|
|
120
129
|
*/
|
|
121
130
|
onDirtyChange?: (dirty: boolean) => void;
|
|
131
|
+
/**
|
|
132
|
+
* Fired with the current editable values on every change — wire this to a
|
|
133
|
+
* side-by-side live preview (e.g. `VisualEditingPane`'s `previewValues`).
|
|
134
|
+
* Fires on mount with the initial values too.
|
|
135
|
+
*/
|
|
136
|
+
onValuesChange?: (values: Record<string, unknown>) => void;
|
|
122
137
|
/**
|
|
123
138
|
* Per-field custom editor widgets (issue #17), keyed by field name. When a
|
|
124
139
|
* field has a widget here, it's rendered instead of the generic input for
|
|
@@ -214,6 +229,17 @@ interface VisualEditingPaneProps {
|
|
|
214
229
|
/** Class for the iframe (size it via the consumer's layout). */
|
|
215
230
|
class?: string;
|
|
216
231
|
title?: string;
|
|
232
|
+
/**
|
|
233
|
+
* In-progress form values to push into the preview for as-you-type live
|
|
234
|
+
* updates. Posted to the iframe on every change; the preview page must call
|
|
235
|
+
* `mountPreviewSync` to receive them. Requires `previewTarget`.
|
|
236
|
+
*/
|
|
237
|
+
previewValues?: Record<string, unknown>;
|
|
238
|
+
/** Which document `previewValues` belong to (matched by the preview). */
|
|
239
|
+
previewTarget?: {
|
|
240
|
+
collection: string;
|
|
241
|
+
id: number;
|
|
242
|
+
};
|
|
217
243
|
}
|
|
218
244
|
declare function VisualEditingPane(props: VisualEditingPaneProps): import("solid-js").JSX.Element;
|
|
219
245
|
//#endregion
|