@charisol/plexo-sdk 1.4.42 → 2.0.2
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 +72 -0
- package/dist/InlineColorPicker-8ewm1Asx.js +2912 -0
- package/dist/client-DlVJt_6V.js +339 -0
- package/dist/colorUtils-ohNG3v1i.js +222 -0
- package/dist/columnOrder-f5-VOg2T.js +11 -0
- package/dist/{compiler-BvseEhDC.js → compiler-Dhpsq71h.js} +121 -120
- package/dist/compiler.js +1 -1
- package/dist/{compilerClient-BIrZIgfG.js → compilerClient-BC4TGAr9.js} +93 -92
- package/dist/compilerClient.js +1 -1
- package/dist/{iconSvgStatic-CGue7nyp.js → iconSvgStatic-Lnpg27U9.js} +66 -75
- package/dist/index.js +14042 -15423
- package/dist/legacy-B4E71HSa.js +16192 -0
- package/dist/lint-D-2x-Yeb.js +225 -0
- package/dist/{mjmlBrowser-DWk0mRD6.js → mjmlBrowser-wlHcAT8n.js} +2 -2
- package/dist/plexo-sdk.css +1 -1
- package/dist/rolldown-runtime-B1bRi_D7.js +27 -0
- package/dist/sanitize.js +1 -1
- package/dist/{sanitizeCompiledHtml-CNjUXlMK.js → sanitizeCompiledHtml-GgGsetm3.js} +673 -698
- package/dist/{zoom-in-DL4pfiLG.js → schemas-Bq5o5MfF.js} +916 -2120
- package/dist/utilities/colorUtils.d.ts +35 -0
- package/dist/utilities/playground.interfaces.d.ts +19 -1
- package/dist/v2/V2Editor.d.ts +25 -0
- package/dist/v2/compile/build.d.ts +38 -0
- package/dist/v2/compile/html.d.ts +18 -0
- package/dist/v2/compile/index.d.ts +28 -15
- package/dist/v2/compile/react.d.ts +17 -0
- package/dist/v2/compile/schema.d.ts +16 -0
- package/dist/v2/components/canvas/AlignmentGuidesOverlay.d.ts +7 -0
- package/dist/v2/components/canvas/CanvasArea.d.ts +2 -0
- package/dist/v2/components/canvas/CanvasControls.d.ts +2 -0
- package/dist/v2/components/canvas/ContextualToolbar.d.ts +7 -0
- package/dist/v2/components/canvas/DropIndicator.d.ts +6 -0
- package/dist/v2/components/canvas/IrView.d.ts +12 -0
- package/dist/v2/components/canvas/NodeRenderer.d.ts +12 -0
- package/dist/v2/components/canvas/PageFrame.d.ts +9 -0
- package/dist/v2/components/canvas/ResizeHandles.d.ts +8 -0
- package/dist/v2/components/canvas/SectionToolbar.d.ts +6 -0
- package/dist/v2/components/canvas/SpacingOverlay.d.ts +7 -0
- package/dist/v2/components/design/AutoUpdateWatcher.d.ts +7 -0
- package/dist/v2/components/design/DesignSystemPanel.d.ts +7 -0
- package/dist/v2/components/design/ReviewView.d.ts +7 -0
- package/dist/v2/components/design/StrataCard.d.ts +8 -0
- package/dist/v2/components/design/TidyView.d.ts +15 -0
- package/dist/v2/components/design/bits.d.ts +20 -0
- package/dist/v2/components/design/useStrataSync.d.ts +51 -0
- package/dist/v2/components/layout/ContextMenu.d.ts +2 -0
- package/dist/v2/components/layout/EditorShell.d.ts +2 -0
- package/dist/v2/components/layout/LeftToolRail.d.ts +2 -0
- package/dist/v2/components/layout/PreviewOverlay.d.ts +6 -0
- package/dist/v2/components/layout/TopToolbar.d.ts +8 -0
- package/dist/v2/components/modals/SettingsModal.d.ts +7 -0
- package/dist/v2/components/modals/ShortcutsModal.d.ts +7 -0
- package/dist/v2/components/properties/ColorField.d.ts +14 -0
- package/dist/v2/components/properties/ElementSettings.d.ts +39 -0
- package/dist/v2/components/properties/LinkField.d.ts +26 -0
- package/dist/v2/components/properties/PageInspector.d.ts +2 -0
- package/dist/v2/components/properties/PropertiesPanel.d.ts +2 -0
- package/dist/v2/components/properties/SectionSettings.d.ts +6 -0
- package/dist/v2/components/properties/sections/ConstraintsSection.d.ts +7 -0
- package/dist/v2/components/properties/sections/LayoutDiagnostics.d.ts +7 -0
- package/dist/v2/components/sections/BlockInspector.d.ts +9 -0
- package/dist/v2/components/sections/FieldForm.d.ts +14 -0
- package/dist/v2/components/sections/ManagedChildNotice.d.ts +7 -0
- package/dist/v2/components/sections/SectionThumb.d.ts +11 -0
- package/dist/v2/components/sidebar/FlyoutDrawer.d.ts +2 -0
- package/dist/v2/components/sidebar/InsertPanel.d.ts +2 -0
- package/dist/v2/components/sidebar/LayersPanel.d.ts +2 -0
- package/dist/v2/components/sidebar/LibraryPanel.d.ts +3 -0
- package/dist/v2/components/sidebar/PagesPanel.d.ts +2 -0
- package/dist/v2/components/sidebar/SectionsPanel.d.ts +6 -0
- package/dist/v2/components/sidebar/SolPanel.d.ts +3 -0
- package/dist/v2/components/sidebar/TemplateChooser.d.ts +13 -0
- package/dist/v2/context/BlockContext.d.ts +7 -0
- package/dist/v2/context/EditorContext.d.ts +213 -0
- package/dist/v2/context/FrameContext.d.ts +3 -0
- package/dist/v2/context/ParentLayoutContext.d.ts +10 -0
- package/dist/v2/context/PlacementContext.d.ts +4 -0
- package/dist/v2/data/blankPage.d.ts +3 -0
- package/dist/v2/data/insertableComponents.d.ts +17 -0
- package/dist/v2/data/samplePageData.d.ts +3 -0
- package/dist/v2/design/audit.d.ts +78 -0
- package/dist/v2/design/baseline.d.ts +3 -0
- package/dist/v2/design/baselineData.d.ts +3 -0
- package/dist/v2/design/components.d.ts +9 -0
- package/dist/v2/design/css.d.ts +16 -0
- package/dist/v2/design/fonts.d.ts +10 -0
- package/dist/v2/design/index.d.ts +11 -0
- package/dist/v2/design/lint.d.ts +22 -0
- package/dist/v2/design/shades.d.ts +15 -0
- package/dist/v2/design/textStyles.d.ts +29 -0
- package/dist/v2/design/themes.d.ts +35 -0
- package/dist/v2/design/tokens.d.ts +24 -0
- package/dist/v2/design/types.d.ts +81 -0
- package/dist/v2/host/HostContext.d.ts +176 -0
- package/dist/v2/host/SolMark.d.ts +8 -0
- package/dist/v2/index.d.ts +19 -11
- package/dist/v2/migrate/legacy.d.ts +26 -0
- package/dist/v2/render/adapt.d.ts +12 -0
- package/dist/v2/render/anchors.d.ts +7 -0
- package/dist/v2/render/elementCss.d.ts +7 -0
- package/dist/v2/render/elementProps.d.ts +92 -0
- package/dist/v2/render/elements.d.ts +32 -0
- package/dist/v2/render/formAction.d.ts +33 -0
- package/dist/v2/render/frames.d.ts +10 -0
- package/dist/v2/render/iconSet.d.ts +5 -0
- package/dist/v2/render/ir.d.ts +20 -0
- package/dist/v2/render/nodeStyle.d.ts +24 -0
- package/dist/v2/render/placement.d.ts +12 -0
- package/dist/v2/render/resolve.d.ts +3 -0
- package/dist/v2/render/runtime.d.ts +18 -0
- package/dist/v2/render/sanitize.d.ts +15 -0
- package/dist/v2/render/socialIcons.d.ts +83 -0
- package/dist/v2/sections/catalog/about.d.ts +2 -0
- package/dist/v2/sections/catalog/announcement.d.ts +2 -0
- package/dist/v2/sections/catalog/contact.d.ts +2 -0
- package/dist/v2/sections/catalog/cta.d.ts +2 -0
- package/dist/v2/sections/catalog/faq.d.ts +2 -0
- package/dist/v2/sections/catalog/features.d.ts +2 -0
- package/dist/v2/sections/catalog/footer.d.ts +5 -0
- package/dist/v2/sections/catalog/gallery.d.ts +2 -0
- package/dist/v2/sections/catalog/header.d.ts +2 -0
- package/dist/v2/sections/catalog/hero.d.ts +2 -0
- package/dist/v2/sections/catalog/logos.d.ts +2 -0
- package/dist/v2/sections/catalog/pricing.d.ts +2 -0
- package/dist/v2/sections/catalog/stats.d.ts +2 -0
- package/dist/v2/sections/catalog/steps.d.ts +2 -0
- package/dist/v2/sections/catalog/team.d.ts +2 -0
- package/dist/v2/sections/catalog/testimonials.d.ts +2 -0
- package/dist/v2/sections/catalog/video.d.ts +2 -0
- package/dist/v2/sections/kit.d.ts +64 -0
- package/dist/v2/sections/materialize.d.ts +72 -0
- package/dist/v2/sections/names.d.ts +6 -0
- package/dist/v2/sections/pageTemplates.d.ts +52 -0
- package/dist/v2/sections/registry.d.ts +5 -0
- package/dist/v2/sections/types.d.ts +103 -0
- package/dist/v2/sol/catalogSchema.d.ts +43 -0
- package/dist/v2/sol/commands.d.ts +21 -0
- package/dist/v2/sol/describe.d.ts +32 -0
- package/dist/v2/sol/index.d.ts +7 -0
- package/dist/v2/sol/parse.d.ts +10 -0
- package/dist/v2/sol/prompt.d.ts +5 -0
- package/dist/v2/sol/schema.d.ts +177 -0
- package/dist/v2/sol/summarize.d.ts +4 -0
- package/dist/v2/strata/autoUpdate.d.ts +37 -0
- package/dist/v2/strata/client.d.ts +38 -0
- package/dist/v2/strata/index.d.ts +8 -0
- package/dist/v2/strata/merge.d.ts +27 -0
- package/dist/v2/strata/types.d.ts +115 -0
- package/dist/v2/types/editor.d.ts +175 -0
- package/dist/v2/utils/css.d.ts +3 -0
- package/dist/v2/utils/id.d.ts +3 -0
- package/dist/v2-compile.js +138 -7
- package/dist/v2-strata.js +2 -0
- package/dist/v2.js +11089 -8174
- package/package.json +6 -1
- package/dist/toReact-BBzjWoFG.js +0 -595
- package/dist/v2/ai/commands.d.ts +0 -616
- package/dist/v2/ai/dispatch.d.ts +0 -24
- package/dist/v2/ai/nodeSchema.d.ts +0 -196
- package/dist/v2/brand/BrandColorSwatches.d.ts +0 -4
- package/dist/v2/brand/BrandPanel.d.ts +0 -4
- package/dist/v2/brand/ChangeSetGallery.d.ts +0 -10
- package/dist/v2/brand/StyleSetEditor.d.ts +0 -22
- package/dist/v2/canvas/CatalogDragContext.d.ts +0 -27
- package/dist/v2/canvas/ContextMenuContext.d.ts +0 -16
- package/dist/v2/canvas/DeviceModeContext.d.ts +0 -20
- package/dist/v2/canvas/DragEngineContext.d.ts +0 -13
- package/dist/v2/canvas/LayoutGuideContext.d.ts +0 -22
- package/dist/v2/canvas/PreviewModeContext.d.ts +0 -15
- package/dist/v2/canvas/SidebarContext.d.ts +0 -21
- package/dist/v2/canvas/StylePainterContext.d.ts +0 -19
- package/dist/v2/canvas/WorkspaceThemeContext.d.ts +0 -19
- package/dist/v2/canvas/aiTextTransforms.d.ts +0 -24
- package/dist/v2/canvas/animationPresets.d.ts +0 -12
- package/dist/v2/canvas/constants.d.ts +0 -6
- package/dist/v2/canvas/layoutRoles.d.ts +0 -12
- package/dist/v2/canvas/modelRect.d.ts +0 -4
- package/dist/v2/canvas/rectMath.d.ts +0 -34
- package/dist/v2/canvas/reorderMath.d.ts +0 -8
- package/dist/v2/canvas/resizeMath.d.ts +0 -16
- package/dist/v2/canvas/resolveBoxStyle.d.ts +0 -12
- package/dist/v2/canvas/resolveTargetSection.d.ts +0 -10
- package/dist/v2/canvas/sectionDividerShapes.d.ts +0 -12
- package/dist/v2/canvas/snapping.d.ts +0 -28
- package/dist/v2/canvas/useAlignNode.d.ts +0 -10
- package/dist/v2/canvas/useClipboardKeyBinding.d.ts +0 -7
- package/dist/v2/canvas/useDeleteKeyBinding.d.ts +0 -3
- package/dist/v2/canvas/useDragEngine.d.ts +0 -44
- package/dist/v2/canvas/useDraggableNode.d.ts +0 -30
- package/dist/v2/canvas/useInlineTextEdit.d.ts +0 -29
- package/dist/v2/canvas/usePointerEngine.d.ts +0 -22
- package/dist/v2/canvas/useResizeHandle.d.ts +0 -12
- package/dist/v2/canvas/useResolvedTextStyles.d.ts +0 -13
- package/dist/v2/canvas/useSelectionRects.d.ts +0 -13
- package/dist/v2/canvas/useUndoRedoKeyBinding.d.ts +0 -8
- package/dist/v2/catalog/elementCatalog.d.ts +0 -31
- package/dist/v2/catalog/imagePreset.d.ts +0 -7
- package/dist/v2/compile/toReact.d.ts +0 -32
- package/dist/v2/components/AdornmentLayer.d.ts +0 -20
- package/dist/v2/components/AskSolPanel.d.ts +0 -25
- package/dist/v2/components/CatalogDragGhost.d.ts +0 -6
- package/dist/v2/components/CellBoundary.d.ts +0 -14
- package/dist/v2/components/CenterCanvas.d.ts +0 -3
- package/dist/v2/components/ContentTabPanel.d.ts +0 -12
- package/dist/v2/components/ContextMenu.d.ts +0 -5
- package/dist/v2/components/ContextualToolbar.d.ts +0 -25
- package/dist/v2/components/ImagesTabPanel.d.ts +0 -15
- package/dist/v2/components/LayoutGuidePanel.d.ts +0 -10
- package/dist/v2/components/ManageLayersPanel.d.ts +0 -13
- package/dist/v2/components/NodeRenderer.d.ts +0 -8
- package/dist/v2/components/PreviewOverlay.d.ts +0 -11
- package/dist/v2/components/ResizeHandle.d.ts +0 -6
- package/dist/v2/components/RightRail.d.ts +0 -13
- package/dist/v2/components/SectionDividerOverlay.d.ts +0 -8
- package/dist/v2/components/SectionEdgeAddZone.d.ts +0 -17
- package/dist/v2/components/SectionGridOverlay.d.ts +0 -10
- package/dist/v2/components/SectionNamePill.d.ts +0 -6
- package/dist/v2/components/SectionNode.d.ts +0 -5
- package/dist/v2/components/SectionSideRail.d.ts +0 -17
- package/dist/v2/components/SelectionToolbar.d.ts +0 -11
- package/dist/v2/components/StylePainterToast.d.ts +0 -5
- package/dist/v2/components/V2Canvas.d.ts +0 -59
- package/dist/v2/components/nodes/ButtonNode.d.ts +0 -4
- package/dist/v2/components/nodes/ContainerNode.d.ts +0 -11
- package/dist/v2/components/nodes/EmbedNode.d.ts +0 -4
- package/dist/v2/components/nodes/ImageNode.d.ts +0 -4
- package/dist/v2/components/nodes/InputNode.d.ts +0 -4
- package/dist/v2/components/nodes/MenuNode.d.ts +0 -18
- package/dist/v2/components/nodes/TextNode.d.ts +0 -4
- package/dist/v2/inspector/AiQuickEditPanel.d.ts +0 -12
- package/dist/v2/inspector/AnimationPanel.d.ts +0 -11
- package/dist/v2/inspector/DesignAccordions.d.ts +0 -7
- package/dist/v2/inspector/FieldRenderer.d.ts +0 -9
- package/dist/v2/inspector/IconPopoverButton.d.ts +0 -9
- package/dist/v2/inspector/MenuIconPanel.d.ts +0 -7
- package/dist/v2/inspector/MenuManagePanel.d.ts +0 -8
- package/dist/v2/inspector/Popover.d.ts +0 -21
- package/dist/v2/inspector/SectionDividerPanel.d.ts +0 -9
- package/dist/v2/inspector/fieldStyles.d.ts +0 -15
- package/dist/v2/inspector/fields/ColorField.d.ts +0 -7
- package/dist/v2/inspector/fields/NumberField.d.ts +0 -7
- package/dist/v2/inspector/fields/SelectField.d.ts +0 -7
- package/dist/v2/inspector/fields/TextField.d.ts +0 -7
- package/dist/v2/inspector/fields/TextStyleField.d.ts +0 -11
- package/dist/v2/inspector/fields/TextareaField.d.ts +0 -7
- package/dist/v2/inspector/schema.d.ts +0 -25
- package/dist/v2/inspector/useFieldCommit.d.ts +0 -12
- package/dist/v2/store/brandDefaults.d.ts +0 -4
- package/dist/v2/store/brandTypes.d.ts +0 -40
- package/dist/v2/store/cloneSubtree.d.ts +0 -12
- package/dist/v2/store/createBrandStore.d.ts +0 -2
- package/dist/v2/store/createCanvasStore.d.ts +0 -2
- package/dist/v2/store/seed.d.ts +0 -17
- package/dist/v2/store/types.d.ts +0 -163
- package/dist/v2/ui/theme.d.ts +0 -85
|
@@ -1,196 +0,0 @@
|
|
|
1
|
-
import { z } from 'zod';
|
|
2
|
-
export declare const SectionNodeSchema: z.ZodObject<{
|
|
3
|
-
id: z.ZodString;
|
|
4
|
-
parentId: z.ZodNullable<z.ZodString>;
|
|
5
|
-
children: z.ZodArray<z.ZodString>;
|
|
6
|
-
styles: z.ZodRecord<z.ZodString, z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>>;
|
|
7
|
-
type: z.ZodLiteral<"Section">;
|
|
8
|
-
props: z.ZodObject<{
|
|
9
|
-
name: z.ZodOptional<z.ZodString>;
|
|
10
|
-
}, z.core.$strip>;
|
|
11
|
-
}, z.core.$strip>;
|
|
12
|
-
export declare const TextNodeSchema: z.ZodObject<{
|
|
13
|
-
id: z.ZodString;
|
|
14
|
-
parentId: z.ZodNullable<z.ZodString>;
|
|
15
|
-
children: z.ZodArray<z.ZodString>;
|
|
16
|
-
styles: z.ZodRecord<z.ZodString, z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>>;
|
|
17
|
-
type: z.ZodLiteral<"Text">;
|
|
18
|
-
props: z.ZodObject<{
|
|
19
|
-
content: z.ZodString;
|
|
20
|
-
}, z.core.$strip>;
|
|
21
|
-
}, z.core.$strip>;
|
|
22
|
-
export declare const ImageNodeSchema: z.ZodObject<{
|
|
23
|
-
id: z.ZodString;
|
|
24
|
-
parentId: z.ZodNullable<z.ZodString>;
|
|
25
|
-
children: z.ZodArray<z.ZodString>;
|
|
26
|
-
styles: z.ZodRecord<z.ZodString, z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>>;
|
|
27
|
-
type: z.ZodLiteral<"Image">;
|
|
28
|
-
props: z.ZodObject<{
|
|
29
|
-
src: z.ZodString;
|
|
30
|
-
alt: z.ZodOptional<z.ZodString>;
|
|
31
|
-
}, z.core.$strip>;
|
|
32
|
-
}, z.core.$strip>;
|
|
33
|
-
export declare const ButtonNodeSchema: z.ZodObject<{
|
|
34
|
-
id: z.ZodString;
|
|
35
|
-
parentId: z.ZodNullable<z.ZodString>;
|
|
36
|
-
children: z.ZodArray<z.ZodString>;
|
|
37
|
-
styles: z.ZodRecord<z.ZodString, z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>>;
|
|
38
|
-
type: z.ZodLiteral<"Button">;
|
|
39
|
-
props: z.ZodObject<{
|
|
40
|
-
label: z.ZodString;
|
|
41
|
-
href: z.ZodOptional<z.ZodString>;
|
|
42
|
-
}, z.core.$strip>;
|
|
43
|
-
}, z.core.$strip>;
|
|
44
|
-
export declare const ContainerNodeSchema: z.ZodObject<{
|
|
45
|
-
id: z.ZodString;
|
|
46
|
-
parentId: z.ZodNullable<z.ZodString>;
|
|
47
|
-
children: z.ZodArray<z.ZodString>;
|
|
48
|
-
styles: z.ZodRecord<z.ZodString, z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>>;
|
|
49
|
-
type: z.ZodLiteral<"Container">;
|
|
50
|
-
props: z.ZodRecord<z.ZodString, z.ZodNever>;
|
|
51
|
-
}, z.core.$strip>;
|
|
52
|
-
export declare const InputNodeSchema: z.ZodObject<{
|
|
53
|
-
id: z.ZodString;
|
|
54
|
-
parentId: z.ZodNullable<z.ZodString>;
|
|
55
|
-
children: z.ZodArray<z.ZodString>;
|
|
56
|
-
styles: z.ZodRecord<z.ZodString, z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>>;
|
|
57
|
-
type: z.ZodLiteral<"Input">;
|
|
58
|
-
props: z.ZodObject<{
|
|
59
|
-
label: z.ZodString;
|
|
60
|
-
placeholder: z.ZodOptional<z.ZodString>;
|
|
61
|
-
fieldType: z.ZodEnum<{
|
|
62
|
-
text: "text";
|
|
63
|
-
textarea: "textarea";
|
|
64
|
-
email: "email";
|
|
65
|
-
tel: "tel";
|
|
66
|
-
}>;
|
|
67
|
-
required: z.ZodOptional<z.ZodBoolean>;
|
|
68
|
-
}, z.core.$strip>;
|
|
69
|
-
}, z.core.$strip>;
|
|
70
|
-
export declare const EmbedNodeSchema: z.ZodObject<{
|
|
71
|
-
id: z.ZodString;
|
|
72
|
-
parentId: z.ZodNullable<z.ZodString>;
|
|
73
|
-
children: z.ZodArray<z.ZodString>;
|
|
74
|
-
styles: z.ZodRecord<z.ZodString, z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>>;
|
|
75
|
-
type: z.ZodLiteral<"Embed">;
|
|
76
|
-
props: z.ZodObject<{
|
|
77
|
-
kind: z.ZodEnum<{
|
|
78
|
-
video: "video";
|
|
79
|
-
html: "html";
|
|
80
|
-
}>;
|
|
81
|
-
url: z.ZodOptional<z.ZodString>;
|
|
82
|
-
html: z.ZodOptional<z.ZodString>;
|
|
83
|
-
coverImage: z.ZodOptional<z.ZodString>;
|
|
84
|
-
}, z.core.$strip>;
|
|
85
|
-
}, z.core.$strip>;
|
|
86
|
-
export declare const MenuNodeSchema: z.ZodObject<{
|
|
87
|
-
id: z.ZodString;
|
|
88
|
-
parentId: z.ZodNullable<z.ZodString>;
|
|
89
|
-
children: z.ZodArray<z.ZodString>;
|
|
90
|
-
styles: z.ZodRecord<z.ZodString, z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>>;
|
|
91
|
-
type: z.ZodLiteral<"Menu">;
|
|
92
|
-
props: z.ZodObject<{
|
|
93
|
-
links: z.ZodArray<z.ZodObject<{
|
|
94
|
-
label: z.ZodString;
|
|
95
|
-
href: z.ZodString;
|
|
96
|
-
}, z.core.$strip>>;
|
|
97
|
-
layout: z.ZodEnum<{
|
|
98
|
-
horizontal: "horizontal";
|
|
99
|
-
vertical: "vertical";
|
|
100
|
-
}>;
|
|
101
|
-
}, z.core.$strip>;
|
|
102
|
-
}, z.core.$strip>;
|
|
103
|
-
export declare const PlexoNodeSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
104
|
-
id: z.ZodString;
|
|
105
|
-
parentId: z.ZodNullable<z.ZodString>;
|
|
106
|
-
children: z.ZodArray<z.ZodString>;
|
|
107
|
-
styles: z.ZodRecord<z.ZodString, z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>>;
|
|
108
|
-
type: z.ZodLiteral<"Section">;
|
|
109
|
-
props: z.ZodObject<{
|
|
110
|
-
name: z.ZodOptional<z.ZodString>;
|
|
111
|
-
}, z.core.$strip>;
|
|
112
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
113
|
-
id: z.ZodString;
|
|
114
|
-
parentId: z.ZodNullable<z.ZodString>;
|
|
115
|
-
children: z.ZodArray<z.ZodString>;
|
|
116
|
-
styles: z.ZodRecord<z.ZodString, z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>>;
|
|
117
|
-
type: z.ZodLiteral<"Text">;
|
|
118
|
-
props: z.ZodObject<{
|
|
119
|
-
content: z.ZodString;
|
|
120
|
-
}, z.core.$strip>;
|
|
121
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
122
|
-
id: z.ZodString;
|
|
123
|
-
parentId: z.ZodNullable<z.ZodString>;
|
|
124
|
-
children: z.ZodArray<z.ZodString>;
|
|
125
|
-
styles: z.ZodRecord<z.ZodString, z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>>;
|
|
126
|
-
type: z.ZodLiteral<"Image">;
|
|
127
|
-
props: z.ZodObject<{
|
|
128
|
-
src: z.ZodString;
|
|
129
|
-
alt: z.ZodOptional<z.ZodString>;
|
|
130
|
-
}, z.core.$strip>;
|
|
131
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
132
|
-
id: z.ZodString;
|
|
133
|
-
parentId: z.ZodNullable<z.ZodString>;
|
|
134
|
-
children: z.ZodArray<z.ZodString>;
|
|
135
|
-
styles: z.ZodRecord<z.ZodString, z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>>;
|
|
136
|
-
type: z.ZodLiteral<"Button">;
|
|
137
|
-
props: z.ZodObject<{
|
|
138
|
-
label: z.ZodString;
|
|
139
|
-
href: z.ZodOptional<z.ZodString>;
|
|
140
|
-
}, z.core.$strip>;
|
|
141
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
142
|
-
id: z.ZodString;
|
|
143
|
-
parentId: z.ZodNullable<z.ZodString>;
|
|
144
|
-
children: z.ZodArray<z.ZodString>;
|
|
145
|
-
styles: z.ZodRecord<z.ZodString, z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>>;
|
|
146
|
-
type: z.ZodLiteral<"Container">;
|
|
147
|
-
props: z.ZodRecord<z.ZodString, z.ZodNever>;
|
|
148
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
149
|
-
id: z.ZodString;
|
|
150
|
-
parentId: z.ZodNullable<z.ZodString>;
|
|
151
|
-
children: z.ZodArray<z.ZodString>;
|
|
152
|
-
styles: z.ZodRecord<z.ZodString, z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>>;
|
|
153
|
-
type: z.ZodLiteral<"Input">;
|
|
154
|
-
props: z.ZodObject<{
|
|
155
|
-
label: z.ZodString;
|
|
156
|
-
placeholder: z.ZodOptional<z.ZodString>;
|
|
157
|
-
fieldType: z.ZodEnum<{
|
|
158
|
-
text: "text";
|
|
159
|
-
textarea: "textarea";
|
|
160
|
-
email: "email";
|
|
161
|
-
tel: "tel";
|
|
162
|
-
}>;
|
|
163
|
-
required: z.ZodOptional<z.ZodBoolean>;
|
|
164
|
-
}, z.core.$strip>;
|
|
165
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
166
|
-
id: z.ZodString;
|
|
167
|
-
parentId: z.ZodNullable<z.ZodString>;
|
|
168
|
-
children: z.ZodArray<z.ZodString>;
|
|
169
|
-
styles: z.ZodRecord<z.ZodString, z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>>;
|
|
170
|
-
type: z.ZodLiteral<"Embed">;
|
|
171
|
-
props: z.ZodObject<{
|
|
172
|
-
kind: z.ZodEnum<{
|
|
173
|
-
video: "video";
|
|
174
|
-
html: "html";
|
|
175
|
-
}>;
|
|
176
|
-
url: z.ZodOptional<z.ZodString>;
|
|
177
|
-
html: z.ZodOptional<z.ZodString>;
|
|
178
|
-
coverImage: z.ZodOptional<z.ZodString>;
|
|
179
|
-
}, z.core.$strip>;
|
|
180
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
181
|
-
id: z.ZodString;
|
|
182
|
-
parentId: z.ZodNullable<z.ZodString>;
|
|
183
|
-
children: z.ZodArray<z.ZodString>;
|
|
184
|
-
styles: z.ZodRecord<z.ZodString, z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>>;
|
|
185
|
-
type: z.ZodLiteral<"Menu">;
|
|
186
|
-
props: z.ZodObject<{
|
|
187
|
-
links: z.ZodArray<z.ZodObject<{
|
|
188
|
-
label: z.ZodString;
|
|
189
|
-
href: z.ZodString;
|
|
190
|
-
}, z.core.$strip>>;
|
|
191
|
-
layout: z.ZodEnum<{
|
|
192
|
-
horizontal: "horizontal";
|
|
193
|
-
vertical: "vertical";
|
|
194
|
-
}>;
|
|
195
|
-
}, z.core.$strip>;
|
|
196
|
-
}, z.core.$strip>], "type">;
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import type { StyleSet } from '../store/brandTypes';
|
|
3
|
-
/** Reusable "wholesale style swap" gallery — the same interaction for Buttons, Boxes,
|
|
4
|
-
* and (later) Text/Lines: pick a whole pre-made set, not a single property. */
|
|
5
|
-
export declare const ChangeSetGallery: React.FC<{
|
|
6
|
-
sets: StyleSet[];
|
|
7
|
-
activeId: string;
|
|
8
|
-
onSelect: (id: string) => void;
|
|
9
|
-
renderPreview: (set: StyleSet) => React.ReactNode;
|
|
10
|
-
}>;
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import type { StyleSet } from '../store/brandTypes';
|
|
3
|
-
/**
|
|
4
|
-
* The Buttons/Boxes half of the Brand Kit: a "Change Set" gallery to swap the whole
|
|
5
|
-
* style language, plus the active set's named slots (Primary/Secondary/… or Box 1/Box
|
|
6
|
-
* 2/…) each independently editable. Same three-part pattern the reference shows for
|
|
7
|
-
* every brand category (set gallery + named slots + a place to store custom variants —
|
|
8
|
-
* "Saved [buttons/boxes]" lands as a later enhancement once slots can be duplicated).
|
|
9
|
-
*/
|
|
10
|
-
type SlotUpdater = (patch: Record<string, string | number>) => void;
|
|
11
|
-
export declare const StyleSetEditor: React.FC<{
|
|
12
|
-
sets: StyleSet[];
|
|
13
|
-
activeId: string;
|
|
14
|
-
onSelectSet: (id: string) => void;
|
|
15
|
-
onUpdateSlot: (setId: string, slotId: string, patch: Record<string, string | number>) => void;
|
|
16
|
-
renderSetPreview: (set: StyleSet) => React.ReactNode;
|
|
17
|
-
renderSlotPreview: (slot: StyleSet['slots'][number]) => React.ReactNode;
|
|
18
|
-
/** Defaults to a background-color + corner-radius pair (Buttons/Boxes); pass this to
|
|
19
|
-
* edit different fields (e.g. Text Styles' font size/weight). */
|
|
20
|
-
renderSlotEditor?: (slot: StyleSet['slots'][number], update: SlotUpdater) => React.ReactNode;
|
|
21
|
-
}>;
|
|
22
|
-
export {};
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import type { ElementPreset } from '../catalog/elementCatalog';
|
|
3
|
-
interface CatalogDragState {
|
|
4
|
-
preset: ElementPreset | null;
|
|
5
|
-
clientX: number;
|
|
6
|
-
clientY: number;
|
|
7
|
-
hoveredSectionId: string | null;
|
|
8
|
-
}
|
|
9
|
-
interface CatalogDragValue {
|
|
10
|
-
state: CatalogDragState;
|
|
11
|
-
/** Call from a preset tile's own onPointerDown. Does nothing visible until the
|
|
12
|
-
* pointer actually moves past a small threshold — short of that, an ordinary click
|
|
13
|
-
* on the tile still fires its own onClick (tap-to-add at the end of the page), so
|
|
14
|
-
* drag and tap coexist on the same tile without one stealing the other's gesture. */
|
|
15
|
-
armDrag: (preset: ElementPreset, e: React.PointerEvent) => void;
|
|
16
|
-
}
|
|
17
|
-
/**
|
|
18
|
-
* Real drag-and-drop from the Content tab onto the canvas — pick up a catalog preset,
|
|
19
|
-
* drop it into whichever section is under the pointer, positioned where you dropped it.
|
|
20
|
-
* Ephemeral UI-mode state, same pattern as ContextMenuContext/StylePainterContext/etc.
|
|
21
|
-
* Lives above both the sidebar (the drag source) and CenterCanvas (the drop target).
|
|
22
|
-
*/
|
|
23
|
-
export declare const CatalogDragProvider: React.FC<{
|
|
24
|
-
children: React.ReactNode;
|
|
25
|
-
}>;
|
|
26
|
-
export declare function useCatalogDrag(): CatalogDragValue;
|
|
27
|
-
export {};
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
export interface ContextMenuTarget {
|
|
3
|
-
nodeId: string;
|
|
4
|
-
x: number;
|
|
5
|
-
y: number;
|
|
6
|
-
}
|
|
7
|
-
interface ContextMenuContextValue {
|
|
8
|
-
target: ContextMenuTarget | null;
|
|
9
|
-
open: (nodeId: string, x: number, y: number) => void;
|
|
10
|
-
close: () => void;
|
|
11
|
-
}
|
|
12
|
-
export declare const ContextMenuProvider: React.FC<{
|
|
13
|
-
children: React.ReactNode;
|
|
14
|
-
}>;
|
|
15
|
-
export declare function useContextMenu(): ContextMenuContextValue;
|
|
16
|
-
export {};
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
export type DeviceMode = 'desktop' | 'mobile';
|
|
3
|
-
interface DeviceModeValue {
|
|
4
|
-
mode: DeviceMode;
|
|
5
|
-
setMode: (m: DeviceMode) => void;
|
|
6
|
-
}
|
|
7
|
-
/** The canvas's current device-preview mode (desktop/mobile — the top bar's device
|
|
8
|
-
* switch), owned here (not CenterCanvas's own local state) so the switch itself — in
|
|
9
|
-
* the top toolbar, a sibling of CenterCanvas — can control it, and so any node whose
|
|
10
|
-
* *rendering itself* needs to change per device (a `Menu` node collapsing into a
|
|
11
|
-
* hamburger on mobile) can read it no matter how deep it sits in the tree. Provided
|
|
12
|
-
* with a sensible default at module scope so a node rendered outside the provider
|
|
13
|
-
* (e.g. PreviewOverlay, which has its own explicit width slider instead) still gets a
|
|
14
|
-
* safe 'desktop' read rather than needing its own guard. */
|
|
15
|
-
export declare const DeviceModeProvider: React.FC<{
|
|
16
|
-
children: React.ReactNode;
|
|
17
|
-
}>;
|
|
18
|
-
export declare function useDeviceMode(): DeviceMode;
|
|
19
|
-
export declare function useDeviceModeControl(): DeviceModeValue;
|
|
20
|
-
export {};
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
export interface DragEngineContextValue {
|
|
3
|
-
startDrag: (id: string, e: {
|
|
4
|
-
clientX: number;
|
|
5
|
-
clientY: number;
|
|
6
|
-
}) => void;
|
|
7
|
-
}
|
|
8
|
-
export declare const DragEngineProvider: React.FC<{
|
|
9
|
-
value: DragEngineContextValue;
|
|
10
|
-
children: React.ReactNode;
|
|
11
|
-
}>;
|
|
12
|
-
/** Every draggable node (Text/Image/Button/Container, not Section) calls this on pointerdown. */
|
|
13
|
-
export declare function useDragEngineContext(): DragEngineContextValue;
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
export type GuideType = 'none' | 'columns' | 'blocks' | 'dots';
|
|
3
|
-
export type GuideVisibility = 'always' | 'drag';
|
|
4
|
-
interface LayoutGuideValue {
|
|
5
|
-
guideType: GuideType;
|
|
6
|
-
guideVisibility: GuideVisibility;
|
|
7
|
-
setGuideType: (t: GuideType) => void;
|
|
8
|
-
setGuideVisibility: (v: GuideVisibility) => void;
|
|
9
|
-
/** True whenever a pointer is held down anywhere on the canvas — the practical proxy
|
|
10
|
-
* for "a drag is happening" used by "Show guides: On drag only", without threading
|
|
11
|
-
* the move/resize drag engines' own local state through every Section. */
|
|
12
|
-
isPointerDown: boolean;
|
|
13
|
-
}
|
|
14
|
-
/** Editor-chrome preference (like ContextMenu/StylePainter's own ephemeral UI state) —
|
|
15
|
-
* not part of the document, so it doesn't touch undo history or get persisted with the
|
|
16
|
-
* page. Matches the reference's "Layout Guides" panel: None/Columns/Blocks/Dots, shown
|
|
17
|
-
* Always or only while dragging. */
|
|
18
|
-
export declare const LayoutGuideProvider: React.FC<{
|
|
19
|
-
children: React.ReactNode;
|
|
20
|
-
}>;
|
|
21
|
-
export declare function useLayoutGuide(): LayoutGuideValue;
|
|
22
|
-
export {};
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
interface PreviewModeValue {
|
|
3
|
-
active: boolean;
|
|
4
|
-
toggle: () => void;
|
|
5
|
-
exit: () => void;
|
|
6
|
-
}
|
|
7
|
-
/** Distraction-free preview: hides every piece of editor chrome (toolbars, rails, the
|
|
8
|
-
* Ask SOL panel, selection/resize adornments, section hover affordances) so what's left
|
|
9
|
-
* is exactly what a visitor would see. Ephemeral UI state, same pattern as
|
|
10
|
-
* ContextMenuContext/StylePainterContext/AskSolContext — not part of the document. */
|
|
11
|
-
export declare const PreviewModeProvider: React.FC<{
|
|
12
|
-
children: React.ReactNode;
|
|
13
|
-
}>;
|
|
14
|
-
export declare function usePreviewMode(): PreviewModeValue;
|
|
15
|
-
export {};
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
export type SidebarTab = 'content' | 'sol' | 'images' | 'layers' | 'guides' | 'brand' | null;
|
|
3
|
-
interface SidebarValue {
|
|
4
|
-
activeTab: SidebarTab;
|
|
5
|
-
/** Set once by openTab's optional second argument, read (and cleared) by
|
|
6
|
-
* ContentTabPanel — lets a control outside the sidebar (e.g. Menu's "Explore
|
|
7
|
-
* Designs") jump the Content tab straight to a specific category. */
|
|
8
|
-
pendingCategory: string | null;
|
|
9
|
-
openTab: (tab: Exclude<SidebarTab, null>, category?: string) => void;
|
|
10
|
-
closeTab: () => void;
|
|
11
|
-
consumePendingCategory: () => void;
|
|
12
|
-
}
|
|
13
|
-
/** Which sidebar tab (Content/Layers/Layout Guides/Brand) is open — lifted above
|
|
14
|
-
* LeftRail so other chrome (ContextualToolbar's "Explore Designs") can open a
|
|
15
|
-
* specific tab/category without owning the sidebar's own state. Ephemeral UI mode,
|
|
16
|
-
* same pattern as ContextMenuContext/StylePainterContext/etc. */
|
|
17
|
-
export declare const SidebarProvider: React.FC<{
|
|
18
|
-
children: React.ReactNode;
|
|
19
|
-
}>;
|
|
20
|
-
export declare function useSidebar(): SidebarValue;
|
|
21
|
-
export {};
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
interface StylePainterValue {
|
|
3
|
-
isPainting: boolean;
|
|
4
|
-
copyStyle: (nodeId: string) => void;
|
|
5
|
-
applyTo: (nodeId: string) => void;
|
|
6
|
-
cancel: () => void;
|
|
7
|
-
}
|
|
8
|
-
/**
|
|
9
|
-
* Wix/Figma-style "format painter": Copy style on a node, then the next click on any
|
|
10
|
-
* other node applies that node's visual styles to it (one commit, one undo step) —
|
|
11
|
-
* matching the "Copy style" context-menu item shown in the reference. Lives as its own
|
|
12
|
-
* ephemeral UI-mode context (like ContextMenuContext) rather than in the canvas store,
|
|
13
|
-
* since "currently painting" isn't part of the document.
|
|
14
|
-
*/
|
|
15
|
-
export declare const StylePainterProvider: React.FC<{
|
|
16
|
-
children: React.ReactNode;
|
|
17
|
-
}>;
|
|
18
|
-
export declare function useStylePainter(): StylePainterValue;
|
|
19
|
-
export {};
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
interface WorkspaceThemeValue {
|
|
3
|
-
dark: boolean;
|
|
4
|
-
toggle: () => void;
|
|
5
|
-
}
|
|
6
|
-
/**
|
|
7
|
-
* Light/dark toggle for the whole editor chrome — RightRail, its tabs and their
|
|
8
|
-
* active states, the top toolbar, every popover — plus the canvas workspace backdrop
|
|
9
|
-
* (the checkered artboard area behind the page card, see CenterCanvas.tsx). `ui/theme.
|
|
10
|
-
* ts`'s `color` tokens resolve through `var(--plexo-*)` custom properties; this
|
|
11
|
-
* provider is what actually sets those variables (via `getThemeStyle()`) on a root
|
|
12
|
-
* element, so every component that already reads `color.bg`/`color.text`/etc. becomes
|
|
13
|
-
* theme-reactive automatically, with no per-component changes needed.
|
|
14
|
-
*/
|
|
15
|
-
export declare const WorkspaceThemeProvider: React.FC<{
|
|
16
|
-
children: React.ReactNode;
|
|
17
|
-
}>;
|
|
18
|
-
export declare function useWorkspaceTheme(): WorkspaceThemeValue;
|
|
19
|
-
export {};
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Deterministic, local text transforms backing Ask SOL's "Quick actions" on a Text
|
|
3
|
-
* node — genuinely applied to the node's real content (not a chat reply describing
|
|
4
|
-
* what to do), but honestly just heuristic string manipulation, not a real model call.
|
|
5
|
-
* Framed in the UI as "Quick edit", not "AI rewrite", for exactly that reason — see
|
|
6
|
-
* AskSolPanel.tsx's QUICK_ACTIONS. Pure and exported so they're unit-testable without
|
|
7
|
-
* mounting the panel.
|
|
8
|
-
*/
|
|
9
|
-
declare const TONE_TEMPLATES: {
|
|
10
|
-
readonly friendly: (s: string) => string;
|
|
11
|
-
readonly professional: (s: string) => string;
|
|
12
|
-
readonly playful: (s: string) => string;
|
|
13
|
-
};
|
|
14
|
-
export type ToneKey = keyof typeof TONE_TEMPLATES;
|
|
15
|
-
/** 2-3 shortened variants, each a genuinely different cut (first clause, first N words,
|
|
16
|
-
* first sentence) rather than the same truncation three times. */
|
|
17
|
-
export declare function shortenVariants(text: string): string[];
|
|
18
|
-
/** 2-3 lengthened variants, each appending a different plausible closing clause. */
|
|
19
|
-
export declare function lengthenVariants(text: string): string[];
|
|
20
|
-
/** One cleaned-up variant: trims whitespace, fixes casing, ensures terminal punctuation. */
|
|
21
|
-
export declare function grammarFixVariants(text: string): string[];
|
|
22
|
-
/** One variant per requested tone. */
|
|
23
|
-
export declare function toneVariants(text: string, tones: ToneKey[]): string[];
|
|
24
|
-
export {};
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
export type AnimationType = 'none' | 'fade' | 'slideUp' | 'slideDown' | 'slideLeft' | 'slideRight' | 'zoom';
|
|
2
|
-
export type AnimationIntensity = 'gentle' | 'moderate' | 'intense';
|
|
3
|
-
/**
|
|
4
|
-
* Real Web Animations API keyframes (not a CSS class toggle) — played imperatively via
|
|
5
|
-
* `element.animate()` so "Preview" can replay on demand without needing a re-mount or a
|
|
6
|
-
* key-change hack. `null` for 'none' means "nothing to play," not "play a no-op."
|
|
7
|
-
*/
|
|
8
|
-
export declare function getAnimationKeyframes(type: AnimationType, intensity: AnimationIntensity): {
|
|
9
|
-
keyframes: Keyframe[];
|
|
10
|
-
options: KeyframeAnimationOptions;
|
|
11
|
-
} | null;
|
|
12
|
-
export declare const ANIMATION_TYPE_LABELS: Record<AnimationType, string>;
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Deliberately distinct from V1's `data-plexo-id` (used by src/components/editor/frame/*
|
|
3
|
-
* for compiled-HTML overlays) even though the two never mount at once in the playground —
|
|
4
|
-
* keeps grep/DOM-query results unambiguous about which engine a hit belongs to.
|
|
5
|
-
*/
|
|
6
|
-
export declare const V2_NODE_ID_ATTR = "data-plexo-v2-id";
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import type { PlexoNode, PlexoNodeType } from '../store/types';
|
|
2
|
-
/** A Container is only a full-bleed "row" (spanning its section edge-to-edge like a Wix
|
|
3
|
-
* Strip, x/width ignored) when it's explicitly marked `styles.containerRole === 'row'`
|
|
4
|
-
* — set by the "Cell row" seed/preset builders (rowContainer() in elementCatalog.tsx,
|
|
5
|
-
* the seed fixture). Any other Container parented directly to a Section (a "Box"/
|
|
6
|
-
* "Card"/"Divider" preset, or a freeform box the user just drew) keeps its own x/y/
|
|
7
|
-
* width/height — the two used to be conflated (any Container-child-of-Section was
|
|
8
|
-
* forced full-bleed), which silently broke every non-row Container preset by
|
|
9
|
-
* stretching it to the full section width and ignoring its intended position/size. A
|
|
10
|
-
* nested Container (a "cell" living inside a row) is unaffected either way — it always
|
|
11
|
-
* gets ordinary flex-item sizing from its row parent regardless of this flag. */
|
|
12
|
-
export declare function isFullBleedRow(nodeType: PlexoNodeType | undefined, parentType: PlexoNodeType | undefined, styles?: PlexoNode['styles']): boolean;
|
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
/** Minimal subset of DOMRect actually needed — keeps the math testable without a real DOM. */
|
|
2
|
-
export interface RectLike {
|
|
3
|
-
left: number;
|
|
4
|
-
top: number;
|
|
5
|
-
width: number;
|
|
6
|
-
height: number;
|
|
7
|
-
}
|
|
8
|
-
/**
|
|
9
|
-
* Converts a node's viewport-relative rect into one relative to its canvas container.
|
|
10
|
-
* `getBoundingClientRect()` is always viewport-relative regardless of scroll position, so
|
|
11
|
-
* subtracting the container's own viewport-relative rect yields a value that already
|
|
12
|
-
* accounts for the container's current scroll offset with no manual scrollTop math —
|
|
13
|
-
* this is why the caller only needs to re-run this on scroll/resize, not track scroll
|
|
14
|
-
* position itself.
|
|
15
|
-
*/
|
|
16
|
-
export declare function toRelativeRect(nodeRect: RectLike, containerRect: RectLike): RectLike;
|
|
17
|
-
declare const HANDLE_SIZE = 7;
|
|
18
|
-
export type HandleKey = 'n' | 's' | 'e' | 'w' | 'nw' | 'ne' | 'sw' | 'se';
|
|
19
|
-
export interface HandlePosition {
|
|
20
|
-
key: HandleKey;
|
|
21
|
-
left: number;
|
|
22
|
-
top: number;
|
|
23
|
-
/** 'nwse' / 'nesw' corners resize both axes; 'ns' / 'ew' edges resize one axis only —
|
|
24
|
-
* Phase 3 uses this to decide which axis (or both) a given handle drag should affect,
|
|
25
|
-
* and it doubles as the CSS cursor family for that handle today. */
|
|
26
|
-
axis: 'both' | 'ns' | 'ew';
|
|
27
|
-
}
|
|
28
|
-
/**
|
|
29
|
-
* The 8 standard Figma/Wix resize handles — 4 corners (free resize) plus 4 edge
|
|
30
|
-
* midpoints (single-axis resize, e.g. dragging the left/right edge of a text box to
|
|
31
|
-
* change its width only) — in the same coordinate space as `rect`.
|
|
32
|
-
*/
|
|
33
|
-
export declare function getResizeHandlePositions(rect: RectLike): HandlePosition[];
|
|
34
|
-
export { HANDLE_SIZE };
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
export type ZOrderDirection = 'forward' | 'backward' | 'front' | 'back';
|
|
2
|
-
/**
|
|
3
|
-
* Pure list reorder for z-order commands — operates on whichever list actually holds
|
|
4
|
-
* the id (a Section's `pageOrder`, or a non-Section node's parent.children). Returns
|
|
5
|
-
* null when the move is a no-op (already at that extreme), mirroring
|
|
6
|
-
* moveSectionUp/Down's boundary behavior so callers can skip an empty history commit.
|
|
7
|
-
*/
|
|
8
|
-
export declare function reorderInList(list: string[], id: string, direction: ZOrderDirection): string[] | null;
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import type { ModelRect } from './snapping';
|
|
2
|
-
import type { HandleKey } from './rectMath';
|
|
3
|
-
/**
|
|
4
|
-
* Given the node's rect at drag-start and the raw pointer delta since then, returns the
|
|
5
|
-
* patch to apply. Corners resize both axes and reposition x/y as needed (dragging the
|
|
6
|
-
* top-left corner right+down shrinks the box while sliding its origin); edges resize a
|
|
7
|
-
* single axis. Clamped to MIN_SIZE so a fast drag can't collapse a node to nothing or
|
|
8
|
-
* flip it inside-out.
|
|
9
|
-
*/
|
|
10
|
-
export declare function computeResizePatch(handleKey: HandleKey, origin: ModelRect, dx: number, dy: number): Partial<Record<'x' | 'y' | 'width' | 'height', number>>;
|
|
11
|
-
/** Sections only resize vertically (they don't have a movable x/y — see AdornmentLayer),
|
|
12
|
-
* and only ever from the bottom edge: there's no y-coordinate for the top of a section
|
|
13
|
-
* to reposition against, unlike a freeform leaf/container node. */
|
|
14
|
-
export declare function computeSectionHeightPatch(originHeight: number, dy: number): {
|
|
15
|
-
height: number;
|
|
16
|
-
};
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import type React from 'react';
|
|
2
|
-
import type { PlexoNode } from '../store/types';
|
|
3
|
-
export declare const SHADOW_PRESETS: Record<string, string>;
|
|
4
|
-
export declare const SHADOW_PRESET_OPTIONS: readonly ["none", "sm", "md", "lg"];
|
|
5
|
-
export declare const BORDER_STYLE_OPTIONS: readonly ["solid", "dashed", "dotted"];
|
|
6
|
-
/**
|
|
7
|
-
* Real Borders / Corners / Shadow support, shared by every leaf node component instead
|
|
8
|
-
* of each one reinventing its own subset — backs the Design popover's three accordion
|
|
9
|
-
* sections (see DesignAccordions.tsx). Reads the same loose `styles` bag every other
|
|
10
|
-
* style field already uses, so no schema change was needed to add this.
|
|
11
|
-
*/
|
|
12
|
-
export declare function resolveBoxStyle(styles: PlexoNode['styles']): React.CSSProperties;
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
/** Where a tap-to-add item lands: the nearest Cell if the current selection is a cell
|
|
2
|
-
* or something living inside one (so it becomes a flex-item child of that cell, not
|
|
3
|
-
* an absolutely-positioned sibling stacked on top of the row — the two used to be
|
|
4
|
-
* conflated, which silently overlapped newly-added elements on top of a Cells row and
|
|
5
|
-
* made whichever one was selected impossible to click), else the Section the
|
|
6
|
-
* selection lives under, else the last section on the page, else a freshly-inserted
|
|
7
|
-
* blank one. Dragging an item instead lands exactly where dropped (see
|
|
8
|
-
* CatalogDragContext). Shared by every "tap to add" surface — the Content tab, the
|
|
9
|
-
* Images gallery. */
|
|
10
|
-
export declare function resolveTargetParentId(): string;
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
export type DividerShape = 'none' | 'ellipse' | 'tilt' | 'liquid' | 'leftWave' | 'paintScribble' | 'invertedEllipse';
|
|
2
|
-
export type DividerPlacement = 'top' | 'bottom';
|
|
3
|
-
/** One SVG path per shape, in a fixed 1200x120 viewBox scaled with
|
|
4
|
-
* `preserveAspectRatio="none"` to fill the section's full width — the standard
|
|
5
|
-
* approach for CSS/SVG "shape dividers". Approximations of the named shapes, not
|
|
6
|
-
* pixel-matches for a specific reference, but each one is visually distinct and
|
|
7
|
-
* recognizable as what its name says. */
|
|
8
|
-
export declare const DIVIDER_PATHS: Record<Exclude<DividerShape, 'none'>, string>;
|
|
9
|
-
export declare const DIVIDER_OPTIONS: Array<{
|
|
10
|
-
shape: DividerShape;
|
|
11
|
-
label: string;
|
|
12
|
-
}>;
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
export interface ModelRect {
|
|
2
|
-
x: number;
|
|
3
|
-
y: number;
|
|
4
|
-
width: number;
|
|
5
|
-
height: number;
|
|
6
|
-
}
|
|
7
|
-
export interface GuideLine {
|
|
8
|
-
orientation: 'vertical' | 'horizontal';
|
|
9
|
-
/** The x (vertical guide) or y (horizontal guide) position, in the same model space as ModelRect. */
|
|
10
|
-
position: number;
|
|
11
|
-
/** Span of the guide line, along the perpendicular axis. */
|
|
12
|
-
start: number;
|
|
13
|
-
end: number;
|
|
14
|
-
}
|
|
15
|
-
export interface SnapResult {
|
|
16
|
-
x: number;
|
|
17
|
-
y: number;
|
|
18
|
-
guides: GuideLine[];
|
|
19
|
-
}
|
|
20
|
-
/** How close (in model-space px) an edge/center needs to be to a sibling's before it snaps. */
|
|
21
|
-
export declare const SNAP_THRESHOLD = 5;
|
|
22
|
-
/**
|
|
23
|
-
* Compares the dragged node's candidate position against every sibling's edges/centers.
|
|
24
|
-
* The first sibling edge within SNAP_THRESHOLD on a given axis wins and overrides the
|
|
25
|
-
* mouse coordinate on that axis (the "Gravity Threshold" from the spec) — axes are
|
|
26
|
-
* independent, so a drag can snap horizontally without snapping vertically or vice versa.
|
|
27
|
-
*/
|
|
28
|
-
export declare function findSnap(candidate: ModelRect, siblings: ModelRect[], threshold?: number): SnapResult;
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import type { AlignDirection } from '../store/types';
|
|
2
|
-
/**
|
|
3
|
-
* Aligns a node relative to its parent's bounds. Sections don't store an explicit pixel
|
|
4
|
-
* width (they're 100%-wide by design), so there's no model-space value to align a
|
|
5
|
-
* Section's own children against — this reads the parent's *rendered* size via the DOM
|
|
6
|
-
* instead (querying by V2_NODE_ID_ATTR, the same identity attribute the rest of the
|
|
7
|
-
* canvas measurement code uses). Since the canvas has no zoom/scale applied, a DOM
|
|
8
|
-
* pixel is a model-space pixel, so this is exact, not an approximation.
|
|
9
|
-
*/
|
|
10
|
-
export declare function useAlignNode(): (id: string, direction: AlignDirection) => void;
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Cmd/Ctrl+X/C/V/D on the current selection — matching the shortcut hints shown in the
|
|
3
|
-
* right-click menu (see ContextMenu.tsx). Skipped while focus is inside an editable
|
|
4
|
-
* Inspector field for the same reason as undo/redo: the browser's own cut/copy/paste on
|
|
5
|
-
* text input should win there, not a whole-node clipboard op.
|
|
6
|
-
*/
|
|
7
|
-
export declare function useClipboardKeyBinding(): void;
|