@charisol/plexo-sdk 1.4.42 → 2.0.1
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-71dHsiAM.js +16088 -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 +2 -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/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 +10993 -8186
- 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,44 +0,0 @@
|
|
|
1
|
-
import type { RefObject } from 'react';
|
|
2
|
-
import type { PointerEngine } from './usePointerEngine';
|
|
3
|
-
import { type RectLike } from './rectMath';
|
|
4
|
-
export interface ScreenGuide {
|
|
5
|
-
orientation: 'vertical' | 'horizontal';
|
|
6
|
-
position: number;
|
|
7
|
-
start: number;
|
|
8
|
-
end: number;
|
|
9
|
-
}
|
|
10
|
-
export interface DragState {
|
|
11
|
-
draggingId: string | null;
|
|
12
|
-
/** Container-relative screen rect of the node being dragged, refreshed every frame. */
|
|
13
|
-
liveRect: RectLike | null;
|
|
14
|
-
/** Magenta alignment guides, already converted into container-relative screen space. */
|
|
15
|
-
guides: ScreenGuide[];
|
|
16
|
-
/** Model-space x/y (distance from the parent's left/top) of the node's current
|
|
17
|
-
* snapped position — the live numbers a "Y: 240 X: 48" badge reads while dragging. */
|
|
18
|
-
modelPos: {
|
|
19
|
-
x: number;
|
|
20
|
-
y: number;
|
|
21
|
-
} | null;
|
|
22
|
-
/** Container-relative screen rect of the dragged node's *parent* — lets
|
|
23
|
-
* AdornmentLayer draw a real ruler/dimension line from the node's edge back to the
|
|
24
|
-
* parent's edge alongside the X/Y badge, not just float a number with nothing to
|
|
25
|
-
* visually anchor it to. Null for a node with no parent (shouldn't happen in
|
|
26
|
-
* practice — Section's own direct children always have one). */
|
|
27
|
-
parentRect: RectLike | null;
|
|
28
|
-
}
|
|
29
|
-
/**
|
|
30
|
-
* Ghost Drag, per the spec: reads the pointer engine's ref each animation frame (no
|
|
31
|
-
* per-pointermove React state), imperatively transforms the real dragged element, and
|
|
32
|
-
* only commits x/y to the Zustand store on pointer-up. Model-space snapping math
|
|
33
|
-
* (snapping.ts) happens in the dragged node's own parent-local coordinate frame; guide
|
|
34
|
-
* lines are converted to container-relative screen space here (by measuring the
|
|
35
|
-
* parent's own screen rect) purely for AdornmentLayer to draw them — everything stays
|
|
36
|
-
* a 1:1 translation, no scale/zoom handling yet.
|
|
37
|
-
*/
|
|
38
|
-
export declare function useDragEngine(containerRef: RefObject<HTMLElement | null>, pointerEngine: PointerEngine): {
|
|
39
|
-
startDrag: (id: string, e: {
|
|
40
|
-
clientX: number;
|
|
41
|
-
clientY: number;
|
|
42
|
-
}) => void;
|
|
43
|
-
dragState: DragState;
|
|
44
|
-
};
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
import type React from 'react';
|
|
2
|
-
import type { PlexoNode } from '../store/types';
|
|
3
|
-
export { isFullBleedRow } from './layoutRoles';
|
|
4
|
-
/**
|
|
5
|
-
* Shared wiring for every draggable node type (Text/Image/Button/Container — anything
|
|
6
|
-
* but Section, which isn't pointer-draggable in Phase 3). Centralizes the placement
|
|
7
|
-
* math, the pointerdown-starts-drag/click-selects contract, and
|
|
8
|
-
* right-click-opens-the-context-menu so the 4 leaf components don't each re-implement
|
|
9
|
-
* it.
|
|
10
|
-
*
|
|
11
|
-
* Layout mode depends on the *parent*: a Section is the freeform canvas root, so its
|
|
12
|
-
* direct children get Phase 3's absolute x/y positioning and are draggable. A Container
|
|
13
|
-
* is a "Cell row" — its children lay out via flexbox (see ContainerNode.tsx) and their
|
|
14
|
-
* position is governed by flex order, not x/y, so dragging is disabled for them
|
|
15
|
-
* (reordering happens via the Cell row's flip/add-cell controls instead); only their
|
|
16
|
-
* width is still meaningful, as a fixed flex-basis.
|
|
17
|
-
*
|
|
18
|
-
* `node` may be `undefined` for one render (e.g. the id briefly outliving its node
|
|
19
|
-
* during a delete) — hooks must still run unconditionally, so this stays safe rather
|
|
20
|
-
* than asserting non-null and crashing on that render.
|
|
21
|
-
*/
|
|
22
|
-
export declare function useDraggableNode(node: PlexoNode | undefined): {
|
|
23
|
-
attrProps: {
|
|
24
|
-
"data-plexo-v2-id": string | undefined;
|
|
25
|
-
onPointerDown: (e: React.PointerEvent) => void;
|
|
26
|
-
onClick: (e: React.MouseEvent) => void;
|
|
27
|
-
onContextMenu: (e: React.MouseEvent) => void;
|
|
28
|
-
};
|
|
29
|
-
positionStyle: React.CSSProperties;
|
|
30
|
-
};
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Double-click-to-edit for Text/Button content, directly in the canvas — there was no
|
|
3
|
-
* way to edit a node's own text short of opening the Design popover's Content field.
|
|
4
|
-
* A single click still selects/drags (useDraggableNode's normal contract); double-click
|
|
5
|
-
* switches the same element into a real `contentEditable` region, focused with the
|
|
6
|
-
* caret at the end, and commits one undo step on blur (or Escape/Enter, depending on
|
|
7
|
-
* `commitOnEnter`) — not on every keystroke, matching every other field's edit contract
|
|
8
|
-
* in this app.
|
|
9
|
-
*/
|
|
10
|
-
export declare function useInlineTextEdit(nodeId: string, currentText: string, field: 'content' | 'label', commitOnEnter: boolean): {
|
|
11
|
-
editing: boolean;
|
|
12
|
-
ref: import("react").RefObject<HTMLElement | null>;
|
|
13
|
-
startEditing: (e: React.MouseEvent) => void;
|
|
14
|
-
editableProps: {
|
|
15
|
-
contentEditable: boolean;
|
|
16
|
-
suppressContentEditableWarning: boolean;
|
|
17
|
-
onBlur: () => void;
|
|
18
|
-
onKeyDown: (e: React.KeyboardEvent<HTMLElement>) => void;
|
|
19
|
-
onPointerDown: (e: React.PointerEvent) => void;
|
|
20
|
-
onClick: (e: React.MouseEvent) => void;
|
|
21
|
-
} | {
|
|
22
|
-
contentEditable?: undefined;
|
|
23
|
-
suppressContentEditableWarning?: undefined;
|
|
24
|
-
onBlur?: undefined;
|
|
25
|
-
onKeyDown?: undefined;
|
|
26
|
-
onPointerDown?: undefined;
|
|
27
|
-
onClick?: undefined;
|
|
28
|
-
};
|
|
29
|
-
};
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
export interface PointerPoint {
|
|
2
|
-
x: number;
|
|
3
|
-
y: number;
|
|
4
|
-
}
|
|
5
|
-
export interface PointerEngine {
|
|
6
|
-
/** Current pointer position — a ref read, not state, so consumers checking it inside a
|
|
7
|
-
* rAF loop (Phase 3's drag ghost) never trigger a React re-render just by reading it. */
|
|
8
|
-
getPointer: () => PointerPoint;
|
|
9
|
-
isDown: () => boolean;
|
|
10
|
-
/** Fires on every pointerup, after the up-state is already recorded — for consumers
|
|
11
|
-
* (Phase 2's AdornmentLayer) that need to re-measure layout once an interaction ends,
|
|
12
|
-
* without subscribing to every intermediate pointermove. */
|
|
13
|
-
onPointerUp: (cb: () => void) => () => void;
|
|
14
|
-
}
|
|
15
|
-
/**
|
|
16
|
-
* One set of window-level pointer listeners, mounted once at the canvas root. Phase 3's
|
|
17
|
-
* drag/snap engine builds directly on this instead of each draggable node adding its own
|
|
18
|
-
* listeners — the whole point of a "global pointer engine" per the spec is a single
|
|
19
|
-
* source of truth for pointer state during a drag that spans past any one element's
|
|
20
|
-
* boundaries.
|
|
21
|
-
*/
|
|
22
|
-
export declare function usePointerEngine(): PointerEngine;
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import type React from 'react';
|
|
2
|
-
import type { HandleKey } from './rectMath';
|
|
3
|
-
/**
|
|
4
|
-
* Per-handle pointerdown wiring: live setNodeStyles on every pointermove (instant canvas
|
|
5
|
-
* repaint, matching the "debounced AST dispatch" pattern from the Inspector's scrub
|
|
6
|
-
* fields — see useFieldCommit), one commitSnapshot on pointerup so the whole drag is a
|
|
7
|
-
* single undo step. No rAF ghost here unlike Phase 3's move-drag: resize changes
|
|
8
|
-
* width/height, which need a real re-layout anyway, so there's nothing to gain from an
|
|
9
|
-
* imperative transform — a direct store write each tick is simpler and just as fast at
|
|
10
|
-
* this node count.
|
|
11
|
-
*/
|
|
12
|
-
export declare function useResizeHandlePointerDown(nodeId: string, handleKey: HandleKey): (e: React.PointerEvent) => void;
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import type { TextNode } from '../store/types';
|
|
2
|
-
export interface ResolvedTypography {
|
|
3
|
-
fontSize?: string | number;
|
|
4
|
-
fontWeight?: string | number;
|
|
5
|
-
lineHeight?: string | number;
|
|
6
|
-
}
|
|
7
|
-
/**
|
|
8
|
-
* When a Text node is linked to a global Text Style slot (via styles.textStyleRef), its
|
|
9
|
-
* typography comes from that slot instead of its own local styles — that's what makes
|
|
10
|
-
* editing the slot in the Brand panel a real "Change All", not just a copy-on-select.
|
|
11
|
-
* Unlinked ("Custom") nodes fall back to their own local fontSize/fontWeight.
|
|
12
|
-
*/
|
|
13
|
-
export declare function useResolvedTextStyles(node: TextNode | undefined): ResolvedTypography;
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import type { RefObject } from 'react';
|
|
2
|
-
import { type RectLike } from './rectMath';
|
|
3
|
-
/**
|
|
4
|
-
* Recomputes on every trigger that could move content relative to the container: the
|
|
5
|
-
* selection itself changing, the container resizing, the window resizing, and the inner
|
|
6
|
-
* canvas scrolling (see rectMath.ts's toRelativeRect doc for why scroll needs a recompute
|
|
7
|
-
* but not manual scroll-offset math).
|
|
8
|
-
*/
|
|
9
|
-
export declare function useSelectionRects(containerRef: RefObject<HTMLElement | null>, scrollRef: RefObject<HTMLElement | null>, selectedIds: string[], pointerUpTick: number,
|
|
10
|
-
/** Any extra value that can reposition content without resizing the container or any
|
|
11
|
-
* selected element itself — e.g. toggling Desktop/Mobile preview re-centers the whole
|
|
12
|
-
* page, which neither a ResizeObserver nor a scroll/resize listener would catch. */
|
|
13
|
-
layoutKey?: unknown): Map<string, RectLike>;
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Cmd/Ctrl+Z to undo, Cmd/Ctrl+Shift+Z (or Ctrl+Y) to redo — the canvas's own history
|
|
3
|
-
* stack, not the browser's native text-field undo. Deliberately skipped while focus is
|
|
4
|
-
* inside an editable element (Inspector fields): the user's Cmd+Z there should undo
|
|
5
|
-
* their last keystroke in that field via the browser's native input undo, not jump the
|
|
6
|
-
* whole canvas back a step, which would be surprising and could undo unrelated edits.
|
|
7
|
-
*/
|
|
8
|
-
export declare function useUndoRedoKeyBinding(): void;
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import type { PlexoNode } from '../store/types';
|
|
3
|
-
export interface BuiltPreset {
|
|
4
|
-
/** The subtree to insert — one dispatchAiCommand({type:'insertNode', ...}) call. */
|
|
5
|
-
nodes: Record<string, PlexoNode>;
|
|
6
|
-
rootId: string;
|
|
7
|
-
}
|
|
8
|
-
export interface ElementPreset {
|
|
9
|
-
id: string;
|
|
10
|
-
label: string;
|
|
11
|
-
/** A small, real (if simplified) illustrative markup — not the live canvas renderer,
|
|
12
|
-
* just enough for the catalog grid to look like the reference's populated previews
|
|
13
|
-
* instead of a bare icon. */
|
|
14
|
-
preview: React.ReactNode;
|
|
15
|
-
/** Shown under the label in the preset list row. Optional — falls back to a generic
|
|
16
|
-
* "drag or tap to add" hint (see ContentTabPanel's PresetRow) when omitted, so this
|
|
17
|
-
* is worth writing only where a short, specific description actually helps someone
|
|
18
|
-
* scanning the list tell presets apart. */
|
|
19
|
-
description?: string;
|
|
20
|
-
build: (parentId: string) => BuiltPreset;
|
|
21
|
-
}
|
|
22
|
-
export interface ElementCategory {
|
|
23
|
-
id: string;
|
|
24
|
-
label: string;
|
|
25
|
-
/** Omitted/empty on a category that's a real workstream of its own (Popup's overlay
|
|
26
|
-
* system, Apps' plugin marketplace) — shown honestly as "coming soon" rather than
|
|
27
|
-
* faking presets that don't do anything. */
|
|
28
|
-
presets?: ElementPreset[];
|
|
29
|
-
comingSoon?: string;
|
|
30
|
-
}
|
|
31
|
-
export declare const ELEMENT_CATEGORIES: ElementCategory[];
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import type { ElementPreset } from './elementCatalog';
|
|
2
|
-
/** Builds an insertable preset for an arbitrary image URL — shared by the Images
|
|
3
|
-
* gallery (images already used somewhere in the document) and the Uploads tab (a
|
|
4
|
-
* freshly uploaded file's URL), both of which need the exact same "drop this image
|
|
5
|
-
* onto a section" behavior the Content tab's own presets already have (same
|
|
6
|
-
* CatalogDragContext, same tap-to-add path). */
|
|
7
|
-
export declare function buildImagePreset(url: string, label?: string): ElementPreset;
|
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
import type { PlexoNode } from '../store/types';
|
|
2
|
-
/**
|
|
3
|
-
* Compiles a V2 canvas page (nodes + pageOrder) into a self-contained React component (TSX
|
|
4
|
-
* source) for a Plexo app project — how a visually designed page becomes ordinary code the
|
|
5
|
-
* app imports, the AI can edit, and Plexo builds and serves like any other file.
|
|
6
|
-
*
|
|
7
|
-
* Layout fidelity: the canvas is a freeform artboard (absolute x/y inside each Section, flex
|
|
8
|
-
* "cell rows" for Containers) designed at up to DESIGN_WIDTH px. The output reproduces that
|
|
9
|
-
* exactly at the design width and scales each section proportionally on narrower screens
|
|
10
|
-
* (a small fit-to-width hook), so nothing overlaps or reflows unexpectedly on a phone.
|
|
11
|
-
*
|
|
12
|
-
* Same style resolution as the canvas itself (resolveBoxStyle, Text Style slots) so the
|
|
13
|
-
* compiled page looks like the design. Text is emitted as JS string literals, never raw
|
|
14
|
-
* JSX text, so content can't break out of the markup; Embed HTML stays sandboxed.
|
|
15
|
-
*/
|
|
16
|
-
export declare const DESIGN_WIDTH = 1400;
|
|
17
|
-
export type TextStyleSlots = Record<string, {
|
|
18
|
-
fontSize?: string | number;
|
|
19
|
-
fontWeight?: string | number;
|
|
20
|
-
lineHeight?: string | number;
|
|
21
|
-
}>;
|
|
22
|
-
export interface CompileOptions {
|
|
23
|
-
/** Exported component name (a valid identifier). */
|
|
24
|
-
componentName: string;
|
|
25
|
-
/** Brand Text Style slots, so text linked to a slot (styles.textStyleRef) gets its typography. */
|
|
26
|
-
textStyles?: TextStyleSlots;
|
|
27
|
-
}
|
|
28
|
-
type Nodes = Record<string, PlexoNode>;
|
|
29
|
-
export declare function compilePageToReact(nodes: Nodes, pageOrder: string[], opts: CompileOptions): string;
|
|
30
|
-
/** "Hero banner" → "HeroBanner" — a component name from a design's title. */
|
|
31
|
-
export declare function componentNameFor(title: string): string;
|
|
32
|
-
export {};
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import type { RectLike } from '../canvas/rectMath';
|
|
3
|
-
import type { ScreenGuide } from '../canvas/useDragEngine';
|
|
4
|
-
export declare const AdornmentLayer: React.FC<{
|
|
5
|
-
rects: Map<string, RectLike>;
|
|
6
|
-
guides?: ScreenGuide[];
|
|
7
|
-
/** Live X/Y readout shown near the dragged node's rect — "distance from top and
|
|
8
|
-
* left" while dragging, per the reference. `rect` here is whichever entry in `rects`
|
|
9
|
-
* is currently being dragged (CenterCanvas already knows which); `parentRect` (when
|
|
10
|
-
* known) lets a faint ruler/dimension line get drawn back to the actual edge being
|
|
11
|
-
* measured from, rather than floating a bare number with nothing to anchor it to. */
|
|
12
|
-
dragBadge?: {
|
|
13
|
-
rect: RectLike;
|
|
14
|
-
modelPos: {
|
|
15
|
-
x: number;
|
|
16
|
-
y: number;
|
|
17
|
-
};
|
|
18
|
-
parentRect: RectLike | null;
|
|
19
|
-
};
|
|
20
|
-
}>;
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import type { PlexoNodeType } from '../store/types';
|
|
3
|
-
export interface AskSolMessage {
|
|
4
|
-
id: string;
|
|
5
|
-
from: 'user' | 'sol';
|
|
6
|
-
text: string;
|
|
7
|
-
timestamp: number;
|
|
8
|
-
}
|
|
9
|
-
/**
|
|
10
|
-
* The Ask SOL conversation screen — a dedicated sidebar tab (not a popup panel), with
|
|
11
|
-
* a Back control that returns to the Content tab. History is host-persistable: pass
|
|
12
|
-
* `history`/`onMessage` (see V2CanvasProps) and a real backend (plexo-web) can save and
|
|
13
|
-
* restore the conversation per template; omit both and it's just in-memory for the
|
|
14
|
-
* session. With `onAsk` (see V2CanvasProps.onAskSol) replies come from the host's real SOL;
|
|
15
|
-
* without it they're honest canned pointers to the right control.
|
|
16
|
-
*/
|
|
17
|
-
export type AskSolContext = {
|
|
18
|
-
nodeId?: string;
|
|
19
|
-
nodeType?: PlexoNodeType;
|
|
20
|
-
};
|
|
21
|
-
export declare const AskSolPanel: React.FC<{
|
|
22
|
-
history?: AskSolMessage[];
|
|
23
|
-
onMessage?: (message: AskSolMessage) => void;
|
|
24
|
-
onAsk?: (question: string, context: AskSolContext) => Promise<string>;
|
|
25
|
-
}>;
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
/** Follows the cursor while a Content-tab preset is being dragged — portaled to
|
|
3
|
-
* document.body for the same reason Popover is (see its own doc comment): a
|
|
4
|
-
* fixed-position overlay needs to escape any ancestor's stacking context to reliably
|
|
5
|
-
* render above the canvas's own selection/adornment layer. */
|
|
6
|
-
export declare const CatalogDragGhost: React.FC;
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
/**
|
|
3
|
-
* Sits between two adjacent Cells in a Container's flex row (or at the very start/end
|
|
4
|
-
* as an edge insert zone). Between two real cells it IS the gap itself — sized to the
|
|
5
|
-
* container's actual `styles.gap`, draggable horizontally to resize it, with hover
|
|
6
|
-
* controls to flip the two neighboring cells' order or insert a new one right there.
|
|
7
|
-
* At the row's edges there's no gap to drag, just an insert affordance.
|
|
8
|
-
*/
|
|
9
|
-
export declare const CellBoundary: React.FC<{
|
|
10
|
-
containerId: string;
|
|
11
|
-
index: number;
|
|
12
|
-
leftChildId?: string;
|
|
13
|
-
rightChildId?: string;
|
|
14
|
-
}>;
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
/**
|
|
3
|
-
* The Content tab — a two-level drill-down: a clean grid of standalone category tiles
|
|
4
|
-
* first (icon + label, same bordered-card language every preset tile already uses —
|
|
5
|
-
* matching V1's own flat category grid rather than a cramped icon strip or a list of
|
|
6
|
-
* menu rows), and tapping one opens that category's own preset grid as a proper
|
|
7
|
-
* "sub-menu" screen with a Back control and its own header. Every tile is both
|
|
8
|
-
* tap-to-add (click — lands at the end of the page) *and* drag-to-drop (pointer-drag
|
|
9
|
-
* onto any section, lands exactly where you drop it — see CatalogDragContext/
|
|
10
|
-
* CatalogDragGhost).
|
|
11
|
-
*/
|
|
12
|
-
export declare const ContentTabPanel: React.FC;
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
/** Right-click menu: Cut/Copy/Paste/Duplicate/Copy style/Delete, then Pin to screen
|
|
3
|
-
* (Sections), then Arrange and Align to as nested flyouts — matching the reference's
|
|
4
|
-
* exact grouping rather than one long flat list. */
|
|
5
|
-
export declare const ContextMenu: React.FC;
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
export type SaveState = 'idle' | 'saving' | 'saved';
|
|
3
|
-
export interface ContextualToolbarProps {
|
|
4
|
-
/** Left/right header slots — named to match V1's own `headerLeftContent`/
|
|
5
|
-
* `headerRightContent` props (PlexoBuilder.tsx) so a host already integrating V1
|
|
6
|
-
* can drop the same content in here with no naming translation. Neither owns any
|
|
7
|
-
* layout beyond "render it in this column" — page nav, domain, whatever the host
|
|
8
|
-
* wants is entirely its own call. Per-element editing controls never live here
|
|
9
|
-
* (see SelectionToolbar.tsx, docked inside the canvas panel instead). */
|
|
10
|
-
headerLeftContent?: React.ReactNode;
|
|
11
|
-
headerRightContent?: React.ReactNode;
|
|
12
|
-
/** Same shape as V1: the Save button only renders when a handler is actually
|
|
13
|
-
* supplied (or `showSaveButton` is explicitly true) — no dead button that silently
|
|
14
|
-
* does nothing. */
|
|
15
|
-
onSave?: () => void;
|
|
16
|
-
showSaveButton?: boolean;
|
|
17
|
-
saveState?: SaveState;
|
|
18
|
-
}
|
|
19
|
-
/**
|
|
20
|
-
* The app-wide top bar. Deliberately minimal — header slots for whoever mounts this
|
|
21
|
-
* SDK on the left and right, the Desktop/Mobile device switch centered, and the
|
|
22
|
-
* editor's own global (not per-element) controls — Undo/Redo, Save, workspace
|
|
23
|
-
* dark-mode toggle, Preview, Help.
|
|
24
|
-
*/
|
|
25
|
-
export declare const ContextualToolbar: React.FC<ContextualToolbarProps>;
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import type { StockImageProvider, StockImageResult } from './V2Canvas';
|
|
3
|
-
/**
|
|
4
|
-
* One consolidated Images tab — replaces the earlier split Images/Uploads tabs, which
|
|
5
|
-
* the user correctly called out as a redundant extra step. Three sources feed the same
|
|
6
|
-
* grid/insert path: a stock photo search (Unsplash/Pixabay/etc — host-supplied, since
|
|
7
|
-
* the SDK holds no API keys of its own), the host's own upload handler, and every image
|
|
8
|
-
* already used somewhere in this document. Any source the host doesn't wire up simply
|
|
9
|
-
* doesn't render its section, rather than showing a dead button.
|
|
10
|
-
*/
|
|
11
|
-
export declare const ImagesTabPanel: React.FC<{
|
|
12
|
-
onUploadImage?: (file: File) => Promise<string>;
|
|
13
|
-
stockImageProviders?: StockImageProvider[];
|
|
14
|
-
onSearchStockImages?: (query: string, providerId: string) => Promise<StockImageResult[]>;
|
|
15
|
-
}>;
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
/** "Layout Guides" panel: None / Columns / Blocks / Dots, plus an Always / On drag
|
|
3
|
-
* only visibility toggle — see LayoutGuideContext for how these actually change what
|
|
4
|
-
* renders behind a selected section (SectionGridOverlay.tsx). Floats beside its
|
|
5
|
-
* trigger by default, or fills a docked sidebar tab's panel when `docked` (see
|
|
6
|
-
* ManageLayersPanel's doc comment — same pattern). */
|
|
7
|
-
export declare const LayoutGuidePanel: React.FC<{
|
|
8
|
-
onClose: () => void;
|
|
9
|
-
docked?: boolean;
|
|
10
|
-
}>;
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
/**
|
|
3
|
-
* "Manage Layers" — a titled card with a close button, rows carrying a thumbnail,
|
|
4
|
-
* expand/collapse chevron, pin indicator (for pinned sections), and a per-row "..."
|
|
5
|
-
* opening the same context menu used everywhere else in the canvas. Renders either as
|
|
6
|
-
* a floating card beside its trigger (`docked` false/omitted) or filling a docked
|
|
7
|
-
* sidebar tab's own panel (`docked` true, per the V1-style consolidated sidebar in
|
|
8
|
-
* LeftRail.tsx) — same content either way, just the outer chrome differs.
|
|
9
|
-
*/
|
|
10
|
-
export declare const ManageLayersPanel: React.FC<{
|
|
11
|
-
onClose: () => void;
|
|
12
|
-
docked?: boolean;
|
|
13
|
-
}>;
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
/**
|
|
3
|
-
* Single dispatch point from a node id to its rendered leaf component. Adding a new
|
|
4
|
-
* PlexoNodeType later only touches this switch and its own nodes/*.tsx file.
|
|
5
|
-
*/
|
|
6
|
-
export declare const NodeRenderer: React.FC<{
|
|
7
|
-
id: string;
|
|
8
|
-
}>;
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
/**
|
|
3
|
-
* A distraction-free, read-only preview — matches the user's own reference exactly:
|
|
4
|
-
* an exit control, a device-width slider with a live pixel readout, Desktop/Tablet/
|
|
5
|
-
* Mobile quick-set buttons, and a "Fit to screen" auto-scale toggle. The page itself is
|
|
6
|
-
* the real rendered node tree (not a separate compiled-HTML path), wrapped in
|
|
7
|
-
* `pointer-events: none` so it's genuinely inert — no accidental selection, no hover
|
|
8
|
-
* affordances firing — without needing every node/section component to grow its own
|
|
9
|
-
* "am I in preview mode" branch.
|
|
10
|
-
*/
|
|
11
|
-
export declare const PreviewOverlay: React.FC;
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import type { V2CanvasProps } from './V2Canvas';
|
|
3
|
-
/**
|
|
4
|
-
* The right-hand sidebar: a docked content panel plus a slim icon tab rail along the
|
|
5
|
-
* far edge — matching the reference's own shape, mirrored from V1's left-side
|
|
6
|
-
* SidebarContainer/SidebarTabsRail rather than V2's earlier floating-popover rail.
|
|
7
|
-
* Content is the default/first tab; Ask SOL is a dedicated conversation screen (not a
|
|
8
|
-
* bottom composer bar) that replaces the panel's content when open, with its own Back
|
|
9
|
-
* control returning to Content. Images/Uploads give real, honest image-gallery
|
|
10
|
-
* management — Images reflects what's actually used in the document, Uploads calls a
|
|
11
|
-
* host-supplied `onUploadImage` hook (no fake upload button when one isn't wired up).
|
|
12
|
-
*/
|
|
13
|
-
export declare const RightRail: React.FC<V2CanvasProps>;
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
/** Renders a Section's configured shape divider (if any) at its top or bottom edge —
|
|
3
|
-
* a plain absolutely-positioned SVG, `pointer-events: none`, rendered before the
|
|
4
|
-
* section's real children in DOM order so ordinary content (no explicit z-index)
|
|
5
|
-
* naturally stacks above it without needing an explicit z-index war. */
|
|
6
|
-
export declare const SectionDividerOverlay: React.FC<{
|
|
7
|
-
sectionId: string;
|
|
8
|
-
}>;
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
/**
|
|
3
|
-
* A thin hover band sitting fully *inside* one edge of a Section (top or bottom) — not
|
|
4
|
-
* straddling the seam between sections (which clipped/crowded the pill against the
|
|
5
|
-
* browser-chrome bar above the first section, and read as visually "hidden" behind the
|
|
6
|
-
* layout-guide column lines right at that boundary), and not a separate block sitting
|
|
7
|
-
* between sections either — that used to add a permanent visible gap after every
|
|
8
|
-
* section regardless of whether anyone was hovering it. Zero footprint when idle
|
|
9
|
-
* (position: absolute takes no layout space), and "+ Add Section" only appears while the
|
|
10
|
-
* cursor is actually over that specific edge — top inserts before this section, bottom
|
|
11
|
-
* inserts after, matching "the Add Section button shows up depending on where your
|
|
12
|
-
* cursor is, top or bottom".
|
|
13
|
-
*/
|
|
14
|
-
export declare const SectionEdgeAddZone: React.FC<{
|
|
15
|
-
edge: 'top' | 'bottom';
|
|
16
|
-
index: number;
|
|
17
|
-
}>;
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
/**
|
|
3
|
-
* Purely visual — a background guide behind a Section's children, never enforced as
|
|
4
|
-
* real layout on the elements themselves (per the spec: freeform absolute-position
|
|
5
|
-
* elements, guided but not constrained by the grid). pointer-events: none so it never
|
|
6
|
-
* intercepts clicks meant for the section or its children underneath. Shape (Columns /
|
|
7
|
-
* Blocks / Dots / off) and visibility (Always / On drag only) come from the shared
|
|
8
|
-
* LayoutGuideContext, driven by the "Layout Guides" popover in LeftRail.
|
|
9
|
-
*/
|
|
10
|
-
export declare const SectionGridOverlay: React.FC;
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import type { RectLike } from '../canvas/rectMath';
|
|
3
|
-
/**
|
|
4
|
-
* The selected section's 4-icon control cluster (select/move up/move down/more) —
|
|
5
|
-
* floats just outside the section's left edge when there's room in the margin to its
|
|
6
|
-
* left (sidebar collapsed to just its icon rail); when a sidebar tab is docked open
|
|
7
|
-
* and there's no margin to float into, it clamps to sit just *inside* the canvas's own
|
|
8
|
-
* left edge instead of overlapping the docked panel's content. Rendered as a sibling of
|
|
9
|
-
* the scrolling canvas content (inside CenterCanvas's non-scrolling containerRef, same
|
|
10
|
-
* as AdornmentLayer) rather than inside the Section itself: the scroll container clips
|
|
11
|
-
* horizontal overflow, so a negative-left child of the Section would be invisible —
|
|
12
|
-
* being a sibling of the scroller sidesteps that entirely, the same reasoning
|
|
13
|
-
* AdornmentLayer already relies on for its own overlay.
|
|
14
|
-
*/
|
|
15
|
-
export declare const SectionSideRail: React.FC<{
|
|
16
|
-
rects: Map<string, RectLike>;
|
|
17
|
-
}>;
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
/**
|
|
3
|
-
* The per-element settings toolbar — lives docked inside the canvas panel (top of
|
|
4
|
-
* CenterCanvas, above the scrolling artboard), not in the app-wide top bar. That bar
|
|
5
|
-
* (ContextualToolbar.tsx) is reserved for whatever's mounting this SDK to put its own
|
|
6
|
-
* chrome in, so per-type editing controls (Design/Animation/Text style/Background/
|
|
7
|
-
* quick actions) live here instead — scoped to "the canvas panel", scrollable
|
|
8
|
-
* left/right with arrow buttons once a type's control set overflows the available
|
|
9
|
-
* width, rather than fighting the host's own bar for space.
|
|
10
|
-
*/
|
|
11
|
-
export declare const SelectionToolbar: React.FC;
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
/** Visible feedback while a "Copy style" pick is armed — otherwise clicking an element
|
|
3
|
-
* would silently do something different than usual (apply the copied style instead of
|
|
4
|
-
* selecting), with no way to tell why. */
|
|
5
|
-
export declare const StylePainterToast: React.FC;
|
|
@@ -1,59 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { type SaveState } from './ContextualToolbar';
|
|
3
|
-
import type { AskSolContext, AskSolMessage } from './AskSolPanel';
|
|
4
|
-
/**
|
|
5
|
-
* Everything a host app (plexo-web in production, PlaygroundHost.tsx in dev) can hand
|
|
6
|
-
* in rather than the SDK hardcoding or faking it. Persistence, uploads, and Ask SOL
|
|
7
|
-
* conversation history are all host concerns the SDK has no backend of its own for.
|
|
8
|
-
*/
|
|
9
|
-
/** One stock-photo provider the host wires up (Unsplash/Pixabay/Pexels/…) — labels only,
|
|
10
|
-
* the actual API keys and fetch logic live on the host's side. */
|
|
11
|
-
export interface StockImageProvider {
|
|
12
|
-
id: string;
|
|
13
|
-
label: string;
|
|
14
|
-
}
|
|
15
|
-
/** One stock-photo search result, in the shape the Images tab needs to render a tile
|
|
16
|
-
* and give the source photographer/provider proper credit. */
|
|
17
|
-
export interface StockImageResult {
|
|
18
|
-
id: string;
|
|
19
|
-
src: string;
|
|
20
|
-
alt?: string;
|
|
21
|
-
credit?: string;
|
|
22
|
-
photographerUrl?: string;
|
|
23
|
-
provider: string;
|
|
24
|
-
}
|
|
25
|
-
export interface V2CanvasProps {
|
|
26
|
-
/** Uploading a file needs real storage the SDK doesn't have — given, the Images tab's
|
|
27
|
-
* Upload section calls this with the picked/dropped file and expects the hosted URL
|
|
28
|
-
* back; omitted, that section doesn't render (no dead button pretending to work). */
|
|
29
|
-
onUploadImage?: (file: File) => Promise<string>;
|
|
30
|
-
/** Stock photo search (Unsplash/Pixabay/…), consolidated into the same Images tab as
|
|
31
|
-
* uploads and document images per the user's own explicit request — the SDK has no
|
|
32
|
-
* API keys of its own, so both the provider list and the actual search call are the
|
|
33
|
-
* host's job. Omit both to just show uploads + images already used in the document. */
|
|
34
|
-
stockImageProviders?: StockImageProvider[];
|
|
35
|
-
onSearchStockImages?: (query: string, providerId: string) => Promise<StockImageResult[]>;
|
|
36
|
-
/** Ask SOL's conversation, scoped to "the particular template" by whatever the host
|
|
37
|
-
* passes in — the SDK has no concept of which template/document this is beyond the
|
|
38
|
-
* canvas store's own contents, so persisting history across sessions is the host's
|
|
39
|
-
* job. Omit both to get a normal in-memory-only conversation. */
|
|
40
|
-
askSolHistory?: AskSolMessage[];
|
|
41
|
-
onAskSolMessage?: (message: AskSolMessage) => void;
|
|
42
|
-
/** Answers Ask SOL questions with the host's real SOL (the question, plus the selected
|
|
43
|
-
* element if the question is scoped to it). Omitted, Ask SOL gives canned pointers. */
|
|
44
|
-
onAskSol?: (question: string, context: AskSolContext) => Promise<string>;
|
|
45
|
-
/** Left/right header slots — named to match V1's own `headerLeftContent`/
|
|
46
|
-
* `headerRightContent` props (PlexoBuilder.tsx) so a host already integrating V1
|
|
47
|
-
* can carry the same content over with no naming translation. The SDK renders each
|
|
48
|
-
* as-is and owns nothing about its content; per-element editing controls never live
|
|
49
|
-
* here (see SelectionToolbar.tsx, docked inside the canvas panel instead). */
|
|
50
|
-
headerLeftContent?: React.ReactNode;
|
|
51
|
-
headerRightContent?: React.ReactNode;
|
|
52
|
-
/** Also matching V1's naming: the Save button only renders when a handler is
|
|
53
|
-
* actually supplied (and `showSaveButton` isn't explicitly false) — no dead button
|
|
54
|
-
* that silently does nothing. */
|
|
55
|
-
onSave?: () => void;
|
|
56
|
-
showSaveButton?: boolean;
|
|
57
|
-
saveState?: SaveState;
|
|
58
|
-
}
|
|
59
|
-
export declare const V2Canvas: React.FC<V2CanvasProps>;
|