@aglyn/besigner-ui 1.0.0-beta.143
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/LICENSE +201 -0
- package/README.md +7 -0
- package/package.json +73 -0
- package/src/besigner.d.ts +88 -0
- package/src/besigner.js +89 -0
- package/src/besigner.js.map +1 -0
- package/src/index.d.ts +17 -0
- package/src/index.js +18 -0
- package/src/index.js.map +1 -0
- package/src/lib/box-styler/box-styler.d.ts +57 -0
- package/src/lib/box-styler/box-styler.js +240 -0
- package/src/lib/box-styler/box-styler.js.map +1 -0
- package/src/lib/box-styler/components/box-diagram.d.ts +89 -0
- package/src/lib/box-styler/components/box-diagram.js +661 -0
- package/src/lib/box-styler/components/box-diagram.js.map +1 -0
- package/src/lib/box-styler/components/legend.d.ts +56 -0
- package/src/lib/box-styler/components/legend.js +130 -0
- package/src/lib/box-styler/components/legend.js.map +1 -0
- package/src/lib/box-styler/components/spacing-editor.d.ts +55 -0
- package/src/lib/box-styler/components/spacing-editor.js +347 -0
- package/src/lib/box-styler/components/spacing-editor.js.map +1 -0
- package/src/lib/box-styler/constants.d.ts +17 -0
- package/src/lib/box-styler/constants.js +30 -0
- package/src/lib/box-styler/constants.js.map +1 -0
- package/src/lib/box-styler/index.d.ts +2 -0
- package/src/lib/box-styler/index.js +4 -0
- package/src/lib/box-styler/index.js.map +1 -0
- package/src/lib/box-styler/region-fills.d.ts +107 -0
- package/src/lib/box-styler/region-fills.js +139 -0
- package/src/lib/box-styler/region-fills.js.map +1 -0
- package/src/lib/box-styler/spacing-value.d.ts +104 -0
- package/src/lib/box-styler/spacing-value.js +223 -0
- package/src/lib/box-styler/spacing-value.js.map +1 -0
- package/src/lib/box-styler/types.d.ts +29 -0
- package/src/lib/box-styler/types.js +18 -0
- package/src/lib/box-styler/types.js.map +1 -0
- package/src/lib/components/accordion-list.component.d.ts +50 -0
- package/src/lib/components/accordion-list.component.js +228 -0
- package/src/lib/components/accordion-list.component.js.map +1 -0
- package/src/lib/components/add-controls.component.d.ts +22 -0
- package/src/lib/components/add-controls.component.js +50 -0
- package/src/lib/components/add-controls.component.js.map +1 -0
- package/src/lib/components/app-bar-breadcrumbs.component.d.ts +29 -0
- package/src/lib/components/app-bar-breadcrumbs.component.js +279 -0
- package/src/lib/components/app-bar-breadcrumbs.component.js.map +1 -0
- package/src/lib/components/app-bar-primary.component.d.ts +21 -0
- package/src/lib/components/app-bar-primary.component.js +108 -0
- package/src/lib/components/app-bar-primary.component.js.map +1 -0
- package/src/lib/components/app-bar-secondary.component.d.ts +21 -0
- package/src/lib/components/app-bar-secondary.component.js +94 -0
- package/src/lib/components/app-bar-secondary.component.js.map +1 -0
- package/src/lib/components/aside-panel.component.d.ts +23 -0
- package/src/lib/components/aside-panel.component.js +505 -0
- package/src/lib/components/aside-panel.component.js.map +1 -0
- package/src/lib/components/besigner-conflict-alert.component.d.ts +36 -0
- package/src/lib/components/besigner-conflict-alert.component.js +51 -0
- package/src/lib/components/besigner-conflict-alert.component.js.map +1 -0
- package/src/lib/components/besigner-dnd-context.component.d.ts +32 -0
- package/src/lib/components/besigner-dnd-context.component.js +75 -0
- package/src/lib/components/besigner-dnd-context.component.js.map +1 -0
- package/src/lib/components/besigner-draft-alert.component.d.ts +70 -0
- package/src/lib/components/besigner-draft-alert.component.js +155 -0
- package/src/lib/components/besigner-draft-alert.component.js.map +1 -0
- package/src/lib/components/besigner-root-provider.component.d.ts +33 -0
- package/src/lib/components/besigner-root-provider.component.js +68 -0
- package/src/lib/components/besigner-root-provider.component.js.map +1 -0
- package/src/lib/components/binding-preview-controls.component.d.ts +28 -0
- package/src/lib/components/binding-preview-controls.component.js +63 -0
- package/src/lib/components/binding-preview-controls.component.js.map +1 -0
- package/src/lib/components/closeable-drawer.component.d.ts +32 -0
- package/src/lib/components/closeable-drawer.component.js +134 -0
- package/src/lib/components/closeable-drawer.component.js.map +1 -0
- package/src/lib/components/component-accordion-list.d.ts +28 -0
- package/src/lib/components/component-accordion-list.js +205 -0
- package/src/lib/components/component-accordion-list.js.map +1 -0
- package/src/lib/components/component-icon.component.d.ts +32 -0
- package/src/lib/components/component-icon.component.js +51 -0
- package/src/lib/components/component-icon.component.js.map +1 -0
- package/src/lib/components/component-picker.d.ts +27 -0
- package/src/lib/components/component-picker.js +368 -0
- package/src/lib/components/component-picker.js.map +1 -0
- package/src/lib/components/components-grid-list.component.d.ts +31 -0
- package/src/lib/components/components-grid-list.component.js +162 -0
- package/src/lib/components/components-grid-list.component.js.map +1 -0
- package/src/lib/components/custom-css-form.component.d.ts +115 -0
- package/src/lib/components/custom-css-form.component.js +699 -0
- package/src/lib/components/custom-css-form.component.js.map +1 -0
- package/src/lib/components/device-preview-controls.component.d.ts +22 -0
- package/src/lib/components/device-preview-controls.component.js +150 -0
- package/src/lib/components/device-preview-controls.component.js.map +1 -0
- package/src/lib/components/dnd/canvas-drop-indicator.d.ts +20 -0
- package/src/lib/components/dnd/canvas-drop-indicator.js +61 -0
- package/src/lib/components/dnd/canvas-drop-indicator.js.map +1 -0
- package/src/lib/components/dnd/draggable-droppable.d.ts +31 -0
- package/src/lib/components/dnd/draggable-droppable.js +383 -0
- package/src/lib/components/dnd/draggable-droppable.js.map +1 -0
- package/src/lib/components/dnd/draggable.d.ts +42 -0
- package/src/lib/components/dnd/draggable.js +66 -0
- package/src/lib/components/dnd/draggable.js.map +1 -0
- package/src/lib/components/dnd/drop-indicator.d.ts +31 -0
- package/src/lib/components/dnd/drop-indicator.js +139 -0
- package/src/lib/components/dnd/drop-indicator.js.map +1 -0
- package/src/lib/components/dnd/droppable.d.ts +43 -0
- package/src/lib/components/dnd/droppable.js +63 -0
- package/src/lib/components/dnd/droppable.js.map +1 -0
- package/src/lib/components/element-card.component.d.ts +23 -0
- package/src/lib/components/element-card.component.js +49 -0
- package/src/lib/components/element-card.component.js.map +1 -0
- package/src/lib/components/element-classes-field.component.d.ts +41 -0
- package/src/lib/components/element-classes-field.component.js +140 -0
- package/src/lib/components/element-classes-field.component.js.map +1 -0
- package/src/lib/components/element-detail-overlay.component.d.ts +55 -0
- package/src/lib/components/element-detail-overlay.component.js +157 -0
- package/src/lib/components/element-detail-overlay.component.js.map +1 -0
- package/src/lib/components/element-detail.component.d.ts +56 -0
- package/src/lib/components/element-detail.component.js +171 -0
- package/src/lib/components/element-detail.component.js.map +1 -0
- package/src/lib/components/element-info-details.component.d.ts +18 -0
- package/src/lib/components/element-info-details.component.js +169 -0
- package/src/lib/components/element-info-details.component.js.map +1 -0
- package/src/lib/components/element-interactions-form.component.d.ts +21 -0
- package/src/lib/components/element-interactions-form.component.js +199 -0
- package/src/lib/components/element-interactions-form.component.js.map +1 -0
- package/src/lib/components/element-preview.component.d.ts +75 -0
- package/src/lib/components/element-preview.component.js +346 -0
- package/src/lib/components/element-preview.component.js.map +1 -0
- package/src/lib/components/element-props-form.component.d.ts +565 -0
- package/src/lib/components/element-props-form.component.js +2392 -0
- package/src/lib/components/element-props-form.component.js.map +1 -0
- package/src/lib/components/element-styles-form-template.component.d.ts +27 -0
- package/src/lib/components/element-styles-form-template.component.js +89 -0
- package/src/lib/components/element-styles-form-template.component.js.map +1 -0
- package/src/lib/components/element-styles-form.component.d.ts +52 -0
- package/src/lib/components/element-styles-form.component.js +1350 -0
- package/src/lib/components/element-styles-form.component.js.map +1 -0
- package/src/lib/components/empty-document-slot.d.ts +39 -0
- package/src/lib/components/empty-document-slot.js +121 -0
- package/src/lib/components/empty-document-slot.js.map +1 -0
- package/src/lib/components/empty-results.d.ts +22 -0
- package/src/lib/components/empty-results.js +131 -0
- package/src/lib/components/empty-results.js.map +1 -0
- package/src/lib/components/history-controls.component.d.ts +21 -0
- package/src/lib/components/history-controls.component.js +67 -0
- package/src/lib/components/history-controls.component.js.map +1 -0
- package/src/lib/components/inline-markdown-editor.component.d.ts +17 -0
- package/src/lib/components/inline-markdown-editor.component.js +220 -0
- package/src/lib/components/inline-markdown-editor.component.js.map +1 -0
- package/src/lib/components/inline-text-editor.component.d.ts +48 -0
- package/src/lib/components/inline-text-editor.component.js +905 -0
- package/src/lib/components/inline-text-editor.component.js.map +1 -0
- package/src/lib/components/insert-token-menu.component.d.ts +86 -0
- package/src/lib/components/insert-token-menu.component.js +232 -0
- package/src/lib/components/insert-token-menu.component.js.map +1 -0
- package/src/lib/components/instance-attr-overrides.component.d.ts +50 -0
- package/src/lib/components/instance-attr-overrides.component.js +298 -0
- package/src/lib/components/instance-attr-overrides.component.js.map +1 -0
- package/src/lib/components/interact-controls.component.d.ts +22 -0
- package/src/lib/components/interact-controls.component.js +74 -0
- package/src/lib/components/interact-controls.component.js.map +1 -0
- package/src/lib/components/markdown-attribute-field.component.d.ts +40 -0
- package/src/lib/components/markdown-attribute-field.component.js +103 -0
- package/src/lib/components/markdown-attribute-field.component.js.map +1 -0
- package/src/lib/components/node-card.d.ts +24 -0
- package/src/lib/components/node-card.js +86 -0
- package/src/lib/components/node-card.js.map +1 -0
- package/src/lib/components/node-context-menu.d.ts +25 -0
- package/src/lib/components/node-context-menu.js +558 -0
- package/src/lib/components/node-context-menu.js.map +1 -0
- package/src/lib/components/node-leaf.d.ts +39 -0
- package/src/lib/components/node-leaf.js +628 -0
- package/src/lib/components/node-leaf.js.map +1 -0
- package/src/lib/components/node-outline.d.ts +24 -0
- package/src/lib/components/node-outline.js +156 -0
- package/src/lib/components/node-outline.js.map +1 -0
- package/src/lib/components/node-overlay.d.ts +23 -0
- package/src/lib/components/node-overlay.js +299 -0
- package/src/lib/components/node-overlay.js.map +1 -0
- package/src/lib/components/node-quick-actions.d.ts +24 -0
- package/src/lib/components/node-quick-actions.js +284 -0
- package/src/lib/components/node-quick-actions.js.map +1 -0
- package/src/lib/components/node-tree-view.d.ts +106 -0
- package/src/lib/components/node-tree-view.js +820 -0
- package/src/lib/components/node-tree-view.js.map +1 -0
- package/src/lib/components/panel-controls.component.d.ts +22 -0
- package/src/lib/components/panel-controls.component.js +76 -0
- package/src/lib/components/panel-controls.component.js.map +1 -0
- package/src/lib/components/picker-search-field.d.ts +38 -0
- package/src/lib/components/picker-search-field.js +79 -0
- package/src/lib/components/picker-search-field.js.map +1 -0
- package/src/lib/components/plugin-settings-field.component.d.ts +38 -0
- package/src/lib/components/plugin-settings-field.component.js +264 -0
- package/src/lib/components/plugin-settings-field.component.js.map +1 -0
- package/src/lib/components/properties-dialog.component.d.ts +22 -0
- package/src/lib/components/properties-dialog.component.js +40 -0
- package/src/lib/components/properties-dialog.component.js.map +1 -0
- package/src/lib/components/property-binding-field.component.d.ts +142 -0
- package/src/lib/components/property-binding-field.component.js +325 -0
- package/src/lib/components/property-binding-field.component.js.map +1 -0
- package/src/lib/components/property-values-form.component.d.ts +43 -0
- package/src/lib/components/property-values-form.component.js +223 -0
- package/src/lib/components/property-values-form.component.js.map +1 -0
- package/src/lib/components/scheme-preview-controls.component.d.ts +26 -0
- package/src/lib/components/scheme-preview-controls.component.js +56 -0
- package/src/lib/components/scheme-preview-controls.component.js.map +1 -0
- package/src/lib/components/screen-link-field.component.d.ts +118 -0
- package/src/lib/components/screen-link-field.component.js +282 -0
- package/src/lib/components/screen-link-field.component.js.map +1 -0
- package/src/lib/components/site-theme-color-tokens-provider.component.d.ts +33 -0
- package/src/lib/components/site-theme-color-tokens-provider.component.js +53 -0
- package/src/lib/components/site-theme-color-tokens-provider.component.js.map +1 -0
- package/src/lib/components/subtree-json-dialog.component.d.ts +46 -0
- package/src/lib/components/subtree-json-dialog.component.js +125 -0
- package/src/lib/components/subtree-json-dialog.component.js.map +1 -0
- package/src/lib/components/token-pill.component.d.ts +51 -0
- package/src/lib/components/token-pill.component.js +164 -0
- package/src/lib/components/token-pill.component.js.map +1 -0
- package/src/lib/components/token-text-field.component.d.ts +146 -0
- package/src/lib/components/token-text-field.component.js +603 -0
- package/src/lib/components/token-text-field.component.js.map +1 -0
- package/src/lib/components/tree/tree-list.d.ts +6 -0
- package/src/lib/components/tree/tree-list.js +108 -0
- package/src/lib/components/tree/tree-list.js.map +1 -0
- package/src/lib/components/viewport-canvas.component.d.ts +23 -0
- package/src/lib/components/viewport-canvas.component.js +128 -0
- package/src/lib/components/viewport-canvas.component.js.map +1 -0
- package/src/lib/components/viewport-frame.component.d.ts +47 -0
- package/src/lib/components/viewport-frame.component.js +332 -0
- package/src/lib/components/viewport-frame.component.js.map +1 -0
- package/src/lib/components/viewport-root.component.d.ts +22 -0
- package/src/lib/components/viewport-root.component.js +112 -0
- package/src/lib/components/viewport-root.component.js.map +1 -0
- package/src/lib/components/viewport-zoom-controls.d.ts +29 -0
- package/src/lib/components/viewport-zoom-controls.js +147 -0
- package/src/lib/components/viewport-zoom-controls.js.map +1 -0
- package/src/lib/components/workspace-editor.component.d.ts +23 -0
- package/src/lib/components/workspace-editor.component.js +191 -0
- package/src/lib/components/workspace-editor.component.js.map +1 -0
- package/src/lib/components/workspace-panel.component.d.ts +28 -0
- package/src/lib/components/workspace-panel.component.js +147 -0
- package/src/lib/components/workspace-panel.component.js.map +1 -0
- package/src/lib/constants/sample-data.d.ts +18 -0
- package/src/lib/constants/sample-data.js +106 -0
- package/src/lib/constants/sample-data.js.map +1 -0
- package/src/lib/constants/shared.d.ts +17 -0
- package/src/lib/constants/shared.js +18 -0
- package/src/lib/constants/shared.js.map +1 -0
- package/src/lib/contexts/besigner-app-context.d.ts +30 -0
- package/src/lib/contexts/besigner-app-context.js +41 -0
- package/src/lib/contexts/besigner-app-context.js.map +1 -0
- package/src/lib/contexts/binding-picker-context.d.ts +78 -0
- package/src/lib/contexts/binding-picker-context.js +21 -0
- package/src/lib/contexts/binding-picker-context.js.map +1 -0
- package/src/lib/contexts/canvas-host-tokens-context.d.ts +49 -0
- package/src/lib/contexts/canvas-host-tokens-context.js +63 -0
- package/src/lib/contexts/canvas-host-tokens-context.js.map +1 -0
- package/src/lib/contexts/canvas-reveal-context.d.ts +32 -0
- package/src/lib/contexts/canvas-reveal-context.js +34 -0
- package/src/lib/contexts/canvas-reveal-context.js.map +1 -0
- package/src/lib/contexts/component-promotion-context.d.ts +89 -0
- package/src/lib/contexts/component-promotion-context.js +21 -0
- package/src/lib/contexts/component-promotion-context.js.map +1 -0
- package/src/lib/contexts/components-drawer-context.provider.d.ts +32 -0
- package/src/lib/contexts/components-drawer-context.provider.js +80 -0
- package/src/lib/contexts/components-drawer-context.provider.js.map +1 -0
- package/src/lib/contexts/element-drawer-context.d.ts +1005 -0
- package/src/lib/contexts/element-drawer-context.js +45 -0
- package/src/lib/contexts/element-drawer-context.js.map +1 -0
- package/src/lib/contexts/inspected-selection.d.ts +32 -0
- package/src/lib/contexts/inspected-selection.js +38 -0
- package/src/lib/contexts/inspected-selection.js.map +1 -0
- package/src/lib/contexts/inspector-extras-context.d.ts +56 -0
- package/src/lib/contexts/inspector-extras-context.js +35 -0
- package/src/lib/contexts/inspector-extras-context.js.map +1 -0
- package/src/lib/contexts/interactions-context.d.ts +99 -0
- package/src/lib/contexts/interactions-context.js +22 -0
- package/src/lib/contexts/interactions-context.js.map +1 -0
- package/src/lib/contexts/layout-chrome-context.d.ts +37 -0
- package/src/lib/contexts/layout-chrome-context.js +75 -0
- package/src/lib/contexts/layout-chrome-context.js.map +1 -0
- package/src/lib/contexts/media-asset-facts-context.d.ts +74 -0
- package/src/lib/contexts/media-asset-facts-context.js +27 -0
- package/src/lib/contexts/media-asset-facts-context.js.map +1 -0
- package/src/lib/contexts/media-picker-context.d.ts +88 -0
- package/src/lib/contexts/media-picker-context.js +21 -0
- package/src/lib/contexts/media-picker-context.js.map +1 -0
- package/src/lib/contexts/rendered-canvas-elements.d.ts +42 -0
- package/src/lib/contexts/rendered-canvas-elements.js +79 -0
- package/src/lib/contexts/rendered-canvas-elements.js.map +1 -0
- package/src/lib/contexts/repeat-record-context.d.ts +38 -0
- package/src/lib/contexts/repeat-record-context.js +21 -0
- package/src/lib/contexts/repeat-record-context.js.map +1 -0
- package/src/lib/contexts/repeat-rows-context.d.ts +53 -0
- package/src/lib/contexts/repeat-rows-context.js +38 -0
- package/src/lib/contexts/repeat-rows-context.js.map +1 -0
- package/src/lib/contexts/toolbar-extras-context.d.ts +31 -0
- package/src/lib/contexts/toolbar-extras-context.js +33 -0
- package/src/lib/contexts/toolbar-extras-context.js.map +1 -0
- package/src/lib/drafts/besigner-draft-store.d.ts +110 -0
- package/src/lib/drafts/besigner-draft-store.js +125 -0
- package/src/lib/drafts/besigner-draft-store.js.map +1 -0
- package/src/lib/drafts/besigner-server-draft.d.ts +130 -0
- package/src/lib/drafts/besigner-server-draft.js +211 -0
- package/src/lib/drafts/besigner-server-draft.js.map +1 -0
- package/src/lib/form-fields/components/shared/inline-form-control.d.ts +32 -0
- package/src/lib/form-fields/components/shared/inline-form-control.js +85 -0
- package/src/lib/form-fields/components/shared/inline-form-control.js.map +1 -0
- package/src/lib/form-fields/components/shared/toggle-button-form-control.d.ts +33 -0
- package/src/lib/form-fields/components/shared/toggle-button-form-control.js +83 -0
- package/src/lib/form-fields/components/shared/toggle-button-form-control.js.map +1 -0
- package/src/lib/form-fields/form-fields.d.ts +20 -0
- package/src/lib/form-fields/form-fields.js +21 -0
- package/src/lib/form-fields/form-fields.js.map +1 -0
- package/src/lib/form-fields/index.d.ts +1 -0
- package/src/lib/form-fields/index.js +3 -0
- package/src/lib/form-fields/index.js.map +1 -0
- package/src/lib/hooks/use-add-element-drawer-callback.d.ts +28 -0
- package/src/lib/hooks/use-add-element-drawer-callback.js +112 -0
- package/src/lib/hooks/use-add-element-drawer-callback.js.map +1 -0
- package/src/lib/hooks/use-aglyn-besigner-flag.d.ts +23 -0
- package/src/lib/hooks/use-aglyn-besigner-flag.js +47 -0
- package/src/lib/hooks/use-aglyn-besigner-flag.js.map +1 -0
- package/src/lib/hooks/use-aglyn-besigner-panel-value.d.ts +23 -0
- package/src/lib/hooks/use-aglyn-besigner-panel-value.js +54 -0
- package/src/lib/hooks/use-aglyn-besigner-panel-value.js.map +1 -0
- package/src/lib/hooks/use-aglyn-besigner-panel.d.ts +23 -0
- package/src/lib/hooks/use-aglyn-besigner-panel.js +47 -0
- package/src/lib/hooks/use-aglyn-besigner-panel.js.map +1 -0
- package/src/lib/hooks/use-anchored-rect.d.ts +68 -0
- package/src/lib/hooks/use-anchored-rect.js +131 -0
- package/src/lib/hooks/use-anchored-rect.js.map +1 -0
- package/src/lib/hooks/use-besigner-app-context.d.ts +18 -0
- package/src/lib/hooks/use-besigner-app-context.js +19 -0
- package/src/lib/hooks/use-besigner-app-context.js.map +1 -0
- package/src/lib/hooks/use-besigner-document.d.ts +309 -0
- package/src/lib/hooks/use-besigner-document.js +500 -0
- package/src/lib/hooks/use-besigner-document.js.map +1 -0
- package/src/lib/hooks/use-besigner-draft.d.ts +209 -0
- package/src/lib/hooks/use-besigner-draft.js +429 -0
- package/src/lib/hooks/use-besigner-draft.js.map +1 -0
- package/src/lib/hooks/use-clipboard-callbacks.d.ts +29 -0
- package/src/lib/hooks/use-clipboard-callbacks.js +82 -0
- package/src/lib/hooks/use-clipboard-callbacks.js.map +1 -0
- package/src/lib/hooks/use-clipboard-shortcuts.d.ts +52 -0
- package/src/lib/hooks/use-clipboard-shortcuts.js +102 -0
- package/src/lib/hooks/use-clipboard-shortcuts.js.map +1 -0
- package/src/lib/hooks/use-component-propagation-notice.d.ts +96 -0
- package/src/lib/hooks/use-component-propagation-notice.js +177 -0
- package/src/lib/hooks/use-component-propagation-notice.js.map +1 -0
- package/src/lib/hooks/use-debounced-commit.d.ts +43 -0
- package/src/lib/hooks/use-debounced-commit.js +88 -0
- package/src/lib/hooks/use-debounced-commit.js.map +1 -0
- package/src/lib/hooks/use-delete-element-callback.d.ts +24 -0
- package/src/lib/hooks/use-delete-element-callback.js +82 -0
- package/src/lib/hooks/use-delete-element-callback.js.map +1 -0
- package/src/lib/hooks/use-detail-hover-intent.d.ts +76 -0
- package/src/lib/hooks/use-detail-hover-intent.js +123 -0
- package/src/lib/hooks/use-detail-hover-intent.js.map +1 -0
- package/src/lib/hooks/use-document-repair-callbacks.d.ts +50 -0
- package/src/lib/hooks/use-document-repair-callbacks.js +237 -0
- package/src/lib/hooks/use-document-repair-callbacks.js.map +1 -0
- package/src/lib/hooks/use-insert-token-options.d.ts +52 -0
- package/src/lib/hooks/use-insert-token-options.js +230 -0
- package/src/lib/hooks/use-insert-token-options.js.map +1 -0
- package/src/lib/hooks/use-leaf-drag.d.ts +24 -0
- package/src/lib/hooks/use-leaf-drag.js +28 -0
- package/src/lib/hooks/use-leaf-drag.js.map +1 -0
- package/src/lib/hooks/use-leaf-drop.d.ts +31 -0
- package/src/lib/hooks/use-leaf-drop.js +43 -0
- package/src/lib/hooks/use-leaf-drop.js.map +1 -0
- package/src/lib/hooks/use-markdown-media-picker.d.ts +63 -0
- package/src/lib/hooks/use-markdown-media-picker.js +110 -0
- package/src/lib/hooks/use-markdown-media-picker.js.map +1 -0
- package/src/lib/hooks/use-media-asset-facts-overlay.d.ts +43 -0
- package/src/lib/hooks/use-media-asset-facts-overlay.js +133 -0
- package/src/lib/hooks/use-media-asset-facts-overlay.js.map +1 -0
- package/src/lib/hooks/use-move-node-callbacks.d.ts +22 -0
- package/src/lib/hooks/use-move-node-callbacks.js +57 -0
- package/src/lib/hooks/use-move-node-callbacks.js.map +1 -0
- package/src/lib/hooks/use-node-with-host-tokens.d.ts +42 -0
- package/src/lib/hooks/use-node-with-host-tokens.js +59 -0
- package/src/lib/hooks/use-node-with-host-tokens.js.map +1 -0
- package/src/lib/hooks/use-picker-filter.d.ts +61 -0
- package/src/lib/hooks/use-picker-filter.js +122 -0
- package/src/lib/hooks/use-picker-filter.js.map +1 -0
- package/src/lib/hooks/use-repeat-preview.d.ts +64 -0
- package/src/lib/hooks/use-repeat-preview.js +214 -0
- package/src/lib/hooks/use-repeat-preview.js.map +1 -0
- package/src/lib/hooks/use-repeat-sources.d.ts +17 -0
- package/src/lib/hooks/use-repeat-sources.js +41 -0
- package/src/lib/hooks/use-repeat-sources.js.map +1 -0
- package/src/lib/hooks/use-visible-component-categories.d.ts +37 -0
- package/src/lib/hooks/use-visible-component-categories.js +79 -0
- package/src/lib/hooks/use-visible-component-categories.js.map +1 -0
- package/src/lib/utils/active-host-theme.d.ts +28 -0
- package/src/lib/utils/active-host-theme.js +77 -0
- package/src/lib/utils/active-host-theme.js.map +1 -0
- package/src/lib/utils/attr-target.d.ts +170 -0
- package/src/lib/utils/attr-target.js +229 -0
- package/src/lib/utils/attr-target.js.map +1 -0
- package/src/lib/utils/attribute-field-value.d.ts +21 -0
- package/src/lib/utils/attribute-field-value.js +28 -0
- package/src/lib/utils/attribute-field-value.js.map +1 -0
- package/src/lib/utils/canvas-context-menu.d.ts +28 -0
- package/src/lib/utils/canvas-context-menu.js +56 -0
- package/src/lib/utils/canvas-context-menu.js.map +1 -0
- package/src/lib/utils/canvas-reveal.d.ts +115 -0
- package/src/lib/utils/canvas-reveal.js +165 -0
- package/src/lib/utils/canvas-reveal.js.map +1 -0
- package/src/lib/utils/describe-element.d.ts +72 -0
- package/src/lib/utils/describe-element.js +159 -0
- package/src/lib/utils/describe-element.js.map +1 -0
- package/src/lib/utils/device-preview-styles.d.ts +89 -0
- package/src/lib/utils/device-preview-styles.js +228 -0
- package/src/lib/utils/device-preview-styles.js.map +1 -0
- package/src/lib/utils/docs-help.d.ts +22 -0
- package/src/lib/utils/docs-help.generated.d.ts +47 -0
- package/src/lib/utils/docs-help.generated.js +229 -0
- package/src/lib/utils/docs-help.generated.js.map +1 -0
- package/src/lib/utils/docs-help.js +37 -0
- package/src/lib/utils/docs-help.js.map +1 -0
- package/src/lib/utils/held-answers-store.d.ts +59 -0
- package/src/lib/utils/held-answers-store.js +94 -0
- package/src/lib/utils/held-answers-store.js.map +1 -0
- package/src/lib/utils/in-place-edit-surface.d.ts +118 -0
- package/src/lib/utils/in-place-edit-surface.js +164 -0
- package/src/lib/utils/in-place-edit-surface.js.map +1 -0
- package/src/lib/utils/inline-markdown-edit.store.d.ts +71 -0
- package/src/lib/utils/inline-markdown-edit.store.js +90 -0
- package/src/lib/utils/inline-markdown-edit.store.js.map +1 -0
- package/src/lib/utils/inline-text-edit.store.d.ts +85 -0
- package/src/lib/utils/inline-text-edit.store.js +78 -0
- package/src/lib/utils/inline-text-edit.store.js.map +1 -0
- package/src/lib/utils/instance-leaf-hit.d.ts +39 -0
- package/src/lib/utils/instance-leaf-hit.js +56 -0
- package/src/lib/utils/instance-leaf-hit.js.map +1 -0
- package/src/lib/utils/muted-classes.d.ts +76 -0
- package/src/lib/utils/muted-classes.js +108 -0
- package/src/lib/utils/muted-classes.js.map +1 -0
- package/src/lib/utils/muted-styles.d.ts +125 -0
- package/src/lib/utils/muted-styles.js +193 -0
- package/src/lib/utils/muted-styles.js.map +1 -0
- package/src/lib/utils/numeric-text-value.d.ts +42 -0
- package/src/lib/utils/numeric-text-value.js +47 -0
- package/src/lib/utils/numeric-text-value.js.map +1 -0
- package/src/lib/utils/preset-interactions.d.ts +37 -0
- package/src/lib/utils/preset-interactions.js +87 -0
- package/src/lib/utils/preset-interactions.js.map +1 -0
- package/src/lib/utils/publish-failure-message.d.ts +35 -0
- package/src/lib/utils/publish-failure-message.js +51 -0
- package/src/lib/utils/publish-failure-message.js.map +1 -0
- package/src/lib/utils/rank-picker-results.d.ts +45 -0
- package/src/lib/utils/rank-picker-results.js +136 -0
- package/src/lib/utils/rank-picker-results.js.map +1 -0
- package/src/lib/utils/responsive-sx.d.ts +65 -0
- package/src/lib/utils/responsive-sx.js +129 -0
- package/src/lib/utils/responsive-sx.js.map +1 -0
- package/src/lib/utils/rich-text-commands.d.ts +28 -0
- package/src/lib/utils/rich-text-commands.js +43 -0
- package/src/lib/utils/rich-text-commands.js.map +1 -0
- package/src/lib/utils/sanitize-rich-text.d.ts +52 -0
- package/src/lib/utils/sanitize-rich-text.js +173 -0
- package/src/lib/utils/sanitize-rich-text.js.map +1 -0
- package/src/lib/utils/state-sx.d.ts +255 -0
- package/src/lib/utils/state-sx.js +338 -0
- package/src/lib/utils/state-sx.js.map +1 -0
- package/src/lib/utils/style-field-groups.d.ts +136 -0
- package/src/lib/utils/style-field-groups.js +874 -0
- package/src/lib/utils/style-field-groups.js.map +1 -0
- package/src/lib/utils/style-field-search.d.ts +84 -0
- package/src/lib/utils/style-field-search.js +505 -0
- package/src/lib/utils/style-field-search.js.map +1 -0
- package/src/lib/utils/style-target.d.ts +69 -0
- package/src/lib/utils/style-target.js +203 -0
- package/src/lib/utils/style-target.js.map +1 -0
- package/src/lib/utils/theme-scale-options.d.ts +169 -0
- package/src/lib/utils/theme-scale-options.js +702 -0
- package/src/lib/utils/theme-scale-options.js.map +1 -0
- package/src/lib/utils/token-editable-dom.d.ts +82 -0
- package/src/lib/utils/token-editable-dom.js +280 -0
- package/src/lib/utils/token-editable-dom.js.map +1 -0
- package/src/lib/utils/token-segments.d.ts +111 -0
- package/src/lib/utils/token-segments.js +246 -0
- package/src/lib/utils/token-segments.js.map +1 -0
- package/src/lib/utils/visibility-styles.d.ts +38 -0
- package/src/lib/utils/visibility-styles.js +54 -0
- package/src/lib/utils/visibility-styles.js.map +1 -0
|
@@ -0,0 +1,558 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright 2026 Aglyn LLC
|
|
4
|
+
*
|
|
5
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
6
|
+
* you may not use this file except in compliance with the License.
|
|
7
|
+
* You may obtain a copy of the License at
|
|
8
|
+
*
|
|
9
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
10
|
+
*
|
|
11
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
12
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
13
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
14
|
+
* See the License for the specific language governing permissions and
|
|
15
|
+
* limitations under the License.
|
|
16
|
+
*/ import { _ as _extends } from "@swc/helpers/_/_extends";
|
|
17
|
+
import { _ as _object_without_properties_loose } from "@swc/helpers/_/_object_without_properties_loose";
|
|
18
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
19
|
+
import { canvas } from "@aglyn/aglyn";
|
|
20
|
+
import * as Besigner from "@aglyn/besigner";
|
|
21
|
+
import { BesignerPanelTabFlag, setBesignerPanels } from "@aglyn/besigner";
|
|
22
|
+
import { ICON_VARIANT_MODIFY_COPY, ICON_VARIANT_MODIFY_DELETE, ICON_VARIANT_MODIFY_DUPLICATE, ICON_VARIANT_MODIFY_MOVE_DOWN, ICON_VARIANT_MODIFY_MOVE_IN, ICON_VARIANT_MODIFY_MOVE_OUT, ICON_VARIANT_MODIFY_MOVE_UP, ICON_VARIANT_MODIFY_PASTE, ICON_VARIANT_VISIBILITY_HIDDEN, ICON_VARIANT_VISIBILITY_SHOWN } from "@aglyn/shared-data-enums";
|
|
23
|
+
import { MdiIcon } from "@aglyn/shared-ui-jsx";
|
|
24
|
+
import { Divider, ListItemIcon, ListItemText, MenuItem, MenuList, Paper, Typography } from "@mui/material";
|
|
25
|
+
import { action } from "mobx";
|
|
26
|
+
import { observer } from "mobx-react-lite";
|
|
27
|
+
import { forwardRef, useCallback, useState } from "react";
|
|
28
|
+
import useAglynBesignerFlag from "../hooks/use-aglyn-besigner-flag.js";
|
|
29
|
+
import useAddElementDrawerCallback from "../hooks/use-add-element-drawer-callback.js";
|
|
30
|
+
import useBesignerAppContext from "../hooks/use-besigner-app-context.js";
|
|
31
|
+
import { useCopyElementsCallback, usePasteElementsCallback } from "../hooks/use-clipboard-callbacks.js";
|
|
32
|
+
import useDeleteElementCallback, { useDeleteElementsCallback } from "../hooks/use-delete-element-callback.js";
|
|
33
|
+
import { useMoveNodeInCallback, useMoveNodeOutCallback } from "../hooks/use-move-node-callbacks.js";
|
|
34
|
+
import { isNodeHiddenOnSite, nodePropsWithHiddenOnSite } from "../utils/canvas-reveal.js";
|
|
35
|
+
import SubtreeJsonDialog from "./subtree-json-dialog.component.js";
|
|
36
|
+
export const NodeContextMenu = observer(/*#__PURE__*/ forwardRef((props, ref)=>{
|
|
37
|
+
var _node_parent_nodes, _node_parent;
|
|
38
|
+
const { node, onAction } = props, rest = _object_without_properties_loose(props, [
|
|
39
|
+
"node",
|
|
40
|
+
"onAction"
|
|
41
|
+
]);
|
|
42
|
+
const isRootNode = canvas.isRootNode(node);
|
|
43
|
+
// Multi-selection (AGL-11): ambiguous single-target actions hide or
|
|
44
|
+
// disable; Duplicate/Delete apply to the whole selection.
|
|
45
|
+
const multi = Besigner.focus.hasMultipleSelected();
|
|
46
|
+
const app = useBesignerAppContext();
|
|
47
|
+
const handleAddElementClick = useAddElementDrawerCallback();
|
|
48
|
+
const elementRef = Besigner.refs.get(node == null ? void 0 : node.$id);
|
|
49
|
+
const [moreOpen, setMoreOpen] = useState(false);
|
|
50
|
+
const [moreButton, moreButtonRef] = useState(null);
|
|
51
|
+
const [jsonOpen, setJsonOpen] = useState(false);
|
|
52
|
+
const closeMore = useCallback(()=>setMoreOpen(false), []);
|
|
53
|
+
const openMore = useCallback(()=>setMoreOpen(true), []);
|
|
54
|
+
const handleDuplicateClick = useCallback((e)=>{
|
|
55
|
+
if (isRootNode) return;
|
|
56
|
+
onAction == null ? void 0 : onAction();
|
|
57
|
+
const targets = multi ? Besigner.focus.getSelected() : [
|
|
58
|
+
node
|
|
59
|
+
];
|
|
60
|
+
for (const target of targets){
|
|
61
|
+
if (target && !canvas.isRootNode(target)) {
|
|
62
|
+
canvas.duplicateNode(target);
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
}, [
|
|
66
|
+
node,
|
|
67
|
+
isRootNode,
|
|
68
|
+
multi,
|
|
69
|
+
onAction
|
|
70
|
+
]);
|
|
71
|
+
const handleModifyClick = useCallback((e)=>{
|
|
72
|
+
setBesignerPanels(app, {
|
|
73
|
+
panels: (panels)=>_extends({}, panels, {
|
|
74
|
+
panelRight: _extends({}, panels.panelRight, {
|
|
75
|
+
toggled: true,
|
|
76
|
+
tab: BesignerPanelTabFlag.ELEMENT_PROPS_FORM
|
|
77
|
+
})
|
|
78
|
+
})
|
|
79
|
+
});
|
|
80
|
+
}, [
|
|
81
|
+
app
|
|
82
|
+
]);
|
|
83
|
+
const handleMoveUp = useCallback((e)=>{
|
|
84
|
+
if (isRootNode) return;
|
|
85
|
+
canvas.reorderNode(node, (node == null ? void 0 : node.index) - 1);
|
|
86
|
+
}, [
|
|
87
|
+
node,
|
|
88
|
+
isRootNode
|
|
89
|
+
]);
|
|
90
|
+
const handleMoveDown = useCallback((e)=>{
|
|
91
|
+
if (isRootNode) return;
|
|
92
|
+
canvas.reorderNode(node, (node == null ? void 0 : node.index) + 1);
|
|
93
|
+
}, [
|
|
94
|
+
node,
|
|
95
|
+
isRootNode
|
|
96
|
+
]);
|
|
97
|
+
/**
|
|
98
|
+
* Reparenting by clicking (AGL-1405). Until these two existed, the only
|
|
99
|
+
* way to move a node into a different container was to drag it — so a
|
|
100
|
+
* node that ended up somewhere it can never render (AGL-1388) could only
|
|
101
|
+
* be rescued by hand-editing the document's JSON.
|
|
102
|
+
*
|
|
103
|
+
* `canMove*` is read through the observer, so the items enable and
|
|
104
|
+
* disable as the selection moves, and both refuse anything the renderer
|
|
105
|
+
* could not draw rather than accepting it and stranding the subtree.
|
|
106
|
+
*/ const moveNodeOut = useMoveNodeOutCallback();
|
|
107
|
+
const moveNodeIn = useMoveNodeInCallback();
|
|
108
|
+
const canMoveOut = !multi && Besigner.canMoveNodeOut(node);
|
|
109
|
+
const canMoveIn = !multi && Besigner.canMoveNodeIn(node);
|
|
110
|
+
const handleMoveOut = useCallback(()=>{
|
|
111
|
+
onAction == null ? void 0 : onAction();
|
|
112
|
+
moveNodeOut(node);
|
|
113
|
+
}, [
|
|
114
|
+
node,
|
|
115
|
+
onAction,
|
|
116
|
+
moveNodeOut
|
|
117
|
+
]);
|
|
118
|
+
const handleMoveIn = useCallback(()=>{
|
|
119
|
+
onAction == null ? void 0 : onAction();
|
|
120
|
+
moveNodeIn(node);
|
|
121
|
+
}, [
|
|
122
|
+
node,
|
|
123
|
+
onAction,
|
|
124
|
+
moveNodeIn
|
|
125
|
+
]);
|
|
126
|
+
const handleParentOnClick = useCallback((e)=>{
|
|
127
|
+
if (isRootNode) return;
|
|
128
|
+
Besigner.focus.setSelectedNode(node == null ? void 0 : node.parent);
|
|
129
|
+
}, [
|
|
130
|
+
node,
|
|
131
|
+
isRootNode
|
|
132
|
+
]);
|
|
133
|
+
const handleParentOnMouseEnter = useCallback((e)=>{
|
|
134
|
+
if (isRootNode) return;
|
|
135
|
+
Besigner.focus.setHoveredNode(node);
|
|
136
|
+
}, [
|
|
137
|
+
node,
|
|
138
|
+
isRootNode
|
|
139
|
+
]);
|
|
140
|
+
const handleParentOnMouseLeave = useCallback((e)=>{
|
|
141
|
+
if (isRootNode) return;
|
|
142
|
+
Besigner.focus.clearHover();
|
|
143
|
+
}, [
|
|
144
|
+
isRootNode
|
|
145
|
+
]);
|
|
146
|
+
const copyElements = useCopyElementsCallback();
|
|
147
|
+
const pasteElements = usePasteElementsCallback();
|
|
148
|
+
const handleCopyClick = useCallback(()=>{
|
|
149
|
+
if (isRootNode) return;
|
|
150
|
+
onAction == null ? void 0 : onAction();
|
|
151
|
+
copyElements(multi ? Besigner.focus.getSelected() : [
|
|
152
|
+
node
|
|
153
|
+
]);
|
|
154
|
+
}, [
|
|
155
|
+
node,
|
|
156
|
+
isRootNode,
|
|
157
|
+
multi,
|
|
158
|
+
onAction,
|
|
159
|
+
copyElements
|
|
160
|
+
]);
|
|
161
|
+
const handlePasteClick = useCallback(()=>{
|
|
162
|
+
onAction == null ? void 0 : onAction();
|
|
163
|
+
pasteElements(node);
|
|
164
|
+
}, [
|
|
165
|
+
node,
|
|
166
|
+
onAction,
|
|
167
|
+
pasteElements
|
|
168
|
+
]);
|
|
169
|
+
// Observed, so the item enables the moment something is copied — even
|
|
170
|
+
// from another document, where the entry arrives via localStorage.
|
|
171
|
+
const canPaste = Besigner.clipboard.hasContent();
|
|
172
|
+
const clipboardLabels = Besigner.clipboard.getLabels();
|
|
173
|
+
/**
|
|
174
|
+
* Start hidden until an interaction shows it (AGL-592).
|
|
175
|
+
*
|
|
176
|
+
* A DIFFERENT switch from the eye on the hierarchy row, and the naming is
|
|
177
|
+
* the whole point. The eye hides an element outright — `display: none`,
|
|
178
|
+
* nothing reveals it. This one enrols the element in a runtime contract:
|
|
179
|
+
* it starts hidden, an interaction's show step reveals it, and the canvas
|
|
180
|
+
* opens it while it is being designed. A mega-menu panel, a drawer, an
|
|
181
|
+
* announcement that appears on scroll.
|
|
182
|
+
*
|
|
183
|
+
* `aglyn-hidden` is the storage — the published stylesheet, the show/hide
|
|
184
|
+
* steps and the canvas reveal all key off it — and until this existed the
|
|
185
|
+
* only way to set it was to know the literal string and type it into the
|
|
186
|
+
* Classes box. An element property with no picker is a missing feature,
|
|
187
|
+
* not a power-user path.
|
|
188
|
+
*/ const [, setRevealedNodeIds] = useAglynBesignerFlag('revealedNodeIds');
|
|
189
|
+
const hiddenOnSite = isNodeHiddenOnSite(node);
|
|
190
|
+
const handleToggleHiddenClick = useCallback(()=>{
|
|
191
|
+
if (isRootNode) return;
|
|
192
|
+
onAction == null ? void 0 : onAction();
|
|
193
|
+
const targets = multi ? Besigner.focus.getSelected() : [
|
|
194
|
+
node
|
|
195
|
+
];
|
|
196
|
+
const changed = [];
|
|
197
|
+
action(()=>{
|
|
198
|
+
for (const target of targets){
|
|
199
|
+
if (!target || canvas.isRootNode(target)) continue;
|
|
200
|
+
const props = nodePropsWithHiddenOnSite(target, !hiddenOnSite);
|
|
201
|
+
if (!props) continue;
|
|
202
|
+
target.props = props;
|
|
203
|
+
changed.push(target.$id);
|
|
204
|
+
}
|
|
205
|
+
})();
|
|
206
|
+
// Showing an element again retires its canvas reveal with it. The flag
|
|
207
|
+
// is only meaningful for something the site hides, so leaving an entry
|
|
208
|
+
// behind means the next hide silently starts revealed. Hiding sets
|
|
209
|
+
// nothing: hidden is hidden, and selecting the element — which
|
|
210
|
+
// whichever surface opened this menu has already done — is what shows
|
|
211
|
+
// it while it is being designed.
|
|
212
|
+
if (hiddenOnSite && changed.length) {
|
|
213
|
+
setRevealedNodeIds((current)=>(current != null ? current : []).filter((id)=>!changed.includes(id)));
|
|
214
|
+
}
|
|
215
|
+
}, [
|
|
216
|
+
node,
|
|
217
|
+
isRootNode,
|
|
218
|
+
multi,
|
|
219
|
+
hiddenOnSite,
|
|
220
|
+
onAction,
|
|
221
|
+
setRevealedNodeIds
|
|
222
|
+
]);
|
|
223
|
+
/**
|
|
224
|
+
* Copy and paste a LOOK.
|
|
225
|
+
*
|
|
226
|
+
* `node.sx` — the Styles panel's whole output, including its responsive,
|
|
227
|
+
* `@scheme` and state slices, which are keys inside that object. Classes
|
|
228
|
+
* are deliberately not carried: a class is a name pointing at rules the
|
|
229
|
+
* element does not own, and two of them carry behaviour rather than
|
|
230
|
+
* appearance, so moving them under a label that promises looks would move
|
|
231
|
+
* behaviour with it.
|
|
232
|
+
*
|
|
233
|
+
* Paste REPLACES. Merging makes the result depend on what the target
|
|
234
|
+
* already had, so the same look pasted onto two elements could produce
|
|
235
|
+
* two different ones — and there would be no way to paste "no styles".
|
|
236
|
+
*/ const copiedStyleLabel = Besigner.styleClipboard.getStyleLabel();
|
|
237
|
+
const canPasteStyles = Besigner.styleClipboard.hasStyles();
|
|
238
|
+
const handleCopyStyles = useCallback(()=>{
|
|
239
|
+
if (isRootNode) return;
|
|
240
|
+
onAction == null ? void 0 : onAction();
|
|
241
|
+
Besigner.styleClipboard.copyStyles(node);
|
|
242
|
+
}, [
|
|
243
|
+
node,
|
|
244
|
+
isRootNode,
|
|
245
|
+
onAction
|
|
246
|
+
]);
|
|
247
|
+
const handlePasteStyles = useCallback(()=>{
|
|
248
|
+
if (isRootNode) return;
|
|
249
|
+
onAction == null ? void 0 : onAction();
|
|
250
|
+
const targets = multi ? Besigner.focus.getSelected() : [
|
|
251
|
+
node
|
|
252
|
+
];
|
|
253
|
+
for (const target of targets){
|
|
254
|
+
if (target && !canvas.isRootNode(target)) {
|
|
255
|
+
Besigner.styleClipboard.pasteStyles(target);
|
|
256
|
+
}
|
|
257
|
+
}
|
|
258
|
+
}, [
|
|
259
|
+
node,
|
|
260
|
+
isRootNode,
|
|
261
|
+
multi,
|
|
262
|
+
onAction
|
|
263
|
+
]);
|
|
264
|
+
const deleteElementCallback = useDeleteElementCallback();
|
|
265
|
+
const deleteElementsCallback = useDeleteElementsCallback();
|
|
266
|
+
const handleDeleteClick = useCallback(()=>{
|
|
267
|
+
closeMore();
|
|
268
|
+
onAction == null ? void 0 : onAction();
|
|
269
|
+
if (multi) void deleteElementsCallback(Besigner.focus.getSelected());
|
|
270
|
+
else void deleteElementCallback(node);
|
|
271
|
+
}, [
|
|
272
|
+
node,
|
|
273
|
+
multi,
|
|
274
|
+
closeMore,
|
|
275
|
+
onAction,
|
|
276
|
+
deleteElementCallback,
|
|
277
|
+
deleteElementsCallback
|
|
278
|
+
]);
|
|
279
|
+
return /*#__PURE__*/ _jsxs(Paper, _extends({
|
|
280
|
+
ref: ref,
|
|
281
|
+
sx: {
|
|
282
|
+
width: 240,
|
|
283
|
+
// Caps itself rather than growing past the window (AGL-1405). The
|
|
284
|
+
// Popper can only slide a menu back inside the viewport if it FITS
|
|
285
|
+
// in one; a taller menu was laid out past the bottom of the
|
|
286
|
+
// document and the page grew a scrollbar around it. `dvh` so a
|
|
287
|
+
// mobile browser's retracting toolbar does not leave the last item
|
|
288
|
+
// under it.
|
|
289
|
+
// Shorter than the window, not merely within it. A menu that only
|
|
290
|
+
// just fits is one `preventOverflow` has to slide a long way to
|
|
291
|
+
// place, and a menu that lands 200px from where it was asked for
|
|
292
|
+
// reads as landing at random.
|
|
293
|
+
maxHeight: 'min(420px, calc(100dvh - 24px))',
|
|
294
|
+
overflowY: 'auto',
|
|
295
|
+
overflowX: 'hidden'
|
|
296
|
+
}
|
|
297
|
+
}, rest, {
|
|
298
|
+
children: [
|
|
299
|
+
/*#__PURE__*/ _jsxs(MenuList, {
|
|
300
|
+
dense: true,
|
|
301
|
+
children: [
|
|
302
|
+
/*#__PURE__*/ _jsx(Typography, {
|
|
303
|
+
variant: "caption",
|
|
304
|
+
color: "text.secondary",
|
|
305
|
+
component: "div",
|
|
306
|
+
sx: {
|
|
307
|
+
px: 1,
|
|
308
|
+
py: 0.15,
|
|
309
|
+
mb: 1,
|
|
310
|
+
textAlign: 'center',
|
|
311
|
+
textOverflow: 'ellipsis',
|
|
312
|
+
overflow: 'hidden',
|
|
313
|
+
whiteSpace: 'nowrap',
|
|
314
|
+
backgroundColor: (theme)=>`rgba(${theme.vars.palette.primary.darkChannel} / 0.12)`
|
|
315
|
+
},
|
|
316
|
+
children: node == null ? void 0 : node.labelShort
|
|
317
|
+
}),
|
|
318
|
+
multi ? null : /*#__PURE__*/ _jsx(MenuItem, {
|
|
319
|
+
onClick: ()=>{
|
|
320
|
+
onAction == null ? void 0 : onAction();
|
|
321
|
+
handleAddElementClick(node);
|
|
322
|
+
},
|
|
323
|
+
children: /*#__PURE__*/ _jsx(ListItemText, {
|
|
324
|
+
inset: true,
|
|
325
|
+
children: "Add element"
|
|
326
|
+
})
|
|
327
|
+
}),
|
|
328
|
+
multi ? null : /*#__PURE__*/ _jsx(Divider, {}),
|
|
329
|
+
/*#__PURE__*/ _jsx(MenuItem, {
|
|
330
|
+
onClick: handleParentOnClick,
|
|
331
|
+
disabled: isRootNode || multi,
|
|
332
|
+
onMouseEnter: handleParentOnMouseEnter,
|
|
333
|
+
onPointerEnter: handleParentOnMouseEnter,
|
|
334
|
+
onMouseLeave: handleParentOnMouseLeave,
|
|
335
|
+
onPointerLeave: handleParentOnMouseLeave,
|
|
336
|
+
children: /*#__PURE__*/ _jsx(ListItemText, {
|
|
337
|
+
inset: true,
|
|
338
|
+
children: "Select parent"
|
|
339
|
+
})
|
|
340
|
+
}),
|
|
341
|
+
/*#__PURE__*/ _jsxs(MenuItem, {
|
|
342
|
+
onClick: handleMoveUp,
|
|
343
|
+
disabled: isRootNode || multi || !((node == null ? void 0 : node.index) > 0),
|
|
344
|
+
children: [
|
|
345
|
+
/*#__PURE__*/ _jsx(ListItemIcon, {
|
|
346
|
+
children: /*#__PURE__*/ _jsx(MdiIcon, {
|
|
347
|
+
fontSize: "inherit",
|
|
348
|
+
path: ICON_VARIANT_MODIFY_MOVE_UP.path
|
|
349
|
+
})
|
|
350
|
+
}),
|
|
351
|
+
/*#__PURE__*/ _jsx(ListItemText, {
|
|
352
|
+
children: "Shift up"
|
|
353
|
+
})
|
|
354
|
+
]
|
|
355
|
+
}),
|
|
356
|
+
/*#__PURE__*/ _jsxs(MenuItem, {
|
|
357
|
+
onClick: handleMoveDown,
|
|
358
|
+
disabled: isRootNode || multi || !((node == null ? void 0 : node.index) < (node == null ? void 0 : (_node_parent = node.parent) == null ? void 0 : (_node_parent_nodes = _node_parent.nodes) == null ? void 0 : _node_parent_nodes.length) - 1),
|
|
359
|
+
children: [
|
|
360
|
+
/*#__PURE__*/ _jsx(ListItemIcon, {
|
|
361
|
+
children: /*#__PURE__*/ _jsx(MdiIcon, {
|
|
362
|
+
fontSize: "inherit",
|
|
363
|
+
path: ICON_VARIANT_MODIFY_MOVE_DOWN.path
|
|
364
|
+
})
|
|
365
|
+
}),
|
|
366
|
+
/*#__PURE__*/ _jsx(ListItemText, {
|
|
367
|
+
children: "Shift down"
|
|
368
|
+
})
|
|
369
|
+
]
|
|
370
|
+
}),
|
|
371
|
+
/*#__PURE__*/ _jsxs(MenuItem, {
|
|
372
|
+
onClick: handleMoveOut,
|
|
373
|
+
disabled: !canMoveOut,
|
|
374
|
+
children: [
|
|
375
|
+
/*#__PURE__*/ _jsx(ListItemIcon, {
|
|
376
|
+
children: /*#__PURE__*/ _jsx(MdiIcon, {
|
|
377
|
+
fontSize: "inherit",
|
|
378
|
+
path: ICON_VARIANT_MODIFY_MOVE_OUT.path
|
|
379
|
+
})
|
|
380
|
+
}),
|
|
381
|
+
/*#__PURE__*/ _jsx(ListItemText, {
|
|
382
|
+
children: "Move out of container"
|
|
383
|
+
})
|
|
384
|
+
]
|
|
385
|
+
}),
|
|
386
|
+
/*#__PURE__*/ _jsxs(MenuItem, {
|
|
387
|
+
onClick: handleMoveIn,
|
|
388
|
+
disabled: !canMoveIn,
|
|
389
|
+
children: [
|
|
390
|
+
/*#__PURE__*/ _jsx(ListItemIcon, {
|
|
391
|
+
children: /*#__PURE__*/ _jsx(MdiIcon, {
|
|
392
|
+
fontSize: "inherit",
|
|
393
|
+
path: ICON_VARIANT_MODIFY_MOVE_IN.path
|
|
394
|
+
})
|
|
395
|
+
}),
|
|
396
|
+
/*#__PURE__*/ _jsx(ListItemText, {
|
|
397
|
+
children: "Move into element above"
|
|
398
|
+
})
|
|
399
|
+
]
|
|
400
|
+
}),
|
|
401
|
+
multi ? null : /*#__PURE__*/ _jsx(MenuItem, {
|
|
402
|
+
onClick: ()=>setJsonOpen(true),
|
|
403
|
+
children: /*#__PURE__*/ _jsx(ListItemText, {
|
|
404
|
+
inset: true,
|
|
405
|
+
children: "Edit JSON"
|
|
406
|
+
})
|
|
407
|
+
}),
|
|
408
|
+
/*#__PURE__*/ _jsxs(MenuItem, {
|
|
409
|
+
disabled: isRootNode,
|
|
410
|
+
onClick: handleToggleHiddenClick,
|
|
411
|
+
children: [
|
|
412
|
+
/*#__PURE__*/ _jsx(ListItemIcon, {
|
|
413
|
+
children: /*#__PURE__*/ _jsx(MdiIcon, {
|
|
414
|
+
fontSize: "inherit",
|
|
415
|
+
path: hiddenOnSite ? ICON_VARIANT_VISIBILITY_SHOWN.path : ICON_VARIANT_VISIBILITY_HIDDEN.path
|
|
416
|
+
})
|
|
417
|
+
}),
|
|
418
|
+
/*#__PURE__*/ _jsx(ListItemText, {
|
|
419
|
+
secondary: hiddenOnSite ? 'It will be on the page from the first paint' : 'For a menu panel or drawer. To hide it outright, use the eye on its Hierarchy row',
|
|
420
|
+
slotProps: {
|
|
421
|
+
secondary: {
|
|
422
|
+
sx: {
|
|
423
|
+
whiteSpace: 'normal'
|
|
424
|
+
}
|
|
425
|
+
}
|
|
426
|
+
},
|
|
427
|
+
children: hiddenOnSite ? 'Do not start hidden' : 'Start hidden until an interaction shows it'
|
|
428
|
+
})
|
|
429
|
+
]
|
|
430
|
+
}),
|
|
431
|
+
/*#__PURE__*/ _jsx(Divider, {}),
|
|
432
|
+
/*#__PURE__*/ _jsxs(MenuItem, {
|
|
433
|
+
disabled: isRootNode,
|
|
434
|
+
onClick: handleCopyClick,
|
|
435
|
+
children: [
|
|
436
|
+
/*#__PURE__*/ _jsx(ListItemIcon, {
|
|
437
|
+
children: /*#__PURE__*/ _jsx(MdiIcon, {
|
|
438
|
+
fontSize: "inherit",
|
|
439
|
+
path: ICON_VARIANT_MODIFY_COPY.path
|
|
440
|
+
})
|
|
441
|
+
}),
|
|
442
|
+
/*#__PURE__*/ _jsx(ListItemText, {
|
|
443
|
+
children: multi ? 'Copy selection' : 'Copy'
|
|
444
|
+
})
|
|
445
|
+
]
|
|
446
|
+
}),
|
|
447
|
+
/*#__PURE__*/ _jsxs(MenuItem, {
|
|
448
|
+
disabled: isRootNode,
|
|
449
|
+
onClick: handleCopyStyles,
|
|
450
|
+
children: [
|
|
451
|
+
/*#__PURE__*/ _jsx(ListItemIcon, {
|
|
452
|
+
children: /*#__PURE__*/ _jsx(MdiIcon, {
|
|
453
|
+
fontSize: "inherit",
|
|
454
|
+
path: ICON_VARIANT_MODIFY_COPY.path
|
|
455
|
+
})
|
|
456
|
+
}),
|
|
457
|
+
/*#__PURE__*/ _jsx(ListItemText, {
|
|
458
|
+
children: 'Copy styles'
|
|
459
|
+
})
|
|
460
|
+
]
|
|
461
|
+
}),
|
|
462
|
+
/*#__PURE__*/ _jsxs(MenuItem, {
|
|
463
|
+
disabled: isRootNode || !canPasteStyles,
|
|
464
|
+
onClick: handlePasteStyles,
|
|
465
|
+
children: [
|
|
466
|
+
/*#__PURE__*/ _jsx(ListItemIcon, {
|
|
467
|
+
children: /*#__PURE__*/ _jsx(MdiIcon, {
|
|
468
|
+
fontSize: "inherit",
|
|
469
|
+
path: ICON_VARIANT_MODIFY_PASTE.path
|
|
470
|
+
})
|
|
471
|
+
}),
|
|
472
|
+
/*#__PURE__*/ _jsx(ListItemText, {
|
|
473
|
+
slotProps: {
|
|
474
|
+
primary: {
|
|
475
|
+
sx: {
|
|
476
|
+
overflow: 'hidden',
|
|
477
|
+
textOverflow: 'ellipsis',
|
|
478
|
+
whiteSpace: 'nowrap'
|
|
479
|
+
}
|
|
480
|
+
}
|
|
481
|
+
},
|
|
482
|
+
children: copiedStyleLabel ? `Paste styles from ${copiedStyleLabel}` : 'Paste styles'
|
|
483
|
+
})
|
|
484
|
+
]
|
|
485
|
+
}),
|
|
486
|
+
/*#__PURE__*/ _jsx(Divider, {}),
|
|
487
|
+
/*#__PURE__*/ _jsxs(MenuItem, {
|
|
488
|
+
disabled: !canPaste,
|
|
489
|
+
onClick: handlePasteClick,
|
|
490
|
+
children: [
|
|
491
|
+
/*#__PURE__*/ _jsx(ListItemIcon, {
|
|
492
|
+
children: /*#__PURE__*/ _jsx(MdiIcon, {
|
|
493
|
+
fontSize: "inherit",
|
|
494
|
+
path: ICON_VARIANT_MODIFY_PASTE.path
|
|
495
|
+
})
|
|
496
|
+
}),
|
|
497
|
+
/*#__PURE__*/ _jsx(ListItemText, {
|
|
498
|
+
slotProps: {
|
|
499
|
+
primary: {
|
|
500
|
+
sx: {
|
|
501
|
+
overflow: 'hidden',
|
|
502
|
+
textOverflow: 'ellipsis',
|
|
503
|
+
whiteSpace: 'nowrap'
|
|
504
|
+
}
|
|
505
|
+
}
|
|
506
|
+
},
|
|
507
|
+
children: clipboardLabels.length === 1 ? `Paste ${clipboardLabels[0]}` : clipboardLabels.length > 1 ? `Paste ${clipboardLabels.length} elements` : 'Paste'
|
|
508
|
+
})
|
|
509
|
+
]
|
|
510
|
+
}),
|
|
511
|
+
/*#__PURE__*/ _jsx(Divider, {}),
|
|
512
|
+
/*#__PURE__*/ _jsxs(MenuItem, {
|
|
513
|
+
disabled: isRootNode,
|
|
514
|
+
onClick: handleDuplicateClick,
|
|
515
|
+
children: [
|
|
516
|
+
/*#__PURE__*/ _jsx(ListItemIcon, {
|
|
517
|
+
children: /*#__PURE__*/ _jsx(MdiIcon, {
|
|
518
|
+
fontSize: "inherit",
|
|
519
|
+
path: ICON_VARIANT_MODIFY_DUPLICATE.path
|
|
520
|
+
})
|
|
521
|
+
}),
|
|
522
|
+
/*#__PURE__*/ _jsx(ListItemText, {
|
|
523
|
+
children: multi ? 'Duplicate selection' : 'Duplicate'
|
|
524
|
+
})
|
|
525
|
+
]
|
|
526
|
+
}),
|
|
527
|
+
/*#__PURE__*/ _jsxs(MenuItem, {
|
|
528
|
+
disabled: isRootNode,
|
|
529
|
+
onClick: handleDeleteClick,
|
|
530
|
+
children: [
|
|
531
|
+
/*#__PURE__*/ _jsx(ListItemIcon, {
|
|
532
|
+
children: /*#__PURE__*/ _jsx(MdiIcon, {
|
|
533
|
+
fontSize: "inherit",
|
|
534
|
+
path: ICON_VARIANT_MODIFY_DELETE.path
|
|
535
|
+
})
|
|
536
|
+
}),
|
|
537
|
+
/*#__PURE__*/ _jsx(ListItemText, {
|
|
538
|
+
children: multi ? 'Delete selection' : 'Delete'
|
|
539
|
+
})
|
|
540
|
+
]
|
|
541
|
+
})
|
|
542
|
+
]
|
|
543
|
+
}),
|
|
544
|
+
/*#__PURE__*/ _jsx(SubtreeJsonDialog, {
|
|
545
|
+
node: node,
|
|
546
|
+
open: jsonOpen,
|
|
547
|
+
onClose: ()=>{
|
|
548
|
+
setJsonOpen(false);
|
|
549
|
+
onAction == null ? void 0 : onAction();
|
|
550
|
+
}
|
|
551
|
+
})
|
|
552
|
+
]
|
|
553
|
+
}));
|
|
554
|
+
}));
|
|
555
|
+
NodeContextMenu.displayName = 'NodeContextMenu';
|
|
556
|
+
export default NodeContextMenu;
|
|
557
|
+
|
|
558
|
+
//# sourceMappingURL=node-context-menu.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../../../../../../libs/besigner/feature/designer/src/lib/components/node-context-menu.tsx"],"sourcesContent":["/**\n * @license\n * Copyright 2026 Aglyn LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport type * as Aglyn from '@aglyn/aglyn'\nimport { canvas } from '@aglyn/aglyn'\nimport * as Besigner from '@aglyn/besigner'\nimport {\n BesignerPanelTabFlag,\n setBesignerPanels,\n} from '@aglyn/besigner'\nimport {\n ICON_VARIANT_MODIFY_COPY,\n ICON_VARIANT_MODIFY_DELETE,\n ICON_VARIANT_MODIFY_DUPLICATE,\n ICON_VARIANT_MODIFY_MOVE_DOWN,\n ICON_VARIANT_MODIFY_MOVE_IN,\n ICON_VARIANT_MODIFY_MOVE_OUT,\n ICON_VARIANT_MODIFY_MOVE_UP,\n ICON_VARIANT_MODIFY_PASTE,\n ICON_VARIANT_VISIBILITY_HIDDEN,\n ICON_VARIANT_VISIBILITY_SHOWN,\n} from '@aglyn/shared-data-enums'\nimport { MdiIcon } from '@aglyn/shared-ui-jsx'\nimport {\n Divider,\n ListItemIcon,\n ListItemText,\n MenuItem,\n MenuList,\n Paper,\n type PaperProps,\n Typography,\n} from '@mui/material'\nimport { action } from 'mobx'\nimport { observer } from 'mobx-react-lite'\nimport { ChangeEvent, forwardRef, useCallback, useState } from 'react'\nimport useAglynBesignerFlag from '../hooks/use-aglyn-besigner-flag'\nimport useAddElementDrawerCallback from '../hooks/use-add-element-drawer-callback'\nimport useBesignerAppContext from '../hooks/use-besigner-app-context'\nimport {\n useCopyElementsCallback,\n usePasteElementsCallback,\n} from '../hooks/use-clipboard-callbacks'\nimport useDeleteElementCallback, {\n useDeleteElementsCallback,\n} from '../hooks/use-delete-element-callback'\nimport {\n useMoveNodeInCallback,\n useMoveNodeOutCallback,\n} from '../hooks/use-move-node-callbacks'\nimport {\n isNodeHiddenOnSite,\n nodePropsWithHiddenOnSite,\n} from '../utils/canvas-reveal'\nimport SubtreeJsonDialog from './subtree-json-dialog.component'\n\nexport interface NodeContextMenuProps extends PaperProps {\n node: Aglyn.NodeSchema<any>\n /** Invoked when a menu action should dismiss the hosting menu/tooltip. */\n onAction?: () => void\n}\n\nexport const NodeContextMenu = observer(\n forwardRef<any, NodeContextMenuProps>((props, ref) => {\n const { node, onAction, ...rest } = props\n\n const isRootNode = canvas.isRootNode(node)\n // Multi-selection (AGL-11): ambiguous single-target actions hide or\n // disable; Duplicate/Delete apply to the whole selection.\n const multi = Besigner.focus.hasMultipleSelected()\n const app = useBesignerAppContext()\n const handleAddElementClick = useAddElementDrawerCallback()\n const elementRef = Besigner.refs.get(node?.$id)\n const [moreOpen, setMoreOpen] = useState(false)\n const [moreButton, moreButtonRef] = useState<HTMLButtonElement | null>(null)\n const [jsonOpen, setJsonOpen] = useState(false)\n\n const closeMore = useCallback(() => setMoreOpen(false), [])\n const openMore = useCallback(() => setMoreOpen(true), [])\n\n const handleDuplicateClick = useCallback(\n (e: ChangeEvent<unknown>) => {\n if (isRootNode) return\n onAction?.()\n const targets = multi ? Besigner.focus.getSelected() : [node]\n for (const target of targets) {\n if (target && !canvas.isRootNode(target)) {\n canvas.duplicateNode(target)\n }\n }\n },\n [node, isRootNode, multi, onAction],\n )\n\n const handleModifyClick = useCallback(\n (e: ChangeEvent<unknown>) => {\n setBesignerPanels(app, {\n panels: (panels) => ({\n ...panels,\n panelRight: {\n ...panels.panelRight,\n toggled: true,\n tab: BesignerPanelTabFlag.ELEMENT_PROPS_FORM,\n },\n }),\n })\n },\n [app],\n )\n const handleMoveUp = useCallback(\n (e: ChangeEvent<unknown>) => {\n if (isRootNode) return\n canvas.reorderNode(node, node?.index - 1)\n },\n [node, isRootNode],\n )\n const handleMoveDown = useCallback(\n (e: ChangeEvent<unknown>) => {\n if (isRootNode) return\n canvas.reorderNode(node, node?.index + 1)\n },\n [node, isRootNode],\n )\n\n /**\n * Reparenting by clicking (AGL-1405). Until these two existed, the only\n * way to move a node into a different container was to drag it — so a\n * node that ended up somewhere it can never render (AGL-1388) could only\n * be rescued by hand-editing the document's JSON.\n *\n * `canMove*` is read through the observer, so the items enable and\n * disable as the selection moves, and both refuse anything the renderer\n * could not draw rather than accepting it and stranding the subtree.\n */\n const moveNodeOut = useMoveNodeOutCallback()\n const moveNodeIn = useMoveNodeInCallback()\n const canMoveOut = !multi && Besigner.canMoveNodeOut(node)\n const canMoveIn = !multi && Besigner.canMoveNodeIn(node)\n\n const handleMoveOut = useCallback(() => {\n onAction?.()\n moveNodeOut(node)\n }, [node, onAction, moveNodeOut])\n\n const handleMoveIn = useCallback(() => {\n onAction?.()\n moveNodeIn(node)\n }, [node, onAction, moveNodeIn])\n\n const handleParentOnClick = useCallback(\n (e: ChangeEvent<unknown>) => {\n if (isRootNode) return\n Besigner.focus.setSelectedNode(node?.parent)\n },\n [node, isRootNode],\n )\n\n const handleParentOnMouseEnter = useCallback(\n (e: ChangeEvent<unknown>) => {\n if (isRootNode) return\n Besigner.focus.setHoveredNode(node)\n },\n [node, isRootNode],\n )\n const handleParentOnMouseLeave = useCallback(\n (e: ChangeEvent<unknown>) => {\n if (isRootNode) return\n Besigner.focus.clearHover()\n },\n [isRootNode],\n )\n\n const copyElements = useCopyElementsCallback()\n const pasteElements = usePasteElementsCallback()\n const handleCopyClick = useCallback(() => {\n if (isRootNode) return\n onAction?.()\n copyElements(multi ? Besigner.focus.getSelected() : [node])\n }, [node, isRootNode, multi, onAction, copyElements])\n\n const handlePasteClick = useCallback(() => {\n onAction?.()\n pasteElements(node)\n }, [node, onAction, pasteElements])\n\n // Observed, so the item enables the moment something is copied — even\n // from another document, where the entry arrives via localStorage.\n const canPaste = Besigner.clipboard.hasContent()\n const clipboardLabels = Besigner.clipboard.getLabels()\n\n /**\n * Start hidden until an interaction shows it (AGL-592).\n *\n * A DIFFERENT switch from the eye on the hierarchy row, and the naming is\n * the whole point. The eye hides an element outright — `display: none`,\n * nothing reveals it. This one enrols the element in a runtime contract:\n * it starts hidden, an interaction's show step reveals it, and the canvas\n * opens it while it is being designed. A mega-menu panel, a drawer, an\n * announcement that appears on scroll.\n *\n * `aglyn-hidden` is the storage — the published stylesheet, the show/hide\n * steps and the canvas reveal all key off it — and until this existed the\n * only way to set it was to know the literal string and type it into the\n * Classes box. An element property with no picker is a missing feature,\n * not a power-user path.\n */\n const [, setRevealedNodeIds] = useAglynBesignerFlag('revealedNodeIds')\n const hiddenOnSite = isNodeHiddenOnSite(node as never)\n const handleToggleHiddenClick = useCallback(() => {\n if (isRootNode) return\n onAction?.()\n const targets = multi ? Besigner.focus.getSelected() : [node]\n const changed: string[] = []\n action(() => {\n for (const target of targets) {\n if (!target || canvas.isRootNode(target)) continue\n const props = nodePropsWithHiddenOnSite(target as never, !hiddenOnSite)\n if (!props) continue\n target.props = props as never\n changed.push(target.$id)\n }\n })()\n // Showing an element again retires its canvas reveal with it. The flag\n // is only meaningful for something the site hides, so leaving an entry\n // behind means the next hide silently starts revealed. Hiding sets\n // nothing: hidden is hidden, and selecting the element — which\n // whichever surface opened this menu has already done — is what shows\n // it while it is being designed.\n if (hiddenOnSite && changed.length) {\n setRevealedNodeIds((current) =>\n (current ?? []).filter((id) => !changed.includes(id)),\n )\n }\n }, [node, isRootNode, multi, hiddenOnSite, onAction, setRevealedNodeIds])\n\n /**\n * Copy and paste a LOOK.\n *\n * `node.sx` — the Styles panel's whole output, including its responsive,\n * `@scheme` and state slices, which are keys inside that object. Classes\n * are deliberately not carried: a class is a name pointing at rules the\n * element does not own, and two of them carry behaviour rather than\n * appearance, so moving them under a label that promises looks would move\n * behaviour with it.\n *\n * Paste REPLACES. Merging makes the result depend on what the target\n * already had, so the same look pasted onto two elements could produce\n * two different ones — and there would be no way to paste \"no styles\".\n */\n const copiedStyleLabel = Besigner.styleClipboard.getStyleLabel()\n const canPasteStyles = Besigner.styleClipboard.hasStyles()\n const handleCopyStyles = useCallback(() => {\n if (isRootNode) return\n onAction?.()\n Besigner.styleClipboard.copyStyles(node)\n }, [node, isRootNode, onAction])\n const handlePasteStyles = useCallback(() => {\n if (isRootNode) return\n onAction?.()\n const targets = multi ? Besigner.focus.getSelected() : [node]\n for (const target of targets) {\n if (target && !canvas.isRootNode(target)) {\n Besigner.styleClipboard.pasteStyles(target)\n }\n }\n }, [node, isRootNode, multi, onAction])\n\n const deleteElementCallback = useDeleteElementCallback()\n const deleteElementsCallback = useDeleteElementsCallback()\n const handleDeleteClick = useCallback(() => {\n closeMore()\n onAction?.()\n if (multi) void deleteElementsCallback(Besigner.focus.getSelected())\n else void deleteElementCallback(node)\n }, [\n node,\n multi,\n closeMore,\n onAction,\n deleteElementCallback,\n deleteElementsCallback,\n ])\n\n return (\n <Paper\n ref={ref}\n sx={{\n width: 240,\n // Caps itself rather than growing past the window (AGL-1405). The\n // Popper can only slide a menu back inside the viewport if it FITS\n // in one; a taller menu was laid out past the bottom of the\n // document and the page grew a scrollbar around it. `dvh` so a\n // mobile browser's retracting toolbar does not leave the last item\n // under it.\n // Shorter than the window, not merely within it. A menu that only\n // just fits is one `preventOverflow` has to slide a long way to\n // place, and a menu that lands 200px from where it was asked for\n // reads as landing at random.\n maxHeight: 'min(420px, calc(100dvh - 24px))',\n overflowY: 'auto',\n overflowX: 'hidden',\n }}\n {...rest}\n >\n <MenuList dense>\n <Typography\n variant=\"caption\"\n color=\"text.secondary\"\n component=\"div\"\n sx={{\n px: 1,\n py: 0.15,\n mb: 1,\n textAlign: 'center',\n textOverflow: 'ellipsis',\n overflow: 'hidden',\n whiteSpace: 'nowrap',\n backgroundColor: (theme) =>\n `rgba(${(theme as any).vars.palette.primary.darkChannel} / 0.12)`,\n }}\n >\n {node?.labelShort}\n </Typography>\n {multi ? null : (\n <MenuItem\n onClick={() => {\n onAction?.()\n handleAddElementClick(node)\n }}\n >\n <ListItemText inset>Add element</ListItemText>\n </MenuItem>\n )}\n {multi ? null : <Divider />}\n <MenuItem\n onClick={handleParentOnClick}\n disabled={isRootNode || multi}\n onMouseEnter={handleParentOnMouseEnter}\n onPointerEnter={handleParentOnMouseEnter}\n onMouseLeave={handleParentOnMouseLeave}\n onPointerLeave={handleParentOnMouseLeave}\n >\n <ListItemText inset>Select parent</ListItemText>\n </MenuItem>\n <MenuItem\n onClick={handleMoveUp}\n disabled={isRootNode || multi || !(node?.index > 0)}\n >\n <ListItemIcon>\n <MdiIcon\n fontSize=\"inherit\"\n path={ICON_VARIANT_MODIFY_MOVE_UP.path}\n />\n </ListItemIcon>\n <ListItemText>Shift up</ListItemText>\n </MenuItem>\n <MenuItem\n onClick={handleMoveDown}\n disabled={\n isRootNode ||\n multi ||\n !(node?.index < node?.parent?.nodes?.length - 1)\n }\n >\n <ListItemIcon>\n <MdiIcon\n fontSize=\"inherit\"\n path={ICON_VARIANT_MODIFY_MOVE_DOWN.path}\n />\n </ListItemIcon>\n <ListItemText>Shift down</ListItemText>\n </MenuItem>\n <MenuItem onClick={handleMoveOut} disabled={!canMoveOut}>\n <ListItemIcon>\n <MdiIcon\n fontSize=\"inherit\"\n path={ICON_VARIANT_MODIFY_MOVE_OUT.path}\n />\n </ListItemIcon>\n <ListItemText>Move out of container</ListItemText>\n </MenuItem>\n <MenuItem onClick={handleMoveIn} disabled={!canMoveIn}>\n <ListItemIcon>\n <MdiIcon\n fontSize=\"inherit\"\n path={ICON_VARIANT_MODIFY_MOVE_IN.path}\n />\n </ListItemIcon>\n <ListItemText>Move into element above</ListItemText>\n </MenuItem>\n {multi ? null : (\n <MenuItem onClick={() => setJsonOpen(true)}>\n <ListItemText inset>Edit JSON</ListItemText>\n </MenuItem>\n )}\n <MenuItem disabled={isRootNode} onClick={handleToggleHiddenClick}>\n <ListItemIcon>\n <MdiIcon\n fontSize=\"inherit\"\n path={\n hiddenOnSite\n ? ICON_VARIANT_VISIBILITY_SHOWN.path\n : ICON_VARIANT_VISIBILITY_HIDDEN.path\n }\n />\n </ListItemIcon>\n <ListItemText\n secondary={\n hiddenOnSite\n ? 'It will be on the page from the first paint'\n : 'For a menu panel or drawer. To hide it outright, use the eye on its Hierarchy row'\n }\n slotProps={{ secondary: { sx: { whiteSpace: 'normal' } } }}\n >\n {hiddenOnSite\n ? 'Do not start hidden'\n : 'Start hidden until an interaction shows it'}\n </ListItemText>\n </MenuItem>\n <Divider />\n <MenuItem disabled={isRootNode} onClick={handleCopyClick}>\n <ListItemIcon>\n <MdiIcon fontSize=\"inherit\" path={ICON_VARIANT_MODIFY_COPY.path} />\n </ListItemIcon>\n <ListItemText>{multi ? 'Copy selection' : 'Copy'}</ListItemText>\n </MenuItem>\n <MenuItem disabled={isRootNode} onClick={handleCopyStyles}>\n <ListItemIcon>\n <MdiIcon\n fontSize=\"inherit\"\n path={ICON_VARIANT_MODIFY_COPY.path}\n />\n </ListItemIcon>\n <ListItemText>{'Copy styles'}</ListItemText>\n </MenuItem>\n <MenuItem\n disabled={isRootNode || !canPasteStyles}\n onClick={handlePasteStyles}\n >\n <ListItemIcon>\n <MdiIcon\n fontSize=\"inherit\"\n path={ICON_VARIANT_MODIFY_PASTE.path}\n />\n </ListItemIcon>\n <ListItemText\n slotProps={{\n primary: {\n sx: {\n overflow: 'hidden',\n textOverflow: 'ellipsis',\n whiteSpace: 'nowrap',\n },\n },\n }}\n >\n {copiedStyleLabel\n ? `Paste styles from ${copiedStyleLabel}`\n : 'Paste styles'}\n </ListItemText>\n </MenuItem>\n <Divider />\n <MenuItem disabled={!canPaste} onClick={handlePasteClick}>\n <ListItemIcon>\n <MdiIcon\n fontSize=\"inherit\"\n path={ICON_VARIANT_MODIFY_PASTE.path}\n />\n </ListItemIcon>\n <ListItemText\n slotProps={{\n primary: {\n sx: {\n overflow: 'hidden',\n textOverflow: 'ellipsis',\n whiteSpace: 'nowrap',\n },\n },\n }}\n >\n {clipboardLabels.length === 1\n ? `Paste ${clipboardLabels[0]}`\n : clipboardLabels.length > 1\n ? `Paste ${clipboardLabels.length} elements`\n : 'Paste'}\n </ListItemText>\n </MenuItem>\n <Divider />\n <MenuItem disabled={isRootNode} onClick={handleDuplicateClick}>\n <ListItemIcon>\n <MdiIcon\n fontSize=\"inherit\"\n path={ICON_VARIANT_MODIFY_DUPLICATE.path}\n />\n </ListItemIcon>\n <ListItemText>\n {multi ? 'Duplicate selection' : 'Duplicate'}\n </ListItemText>\n </MenuItem>\n <MenuItem disabled={isRootNode} onClick={handleDeleteClick}>\n <ListItemIcon>\n <MdiIcon\n fontSize=\"inherit\"\n path={ICON_VARIANT_MODIFY_DELETE.path}\n />\n </ListItemIcon>\n <ListItemText>{multi ? 'Delete selection' : 'Delete'}</ListItemText>\n </MenuItem>\n </MenuList>\n <SubtreeJsonDialog\n node={node}\n open={jsonOpen}\n onClose={() => {\n setJsonOpen(false)\n onAction?.()\n }}\n />\n </Paper>\n )\n }),\n)\nNodeContextMenu.displayName = 'NodeContextMenu'\n\nexport default NodeContextMenu\n"],"names":["canvas","Besigner","BesignerPanelTabFlag","setBesignerPanels","ICON_VARIANT_MODIFY_COPY","ICON_VARIANT_MODIFY_DELETE","ICON_VARIANT_MODIFY_DUPLICATE","ICON_VARIANT_MODIFY_MOVE_DOWN","ICON_VARIANT_MODIFY_MOVE_IN","ICON_VARIANT_MODIFY_MOVE_OUT","ICON_VARIANT_MODIFY_MOVE_UP","ICON_VARIANT_MODIFY_PASTE","ICON_VARIANT_VISIBILITY_HIDDEN","ICON_VARIANT_VISIBILITY_SHOWN","MdiIcon","Divider","ListItemIcon","ListItemText","MenuItem","MenuList","Paper","Typography","action","observer","forwardRef","useCallback","useState","useAglynBesignerFlag","useAddElementDrawerCallback","useBesignerAppContext","useCopyElementsCallback","usePasteElementsCallback","useDeleteElementCallback","useDeleteElementsCallback","useMoveNodeInCallback","useMoveNodeOutCallback","isNodeHiddenOnSite","nodePropsWithHiddenOnSite","SubtreeJsonDialog","NodeContextMenu","props","ref","node","onAction","rest","isRootNode","multi","focus","hasMultipleSelected","app","handleAddElementClick","elementRef","refs","get","$id","moreOpen","setMoreOpen","moreButton","moreButtonRef","jsonOpen","setJsonOpen","closeMore","openMore","handleDuplicateClick","e","targets","getSelected","target","duplicateNode","handleModifyClick","panels","panelRight","toggled","tab","ELEMENT_PROPS_FORM","handleMoveUp","reorderNode","index","handleMoveDown","moveNodeOut","moveNodeIn","canMoveOut","canMoveNodeOut","canMoveIn","canMoveNodeIn","handleMoveOut","handleMoveIn","handleParentOnClick","setSelectedNode","parent","handleParentOnMouseEnter","setHoveredNode","handleParentOnMouseLeave","clearHover","copyElements","pasteElements","handleCopyClick","handlePasteClick","canPaste","clipboard","hasContent","clipboardLabels","getLabels","setRevealedNodeIds","hiddenOnSite","handleToggleHiddenClick","changed","push","length","current","filter","id","includes","copiedStyleLabel","styleClipboard","getStyleLabel","canPasteStyles","hasStyles","handleCopyStyles","copyStyles","handlePasteStyles","pasteStyles","deleteElementCallback","deleteElementsCallback","handleDeleteClick","sx","width","maxHeight","overflowY","overflowX","dense","variant","color","component","px","py","mb","textAlign","textOverflow","overflow","whiteSpace","backgroundColor","theme","vars","palette","primary","darkChannel","labelShort","onClick","inset","disabled","onMouseEnter","onPointerEnter","onMouseLeave","onPointerLeave","fontSize","path","nodes","secondary","slotProps","open","onClose","displayName"],"mappings":"AAAA;;;;;;;;;;;;;;;CAeC;;;AAGD,SAASA,MAAM,QAAQ,eAAc;AACrC,YAAYC,cAAc,kBAAiB;AAC3C,SACEC,oBAAoB,EACpBC,iBAAiB,QACZ,kBAAiB;AACxB,SACEC,wBAAwB,EACxBC,0BAA0B,EAC1BC,6BAA6B,EAC7BC,6BAA6B,EAC7BC,2BAA2B,EAC3BC,4BAA4B,EAC5BC,2BAA2B,EAC3BC,yBAAyB,EACzBC,8BAA8B,EAC9BC,6BAA6B,QACxB,2BAA0B;AACjC,SAASC,OAAO,QAAQ,uBAAsB;AAC9C,SACEC,OAAO,EACPC,YAAY,EACZC,YAAY,EACZC,QAAQ,EACRC,QAAQ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