@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,505 @@
|
|
|
1
|
+
import { _ as _extends } from "@swc/helpers/_/_extends";
|
|
2
|
+
import { _ as _object_without_properties_loose } from "@swc/helpers/_/_object_without_properties_loose";
|
|
3
|
+
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
4
|
+
/**
|
|
5
|
+
* @license
|
|
6
|
+
* Copyright 2026 Aglyn LLC
|
|
7
|
+
*
|
|
8
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
9
|
+
* you may not use this file except in compliance with the License.
|
|
10
|
+
* You may obtain a copy of the License at
|
|
11
|
+
*
|
|
12
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
13
|
+
*
|
|
14
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
15
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
16
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
17
|
+
* See the License for the specific language governing permissions and
|
|
18
|
+
* limitations under the License.
|
|
19
|
+
*/ import { canvas } from "@aglyn/aglyn";
|
|
20
|
+
import * as Besigner from "@aglyn/besigner";
|
|
21
|
+
import { BesignerPanelTabFlag } from "@aglyn/besigner";
|
|
22
|
+
import { ICON_VARIANT_ELEMENT, ICON_VARIANT_ELEMENT_BROWSE, ICON_VARIANT_ELEMENT_INTERACTIONS, ICON_VARIANT_ELEMENT_PROPERTIES, ICON_VARIANT_ELEMENT_STYLES, ICON_VARIANT_ELEMENT_TREE_VIEW, ICON_VARIANT_MODIFY_ADD } from "@aglyn/shared-data-enums";
|
|
23
|
+
import { HelpTip, MdiIcon } from "@aglyn/shared-ui-jsx";
|
|
24
|
+
import { styled } from "@aglyn/shared-ui-theme";
|
|
25
|
+
import { getDisplayName, numberFromHexadecimal, numberToHexadecimal } from "@aglyn/shared-util-tools";
|
|
26
|
+
import { hoistNonReactStatics } from "@aglyn/shared-util-vendor";
|
|
27
|
+
import { TabContext as MuiTabContext, TabList as MuiTabList, TabPanel as MuiTabPanel } from "@mui/lab";
|
|
28
|
+
import { AppBar as MuiAppBar, Box, Button, Chip, Stack, Tab as MuiTab, Typography } from "@mui/material";
|
|
29
|
+
import { observer } from "mobx-react-lite";
|
|
30
|
+
import { forwardRef, useCallback, useEffect } from "react";
|
|
31
|
+
import useAddElementDrawerCallback from "../hooks/use-add-element-drawer-callback.js";
|
|
32
|
+
import useAglynBesignerPanel from "../hooks/use-aglyn-besigner-panel.js";
|
|
33
|
+
import ElementInteractionsForm from "./element-interactions-form.component.js";
|
|
34
|
+
import ComponentAccordionList from "./component-accordion-list.js";
|
|
35
|
+
import ElementPropsForm from "./element-props-form.component.js";
|
|
36
|
+
import ElementStylesForm from "./element-styles-form.component.js";
|
|
37
|
+
import NodeTreeView from "./node-tree-view.js";
|
|
38
|
+
import SiteThemeColorTokensProvider from "./site-theme-color-tokens-provider.component.js";
|
|
39
|
+
import { usePublishActiveHostTheme } from "../utils/active-host-theme.js";
|
|
40
|
+
import { besignerInspected } from "../contexts/inspected-selection.js";
|
|
41
|
+
import { inspectorExtrasFor, useBesignerInspectorExtras } from "../contexts/inspector-extras-context.js";
|
|
42
|
+
import { besignerDocsUrl } from "../utils/docs-help.js";
|
|
43
|
+
import WorkspacePanelComponent from "./workspace-panel.component.js";
|
|
44
|
+
const TabPanel = styled(MuiTabPanel, {
|
|
45
|
+
name: 'AglynTabPanel'
|
|
46
|
+
})({
|
|
47
|
+
padding: 0,
|
|
48
|
+
overflow: 'auto',
|
|
49
|
+
height: '100%'
|
|
50
|
+
});
|
|
51
|
+
const TabPanelInner = styled('div', {
|
|
52
|
+
name: 'AglynTabPanelInner'
|
|
53
|
+
})(({ theme })=>({
|
|
54
|
+
width: '100%'
|
|
55
|
+
}));
|
|
56
|
+
const emptyView = /*#__PURE__*/ _jsx(Stack, {
|
|
57
|
+
direction: "column",
|
|
58
|
+
component: TabPanelInner,
|
|
59
|
+
sx: {
|
|
60
|
+
justifyContent: 'center',
|
|
61
|
+
height: 1,
|
|
62
|
+
p: 2
|
|
63
|
+
},
|
|
64
|
+
children: /*#__PURE__*/ _jsxs(Typography, {
|
|
65
|
+
color: "textSecondary",
|
|
66
|
+
variant: "overline",
|
|
67
|
+
component: "div",
|
|
68
|
+
align: "center",
|
|
69
|
+
children: [
|
|
70
|
+
/*#__PURE__*/ _jsx(MdiIcon, {
|
|
71
|
+
sx: {
|
|
72
|
+
opacity: 0.3,
|
|
73
|
+
fontSize: 80
|
|
74
|
+
},
|
|
75
|
+
path: ICON_VARIANT_ELEMENT.path
|
|
76
|
+
}),
|
|
77
|
+
/*#__PURE__*/ _jsx("div", {
|
|
78
|
+
children: 'Select an element'
|
|
79
|
+
})
|
|
80
|
+
]
|
|
81
|
+
})
|
|
82
|
+
});
|
|
83
|
+
/**
|
|
84
|
+
* `Hero · Section` with a `SELECTED` tag — the inspector header the
|
|
85
|
+
* `/product` hero mockup shows (AGL-2175).
|
|
86
|
+
*
|
|
87
|
+
* The right panel had no header at all: three tabs of controls with
|
|
88
|
+
* nothing naming what they act on. On a canvas where clicking a child
|
|
89
|
+
* moves the selection under you, that is the difference between editing
|
|
90
|
+
* the section and editing the heading inside it — and the panel looked
|
|
91
|
+
* identical either way.
|
|
92
|
+
*
|
|
93
|
+
* The second half is the COMPONENT, not a category: `labelShort` is the
|
|
94
|
+
* preset's name (`Hero`) and the schema's is what it actually is
|
|
95
|
+
* (`Section`). They are the same word often enough that it is dropped
|
|
96
|
+
* when it would only repeat itself.
|
|
97
|
+
*/ const SelectedNodeHeader = observer(({ node })=>{
|
|
98
|
+
var _ref;
|
|
99
|
+
var _node_componentSchema;
|
|
100
|
+
const name = (_ref = node == null ? void 0 : node.labelShort) != null ? _ref : '';
|
|
101
|
+
const component = node == null ? void 0 : (_node_componentSchema = node.componentSchema) == null ? void 0 : _node_componentSchema.displayName;
|
|
102
|
+
const subtitle = component && component.toLowerCase() !== name.toLowerCase() ? `${name} · ${component}` : name;
|
|
103
|
+
return /*#__PURE__*/ _jsxs(Stack, {
|
|
104
|
+
direction: "row",
|
|
105
|
+
spacing: 1,
|
|
106
|
+
sx: {
|
|
107
|
+
alignItems: 'center',
|
|
108
|
+
px: 2,
|
|
109
|
+
py: 1,
|
|
110
|
+
borderBottom: 1,
|
|
111
|
+
borderColor: 'divider'
|
|
112
|
+
},
|
|
113
|
+
children: [
|
|
114
|
+
/*#__PURE__*/ _jsx(Typography, {
|
|
115
|
+
variant: "subtitle2",
|
|
116
|
+
noWrap: true,
|
|
117
|
+
sx: {
|
|
118
|
+
flex: 1,
|
|
119
|
+
minWidth: 0
|
|
120
|
+
},
|
|
121
|
+
children: subtitle || 'Element'
|
|
122
|
+
}),
|
|
123
|
+
/*#__PURE__*/ _jsx(Chip, {
|
|
124
|
+
size: "small",
|
|
125
|
+
variant: "outlined",
|
|
126
|
+
color: "secondary",
|
|
127
|
+
label: "SELECTED",
|
|
128
|
+
sx: {
|
|
129
|
+
height: 18,
|
|
130
|
+
'& .MuiChip-label': {
|
|
131
|
+
px: 0.75,
|
|
132
|
+
fontSize: 10
|
|
133
|
+
}
|
|
134
|
+
}
|
|
135
|
+
})
|
|
136
|
+
]
|
|
137
|
+
});
|
|
138
|
+
});
|
|
139
|
+
SelectedNodeHeader.displayName = 'SelectedNodeHeader';
|
|
140
|
+
function withLastSelectedNode(WrappedComponent) {
|
|
141
|
+
const displayName = getDisplayName(WrappedComponent);
|
|
142
|
+
const WithLastSelectedNode = observer((props)=>{
|
|
143
|
+
var _canvas_getNode;
|
|
144
|
+
const {} = props, rest = _extends({}, props);
|
|
145
|
+
const selected = Besigner.focus.getLastSelected();
|
|
146
|
+
/**
|
|
147
|
+
* The LIVE node for that selection, re-resolved by id every render
|
|
148
|
+
* (AGL-2486).
|
|
149
|
+
*
|
|
150
|
+
* The focus store holds node OBJECTS, not ids. Anything that replaces the
|
|
151
|
+
* canvas map wholesale — `undo`, `redo`, a co-editing `applyNodes`, a
|
|
152
|
+
* local-draft restore — builds fresh node instances and leaves the store
|
|
153
|
+
* pointing at the pre-restore ones. The panels then read their fields from
|
|
154
|
+
* an orphan and, worse, write back through it: `updateNodeProps` assigns
|
|
155
|
+
* `node.props` on an object the canvas no longer owns, so the edit lands
|
|
156
|
+
* nowhere. Nothing throws and nothing marks the document dirty, so an
|
|
157
|
+
* author sees their new text in the box, an unchanged canvas, and `UP TO
|
|
158
|
+
* DATE` — the reported "the Text attribute silently discards edits".
|
|
159
|
+
*
|
|
160
|
+
* Resolving here rather than in the three panels because they share this
|
|
161
|
+
* one seam, and it is `observer`-tracked: `getNode` reads the observable
|
|
162
|
+
* map, so a restore re-renders the panel with the live node instead of
|
|
163
|
+
* leaving stale values in the fields.
|
|
164
|
+
*
|
|
165
|
+
* A node the map no longer has (deleted, or a test node that was never in
|
|
166
|
+
* it) falls back to the stored object, which is exactly today's behaviour
|
|
167
|
+
* for that case — there is no live node to prefer.
|
|
168
|
+
*/ const lastSelected = selected ? (_canvas_getNode = canvas.getNode(selected.$id)) != null ? _canvas_getNode : selected : selected;
|
|
169
|
+
return /*#__PURE__*/ _jsx(_Fragment, {
|
|
170
|
+
children: !lastSelected ? emptyView : /*#__PURE__*/ _jsxs(_Fragment, {
|
|
171
|
+
children: [
|
|
172
|
+
/*#__PURE__*/ _jsx(SelectedNodeHeader, {
|
|
173
|
+
node: lastSelected
|
|
174
|
+
}),
|
|
175
|
+
/*#__PURE__*/ _jsx(WrappedComponent, _extends({
|
|
176
|
+
node: lastSelected
|
|
177
|
+
}, rest))
|
|
178
|
+
]
|
|
179
|
+
})
|
|
180
|
+
});
|
|
181
|
+
});
|
|
182
|
+
WithLastSelectedNode.displayName = `WithLastSelectedNode(${displayName})`;
|
|
183
|
+
hoistNonReactStatics(WithLastSelectedNode, WrappedComponent);
|
|
184
|
+
return WithLastSelectedNode;
|
|
185
|
+
}
|
|
186
|
+
const withTabPanelInner = (Component)=>(props)=>{
|
|
187
|
+
return /*#__PURE__*/ _jsx(TabPanelInner, {
|
|
188
|
+
sx: {
|
|
189
|
+
p: 2
|
|
190
|
+
},
|
|
191
|
+
children: /*#__PURE__*/ _jsx(Component, _extends({}, props))
|
|
192
|
+
});
|
|
193
|
+
};
|
|
194
|
+
/**
|
|
195
|
+
* The Attributes form with the host app's section beneath it (AGL-2940):
|
|
196
|
+
* whatever `BesignerInspectorExtrasContext` carries, drawn under the
|
|
197
|
+
* selected element's own fields — for that element, when the host supplied
|
|
198
|
+
* a function — and nothing when the host supplied nothing.
|
|
199
|
+
*
|
|
200
|
+
* The selection travels with `editable` (AGL-2908), the same rule the form's
|
|
201
|
+
* own Save as reusable component and Detach actions are drawn under: the
|
|
202
|
+
* canvas root and locked layout chrome answer false. It is read here because
|
|
203
|
+
* a host section has the node and not the editor, and the rule is the drag
|
|
204
|
+
* manager's.
|
|
205
|
+
*/ const ElementPropsFormWithExtras = (props)=>{
|
|
206
|
+
const supplied = useBesignerInspectorExtras();
|
|
207
|
+
const inspected = besignerInspected(props.node);
|
|
208
|
+
const extras = inspected ? inspectorExtrasFor(supplied, inspected) : null;
|
|
209
|
+
return /*#__PURE__*/ _jsxs(_Fragment, {
|
|
210
|
+
children: [
|
|
211
|
+
/*#__PURE__*/ _jsx(ElementPropsForm, _extends({}, props)),
|
|
212
|
+
extras ? /*#__PURE__*/ _jsx(Box, {
|
|
213
|
+
sx: {
|
|
214
|
+
pt: 2
|
|
215
|
+
},
|
|
216
|
+
children: extras
|
|
217
|
+
}) : null
|
|
218
|
+
]
|
|
219
|
+
});
|
|
220
|
+
};
|
|
221
|
+
const ElementsTree = /*#__PURE__*/ forwardRef((props, ref)=>{
|
|
222
|
+
const handleAddElementClick = useAddElementDrawerCallback();
|
|
223
|
+
return /*#__PURE__*/ _jsxs(TabPanelInner, {
|
|
224
|
+
sx: {
|
|
225
|
+
pl: 0.5
|
|
226
|
+
},
|
|
227
|
+
children: [
|
|
228
|
+
/*#__PURE__*/ _jsxs(Box, {
|
|
229
|
+
sx: {
|
|
230
|
+
px: 0.05,
|
|
231
|
+
pb: 1,
|
|
232
|
+
pt: 1,
|
|
233
|
+
display: 'flex',
|
|
234
|
+
alignItems: 'center'
|
|
235
|
+
},
|
|
236
|
+
children: [
|
|
237
|
+
/*#__PURE__*/ _jsx(Button, {
|
|
238
|
+
color: "primary",
|
|
239
|
+
startIcon: /*#__PURE__*/ _jsx(MdiIcon, {
|
|
240
|
+
fontSize: "inherit",
|
|
241
|
+
path: ICON_VARIANT_MODIFY_ADD.path
|
|
242
|
+
}),
|
|
243
|
+
onClick: ()=>handleAddElementClick(Besigner.focus.getLastSelected()),
|
|
244
|
+
children: 'Add Element'
|
|
245
|
+
}),
|
|
246
|
+
/*#__PURE__*/ _jsx(HelpTip, {
|
|
247
|
+
title: "Drag, drop & hierarchy",
|
|
248
|
+
excerpt: "Reparent by dragging here or on the canvas. Containers accept children; dropping on a leaf element makes a sibling instead.",
|
|
249
|
+
href: besignerDocsUrl('dragDropHierarchy', '#drop-zones-edges-vs-center'),
|
|
250
|
+
sx: {
|
|
251
|
+
ml: 'auto',
|
|
252
|
+
mr: 0.5,
|
|
253
|
+
fontSize: '0.9em'
|
|
254
|
+
}
|
|
255
|
+
})
|
|
256
|
+
]
|
|
257
|
+
}),
|
|
258
|
+
/*#__PURE__*/ _jsx(NodeTreeView, _extends({
|
|
259
|
+
ref: ref
|
|
260
|
+
}, props))
|
|
261
|
+
]
|
|
262
|
+
});
|
|
263
|
+
});
|
|
264
|
+
const panelTabs = {
|
|
265
|
+
panelLeft: {
|
|
266
|
+
defaultTab: BesignerPanelTabFlag.ELEMENTS_TREE,
|
|
267
|
+
panel: {
|
|
268
|
+
id: 'left',
|
|
269
|
+
anchor: 'left',
|
|
270
|
+
'aria-label': 'left toolbox panel'
|
|
271
|
+
},
|
|
272
|
+
tabs: [
|
|
273
|
+
{
|
|
274
|
+
value: BesignerPanelTabFlag.ELEMENTS_TREE,
|
|
275
|
+
tab: {
|
|
276
|
+
icon: {
|
|
277
|
+
path: ICON_VARIANT_ELEMENT_TREE_VIEW.path
|
|
278
|
+
},
|
|
279
|
+
label: 'Hierarchy'
|
|
280
|
+
},
|
|
281
|
+
panel: {
|
|
282
|
+
Component: ElementsTree
|
|
283
|
+
}
|
|
284
|
+
},
|
|
285
|
+
{
|
|
286
|
+
value: BesignerPanelTabFlag.ELEMENT_BROWSE,
|
|
287
|
+
tab: {
|
|
288
|
+
icon: {
|
|
289
|
+
path: ICON_VARIANT_ELEMENT_BROWSE.path
|
|
290
|
+
},
|
|
291
|
+
label: 'Elements'
|
|
292
|
+
},
|
|
293
|
+
panel: {
|
|
294
|
+
Component: ComponentAccordionList
|
|
295
|
+
}
|
|
296
|
+
}
|
|
297
|
+
]
|
|
298
|
+
},
|
|
299
|
+
panelRight: {
|
|
300
|
+
// Attributes first and open by default — it is what you reach for on
|
|
301
|
+
// selecting an element. Tab order here is display order only; the flag
|
|
302
|
+
// values are persisted in panel state, so they stay put.
|
|
303
|
+
defaultTab: BesignerPanelTabFlag.ELEMENT_PROPS_FORM,
|
|
304
|
+
panel: {
|
|
305
|
+
id: 'right',
|
|
306
|
+
anchor: 'right',
|
|
307
|
+
'aria-label': 'right toolbox panel'
|
|
308
|
+
},
|
|
309
|
+
tabs: [
|
|
310
|
+
{
|
|
311
|
+
value: BesignerPanelTabFlag.ELEMENT_PROPS_FORM,
|
|
312
|
+
tab: {
|
|
313
|
+
icon: {
|
|
314
|
+
path: ICON_VARIANT_ELEMENT_PROPERTIES.path
|
|
315
|
+
},
|
|
316
|
+
label: 'Attributes'
|
|
317
|
+
},
|
|
318
|
+
panel: {
|
|
319
|
+
Component: withLastSelectedNode(withTabPanelInner(ElementPropsFormWithExtras))
|
|
320
|
+
}
|
|
321
|
+
},
|
|
322
|
+
{
|
|
323
|
+
value: BesignerPanelTabFlag.ELEMENT_STYLES,
|
|
324
|
+
tab: {
|
|
325
|
+
icon: {
|
|
326
|
+
path: ICON_VARIANT_ELEMENT_STYLES.path
|
|
327
|
+
},
|
|
328
|
+
label: 'Styles'
|
|
329
|
+
},
|
|
330
|
+
panel: {
|
|
331
|
+
Component: withLastSelectedNode(ElementStylesForm)
|
|
332
|
+
}
|
|
333
|
+
},
|
|
334
|
+
/*
|
|
335
|
+
* Interactions, between Styles and where Info used to be.
|
|
336
|
+
*
|
|
337
|
+
* They lived at the bottom of Attributes, under every field the
|
|
338
|
+
* component declares — below the fold on anything with more than a
|
|
339
|
+
* handful, so an author had no reason to believe the element had any.
|
|
340
|
+
* An interaction is not an attribute: it is a behaviour, authored in a
|
|
341
|
+
* dialog rather than a field, and it belongs beside the styles as a
|
|
342
|
+
* peer.
|
|
343
|
+
*
|
|
344
|
+
* INFO IS GONE. Its two accordions are reference detail about the
|
|
345
|
+
* component and the node's ids — worth having, not worth a tab — and
|
|
346
|
+
* they now sit at the bottom of Attributes, beside the fields they
|
|
347
|
+
* describe. Its flag value stays reserved; panel state is persisted,
|
|
348
|
+
* and a reader whose last session ended on Info would otherwise return
|
|
349
|
+
* to a tab id that means something else.
|
|
350
|
+
*/ {
|
|
351
|
+
value: BesignerPanelTabFlag.ELEMENT_INTERACTIONS,
|
|
352
|
+
tab: {
|
|
353
|
+
icon: {
|
|
354
|
+
path: ICON_VARIANT_ELEMENT_INTERACTIONS.path
|
|
355
|
+
},
|
|
356
|
+
label: 'Interactions'
|
|
357
|
+
},
|
|
358
|
+
panel: {
|
|
359
|
+
Component: withLastSelectedNode(withTabPanelInner(ElementInteractionsForm))
|
|
360
|
+
}
|
|
361
|
+
}
|
|
362
|
+
]
|
|
363
|
+
}
|
|
364
|
+
};
|
|
365
|
+
export const AsidePanelComponent = /*#__PURE__*/ forwardRef((props, ref)=>{
|
|
366
|
+
const { children, panel: panelKey } = props, rest = _object_without_properties_loose(props, [
|
|
367
|
+
"children",
|
|
368
|
+
"panel"
|
|
369
|
+
]);
|
|
370
|
+
// Republish the page's site theme for surfaces that render OUTSIDE the
|
|
371
|
+
// page tree (AGL-2486). This panel is inside `HostThemeDocumentContext`;
|
|
372
|
+
// the Choose-element dialog — rendered by `withBesignerContext`, which
|
|
373
|
+
// wraps the page — is not, and its element preview was painting the
|
|
374
|
+
// console's brand onto someone else's site.
|
|
375
|
+
usePublishActiveHostTheme();
|
|
376
|
+
const [panel, setPanel] = useAglynBesignerPanel(panelKey);
|
|
377
|
+
const _panelTabs_panelKey = panelTabs[panelKey], { panel: _ref } = _panelTabs_panelKey, { id } = _ref, panelProps = _object_without_properties_loose(_ref, [
|
|
378
|
+
"id"
|
|
379
|
+
]), { defaultTab, tabs } = _panelTabs_panelKey;
|
|
380
|
+
const { toggled, tab, size } = panel || {};
|
|
381
|
+
const value = tab || defaultTab;
|
|
382
|
+
// The bottom-right corner belongs to this panel while it is open
|
|
383
|
+
// (AGL-2486), so publish how far a viewport-fixed affordance has to
|
|
384
|
+
// stand off to clear it. The Assist launcher reads this; the console's
|
|
385
|
+
// own chrome leaves the corner free and never sets it, which is why the
|
|
386
|
+
// variable carries the offset rather than the panel width — an unset
|
|
387
|
+
// variable then means "the corner is yours" everywhere else.
|
|
388
|
+
//
|
|
389
|
+
// Kept in an effect on the LIVE panel state so it tracks the author
|
|
390
|
+
// dragging the panel wider or collapsing it, and removed on unmount:
|
|
391
|
+
// navigating from the besigner back into the console must not leave a
|
|
392
|
+
// 395px inset behind on a page with no panel at all.
|
|
393
|
+
// `size` is `string | number` on the panel state, so a numeric width is
|
|
394
|
+
// parsed rather than added to: `'375' + 20` is `'37520'`, which is a
|
|
395
|
+
// perfectly valid CSS length and would park the launcher off-screen.
|
|
396
|
+
const panelWidth = Number.parseFloat(String(size != null ? size : ''));
|
|
397
|
+
const rightInset = panelKey === 'panelRight' && toggled && Number.isFinite(panelWidth) ? panelWidth + 20 : null;
|
|
398
|
+
useEffect(()=>{
|
|
399
|
+
if (panelKey !== 'panelRight') return undefined;
|
|
400
|
+
const root = document.documentElement;
|
|
401
|
+
const property = '--aglyn-assist-inset-right';
|
|
402
|
+
if (rightInset === null) {
|
|
403
|
+
root.style.removeProperty(property);
|
|
404
|
+
} else {
|
|
405
|
+
root.style.setProperty(property, `${rightInset}px`);
|
|
406
|
+
}
|
|
407
|
+
return ()=>{
|
|
408
|
+
root.style.removeProperty(property);
|
|
409
|
+
};
|
|
410
|
+
}, [
|
|
411
|
+
panelKey,
|
|
412
|
+
rightInset
|
|
413
|
+
]);
|
|
414
|
+
const handleTabChange = useCallback((e, val)=>{
|
|
415
|
+
setPanel((panel)=>_extends({}, panel, {
|
|
416
|
+
tab: numberFromHexadecimal(val)
|
|
417
|
+
}));
|
|
418
|
+
}, [
|
|
419
|
+
setPanel
|
|
420
|
+
]);
|
|
421
|
+
return /*#__PURE__*/ _jsxs(WorkspacePanelComponent, _extends({
|
|
422
|
+
ref: ref,
|
|
423
|
+
id: `aglyn:panel-${id}`,
|
|
424
|
+
"aria-label": "left toolbox panel",
|
|
425
|
+
size: size,
|
|
426
|
+
open: toggled,
|
|
427
|
+
component: "aside"
|
|
428
|
+
}, panelProps, rest, {
|
|
429
|
+
children: [
|
|
430
|
+
/*#__PURE__*/ _jsxs(MuiTabContext, {
|
|
431
|
+
value: numberToHexadecimal(value),
|
|
432
|
+
children: [
|
|
433
|
+
/*#__PURE__*/ _jsx(Box, {
|
|
434
|
+
sx: {
|
|
435
|
+
borderBottom: 1,
|
|
436
|
+
borderColor: 'divider'
|
|
437
|
+
},
|
|
438
|
+
children: /*#__PURE__*/ _jsx(MuiAppBar, {
|
|
439
|
+
color: "surface",
|
|
440
|
+
position: "relative",
|
|
441
|
+
elevation: 0,
|
|
442
|
+
enableColorOnDark: true,
|
|
443
|
+
children: /*#__PURE__*/ _jsx(MuiTabList, {
|
|
444
|
+
onChange: handleTabChange,
|
|
445
|
+
variant: "fullWidth",
|
|
446
|
+
sx: {
|
|
447
|
+
'& .MuiTab-root': {
|
|
448
|
+
'&.Mui-selected': {
|
|
449
|
+
// Use sx string shorthands instead of palette callbacks so the
|
|
450
|
+
// sx system resolves them via theme.vars (CSS custom-property refs)
|
|
451
|
+
// rather than the static light-mode palette values.
|
|
452
|
+
color: 'text.primary',
|
|
453
|
+
backgroundColor: 'background.paper'
|
|
454
|
+
}
|
|
455
|
+
},
|
|
456
|
+
'& .MuiTabs-indicator': {
|
|
457
|
+
top: 0,
|
|
458
|
+
backgroundColor: 'secondary.main'
|
|
459
|
+
}
|
|
460
|
+
},
|
|
461
|
+
children: tabs.map((_0)=>{
|
|
462
|
+
let { value, tab: _ref } = _0, { icon } = _ref, tab = _object_without_properties_loose(_ref, [
|
|
463
|
+
"icon"
|
|
464
|
+
]);
|
|
465
|
+
return /*#__PURE__*/ _jsx(MuiTab, _extends({
|
|
466
|
+
// color={'tertiary'}
|
|
467
|
+
value: numberToHexadecimal(value),
|
|
468
|
+
iconPosition: "top",
|
|
469
|
+
icon: /*#__PURE__*/ _jsx(MdiIcon, _extends({}, icon, {
|
|
470
|
+
fontSize: "small"
|
|
471
|
+
})),
|
|
472
|
+
sx: {
|
|
473
|
+
minHeight: 'unset',
|
|
474
|
+
fontSize: (theme)=>theme.typography.pxToRem(12),
|
|
475
|
+
lineHeight: 0.8,
|
|
476
|
+
pt: 1
|
|
477
|
+
}
|
|
478
|
+
}, tab), value);
|
|
479
|
+
})
|
|
480
|
+
})
|
|
481
|
+
})
|
|
482
|
+
}),
|
|
483
|
+
/*#__PURE__*/ _jsx(SiteThemeColorTokensProvider, {
|
|
484
|
+
children: tabs.map((_0)=>{
|
|
485
|
+
let { value, panel: _ref } = _0, { Component } = _ref, panel = _object_without_properties_loose(_ref, [
|
|
486
|
+
"Component"
|
|
487
|
+
]);
|
|
488
|
+
return /*#__PURE__*/ _jsx(TabPanel, _extends({
|
|
489
|
+
value: numberToHexadecimal(value)
|
|
490
|
+
}, panel, {
|
|
491
|
+
children: /*#__PURE__*/ _jsx(Component, {})
|
|
492
|
+
}), value);
|
|
493
|
+
})
|
|
494
|
+
})
|
|
495
|
+
]
|
|
496
|
+
}),
|
|
497
|
+
children
|
|
498
|
+
]
|
|
499
|
+
}));
|
|
500
|
+
});
|
|
501
|
+
AsidePanelComponent.displayName = 'AsidePanelComponent';
|
|
502
|
+
AsidePanelComponent.aglyn = true;
|
|
503
|
+
export default AsidePanelComponent;
|
|
504
|
+
|
|
505
|
+
//# sourceMappingURL=aside-panel.component.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../../../../../../libs/besigner/feature/designer/src/lib/components/aside-panel.component.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 { canvas } from '@aglyn/aglyn'\nimport * as Besigner from '@aglyn/besigner'\nimport {\n type BesignerPanelKey,\n BesignerPanelTabFlag,\n} from '@aglyn/besigner'\nimport {\n ICON_VARIANT_ELEMENT,\n ICON_VARIANT_ELEMENT_BROWSE,\n ICON_VARIANT_ELEMENT_INTERACTIONS,\n ICON_VARIANT_ELEMENT_PROPERTIES,\n ICON_VARIANT_ELEMENT_STYLES,\n ICON_VARIANT_ELEMENT_TREE_VIEW,\n ICON_VARIANT_MODIFY_ADD,\n} from '@aglyn/shared-data-enums'\nimport { HelpTip, MdiIcon } from '@aglyn/shared-ui-jsx'\nimport { mergeSxProps, styled } from '@aglyn/shared-ui-theme'\nimport {\n getDisplayName,\n numberFromHexadecimal,\n numberToHexadecimal,\n} from '@aglyn/shared-util-tools'\nimport { hoistNonReactStatics } from '@aglyn/shared-util-vendor'\nimport {\n TabContext as MuiTabContext,\n TabList as MuiTabList,\n TabPanel as MuiTabPanel,\n type TabPanelProps as MuiTabPanelProps,\n} from '@mui/lab'\nimport {\n AppBar as MuiAppBar,\n Box,\n Button,\n Chip,\n Stack,\n Tab as MuiTab,\n Typography,\n} from '@mui/material'\nimport { observer } from 'mobx-react-lite'\nimport {\n type ComponentType,\n forwardRef,\n type SyntheticEvent,\n useCallback,\n useEffect,\n useMemo,\n useState,\n} from 'react'\nimport useAddElementDrawerCallback from '../hooks/use-add-element-drawer-callback'\nimport useAglynBesignerPanel from '../hooks/use-aglyn-besigner-panel'\nimport AccordionListComponent from './accordion-list.component'\nimport ElementInteractionsForm from './element-interactions-form.component'\nimport ComponentAccordionList from './component-accordion-list'\nimport ElementPropsForm from './element-props-form.component'\nimport ElementStylesForm from './element-styles-form.component'\nimport NodeTreeView, { type NodeTreeViewProps } from './node-tree-view'\nimport SiteThemeColorTokensProvider from './site-theme-color-tokens-provider.component'\nimport { usePublishActiveHostTheme } from '../utils/active-host-theme'\nimport { besignerInspected } from '../contexts/inspected-selection'\nimport {\n inspectorExtrasFor,\n useBesignerInspectorExtras,\n} from '../contexts/inspector-extras-context'\nimport { besignerDocsUrl } from '../utils/docs-help'\nimport WorkspacePanelComponent, {\n type WorkspacePanelComponentProps,\n} from './workspace-panel.component'\n\nconst TabPanel = styled(MuiTabPanel, {\n name: 'AglynTabPanel',\n})<MuiTabPanelProps>({\n padding: 0,\n overflow: 'auto',\n height: '100%',\n})\nconst TabPanelInner = styled('div', {\n name: 'AglynTabPanelInner',\n})(({ theme }) => ({\n width: '100%',\n}))\n\nconst emptyView = (\n <Stack\n direction=\"column\"\n component={TabPanelInner}\n sx={{\n justifyContent: 'center',\n height: 1,\n p: 2,\n }}\n >\n <Typography\n color=\"textSecondary\"\n variant=\"overline\"\n component=\"div\"\n align=\"center\"\n >\n <MdiIcon\n sx={{ opacity: 0.3, fontSize: 80 }}\n path={ICON_VARIANT_ELEMENT.path}\n />\n <div>{'Select an element'}</div>\n </Typography>\n </Stack>\n)\n\n\n/**\n * `Hero · Section` with a `SELECTED` tag — the inspector header the\n * `/product` hero mockup shows (AGL-2175).\n *\n * The right panel had no header at all: three tabs of controls with\n * nothing naming what they act on. On a canvas where clicking a child\n * moves the selection under you, that is the difference between editing\n * the section and editing the heading inside it — and the panel looked\n * identical either way.\n *\n * The second half is the COMPONENT, not a category: `labelShort` is the\n * preset's name (`Hero`) and the schema's is what it actually is\n * (`Section`). They are the same word often enough that it is dropped\n * when it would only repeat itself.\n */\nconst SelectedNodeHeader = observer(\n ({ node }: { node: Besigner.LastSelectedNode }) => {\n const name = node?.labelShort ?? ''\n const component = (node as { componentSchema?: { displayName?: string } })\n ?.componentSchema?.displayName\n const subtitle =\n component && component.toLowerCase() !== name.toLowerCase()\n ? `${name} · ${component}`\n : name\n return (\n <Stack\n direction=\"row\"\n spacing={1}\n sx={{\n alignItems: 'center',\n px: 2,\n py: 1,\n borderBottom: 1,\n borderColor: 'divider',\n }}\n >\n <Typography variant=\"subtitle2\" noWrap sx={{ flex: 1, minWidth: 0 }}>\n {subtitle || 'Element'}\n </Typography>\n <Chip\n size=\"small\"\n variant=\"outlined\"\n color=\"secondary\"\n label=\"SELECTED\"\n sx={{ height: 18, '& .MuiChip-label': { px: 0.75, fontSize: 10 } }}\n />\n </Stack>\n )\n },\n)\nSelectedNodeHeader.displayName = 'SelectedNodeHeader'\n\nfunction withLastSelectedNode<P>(\n WrappedComponent: JSX.ComponentType<P & { node: Besigner.LastSelectedNode }>,\n) {\n const displayName = getDisplayName(WrappedComponent)\n\n const WithLastSelectedNode = observer((props: P) => {\n const { ...rest } = props\n const selected = Besigner.focus.getLastSelected()\n /**\n * The LIVE node for that selection, re-resolved by id every render\n * (AGL-2486).\n *\n * The focus store holds node OBJECTS, not ids. Anything that replaces the\n * canvas map wholesale — `undo`, `redo`, a co-editing `applyNodes`, a\n * local-draft restore — builds fresh node instances and leaves the store\n * pointing at the pre-restore ones. The panels then read their fields from\n * an orphan and, worse, write back through it: `updateNodeProps` assigns\n * `node.props` on an object the canvas no longer owns, so the edit lands\n * nowhere. Nothing throws and nothing marks the document dirty, so an\n * author sees their new text in the box, an unchanged canvas, and `UP TO\n * DATE` — the reported \"the Text attribute silently discards edits\".\n *\n * Resolving here rather than in the three panels because they share this\n * one seam, and it is `observer`-tracked: `getNode` reads the observable\n * map, so a restore re-renders the panel with the live node instead of\n * leaving stale values in the fields.\n *\n * A node the map no longer has (deleted, or a test node that was never in\n * it) falls back to the stored object, which is exactly today's behaviour\n * for that case — there is no live node to prefer.\n */\n const lastSelected = selected\n ? canvas.getNode(selected.$id) ?? selected\n : selected\n\n return (\n <>\n {!lastSelected ? (\n emptyView\n ) : (\n <>\n {/* One header for all three right-panel tabs, so Attributes,\n Styles and Info cannot disagree about what is selected. */}\n <SelectedNodeHeader node={lastSelected} />\n <WrappedComponent node={lastSelected} {...rest} />\n </>\n )}\n </>\n )\n })\n WithLastSelectedNode.displayName = `WithLastSelectedNode(${displayName})`\n hoistNonReactStatics(WithLastSelectedNode, WrappedComponent)\n\n return WithLastSelectedNode\n}\n\nconst withTabPanelInner = (Component: ComponentType<any>) => (props: any) => {\n return (\n <TabPanelInner sx={{ p: 2 }}>\n <Component {...props} />\n </TabPanelInner>\n )\n}\n\n/**\n * The Attributes form with the host app's section beneath it (AGL-2940):\n * whatever `BesignerInspectorExtrasContext` carries, drawn under the\n * selected element's own fields — for that element, when the host supplied\n * a function — and nothing when the host supplied nothing.\n *\n * The selection travels with `editable` (AGL-2908), the same rule the form's\n * own Save as reusable component and Detach actions are drawn under: the\n * canvas root and locked layout chrome answer false. It is read here because\n * a host section has the node and not the editor, and the rule is the drag\n * manager's.\n */\nconst ElementPropsFormWithExtras = (props: any) => {\n const supplied = useBesignerInspectorExtras()\n const inspected = besignerInspected(props.node)\n const extras = inspected ? inspectorExtrasFor(supplied, inspected) : null\n return (\n <>\n <ElementPropsForm {...props} />\n {extras ? <Box sx={{ pt: 2 }}>{extras}</Box> : null}\n </>\n )\n}\n\nconst ElementsTree = forwardRef<any, NodeTreeViewProps>((props, ref) => {\n const handleAddElementClick = useAddElementDrawerCallback()\n return (\n <TabPanelInner sx={{ pl: 0.5 }}>\n <Box\n sx={{\n px: 0.05,\n pb: 1,\n pt: 1,\n display: 'flex',\n alignItems: 'center',\n }}\n >\n <Button\n color=\"primary\"\n startIcon={\n <MdiIcon fontSize=\"inherit\" path={ICON_VARIANT_MODIFY_ADD.path} />\n }\n onClick={() =>\n handleAddElementClick(Besigner.focus.getLastSelected())\n }\n >\n {'Add Element'}\n </Button>\n {/* The hierarchy is the one panel whose rules are not visible in it\n (AGL-2167): which elements accept children, and what dropping on\n an edge does versus dropping in the center. */}\n <HelpTip\n title=\"Drag, drop & hierarchy\"\n excerpt=\"Reparent by dragging here or on the canvas. Containers accept children; dropping on a leaf element makes a sibling instead.\"\n href={besignerDocsUrl('dragDropHierarchy', '#drop-zones-edges-vs-center')}\n sx={{ ml: 'auto', mr: 0.5, fontSize: '0.9em' }}\n />\n </Box>\n <NodeTreeView ref={ref} {...props} />\n </TabPanelInner>\n )\n})\n\nconst panelTabs: Partial<Record<BesignerPanelKey, any>> = {\n panelLeft: {\n defaultTab: BesignerPanelTabFlag.ELEMENTS_TREE,\n panel: {\n id: 'left',\n anchor: 'left',\n 'aria-label': 'left toolbox panel',\n },\n tabs: [\n {\n value: BesignerPanelTabFlag.ELEMENTS_TREE,\n tab: {\n icon: { path: ICON_VARIANT_ELEMENT_TREE_VIEW.path },\n label: 'Hierarchy',\n },\n panel: {\n Component: ElementsTree,\n },\n },\n {\n value: BesignerPanelTabFlag.ELEMENT_BROWSE,\n tab: {\n icon: { path: ICON_VARIANT_ELEMENT_BROWSE.path },\n label: 'Elements',\n },\n panel: {\n Component: ComponentAccordionList,\n },\n },\n ],\n },\n panelRight: {\n // Attributes first and open by default — it is what you reach for on\n // selecting an element. Tab order here is display order only; the flag\n // values are persisted in panel state, so they stay put.\n defaultTab: BesignerPanelTabFlag.ELEMENT_PROPS_FORM,\n panel: {\n id: 'right',\n anchor: 'right',\n 'aria-label': 'right toolbox panel',\n },\n tabs: [\n {\n value: BesignerPanelTabFlag.ELEMENT_PROPS_FORM,\n tab: {\n icon: { path: ICON_VARIANT_ELEMENT_PROPERTIES.path },\n label: 'Attributes',\n },\n panel: {\n Component: withLastSelectedNode(withTabPanelInner(ElementPropsFormWithExtras)),\n },\n },\n {\n value: BesignerPanelTabFlag.ELEMENT_STYLES,\n tab: {\n icon: { path: ICON_VARIANT_ELEMENT_STYLES.path },\n label: 'Styles',\n },\n panel: {\n Component: withLastSelectedNode(ElementStylesForm as any),\n },\n },\n /*\n * Interactions, between Styles and where Info used to be.\n *\n * They lived at the bottom of Attributes, under every field the\n * component declares — below the fold on anything with more than a\n * handful, so an author had no reason to believe the element had any.\n * An interaction is not an attribute: it is a behaviour, authored in a\n * dialog rather than a field, and it belongs beside the styles as a\n * peer.\n *\n * INFO IS GONE. Its two accordions are reference detail about the\n * component and the node's ids — worth having, not worth a tab — and\n * they now sit at the bottom of Attributes, beside the fields they\n * describe. Its flag value stays reserved; panel state is persisted,\n * and a reader whose last session ended on Info would otherwise return\n * to a tab id that means something else.\n */\n {\n value: BesignerPanelTabFlag.ELEMENT_INTERACTIONS,\n tab: {\n icon: { path: ICON_VARIANT_ELEMENT_INTERACTIONS.path },\n label: 'Interactions',\n },\n panel: {\n Component: withLastSelectedNode(\n withTabPanelInner(ElementInteractionsForm as any),\n ),\n },\n },\n ],\n },\n}\n\nexport interface AsidePanelComponentProps extends WorkspacePanelComponentProps {\n panel: BesignerPanelKey\n}\n\nexport const AsidePanelComponent = forwardRef<any, AsidePanelComponentProps>(\n (props, ref) => {\n const { children, panel: panelKey, ...rest } = props\n\n // Republish the page's site theme for surfaces that render OUTSIDE the\n // page tree (AGL-2486). This panel is inside `HostThemeDocumentContext`;\n // the Choose-element dialog — rendered by `withBesignerContext`, which\n // wraps the page — is not, and its element preview was painting the\n // console's brand onto someone else's site.\n usePublishActiveHostTheme()\n\n const [panel, setPanel] = useAglynBesignerPanel(panelKey)\n const {\n panel: { id, ...panelProps },\n defaultTab,\n tabs,\n } = panelTabs[panelKey]\n const { toggled, tab, size } = panel || {}\n const value = tab || defaultTab\n\n // The bottom-right corner belongs to this panel while it is open\n // (AGL-2486), so publish how far a viewport-fixed affordance has to\n // stand off to clear it. The Assist launcher reads this; the console's\n // own chrome leaves the corner free and never sets it, which is why the\n // variable carries the offset rather than the panel width — an unset\n // variable then means \"the corner is yours\" everywhere else.\n //\n // Kept in an effect on the LIVE panel state so it tracks the author\n // dragging the panel wider or collapsing it, and removed on unmount:\n // navigating from the besigner back into the console must not leave a\n // 395px inset behind on a page with no panel at all.\n // `size` is `string | number` on the panel state, so a numeric width is\n // parsed rather than added to: `'375' + 20` is `'37520'`, which is a\n // perfectly valid CSS length and would park the launcher off-screen.\n const panelWidth = Number.parseFloat(String(size ?? ''))\n const rightInset =\n panelKey === 'panelRight' && toggled && Number.isFinite(panelWidth)\n ? panelWidth + 20\n : null\n useEffect(() => {\n if (panelKey !== 'panelRight') return undefined\n const root = document.documentElement\n const property = '--aglyn-assist-inset-right'\n if (rightInset === null) {\n root.style.removeProperty(property)\n } else {\n root.style.setProperty(property, `${rightInset}px`)\n }\n return () => {\n root.style.removeProperty(property)\n }\n }, [panelKey, rightInset])\n\n const handleTabChange = useCallback(\n (e: SyntheticEvent, val: string) => {\n setPanel((panel) => ({ ...panel, tab: numberFromHexadecimal(val) }))\n },\n [setPanel],\n )\n\n return (\n <WorkspacePanelComponent\n ref={ref}\n id={`aglyn:panel-${id}`}\n aria-label=\"left toolbox panel\"\n size={size}\n open={toggled}\n component=\"aside\"\n {...panelProps}\n {...rest}\n >\n <MuiTabContext value={numberToHexadecimal(value)}>\n <Box sx={{ borderBottom: 1, borderColor: 'divider' }}>\n <MuiAppBar\n color=\"surface\"\n position=\"relative\"\n elevation={0}\n enableColorOnDark\n >\n <MuiTabList\n onChange={handleTabChange}\n variant=\"fullWidth\"\n sx={{\n '& .MuiTab-root': {\n '&.Mui-selected': {\n // Use sx string shorthands instead of palette callbacks so the\n // sx system resolves them via theme.vars (CSS custom-property refs)\n // rather than the static light-mode palette values.\n color: 'text.primary',\n backgroundColor: 'background.paper',\n },\n },\n '& .MuiTabs-indicator': {\n top: 0,\n backgroundColor: 'secondary.main',\n },\n }}\n >\n {tabs.map(({ value, tab: { icon, ...tab } }) => (\n <MuiTab\n key={value}\n // color={'tertiary'}\n value={numberToHexadecimal(value)}\n iconPosition=\"top\"\n icon={<MdiIcon {...icon} fontSize=\"small\" />}\n sx={{\n minHeight: 'unset',\n fontSize: (theme) => theme.typography.pxToRem(12),\n lineHeight: 0.8,\n pt: 1,\n }}\n {...tab}\n />\n ))}\n </MuiTabList>\n </MuiAppBar>\n </Box>\n\n {/* Site-theme color tokens (AGL-588): every COLOR_PICKER field\n in these panels — styles panel, attribute forms, email\n blocks — offers the site palette's token references. */}\n <SiteThemeColorTokensProvider>\n {tabs.map(({ value, panel: { Component, ...panel } }) => (\n <TabPanel\n key={value}\n value={numberToHexadecimal(value)}\n {...panel}\n >\n <Component />\n </TabPanel>\n ))}\n </SiteThemeColorTokensProvider>\n </MuiTabContext>\n\n {children}\n </WorkspacePanelComponent>\n )\n },\n)\n\nAsidePanelComponent.displayName = 'AsidePanelComponent'\nAsidePanelComponent.aglyn = true\n\nexport default AsidePanelComponent\n"],"names":["canvas","Besigner","BesignerPanelTabFlag","ICON_VARIANT_ELEMENT","ICON_VARIANT_ELEMENT_BROWSE","ICON_VARIANT_ELEMENT_INTERACTIONS","ICON_VARIANT_ELEMENT_PROPERTIES","ICON_VARIANT_ELEMENT_STYLES","ICON_VARIANT_ELEMENT_TREE_VIEW","ICON_VARIANT_MODIFY_ADD","HelpTip","MdiIcon","styled","getDisplayName","numberFromHexadecimal","numberToHexadecimal","hoistNonReactStatics","TabContext","MuiTabContext","TabList","MuiTabList","TabPanel","MuiTabPanel","AppBar","MuiAppBar","Box","Button","Chip","Stack","Tab","MuiTab","Typography","observer","forwardRef","useCallback","useEffect","useAddElementDrawerCallback","useAglynBesignerPanel","ElementInteractionsForm","ComponentAccordionList","ElementPropsForm","ElementStylesForm","NodeTreeView","SiteThemeColorTokensProvider","usePublishActiveHostTheme","besignerInspected","inspectorExtrasFor","useBesignerInspectorExtras","besignerDocsUrl","WorkspacePanelComponent","name","padding","overflow","height","TabPanelInner","theme","width","emptyView","direction","component","sx","justifyContent","p","color","variant","align","opacity","fontSize","path","div","SelectedNodeHeader","node","labelShort","componentSchema","displayName","subtitle","toLowerCase","spacing","alignItems","px","py","borderBottom","borderColor","noWrap","flex","minWidth","size","label","withLastSelectedNode","WrappedComponent","WithLastSelectedNode","props","rest","selected","focus","getLastSelected","lastSelected","getNode","$id","withTabPanelInner","Component","ElementPropsFormWithExtras","supplied","inspected","extras","pt","ElementsTree","ref","handleAddElementClick","pl","pb","display","startIcon","onClick","title","excerpt","href","ml","mr","panelTabs","panelLeft","defaultTab","ELEMENTS_TREE","panel","id","anchor","tabs","value","tab","icon","ELEMENT_BROWSE","panelRight","ELEMENT_PROPS_FORM","ELEMENT_STYLES","ELEMENT_INTERACTIONS","AsidePanelComponent","children","panelKey","setPanel","panelProps","toggled","panelWidth","Number","parseFloat","String","rightInset","isFinite","undefined","root","document","documentElement","property","style","removeProperty","setProperty","handleTabChange","e","val","aria-label","open","position","elevation","enableColorOnDark","onChange","backgroundColor","top","map","iconPosition","minHeight","typography","pxToRem","lineHeight","aglyn"],"mappings":";;;AAAA;;;;;;;;;;;;;;;CAeC,GAED,SAASA,MAAM,QAAQ,eAAc;AACrC,YAAYC,cAAc,kBAAiB;AAC3C,SAEEC,oBAAoB,QACf,kBAAiB;AACxB,SACEC,oBAAoB,EACpBC,2BAA2B,EAC3BC,iCAAiC,EACjCC,+BAA+B,EAC/BC,2BAA2B,EAC3BC,8BAA8B,EAC9BC,uBAAuB,QAClB,2BAA0B;AACjC,SAASC,OAAO,EAAEC,OAAO,QAAQ,uBAAsB;AACvD,SAAuBC,MAAM,QAAQ,yBAAwB;AAC7D,SACEC,cAAc,EACdC,qBAAqB,EACrBC,mBAAmB,QACd,2BAA0B;AACjC,SAASC,oBAAoB,QAAQ,4BAA2B;AAChE,SACEC,cAAcC,aAAa,EAC3BC,WAAWC,UAAU,EACrBC,YAAYC,WAAW,QAElB,WAAU;AACjB,SACEC,UAAUC,SAAS,EACnBC,GAAG,EACHC,MAAM,EACNC,IAAI,EACJC,KAAK,EACLC,OAAOC,MAAM,EACbC,UAAU,QACL,gBAAe;AACtB,SAASC,QAAQ,QAAQ,kBAAiB;AAC1C,SAEEC,UAAU,EAEVC,WAAW,EACXC,SAAS,QAGJ,QAAO;AACd,OAAOC,iCAAiC,8CAA0C;AAClF,OAAOC,2BAA2B,uCAAmC;AAErE,OAAOC,6BAA6B,2CAAuC;AAC3E,OAAOC,4BAA4B,gCAA4B;AAC/D,OAAOC,sBAAsB,oCAAgC;AAC7D,OAAOC,uBAAuB,qCAAiC;AAC/D,OAAOC,kBAA8C,sBAAkB;AACvE,OAAOC,kCAAkC,kDAA8C;AACvF,SAASC,yBAAyB,QAAQ,gCAA4B;AACtE,SAASC,iBAAiB,QAAQ,qCAAiC;AACnE,SACEC,kBAAkB,EAClBC,0BAA0B,QACrB,0CAAsC;AAC7C,SAASC,eAAe,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D,iBAAiB;oCACnB;gCACF;0CAECtC,KAAKwC,GAAG,CAAC;wCAAC,EAAEvC,KAAK,EAAEC,SAAAA,EAAuB,OAAlB,EAAEC,IAAI,EAAU,SAALD;;;yDAClC,KAAClG;wCAEC,qBAAqB;wCACrBiG,OAAOhH,oBAAoBgH;wCAC3BwC,cAAa;wCACbtC,oBAAM,KAACtH,sBAAYsH;4CAAM9D,UAAS;;wCAClCP,IAAI;4CACF4G,WAAW;4CACXrG,UAAU,CAACZ,QAAUA,MAAMkH,UAAU,CAACC,OAAO,CAAC;4CAC9CC,YAAY;4CACZlE,IAAI;wCACN;uCACIuB,MAXCD;;;;;kCAqBf,KAACpF;kCACEmF,KAAKwC,GAAG,CAAC;gCAAC,EAAEvC,KAAK,EAAEJ,WAAAA,EAAgC,OAAzB,EAAEvB,SAAS,EAAY,SAAPuB;;;iDACzC,KAACtG;gCAEC0G,OAAOhH,oBAAoBgH;+BACvBJ;0CAEJ,cAAA,KAACvB;gCAJI2B;;;;;YAUZS;;;AAGP,GACD;AAEDD,oBAAoB7D,WAAW,GAAG;AAClC6D,oBAAoBqC,KAAK,GAAG;AAE5B,eAAerC,oBAAmB"}
|
|
@@ -0,0 +1,36 @@
|
|
|
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
|
+
export interface BesignerConflictAlertProps {
|
|
18
|
+
/** 'screen', 'layout', 'component', 'template', 'email'. */
|
|
19
|
+
noun: string;
|
|
20
|
+
}
|
|
21
|
+
/**
|
|
22
|
+
* The concurrent-save conflict banner (AGL-1301): someone else saved this
|
|
23
|
+
* document while the author was editing, so saving is paused until they
|
|
24
|
+
* reload. Shown as soon as the remote save lands, not on Save — finding
|
|
25
|
+
* out after twenty more minutes of editing is the bad version of this
|
|
26
|
+
* (AGL-674).
|
|
27
|
+
*
|
|
28
|
+
* One component for every besigner editor so the copy names the document
|
|
29
|
+
* kind the author is actually in — the AGL-1301 adoption copy-pasted the
|
|
30
|
+
* banner per page and two editors kept another page's noun. The single
|
|
31
|
+
* action is Reload, deliberately: there is no "save anyway" that could
|
|
32
|
+
* silently destroy a teammate's work, and the canvas keeps everything
|
|
33
|
+
* until the reload.
|
|
34
|
+
*/
|
|
35
|
+
export declare function BesignerConflictAlertComponent(props: BesignerConflictAlertProps): import("react").JSX.Element;
|
|
36
|
+
export default BesignerConflictAlertComponent;
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
/**
|
|
3
|
+
* @license
|
|
4
|
+
* Copyright 2026 Aglyn LLC
|
|
5
|
+
*
|
|
6
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
7
|
+
* you may not use this file except in compliance with the License.
|
|
8
|
+
* You may obtain a copy of the License at
|
|
9
|
+
*
|
|
10
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
11
|
+
*
|
|
12
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
13
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
14
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
15
|
+
* See the License for the specific language governing permissions and
|
|
16
|
+
* limitations under the License.
|
|
17
|
+
*/ import { Alert, Button } from "@mui/material";
|
|
18
|
+
/**
|
|
19
|
+
* The concurrent-save conflict banner (AGL-1301): someone else saved this
|
|
20
|
+
* document while the author was editing, so saving is paused until they
|
|
21
|
+
* reload. Shown as soon as the remote save lands, not on Save — finding
|
|
22
|
+
* out after twenty more minutes of editing is the bad version of this
|
|
23
|
+
* (AGL-674).
|
|
24
|
+
*
|
|
25
|
+
* One component for every besigner editor so the copy names the document
|
|
26
|
+
* kind the author is actually in — the AGL-1301 adoption copy-pasted the
|
|
27
|
+
* banner per page and two editors kept another page's noun. The single
|
|
28
|
+
* action is Reload, deliberately: there is no "save anyway" that could
|
|
29
|
+
* silently destroy a teammate's work, and the canvas keeps everything
|
|
30
|
+
* until the reload.
|
|
31
|
+
*/ export function BesignerConflictAlertComponent(props) {
|
|
32
|
+
const { noun } = props;
|
|
33
|
+
return /*#__PURE__*/ _jsx(Alert, {
|
|
34
|
+
severity: "warning",
|
|
35
|
+
sx: {
|
|
36
|
+
borderRadius: 0,
|
|
37
|
+
position: 'relative',
|
|
38
|
+
zIndex: 'appBar'
|
|
39
|
+
},
|
|
40
|
+
action: /*#__PURE__*/ _jsx(Button, {
|
|
41
|
+
color: "inherit",
|
|
42
|
+
size: "small",
|
|
43
|
+
onClick: ()=>window.location.reload(),
|
|
44
|
+
children: 'Reload'
|
|
45
|
+
}),
|
|
46
|
+
children: `Someone else saved this ${noun} while you were editing. ` + 'Saving is paused so their work is not overwritten — ' + 'reload to pick up their changes. Nothing you have done ' + 'here is lost until you do.'
|
|
47
|
+
});
|
|
48
|
+
}
|
|
49
|
+
export default BesignerConflictAlertComponent;
|
|
50
|
+
|
|
51
|
+
//# sourceMappingURL=besigner-conflict-alert.component.js.map
|