@arkcit/engine 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/README.md +68 -0
- package/dist/UIEngine.d.ts +6 -0
- package/dist/UIEngine.js +3235 -0
- package/dist/bindings.d.ts +8 -0
- package/dist/bindings.js +146 -0
- package/dist/components/index.d.ts +17 -0
- package/dist/components/index.js +143 -0
- package/dist/core/index.d.ts +4 -0
- package/dist/core/index.js +9 -0
- package/dist/form/engineFormValidation.d.ts +2 -0
- package/dist/form/engineFormValidation.js +241 -0
- package/dist/form.d.ts +67 -0
- package/dist/form.js +241 -0
- package/dist/index.d.ts +15 -0
- package/dist/index.js +3336 -0
- package/dist/layout.d.ts +6 -0
- package/dist/layout.js +82 -0
- package/dist/preview/index.d.ts +63 -0
- package/dist/preview/index.js +1514 -0
- package/dist/react-web/index.d.ts +8 -0
- package/dist/react-web/index.js +3246 -0
- package/dist/registry.d.ts +2 -0
- package/dist/registry.js +0 -0
- package/dist/render-layer/index.d.ts +1 -0
- package/dist/render-layer/index.js +13 -0
- package/dist/renderStudioForm-CPQEzvT7.d.ts +75 -0
- package/dist/renderers/index.d.ts +8 -0
- package/dist/renderers/index.js +1570 -0
- package/dist/runtime/index.d.ts +1 -0
- package/dist/runtime/index.js +0 -0
- package/dist/schema/index.d.ts +1 -0
- package/dist/schema/index.js +0 -0
- package/dist/studio-bridge/index.d.ts +501 -0
- package/dist/studio-bridge/index.js +2840 -0
- package/dist/studioProps.d.ts +8 -0
- package/dist/studioProps.js +97 -0
- package/dist/types-9TZ2lQDP.d.ts +60 -0
- package/dist/types-CyAE6ZLH.d.ts +19 -0
- package/dist/types.d.ts +16 -0
- package/dist/types.js +0 -0
- package/dist/wizardEditingHandlers-D50tR-6n.d.ts +163 -0
- package/package.json +160 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { UIActionRef, UIRuntime, UIRuntimeAdapter } from '@arkcit/engine-runtime';
|
|
File without changes
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { UIExprValue, UII18nValue, UINode, UINodeEventName, UINodeLayout, UINodeProps, UIRefValue, UIRenderBindingMeta, UISchema, UISchemaNodeMeta, UIValue } from '@arkcit/engine-schema';
|
|
File without changes
|
|
@@ -0,0 +1,501 @@
|
|
|
1
|
+
import { UINode } from '@arkcit/engine-schema';
|
|
2
|
+
import { UIRuntime, UIActionRef } from '@arkcit/engine-runtime';
|
|
3
|
+
import React__default, { CSSProperties, MouseEvent, ReactNode } from 'react';
|
|
4
|
+
import { U as UIInlineEditorMode, a as UIInlineEditorState, b as UIInlineTextEditorProps } from '../types-CyAE6ZLH.js';
|
|
5
|
+
export { InlineTextEditor, StudioNodeWrapper } from '../components/index.js';
|
|
6
|
+
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
7
|
+
import { UIEngineProps, UINodeWrapperProps } from '@arkcit/engine-core';
|
|
8
|
+
export { UINodeWrapperProps } from '@arkcit/engine-core';
|
|
9
|
+
export { configurePreviewAccordion, configurePreviewExpandablePanel, configurePreviewFormWizard, configurePreviewTabs, materializePreviewForm } from '../preview/index.js';
|
|
10
|
+
import { R as ResolvedStudioWizardStep } from '../wizardEditingHandlers-D50tR-6n.js';
|
|
11
|
+
export { o as ResolvedStudioAccordionState, q as ResolvedStudioFormStructure, s as ResolvedStudioWizardStructure, a as attachStudioWizardEditingHandlers, c as createStudioWizardOnStepChange, n as normalizeStudioTabsProps, p as patchStudioFormFieldNode, b as patchStudioWizardFieldNode, r as resolveStudioAccordionState, d as resolveStudioExpandablePanelState, e as resolveStudioFormNextValues, f as resolveStudioFormResetValues, g as resolveStudioFormStructure, h as resolveStudioTabsContent, i as resolveStudioTabsProps, j as resolveStudioWizardActiveStepFields, k as resolveStudioWizardNextErrors, l as resolveStudioWizardNextValues, m as resolveStudioWizardStructure } from '../wizardEditingHandlers-D50tR-6n.js';
|
|
12
|
+
import '@arkcit/engine-react';
|
|
13
|
+
import '../types-9TZ2lQDP.js';
|
|
14
|
+
|
|
15
|
+
declare const shouldForceStudioNodeFullWidth: ({ widthPct, nodeType, isStudioRendererContext, colSpan, }: {
|
|
16
|
+
widthPct: number | null;
|
|
17
|
+
nodeType: string;
|
|
18
|
+
isStudioRendererContext: boolean;
|
|
19
|
+
colSpan?: number;
|
|
20
|
+
}) => boolean;
|
|
21
|
+
|
|
22
|
+
type InlineTextMode = "primitive" | "json" | "translation";
|
|
23
|
+
type InlineTextEntry = {
|
|
24
|
+
value: string;
|
|
25
|
+
mode: InlineTextMode;
|
|
26
|
+
};
|
|
27
|
+
type GetEditableTextValueArgs = {
|
|
28
|
+
node: UINode;
|
|
29
|
+
nodeProps: Record<string, unknown>;
|
|
30
|
+
propName: string;
|
|
31
|
+
runtime: UIRuntime;
|
|
32
|
+
resolveTranslationValue: (value: unknown, runtime: UIRuntime) => unknown;
|
|
33
|
+
};
|
|
34
|
+
declare const getEditableTextValue: ({ node, nodeProps, propName, runtime, resolveTranslationValue, }: GetEditableTextValueArgs) => InlineTextEntry | null;
|
|
35
|
+
type SelectCandidateInlinePropArgs = {
|
|
36
|
+
node: UINode;
|
|
37
|
+
isWizardStepNode: boolean;
|
|
38
|
+
orderedEditableTextProps: string[];
|
|
39
|
+
getTextValue: (propName: string) => InlineTextEntry | null;
|
|
40
|
+
};
|
|
41
|
+
declare const selectCandidateInlineProp: ({ node, isWizardStepNode, orderedEditableTextProps, getTextValue, }: SelectCandidateInlinePropArgs) => string | null;
|
|
42
|
+
type SelectEffectiveInlinePropArgs = {
|
|
43
|
+
node: UINode;
|
|
44
|
+
isWizardStepNode: boolean;
|
|
45
|
+
hasRenderableChildren: boolean;
|
|
46
|
+
childrenInlineEntry: InlineTextEntry | null;
|
|
47
|
+
candidateInlineProp: string | null;
|
|
48
|
+
};
|
|
49
|
+
declare const selectEffectiveInlineProp: ({ node, isWizardStepNode, hasRenderableChildren, childrenInlineEntry, candidateInlineProp, }: SelectEffectiveInlinePropArgs) => string | null;
|
|
50
|
+
|
|
51
|
+
declare const computeInlineEditorStyle: ({ wrapperElement, targetElementForEditor, }: {
|
|
52
|
+
wrapperElement: HTMLElement;
|
|
53
|
+
targetElementForEditor: HTMLElement | null;
|
|
54
|
+
}) => CSSProperties;
|
|
55
|
+
declare const shouldUseMultilineInlineEditor: ({ mode, value, }: {
|
|
56
|
+
mode: UIInlineEditorMode;
|
|
57
|
+
value: string;
|
|
58
|
+
}) => boolean;
|
|
59
|
+
declare const applyInlineEditingValue: ({ editingState, rawValue, schemaNodes, onInlineTextEdit, findNodeById, }: {
|
|
60
|
+
editingState: {
|
|
61
|
+
nodeId: string;
|
|
62
|
+
propName: string;
|
|
63
|
+
mode: UIInlineEditorMode;
|
|
64
|
+
};
|
|
65
|
+
rawValue: string;
|
|
66
|
+
schemaNodes: UINode[];
|
|
67
|
+
onInlineTextEdit?: (nodeId: string, propName: string, value: unknown) => void;
|
|
68
|
+
findNodeById: (nodeId: string, nodes: UINode[]) => UINode | null;
|
|
69
|
+
}) => void;
|
|
70
|
+
|
|
71
|
+
type InlineEntry = {
|
|
72
|
+
value: string;
|
|
73
|
+
mode: UIInlineEditorState["mode"];
|
|
74
|
+
};
|
|
75
|
+
declare const openInlineEditorFromDoubleClick: ({ event, nodeId, nodeType, effectiveCandidateInlineProp, getTextValue, setInlineEditing, }: {
|
|
76
|
+
event: MouseEvent<HTMLDivElement>;
|
|
77
|
+
nodeId: string;
|
|
78
|
+
nodeType: string;
|
|
79
|
+
effectiveCandidateInlineProp: string | null;
|
|
80
|
+
getTextValue: (propName: string) => InlineEntry | null;
|
|
81
|
+
setInlineEditing: (state: UIInlineEditorState) => void;
|
|
82
|
+
}) => boolean;
|
|
83
|
+
|
|
84
|
+
type ResolveInlineEditingTargetArgs = {
|
|
85
|
+
node: UINode;
|
|
86
|
+
nodeProps: Record<string, unknown>;
|
|
87
|
+
runtime: UIRuntime;
|
|
88
|
+
editableTextProps: string[];
|
|
89
|
+
resolveTranslationValue: (value: unknown, runtime: UIRuntime) => unknown;
|
|
90
|
+
};
|
|
91
|
+
type InlineEditingTargetResolution = {
|
|
92
|
+
canResolveInlineText: boolean;
|
|
93
|
+
isWizardStepNode: boolean;
|
|
94
|
+
orderedEditableTextProps: string[];
|
|
95
|
+
getTextValue: (propName: string) => InlineTextEntry | null;
|
|
96
|
+
effectiveCandidateInlineProp: string | null;
|
|
97
|
+
};
|
|
98
|
+
declare const resolveInlineEditingTarget: ({ node, nodeProps, runtime, editableTextProps, resolveTranslationValue, }: ResolveInlineEditingTargetArgs) => InlineEditingTargetResolution;
|
|
99
|
+
|
|
100
|
+
type UIResizeState = {
|
|
101
|
+
nodeId: string;
|
|
102
|
+
startX: number;
|
|
103
|
+
startY: number;
|
|
104
|
+
startWidthPct: number;
|
|
105
|
+
startHeightPct: number;
|
|
106
|
+
startHeightPx: number;
|
|
107
|
+
containerWidth: number;
|
|
108
|
+
containerHeight: number;
|
|
109
|
+
lastSize?: {
|
|
110
|
+
widthPct: number;
|
|
111
|
+
heightPct: number;
|
|
112
|
+
heightPx?: number;
|
|
113
|
+
};
|
|
114
|
+
};
|
|
115
|
+
type UIPinchResizeState = {
|
|
116
|
+
nodeId: string;
|
|
117
|
+
startDistance: number;
|
|
118
|
+
startWidthPct: number;
|
|
119
|
+
startHeightPct: number;
|
|
120
|
+
lastSize?: {
|
|
121
|
+
widthPct: number;
|
|
122
|
+
heightPct: number;
|
|
123
|
+
heightPx?: number;
|
|
124
|
+
};
|
|
125
|
+
};
|
|
126
|
+
declare const computeMouseResizeSize: ({ state, clientX, clientY, minWidthPct, minHeightPct, minHeightPx, }: {
|
|
127
|
+
state: UIResizeState;
|
|
128
|
+
clientX: number;
|
|
129
|
+
clientY: number;
|
|
130
|
+
minWidthPct: number;
|
|
131
|
+
minHeightPct: number;
|
|
132
|
+
minHeightPx: number;
|
|
133
|
+
}) => {
|
|
134
|
+
widthPct: number;
|
|
135
|
+
heightPct: number;
|
|
136
|
+
heightPx: number;
|
|
137
|
+
};
|
|
138
|
+
declare const computePinchResizeSize: ({ state, distance, minWidthPct, minHeightPct, }: {
|
|
139
|
+
state: UIPinchResizeState;
|
|
140
|
+
distance: number;
|
|
141
|
+
minWidthPct: number;
|
|
142
|
+
minHeightPct: number;
|
|
143
|
+
}) => {
|
|
144
|
+
widthPct: number;
|
|
145
|
+
heightPct: number;
|
|
146
|
+
} | null;
|
|
147
|
+
declare const createMouseResizeState: ({ nodeId, clientX, clientY, widthPct, heightPct, heightPx, elementRect, parentRect, minHeightPx, }: {
|
|
148
|
+
nodeId: string;
|
|
149
|
+
clientX: number;
|
|
150
|
+
clientY: number;
|
|
151
|
+
widthPct: number | null;
|
|
152
|
+
heightPct: number | null;
|
|
153
|
+
heightPx: number | null;
|
|
154
|
+
elementRect: DOMRect;
|
|
155
|
+
parentRect: DOMRect;
|
|
156
|
+
minHeightPx: number;
|
|
157
|
+
}) => UIResizeState;
|
|
158
|
+
declare const createPinchResizeState: ({ nodeId, widthPct, heightPct, distance, }: {
|
|
159
|
+
nodeId: string;
|
|
160
|
+
widthPct: number | null;
|
|
161
|
+
heightPct: number | null;
|
|
162
|
+
distance: number;
|
|
163
|
+
}) => UIPinchResizeState;
|
|
164
|
+
|
|
165
|
+
type TouchHandlerParams = {
|
|
166
|
+
node: UINode;
|
|
167
|
+
widthPct: number | null;
|
|
168
|
+
heightPct: number | null;
|
|
169
|
+
onNodeResize?: (nodeId: string, size: {
|
|
170
|
+
widthPct: number;
|
|
171
|
+
heightPct: number;
|
|
172
|
+
heightPx?: number;
|
|
173
|
+
}) => void;
|
|
174
|
+
onNodeResizeStart?: (nodeId: string) => void;
|
|
175
|
+
onNodeResizeEnd?: (nodeId: string, size: {
|
|
176
|
+
widthPct: number;
|
|
177
|
+
heightPct: number;
|
|
178
|
+
heightPx?: number;
|
|
179
|
+
}) => void;
|
|
180
|
+
pinchStateRef: React.MutableRefObject<UIPinchResizeState | null>;
|
|
181
|
+
minWidthPct: number;
|
|
182
|
+
minHeightPct: number;
|
|
183
|
+
};
|
|
184
|
+
declare const createTouchResizeHandlers: ({ node, widthPct, heightPct, onNodeResize, onNodeResizeStart, onNodeResizeEnd, pinchStateRef, minWidthPct, minHeightPct, }: TouchHandlerParams) => {
|
|
185
|
+
onTouchStart: (event: React.TouchEvent<HTMLDivElement>) => void;
|
|
186
|
+
onTouchMove: (event: React.TouchEvent<HTMLDivElement>) => void;
|
|
187
|
+
onTouchEnd: () => void;
|
|
188
|
+
};
|
|
189
|
+
type MouseResizeParams = {
|
|
190
|
+
node: UINode;
|
|
191
|
+
widthPct: number | null;
|
|
192
|
+
heightPct: number | null;
|
|
193
|
+
heightPx: number | null;
|
|
194
|
+
onNodeResize?: (nodeId: string, size: {
|
|
195
|
+
widthPct: number;
|
|
196
|
+
heightPct: number;
|
|
197
|
+
heightPx?: number;
|
|
198
|
+
}) => void;
|
|
199
|
+
onNodeResizeStart?: (nodeId: string) => void;
|
|
200
|
+
resizeStateRef: React.MutableRefObject<UIResizeState | null>;
|
|
201
|
+
minHeightPx: number;
|
|
202
|
+
};
|
|
203
|
+
declare const createMouseResizeHandler: ({ node, widthPct, heightPct, heightPx, onNodeResize, onNodeResizeStart, resizeStateRef, minHeightPx, }: MouseResizeParams) => ((event: React.MouseEvent<HTMLButtonElement>) => void) | undefined;
|
|
204
|
+
type ClickHandlerParams = {
|
|
205
|
+
node: UINode;
|
|
206
|
+
nodeProps: Record<string, unknown>;
|
|
207
|
+
schemaNodes: UINode[];
|
|
208
|
+
runtime: UIRuntime;
|
|
209
|
+
onNodeClick?: (nodeId: string) => void;
|
|
210
|
+
onInlineTextEdit?: (nodeId: string, propName: string, value: unknown) => void;
|
|
211
|
+
isInlineEditingNode: boolean;
|
|
212
|
+
enableEventOnClick: boolean;
|
|
213
|
+
isFormInteractiveTarget: (target: HTMLElement | null) => boolean;
|
|
214
|
+
};
|
|
215
|
+
declare const createStudioNodeClickHandler: ({ node, nodeProps, schemaNodes, runtime, onNodeClick, onInlineTextEdit, isInlineEditingNode, enableEventOnClick, isFormInteractiveTarget, }: ClickHandlerParams) => (event: React.MouseEvent<HTMLDivElement>) => void;
|
|
216
|
+
type DoubleClickHandlerParams = {
|
|
217
|
+
node: UINode;
|
|
218
|
+
onInlineTextEdit?: (nodeId: string, propName: string, value: unknown) => void;
|
|
219
|
+
effectiveCandidateInlineProp: string | null;
|
|
220
|
+
getTextValue: (propName: string) => InlineTextEntry | null;
|
|
221
|
+
setInlineEditing: (state: UIInlineEditorState | null) => void;
|
|
222
|
+
};
|
|
223
|
+
declare const createStudioNodeDoubleClickHandler: ({ node, onInlineTextEdit, effectiveCandidateInlineProp, getTextValue, setInlineEditing, }: DoubleClickHandlerParams) => (event: React.MouseEvent<HTMLDivElement>) => void;
|
|
224
|
+
|
|
225
|
+
type WrapperStyleParams = {
|
|
226
|
+
isOpenStudioOverlayNode: boolean;
|
|
227
|
+
wrapperClassName: string;
|
|
228
|
+
widthPct: number | null;
|
|
229
|
+
shouldForceFullWidth: boolean;
|
|
230
|
+
};
|
|
231
|
+
declare const getNodeWrapperPresentation: ({ isOpenStudioOverlayNode, wrapperClassName, widthPct, shouldForceFullWidth, }: WrapperStyleParams) => {
|
|
232
|
+
wrapperStyle: {
|
|
233
|
+
position: "absolute";
|
|
234
|
+
inset: number;
|
|
235
|
+
width: string;
|
|
236
|
+
height: string;
|
|
237
|
+
} | {
|
|
238
|
+
width: string;
|
|
239
|
+
position?: undefined;
|
|
240
|
+
inset?: undefined;
|
|
241
|
+
height?: undefined;
|
|
242
|
+
} | undefined;
|
|
243
|
+
overlayWrapperClassName: string;
|
|
244
|
+
requiresPlainWrapper: boolean;
|
|
245
|
+
};
|
|
246
|
+
type InteractionStateParams = {
|
|
247
|
+
node: UINode;
|
|
248
|
+
selectedNodeId: string | null;
|
|
249
|
+
effectiveCandidateInlineProp: string | null;
|
|
250
|
+
isInlineEditingNode: boolean;
|
|
251
|
+
isOpenStudioOverlayNode: boolean;
|
|
252
|
+
isInsideForm: boolean;
|
|
253
|
+
isInsideFormWizard: boolean;
|
|
254
|
+
isInsideStepForm: boolean;
|
|
255
|
+
inlinePropName?: string;
|
|
256
|
+
};
|
|
257
|
+
declare const getStudioNodeInteractionState: ({ node, selectedNodeId, effectiveCandidateInlineProp, isInlineEditingNode, isOpenStudioOverlayNode, isInsideForm, isInsideFormWizard, isInsideStepForm, inlinePropName, }: InteractionStateParams) => {
|
|
258
|
+
isSelected: boolean;
|
|
259
|
+
allowNodeHandles: boolean;
|
|
260
|
+
studioFormFieldWrapperClassName: string;
|
|
261
|
+
cursorClassName: string;
|
|
262
|
+
preserveContentWhileInlineEditing: boolean;
|
|
263
|
+
};
|
|
264
|
+
declare const renderPlainWrappedNode: ({ nodeId, overlayWrapperClassName, wrapperStyle, nodeContent, }: {
|
|
265
|
+
nodeId: string;
|
|
266
|
+
overlayWrapperClassName: string;
|
|
267
|
+
wrapperStyle: React__default.CSSProperties | undefined;
|
|
268
|
+
nodeContent: React__default.ReactNode;
|
|
269
|
+
}) => react_jsx_runtime.JSX.Element;
|
|
270
|
+
|
|
271
|
+
declare const markSuppressStudioClick: (durationMs?: number) => void;
|
|
272
|
+
declare const shouldSuppressStudioClick: () => boolean;
|
|
273
|
+
|
|
274
|
+
type OverlaySyncParams = {
|
|
275
|
+
node: UINode;
|
|
276
|
+
componentProps: Record<string, unknown>;
|
|
277
|
+
runtime: UIRuntime;
|
|
278
|
+
overlaysByNodeId: Record<string, unknown>;
|
|
279
|
+
renderBindingProps: Record<string, unknown>;
|
|
280
|
+
resolvedChildContent: React__default.ReactNode | null;
|
|
281
|
+
onInlineTextEdit?: (nodeId: string, propName: string, value: unknown) => void;
|
|
282
|
+
isStudioRendererContext: boolean;
|
|
283
|
+
dropdownOpenByNodeId: Record<string, boolean>;
|
|
284
|
+
setDropdownOpenByNodeId: React__default.Dispatch<React__default.SetStateAction<Record<string, boolean>>>;
|
|
285
|
+
};
|
|
286
|
+
declare const readOverlayState: (runtime: UIRuntime) => Record<string, unknown>;
|
|
287
|
+
declare const applyStudioOverlayComponentProps: ({ node, componentProps, runtime, overlaysByNodeId, renderBindingProps, resolvedChildContent, onInlineTextEdit, isStudioRendererContext, dropdownOpenByNodeId, setDropdownOpenByNodeId, }: OverlaySyncParams) => void;
|
|
288
|
+
declare const getOpenStudioOverlayState: ({ node, nodeProps, overlaysByNodeId, }: {
|
|
289
|
+
node: UINode;
|
|
290
|
+
nodeProps: Record<string, unknown>;
|
|
291
|
+
overlaysByNodeId: Record<string, unknown>;
|
|
292
|
+
}) => boolean;
|
|
293
|
+
|
|
294
|
+
type RenderNodeFrameParams = {
|
|
295
|
+
node: UINode;
|
|
296
|
+
nodeProps: Record<string, unknown>;
|
|
297
|
+
nodeContent: React__default.ReactNode;
|
|
298
|
+
selectedNodeId: string | null;
|
|
299
|
+
onNodeClick?: (nodeId: string) => void;
|
|
300
|
+
onInlineTextEdit?: (nodeId: string, propName: string, value: unknown) => void;
|
|
301
|
+
onNodeResize?: (nodeId: string, size: {
|
|
302
|
+
widthPct: number;
|
|
303
|
+
heightPct: number;
|
|
304
|
+
heightPx?: number;
|
|
305
|
+
}) => void;
|
|
306
|
+
onNodeResizeStart?: (nodeId: string) => void;
|
|
307
|
+
onNodeResizeEnd?: (nodeId: string, size: {
|
|
308
|
+
widthPct: number;
|
|
309
|
+
heightPct: number;
|
|
310
|
+
heightPx?: number;
|
|
311
|
+
}) => void;
|
|
312
|
+
widthPct: number | null;
|
|
313
|
+
heightPct: number | null;
|
|
314
|
+
heightPx: number | null;
|
|
315
|
+
wrapperClassName: string;
|
|
316
|
+
isOpenStudioOverlayNode: boolean;
|
|
317
|
+
shouldForceFullWidth: boolean;
|
|
318
|
+
effectiveCandidateInlineProp: string | null;
|
|
319
|
+
inlineEditing: UIInlineEditorState | null;
|
|
320
|
+
isInlineEditingNode: boolean;
|
|
321
|
+
ancestorTypeMembership: Record<string, Set<string>>;
|
|
322
|
+
schemaNodes: UINode[];
|
|
323
|
+
runtime: UIRuntime;
|
|
324
|
+
enableEventOnClick: boolean;
|
|
325
|
+
isFormInteractiveTarget: (target: HTMLElement | null) => boolean;
|
|
326
|
+
getTextValue: (propName: string) => {
|
|
327
|
+
value: string;
|
|
328
|
+
mode: UIInlineEditorState["mode"];
|
|
329
|
+
} | null;
|
|
330
|
+
setInlineEditing: React__default.Dispatch<React__default.SetStateAction<UIInlineEditorState | null>>;
|
|
331
|
+
inlineEditor: React__default.ReactNode;
|
|
332
|
+
NodeWrapper: React__default.ComponentType<{
|
|
333
|
+
nodeId: string;
|
|
334
|
+
wrapperClassName?: string;
|
|
335
|
+
cursorClassName?: string;
|
|
336
|
+
isSelected: boolean;
|
|
337
|
+
allowDragHandle?: boolean;
|
|
338
|
+
allowResizeHandle?: boolean;
|
|
339
|
+
style?: React__default.CSSProperties;
|
|
340
|
+
onClick?: (event: React__default.MouseEvent<HTMLDivElement>) => void;
|
|
341
|
+
onDoubleClick?: (event: React__default.MouseEvent<HTMLDivElement>) => void;
|
|
342
|
+
onTouchStart?: (event: React__default.TouchEvent<HTMLDivElement>) => void;
|
|
343
|
+
onTouchMove?: (event: React__default.TouchEvent<HTMLDivElement>) => void;
|
|
344
|
+
onTouchEnd?: (event: React__default.TouchEvent<HTMLDivElement>) => void;
|
|
345
|
+
showResizeHandle: boolean;
|
|
346
|
+
onResizeMouseDown?: (event: React__default.MouseEvent<HTMLButtonElement>) => void;
|
|
347
|
+
isInlineEditing: boolean;
|
|
348
|
+
preserveContentWhileInlineEditing?: boolean;
|
|
349
|
+
children: React__default.ReactNode;
|
|
350
|
+
inlineEditor?: React__default.ReactNode;
|
|
351
|
+
}>;
|
|
352
|
+
overlaysByNodeId: Record<string, unknown>;
|
|
353
|
+
getOpenStudioOverlayState: (args: {
|
|
354
|
+
node: UINode;
|
|
355
|
+
nodeProps: Record<string, unknown>;
|
|
356
|
+
overlaysByNodeId: Record<string, unknown>;
|
|
357
|
+
}) => boolean;
|
|
358
|
+
resizeStateRef: React__default.MutableRefObject<{
|
|
359
|
+
nodeId: string;
|
|
360
|
+
startX: number;
|
|
361
|
+
startY: number;
|
|
362
|
+
startWidthPct: number;
|
|
363
|
+
startHeightPct: number;
|
|
364
|
+
startHeightPx: number;
|
|
365
|
+
containerWidth: number;
|
|
366
|
+
containerHeight: number;
|
|
367
|
+
lastSize?: {
|
|
368
|
+
widthPct: number;
|
|
369
|
+
heightPct: number;
|
|
370
|
+
heightPx?: number;
|
|
371
|
+
};
|
|
372
|
+
} | null>;
|
|
373
|
+
pinchStateRef: React__default.MutableRefObject<{
|
|
374
|
+
nodeId: string;
|
|
375
|
+
startDistance: number;
|
|
376
|
+
startWidthPct: number;
|
|
377
|
+
startHeightPct: number;
|
|
378
|
+
lastSize?: {
|
|
379
|
+
widthPct: number;
|
|
380
|
+
heightPct: number;
|
|
381
|
+
heightPx?: number;
|
|
382
|
+
};
|
|
383
|
+
} | null>;
|
|
384
|
+
minWidthPct: number;
|
|
385
|
+
minHeightPct: number;
|
|
386
|
+
minHeightPx: number;
|
|
387
|
+
overlayRootId: string;
|
|
388
|
+
};
|
|
389
|
+
declare const renderNodeFrame: ({ node, nodeProps, nodeContent, selectedNodeId, onNodeClick, onInlineTextEdit, onNodeResize, onNodeResizeStart, onNodeResizeEnd, widthPct, heightPct, heightPx, wrapperClassName, isOpenStudioOverlayNode, shouldForceFullWidth, effectiveCandidateInlineProp, inlineEditing, isInlineEditingNode, ancestorTypeMembership, schemaNodes, runtime, enableEventOnClick, isFormInteractiveTarget, getTextValue, setInlineEditing, inlineEditor, NodeWrapper, overlaysByNodeId, getOpenStudioOverlayState, resizeStateRef, pinchStateRef, minWidthPct, minHeightPct, minHeightPx, overlayRootId, }: RenderNodeFrameParams) => string | number | bigint | boolean | Iterable<React__default.ReactNode> | Promise<string | number | bigint | boolean | React__default.ReactPortal | React__default.ReactElement<unknown, string | React__default.JSXElementConstructor<any>> | Iterable<React__default.ReactNode> | null | undefined> | react_jsx_runtime.JSX.Element | null | undefined;
|
|
390
|
+
|
|
391
|
+
type RenderSafeNodeArgs = {
|
|
392
|
+
node: UINode;
|
|
393
|
+
registry: NonNullable<UIEngineProps["registry"]>;
|
|
394
|
+
runtime: UIRuntime;
|
|
395
|
+
schemaNodes: UINode[];
|
|
396
|
+
renderNode: (node: UINode, studioSizing?: {
|
|
397
|
+
widthPct: number | null;
|
|
398
|
+
heightPct: number | null;
|
|
399
|
+
heightPx: number | null;
|
|
400
|
+
}) => React__default.ReactNode;
|
|
401
|
+
isStudioRendererContext: boolean;
|
|
402
|
+
overlaysByNodeId: Record<string, unknown>;
|
|
403
|
+
selectedNodeId: string | null;
|
|
404
|
+
onNodeClick: UIEngineProps["onNodeClick"];
|
|
405
|
+
onInlineTextEdit: UIEngineProps["onInlineTextEdit"];
|
|
406
|
+
onNodeResize: UIEngineProps["onNodeResize"];
|
|
407
|
+
onNodeResizeStart: UIEngineProps["onNodeResizeStart"];
|
|
408
|
+
onNodeResizeEnd: UIEngineProps["onNodeResizeEnd"];
|
|
409
|
+
inlineEditing: UIInlineEditorState | null;
|
|
410
|
+
setInlineEditing: React__default.Dispatch<React__default.SetStateAction<UIInlineEditorState | null>>;
|
|
411
|
+
ancestorTypeMembership: Record<string, Set<string>>;
|
|
412
|
+
resizeStateRef: React__default.MutableRefObject<{
|
|
413
|
+
nodeId: string;
|
|
414
|
+
startX: number;
|
|
415
|
+
startY: number;
|
|
416
|
+
startWidthPct: number;
|
|
417
|
+
startHeightPct: number;
|
|
418
|
+
startHeightPx: number;
|
|
419
|
+
containerWidth: number;
|
|
420
|
+
containerHeight: number;
|
|
421
|
+
lastSize?: {
|
|
422
|
+
widthPct: number;
|
|
423
|
+
heightPct: number;
|
|
424
|
+
heightPx?: number;
|
|
425
|
+
};
|
|
426
|
+
} | null>;
|
|
427
|
+
pinchStateRef: React__default.MutableRefObject<{
|
|
428
|
+
nodeId: string;
|
|
429
|
+
startDistance: number;
|
|
430
|
+
startWidthPct: number;
|
|
431
|
+
startHeightPct: number;
|
|
432
|
+
lastSize?: {
|
|
433
|
+
widthPct: number;
|
|
434
|
+
heightPct: number;
|
|
435
|
+
heightPx?: number;
|
|
436
|
+
};
|
|
437
|
+
} | null>;
|
|
438
|
+
minWidthPct: number;
|
|
439
|
+
minHeightPct: number;
|
|
440
|
+
minHeightPx: number;
|
|
441
|
+
overlayRootId: string;
|
|
442
|
+
NodeWrapper: React__default.ComponentType<UINodeWrapperProps>;
|
|
443
|
+
InlineTextEditorComponent: React__default.ComponentType<UIInlineTextEditorProps>;
|
|
444
|
+
isFormInteractiveTarget: (target: HTMLElement | null) => boolean;
|
|
445
|
+
};
|
|
446
|
+
declare const renderSafeNode: ({ node, registry, runtime, schemaNodes, renderNode, isStudioRendererContext, overlaysByNodeId, selectedNodeId, onNodeClick, onInlineTextEdit, onNodeResize, onNodeResizeStart, onNodeResizeEnd, inlineEditing, setInlineEditing, ancestorTypeMembership, resizeStateRef, pinchStateRef, minWidthPct, minHeightPct, minHeightPx, overlayRootId, NodeWrapper, InlineTextEditorComponent, isFormInteractiveTarget, }: RenderSafeNodeArgs) => string | number | bigint | boolean | Iterable<React__default.ReactNode> | Promise<string | number | bigint | boolean | React__default.ReactPortal | React__default.ReactElement<unknown, string | React__default.JSXElementConstructor<any>> | Iterable<React__default.ReactNode> | null | undefined> | react_jsx_runtime.JSX.Element | null | undefined;
|
|
447
|
+
|
|
448
|
+
type MaterializeStudioWizardStepsArgs = {
|
|
449
|
+
nodeId: string;
|
|
450
|
+
currentSteps: ResolvedStudioWizardStep[];
|
|
451
|
+
existingFormConfig: Record<string, unknown>;
|
|
452
|
+
rawWizardValues: Record<string, unknown>;
|
|
453
|
+
stepIdToNode: Record<string, UINode>;
|
|
454
|
+
runtime: UIRuntime;
|
|
455
|
+
renderSafeNode: (node: UINode) => ReactNode;
|
|
456
|
+
captureFieldFocus: (target: EventTarget | null) => void;
|
|
457
|
+
onInlineTextEdit?: (nodeId: string, propName: string, value: unknown) => void;
|
|
458
|
+
};
|
|
459
|
+
declare const materializeStudioWizardSteps: ({ nodeId, currentSteps, existingFormConfig, rawWizardValues, stepIdToNode, runtime, renderSafeNode, captureFieldFocus, onInlineTextEdit, }: MaterializeStudioWizardStepsArgs) => {
|
|
460
|
+
id: string;
|
|
461
|
+
title: unknown;
|
|
462
|
+
description: unknown;
|
|
463
|
+
titleNode: React__default.ReactNode;
|
|
464
|
+
descriptionNode: React__default.ReactNode;
|
|
465
|
+
isValid: boolean;
|
|
466
|
+
content: React__default.ReactNode;
|
|
467
|
+
}[];
|
|
468
|
+
|
|
469
|
+
declare const isInteractiveSelectionTarget: ({ targetElement, nodeType, isFormInteractiveTarget, }: {
|
|
470
|
+
targetElement: HTMLElement | null;
|
|
471
|
+
nodeType: string;
|
|
472
|
+
isFormInteractiveTarget: (target: HTMLElement | null) => boolean;
|
|
473
|
+
}) => boolean;
|
|
474
|
+
declare const resolveButtonOverlayTarget: ({ clickEvent, boundTargetNodeId, overlayCandidates, }: {
|
|
475
|
+
clickEvent: UIActionRef | undefined;
|
|
476
|
+
boundTargetNodeId: string;
|
|
477
|
+
overlayCandidates: string[];
|
|
478
|
+
}) => {
|
|
479
|
+
actionLabel: string;
|
|
480
|
+
payload: Record<string, unknown> | null;
|
|
481
|
+
targetNodeId: string;
|
|
482
|
+
};
|
|
483
|
+
declare const buildNormalizedActionRef: ({ clickEvent, payload, targetNodeId, }: {
|
|
484
|
+
clickEvent: UIActionRef;
|
|
485
|
+
payload: Record<string, unknown> | null;
|
|
486
|
+
targetNodeId: string;
|
|
487
|
+
}) => UIActionRef;
|
|
488
|
+
declare const syncOverlayStateFromAction: ({ targetNodeId, actionLabel, runtime, onInlineTextEdit, findNodeById, schemaNodes, }: {
|
|
489
|
+
targetNodeId: string;
|
|
490
|
+
actionLabel: string;
|
|
491
|
+
runtime: UIRuntime;
|
|
492
|
+
onInlineTextEdit?: (nodeId: string, propName: string, value: unknown) => void;
|
|
493
|
+
findNodeById: (nodeId: string, nodes: UINode[]) => UINode | null;
|
|
494
|
+
schemaNodes: UINode[];
|
|
495
|
+
}) => void;
|
|
496
|
+
declare const resolveClickedNodeId: ({ targetElement, fallbackNodeId, }: {
|
|
497
|
+
targetElement: HTMLElement | null;
|
|
498
|
+
fallbackNodeId: string;
|
|
499
|
+
}) => string;
|
|
500
|
+
|
|
501
|
+
export { type InlineEditingTargetResolution, type InlineTextEntry, type InlineTextMode, ResolvedStudioWizardStep, UIInlineEditorMode as UIInlineEditingMode, UIInlineEditorState as UIInlineEditingState, type UIPinchResizeState, type UIResizeState, applyInlineEditingValue, applyStudioOverlayComponentProps, buildNormalizedActionRef, computeInlineEditorStyle, computeMouseResizeSize, computePinchResizeSize, createMouseResizeHandler, createMouseResizeState, createPinchResizeState, createStudioNodeClickHandler, createStudioNodeDoubleClickHandler, createTouchResizeHandlers, getEditableTextValue, getNodeWrapperPresentation, getOpenStudioOverlayState, getStudioNodeInteractionState, isInteractiveSelectionTarget, markSuppressStudioClick, materializeStudioWizardSteps, openInlineEditorFromDoubleClick, readOverlayState, renderNodeFrame, renderPlainWrappedNode, renderSafeNode, resolveButtonOverlayTarget, resolveClickedNodeId, resolveInlineEditingTarget, selectCandidateInlineProp, selectEffectiveInlineProp, shouldForceStudioNodeFullWidth, shouldSuppressStudioClick, shouldUseMultilineInlineEditor, syncOverlayStateFromAction };
|