@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 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../../../../../../libs/besigner/feature/designer/src/lib/components/node-overlay.tsx"],"sourcesContent":["/**\n * @license\n * Copyright 2023 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 { canvas } from '@aglyn/aglyn'\nimport * as Besigner from '@aglyn/besigner'\nimport { useIsomorphicLayoutEffect } from '@aglyn/shared-ui-jsx'\nimport {\n type ElementFragmentRects,\n getElementFragmentRects,\n} from '@aglyn/shared-util-dom'\nimport {\n Popper as MuiPopper,\n type PopperProps as MuiPopperProps,\n} from '@mui/material'\nimport { observer } from 'mobx-react-lite'\nimport { forwardRef, useMemo, useState } from 'react'\nimport NodeOutline from './node-outline'\nimport { isInlineEditWithin } from '../utils/inline-text-edit.store'\nimport NodeQuickActions from './node-quick-actions'\n\n/**\n * What a Popper anchors to when it is not an element. It is popper's own\n * `VirtualElement`, stated structurally: popper is a dependency of MUI's and\n * not of this package, so importing its type would make the published package\n * name a module it never declares.\n */\ninterface VirtualElement {\n getBoundingClientRect: () => DOMRect\n contextElement?: Element\n}\n\nconst outerModifiers = [\n {\n name: 'flip',\n enabled: false,\n options: {\n altBoundary: false,\n rootBoundary: 'viewport',\n padding: 0,\n },\n },\n {\n name: 'preventOverflow',\n enabled: false,\n options: {\n altAxis: false,\n altBoundary: false,\n tether: false,\n rootBoundary: 'viewport',\n padding: 0,\n },\n },\n]\n\nconst innerModifiers = [\n {\n name: 'flip',\n enabled: true,\n options: {\n altBoundary: true,\n rootBoundary: 'viewport',\n padding: 0,\n },\n },\n {\n name: 'preventOverflow',\n enabled: true,\n options: {\n altAxis: true,\n altBoundary: true,\n tether: true,\n rootBoundary: 'viewport',\n padding: 0,\n },\n },\n]\n\nconst DEFAULT_RECT = {\n top: 0,\n left: 0,\n width: 0,\n height: 0,\n} as DOMRect\n\nexport function serializeRect(rect: DOMRect): any {\n return JSON.parse(JSON.stringify(rect || DEFAULT_RECT))\n}\n\nconst DEFAULT_GEOMETRY: ElementFragmentRects = {\n fragments: [DEFAULT_RECT as any],\n union: DEFAULT_RECT as any,\n first: DEFAULT_RECT as any,\n}\n\n/**\n * Whole-pixel identity of a measured geometry (AGL-2486).\n *\n * The measuring callback runs on every scroll event anywhere on the page, on\n * every resize, and on every ResizeObserver tick. Before this it called\n * `setRect(serializeRect(...))` unconditionally — a NEW object each time, so\n * scrolling a side panel re-rendered this observer and everything under it at\n * event rate even though the element had not moved. Fragment sets are larger,\n * and committing a fresh ARRAY every frame is exactly the shape that froze a\n * tab in the collaborator overlay on 2026-08-22.\n *\n * MEASURING is cheap; COMMITTING is not. Rounding first means sub-pixel\n * jitter cannot churn a render on its own. This is strictly less per-event\n * work than the single-rect code did, not more.\n */\nfunction fingerprintGeometry(geometry: ElementFragmentRects): string {\n return geometry.fragments\n .map(\n (rect) =>\n `${Math.round(rect.left)},${Math.round(rect.top)},` +\n `${Math.round(rect.width)},${Math.round(rect.height)}`,\n )\n .join(';')\n}\n\nexport interface NodeOverlayProps extends Partial<MuiPopperProps> {\n variant: 'hovered' | 'selected'\n}\n\nconst NodeOverlay = observer(\n forwardRef<any, NodeOverlayProps>((props, ref) => {\n const { variant, ...rest } = props || {}\n\n const state =\n variant === 'selected'\n ? Besigner.focus.getLastSelected()\n : Besigner.focus.getHovered()\n const $id = state?.$id\n const node = canvas.getNode($id)\n\n const elementRef = Besigner.refs.get($id)\n // Node.index throws for parentless nodes (the root, or a node whose\n // parent isn't loaded) — selecting the root via the breadcrumbs must not\n // crash the overlay.\n const nodeIndex = node?.parent ? node.index : null\n /**\n * The selection chrome stands down while this node is being edited in\n * place (AGL-2486).\n *\n * This overlay paints a translucent FILL behind the node as well as an\n * outline (`node-outline.tsx`). While the author is typing, that tint is\n * the one thing standing between the in-place surface and its whole\n * promise — that the text looks exactly as it renders, on the background\n * it renders on. It is redundant during an edit anyway: the caret and the\n * toolbar already say which element is being edited.\n *\n * The geometry is no longer a second reason to suppress it: the\n * chrome below is drawn from `getClientRects()`, one outline per line\n * fragment, so a SELECTED wrapped inline run is outlined correctly too.\n * Standing the fill down during an edit remains right for its own\n * reason — the in-place surface must look exactly as it renders.\n */\n const isBeingEdited = isInlineEditWithin(elementRef?.current ?? null)\n const isOpen = Boolean(elementRef?.current) && !isBeingEdited\n const [geometry, setGeometry] =\n useState<ElementFragmentRects>(DEFAULT_GEOMETRY)\n const { union: rect, fragments, first } = geometry\n\n useIsomorphicLayoutEffect(() => {\n const el = elementRef?.current\n if (!el || !('getBoundingClientRect' in el)) return\n\n /**\n * The element's REAL shape, not its bounding box (AGL-2486).\n *\n * A wrapped inline run is a set of line fragments, and one rectangle\n * cannot describe it — see `getElementFragmentRects` for why the union\n * is not merely imprecise but a different shape, and why an outline\n * drawn from it misses the text on the new line. A block yields one\n * fragment that IS the bounding rect, so block geometry is unaffected.\n */\n let committed = ''\n const update = () => {\n const next = getElementFragmentRects(el)\n const fingerprint = fingerprintGeometry(next)\n if (fingerprint === committed) return\n committed = fingerprint\n setGeometry(next)\n }\n update()\n\n // Re-sync when the element or its shadow-DOM host resizes (covers prop\n // changes that affect layout, e.g. flexDirection column→row) and when\n // the canvas container resizes or the window resizes.\n // ResizeObserver is not in every jsdom setup, and an unguarded\n // constructor in a layout effect takes the whole overlay down with it.\n // The listeners below still carry scroll and resize. Same guard, for\n // the same reason, as `use-anchored-rect.ts`.\n const ro =\n typeof ResizeObserver === 'function' ? new ResizeObserver(update) : null\n ro?.observe(el)\n const shadowHost = (el.getRootNode() as ShadowRoot | null)?.host ?? null\n if (shadowHost) ro?.observe(shadowHost)\n window.addEventListener('resize', update, { passive: true })\n\n // Scrolling any ancestor (the canvas container, panels, or the page\n // body) shifts getBoundingClientRect() values without triggering a\n // resize — capture-phase listener catches them all.\n window.addEventListener('scroll', update, { passive: true, capture: true })\n\n return () => {\n ro?.disconnect()\n window.removeEventListener('resize', update)\n window.removeEventListener('scroll', update, { capture: true })\n }\n // Node?.index changes when the node is reordered among siblings (e.g.\n // \"shift up\"/\"shift down\"). Reordering moves the same DOM element to a\n // new position without resizing it, so ResizeObserver won't catch it —\n // this dependency forces a rect recompute when sibling order changes.\n }, [elementRef, nodeIndex])\n\n // Popper types its anchor rect as a full `DOMRect`; the measured rects\n // are plain geometry and carry no `toJSON`, which popper never calls.\n const virtualElement = useMemo<() => VirtualElement>(() => {\n return () => ({\n getBoundingClientRect: () => rect as unknown as DOMRect,\n })\n }, [rect])\n\n /**\n * Where the label chip, the quick actions and the DRAG affordance hang\n * (AGL-2486).\n *\n * They used to hang off the union rect, and a fragment set has no obvious\n * single anchor. The union corner is the wrong one: an inline run that\n * begins mid-line and wraps has a union whose left edge comes from the\n * SECOND line, so a chip placed there floats above a sibling's text\n * rather than above the element it names — and the drag handle would be\n * offered at a point the element does not occupy.\n *\n * The first fragment is where the run STARTS in reading order. It is\n * where the eye already is, it is always on the element, and for a block\n * — every one of which has exactly one fragment — it is the union, so\n * nothing moves for the overwhelming majority of nodes.\n */\n const anchorElement = useMemo<() => VirtualElement>(() => {\n return () => ({\n getBoundingClientRect: () => first as unknown as DOMRect,\n })\n }, [first])\n\n return (\n <MuiPopper\n ref={ref}\n anchorEl={virtualElement}\n placement=\"top-start\"\n modifiers={outerModifiers}\n open={isOpen}\n keepMounted\n // The anchor rect is viewport-relative; fixed positioning matches it\n // and, unlike the default absolute strategy, cannot extend the\n // document — an overlay past the fold otherwise grows the page,\n // which grows the scroll range, which moves the overlay again\n // (infinite scroll feedback).\n popperOptions={{ strategy: 'fixed' }}\n // Overlays belong to the canvas layer: rendering in place (no body\n // portal) keeps them inside the viewport's stacking context, so the\n // designer chrome (app bars, breadcrumbs) always paints above them.\n disablePortal\n // Transition\n {...rest}\n >\n <div>\n {/* One outline per line fragment, positioned relative to the\n union the popper is anchored on. A block has exactly one\n fragment and it IS the union, so it lands at 0,0 with the\n union's size — the same box, from the same numbers, as\n before AGL-2486. The chip renders once, below, so a two-line\n heading reads as one selected element with two line boxes,\n which is what a browser's own selection looks like. */}\n {fragments.map((fragment, index) => (\n <NodeOutline\n key={index}\n node={node}\n data-aglyn-fragment={index}\n style={{\n left: fragment.left - rect.left,\n top: fragment.top - rect.top,\n right: 'auto',\n bottom: 'auto',\n width: fragment.width,\n height: fragment.height,\n }}\n />\n ))}\n\n <MuiPopper\n open={isOpen}\n anchorEl={anchorElement}\n placement={variant === 'hovered' ? 'top-start' : undefined}\n modifiers={innerModifiers}\n popperOptions={{ strategy: 'fixed' }}\n disablePortal\n // KeepMounted\n // transition\n sx={{\n ['&[data-popper-placement^=top] #aglyn\\\\:element-overlay-label']:\n {\n borderTopLeftRadius: 3,\n borderTopRightRadius: 3,\n borderBottomLeftRadius: 0,\n borderBottomRightRadius: 0,\n },\n ['&[data-popper-placement^=bottom] #aglyn\\\\:element-overlay-label']:\n {\n borderTopLeftRadius: 0,\n borderTopRightRadius: 0,\n borderBottomLeftRadius: 3,\n borderBottomRightRadius: 3,\n },\n }}\n >\n <NodeQuickActions\n node={node}\n variant={variant === 'selected' ? 'actions' : 'label'}\n />\n </MuiPopper>\n </div>\n </MuiPopper>\n )\n }),\n)\n\nNodeOverlay.displayName = 'NodeOverlay'\n\nexport default NodeOverlay\n"],"names":["canvas","Besigner","useIsomorphicLayoutEffect","getElementFragmentRects","Popper","MuiPopper","observer","forwardRef","useMemo","useState","NodeOutline","isInlineEditWithin","NodeQuickActions","outerModifiers","name","enabled","options","altBoundary","rootBoundary","padding","altAxis","tether","innerModifiers","DEFAULT_RECT","top","left","width","height","serializeRect","rect","JSON","parse","stringify","DEFAULT_GEOMETRY","fragments","union","first","fingerprintGeometry","geometry","map","Math","round","join","NodeOverlay","props","ref","variant","rest","state","focus","getLastSelected","getHovered","$id","node","getNode","elementRef","refs","get","nodeIndex","parent","index","isBeingEdited","current","isOpen","Boolean","setGeometry","el","committed","update","next","fingerprint","ro","ResizeObserver","observe","shadowHost","getRootNode","host","window","addEventListener","passive","capture","disconnect","removeEventListener","virtualElement","getBoundingClientRect","anchorElement","anchorEl","placement","modifiers","open","keepMounted","popperOptions","strategy","disablePortal","div","fragment","data-aglyn-fragment","style","right","bottom","undefined","sx","borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius","displayName"],"mappings":";;;AAAA;;;;;;;;;;;;;;;CAeC,GAED,SAASA,MAAM,QAAQ,eAAc;AACrC,YAAYC,cAAc,kBAAiB;AAC3C,SAASC,yBAAyB,QAAQ,uBAAsB;AAChE,SAEEC,uBAAuB,QAClB,yBAAwB;AAC/B,SACEC,UAAUC,SAAS,QAEd,gBAAe;AACtB,SAASC,QAAQ,QAAQ,kBAAiB;AAC1C,SAASC,UAAU,EAAEC,OAAO,EAAEC,QAAQ,QAAQ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;wBACrBqC,OAAO;4BACLxE,MAAMsE,SAAStE,IAAI,GAAGI,KAAKJ,IAAI;4BAC/BD,KAAKuE,SAASvE,GAAG,GAAGK,KAAKL,GAAG;4BAC5B0E,OAAO;4BACPC,QAAQ;4BACRzE,OAAOqE,SAASrE,KAAK;4BACrBC,QAAQoE,SAASpE,MAAM;wBACzB;uBAVKiC;8BAcT,KAACvD;oBACCoF,MAAM1B;oBACNuB,UAAUD;oBACVE,WAAWzC,YAAY,YAAY,cAAcsD;oBACjDZ,WAAWlE;oBACXqE,eAAe;wBAAEC,UAAU;oBAAQ;oBACnCC,aAAa;oBACb,cAAc;oBACd,aAAa;oBACbQ,IAAI;wBACF,CAAC,+DAA+D,EAC9D;4BACEC,qBAAqB;4BACrBC,sBAAsB;4BACtBC,wBAAwB;4BACxBC,yBAAyB;wBAC3B;wBACF,CAAC,kEAAkE,EACjE;4BACEH,qBAAqB;4BACrBC,sBAAsB;4BACtBC,wBAAwB;4BACxBC,yBAAyB;wBAC3B;oBACJ;8BAEA,cAAA,KAAC7F;wBACCyC,MAAMA;wBACNP,SAASA,YAAY,aAAa,YAAY;;;;;;AAM1D;AAGFH,YAAY+D,WAAW,GAAG;AAE1B,eAAe/D,YAAW"}
|
|
@@ -0,0 +1,24 @@
|
|
|
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
|
+
*/
|
|
17
|
+
import type * as Aglyn from '@aglyn/aglyn';
|
|
18
|
+
import { type StackProps } from '@mui/material';
|
|
19
|
+
export interface NodeQuickActionsProps extends StackProps {
|
|
20
|
+
node: Aglyn.NodeSchema;
|
|
21
|
+
variant?: 'label' | 'actions';
|
|
22
|
+
}
|
|
23
|
+
export declare const NodeQuickActions: import("react").FunctionComponent<Omit<NodeQuickActionsProps, "ref"> & import("react").RefAttributes<any>>;
|
|
24
|
+
export default NodeQuickActions;
|
|
@@ -0,0 +1,284 @@
|
|
|
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 * as Besigner from "@aglyn/besigner";
|
|
20
|
+
import { ICON_VARIANT_MODIFY_ADD, ICON_VARIANT_MODIFY_DRAG, ICON_VARIANT_SHOW_MORE_VERTICAL } from "@aglyn/shared-data-enums";
|
|
21
|
+
import { SrOnly } from "@aglyn/shared-ui-jsx";
|
|
22
|
+
import { MdiIcon } from "@aglyn/shared-ui-jsx";
|
|
23
|
+
import { styled } from "@aglyn/shared-ui-theme";
|
|
24
|
+
import { Button as MuiButton, Divider, Stack, Tooltip as MuiTooltip, Typography } from "@mui/material";
|
|
25
|
+
import { observer } from "mobx-react-lite";
|
|
26
|
+
import { forwardRef, useCallback, useState } from "react";
|
|
27
|
+
import { Else, If, Then } from "react-if";
|
|
28
|
+
import useAddElementDrawerCallback from "../hooks/use-add-element-drawer-callback.js";
|
|
29
|
+
import ComponentIconComponent from "./component-icon.component.js";
|
|
30
|
+
import { clearCanvasContextMenu, isCanvasContextMenuRequested } from "../utils/canvas-context-menu.js";
|
|
31
|
+
import NodeContextMenu from "./node-context-menu.js";
|
|
32
|
+
const ActionButton = styled(MuiButton)(({ theme })=>({
|
|
33
|
+
borderRadius: `0.2em`,
|
|
34
|
+
marginLeft: theme.spacing(-0.2),
|
|
35
|
+
pointerEvent: 'unset',
|
|
36
|
+
paddingTop: theme.spacing(0.1),
|
|
37
|
+
paddingBottom: theme.spacing(0.1),
|
|
38
|
+
paddingRight: theme.spacing(0.15),
|
|
39
|
+
paddingLeft: theme.spacing(0.15),
|
|
40
|
+
fontSize: theme.typography.pxToRem(16),
|
|
41
|
+
minWidth: 20,
|
|
42
|
+
'&.MuiButtonGroup-grouped': {
|
|
43
|
+
minWidth: 25
|
|
44
|
+
}
|
|
45
|
+
}));
|
|
46
|
+
const LabelAction = /*#__PURE__*/ forwardRef((props, ref)=>{
|
|
47
|
+
const { children, ButtonProps, icon, SrOnlyProps } = props, rest = _object_without_properties_loose(props, [
|
|
48
|
+
"children",
|
|
49
|
+
"ButtonProps",
|
|
50
|
+
"icon",
|
|
51
|
+
"SrOnlyProps"
|
|
52
|
+
]);
|
|
53
|
+
return /*#__PURE__*/ _jsx(MuiTooltip, _extends({
|
|
54
|
+
ref: ref
|
|
55
|
+
}, rest, {
|
|
56
|
+
children: /*#__PURE__*/ _jsxs(ActionButton, _extends({
|
|
57
|
+
variant: 'text',
|
|
58
|
+
color: 'inherit'
|
|
59
|
+
}, ButtonProps, {
|
|
60
|
+
children: [
|
|
61
|
+
/*#__PURE__*/ _jsx(MdiIcon, _extends({
|
|
62
|
+
fontSize: "inherit"
|
|
63
|
+
}, icon)),
|
|
64
|
+
/*#__PURE__*/ _jsx(SrOnly, _extends({}, SrOnlyProps, {
|
|
65
|
+
children: children
|
|
66
|
+
}))
|
|
67
|
+
]
|
|
68
|
+
}))
|
|
69
|
+
}));
|
|
70
|
+
});
|
|
71
|
+
LabelAction.displayName = 'AglynLabelAction';
|
|
72
|
+
export const NodeQuickActions = observer(/*#__PURE__*/ forwardRef((props, ref)=>{
|
|
73
|
+
const { node, children, variant } = props, rest = _object_without_properties_loose(props, [
|
|
74
|
+
"node",
|
|
75
|
+
"children",
|
|
76
|
+
"variant"
|
|
77
|
+
]);
|
|
78
|
+
const handleAddElementClick = useAddElementDrawerCallback();
|
|
79
|
+
const handleProps = Besigner.handles.get(node == null ? void 0 : node.$id);
|
|
80
|
+
// Controlled so menu actions can dismiss the tooltip — an uncontrolled
|
|
81
|
+
// tooltip stays open behind (or above) dialogs its actions launch.
|
|
82
|
+
const [moreOpen, setMoreOpen] = useState(false);
|
|
83
|
+
const openMore = useCallback(()=>setMoreOpen(true), []);
|
|
84
|
+
/**
|
|
85
|
+
* Right-click on the canvas opens this menu (AGL-1405). The leaf records
|
|
86
|
+
* the request and selects the node, which is what mounts this overlay —
|
|
87
|
+
* so the request is read on the first render rather than needing the
|
|
88
|
+
* component to already exist when the click happened.
|
|
89
|
+
*/ const requested = isCanvasContextMenuRequested(node == null ? void 0 : node.$id);
|
|
90
|
+
const closeMore = useCallback(()=>{
|
|
91
|
+
setMoreOpen(false);
|
|
92
|
+
// Unconditionally: a request left standing re-opens the menu the next
|
|
93
|
+
// time this node's overlay mounts, which reads as the menu opening by
|
|
94
|
+
// itself.
|
|
95
|
+
clearCanvasContextMenu();
|
|
96
|
+
}, []);
|
|
97
|
+
return /*#__PURE__*/ _jsxs(Stack, _extends({
|
|
98
|
+
ref: ref,
|
|
99
|
+
id: "aglyn:element-overlay-label",
|
|
100
|
+
"data-aglyn-node": node == null ? void 0 : node.$id,
|
|
101
|
+
"data-aglyn-kind": "overlay-label",
|
|
102
|
+
direction: "row",
|
|
103
|
+
spacing: 0.35,
|
|
104
|
+
divider: /*#__PURE__*/ _jsx(Divider, {
|
|
105
|
+
orientation: "vertical",
|
|
106
|
+
variant: "fullWidth",
|
|
107
|
+
flexItem: true,
|
|
108
|
+
sx: {
|
|
109
|
+
opacity: 0.5
|
|
110
|
+
}
|
|
111
|
+
})
|
|
112
|
+
}, rest, {
|
|
113
|
+
sx: [
|
|
114
|
+
{
|
|
115
|
+
justifyContent: "flex-start",
|
|
116
|
+
alignItems: "center",
|
|
117
|
+
fontSize: 12,
|
|
118
|
+
lineHeight: 1,
|
|
119
|
+
fontWeight: 600,
|
|
120
|
+
letterSpacing: 0.25,
|
|
121
|
+
// pointerEvents: 'none',
|
|
122
|
+
marginLeft: '-2px',
|
|
123
|
+
marginBottom: '1px',
|
|
124
|
+
// One slate surface for the whole floating control (AGL-1194).
|
|
125
|
+
// The strip was `primary.light` while the buttons on it were
|
|
126
|
+
// `tertiary` — two chrome hues on one control, and an ink colour
|
|
127
|
+
// paired with a background it no longer sat on. Ink is now the
|
|
128
|
+
// contrastText OF THIS background, so it follows the scheme
|
|
129
|
+
// instead of being picked once against the old one.
|
|
130
|
+
backgroundColor: 'tertiary.main',
|
|
131
|
+
color: 'tertiary.contrastText',
|
|
132
|
+
px: 0.5,
|
|
133
|
+
pl: 0.5,
|
|
134
|
+
pr: 0.25,
|
|
135
|
+
py: 0.35
|
|
136
|
+
},
|
|
137
|
+
...Array.isArray(rest.sx) ? rest.sx : [
|
|
138
|
+
rest.sx
|
|
139
|
+
]
|
|
140
|
+
],
|
|
141
|
+
children: [
|
|
142
|
+
/*#__PURE__*/ _jsx(Stack, {
|
|
143
|
+
direction: "column",
|
|
144
|
+
sx: {
|
|
145
|
+
alignItems: "center",
|
|
146
|
+
justifyContent: "center",
|
|
147
|
+
fontSize: 12
|
|
148
|
+
},
|
|
149
|
+
children: /*#__PURE__*/ _jsx(ComponentIconComponent, {
|
|
150
|
+
component: node == null ? void 0 : node.componentSchema,
|
|
151
|
+
node: node,
|
|
152
|
+
fontSize: "inherit"
|
|
153
|
+
})
|
|
154
|
+
}),
|
|
155
|
+
/*#__PURE__*/ _jsxs(If, {
|
|
156
|
+
condition: variant !== 'actions',
|
|
157
|
+
children: [
|
|
158
|
+
/*#__PURE__*/ _jsx(Then, {
|
|
159
|
+
children: /*#__PURE__*/ _jsx(Typography, {
|
|
160
|
+
component: "div",
|
|
161
|
+
title: node == null ? void 0 : node.labelShort,
|
|
162
|
+
sx: {
|
|
163
|
+
textOverflow: "ellipsis",
|
|
164
|
+
overflow: "hidden",
|
|
165
|
+
whiteSpace: "nowrap",
|
|
166
|
+
fontSize: "inherit",
|
|
167
|
+
color: "inherit",
|
|
168
|
+
maxWidth: 100
|
|
169
|
+
},
|
|
170
|
+
children: node == null ? void 0 : node.labelShort
|
|
171
|
+
})
|
|
172
|
+
}),
|
|
173
|
+
/*#__PURE__*/ _jsx(Else, {
|
|
174
|
+
children: /*#__PURE__*/ _jsxs(Stack, {
|
|
175
|
+
direction: "row",
|
|
176
|
+
spacing: 0.25,
|
|
177
|
+
sx: {
|
|
178
|
+
justifyContent: "flex-start",
|
|
179
|
+
alignItems: "center"
|
|
180
|
+
},
|
|
181
|
+
children: [
|
|
182
|
+
/*#__PURE__*/ _jsx(LabelAction, {
|
|
183
|
+
title: "move",
|
|
184
|
+
disableInteractive: true,
|
|
185
|
+
ButtonProps: _extends({}, handleProps, {
|
|
186
|
+
onClick: ()=>handleAddElementClick(node)
|
|
187
|
+
}),
|
|
188
|
+
icon: {
|
|
189
|
+
path: ICON_VARIANT_MODIFY_DRAG.path
|
|
190
|
+
},
|
|
191
|
+
children: 'move'
|
|
192
|
+
}),
|
|
193
|
+
/*#__PURE__*/ _jsx(LabelAction, {
|
|
194
|
+
title: "Add",
|
|
195
|
+
disableInteractive: true,
|
|
196
|
+
ButtonProps: {
|
|
197
|
+
onClick: ()=>handleAddElementClick(node)
|
|
198
|
+
},
|
|
199
|
+
icon: {
|
|
200
|
+
path: ICON_VARIANT_MODIFY_ADD.path
|
|
201
|
+
},
|
|
202
|
+
children: 'add'
|
|
203
|
+
}),
|
|
204
|
+
/*#__PURE__*/ _jsx(LabelAction, {
|
|
205
|
+
placement: "right",
|
|
206
|
+
children: 'more',
|
|
207
|
+
icon: {
|
|
208
|
+
path: ICON_VARIANT_SHOW_MORE_VERTICAL.path
|
|
209
|
+
},
|
|
210
|
+
enterDelay: 200,
|
|
211
|
+
leaveDelay: 500,
|
|
212
|
+
open: moreOpen || requested,
|
|
213
|
+
onOpen: openMore,
|
|
214
|
+
onClose: closeMore,
|
|
215
|
+
slotProps: {
|
|
216
|
+
popper: {
|
|
217
|
+
disablePortal: false,
|
|
218
|
+
// Below dialogs/drawers the menu actions open.
|
|
219
|
+
sx: {
|
|
220
|
+
zIndex: (theme)=>theme.zIndex.modal - 1
|
|
221
|
+
},
|
|
222
|
+
/**
|
|
223
|
+
* Kept inside the WINDOW, not the document (AGL-1405).
|
|
224
|
+
* `rootBoundary: 'document'` let the menu be placed
|
|
225
|
+
* below the fold — the document is as tall as whatever
|
|
226
|
+
* you put in it, so nothing ever "overflowed" it — and
|
|
227
|
+
* the page grew a scrollbar around the menu, which moves
|
|
228
|
+
* the editor's own chrome under the reader. The Paper
|
|
229
|
+
* caps its height and scrolls, so a menu taller than the
|
|
230
|
+
* window is still fully reachable.
|
|
231
|
+
*
|
|
232
|
+
* The 100px padding went with it: it was reserving a
|
|
233
|
+
* margin against a boundary that was never binding, and
|
|
234
|
+
* against the real one it would refuse placements that
|
|
235
|
+
* fit perfectly well.
|
|
236
|
+
*/ modifiers: [
|
|
237
|
+
{
|
|
238
|
+
name: 'flip',
|
|
239
|
+
enabled: true,
|
|
240
|
+
options: {
|
|
241
|
+
altBoundary: true,
|
|
242
|
+
padding: 8
|
|
243
|
+
}
|
|
244
|
+
},
|
|
245
|
+
{
|
|
246
|
+
name: 'preventOverflow',
|
|
247
|
+
enabled: true,
|
|
248
|
+
options: {
|
|
249
|
+
altAxis: true,
|
|
250
|
+
altBoundary: true,
|
|
251
|
+
tether: false,
|
|
252
|
+
padding: 8
|
|
253
|
+
}
|
|
254
|
+
},
|
|
255
|
+
{
|
|
256
|
+
name: 'arrow',
|
|
257
|
+
enabled: true
|
|
258
|
+
}
|
|
259
|
+
]
|
|
260
|
+
},
|
|
261
|
+
tooltip: {
|
|
262
|
+
sx: {
|
|
263
|
+
padding: 0,
|
|
264
|
+
m: -2
|
|
265
|
+
}
|
|
266
|
+
}
|
|
267
|
+
},
|
|
268
|
+
title: /*#__PURE__*/ _jsx(NodeContextMenu, {
|
|
269
|
+
node: node,
|
|
270
|
+
onAction: closeMore
|
|
271
|
+
})
|
|
272
|
+
})
|
|
273
|
+
]
|
|
274
|
+
})
|
|
275
|
+
})
|
|
276
|
+
]
|
|
277
|
+
})
|
|
278
|
+
]
|
|
279
|
+
}));
|
|
280
|
+
}));
|
|
281
|
+
NodeQuickActions.displayName = 'NodeQuickActions';
|
|
282
|
+
export default NodeQuickActions;
|
|
283
|
+
|
|
284
|
+
//# sourceMappingURL=node-quick-actions.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../../../../../../libs/besigner/feature/designer/src/lib/components/node-quick-actions.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 * as Besigner from '@aglyn/besigner'\nimport {\n ICON_VARIANT_MODIFY_ADD,\n ICON_VARIANT_MODIFY_DRAG,\n ICON_VARIANT_SHOW_MORE_VERTICAL,\n} from '@aglyn/shared-data-enums'\nimport { SrOnly, SrOnlyProps } from '@aglyn/shared-ui-jsx'\nimport { MdiIcon, MdiIconProps } from '@aglyn/shared-ui-jsx'\nimport { styled } from '@aglyn/shared-ui-theme'\nimport {\n Button as MuiButton,\n type ButtonProps,\n Divider,\n Stack,\n type StackProps,\n Tooltip as MuiTooltip,\n TooltipProps,\n Typography,\n} from '@mui/material'\nimport { observer } from 'mobx-react-lite'\nimport { forwardRef, useCallback, useState } from 'react'\nimport { Else, If, Then } from 'react-if'\nimport useAddElementDrawerCallback from '../hooks/use-add-element-drawer-callback'\nimport ComponentIconComponent from './component-icon.component'\nimport {\n clearCanvasContextMenu,\n isCanvasContextMenuRequested,\n} from '../utils/canvas-context-menu'\nimport NodeContextMenu from './node-context-menu'\n\ninterface LabelActionProps extends Omit<TooltipProps, 'children'> {\n children?: JSX.Children\n icon: MdiIconProps\n ButtonProps?: ButtonProps\n SrOnlyProps?: SrOnlyProps\n}\n\nconst ActionButton = styled(MuiButton)(({ theme }) => ({\n borderRadius: `0.2em`,\n marginLeft: theme.spacing(-0.2),\n pointerEvent: 'unset',\n paddingTop: theme.spacing(0.1),\n paddingBottom: theme.spacing(0.1),\n paddingRight: theme.spacing(0.15),\n paddingLeft: theme.spacing(0.15),\n fontSize: theme.typography.pxToRem(16),\n minWidth: 20,\n '&.MuiButtonGroup-grouped': { minWidth: 25 },\n}))\n\nconst LabelAction = forwardRef<any, LabelActionProps>((props, ref) => {\n const { children, ButtonProps, icon, SrOnlyProps, ...rest } = props\n\n return (\n <MuiTooltip ref={ref} {...rest}>\n {/* Chrome, not accent (AGL-1186), and now transparent on the slate\n strip rather than a contained pill on it (AGL-1194): a contained\n tertiary button on a tertiary bar would be invisible, and the\n pills were the reason the bar carried two hues at once. `inherit`\n takes the strip's ink, so contrast is a pairing rather than a\n guess in either scheme. */}\n <ActionButton variant={'text'} color={'inherit'} {...ButtonProps}>\n <MdiIcon fontSize=\"inherit\" {...icon} />\n <SrOnly {...SrOnlyProps}>{children}</SrOnly>\n </ActionButton>\n </MuiTooltip>\n )\n})\nLabelAction.displayName = 'AglynLabelAction'\n\nexport interface NodeQuickActionsProps extends StackProps {\n node: Aglyn.NodeSchema\n variant?: 'label' | 'actions'\n}\n\nexport const NodeQuickActions = observer(\n forwardRef<any, NodeQuickActionsProps>((props, ref) => {\n const { node, children, variant, ...rest } = props\n const handleAddElementClick = useAddElementDrawerCallback()\n const handleProps = Besigner.handles.get(node?.$id)\n // Controlled so menu actions can dismiss the tooltip — an uncontrolled\n // tooltip stays open behind (or above) dialogs its actions launch.\n const [moreOpen, setMoreOpen] = useState(false)\n const openMore = useCallback(() => setMoreOpen(true), [])\n /**\n * Right-click on the canvas opens this menu (AGL-1405). The leaf records\n * the request and selects the node, which is what mounts this overlay —\n * so the request is read on the first render rather than needing the\n * component to already exist when the click happened.\n */\n const requested = isCanvasContextMenuRequested(node?.$id)\n const closeMore = useCallback(() => {\n setMoreOpen(false)\n // Unconditionally: a request left standing re-opens the menu the next\n // time this node's overlay mounts, which reads as the menu opening by\n // itself.\n clearCanvasContextMenu()\n }, [])\n return (\n <Stack\n ref={ref}\n id=\"aglyn:element-overlay-label\"\n data-aglyn-node={node?.$id}\n data-aglyn-kind=\"overlay-label\"\n direction=\"row\"\n spacing={0.35}\n divider={\n <Divider orientation=\"vertical\" variant=\"fullWidth\" flexItem sx={{ opacity: 0.5 }} />\n }\n {...rest}\n sx={[{\n justifyContent: \"flex-start\",\n alignItems: \"center\",\n fontSize: 12,\n lineHeight: 1,\n fontWeight: 600,\n letterSpacing: 0.25,\n\n // pointerEvents: 'none',\n marginLeft: '-2px',\n\n marginBottom: '1px',\n // One slate surface for the whole floating control (AGL-1194).\n // The strip was `primary.light` while the buttons on it were\n // `tertiary` — two chrome hues on one control, and an ink colour\n // paired with a background it no longer sat on. Ink is now the\n // contrastText OF THIS background, so it follows the scheme\n // instead of being picked once against the old one.\n backgroundColor: 'tertiary.main',\n color: 'tertiary.contrastText',\n px: 0.5,\n pl: 0.5,\n pr: 0.25,\n py: 0.35\n }, ...(Array.isArray(rest.sx) ? rest.sx : [rest.sx])]}>\n <Stack\n direction=\"column\"\n sx={{\n alignItems: \"center\",\n justifyContent: \"center\",\n fontSize: 12\n }}>\n <ComponentIconComponent\n component={node?.componentSchema}\n node={node}\n fontSize=\"inherit\"\n />\n </Stack>\n <If condition={variant !== 'actions'}>\n <Then>\n <Typography\n component=\"div\"\n title={node?.labelShort}\n sx={{\n textOverflow: \"ellipsis\",\n overflow: \"hidden\",\n whiteSpace: \"nowrap\",\n fontSize: \"inherit\",\n color: \"inherit\",\n maxWidth: 100\n }}>\n {node?.labelShort}\n </Typography>\n </Then>\n <Else>\n <Stack\n direction=\"row\"\n spacing={0.25}\n sx={{\n justifyContent: \"flex-start\",\n alignItems: \"center\"\n }}>\n <LabelAction\n title=\"move\"\n disableInteractive\n ButtonProps={{\n ...handleProps,\n onClick: () => handleAddElementClick(node),\n }}\n icon={{ path: ICON_VARIANT_MODIFY_DRAG.path }}\n >\n {'move'}\n </LabelAction>\n <LabelAction\n title=\"Add\"\n disableInteractive\n ButtonProps={{\n onClick: () => handleAddElementClick(node),\n }}\n icon={{ path: ICON_VARIANT_MODIFY_ADD.path }}\n >\n {'add'}\n </LabelAction>\n <LabelAction\n placement=\"right\"\n children={'more'}\n icon={{ path: ICON_VARIANT_SHOW_MORE_VERTICAL.path }}\n enterDelay={200}\n leaveDelay={500}\n open={moreOpen || requested}\n onOpen={openMore}\n onClose={closeMore}\n slotProps={{\n popper: {\n disablePortal: false,\n // Below dialogs/drawers the menu actions open.\n sx: { zIndex: (theme) => theme.zIndex.modal - 1 },\n /**\n * Kept inside the WINDOW, not the document (AGL-1405).\n * `rootBoundary: 'document'` let the menu be placed\n * below the fold — the document is as tall as whatever\n * you put in it, so nothing ever \"overflowed\" it — and\n * the page grew a scrollbar around the menu, which moves\n * the editor's own chrome under the reader. The Paper\n * caps its height and scrolls, so a menu taller than the\n * window is still fully reachable.\n *\n * The 100px padding went with it: it was reserving a\n * margin against a boundary that was never binding, and\n * against the real one it would refuse placements that\n * fit perfectly well.\n */\n modifiers: [\n {\n name: 'flip',\n enabled: true,\n options: { altBoundary: true, padding: 8 },\n },\n {\n name: 'preventOverflow',\n enabled: true,\n options: {\n altAxis: true,\n altBoundary: true,\n tether: false,\n padding: 8,\n },\n },\n {\n name: 'arrow',\n enabled: true,\n },\n ],\n },\n tooltip: {\n sx: {\n padding: 0,\n m: -2,\n },\n },\n }}\n title={<NodeContextMenu node={node} onAction={closeMore} />}\n />\n </Stack>\n </Else>\n </If>\n </Stack>\n );\n }),\n)\nNodeQuickActions.displayName = 'NodeQuickActions'\n\nexport default NodeQuickActions\n"],"names":["Besigner","ICON_VARIANT_MODIFY_ADD","ICON_VARIANT_MODIFY_DRAG","ICON_VARIANT_SHOW_MORE_VERTICAL","SrOnly","MdiIcon","styled","Button","MuiButton","Divider","Stack","Tooltip","MuiTooltip","Typography","observer","forwardRef","useCallback","useState","Else","If","Then","useAddElementDrawerCallback","ComponentIconComponent","clearCanvasContextMenu","isCanvasContextMenuRequested","NodeContextMenu","ActionButton","theme","borderRadius","marginLeft","spacing","pointerEvent","paddingTop","paddingBottom","paddingRight","paddingLeft","fontSize","typography","pxToRem","minWidth","LabelAction","props","ref","children","ButtonProps","icon","SrOnlyProps","rest","variant","color","displayName","NodeQuickActions","node","handleAddElementClick","handleProps","handles","get","$id","moreOpen","setMoreOpen","openMore","requested","closeMore","id","data-aglyn-node","data-aglyn-kind","direction","divider","orientation","flexItem","sx","opacity","justifyContent","alignItems","lineHeight","fontWeight","letterSpacing","marginBottom","backgroundColor","px","pl","pr","py","Array","isArray","component","componentSchema","condition","title","labelShort","textOverflow","overflow","whiteSpace","maxWidth","disableInteractive","onClick","path","placement","enterDelay","leaveDelay","open","onOpen","onClose","slotProps","popper","disablePortal","zIndex","modal","modifiers","name","enabled","options","altBoundary","padding","altAxis","tether","tooltip","m","onAction"],"mappings":"AAAA;;;;;;;;;;;;;;;CAeC;;;AAGD,YAAYA,cAAc,kBAAiB;AAC3C,SACEC,uBAAuB,EACvBC,wBAAwB,EACxBC,+BAA+B,QAC1B,2BAA0B;AACjC,SAASC,MAAM,QAAqB,uBAAsB;AAC1D,SAASC,OAAO,QAAsB,uBAAsB;AAC5D,SAASC,MAAM,QAAQ,yBAAwB;AAC/C,SACEC,UAAUC,SAAS,EAEnBC,OAAO,EACPC,KAAK,EAELC,WAAWC,UAAU,EAErBC,UAAU,QACL,gBAAe;AACtB,SAASC,QAAQ,QAAQ,kBAAiB;AAC1C,SAASC,UAAU,EAAEC,WAAW,EAAEC,QAAQ,QAAQ,QAAO;AACzD,SAASC,IAAI,EAAEC,EAAE,EAAEC,IAAI,QAAQ,WAAU;AACzC,OAAOC,iCAAiC,8CAA0C;AAClF,OAAOC,4BAA4B,gCAA4B;AAC/D,SACEC,sBAAsB,EACtBC,4BAA4B,QACvB,kCAA8B;AACrC,OAAOC,qBAAqB,yBAAqB;AASjD,MAAMC,eAAepB,OAAOE,WAAW,CAAC,EAAEmB,KAAK,EAAE,GAAM,CAAA;QACrDC,cAAc,CAAC,KAAK,CAAC;QACrBC,YAAYF,MAAMG,OAAO,CAAC,CAAC;QAC3BC,cAAc;QACdC,YAAYL,MAAMG,OAAO,CAAC;QAC1BG,eAAeN,MAAMG,OAAO,CAAC;QAC7BI,cAAcP,MAAMG,OAAO,CAAC;QAC5BK,aAAaR,MAAMG,OAAO,CAAC;QAC3BM,UAAUT,MAAMU,UAAU,CAACC,OAAO,CAAC;QACnCC,UAAU;QACV,4BAA4B;YAAEA,UAAU;QAAG;IAC7C,CAAA;AAEA,MAAMC,4BAAczB,WAAkC,CAAC0B,OAAOC;IAC5D,MAAM,EAAEC,QAAQ,EAAEC,WAAW,EAAEC,IAAI,EAAEC,WAAW,EAAW,GAAGL,OAATM,wCAASN;;;;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C;oCACnDE,YAAY;oCACZC,YAAY;oCACZC,MAAM1C,YAAYG;oCAClBwC,QAAQzC;oCACR0C,SAASxC;oCACTyC,WAAW;wCACTC,QAAQ;4CACNC,eAAe;4CACf,+CAA+C;4CAC/CnC,IAAI;gDAAEoC,QAAQ,CAAC/E,QAAUA,MAAM+E,MAAM,CAACC,KAAK,GAAG;4CAAE;4CAChD;;;;;;;;;;;;;;qBAcC,GACDC,WAAW;gDACT;oDACEC,MAAM;oDACNC,SAAS;oDACTC,SAAS;wDAAEC,aAAa;wDAAMC,SAAS;oDAAE;gDAC3C;gDACA;oDACEJ,MAAM;oDACNC,SAAS;oDACTC,SAAS;wDACPG,SAAS;wDACTF,aAAa;wDACbG,QAAQ;wDACRF,SAAS;oDACX;gDACF;gDACA;oDACEJ,MAAM;oDACNC,SAAS;gDACX;6CACD;wCACH;wCACAM,SAAS;4CACP9C,IAAI;gDACF2C,SAAS;gDACTI,GAAG,CAAC;4CACN;wCACF;oCACF;oCACA7B,qBAAO,KAAC/D;wCAAgB2B,MAAMA;wCAAMkE,UAAUxD;;;;;;;;;;AAO5D,IACD;AACDX,iBAAiBD,WAAW,GAAG;AAE/B,eAAeC,iBAAgB"}
|
|
@@ -0,0 +1,106 @@
|
|
|
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
|
+
*/
|
|
17
|
+
import { BoxProps } from '@mui/material';
|
|
18
|
+
import type { ComponentProps } from 'react';
|
|
19
|
+
declare const TreeView: import("@emotion/styled").StyledComponent<import("@mui/material").ListOwnProps & Omit<import("@mui/material").ListOwnProps, keyof import("@mui/material").ListOwnProps> & import("@mui/material/OverridableComponent").CommonProps & Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLUListElement>, HTMLUListElement>, "children" | "sx" | "className" | "style" | "classes" | "dense" | "subheader" | "disablePadding"> & import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme> & {
|
|
20
|
+
component?: React.ElementType | undefined;
|
|
21
|
+
}, {}, {}>;
|
|
22
|
+
/**
|
|
23
|
+
* The hierarchy's depth cue (AGL-2486).
|
|
24
|
+
*
|
|
25
|
+
* What this replaces was a per-level background tint, and every tint of that
|
|
26
|
+
* shape has the same fault: it COMPOSITES. Each ancestor of the selection
|
|
27
|
+
* painted its own overlay, so the row at depth n sat under n of them and its
|
|
28
|
+
* background walked one step further toward the ink for every level. Against
|
|
29
|
+
* the console's light palette the previous ramp crossed WCAG AA at the
|
|
30
|
+
* seventh level (3.85:1) and reached 1.33:1 by the twelfth — the label and
|
|
31
|
+
* the row had met. Dark mode looked right for the arithmetic reason that the
|
|
32
|
+
* same darkening moves AWAY from light text, which is exactly why no single
|
|
33
|
+
* tint direction can serve both schemes.
|
|
34
|
+
*
|
|
35
|
+
* Capping the ramp was tried and is not a fix either. A cap only decides
|
|
36
|
+
* WHERE the cue stops working: past the cap every level paints the same
|
|
37
|
+
* background, so depth 6 and depth 16 are indistinguishable, and the issue
|
|
38
|
+
* asks for a cue that reads at depth 8 as clearly as at depth 1.
|
|
39
|
+
*
|
|
40
|
+
* So the cue is POSITIONAL rather than tonal. Each nesting level draws one
|
|
41
|
+
* vertical guide in the row's indent gutter — depth is read by counting
|
|
42
|
+
* lines, the way a tree view is read everywhere else. Guides are a fixed
|
|
43
|
+
* colour and a fixed alpha at every level, and they live in the gutter, so
|
|
44
|
+
* nothing is painted behind the label at all: the row's background is
|
|
45
|
+
* `background.paper` at depth 1 and at depth 40, in both schemes, and the
|
|
46
|
+
* text-vs-background contrast ratio is therefore a constant rather than a
|
|
47
|
+
* function of depth. `hierarchy-depth-contrast.spec.ts` measures it.
|
|
48
|
+
*
|
|
49
|
+
* The branch containing the selection is still marked — that is what the old
|
|
50
|
+
* tint was for — by colouring THAT row's guides with the accent instead. One
|
|
51
|
+
* row, one element, no stacking possible.
|
|
52
|
+
*/
|
|
53
|
+
/** Horizontal indent one nesting level adds, in px. */
|
|
54
|
+
export declare const HIERARCHY_INDENT_STEP = 23;
|
|
55
|
+
/** Width of one guide line, in px. */
|
|
56
|
+
export declare const HIERARCHY_GUIDE_WIDTH = 1;
|
|
57
|
+
/**
|
|
58
|
+
* Alpha of a guide, over the ink colour of whichever scheme is active.
|
|
59
|
+
*
|
|
60
|
+
* Drawn from `text.primary` rather than `divider` so the one value serves
|
|
61
|
+
* both schemes: the ink is dark on light and light on dark, so the guide
|
|
62
|
+
* always moves AWAY from the surface it sits on instead of toward the label
|
|
63
|
+
* — the failure mode of a fixed-direction tint, in miniature.
|
|
64
|
+
*
|
|
65
|
+
* 0.45 clears WCAG 1.4.11 (3:1 for a non-text cue) in the WORST of the four
|
|
66
|
+
* surface/scheme pairings, and is not a number picked by eye: the measured
|
|
67
|
+
* ratios are 3.35 and 3.32 in light, 3.89 and 4.19 in dark. `divider`, at
|
|
68
|
+
* 0.12, measures 1.31 — legible as a hairline between panels, invisible as
|
|
69
|
+
* the thing you are being asked to count. `hierarchy-depth-contrast.spec.ts`
|
|
70
|
+
* re-derives all four.
|
|
71
|
+
*/
|
|
72
|
+
export declare const HIERARCHY_GUIDE_ALPHA = 0.45;
|
|
73
|
+
/**
|
|
74
|
+
* Guides a row at `depth` draws, and how wide a gutter they occupy.
|
|
75
|
+
*
|
|
76
|
+
* Deliberately unbounded and deliberately linear: the count IS the depth, so
|
|
77
|
+
* the cue keeps saying something new at every level. It can afford to,
|
|
78
|
+
* because nothing here is cumulative — a guide is drawn beside the label,
|
|
79
|
+
* never behind it.
|
|
80
|
+
*/
|
|
81
|
+
export declare function hierarchyGuideCount(depth: number): number;
|
|
82
|
+
export declare function hierarchyGutterWidth(depth: number): number;
|
|
83
|
+
/**
|
|
84
|
+
* The depth-dependent CSS a tree row gets, as a plain object.
|
|
85
|
+
*
|
|
86
|
+
* Exported so the contrast spec can read the STYLES rather than a
|
|
87
|
+
* description of them: the check that no key here is a background COLOUR is
|
|
88
|
+
* what makes "the depth cue never accumulates toward the text" a property of
|
|
89
|
+
* the code instead of a claim in a comment.
|
|
90
|
+
*/
|
|
91
|
+
export declare function hierarchyDepthStyles(depth: number, colors: {
|
|
92
|
+
guide: string;
|
|
93
|
+
activeGuide: string;
|
|
94
|
+
}): {
|
|
95
|
+
[x: string]: {
|
|
96
|
+
backgroundImage: string;
|
|
97
|
+
backgroundRepeat: string;
|
|
98
|
+
backgroundSize: string;
|
|
99
|
+
backgroundPosition: string;
|
|
100
|
+
};
|
|
101
|
+
};
|
|
102
|
+
export interface NodeTreeViewProps extends BoxProps {
|
|
103
|
+
TreeViewProps?: Partial<Omit<ComponentProps<typeof TreeView>, 'children'>>;
|
|
104
|
+
}
|
|
105
|
+
export declare const NodeTreeView: import("react").FunctionComponent<Omit<NodeTreeViewProps, "ref"> & import("react").RefAttributes<any>>;
|
|
106
|
+
export default NodeTreeView;
|