@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-tree-view.tsx"],"sourcesContent":["/**\n * @license\n * Copyright 2026 Aglyn LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport type * as Aglyn from '@aglyn/aglyn'\nimport { canvas, isFeatureEnabled, NODE_ROOT_ID } from '@aglyn/aglyn'\nimport * as Besigner from '@aglyn/besigner'\nimport {\n ICON_VARIANT_COLLAPSIBLE_CLOSE,\n ICON_VARIANT_COLLAPSIBLE_OPEN,\n ICON_VARIANT_MODIFY_DRAG,\n ICON_VARIANT_SHOW_MORE_VERTICAL,\n ICON_VARIANT_VISIBILITY_HIDDEN,\n ICON_VARIANT_VISIBILITY_SHOWN,\n} from '@aglyn/shared-data-enums'\nimport { MdiIcon } from '@aglyn/shared-ui-jsx'\nimport { generateComponentClassKeys, styled } from '@aglyn/shared-ui-theme'\nimport { noop } from '@aglyn/shared-util-tools'\nimport {\n Box,\n BoxProps,\n ClickAwayListener,\n Collapse,\n Divider,\n IconButton,\n List as MuiList,\n ListItem as MuiListItem,\n ListItemButton as MuiListItemButton,\n listItemButtonClasses,\n listItemClasses,\n ListItemIcon as MuiListItemIcon,\n type ListItemIconProps as MuiListItemIconProps,\n type ListItemProps as MuiListItemProps,\n ListItemText as MuiListItemText,\n type ListProps as MuiListProps,\n Popper,\n Stack,\n Tooltip,\n} from '@mui/material'\nimport clsx from 'clsx'\nimport uniq from 'lodash-es/uniq.js'\nimport { action } from 'mobx'\nimport { observer } from 'mobx-react-lite'\nimport type { ComponentProps } from 'react'\nimport {\n type ChangeEvent,\n createContext,\n forwardRef,\n useCallback,\n useContext,\n useEffect,\n useMemo,\n useRef,\n useState,\n} from 'react'\nimport useLeafDrag from '../hooks/use-leaf-drag'\nimport useLeafDrop from '../hooks/use-leaf-drop'\nimport {\n isAncestorHidden,\n isNodeHiddenByAuthor,\n isNodeHiddenOnSite,\n} from '../utils/canvas-reveal'\nimport ComponentIconComponent from './component-icon.component'\nimport NodeContextMenu from './node-context-menu'\n\nconst classKey = generateComponentClassKeys('TreeView', [\n 'root',\n 'subTreeView',\n 'treeItem',\n 'treeListItem',\n 'dragHandle',\n 'moreButton',\n 'visibilityButton',\n 'itemSelected',\n 'itemHovered',\n 'itemIsDragging',\n 'itemIsDragOver',\n])\n\nconst TreeView = styled(MuiList)<MuiListProps>(({ theme }) => ({\n alignItems: 'stretch',\n flexDirection: 'column',\n width: 'fit-content',\n minWidth: '100%',\n\n [`& .${listItemButtonClasses.root}`]: {\n zIndex: 0,\n paddingTop: 0,\n paddingBottom: 0,\n // paddingLeft: 0,\n borderTopLeftRadius: 4,\n borderBottomLeftRadius: 4,\n [[\n `&:hover`,\n `&.${listItemButtonClasses.focusVisible}`,\n `&.${listItemButtonClasses.selected}`,\n `&.${classKey.itemSelected}`,\n ].join(',')]: {\n backgroundColor: 'transparent',\n },\n },\n\n [`& .${listItemClasses.root}`]: {\n alignItems: 'stretch',\n flexDirection: 'column',\n\n borderTopLeftRadius: 4,\n borderBottomLeftRadius: 4,\n\n [`> .${classKey.treeListItem}`]: {\n borderTopLeftRadius: 4,\n borderBottomLeftRadius: 4,\n [`& .${classKey.dragHandle}, & .${classKey.moreButton}`]: {\n visibility: 'hidden',\n },\n // An open menu keeps its own button on screen — the pointer has left\n // the row to reach the menu, so the hover rule no longer holds it.\n [`& .${classKey.moreButton}[aria-expanded='true']`]: {\n visibility: 'visible',\n },\n\n [`&:hover, &.${classKey.itemHovered}`]: {\n [`& .${classKey.dragHandle}, & .${classKey.moreButton}`]: {\n visibility: 'visible',\n },\n backgroundColor: `rgba(${(theme as any).vars.palette.primary.darkChannel} / calc(${(theme as any).vars.palette.action.hoverOpacity} + 0.2))`,\n [`&:has(> .${listItemButtonClasses.focusVisible})`]: {\n backgroundColor: `rgba(${(theme as any).vars.palette.primary.darkChannel} / calc(${(theme as any).vars.palette.action.focusOpacity} + 0.3))`,\n },\n },\n [`&:has(> .${listItemButtonClasses.focusVisible})`]: {\n backgroundColor: `rgba(${(theme as any).vars.palette.primary.darkChannel} / calc(${(theme as any).vars.palette.action.focusOpacity} + 0.2))`,\n },\n },\n [`&.${classKey.itemSelected}`]: {\n [`> .${classKey.treeListItem}`]: {\n backgroundColor: `rgba(${(theme as any).vars.palette.secondary.mainChannel} / ${(theme as any).vars.palette.action.selectedOpacity})`,\n\n [`&:hover, &.${classKey.itemHovered}`]: {\n backgroundColor: `rgba(${(theme as any).vars.palette.secondary.mainChannel} / calc(${(theme as any).vars.palette.action.selectedOpacity} + 0.2))`,\n\n [`&:has(> .${listItemButtonClasses.focusVisible})`]: {\n backgroundColor: `rgba(${(theme as any).vars.palette.secondary.mainChannel} / calc(${(theme as any).vars.palette.action.selectedOpacity} + 0.2))`,\n },\n },\n [`&:has(> .${listItemButtonClasses.focusVisible})`]: {\n backgroundColor: `rgba(${(theme as any).vars.palette.secondary.mainChannel} / ${(theme as any).vars.palette.action.activatedOpacity})`,\n },\n },\n },\n },\n}))\nTreeView.displayName = 'TreeView'\n\n/**\n * The hierarchy's depth cue (AGL-2486).\n *\n * What this replaces was a per-level background tint, and every tint of that\n * shape has the same fault: it COMPOSITES. Each ancestor of the selection\n * painted its own overlay, so the row at depth n sat under n of them and its\n * background walked one step further toward the ink for every level. Against\n * the console's light palette the previous ramp crossed WCAG AA at the\n * seventh level (3.85:1) and reached 1.33:1 by the twelfth — the label and\n * the row had met. Dark mode looked right for the arithmetic reason that the\n * same darkening moves AWAY from light text, which is exactly why no single\n * tint direction can serve both schemes.\n *\n * Capping the ramp was tried and is not a fix either. A cap only decides\n * WHERE the cue stops working: past the cap every level paints the same\n * background, so depth 6 and depth 16 are indistinguishable, and the issue\n * asks for a cue that reads at depth 8 as clearly as at depth 1.\n *\n * So the cue is POSITIONAL rather than tonal. Each nesting level draws one\n * vertical guide in the row's indent gutter — depth is read by counting\n * lines, the way a tree view is read everywhere else. Guides are a fixed\n * colour and a fixed alpha at every level, and they live in the gutter, so\n * nothing is painted behind the label at all: the row's background is\n * `background.paper` at depth 1 and at depth 40, in both schemes, and the\n * text-vs-background contrast ratio is therefore a constant rather than a\n * function of depth. `hierarchy-depth-contrast.spec.ts` measures it.\n *\n * The branch containing the selection is still marked — that is what the old\n * tint was for — by colouring THAT row's guides with the accent instead. One\n * row, one element, no stacking possible.\n */\n\n/** Horizontal indent one nesting level adds, in px. */\nexport const HIERARCHY_INDENT_STEP = 23\n\n/** Width of one guide line, in px. */\nexport const HIERARCHY_GUIDE_WIDTH = 1\n\n/**\n * Alpha of a guide, over the ink colour of whichever scheme is active.\n *\n * Drawn from `text.primary` rather than `divider` so the one value serves\n * both schemes: the ink is dark on light and light on dark, so the guide\n * always moves AWAY from the surface it sits on instead of toward the label\n * — the failure mode of a fixed-direction tint, in miniature.\n *\n * 0.45 clears WCAG 1.4.11 (3:1 for a non-text cue) in the WORST of the four\n * surface/scheme pairings, and is not a number picked by eye: the measured\n * ratios are 3.35 and 3.32 in light, 3.89 and 4.19 in dark. `divider`, at\n * 0.12, measures 1.31 — legible as a hairline between panels, invisible as\n * the thing you are being asked to count. `hierarchy-depth-contrast.spec.ts`\n * re-derives all four.\n */\nexport const HIERARCHY_GUIDE_ALPHA = 0.45\n\n/**\n * Guides a row at `depth` draws, and how wide a gutter they occupy.\n *\n * Deliberately unbounded and deliberately linear: the count IS the depth, so\n * the cue keeps saying something new at every level. It can afford to,\n * because nothing here is cumulative — a guide is drawn beside the label,\n * never behind it.\n */\nexport function hierarchyGuideCount(depth: number): number {\n // `strictNullChecks` is off repo-wide, so compare rather than truth-test.\n return depth >= 2 ? depth - 1 : 0\n}\n\nexport function hierarchyGutterWidth(depth: number): number {\n return hierarchyGuideCount(depth) * HIERARCHY_INDENT_STEP\n}\n\n/**\n * The depth-dependent CSS a tree row gets, as a plain object.\n *\n * Exported so the contrast spec can read the STYLES rather than a\n * description of them: the check that no key here is a background COLOUR is\n * what makes \"the depth cue never accumulates toward the text\" a property of\n * the code instead of a claim in a comment.\n */\nexport function hierarchyDepthStyles(\n depth: number,\n colors: { guide: string; activeGuide: string },\n) {\n const gutter = hierarchyGutterWidth(depth)\n if (!(gutter > 0)) return {}\n const gutterFor = (color: string) => ({\n // A gradient rather than n nested borders: the rows are siblings that\n // pad themselves (see the button's `paddingLeft`), not physically\n // nested boxes, so there is no element per level to hang a border on.\n backgroundImage: `repeating-linear-gradient(to right, ${color} 0 ${HIERARCHY_GUIDE_WIDTH}px, transparent ${HIERARCHY_GUIDE_WIDTH}px ${HIERARCHY_INDENT_STEP}px)`,\n backgroundRepeat: 'no-repeat',\n // Clipped to the indent gutter, so the guides stop where the label\n // starts and no line is ever drawn behind text.\n backgroundSize: `${gutter}px 100%`,\n backgroundPosition: 'left top',\n })\n const row = `> .${classKey.treeListItem} > .${listItemButtonClasses.root}`\n return {\n [row]: gutterFor(colors.guide),\n // The row whose subtree holds the selection. Applied to the row's own\n // button — one element per row, never an ancestor box wrapping its\n // descendants — so however many ancestors match, none of them can\n // stack on top of another.\n [`&:has(.${classKey.subTreeView}):has(.${classKey.itemSelected}) ${row}`]:\n gutterFor(colors.activeGuide),\n }\n}\n\nconst TreeItem = styled(MuiListItem, {\n shouldForwardProp(propName) {\n return propName !== 'depth'\n },\n})<MuiListItemProps & { depth: number }>(({ theme, depth = 1 }) => {\n const tv = (theme as any).vars || theme\n return hierarchyDepthStyles(depth, {\n guide: `rgba(${tv.palette.text.primaryChannel} / ${HIERARCHY_GUIDE_ALPHA})`,\n // Full strength, and the same accent the selected row already uses. A\n // hairline is a small target for a hue cue, and `#e040fb` measures 3.34\n // against the lightest surface and 3.78 against the darkest — dropping\n // its alpha to soften it would spend the whole margin.\n activeGuide: tv.palette.secondary.main,\n })\n})\nTreeItem.displayName = 'TreeItem'\n\ninterface DragHandleProps extends MuiListItemIconProps {\n draggingEnabled?: boolean\n}\n\nconst DragHandle = styled(MuiListItemIcon, {\n shouldForwardProp(propName) {\n return propName !== 'draggingEnabled'\n },\n})<DragHandleProps>(({ theme, draggingEnabled }) => ({\n minWidth: 23,\n padding: theme.spacing(0.75),\n paddingLeft: 0,\n borderRadius: '4px',\n cursor: 'move',\n pointerEvents: !draggingEnabled ? 'none' : undefined,\n opacity: !draggingEnabled ? 0.5 : undefined,\n zIndex: 1,\n}))\nDragHandle.displayName = 'DragHandle'\n\ninterface NodeTreeItemProps\n extends Omit<ComponentProps<typeof TreeItem>, 'depth'> {\n nodeId: Aglyn.NodeId\n}\n\nconst NodeTreeItem = observer(\n forwardRef<any, NodeTreeItemProps>((props, ref) => {\n const { nodeId, className, ...rest } = props\n const {\n expanded,\n closeIcon,\n expandIcon,\n onItemSelect,\n onItemHover,\n onItemToggle,\n onItemFocus,\n } = useContext(TreeViewContext)\n // console.log('NodeTreeItem', [...expanded])\n const node = canvas.getNode(nodeId)\n const schema = node?.componentSchema\n const nodeLabel = node?.labelShort\n const breadcrumbPath = node?.breadcrumbPath || []\n const depth = breadcrumbPath?.length - 1\n const isRootNode = canvas.isRootNode(node)\n const dragAllowed = isFeatureEnabled(schema?.flags?.dragging)\n const collapseIn = expanded?.some((i) => i === nodeId)\n const isSelected = Besigner.focus.isNodeSelected(node)\n const isHovered = Besigner.focus.isNodeHovered(node)\n const dragDisabled = Boolean(isRootNode || !dragAllowed)\n\n /**\n * The row's eye: this element's VISIBILITY.\n *\n * `display: none`, on the canvas and on the published site, and nothing\n * reveals it. The plain \"I do not want this on the page\" switch every\n * layer tree has — and, because it is a node FIELD composed last rather\n * than a style, hiding a Stack laid out with `display: flex` gives that\n * flex back the moment it is shown again.\n *\n * It does NOT write `aglyn-hidden`. That class means something else that\n * looks the same from outside — \"starts hidden, and an interaction shows\n * it\", for a mega-menu panel or a drawer — and it is part of a runtime\n * contract that the show/hide steps and the canvas reveal both read. A\n * visibility toggle that wrote it would enrol every hidden element in a\n * choreography it is not part of. That switch is on the ⋮ menu, named\n * for what it does.\n */\n const authorHidden = isNodeHiddenByAuthor(node)\n const hiddenOnSite = isNodeHiddenOnSite(node)\n /**\n * Dimmed for either reason. Both mean the element is not on the page,\n * and a reader scanning the tree is asking that question, not which\n * mechanism answered it.\n *\n * Only the OUTERMOST hidden layer draws it: CSS opacity multiplies\n * through nesting, so a panel inside a hidden drawer would fade to 0.2\n * if every hidden level applied its own.\n */\n const dimsSubtree =\n (authorHidden || hiddenOnSite) && !isAncestorHidden(node)\n const toggleVisibility = useCallback(\n (e: any) => {\n // The row is a button and a drop target; without this the click\n // also selects the row under the control.\n e.stopPropagation()\n e.preventDefault()\n if (isRootNode) return\n // Through the canvas so it records an undo step and reaches the node\n // the MAP holds — see `updateNodeFields`.\n canvas.updateNodeFields(node, { hidden: !authorHidden })\n },\n [node, isRootNode, authorHidden],\n )\n\n const {\n attributes: dragAttributes,\n transform,\n isDragging,\n setNodeRef: setDraggableNodeRef,\n listeners: draggableListeners,\n } = useLeafDrag(node, Besigner.DragType.TREE)\n const style = transform\n ? {\n transform: `translate3d(${transform.x}px, ${transform.y}px, 0)`,\n cursor: 'grab',\n opacity: 0.5,\n }\n : undefined\n const { setNodeRef: setDroppableNodeRef, isOver } = useLeafDrop(\n node,\n undefined,\n 'tree',\n )\n\n /**\n * The row's own ⋮ menu (AGL-1405). The canvas overlay carries the same\n * menu, but it only mounts for a node with a live DOM element\n * (`node-overlay`: `isOpen = Boolean(elementRef?.current)`) — so a node\n * its parent never renders, which is precisely the node that needs\n * moving, has no overlay and no way to reach any action at all. The\n * hierarchy is the one surface that shows a node the page doesn't.\n */\n /**\n * The anchor the row's ⋮ menu hangs off, and the flag that it is open.\n *\n * A VIRTUAL anchor: the panel's right edge, at the height the pointer was.\n *\n * Neither of the two obvious choices works. The pointer alone opens the\n * menu wherever in the panel the cursor happened to be, on top of the\n * layer list. The row alone opens it at the row's top — which for a tall\n * menu near the bottom of a long tree gets slid up by `preventOverflow`\n * until it has visibly nothing to do with the row that was clicked.\n *\n * Taking one coordinate from each gives both: the menu always starts at\n * the panel's edge and spills into the canvas, and it always starts level\n * with the click.\n */\n type MenuAnchor = { getBoundingClientRect(): DOMRect }\n const [menuAnchor, setMenuAnchor] = useState<MenuAnchor | null>(null)\n /** The open menu, so its own scrolling can be told from the page's. */\n const menuRef = useRef<HTMLElement | null>(null)\n const menuOpen = Boolean(menuAnchor)\n const closeMenu = useCallback(() => setMenuAnchor(null), [])\n /**\n * The anchor for one pointer event: the row's right edge, the pointer's\n * height. Read once, at the moment of the click — a fixed rect, so the\n * menu cannot drift while it is open.\n */\n const anchorFor = useCallback((e: any): MenuAnchor | null => {\n const row = ((e.currentTarget as HTMLElement)?.closest(\n `.${classKey.treeListItem}`,\n ) ?? e.currentTarget) as HTMLElement | null\n const rect = row?.getBoundingClientRect()\n if (!rect) return null\n /**\n * The PANEL's edge, not the row's.\n *\n * A deep row is wider than the panel — the hierarchy scrolls\n * horizontally, and indentation is what makes it — so `row.right` is a\n * coordinate off the side of the visible panel, and a menu placed\n * there opens in the middle of the canvas with a gap behind it. The\n * nearest ancestor that actually scrolls is the panel, and its right\n * edge is the boundary the menu should start from.\n *\n * Falls back to the row when nothing above it scrolls, which is the\n * case the row's own edge is the right answer for.\n */\n let scroller: HTMLElement | null = row\n while (scroller && scroller.scrollWidth <= scroller.clientWidth) {\n scroller = scroller.parentElement\n }\n const bound = scroller?.getBoundingClientRect()\n const x = Math.min(rect.right, bound?.right ?? rect.right)\n const y = e.clientY || rect.top + rect.height / 2\n return { getBoundingClientRect: () => new DOMRect(x, y, 0, 0) }\n }, [])\n const toggleMenu = useCallback(\n (e: any) => {\n // The row is a button and the tree item is a drop target; without this\n // the click also selects and re-focuses the row underneath the menu.\n e.stopPropagation()\n e.preventDefault()\n const next = anchorFor(e)\n setMenuAnchor((open) => (open ? null : next))\n },\n [anchorFor],\n )\n /**\n * Right-click opens the same menu at the pointer. The row already carries\n * every action a node has, and a layer tree that does not answer a\n * right-click is one people assume is broken — they find the ⋮ eventually\n * and read it as a workaround.\n *\n * `preventDefault` suppresses the browser's own menu, which is the whole\n * point; nothing is lost, since the row holds no text to copy and no link\n * to open.\n */\n // Escape as well as a click outside. A menu opened by a right-click is\n // dismissed with Escape everywhere else, and the keyboard is the only way\n // out for anyone not using a pointer. On the document rather than the\n // Paper: the menu does not take focus when it opens, so a handler on it\n // would never see the key.\n useEffect(() => {\n if (!menuOpen) return\n const onKeyDown = (event: KeyboardEvent) => {\n if (event.key === 'Escape') closeMenu()\n }\n /**\n * Scrolling dismisses it, which is what every native context menu does.\n * The alternative is worse than it sounds: the menu is anchored to a\n * point on screen, so scrolling the hierarchy slides the row out from\n * under a menu that stays put — leaving a menu for an element the\n * reader can no longer see, hanging over the canvas.\n *\n * Capture phase: the hierarchy scrolls inside its own container, and a\n * scroll event from an element does not bubble to the document.\n */\n const onScroll = (event: Event) => {\n // Not the menu's own scroll. The Paper caps its height and scrolls,\n // so a long menu is scrolled the same way anything else is — and\n // dismissing it for that is dismissing it for being used.\n const target = event.target as Node | null\n if (target && menuRef.current?.contains(target)) return\n closeMenu()\n }\n document.addEventListener('keydown', onKeyDown)\n document.addEventListener('scroll', onScroll, true)\n return () => {\n document.removeEventListener('keydown', onKeyDown)\n document.removeEventListener('scroll', onScroll, true)\n }\n }, [menuOpen, closeMenu])\n\n /**\n * Right-click anywhere on the row opens the same menu. The row already\n * carries every action a node has, and a layer tree that does not answer\n * a right-click is one people assume is broken — they find the ⋮\n * eventually and read it as a workaround.\n *\n * Anchored to the ROW rather than the pointer, which is the usual desktop\n * convention and is wrong here: a menu at the cursor opens wherever in\n * the panel the pointer happened to be, on top of the layer list. Off the\n * row it always starts at the panel's edge and spills into the canvas.\n *\n * `preventDefault` suppresses the browser's own menu, which is the whole\n * point; nothing is lost, since the row holds no text to copy and no link\n * to open.\n */\n const openMenuOnRow = useCallback(\n (e: any) => {\n e.preventDefault()\n e.stopPropagation()\n setMenuAnchor(anchorFor(e))\n },\n [anchorFor],\n )\n\n if (!node) return <>'Invalid node'</>\n return (\n <TreeItem\n ref={ref}\n // ref={setDraggableNodeRef}\n data-aglyn-node={nodeId}\n {...dragAttributes}\n depth={depth}\n onMouseEnter={(e) => onItemHover(e, nodeId)}\n onFocus={(e) => onItemFocus(e, nodeId)}\n className={clsx(className, classKey.treeItem, {\n [classKey.itemSelected]: isSelected,\n [classKey.itemHovered]: isHovered,\n [classKey.itemIsDragging]: isDragging,\n [classKey.itemIsDragOver]: isOver,\n })}\n disablePadding\n style={style}\n sx={\n dimsSubtree\n ? {\n // A hidden layer reads as hidden at a glance, without being\n // selected or hovered — the row is the only place it is\n // always on screen, because on the canvas it is by\n // definition the thing you cannot see.\n //\n // On the TreeItem rather than the row, so the dim carries to\n // every layer underneath: a container that does not ship\n // takes its contents with it, and a full-strength child row\n // inside a dimmed parent reads as \"this one still ships\".\n //\n // Held at 0.45 rather than hidden outright so names stay\n // legible, and nothing here changes what the rows DO — a\n // hidden element is still one you select, drag, rename and\n // style.\n opacity: 0.45,\n fontStyle: 'italic',\n }\n : undefined\n }\n {...rest}\n >\n <Stack\n ref={(e: any) => {\n setDraggableNodeRef(e)\n setDroppableNodeRef(e)\n }}\n className={classKey.treeListItem}\n direction=\"row\"\n onContextMenu={openMenuOnRow}\n >\n {!isRootNode && (\n <MuiListItemIcon\n {...draggableListeners}\n className={classKey.dragHandle}\n draggable\n sx={{\n minWidth: 23,\n padding: 0.75,\n pl: 0,\n borderRadius: '4px',\n cursor: 'move',\n pointerEvents: dragDisabled ? 'none' : undefined,\n opacity: dragDisabled ? 0.5 : undefined,\n zIndex: 1,\n }}\n >\n <MdiIcon\n color=\"inherit\"\n fontSize=\"inherit\"\n path={ICON_VARIANT_MODIFY_DRAG.path}\n />\n </MuiListItemIcon>\n )}\n <MuiListItemButton\n sx={{\n // The gutter the depth guides are drawn in — one source for\n // both, or the lines would stop landing on the level\n // boundaries they mark.\n paddingLeft: `${hierarchyGutterWidth(depth)}px`,\n }}\n onClick={(e) => onItemSelect(e, nodeId)}\n onMouseOver={(e) => onItemHover(e, nodeId)}\n dense\n >\n <MuiListItemIcon sx={{ minWidth: 20, mr: '1px' }}>\n <IconButton\n color=\"default\"\n // The chevron is the only control in the row that is not the\n // row itself, and it had no name in any form — a screen\n // reader announced \"button\", and hovering it said nothing.\n // It states which way it will go, not which way it points.\n aria-label={collapseIn ? 'Collapse children' : 'Expand children'}\n title={collapseIn ? 'Collapse children' : 'Expand children'}\n sx={{\n padding: '2px',\n visibility: !node?.hasNodes ? 'hidden' : 'visible',\n }}\n disabled={!node?.hasNodes}\n onClick={(e) => onItemToggle(e, nodeId)}\n >\n {collapseIn ? closeIcon : expandIcon}\n </IconButton>\n </MuiListItemIcon>\n <MuiListItemIcon\n sx={{\n minWidth: 20,\n mr: 0.5,\n fontSize: 14,\n padding: 0.2,\n borderRadius: '0.25em',\n backgroundColor: 'background.default',\n border: 1,\n borderColor: 'divider',\n boxShadow: 1,\n color: 'primary',\n display: 'flex',\n alignItems: 'center',\n flexDirection: 'column',\n }}\n >\n <ComponentIconComponent\n component={node?.componentSchema}\n node={node}\n />\n </MuiListItemIcon>\n <MuiListItemText\n primary={nodeLabel}\n slotProps={{\n primary: {\n noWrap: true,\n sx: {\n maxWidth: '180px',\n width: 'fit-content',\n textOverflow: 'ellipsis',\n },\n },\n }}\n />\n </MuiListItemButton>\n {!isRootNode && (\n <Tooltip\n title={\n authorHidden\n ? 'Hidden. Click to show it.'\n : hiddenOnSite\n ? 'Starts hidden until an interaction shows it. Click to hide it outright.'\n : 'Visible. Click to hide it — here and on the published site.'\n }\n >\n <IconButton\n aria-label={\n authorHidden ? `Show ${nodeLabel}` : `Hide ${nodeLabel}`\n }\n aria-pressed={authorHidden}\n className={classKey.visibilityButton}\n color=\"default\"\n onClick={toggleVisibility}\n size=\"small\"\n sx={{\n alignSelf: 'center',\n flexShrink: 0,\n padding: '2px',\n color: 'text.disabled',\n // Quiet on a visible element and permanent on a hidden one:\n // an eye on every row at full strength turns the hierarchy\n // into a column of icons, and the state worth seeing at a\n // glance is which elements the site does NOT ship. Focus\n // brings it back, so it is reachable by keyboard on a row\n // the pointer never touches.\n opacity: authorHidden ? 1 : 0,\n transition: 'opacity 120ms',\n '&:focus-visible': { opacity: 1 },\n [`.${classKey.treeListItem}:hover &`]: { opacity: 1 },\n }}\n >\n <MdiIcon\n fontSize=\"inherit\"\n path={\n authorHidden\n ? ICON_VARIANT_VISIBILITY_HIDDEN.path\n : ICON_VARIANT_VISIBILITY_SHOWN.path\n }\n />\n </IconButton>\n </Tooltip>\n )}\n <IconButton\n aria-label={`Actions for ${nodeLabel}`}\n aria-expanded={menuOpen}\n aria-haspopup=\"menu\"\n className={classKey.moreButton}\n color=\"default\"\n onClick={toggleMenu}\n size=\"small\"\n sx={{ alignSelf: 'center', flexShrink: 0, padding: '2px', mr: 0.25 }}\n >\n <MdiIcon\n fontSize=\"inherit\"\n path={ICON_VARIANT_SHOW_MORE_VERTICAL.path}\n />\n </IconButton>\n {menuOpen && (\n <Popper\n anchorEl={menuAnchor as never}\n open\n /**\n * Opens SIDEWAYS, into the canvas (AGL-1405).\n *\n * Below the row it covered the hierarchy — including the layer\n * being acted on, which is the one thing you want to keep\n * looking at while you read the menu, and it left almost no\n * panel to click on to dismiss it. To the right there is a\n * whole canvas to spill over, and it belongs to no control.\n *\n * The fallbacks matter for the narrow-window case: `left-*`\n * only wins when the canvas edge is closer than the menu is\n * wide, and `bottom-start` is the last resort.\n */\n placement=\"right-start\"\n /**\n * Kept inside the viewport. Without these the menu was laid\n * out beside its anchor whatever room was left, so a row near\n * the bottom of a long hierarchy pushed a 500px menu off the\n * bottom of the document — and the PAGE grew a scrollbar to\n * contain it, which moves the editor's own chrome under the\n * reader.\n *\n * `flip` picks another side when this one does not fit;\n * `preventOverflow` on the cross axis slides it up so a menu\n * anchored near the bottom edge still lands fully on screen.\n * The Paper caps its own height and scrolls, so a menu taller\n * than the window is reachable rather than clipped.\n */\n modifiers={[\n {\n name: 'flip',\n enabled: true,\n options: {\n fallbackPlacements: [\n 'right-end',\n 'left-start',\n 'left-end',\n 'bottom-start',\n ],\n padding: 8,\n },\n },\n {\n name: 'preventOverflow',\n enabled: true,\n options: { altAxis: true, padding: 8 },\n },\n // Clear of the row it belongs to, so the layer's name and\n // its eye stay readable beside the open menu.\n { name: 'offset', options: { offset: [0, 6] } },\n ]}\n // Above the panel, below dialogs and drawers — the same band\n // the canvas overlay's copy of this menu sits in.\n sx={{ zIndex: (theme) => theme.zIndex.modal - 1 }}\n >\n {/* NodeContextMenu forwards its ref to the Paper and spreads\n the rest, so it is a valid ClickAwayListener child on its\n own — no wrapper element to disturb the Popper's layout. */}\n <ClickAwayListener onClickAway={closeMenu}>\n <NodeContextMenu\n ref={menuRef}\n node={node}\n onAction={closeMenu}\n />\n </ClickAwayListener>\n </Popper>\n )}\n </Stack>\n\n {node?.hasNodes && (\n <Box className={classKey.subTreeView} sx={{ position: 'relative' }}>\n <Divider\n orientation=\"vertical\"\n sx={{\n position: 'absolute',\n height: 1,\n left: `${\n depth <= 1 ? (depth < 1 ? 20 - 9 : 34) : depth * 23 + 11\n }px`,\n zIndex: 0,\n pointerEvents: 'none',\n }}\n // flexItem\n />\n <Collapse unmountOnExit in={collapseIn}>\n <TreeView disablePadding>\n {node?.nodes?.map((nodeId) => (\n <NodeTreeItem key={nodeId} nodeId={nodeId} />\n ))}\n </TreeView>\n </Collapse>\n </Box>\n )}\n </TreeItem>\n )\n }),\n)\nNodeTreeItem.displayName = 'NodeTreeItem'\n\nconst TreeViewContext = createContext<{\n expanded: Aglyn.NodeId[]\n // selected: Aglyn.NodeId\n closeIcon?: JSX.Node\n expandIcon?: JSX.Node\n onItemSelect: (e: ChangeEvent<any>, id: Aglyn.NodeId) => void\n onItemToggle: (e: ChangeEvent<any>, id: Aglyn.NodeId) => void\n onItemHover: (e: ChangeEvent<any>, id: Aglyn.NodeId) => void\n onItemFocus: (e: ChangeEvent<any>, id: Aglyn.NodeId) => void\n}>({\n expanded: [],\n // selected: null,\n closeIcon: '●',\n expandIcon: '○',\n onItemSelect: noop,\n onItemToggle: noop,\n onItemHover: noop,\n onItemFocus: noop,\n})\n\nexport interface NodeTreeViewProps extends BoxProps {\n TreeViewProps?: Partial<Omit<ComponentProps<typeof TreeView>, 'children'>>\n}\n\nconst CloseIcon = (\n <MdiIcon fontSize=\"small\" path={ICON_VARIANT_COLLAPSIBLE_CLOSE.path} />\n)\nconst ExpandIcon = (\n <MdiIcon fontSize=\"small\" path={ICON_VARIANT_COLLAPSIBLE_OPEN.path} />\n)\n\nexport const NodeTreeView = observer(\n forwardRef<any, NodeTreeViewProps>((props, ref) => {\n const { TreeViewProps, ...rest } = props\n const allExpanded = Besigner.focus.getAllExpanded()\n const manuallyCollapsed = Besigner.focus.getManuallyCollapsed()\n\n const expanded = useMemo(() => {\n const paths = allExpanded.reduce((acc, i) => {\n return [...acc, ...(i?.breadcrumbPath || [])]\n }, [])\n return uniq(paths).filter((id) => !manuallyCollapsed.includes(id))\n }, [allExpanded, manuallyCollapsed])\n\n const handleTreeItemToggle = useCallback((e, $id: Aglyn.NodeId) => {\n e.stopPropagation()\n e.preventDefault()\n const node = canvas.getNode($id)\n if (!node) return\n Besigner.focus.toggleNodeExpansion(node)\n }, [])\n\n const handleTreeItemSelect = useCallback((e, $id: Aglyn.NodeId) => {\n e.stopPropagation()\n e.preventDefault()\n const node = canvas.getNode($id)\n if (!node) return\n // Multi-selection modifiers (AGL-8): Shift ranges from the anchor,\n // Cmd/Ctrl toggles membership, plain click single-selects.\n if (e.shiftKey) {\n Besigner.focus.rangeSelectNode(node)\n } else {\n Besigner.focus.handleNodeSelection(node, e.metaKey || e.ctrlKey)\n }\n }, [])\n\n const handleTreeItemHover = useCallback((e, $id: Aglyn.NodeId) => {\n const node = canvas.getNode($id)\n if (!node) return\n Besigner.focus.setHoveredNode(node)\n }, [])\n\n const handleTreeItemFocus = useCallback((e, $id: Aglyn.NodeId) => {\n e.stopPropagation()\n const node = canvas.getNode($id)\n if (!node) return\n Besigner.focus.setHoveredNode(node)\n }, [])\n\n return (\n <TreeViewContext.Provider\n value={{\n expanded: expanded,\n closeIcon: CloseIcon,\n expandIcon: ExpandIcon,\n onItemFocus: handleTreeItemFocus,\n onItemHover: handleTreeItemHover,\n onItemSelect: handleTreeItemSelect,\n onItemToggle: handleTreeItemToggle,\n }}\n >\n <Box\n ref={ref}\n component=\"nav\"\n id={'aglyn:node-tree-view'}\n aria-label=\"canvas nodes navigator\"\n {...rest}\n >\n <TreeView className={classKey.root} {...TreeViewProps}>\n <NodeTreeItem nodeId={NODE_ROOT_ID} />\n </TreeView>\n </Box>\n </TreeViewContext.Provider>\n )\n }),\n)\n\nNodeTreeView.displayName = 'NodeTreeView'\nNodeTreeView.aglyn = true\n\nexport default NodeTreeView\n"],"names":["canvas","isFeatureEnabled","NODE_ROOT_ID","Besigner","ICON_VARIANT_COLLAPSIBLE_CLOSE","ICON_VARIANT_COLLAPSIBLE_OPEN","ICON_VARIANT_MODIFY_DRAG","ICON_VARIANT_SHOW_MORE_VERTICAL","ICON_VARIANT_VISIBILITY_HIDDEN","ICON_VARIANT_VISIBILITY_SHOWN","MdiIcon","generateComponentClassKeys","styled","noop","Box","ClickAwayListener","Collapse","Divider","IconButton","List","MuiList","ListItem","MuiListItem","ListItemButton","MuiListItemButton","listItemButtonClasses","listItemClasses","ListItemIcon","MuiListItemIcon","ListItemText","MuiListItemText","Popper","Stack","Tooltip","clsx","uniq","observer","createContext","forwardRef","useCallback","useContext","useEffect","useMemo","useRef","useState","useLeafDrag","useLeafDrop","isAncestorHidden","isNodeHiddenByAuthor","isNodeHiddenOnSite","ComponentIconComponent","NodeContextMenu","classKey","TreeView","theme","alignItems","flexDirection","width","minWidth","root","zIndex","paddingTop","paddingBottom","borderTopLeftRadius","borderBottomLeftRadius","focusVisible","selected","itemSelected","join","backgroundColor","treeListItem","dragHandle","moreButton","visibility","itemHovered","vars","palette","primary","darkChannel","action","hoverOpacity","focusOpacity","secondary","mainChannel","selectedOpacity","activatedOpacity","displayName","HIERARCHY_INDENT_STEP","HIERARCHY_GUIDE_WIDTH","HIERARCHY_GUIDE_ALPHA","hierarchyGuideCount","depth","hierarchyGutterWidth","hierarchyDepthStyles","colors","gutter","gutterFor","color","backgroundImage","backgroundRepeat","backgroundSize","backgroundPosition","row","guide","subTreeView","activeGuide","TreeItem","shouldForwardProp","propName","tv","text","primaryChannel","main","DragHandle","draggingEnabled","padding","spacing","paddingLeft","borderRadius","cursor","pointerEvents","undefined","opacity","NodeTreeItem","props","ref","schema","node","nodeId","className","rest","expanded","closeIcon","expandIcon","onItemSelect","onItemHover","onItemToggle","onItemFocus","TreeViewContext","getNode","componentSchema","nodeLabel","labelShort","breadcrumbPath","length","isRootNode","dragAllowed","flags","dragging","collapseIn","some","i","isSelected","focus","isNodeSelected","isHovered","isNodeHovered","dragDisabled","Boolean","authorHidden","hiddenOnSite","dimsSubtree","toggleVisibility","e","stopPropagation","preventDefault","updateNodeFields","hidden","attributes","dragAttributes","transform","isDragging","setNodeRef","setDraggableNodeRef","listeners","draggableListeners","DragType","TREE","style","x","y","setDroppableNodeRef","isOver","menuAnchor","setMenuAnchor","menuRef","menuOpen","closeMenu","anchorFor","currentTarget","closest","rect","getBoundingClientRect","scroller","scrollWidth","clientWidth","parentElement","bound","Math","min","right","clientY","top","height","DOMRect","toggleMenu","next","open","onKeyDown","event","key","onScroll","target","current","contains","document","addEventListener","removeEventListener","openMenuOnRow","data-aglyn-node","onMouseEnter","onFocus","treeItem","itemIsDragging","itemIsDragOver","disablePadding","sx","fontStyle","direction","onContextMenu","draggable","pl","fontSize","path","onClick","onMouseOver","dense","mr","aria-label","title","hasNodes","disabled","border","borderColor","boxShadow","display","component","slotProps","noWrap","maxWidth","textOverflow","aria-pressed","visibilityButton","size","alignSelf","flexShrink","transition","aria-expanded","aria-haspopup","anchorEl","placement","modifiers","name","enabled","options","fallbackPlacements","altAxis","offset","modal","onClickAway","onAction","position","orientation","left","unmountOnExit","in","nodes","map","CloseIcon","ExpandIcon","NodeTreeView","TreeViewProps","allExpanded","getAllExpanded","manuallyCollapsed","getManuallyCollapsed","paths","reduce","acc","filter","id","includes","handleTreeItemToggle","$id","toggleNodeExpansion","handleTreeItemSelect","shiftKey","rangeSelectNode","handleNodeSelection","metaKey","ctrlKey","handleTreeItemHover","setHoveredNode","handleTreeItemFocus","Provider","value","aglyn"],"mappings":"AAAA;;;;;;;;;;;;;;;CAeC;;;AAGD,SAASA,MAAM,EAAEC,gBAAgB,EAAEC,YAAY,QAAQ,eAAc;AACrE,YAAYC,cAAc,kBAAiB;AAC3C,SACEC,8BAA8B,EAC9BC,6BAA6B,EAC7BC,wBAAwB,EACxBC,+BAA+B,EAC/BC,8BAA8B,EAC9BC,6BAA6B,QACxB,2BAA0B;AACjC,SAASC,OAAO,QAAQ,uBAAsB;AA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AAC0J;QAC5B,IAAI,CAACtK,MAAM;QACX5H,SAASsJ,KAAK,CAACqJ,cAAc,CAAC/K;IAChC,GAAG,EAAE;IAEL,MAAMgL,sBAAsBxQ,YAAY,CAAC4H,GAAGkI;QAC1ClI,EAAEC,eAAe;QACjB,MAAMrC,OAAO/H,OAAO2I,OAAO,CAAC0J;QAC5B,IAAI,CAACtK,MAAM;QACX5H,SAASsJ,KAAK,CAACqJ,cAAc,CAAC/K;IAChC,GAAG,EAAE;IAEL,qBACE,KAACW,gBAAgBsK,QAAQ;QACvBC,OAAO;YACL9K,UAAUA;YACVC,WAAWkJ;YACXjJ,YAAYkJ;YACZ9I,aAAasK;YACbxK,aAAasK;YACbvK,cAAciK;YACd/J,cAAc4J;QAChB;kBAEA,cAAA,KAACtR;YACC+G,KAAKA;YACLyH,WAAU;YACV4C,IAAI;YACJpD,cAAW;WACP5G;sBAEJ,cAAA,KAAC7E;gBAAS4E,WAAW7E,SAASO,IAAI;eAAM8N;0BACtC,cAAA,KAAC9J;oBAAaK,QAAQ9H;;;;;AAKhC,IACD;AAEDsR,aAAalM,WAAW,GAAG;AAC3BkM,aAAa0B,KAAK,GAAG;AAErB,eAAe1B,aAAY"}
|
|
@@ -0,0 +1,22 @@
|
|
|
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 StackProps } from '@mui/material';
|
|
18
|
+
export interface PanelControlsProps extends StackProps {
|
|
19
|
+
}
|
|
20
|
+
declare const PanelControlsComponent: import("react").ForwardRefExoticComponent<Omit<PanelControlsProps, "ref"> & import("react").RefAttributes<any>>;
|
|
21
|
+
export { PanelControlsComponent };
|
|
22
|
+
export default PanelControlsComponent;
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
import { _ as _extends } from "@swc/helpers/_/_extends";
|
|
2
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
|
+
/**
|
|
4
|
+
* @license
|
|
5
|
+
* Copyright 2026 Aglyn LLC
|
|
6
|
+
*
|
|
7
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
8
|
+
* you may not use this file except in compliance with the License.
|
|
9
|
+
* You may obtain a copy of the License at
|
|
10
|
+
*
|
|
11
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
12
|
+
*
|
|
13
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
14
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
15
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
16
|
+
* See the License for the specific language governing permissions and
|
|
17
|
+
* limitations under the License.
|
|
18
|
+
*/ import { ICON_VARIANT_DOCK_LEFT_TOGGLE, ICON_VARIANT_DOCK_RIGHT_TOGGLE } from "@aglyn/shared-data-enums";
|
|
19
|
+
import { MdiIcon } from "@aglyn/shared-ui-jsx";
|
|
20
|
+
import { Stack as MuiStack, ToggleButton as MuiToggleButton, ToggleButtonGroup as MuiToggleButtonGroup, Tooltip as MuiTooltip } from "@mui/material";
|
|
21
|
+
import { forwardRef } from "react";
|
|
22
|
+
import useAglynBesignerPanel from "../hooks/use-aglyn-besigner-panel.js";
|
|
23
|
+
const PanelControlsComponent = /*#__PURE__*/ forwardRef((props, ref)=>{
|
|
24
|
+
const [panelLeft, setPanelLeft] = useAglynBesignerPanel('panelLeft');
|
|
25
|
+
const [panelRight, setPanelRight] = useAglynBesignerPanel('panelRight');
|
|
26
|
+
const openPanels = [
|
|
27
|
+
panelLeft,
|
|
28
|
+
panelRight
|
|
29
|
+
].filter((i)=>Boolean(i == null ? void 0 : i.toggled)).map((i)=>i == null ? void 0 : i.id);
|
|
30
|
+
return /*#__PURE__*/ _jsx(MuiStack, _extends({
|
|
31
|
+
ref: ref,
|
|
32
|
+
direction: "row",
|
|
33
|
+
spacing: 1
|
|
34
|
+
}, props, {
|
|
35
|
+
children: /*#__PURE__*/ _jsxs(MuiToggleButtonGroup, {
|
|
36
|
+
size: "small",
|
|
37
|
+
value: openPanels,
|
|
38
|
+
children: [
|
|
39
|
+
/*#__PURE__*/ _jsx(MuiTooltip, {
|
|
40
|
+
title: 'Left panel',
|
|
41
|
+
children: /*#__PURE__*/ _jsx(MuiToggleButton, {
|
|
42
|
+
selected: Boolean(panelLeft == null ? void 0 : panelLeft.toggled),
|
|
43
|
+
value: Boolean(panelLeft == null ? void 0 : panelLeft.id) || false,
|
|
44
|
+
onClick: ()=>setPanelLeft((panel)=>_extends({}, panel, {
|
|
45
|
+
toggled: !(panel == null ? void 0 : panel.toggled)
|
|
46
|
+
})),
|
|
47
|
+
children: /*#__PURE__*/ _jsx(MdiIcon, {
|
|
48
|
+
fontSize: "inherit",
|
|
49
|
+
path: ICON_VARIANT_DOCK_LEFT_TOGGLE.path
|
|
50
|
+
})
|
|
51
|
+
})
|
|
52
|
+
}),
|
|
53
|
+
/*#__PURE__*/ _jsx(MuiTooltip, {
|
|
54
|
+
title: 'Right panel',
|
|
55
|
+
children: /*#__PURE__*/ _jsx(MuiToggleButton, {
|
|
56
|
+
selected: Boolean(panelRight == null ? void 0 : panelRight.toggled),
|
|
57
|
+
value: Boolean(panelRight == null ? void 0 : panelRight.id) || false,
|
|
58
|
+
onClick: ()=>setPanelRight((panel)=>_extends({}, panel, {
|
|
59
|
+
toggled: !(panel == null ? void 0 : panel.toggled)
|
|
60
|
+
})),
|
|
61
|
+
children: /*#__PURE__*/ _jsx(MdiIcon, {
|
|
62
|
+
fontSize: "inherit",
|
|
63
|
+
path: ICON_VARIANT_DOCK_RIGHT_TOGGLE.path
|
|
64
|
+
})
|
|
65
|
+
})
|
|
66
|
+
})
|
|
67
|
+
]
|
|
68
|
+
})
|
|
69
|
+
}));
|
|
70
|
+
});
|
|
71
|
+
PanelControlsComponent.displayName = 'PanelControlsComponent';
|
|
72
|
+
PanelControlsComponent.aglyn = true;
|
|
73
|
+
export { PanelControlsComponent };
|
|
74
|
+
export default PanelControlsComponent;
|
|
75
|
+
|
|
76
|
+
//# sourceMappingURL=panel-controls.component.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../../../../../../libs/besigner/feature/designer/src/lib/components/panel-controls.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 {\n ICON_VARIANT_DOCK_LEFT_TOGGLE,\n ICON_VARIANT_DOCK_RIGHT_TOGGLE,\n} from '@aglyn/shared-data-enums'\nimport { MdiIcon } from '@aglyn/shared-ui-jsx'\nimport {\n Stack as MuiStack,\n type StackProps,\n ToggleButton as MuiToggleButton,\n ToggleButtonGroup as MuiToggleButtonGroup,\n Tooltip as MuiTooltip,\n} from '@mui/material'\nimport { forwardRef } from 'react'\nimport useAglynBesignerPanel from '../hooks/use-aglyn-besigner-panel'\n\nexport interface PanelControlsProps extends StackProps {}\n\nconst PanelControlsComponent = forwardRef<any, PanelControlsProps>(\n (props, ref) => {\n const [panelLeft, setPanelLeft] = useAglynBesignerPanel('panelLeft')\n const [panelRight, setPanelRight] = useAglynBesignerPanel('panelRight')\n const openPanels = [panelLeft, panelRight]\n .filter((i) => Boolean(i?.toggled))\n .map((i) => i?.id)\n\n return (\n <MuiStack ref={ref} direction=\"row\" spacing={1} {...props}>\n <MuiToggleButtonGroup size=\"small\" value={openPanels}>\n <MuiTooltip title={'Left panel'}>\n <MuiToggleButton\n selected={Boolean(panelLeft?.toggled)}\n value={Boolean(panelLeft?.id) || false}\n onClick={() =>\n setPanelLeft((panel) => ({\n ...panel,\n toggled: !panel?.toggled,\n }))\n }\n >\n <MdiIcon\n fontSize=\"inherit\"\n path={ICON_VARIANT_DOCK_LEFT_TOGGLE.path}\n />\n </MuiToggleButton>\n </MuiTooltip>\n {/*<MuiTooltip title={'Bottom panel'}>*/}\n {/* <MuiToggleButton*/}\n {/* selected={openPanels.some(i => i === BesignerPanelViewFlag.PANEL_BOTTOM)}*/}\n {/* value={BesignerPanelViewFlag.PANEL_BOTTOM}*/}\n {/* >*/}\n {/* <MdiIcon fontSize=\"inherit\" path={ICON_VARIANT_DOCK_BOTTOM_TOGGLE.path} />*/}\n {/* </MuiToggleButton>*/}\n {/*</MuiTooltip>*/}\n <MuiTooltip title={'Right panel'}>\n <MuiToggleButton\n selected={Boolean(panelRight?.toggled)}\n value={Boolean(panelRight?.id) || false}\n onClick={() =>\n setPanelRight((panel) => ({\n ...panel,\n toggled: !panel?.toggled,\n }))\n }\n >\n <MdiIcon\n fontSize=\"inherit\"\n path={ICON_VARIANT_DOCK_RIGHT_TOGGLE.path}\n />\n </MuiToggleButton>\n </MuiTooltip>\n </MuiToggleButtonGroup>\n </MuiStack>\n )\n },\n)\nPanelControlsComponent.displayName = 'PanelControlsComponent'\nPanelControlsComponent.aglyn = true\n\nexport { PanelControlsComponent }\nexport default PanelControlsComponent\n"],"names":["ICON_VARIANT_DOCK_LEFT_TOGGLE","ICON_VARIANT_DOCK_RIGHT_TOGGLE","MdiIcon","Stack","MuiStack","ToggleButton","MuiToggleButton","ToggleButtonGroup","MuiToggleButtonGroup","Tooltip","MuiTooltip","forwardRef","useAglynBesignerPanel","PanelControlsComponent","props","ref","panelLeft","setPanelLeft","panelRight","setPanelRight","openPanels","filter","i","Boolean","toggled","map","id","direction","spacing","size","value","title","selected","onClick","panel","fontSize","path","displayName","aglyn"],"mappings":";;AAAA;;;;;;;;;;;;;;;CAeC,GAED,SACEA,6BAA6B,EAC7BC,8BAA8B,QACzB,2BAA0B;AACjC,SAASC,OAAO,QAAQ,uBAAsB;AAC9C,SACEC,SAASC,QAAQ,EAEjBC,gBAAgBC,eAAe,EAC/BC,qBAAqBC,oBAAoB,EACzCC,WAAWC,UAAU,QAChB,gBAAe;AACtB,SAASC,UAAU,QAAQ,QAAO;AAClC,OAAOC,2BAA2B,uCAAmC;AAIrE,MAAMC,uCAAyBF,WAC7B,CAACG,OAAOC;IACN,MAAM,CAACC,WAAWC,aAAa,GAAGL,sBAAsB;IACxD,MAAM,CAACM,YAAYC,cAAc,GAAGP,sBAAsB;IAC1D,MAAMQ,aAAa;QAACJ;QAAWE;KAAW,CACvCG,MAAM,CAAC,CAACC,IAAMC,QAAQD,qBAAAA,EAAGE,OAAO,GAChCC,GAAG,CAAC,CAACH,IAAMA,qBAAAA,EAAGI,EAAE;IAEnB,qBACE,KAACtB;QAASW,KAAKA;QAAKY,WAAU;QAAMC,SAAS;OAAOd;kBAClD,cAAA,MAACN;YAAqBqB,MAAK;YAAQC,OAAOV;;8BACxC,KAACV;oBAAWqB,OAAO;8BACjB,cAAA,KAACzB;wBACC0B,UAAUT,QAAQP,6BAAAA,UAAWQ,OAAO;wBACpCM,OAAOP,QAAQP,6BAAAA,UAAWU,EAAE,KAAK;wBACjCO,SAAS,IACPhB,aAAa,CAACiB,QAAW,aACpBA;oCACHV,SAAS,EAACU,yBAAAA,MAAOV,OAAO;;kCAI5B,cAAA,KAACtB;4BACCiC,UAAS;4BACTC,MAAMpC,8BAA8BoC,IAAI;;;;8BAY9C,KAAC1B;oBAAWqB,OAAO;8BACjB,cAAA,KAACzB;wBACC0B,UAAUT,QAAQL,8BAAAA,WAAYM,OAAO;wBACrCM,OAAOP,QAAQL,8BAAAA,WAAYQ,EAAE,KAAK;wBAClCO,SAAS,IACPd,cAAc,CAACe,QAAW,aACrBA;oCACHV,SAAS,EAACU,yBAAAA,MAAOV,OAAO;;kCAI5B,cAAA,KAACtB;4BACCiC,UAAS;4BACTC,MAAMnC,+BAA+BmC,IAAI;;;;;;;AAOvD;AAEFvB,uBAAuBwB,WAAW,GAAG;AACrCxB,uBAAuByB,KAAK,GAAG;AAE/B,SAASzB,sBAAsB,GAAE;AACjC,eAAeA,uBAAsB"}
|
|
@@ -0,0 +1,38 @@
|
|
|
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 InputBaseProps } from '@mui/material';
|
|
18
|
+
export interface PickerSearchFieldProps extends Omit<InputBaseProps, 'onChange' | 'value'> {
|
|
19
|
+
value: string;
|
|
20
|
+
onChange: (e: {
|
|
21
|
+
currentTarget?: {
|
|
22
|
+
value?: string;
|
|
23
|
+
};
|
|
24
|
+
}) => void;
|
|
25
|
+
}
|
|
26
|
+
/**
|
|
27
|
+
* The element picker's search input, shared by the Choose-element dialog and
|
|
28
|
+
* the Elements panel (AGL-2486).
|
|
29
|
+
*
|
|
30
|
+
* Both surfaces get the same accessible name and the same clear affordance,
|
|
31
|
+
* so a search that works in one works the same way in the other. The ranking
|
|
32
|
+
* they share lives in `usePickerFilter`.
|
|
33
|
+
*/
|
|
34
|
+
export declare function PickerSearchField(props: PickerSearchFieldProps): import("react").JSX.Element;
|
|
35
|
+
export declare namespace PickerSearchField {
|
|
36
|
+
var displayName: string;
|
|
37
|
+
}
|
|
38
|
+
export default PickerSearchField;
|
|
@@ -0,0 +1,79 @@
|
|
|
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 } 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 { ICON_VARIANT_CLEAR, ICON_VARIANT_SEARCH } from "@aglyn/shared-data-enums";
|
|
20
|
+
import { MdiIcon } from "@aglyn/shared-ui-jsx";
|
|
21
|
+
import { IconButton, InputAdornment, InputBase } from "@mui/material";
|
|
22
|
+
/**
|
|
23
|
+
* The element picker's search input, shared by the Choose-element dialog and
|
|
24
|
+
* the Elements panel (AGL-2486).
|
|
25
|
+
*
|
|
26
|
+
* Both surfaces get the same accessible name and the same clear affordance,
|
|
27
|
+
* so a search that works in one works the same way in the other. The ranking
|
|
28
|
+
* they share lives in `usePickerFilter`.
|
|
29
|
+
*/ export function PickerSearchField(props) {
|
|
30
|
+
const { value, onChange } = props, rest = _object_without_properties_loose(props, [
|
|
31
|
+
"value",
|
|
32
|
+
"onChange"
|
|
33
|
+
]);
|
|
34
|
+
return /*#__PURE__*/ _jsx(InputBase, _extends({
|
|
35
|
+
sx: {
|
|
36
|
+
flex: 1,
|
|
37
|
+
color: 'inherit'
|
|
38
|
+
},
|
|
39
|
+
placeholder: "Search elements",
|
|
40
|
+
inputProps: {
|
|
41
|
+
'aria-label': 'search elements'
|
|
42
|
+
},
|
|
43
|
+
value: value,
|
|
44
|
+
onChange: onChange,
|
|
45
|
+
startAdornment: /*#__PURE__*/ _jsx(InputAdornment, {
|
|
46
|
+
sx: {
|
|
47
|
+
color: 'inherit'
|
|
48
|
+
},
|
|
49
|
+
position: "start",
|
|
50
|
+
children: /*#__PURE__*/ _jsx(MdiIcon, {
|
|
51
|
+
path: ICON_VARIANT_SEARCH.path
|
|
52
|
+
})
|
|
53
|
+
}),
|
|
54
|
+
endAdornment: value ? /*#__PURE__*/ _jsx(InputAdornment, {
|
|
55
|
+
sx: {
|
|
56
|
+
color: 'inherit'
|
|
57
|
+
},
|
|
58
|
+
position: "end",
|
|
59
|
+
children: /*#__PURE__*/ _jsx(IconButton, {
|
|
60
|
+
type: "button",
|
|
61
|
+
color: "inherit",
|
|
62
|
+
sx: {
|
|
63
|
+
p: '10px'
|
|
64
|
+
},
|
|
65
|
+
"aria-label": "clear filter",
|
|
66
|
+
// An IconButton has no `currentTarget.value`, so the shared
|
|
67
|
+
// handler reads the query as '' — the clear IS the change.
|
|
68
|
+
onClick: onChange,
|
|
69
|
+
children: /*#__PURE__*/ _jsx(MdiIcon, {
|
|
70
|
+
path: ICON_VARIANT_CLEAR.path
|
|
71
|
+
})
|
|
72
|
+
})
|
|
73
|
+
}) : null
|
|
74
|
+
}, rest));
|
|
75
|
+
}
|
|
76
|
+
PickerSearchField.displayName = 'PickerSearchField';
|
|
77
|
+
export default PickerSearchField;
|
|
78
|
+
|
|
79
|
+
//# sourceMappingURL=picker-search-field.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../../../../../../libs/besigner/feature/designer/src/lib/components/picker-search-field.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 { ICON_VARIANT_CLEAR, ICON_VARIANT_SEARCH } from '@aglyn/shared-data-enums'\nimport { MdiIcon } from '@aglyn/shared-ui-jsx'\nimport {\n IconButton,\n InputAdornment,\n InputBase,\n type InputBaseProps,\n} from '@mui/material'\n\nexport interface PickerSearchFieldProps\n extends Omit<InputBaseProps, 'onChange' | 'value'> {\n value: string\n onChange: (e: { currentTarget?: { value?: string } }) => void\n}\n\n/**\n * The element picker's search input, shared by the Choose-element dialog and\n * the Elements panel (AGL-2486).\n *\n * Both surfaces get the same accessible name and the same clear affordance,\n * so a search that works in one works the same way in the other. The ranking\n * they share lives in `usePickerFilter`.\n */\nexport function PickerSearchField(props: PickerSearchFieldProps) {\n const { value, onChange, ...rest } = props\n\n return (\n <InputBase\n sx={{ flex: 1, color: 'inherit' }}\n placeholder=\"Search elements\"\n inputProps={{ 'aria-label': 'search elements' }}\n value={value}\n onChange={onChange}\n startAdornment={\n <InputAdornment sx={{ color: 'inherit' }} position=\"start\">\n <MdiIcon path={ICON_VARIANT_SEARCH.path} />\n </InputAdornment>\n }\n endAdornment={\n value ? (\n <InputAdornment sx={{ color: 'inherit' }} position=\"end\">\n <IconButton\n type=\"button\"\n color=\"inherit\"\n sx={{ p: '10px' }}\n aria-label=\"clear filter\"\n // An IconButton has no `currentTarget.value`, so the shared\n // handler reads the query as '' — the clear IS the change.\n onClick={onChange}\n >\n <MdiIcon path={ICON_VARIANT_CLEAR.path} />\n </IconButton>\n </InputAdornment>\n ) : null\n }\n {...rest}\n />\n )\n}\nPickerSearchField.displayName = 'PickerSearchField'\n\nexport default PickerSearchField\n"],"names":["ICON_VARIANT_CLEAR","ICON_VARIANT_SEARCH","MdiIcon","IconButton","InputAdornment","InputBase","PickerSearchField","props","value","onChange","rest","sx","flex","color","placeholder","inputProps","startAdornment","position","path","endAdornment","type","p","aria-label","onClick","displayName"],"mappings":";;;AAAA;;;;;;;;;;;;;;;CAeC,GAED,SAASA,kBAAkB,EAAEC,mBAAmB,QAAQ,2BAA0B;AAClF,SAASC,OAAO,QAAQ,uBAAsB;AAC9C,SACEC,UAAU,EACVC,cAAc,EACdC,SAAS,QAEJ,gBAAe;AAQtB;;;;;;;CAOC,GACD,OAAO,SAASC,kBAAkBC,KAA6B;IAC7D,MAAM,EAAEC,KAAK,EAAEC,QAAQ,EAAW,GAAGF,OAATG,wCAASH;;;;IAErC,qBACE,KAACF;QACCM,IAAI;YAAEC,MAAM;YAAGC,OAAO;QAAU;QAChCC,aAAY;QACZC,YAAY;YAAE,cAAc;QAAkB;QAC9CP,OAAOA;QACPC,UAAUA;QACVO,8BACE,KAACZ;YAAeO,IAAI;gBAAEE,OAAO;YAAU;YAAGI,UAAS;sBACjD,cAAA,KAACf;gBAAQgB,MAAMjB,oBAAoBiB,IAAI;;;QAG3CC,cACEX,sBACE,KAACJ;YAAeO,IAAI;gBAAEE,OAAO;YAAU;YAAGI,UAAS;sBACjD,cAAA,KAACd;gBACCiB,MAAK;gBACLP,OAAM;gBACNF,IAAI;oBAAEU,GAAG;gBAAO;gBAChBC,cAAW;gBACX,4DAA4D;gBAC5D,2DAA2D;gBAC3DC,SAASd;0BAET,cAAA,KAACP;oBAAQgB,MAAMlB,mBAAmBkB,IAAI;;;aAGxC;OAEFR;AAGV;AACAJ,kBAAkBkB,WAAW,GAAG;AAEhC,eAAelB,kBAAiB"}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
/** Mapper key for the attributes form (editor-internal, never persisted). */
|
|
2
|
+
export declare const PLUGIN_SETTINGS_FIELD_COMPONENT = "aglyn-plugin-settings-field";
|
|
3
|
+
/**
|
|
4
|
+
* A plugin's settings, as real fields (AGL-1049).
|
|
5
|
+
*
|
|
6
|
+
* `Plugin settings (JSON)` was a textarea: authors hand-wrote
|
|
7
|
+
* `{"title":"Spring sale"}` with no validation, no defaults, no idea which keys
|
|
8
|
+
* exist, and no feedback when a key was dropped for not being in the manifest.
|
|
9
|
+
* `filterPluginProps` drops anything undeclared, so a typo does not fail — it
|
|
10
|
+
* quietly does nothing, which is the worst of the options.
|
|
11
|
+
*
|
|
12
|
+
* The fields come from `resolvePluginPropFields`, which is driven by
|
|
13
|
+
* `capabilities.props` — THE allowlist — and merely decorated by the
|
|
14
|
+
* publisher's optional `propSchema`. So the form agrees with the filter by
|
|
15
|
+
* construction: it cannot offer a setting the plugin will not receive, and a
|
|
16
|
+
* plugin that predates `propSchema` still gets a field per declared prop as
|
|
17
|
+
* plain text rather than a blank box.
|
|
18
|
+
*
|
|
19
|
+
* ## Which plugin
|
|
20
|
+
*
|
|
21
|
+
* Read from the SIBLING `listingId` field through the form API rather than
|
|
22
|
+
* from props. The two attributes are edited in one form and the settings are
|
|
23
|
+
* meaningless without the selection, so this has to follow it live — picking a
|
|
24
|
+
* different plugin has to re-render against a different manifest, not keep
|
|
25
|
+
* showing the last one's fields.
|
|
26
|
+
*
|
|
27
|
+
* ## The escape hatch stays
|
|
28
|
+
*
|
|
29
|
+
* Raw JSON behind a toggle, per the issue: a plugin may legitimately accept a
|
|
30
|
+
* key no schema covers, and taking that away to make the generated form look
|
|
31
|
+
* tidier would remove the only way to set it. It is not the way in, though —
|
|
32
|
+
* it is the way out.
|
|
33
|
+
*/
|
|
34
|
+
export declare function PluginSettingsField(props: Record<string, unknown>): import("react").JSX.Element;
|
|
35
|
+
export declare namespace PluginSettingsField {
|
|
36
|
+
var displayName: string;
|
|
37
|
+
}
|
|
38
|
+
export default PluginSettingsField;
|