@kubuild/editor 0.2.0 → 0.3.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/ai/enhance-node.d.ts +100 -0
- package/dist/ai/enhance-node.d.ts.map +1 -0
- package/dist/ai/generate-page.d.ts +80 -0
- package/dist/ai/generate-page.d.ts.map +1 -0
- package/dist/ai/index.d.ts +3 -0
- package/dist/ai/index.d.ts.map +1 -0
- package/dist/components/action-builder/action-step-form.d.ts.map +1 -1
- package/dist/components/ai-chat/ai-chat-panel.d.ts +66 -0
- package/dist/components/ai-chat/ai-chat-panel.d.ts.map +1 -0
- package/dist/components/ai-chat/index.d.ts +2 -0
- package/dist/components/ai-chat/index.d.ts.map +1 -0
- package/dist/components/canvas/canvas-pan-zoom.d.ts +61 -0
- package/dist/components/canvas/canvas-pan-zoom.d.ts.map +1 -0
- package/dist/components/canvas/canvas.d.ts +48 -1
- package/dist/components/canvas/canvas.d.ts.map +1 -1
- package/dist/components/canvas/distance-meter.d.ts +27 -0
- package/dist/components/canvas/distance-meter.d.ts.map +1 -0
- package/dist/components/canvas/floating-badges.d.ts.map +1 -1
- package/dist/components/canvas/grid-guidelines-overlay.d.ts +18 -0
- package/dist/components/canvas/grid-guidelines-overlay.d.ts.map +1 -0
- package/dist/components/canvas/index.d.ts +9 -0
- package/dist/components/canvas/index.d.ts.map +1 -1
- package/dist/components/canvas/marquee-selection.d.ts +25 -0
- package/dist/components/canvas/marquee-selection.d.ts.map +1 -0
- package/dist/components/canvas/multi-device-preview.d.ts +30 -0
- package/dist/components/canvas/multi-device-preview.d.ts.map +1 -0
- package/dist/components/canvas/resize-handles.d.ts +18 -0
- package/dist/components/canvas/resize-handles.d.ts.map +1 -0
- package/dist/components/canvas/smart-guides.d.ts +37 -0
- package/dist/components/canvas/smart-guides.d.ts.map +1 -0
- package/dist/components/canvas/spacing-sliders.d.ts +21 -0
- package/dist/components/canvas/spacing-sliders.d.ts.map +1 -0
- package/dist/components/canvas/viewport-resizer.d.ts +83 -0
- package/dist/components/canvas/viewport-resizer.d.ts.map +1 -0
- package/dist/components/index.d.ts +1 -0
- package/dist/components/index.d.ts.map +1 -1
- package/dist/components/layout/editor.d.ts +12 -1
- package/dist/components/layout/editor.d.ts.map +1 -1
- package/dist/components/layout/toolbar.d.ts +6 -0
- package/dist/components/layout/toolbar.d.ts.map +1 -1
- package/dist/components/panels/action-prop-control.d.ts +30 -0
- package/dist/components/panels/action-prop-control.d.ts.map +1 -0
- package/dist/components/panels/blocks-panel.d.ts.map +1 -1
- package/dist/components/panels/component-panel.d.ts +2 -0
- package/dist/components/panels/component-panel.d.ts.map +1 -1
- package/dist/components/panels/index.d.ts +1 -0
- package/dist/components/panels/index.d.ts.map +1 -1
- package/dist/components/panels/inspector-panel.d.ts +7 -1
- package/dist/components/panels/inspector-panel.d.ts.map +1 -1
- package/dist/components/panels/layers-panel.d.ts +4 -0
- package/dist/components/panels/layers-panel.d.ts.map +1 -1
- package/dist/components/style-manager/auto-layout-controls.d.ts +24 -0
- package/dist/components/style-manager/auto-layout-controls.d.ts.map +1 -0
- package/dist/components/style-manager/color-gradient-picker.d.ts +35 -0
- package/dist/components/style-manager/color-gradient-picker.d.ts.map +1 -0
- package/dist/components/style-manager/design-tokens-panel.d.ts +30 -0
- package/dist/components/style-manager/design-tokens-panel.d.ts.map +1 -0
- package/dist/components/style-manager/dimension-sector-controls.d.ts +12 -1
- package/dist/components/style-manager/dimension-sector-controls.d.ts.map +1 -1
- package/dist/components/style-manager/effects-sector-controls.d.ts +52 -0
- package/dist/components/style-manager/effects-sector-controls.d.ts.map +1 -0
- package/dist/components/style-manager/grid-controls.d.ts +19 -0
- package/dist/components/style-manager/grid-controls.d.ts.map +1 -0
- package/dist/components/style-manager/index.d.ts +6 -0
- package/dist/components/style-manager/index.d.ts.map +1 -1
- package/dist/components/style-manager/inheritance-indicator.d.ts +52 -0
- package/dist/components/style-manager/inheritance-indicator.d.ts.map +1 -0
- package/dist/components/style-manager/style-manager-accordion.d.ts +10 -0
- package/dist/components/style-manager/style-manager-accordion.d.ts.map +1 -1
- package/dist/components/style-manager/typography-sector-controls.d.ts +4 -0
- package/dist/components/style-manager/typography-sector-controls.d.ts.map +1 -1
- package/dist/components/ui/icons.d.ts.map +1 -1
- package/dist/config/ai-config.d.ts +69 -0
- package/dist/config/ai-config.d.ts.map +1 -0
- package/dist/config/config.d.ts +65 -3
- package/dist/config/config.d.ts.map +1 -1
- package/dist/config/index.d.ts +1 -0
- package/dist/config/index.d.ts.map +1 -1
- package/dist/index.cjs +13503 -5560
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +13462 -5540
- package/dist/index.js.map +1 -1
- package/dist/store/store.d.ts +129 -5
- package/dist/store/store.d.ts.map +1 -1
- package/dist/utils/ai-context.d.ts +25 -0
- package/dist/utils/ai-context.d.ts.map +1 -0
- package/dist/utils/document-scanner.d.ts +5 -1
- package/dist/utils/document-scanner.d.ts.map +1 -1
- package/dist/utils/export-utils.d.ts +8 -0
- package/dist/utils/export-utils.d.ts.map +1 -1
- package/dist/utils/index.d.ts +1 -0
- package/dist/utils/index.d.ts.map +1 -1
- package/package.json +8 -6
- package/dist/action-branch-editor.d.ts +0 -18
- package/dist/action-branch-editor.d.ts.map +0 -1
- package/dist/action-builder-modal.d.ts +0 -32
- package/dist/action-builder-modal.d.ts.map +0 -1
- package/dist/action-debugger-panel.d.ts +0 -11
- package/dist/action-debugger-panel.d.ts.map +0 -1
- package/dist/action-step-form.d.ts +0 -84
- package/dist/action-step-form.d.ts.map +0 -1
- package/dist/asset-manager-modal.d.ts +0 -28
- package/dist/asset-manager-modal.d.ts.map +0 -1
- package/dist/blocks-panel.d.ts +0 -20
- package/dist/blocks-panel.d.ts.map +0 -1
- package/dist/box-model-editor.d.ts +0 -29
- package/dist/box-model-editor.d.ts.map +0 -1
- package/dist/breadcrumbs.d.ts +0 -16
- package/dist/breadcrumbs.d.ts.map +0 -1
- package/dist/canvas.d.ts +0 -16
- package/dist/canvas.d.ts.map +0 -1
- package/dist/code-highlighter.d.ts +0 -20
- package/dist/code-highlighter.d.ts.map +0 -1
- package/dist/code-viewer-modal.d.ts +0 -11
- package/dist/code-viewer-modal.d.ts.map +0 -1
- package/dist/component-panel.d.ts +0 -8
- package/dist/component-panel.d.ts.map +0 -1
- package/dist/config.d.ts +0 -103
- package/dist/config.d.ts.map +0 -1
- package/dist/dimension-sector-controls.d.ts +0 -27
- package/dist/dimension-sector-controls.d.ts.map +0 -1
- package/dist/editor.d.ts +0 -18
- package/dist/editor.d.ts.map +0 -1
- package/dist/export-utils.d.ts +0 -19
- package/dist/export-utils.d.ts.map +0 -1
- package/dist/floating-badges.d.ts +0 -26
- package/dist/floating-badges.d.ts.map +0 -1
- package/dist/form-validation-rules-panel.d.ts +0 -27
- package/dist/form-validation-rules-panel.d.ts.map +0 -1
- package/dist/icons.d.ts +0 -8
- package/dist/icons.d.ts.map +0 -1
- package/dist/import-modal.d.ts +0 -11
- package/dist/import-modal.d.ts.map +0 -1
- package/dist/inspector-panel.d.ts +0 -20
- package/dist/inspector-panel.d.ts.map +0 -1
- package/dist/layers-panel.d.ts +0 -8
- package/dist/layers-panel.d.ts.map +0 -1
- package/dist/left-sidebar.d.ts +0 -16
- package/dist/left-sidebar.d.ts.map +0 -1
- package/dist/motion-sector-controls.d.ts +0 -36
- package/dist/motion-sector-controls.d.ts.map +0 -1
- package/dist/store.d.ts +0 -148
- package/dist/store.d.ts.map +0 -1
- package/dist/style-manager-accordion.d.ts +0 -38
- package/dist/style-manager-accordion.d.ts.map +0 -1
- package/dist/table-spreadsheet-editor.d.ts +0 -15
- package/dist/table-spreadsheet-editor.d.ts.map +0 -1
- package/dist/toolbar.d.ts +0 -11
- package/dist/toolbar.d.ts.map +0 -1
- package/dist/traits-panel.d.ts +0 -20
- package/dist/traits-panel.d.ts.map +0 -1
- package/dist/typography-sector-controls.d.ts +0 -17
- package/dist/typography-sector-controls.d.ts.map +0 -1
- package/dist/variable-autocomplete-input.d.ts +0 -43
- package/dist/variable-autocomplete-input.d.ts.map +0 -1
- package/dist/variable-picker.d.ts +0 -21
- package/dist/variable-picker.d.ts.map +0 -1
package/dist/store/store.d.ts
CHANGED
|
@@ -1,9 +1,11 @@
|
|
|
1
|
-
import { PageDocument, Node, StyleDefinition, TemplateRecord, AnimationConfig, ActionPipeline, FormConfig } from '@kubuild/schema';
|
|
1
|
+
import { PageDocument, Node, Artboard, StyleDefinition, TemplateRecord, AnimationConfig, ActionPipeline, FormConfig } from '@kubuild/schema';
|
|
2
2
|
import { CommandResult, VariableCatalog, SaveTemplateMetadata, CloneTemplateOptions } from '@kubuild/core';
|
|
3
3
|
import { ComponentRegistry, BlockDefinition } from '@kubuild/components';
|
|
4
|
+
import type { AiGenerationPlaceholderStatus } from '../ai/generate-page';
|
|
4
5
|
export type Viewport = 'desktop' | 'tablet' | 'mobile';
|
|
5
|
-
export type NavigatorMode = 'docked' | 'floating' | 'hidden';
|
|
6
6
|
export type TableSpreadsheetMode = 'floating' | 'docked' | 'hidden';
|
|
7
|
+
/** Panel mode for the AI Chat Panel (STORA-503), following the `TableSpreadsheetMode` pattern. */
|
|
8
|
+
export type AiChatPanelMode = 'docked' | 'floating' | 'hidden';
|
|
7
9
|
export interface ActionLogEntry {
|
|
8
10
|
id: string;
|
|
9
11
|
timestamp: string;
|
|
@@ -44,6 +46,32 @@ export interface InsertComponentResult {
|
|
|
44
46
|
nodeId?: string;
|
|
45
47
|
error?: string;
|
|
46
48
|
}
|
|
49
|
+
export interface DetachArtboardResult {
|
|
50
|
+
success: boolean;
|
|
51
|
+
/** Id of the newly created component artboard. */
|
|
52
|
+
artboardId?: string;
|
|
53
|
+
/** Id of the `artboard-reference` stub left behind in the page. */
|
|
54
|
+
stubNodeId?: string;
|
|
55
|
+
/** Trigger id `open_modal` / `close_modal` actions should target. */
|
|
56
|
+
triggerId?: string;
|
|
57
|
+
error?: string;
|
|
58
|
+
}
|
|
59
|
+
export interface RemoveArtboardResult {
|
|
60
|
+
success: boolean;
|
|
61
|
+
/** How many `artboard-reference` stubs were removed along with the artboard. */
|
|
62
|
+
removedReferenceCount?: number;
|
|
63
|
+
error?: string;
|
|
64
|
+
}
|
|
65
|
+
/**
|
|
66
|
+
* Node types that are overlay surfaces by nature: inserting one inline would cover the page
|
|
67
|
+
* being edited, so they get their own component artboard plus a pre-wired trigger instead.
|
|
68
|
+
*/
|
|
69
|
+
export declare const OVERLAY_COMPONENT_TYPES: readonly ["modal", "drawer"];
|
|
70
|
+
/**
|
|
71
|
+
* Synthetic artboard id standing for "the page document currently loaded in the store",
|
|
72
|
+
* used when assembling a transient project for project-level commands.
|
|
73
|
+
*/
|
|
74
|
+
export declare const ACTIVE_PAGE_ARTBOARD_ID = "active-page-artboard";
|
|
47
75
|
export interface MoveComponentResult {
|
|
48
76
|
success: boolean;
|
|
49
77
|
error?: string;
|
|
@@ -81,6 +109,7 @@ export interface UpdateActionsResult {
|
|
|
81
109
|
export interface EditorState {
|
|
82
110
|
document: PageDocument;
|
|
83
111
|
selectedNodeId: string | null;
|
|
112
|
+
selectedNodeIds: string[];
|
|
84
113
|
hoveredNodeId: string | null;
|
|
85
114
|
dragPayload: DragPayload | null;
|
|
86
115
|
viewport: Viewport;
|
|
@@ -91,21 +120,52 @@ export interface EditorState {
|
|
|
91
120
|
onChangeHandler: ((doc: PageDocument) => void) | null;
|
|
92
121
|
/** Host-declared bindable variables + editor/preview-only sample values (STORA-053). Never serialized to the document. */
|
|
93
122
|
variableCatalog: VariableCatalog;
|
|
94
|
-
navigatorMode: NavigatorMode;
|
|
95
123
|
tableSpreadsheetMode: TableSpreadsheetMode;
|
|
124
|
+
/** UI-only panel mode for the AI Chat Panel (STORA-503/504). Never serialized into `PageDocument`. */
|
|
125
|
+
aiChatMode: AiChatPanelMode;
|
|
126
|
+
/**
|
|
127
|
+
* Monotonically-increasing signal (STORA-511) the AI Chat Panel watches to focus its
|
|
128
|
+
* chat input and re-attach the current selection as context — e.g. "Ask AI about this
|
|
129
|
+
* component" from the Inspector. UI-only, never serialized into `PageDocument`.
|
|
130
|
+
*/
|
|
131
|
+
aiChatFocusRequestId: number;
|
|
96
132
|
previewMode: boolean;
|
|
133
|
+
multiDeviceMode: boolean;
|
|
97
134
|
actionDebuggerOpen: boolean;
|
|
98
135
|
actionLogs: ActionLogEntry[];
|
|
99
136
|
liveFormState: LiveFormState | null;
|
|
137
|
+
/**
|
|
138
|
+
* Progressive-preview status for an in-flight `streamPage` AI generation session
|
|
139
|
+
* (STORA-508). UI-only, like every other panel-mode field here — never serialized
|
|
140
|
+
* into the document. `null` when no generation is in flight.
|
|
141
|
+
*/
|
|
142
|
+
aiGenerationStatus: AiGenerationPlaceholderStatus | null;
|
|
143
|
+
/**
|
|
144
|
+
* Component artboards (detached modals/drawers/collapsibles, or any block the author
|
|
145
|
+
* detached) belonging to the project currently open. Page artboards stay owned by the
|
|
146
|
+
* host app's `pages` prop; only these live in the store for now.
|
|
147
|
+
*/
|
|
148
|
+
componentArtboards: Artboard[];
|
|
149
|
+
/**
|
|
150
|
+
* Id of the component artboard `document` currently represents, or null while a page
|
|
151
|
+
* artboard is being edited. The store still holds exactly one PageDocument at a time.
|
|
152
|
+
*/
|
|
153
|
+
activeArtboardId: string | null;
|
|
154
|
+
/** Page document stashed while editing a component artboard, restored on return. */
|
|
155
|
+
artboardReturnDocument: PageDocument | null;
|
|
100
156
|
setDocument: (document: PageDocument) => void;
|
|
101
157
|
setDragPayload: (payload: DragPayload | null) => void;
|
|
102
158
|
setVariableCatalog: (catalog: VariableCatalog) => void;
|
|
103
|
-
setNavigatorMode: (mode: NavigatorMode) => void;
|
|
104
|
-
toggleNavigator: () => void;
|
|
105
159
|
setTableSpreadsheetMode: (mode: TableSpreadsheetMode) => void;
|
|
106
160
|
toggleTableSpreadsheet: () => void;
|
|
161
|
+
setAiChatMode: (mode: AiChatPanelMode) => void;
|
|
162
|
+
toggleAiChat: () => void;
|
|
163
|
+
/** Bumps `aiChatFocusRequestId` (STORA-511) — does not itself open the panel. */
|
|
164
|
+
requestAiChatFocus: () => void;
|
|
107
165
|
setPreviewMode: (enabled: boolean) => void;
|
|
108
166
|
togglePreviewMode: () => void;
|
|
167
|
+
setMultiDeviceMode: (enabled: boolean) => void;
|
|
168
|
+
toggleMultiDeviceMode: () => void;
|
|
109
169
|
setActionDebuggerOpen: (open: boolean) => void;
|
|
110
170
|
toggleActionDebugger: () => void;
|
|
111
171
|
addActionLog: (entry: Omit<ActionLogEntry, 'id' | 'timestamp'> & {
|
|
@@ -116,6 +176,42 @@ export interface EditorState {
|
|
|
116
176
|
setLiveFormState: (state: LiveFormState | null) => void;
|
|
117
177
|
setOnChangeHandler: (handler: ((doc: PageDocument) => void) | null) => void;
|
|
118
178
|
dispatch: (executor: (doc: PageDocument) => CommandResult) => void;
|
|
179
|
+
/**
|
|
180
|
+
* Groups every `dispatch()` call made until the matching `endHistoryTransaction()`
|
|
181
|
+
* into a single undo entry (STORA-510) — e.g. every section an AI `streamPage`
|
|
182
|
+
* session inserts. Delegates to `DocumentHistoryManager.beginTransaction()`, the same
|
|
183
|
+
* history engine manual edits already use, so `undo()`/`redo()` need no special-casing.
|
|
184
|
+
*/
|
|
185
|
+
beginHistoryTransaction: () => void;
|
|
186
|
+
endHistoryTransaction: () => void;
|
|
187
|
+
setAiGenerationStatus: (status: AiGenerationPlaceholderStatus | null) => void;
|
|
188
|
+
setComponentArtboards: (artboards: Artboard[]) => void;
|
|
189
|
+
/**
|
|
190
|
+
* Detach a node's subtree into its own component artboard, leaving an
|
|
191
|
+
* `artboard-reference` stub in the page. Works for any node type — this is the generic
|
|
192
|
+
* "give this block its own surface" action, not a modal-only path.
|
|
193
|
+
*/
|
|
194
|
+
detachNodeToArtboard: (nodeId: string, options?: {
|
|
195
|
+
name?: string;
|
|
196
|
+
activate?: boolean;
|
|
197
|
+
}) => DetachArtboardResult;
|
|
198
|
+
/**
|
|
199
|
+
* Switch which artboard the single in-store `document` represents. Pass null to return
|
|
200
|
+
* to the page artboard. Commits the current document back into its artboard first.
|
|
201
|
+
*/
|
|
202
|
+
activateArtboard: (artboardId: string | null) => void;
|
|
203
|
+
/**
|
|
204
|
+
* Delete a component artboard and the reference stubs pointing at it. Destructive: the
|
|
205
|
+
* artboard's content goes with it (the stub removal is undoable, the artboard itself is not).
|
|
206
|
+
*/
|
|
207
|
+
removeComponentArtboard: (artboardId: string) => RemoveArtboardResult;
|
|
208
|
+
/** Persist a component artboard's free position on the builder canvas (unscaled px). */
|
|
209
|
+
setComponentArtboardPosition: (artboardId: string, position: {
|
|
210
|
+
x: number;
|
|
211
|
+
y: number;
|
|
212
|
+
}) => void;
|
|
213
|
+
/** Persist a component artboard's surface width in px. */
|
|
214
|
+
setComponentArtboardWidth: (artboardId: string, width: number) => void;
|
|
119
215
|
insertComponent: (type: string, registry: ComponentRegistry, parentId?: string, index?: number) => InsertComponentResult;
|
|
120
216
|
insertBlock: (blockOrId: BlockDefinition | string, parentId?: string, index?: number) => InsertComponentResult;
|
|
121
217
|
moveComponent: (nodeId: string, targetParentId: string, registry: ComponentRegistry, index?: number) => MoveComponentResult;
|
|
@@ -123,6 +219,22 @@ export interface EditorState {
|
|
|
123
219
|
deleteComponent: (nodeId: string) => DeleteComponentResult;
|
|
124
220
|
updateNodeProps: (nodeId: string, props: Record<string, unknown>, registry: ComponentRegistry, merge?: boolean) => UpdatePropsResult;
|
|
125
221
|
updateNodeStyle: (nodeId: string, styles: StyleDefinition, breakpoint: 'base' | 'desktop' | 'tablet' | 'mobile', merge?: boolean) => UpdateStyleResult;
|
|
222
|
+
/**
|
|
223
|
+
* Replaces a node's entire subtree in place via `@kubuild/core`'s `replaceNode` command
|
|
224
|
+
* (STORA-514) — used by the AI enhance Apply flow when a validated candidate's nested
|
|
225
|
+
* `children` differ structurally from the original, a change `updateNodeProps`/
|
|
226
|
+
* `updateNodeStyle` alone can't express. Same command-engine/history path as every
|
|
227
|
+
* other mutation here: it lands in `DocumentHistoryManager` and `undo()` reverts it.
|
|
228
|
+
*/
|
|
229
|
+
replaceNodeSubtree: (nodeId: string, node: Node, registry: ComponentRegistry) => UpdatePropsResult;
|
|
230
|
+
/**
|
|
231
|
+
* Reset a specific overridden style property on a breakpoint layer, falling back to inherited base (STORA-141).
|
|
232
|
+
*/
|
|
233
|
+
resetNodeStyleProperty: (nodeId: string, property: string, breakpoint: 'base' | 'desktop' | 'tablet' | 'mobile') => UpdateStyleResult;
|
|
234
|
+
/**
|
|
235
|
+
* Reset all overridden style properties on a breakpoint layer, falling back entirely to base.
|
|
236
|
+
*/
|
|
237
|
+
resetNodeViewportStyles: (nodeId: string, breakpoint: 'base' | 'desktop' | 'tablet' | 'mobile') => UpdateStyleResult;
|
|
126
238
|
/**
|
|
127
239
|
* Update a pseudo-state style layer (e.g. ':hover') on a node — STORA-221.
|
|
128
240
|
* Writes to node.styles.states[state] without touching default values.
|
|
@@ -137,6 +249,18 @@ export interface EditorState {
|
|
|
137
249
|
copyNode: (nodeId: string) => void;
|
|
138
250
|
pasteNode: (targetParentId: string, registry: ComponentRegistry, index?: number) => PasteComponentResult;
|
|
139
251
|
selectNode: (nodeId: string | null) => void;
|
|
252
|
+
selectMultipleNodes: (ids: string[]) => void;
|
|
253
|
+
toggleNodeSelection: (id: string, multi: boolean) => void;
|
|
254
|
+
wrapSelectedIntoFrame: () => {
|
|
255
|
+
success: boolean;
|
|
256
|
+
nodeId?: string;
|
|
257
|
+
error?: string;
|
|
258
|
+
};
|
|
259
|
+
ungroupSelectedFrame: () => {
|
|
260
|
+
success: boolean;
|
|
261
|
+
unwrappedIds?: string[];
|
|
262
|
+
error?: string;
|
|
263
|
+
};
|
|
140
264
|
selectParent: () => void;
|
|
141
265
|
hoverNode: (nodeId: string | null) => void;
|
|
142
266
|
setViewport: (viewport: Viewport) => void;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"store.d.ts","sourceRoot":"","sources":["../../src/store/store.ts"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' | 'currentDocument'>;
|
|
4
|
+
/**
|
|
5
|
+
* Builds the AI request context (STORA-502) that a future in-editor chat/generate panel
|
|
6
|
+
* spreads into `AiChatRequest`/`AiGenerateSectionRequest` calls to `useAiChat`/`useAiGenerator`.
|
|
7
|
+
*
|
|
8
|
+
* Pure read of `EditorState` — no separate copy of store logic, no document mutation.
|
|
9
|
+
*
|
|
10
|
+
* Important: the editor store also holds `variableCatalog`, host-declared bindable
|
|
11
|
+
* variables plus editor/preview-only sample values (STORA-053) that are never written to
|
|
12
|
+
* the document (see `EditorState.variableCatalog`, `buildSampleVariablesFromCatalog`).
|
|
13
|
+
* This helper only reads `state.document` and `state.selectedNodeId` — it never touches
|
|
14
|
+
* `variableCatalog` — so the snapshot sent to the AI provider can never leak preview-only
|
|
15
|
+
* sample data.
|
|
16
|
+
*/
|
|
17
|
+
export declare function buildAiChatContext(state: Pick<EditorState, 'document' | 'selectedNodeId'>): AiChatContext;
|
|
18
|
+
/**
|
|
19
|
+
* Applies the AI Chat Panel's "dismiss context for this message only" behavior (STORA-506)
|
|
20
|
+
* to an already-built `AiChatContext`. When the user dismisses the active-context chip
|
|
21
|
+
* before sending, `selectedNodeId` must be stripped from *that* request even though the
|
|
22
|
+
* canvas selection itself is untouched and will resume being sent on the next message.
|
|
23
|
+
*/
|
|
24
|
+
export declare function resolveChatSendContext(context: AiChatContext, contextDismissed: boolean): AiChatContext;
|
|
25
|
+
//# sourceMappingURL=ai-context.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ai-context.d.ts","sourceRoot":"","sources":["../../src/utils/ai-context.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AACjD,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAElD,MAAM,MAAM,aAAa,GAAG,IAAI,CAAC,aAAa,EAAE,gBAAgB,GAAG,iBAAiB,CAAC,CAAC;AAEtF;;;;;;;;;;;;GAYG;AACH,wBAAgB,kBAAkB,CAChC,KAAK,EAAE,IAAI,CAAC,WAAW,EAAE,UAAU,GAAG,gBAAgB,CAAC,GACtD,aAAa,CAKf;AAED;;;;;GAKG;AACH,wBAAgB,sBAAsB,CACpC,OAAO,EAAE,aAAa,EACtB,gBAAgB,EAAE,OAAO,GACxB,aAAa,CAKf"}
|
|
@@ -4,7 +4,11 @@ import { Node, PageDocument } from '@kubuild/schema';
|
|
|
4
4
|
*/
|
|
5
5
|
export declare function collectDocumentNodes(node: Node, predicate: (n: Node) => boolean, acc?: Node[]): Node[];
|
|
6
6
|
/**
|
|
7
|
-
* Scans a document for modal
|
|
7
|
+
* Scans a document for modal, drawer, collapsible, dialog, or any other node carrying a
|
|
8
|
+
* `modalId` prop — the same set the renderer treats as toggleable via open_modal/close_modal
|
|
9
|
+
* (see `isModalContainer` in packages/renderer/src/renderer.tsx). Returns each target's
|
|
10
|
+
* `modalId` prop value (falling back to its Node ID only if it has none), because that prop
|
|
11
|
+
* value — not the structural Node ID — is what open_modal/close_modal actions must target.
|
|
8
12
|
*/
|
|
9
13
|
export declare function collectDocumentModals(doc?: PageDocument): Array<{
|
|
10
14
|
id: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"document-scanner.d.ts","sourceRoot":"","sources":["../../src/utils/document-scanner.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAErD;;GAEG;AACH,wBAAgB,oBAAoB,CAClC,IAAI,EAAE,IAAI,EACV,SAAS,EAAE,CAAC,CAAC,EAAE,IAAI,KAAK,OAAO,EAC/B,GAAG,GAAE,IAAI,EAAO,GACf,IAAI,EAAE,CAUR;AAED
|
|
1
|
+
{"version":3,"file":"document-scanner.d.ts","sourceRoot":"","sources":["../../src/utils/document-scanner.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAErD;;GAEG;AACH,wBAAgB,oBAAoB,CAClC,IAAI,EAAE,IAAI,EACV,SAAS,EAAE,CAAC,CAAC,EAAE,IAAI,KAAK,OAAO,EAC/B,GAAG,GAAE,IAAI,EAAO,GACf,IAAI,EAAE,CAUR;AAED;;;;;;GAMG;AACH,wBAAgB,qBAAqB,CAAC,GAAG,CAAC,EAAE,YAAY,GAAG,KAAK,CAAC;IAAE,EAAE,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,MAAM,CAAA;CAAE,CAAC,CAkB9F;AAED;;GAEG;AACH,wBAAgB,oBAAoB,CAAC,GAAG,CAAC,EAAE,YAAY,GAAG,KAAK,CAAC;IAAE,EAAE,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,MAAM,CAAA;CAAE,CAAC,CAU7F;AAED;;GAEG;AACH,wBAAgB,sBAAsB,CAAC,GAAG,CAAC,EAAE,YAAY,GAAG,KAAK,CAAC;IAAE,EAAE,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,MAAM,CAAA;CAAE,CAAC,CAU/F;AAED;;GAEG;AACH,wBAAgB,yBAAyB,CAAC,GAAG,CAAC,EAAE,YAAY,GAAG,MAAM,EAAE,CA2BtE"}
|
|
@@ -1,5 +1,13 @@
|
|
|
1
1
|
import { PageDocument } from '@kubuild/schema';
|
|
2
2
|
import { ExportPackageOptions } from '@kubuild/core';
|
|
3
|
+
/**
|
|
4
|
+
* Refuse to export a page that depends on content living in a separate component artboard.
|
|
5
|
+
*
|
|
6
|
+
* `.stora` packaging is still single-`PageDocument` shaped, so such an export would silently
|
|
7
|
+
* omit the detached artboards and re-import as dead triggers with no error anywhere. Blocking
|
|
8
|
+
* is the honest behaviour until multi-artboard packaging lands.
|
|
9
|
+
*/
|
|
10
|
+
export declare function assertNoDetachedArtboardReferences(doc: PageDocument): void;
|
|
3
11
|
/**
|
|
4
12
|
* Clean a page title into a safe download filename slug
|
|
5
13
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"export-utils.d.ts","sourceRoot":"","sources":["../../src/utils/export-utils.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAC/C,OAAO,EAAiB,oBAAoB,
|
|
1
|
+
{"version":3,"file":"export-utils.d.ts","sourceRoot":"","sources":["../../src/utils/export-utils.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAC/C,OAAO,EAAiB,oBAAoB,EAAiC,MAAM,eAAe,CAAC;AAEnG;;;;;;GAMG;AACH,wBAAgB,kCAAkC,CAAC,GAAG,EAAE,YAAY,GAAG,IAAI,CAU1E;AAED;;GAEG;AACH,wBAAgB,wBAAwB,CAAC,IAAI,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,GAAG,MAAM,CAOhF;AAED;;GAEG;AACH,wBAAgB,YAAY,CAC1B,IAAI,EAAE,UAAU,GAAG,WAAW,GAAG,MAAM,EACvC,QAAQ,EAAE,MAAM,EAChB,QAAQ,GAAE,MAAmC,GAC5C,IAAI,CAcN;AAED;;GAEG;AACH,wBAAsB,uBAAuB,CAC3C,GAAG,EAAE,YAAY,EACjB,QAAQ,CAAC,EAAE,MAAM,EACjB,OAAO,CAAC,EAAE,oBAAoB,GAC7B,OAAO,CAAC,UAAU,CAAC,CAcrB;AAED;;GAEG;AACH,wBAAgB,sBAAsB,CAAC,GAAG,EAAE,YAAY,EAAE,QAAQ,CAAC,EAAE,MAAM,GAAG,IAAI,CAKjF"}
|
package/dist/utils/index.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/utils/index.ts"],"names":[],"mappings":"AAAA,cAAc,gBAAgB,CAAC;AAC/B,cAAc,oBAAoB,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/utils/index.ts"],"names":[],"mappings":"AAAA,cAAc,gBAAgB,CAAC;AAC/B,cAAc,oBAAoB,CAAC;AACnC,cAAc,cAAc,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kubuild/editor",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.3.0",
|
|
4
4
|
"description": "Visual page builder editor for KUBUILD",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.cjs",
|
|
@@ -22,7 +22,8 @@
|
|
|
22
22
|
},
|
|
23
23
|
"repository": {
|
|
24
24
|
"type": "git",
|
|
25
|
-
"url": "git+https://github.com/kustora/kubuild.git"
|
|
25
|
+
"url": "git+https://github.com/kustora/kubuild.git",
|
|
26
|
+
"directory": "packages/editor"
|
|
26
27
|
},
|
|
27
28
|
"keywords": [
|
|
28
29
|
"page-builder",
|
|
@@ -41,10 +42,11 @@
|
|
|
41
42
|
"dependencies": {
|
|
42
43
|
"lucide-react": "^1.33.0",
|
|
43
44
|
"zustand": "^5.0.15",
|
|
44
|
-
"@kubuild/
|
|
45
|
-
"@kubuild/renderer": "0.
|
|
46
|
-
"@kubuild/schema": "0.
|
|
47
|
-
"@kubuild/
|
|
45
|
+
"@kubuild/ai": "0.3.0",
|
|
46
|
+
"@kubuild/renderer": "0.3.0",
|
|
47
|
+
"@kubuild/schema": "0.3.0",
|
|
48
|
+
"@kubuild/components": "0.3.0",
|
|
49
|
+
"@kubuild/core": "0.3.0"
|
|
48
50
|
},
|
|
49
51
|
"peerDependencies": {
|
|
50
52
|
"react": ">=18.0.0",
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { ActionStep, PageDocument } from '@kubuild/schema';
|
|
3
|
-
export interface ActionBranchEditorProps {
|
|
4
|
-
parentStep: ActionStep;
|
|
5
|
-
document?: PageDocument;
|
|
6
|
-
onUpdateSuccessSteps: (steps: ActionStep[]) => void;
|
|
7
|
-
onUpdateErrorSteps: (steps: ActionStep[]) => void;
|
|
8
|
-
className?: string;
|
|
9
|
-
}
|
|
10
|
-
export interface BranchLaneProps {
|
|
11
|
-
branchType: 'success' | 'error';
|
|
12
|
-
steps: ActionStep[];
|
|
13
|
-
document?: PageDocument;
|
|
14
|
-
onUpdateSteps: (steps: ActionStep[]) => void;
|
|
15
|
-
}
|
|
16
|
-
export declare const BranchLane: React.FC<BranchLaneProps>;
|
|
17
|
-
export declare const ActionBranchEditor: React.FC<ActionBranchEditorProps>;
|
|
18
|
-
//# sourceMappingURL=action-branch-editor.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"action-branch-editor.d.ts","sourceRoot":"","sources":["../src/action-branch-editor.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAmB,MAAM,OAAO,CAAC;AACxC,OAAO,EACL,UAAU,EAEV,YAAY,EACb,MAAM,iBAAiB,CAAC;AAmBzB,MAAM,WAAW,uBAAuB;IACtC,UAAU,EAAE,UAAU,CAAC;IACvB,QAAQ,CAAC,EAAE,YAAY,CAAC;IACxB,oBAAoB,EAAE,CAAC,KAAK,EAAE,UAAU,EAAE,KAAK,IAAI,CAAC;IACpD,kBAAkB,EAAE,CAAC,KAAK,EAAE,UAAU,EAAE,KAAK,IAAI,CAAC;IAClD,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,MAAM,WAAW,eAAe;IAC9B,UAAU,EAAE,SAAS,GAAG,OAAO,CAAC;IAChC,KAAK,EAAE,UAAU,EAAE,CAAC;IACpB,QAAQ,CAAC,EAAE,YAAY,CAAC;IACxB,aAAa,EAAE,CAAC,KAAK,EAAE,UAAU,EAAE,KAAK,IAAI,CAAC;CAC9C;AAED,eAAO,MAAM,UAAU,EAAE,KAAK,CAAC,EAAE,CAAC,eAAe,CAsQhD,CAAC;AAEF,eAAO,MAAM,kBAAkB,EAAE,KAAK,CAAC,EAAE,CAAC,uBAAuB,CAuChE,CAAC"}
|
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { PageDocument, ActionStep, ActionStepType, ActionTriggerType } from '@kubuild/schema';
|
|
3
|
-
export interface ActionBuilderModalProps {
|
|
4
|
-
isOpen: boolean;
|
|
5
|
-
onClose: () => void;
|
|
6
|
-
nodeId?: string | null;
|
|
7
|
-
initialTrigger?: ActionTriggerType;
|
|
8
|
-
document?: PageDocument;
|
|
9
|
-
}
|
|
10
|
-
export interface TriggerMeta {
|
|
11
|
-
type: ActionTriggerType;
|
|
12
|
-
label: string;
|
|
13
|
-
description: string;
|
|
14
|
-
badge: string;
|
|
15
|
-
}
|
|
16
|
-
export declare const TRIGGER_OPTIONS: TriggerMeta[];
|
|
17
|
-
export interface StepTypeMeta {
|
|
18
|
-
type: ActionStepType;
|
|
19
|
-
label: string;
|
|
20
|
-
description: string;
|
|
21
|
-
category: 'network' | 'ui' | 'navigation' | 'state' | 'utility';
|
|
22
|
-
icon: React.ComponentType<{
|
|
23
|
-
className?: string;
|
|
24
|
-
}>;
|
|
25
|
-
defaultPayload: Record<string, unknown>;
|
|
26
|
-
}
|
|
27
|
-
export declare const STEP_TYPE_OPTIONS: StepTypeMeta[];
|
|
28
|
-
export declare function getStepTypeMeta(type: ActionStepType): StepTypeMeta;
|
|
29
|
-
export declare function getCategoryBadgeClass(category: 'network' | 'ui' | 'navigation' | 'state' | 'utility'): string;
|
|
30
|
-
export declare function formatStepSummary(step: ActionStep): string;
|
|
31
|
-
export declare const ActionBuilderModal: React.FC<ActionBuilderModalProps>;
|
|
32
|
-
//# sourceMappingURL=action-builder-modal.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"action-builder-modal.d.ts","sourceRoot":"","sources":["../src/action-builder-modal.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAoD,MAAM,OAAO,CAAC;AACzE,OAAO,EACL,YAAY,EAEZ,UAAU,EACV,cAAc,EACd,iBAAiB,EAClB,MAAM,iBAAiB,CAAC;AA6BzB,MAAM,WAAW,uBAAuB;IACtC,MAA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erPanelProps {
|
|
4
|
-
className?: string;
|
|
5
|
-
onClose?: () => void;
|
|
6
|
-
onResetForm?: () => void;
|
|
7
|
-
formState?: LiveFormState | null;
|
|
8
|
-
logs?: ActionLogEntry[];
|
|
9
|
-
}
|
|
10
|
-
export declare const ActionDebuggerPanel: React.FC<ActionDebuggerPanelProps>;
|
|
11
|
-
//# sourceMappingURL=action-debugger-panel.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"action-debugger-panel.d.ts","sourceRoot":"","sources":["../src/action-debugger-panel.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAmB,MAAM,OAAO,CAAC;AACxC,OAAO,EAAkB,cAAc,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AAsBxE,MAAM,WAAW,wBAAwB;IACvC,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IACrB,WAAW,CAAC,EAAE,MAAM,IAAI,CAAC;IACzB,SAAS,CAAC,EAAE,aAAa,GAAG,IAAI,CAAC;IACjC,IAAI,CAAC,EAAE,cAAc,EAAE,CAAC;CACzB;AAED,eAAO,MAAM,mBAAmB,EAAE,KAAK,CAAC,EAAE,CAAC,wBAAwB,CAkZlE,CAAC"}
|
|
@@ -1,84 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { ActionStep, PageDocument, Node } from '@kubuild/schema';
|
|
3
|
-
export interface ActionStepFormProps {
|
|
4
|
-
step: ActionStep;
|
|
5
|
-
document?: PageDocument;
|
|
6
|
-
onUpdatePayload: (payload: Record<string, unknown>) => void;
|
|
7
|
-
onUpdateMeta?: (meta: {
|
|
8
|
-
label?: string;
|
|
9
|
-
timeout?: number;
|
|
10
|
-
continueOnError?: boolean;
|
|
11
|
-
}) => void;
|
|
12
|
-
onUpdateBranches?: (branches: {
|
|
13
|
-
onSuccess?: ActionStep[];
|
|
14
|
-
onError?: ActionStep[];
|
|
15
|
-
}) => void;
|
|
16
|
-
className?: string;
|
|
17
|
-
hideBranches?: boolean;
|
|
18
|
-
}
|
|
19
|
-
export declare function collectDocumentNodes(node: Node, predicate: (n: Node) => boolean, acc?: Node[]): Node[];
|
|
20
|
-
export declare function collectDocumentModals(doc?: PageDocument): Array<{
|
|
21
|
-
id: string;
|
|
22
|
-
label: string;
|
|
23
|
-
}>;
|
|
24
|
-
export declare function collectDocumentForms(doc?: PageDocument): Array<{
|
|
25
|
-
id: string;
|
|
26
|
-
label: string;
|
|
27
|
-
}>;
|
|
28
|
-
export declare function collectDocumentAnchors(doc?: PageDocument): Array<{
|
|
29
|
-
id: string;
|
|
30
|
-
label: string;
|
|
31
|
-
}>;
|
|
32
|
-
export interface KeyValueEditorProps {
|
|
33
|
-
title: string;
|
|
34
|
-
entries: Record<string, unknown> | undefined;
|
|
35
|
-
onChange: (updated: Record<string, string>) => void;
|
|
36
|
-
document?: PageDocument;
|
|
37
|
-
keyPlaceholder?: string;
|
|
38
|
-
valuePlaceholder?: string;
|
|
39
|
-
emptyLabel?: string;
|
|
40
|
-
}
|
|
41
|
-
export declare const KeyValueEditor: React.FC<KeyValueEditorProps>;
|
|
42
|
-
export declare const ApiRequestStepForm: React.FC<{
|
|
43
|
-
payload: Record<string, unknown>;
|
|
44
|
-
document?: PageDocument;
|
|
45
|
-
onChange: (payload: Record<string, unknown>) => void;
|
|
46
|
-
}>;
|
|
47
|
-
export declare const ShowToastStepForm: React.FC<{
|
|
48
|
-
payload: Record<string, unknown>;
|
|
49
|
-
document?: PageDocument;
|
|
50
|
-
onChange: (payload: Record<string, unknown>) => void;
|
|
51
|
-
}>;
|
|
52
|
-
export declare const NavigateStepForm: React.FC<{
|
|
53
|
-
payload: Record<string, unknown>;
|
|
54
|
-
document?: PageDocument;
|
|
55
|
-
onChange: (payload: Record<string, unknown>) => void;
|
|
56
|
-
}>;
|
|
57
|
-
export declare const ModalStepForm: React.FC<{
|
|
58
|
-
payload: Record<string, unknown>;
|
|
59
|
-
isOpenAction: boolean;
|
|
60
|
-
document?: PageDocument;
|
|
61
|
-
onChange: (payload: Record<string, unknown>) => void;
|
|
62
|
-
}>;
|
|
63
|
-
export declare const SetStateStepForm: React.FC<{
|
|
64
|
-
payload: Record<string, unknown>;
|
|
65
|
-
document?: PageDocument;
|
|
66
|
-
onChange: (payload: Record<string, unknown>) => void;
|
|
67
|
-
}>;
|
|
68
|
-
export declare const ResetFormStepForm: React.FC<{
|
|
69
|
-
payload: Record<string, unknown>;
|
|
70
|
-
document?: PageDocument;
|
|
71
|
-
onChange: (payload: Record<string, unknown>) => void;
|
|
72
|
-
}>;
|
|
73
|
-
export declare const CopyClipboardStepForm: React.FC<{
|
|
74
|
-
payload: Record<string, unknown>;
|
|
75
|
-
document?: PageDocument;
|
|
76
|
-
onChange: (payload: Record<string, unknown>) => void;
|
|
77
|
-
}>;
|
|
78
|
-
export declare const CustomEventStepForm: React.FC<{
|
|
79
|
-
payload: Record<string, unknown>;
|
|
80
|
-
document?: PageDocument;
|
|
81
|
-
onChange: (payload: Record<string, unknown>) => void;
|
|
82
|
-
}>;
|
|
83
|
-
export declare const ActionStepForm: React.FC<ActionStepFormProps>;
|
|
84
|
-
//# sourceMappingURL=action-step-form.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"action-step-form.d.ts","sourceRoot":"","sources":["../src/action-step-form.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAuC,MAAM,OAAO,CAAC;AAC5D,OAAO,EACL,UAAU,EACV,YAAY,EACZ,IAAI,EACL,MAAM,iBAAiB,CAAC;AAezB,MAAM,WAAW,mBAAmB;IAClC,IAAI,EAAE,UAAU,CAAC;IACjB,QAAQ,CAAC,EAAE,YAAY,CAAC;IACxB,eAAe,EAAE,CAAC,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,KAAK,IAAI,CAAC;IAC5D,YAAY,CAAC,EAAE,CAAC,IAAI,EAAE;QAAE,KAAK,CAAC,EAAE,MA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uild/core';
|
|
3
|
-
export interface AssetManagerModalProps {
|
|
4
|
-
isOpen: boolean;
|
|
5
|
-
onClose: () => void;
|
|
6
|
-
/** Called with the resolved URL of the picked asset. */
|
|
7
|
-
onSelect: (url: string) => void;
|
|
8
|
-
/** Optional host-provided asset provider backing the local gallery tab. */
|
|
9
|
-
assetProvider?: AssetProvider;
|
|
10
|
-
/** Acceptable MIME types, e.g. ['image/*']. Defaults to images only. */
|
|
11
|
-
accept?: string[];
|
|
12
|
-
/** Title shown in the modal header. */
|
|
13
|
-
title?: string;
|
|
14
|
-
}
|
|
15
|
-
/**
|
|
16
|
-
* STORA-250 — Unified asset picker modal.
|
|
17
|
-
*
|
|
18
|
-
* Three sources:
|
|
19
|
-
* - Gallery: assets listed by the host `AssetProvider` (local `.stora` gallery).
|
|
20
|
-
* - URL: direct CDN / external URL entry.
|
|
21
|
-
* - Upload: drag-and-drop or file-picker upload, resolved via
|
|
22
|
-
* `assetProvider.upload` when available, otherwise an in-memory object URL.
|
|
23
|
-
*
|
|
24
|
-
* Selecting an asset immediately invokes `onSelect(url)` so the caller can
|
|
25
|
-
* update the target node's `src` prop instantly.
|
|
26
|
-
*/
|
|
27
|
-
export declare const AssetManagerModal: React.FC<AssetManagerModalProps>;
|
|
28
|
-
//# sourceMappingURL=asset-manager-modal.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"asset-manager-modal.d.ts","sourceRoot":"","sources":["../src/asset-manager-modal.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAiD,MAAM,OAAO,CAAC;AACtE,OAAO,EAAE,aAAa,EAAa,MAAM,eAAe,CAAC;AAEzD,MAAM,WAAW,sBAAsB;IACrC,MAAM,EAAE,OAAO,CAAC;IAChB,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB,wDAAwD;IACxD,QAAQ,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,IAAI,CAAC;IAChC,2EAA2E;IAC3E,aAAa,CAAC,EAAE,aAAa,CAAC;IAC9B,wEAAwE;IACxE,MAAM,CAAC,EAAE,MAAM,EAAE,CAAC;IAClB,uCAAuC;IACvC,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAoBD;;;;;;;;;;;GAWG;AACH,eAAO,MAAM,iBAAiB,EAAE,KAAK,CAAC,EAAE,CAAC,sBAAsB,CA8X9D,CAAC"}
|
package/dist/blocks-panel.d.ts
DELETED
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { BlockDefinition, ComponentRegistry } from '@kubuild/components';
|
|
3
|
-
export interface BlocksPanelProps {
|
|
4
|
-
registry?: ComponentRegistry;
|
|
5
|
-
blocks?: BlockDefinition[];
|
|
6
|
-
className?: string;
|
|
7
|
-
onInsertBlock?: (block: BlockDefinition) => void;
|
|
8
|
-
}
|
|
9
|
-
/**
|
|
10
|
-
* Thumbnail schematic preview component for blocks
|
|
11
|
-
*/
|
|
12
|
-
export declare const BlockThumbnail: React.FC<{
|
|
13
|
-
block: BlockDefinition;
|
|
14
|
-
}>;
|
|
15
|
-
/**
|
|
16
|
-
* Tab "Blocks" di Sidebar Kiri Editor — STORA-240.
|
|
17
|
-
* Displays grid of ready-to-use layout & pre-composed template block cards per category.
|
|
18
|
-
*/
|
|
19
|
-
export declare const BlocksPanel: React.FC<BlocksPanelProps>;
|
|
20
|
-
//# sourceMappingURL=blocks-panel.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"blocks-panel.d.ts","sourceRoot":"","sources":["../src/blocks-panel.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA4B,MAAM,OAAO,CAAC;AACjD,OAAO,EAAkB,eAAe,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AAMzF,MAAM,WAAW,gBAAgB;IAC/B,QAAQ,CAAC,EAAE,iBAAiB,CAAC;IAC7B,MAAM,CAAC,EAAE,eAAe,EAAE,CAAC;IAC3B,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,aAAa,CAAC,EAAE,CAAC,KAAK,EAAE,eAAe,KAAK,IAAI,CAAC;CAClD;AAED;;GAEG;AACH,eAAO,MAAM,cAAc,EAAE,KAAK,CAAC,EAAE,CAAC;IAAE,KAAK,EAAE,eAAe,CAAA;CAAE,CA2J/D,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,WAAW,EAAE,KAAK,CAAC,EAAE,CAAC,gBAAgB,CAkJlD,CAAC"}
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
export interface BoxModelValues {
|
|
3
|
-
marginTop?: string | number;
|
|
4
|
-
marginRight?: string | number;
|
|
5
|
-
marginBottom?: string | number;
|
|
6
|
-
marginLeft?: string | number;
|
|
7
|
-
borderTopWidth?: string | number;
|
|
8
|
-
borderRightWidth?: string | number;
|
|
9
|
-
borderBottomWidth?: string | number;
|
|
10
|
-
borderLeftWidth?: string | number;
|
|
11
|
-
paddingTop?: string | number;
|
|
12
|
-
paddingRight?: string | number;
|
|
13
|
-
paddingBottom?: string | number;
|
|
14
|
-
paddingLeft?: string | number;
|
|
15
|
-
}
|
|
16
|
-
export interface BoxModelEditorProps {
|
|
17
|
-
values?: BoxModelValues | Record<string, unknown>;
|
|
18
|
-
onChange?: (property: string, value: string) => void;
|
|
19
|
-
className?: string;
|
|
20
|
-
disabled?: boolean;
|
|
21
|
-
}
|
|
22
|
-
export declare function parseBoxValue(val: unknown): {
|
|
23
|
-
num: string;
|
|
24
|
-
unit: string;
|
|
25
|
-
raw: string;
|
|
26
|
-
};
|
|
27
|
-
export declare const BoxModelEditor: React.FC<BoxModelEditorProps>;
|
|
28
|
-
export declare const VisualBoxModel: React.FC<BoxModelEditorProps>;
|
|
29
|
-
//# sourceMappingURL=box-model-editor.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"box-model-editor.d.ts","sourceRoot":"","sources":["../src/box-model-editor.tsx"],"names":[],"mappings":"AAAA,OAAO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 -1,16 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { PageDocument } from '@kubuild/schema';
|
|
3
|
-
import { ComponentRegistry } from '@kubuild/components';
|
|
4
|
-
export interface HierarchyBreadcrumbsProps {
|
|
5
|
-
registry?: ComponentRegistry;
|
|
6
|
-
document?: PageDocument;
|
|
7
|
-
selectedNodeId?: string | null;
|
|
8
|
-
className?: string;
|
|
9
|
-
}
|
|
10
|
-
/**
|
|
11
|
-
* Bottom Hierarchy Breadcrumbs Bar — STORA-231.
|
|
12
|
-
* Displays the ancestor hierarchy path: Page > Section > Container > ... > SelectedElement.
|
|
13
|
-
* Clicking any breadcrumb item selects that element across canvas and inspector.
|
|
14
|
-
*/
|
|
15
|
-
export declare const HierarchyBreadcrumbs: React.FC<HierarchyBreadcrumbsProps>;
|
|
16
|
-
//# sourceMappingURL=breadcrumbs.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"breadcrumbs.d.ts","sourceRoot":"","sources":["../src/breadcrumbs.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAC/C,OAAO,EAAE,iBAAiB,EAAkC,MAAM,qBAAqB,CAAC;AAIxF,MAAM,WAAW,yBAAyB;IACxC,QAAQ,CAAC,EAAE,iBAAiB,CAAC;IAC7B,QAAQ,CAAC,EAAE,YAAY,CAAC;IACxB,cAAc,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC/B,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED;;;;GAIG;AACH,eAAO,MAAM,oBAAoB,EAAE,KAAK,CAAC,EAAE,CAAC,yBAAyB,CA2EpE,CAAC"}
|