@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,157 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } 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 { ICON_VARIANT_CLOSE } from "@aglyn/shared-data-enums";
|
|
18
|
+
import { MdiIcon } from "@aglyn/shared-ui-jsx";
|
|
19
|
+
import { Box, IconButton, Paper, Popper, Typography } from "@mui/material";
|
|
20
|
+
import { useEffect } from "react";
|
|
21
|
+
import { describeElement } from "../utils/describe-element.js";
|
|
22
|
+
import ElementDetailView from "./element-detail.component.js";
|
|
23
|
+
/** Gap between the card and the panel, in px. Crossed within the close delay. */ const ANCHOR_OFFSET = 10;
|
|
24
|
+
/**
|
|
25
|
+
* The Elements panel's detail, floated out over the canvas (AGL-2486).
|
|
26
|
+
*
|
|
27
|
+
* It started as a band docked under the grid, which was the safe answer to
|
|
28
|
+
* "a tooltip must not cover what it describes" and a bad answer to
|
|
29
|
+
* everything else: a ~300px column cannot hold a preview, a description,
|
|
30
|
+
* derived facts, an attribute list and a link, so the preview came out a
|
|
31
|
+
* sliver and the prose wrapped to nothing.
|
|
32
|
+
*
|
|
33
|
+
* Floating gives it real width. What floating costs — and what makes most
|
|
34
|
+
* of these unusable — is that the content follows the pointer, so moving
|
|
35
|
+
* toward a link inside it changes what it says. That is solved in
|
|
36
|
+
* `useDetailHoverIntent`, not here: a click PINS, and a pin outranks the
|
|
37
|
+
* pointer, so everything in this panel is reachable. This component only has
|
|
38
|
+
* to not undo that, which means keeping its own pointer events live and
|
|
39
|
+
* feeding enter/leave back to the same intent state.
|
|
40
|
+
*
|
|
41
|
+
* Anchored `right-start` so it opens INTO the canvas and never covers the
|
|
42
|
+
* card being pointed at — the failure the box-styler tooltips had. Portalled,
|
|
43
|
+
* so the panel's own `overflow: auto` cannot clip it, and out of flow, so it
|
|
44
|
+
* cannot push the grid and slide the card out from under the cursor the way
|
|
45
|
+
* the docked band did.
|
|
46
|
+
*/ export function ElementDetailOverlay(props) {
|
|
47
|
+
const { item, anchor, pinned, onPointerEnter, onPointerLeave, onDismiss } = props;
|
|
48
|
+
// Escape dismisses a pinned panel — it is modeless, so it must not be a
|
|
49
|
+
// trap, and the pointer is not the way out of a pinned one.
|
|
50
|
+
useEffect(()=>{
|
|
51
|
+
if (!pinned) return;
|
|
52
|
+
const onKey = (e)=>{
|
|
53
|
+
if (e.key === 'Escape') onDismiss == null ? void 0 : onDismiss();
|
|
54
|
+
};
|
|
55
|
+
window.addEventListener('keydown', onKey);
|
|
56
|
+
return ()=>window.removeEventListener('keydown', onKey);
|
|
57
|
+
}, [
|
|
58
|
+
pinned,
|
|
59
|
+
onDismiss
|
|
60
|
+
]);
|
|
61
|
+
const detail = describeElement(item);
|
|
62
|
+
const open = Boolean(item && anchor && detail);
|
|
63
|
+
return /*#__PURE__*/ _jsx(Popper, {
|
|
64
|
+
open: open,
|
|
65
|
+
anchorEl: anchor,
|
|
66
|
+
placement: "right-start",
|
|
67
|
+
"data-testid": "element-detail-overlay",
|
|
68
|
+
modifiers: [
|
|
69
|
+
{
|
|
70
|
+
name: 'offset',
|
|
71
|
+
options: {
|
|
72
|
+
offset: [
|
|
73
|
+
0,
|
|
74
|
+
ANCHOR_OFFSET
|
|
75
|
+
]
|
|
76
|
+
}
|
|
77
|
+
},
|
|
78
|
+
// Flip only as a last resort: flipping to `left` would put the panel
|
|
79
|
+
// over the grid it came from.
|
|
80
|
+
{
|
|
81
|
+
name: 'flip',
|
|
82
|
+
options: {
|
|
83
|
+
fallbackPlacements: [
|
|
84
|
+
'right',
|
|
85
|
+
'bottom-start'
|
|
86
|
+
]
|
|
87
|
+
}
|
|
88
|
+
},
|
|
89
|
+
{
|
|
90
|
+
name: 'preventOverflow',
|
|
91
|
+
options: {
|
|
92
|
+
padding: 8
|
|
93
|
+
}
|
|
94
|
+
}
|
|
95
|
+
],
|
|
96
|
+
// BELOW modal, not above it. `tooltip` (1500) outranks `modal` (1300),
|
|
97
|
+
// so the panel painted over the element dialog's own backdrop. Anything
|
|
98
|
+
// that floats over the canvas has to lose to a dialog, or it becomes a
|
|
99
|
+
// bug for every modal added after it. Taken from the theme scale rather
|
|
100
|
+
// than written as a literal, so it moves if the scale does.
|
|
101
|
+
sx: {
|
|
102
|
+
zIndex: (theme)=>theme.zIndex.modal - 1
|
|
103
|
+
},
|
|
104
|
+
onMouseEnter: onPointerEnter,
|
|
105
|
+
onMouseLeave: onPointerLeave,
|
|
106
|
+
children: /*#__PURE__*/ _jsxs(Paper, {
|
|
107
|
+
elevation: 8,
|
|
108
|
+
sx: {
|
|
109
|
+
// Floating means it is no longer bounded by a ~300px dock, so it
|
|
110
|
+
// takes the room. Width is what actually enlarges the preview:
|
|
111
|
+
// the stage composes at a desktop width and scales to fit, so a
|
|
112
|
+
// wider panel is a bigger picture, not just more whitespace.
|
|
113
|
+
width: 460,
|
|
114
|
+
maxHeight: '78vh',
|
|
115
|
+
overflowY: 'auto',
|
|
116
|
+
p: 1.5,
|
|
117
|
+
border: 1,
|
|
118
|
+
borderColor: 'divider'
|
|
119
|
+
},
|
|
120
|
+
children: [
|
|
121
|
+
pinned ? /*#__PURE__*/ _jsxs(Box, {
|
|
122
|
+
sx: {
|
|
123
|
+
display: 'flex',
|
|
124
|
+
alignItems: 'center',
|
|
125
|
+
justifyContent: 'space-between',
|
|
126
|
+
mb: 0.5
|
|
127
|
+
},
|
|
128
|
+
children: [
|
|
129
|
+
/*#__PURE__*/ _jsx(Typography, {
|
|
130
|
+
variant: "caption",
|
|
131
|
+
color: "textSecondary",
|
|
132
|
+
children: 'Pinned — click the element again to release'
|
|
133
|
+
}),
|
|
134
|
+
/*#__PURE__*/ _jsx(IconButton, {
|
|
135
|
+
size: "small",
|
|
136
|
+
"aria-label": "close element detail",
|
|
137
|
+
onClick: onDismiss,
|
|
138
|
+
children: /*#__PURE__*/ _jsx(MdiIcon, {
|
|
139
|
+
path: ICON_VARIANT_CLOSE.path,
|
|
140
|
+
fontSize: "inherit"
|
|
141
|
+
})
|
|
142
|
+
})
|
|
143
|
+
]
|
|
144
|
+
}) : null,
|
|
145
|
+
/*#__PURE__*/ _jsx(ElementDetailView, {
|
|
146
|
+
detail: detail,
|
|
147
|
+
node: item,
|
|
148
|
+
previewHeight: 300
|
|
149
|
+
})
|
|
150
|
+
]
|
|
151
|
+
})
|
|
152
|
+
});
|
|
153
|
+
}
|
|
154
|
+
ElementDetailOverlay.displayName = 'ElementDetailOverlay';
|
|
155
|
+
export default ElementDetailOverlay;
|
|
156
|
+
|
|
157
|
+
//# sourceMappingURL=element-detail-overlay.component.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../../../../../../libs/besigner/feature/designer/src/lib/components/element-detail-overlay.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 { ICON_VARIANT_CLOSE } from '@aglyn/shared-data-enums'\nimport { MdiIcon } from '@aglyn/shared-ui-jsx'\nimport { Box, IconButton, Paper, Popper, Typography } from '@mui/material'\nimport { useEffect } from 'react'\nimport { describeElement } from '../utils/describe-element'\nimport ElementDetailView from './element-detail.component'\n\n/** Gap between the card and the panel, in px. Crossed within the close delay. */\nconst ANCHOR_OFFSET = 10\n\nexport interface ElementDetailOverlayProps {\n /** The picker item to describe, or null when nothing is active. */\n item: any\n /** The card the panel points at. */\n anchor: HTMLElement | null\n /** Held open by a click rather than by the pointer. */\n pinned?: boolean\n onPointerEnter?: () => void\n onPointerLeave?: () => void\n onDismiss?: () => void\n}\n\n/**\n * The Elements panel's detail, floated out over the canvas (AGL-2486).\n *\n * It started as a band docked under the grid, which was the safe answer to\n * \"a tooltip must not cover what it describes\" and a bad answer to\n * everything else: a ~300px column cannot hold a preview, a description,\n * derived facts, an attribute list and a link, so the preview came out a\n * sliver and the prose wrapped to nothing.\n *\n * Floating gives it real width. What floating costs — and what makes most\n * of these unusable — is that the content follows the pointer, so moving\n * toward a link inside it changes what it says. That is solved in\n * `useDetailHoverIntent`, not here: a click PINS, and a pin outranks the\n * pointer, so everything in this panel is reachable. This component only has\n * to not undo that, which means keeping its own pointer events live and\n * feeding enter/leave back to the same intent state.\n *\n * Anchored `right-start` so it opens INTO the canvas and never covers the\n * card being pointed at — the failure the box-styler tooltips had. Portalled,\n * so the panel's own `overflow: auto` cannot clip it, and out of flow, so it\n * cannot push the grid and slide the card out from under the cursor the way\n * the docked band did.\n */\nexport function ElementDetailOverlay(props: ElementDetailOverlayProps) {\n const { item, anchor, pinned, onPointerEnter, onPointerLeave, onDismiss } =\n props\n\n // Escape dismisses a pinned panel — it is modeless, so it must not be a\n // trap, and the pointer is not the way out of a pinned one.\n useEffect(() => {\n if (!pinned) return\n const onKey = (e: KeyboardEvent) => {\n if (e.key === 'Escape') onDismiss?.()\n }\n window.addEventListener('keydown', onKey)\n return () => window.removeEventListener('keydown', onKey)\n }, [pinned, onDismiss])\n\n const detail = describeElement(item)\n const open = Boolean(item && anchor && detail)\n\n return (\n <Popper\n open={open}\n anchorEl={anchor}\n placement=\"right-start\"\n data-testid=\"element-detail-overlay\"\n modifiers={[\n { name: 'offset', options: { offset: [0, ANCHOR_OFFSET] } },\n // Flip only as a last resort: flipping to `left` would put the panel\n // over the grid it came from.\n { name: 'flip', options: { fallbackPlacements: ['right', 'bottom-start'] } },\n { name: 'preventOverflow', options: { padding: 8 } },\n ]}\n // BELOW modal, not above it. `tooltip` (1500) outranks `modal` (1300),\n // so the panel painted over the element dialog's own backdrop. Anything\n // that floats over the canvas has to lose to a dialog, or it becomes a\n // bug for every modal added after it. Taken from the theme scale rather\n // than written as a literal, so it moves if the scale does.\n sx={{ zIndex: (theme) => theme.zIndex.modal - 1 }}\n onMouseEnter={onPointerEnter}\n onMouseLeave={onPointerLeave}\n >\n <Paper\n elevation={8}\n sx={{\n // Floating means it is no longer bounded by a ~300px dock, so it\n // takes the room. Width is what actually enlarges the preview:\n // the stage composes at a desktop width and scales to fit, so a\n // wider panel is a bigger picture, not just more whitespace.\n width: 460,\n maxHeight: '78vh',\n overflowY: 'auto',\n p: 1.5,\n border: 1,\n borderColor: 'divider',\n }}\n >\n {pinned ? (\n <Box\n sx={{\n display: 'flex',\n alignItems: 'center',\n justifyContent: 'space-between',\n mb: 0.5,\n }}\n >\n <Typography variant=\"caption\" color=\"textSecondary\">\n {'Pinned — click the element again to release'}\n </Typography>\n <IconButton\n size=\"small\"\n aria-label=\"close element detail\"\n onClick={onDismiss}\n >\n <MdiIcon path={ICON_VARIANT_CLOSE.path} fontSize=\"inherit\" />\n </IconButton>\n </Box>\n ) : null}\n {/* The same content component the dialog renders — one description of\n an element, two placements. */}\n <ElementDetailView detail={detail} node={item} previewHeight={300} />\n </Paper>\n </Popper>\n )\n}\nElementDetailOverlay.displayName = 'ElementDetailOverlay'\n\nexport default ElementDetailOverlay\n"],"names":["ICON_VARIANT_CLOSE","MdiIcon","Box","IconButton","Paper","Popper","Typography","useEffect","describeElement","ElementDetailView","ANCHOR_OFFSET","ElementDetailOverlay","props","item","anchor","pinned","onPointerEnter","onPointerLeave","onDismiss","onKey","e","key","window","addEventListener","removeEventListener","detail","open","Boolean","anchorEl","placement","data-testid","modifiers","name","options","offset","fallbackPlacements","padding","sx","zIndex","theme","modal","onMouseEnter","onMouseLeave","elevation","width","maxHeight","overflowY","p","border","borderColor","display","alignItems","justifyContent","mb","variant","color","size","aria-label","onClick","path","fontSize","node","previewHeight","displayName"],"mappings":";AAAA;;;;;;;;;;;;;;;CAeC,GAED,SAASA,kBAAkB,QAAQ,2BAA0B;AAC7D,SAASC,OAAO,QAAQ,uBAAsB;AAC9C,SAASC,GAAG,EAAEC,UAAU,EAAEC,KAAK,EAAEC,MAAM,EAAEC,UAAU,QAAQ,gBAAe;AAC1E,SAASC,SAAS,QAAQ,QAAO;AACjC,SAASC,eAAe,QAAQ,+BAA2B;AAC3D,OAAOC,uBAAuB,gCAA4B;AAE1D,+EAA+E,GAC/E,MAAMC,gBAAgB;AActB;;;;;;;;;;;;;;;;;;;;;;CAsBC,GACD,OAAO,SAASC,qBAAqBC,KAAgC;IACnE,MAAM,EAAEC,IAAI,EAAEC,MAAM,EAAEC,MAAM,EAAEC,cAAc,EAAEC,cAAc,EAAEC,SAAS,EAAE,GACvEN;IAEF,wEAAwE;IACxE,4DAA4D;IAC5DL,UAAU;QACR,IAAI,CAACQ,QAAQ;QACb,MAAMI,QAAQ,CAACC;YACb,IAAIA,EAAEC,GAAG,KAAK,UAAUH,6BAAAA;QAC1B;QACAI,OAAOC,gBAAgB,CAAC,WAAWJ;QACnC,OAAO,IAAMG,OAAOE,mBAAmB,CAAC,WAAWL;IACrD,GAAG;QAACJ;QAAQG;KAAU;IAEtB,MAAMO,SAASjB,gBAAgBK;IAC/B,MAAMa,OAAOC,QAAQd,QAAQC,UAAUW;IAEvC,qBACE,KAACpB;QACCqB,MAAMA;QACNE,UAAUd;QACVe,WAAU;QACVC,eAAY;QACZC,WAAW;YACT;gBAAEC,MAAM;gBAAUC,SAAS;oBAAEC,QAAQ;wBAAC;wBAAGxB;qBAAc;gBAAC;YAAE;YAC1D,qEAAqE;YACrE,8BAA8B;YAC9B;gBAAEsB,MAAM;gBAAQC,SAAS;oBAAEE,oBAAoB;wBAAC;wBAAS;qBAAe;gBAAC;YAAE;YAC3E;gBAAEH,MAAM;gBAAmBC,SAAS;oBAAEG,SAAS;gBAAE;YAAE;SACpD;QACD,uEAAuE;QACvE,wEAAwE;QACxE,uEAAuE;QACvE,wEAAwE;QACxE,4DAA4D;QAC5DC,IAAI;YAAEC,QAAQ,CAACC,QAAUA,MAAMD,MAAM,CAACE,KAAK,GAAG;QAAE;QAChDC,cAAczB;QACd0B,cAAczB;kBAEd,cAAA,MAACb;YACCuC,WAAW;YACXN,IAAI;gBACF,iEAAiE;gBACjE,+DAA+D;gBAC/D,gEAAgE;gBAChE,6DAA6D;gBAC7DO,OAAO;gBACPC,WAAW;gBACXC,WAAW;gBACXC,GAAG;gBACHC,QAAQ;gBACRC,aAAa;YACf;;gBAEClC,uBACC,MAACb;oBACCmC,IAAI;wBACFa,SAAS;wBACTC,YAAY;wBACZC,gBAAgB;wBAChBC,IAAI;oBACN;;sCAEA,KAAC/C;4BAAWgD,SAAQ;4BAAUC,OAAM;sCACjC;;sCAEH,KAACpD;4BACCqD,MAAK;4BACLC,cAAW;4BACXC,SAASxC;sCAET,cAAA,KAACjB;gCAAQ0D,MAAM3D,mBAAmB2D,IAAI;gCAAEC,UAAS;;;;qBAGnD;8BAGJ,KAACnD;oBAAkBgB,QAAQA;oBAAQoC,MAAMhD;oBAAMiD,eAAe;;;;;AAItE;AACAnD,qBAAqBoD,WAAW,GAAG;AAEnC,eAAepD,qBAAoB"}
|
|
@@ -0,0 +1,56 @@
|
|
|
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 { ElementDetail } from '../utils/describe-element';
|
|
18
|
+
export interface ElementDetailViewProps {
|
|
19
|
+
detail: ElementDetail | null;
|
|
20
|
+
/**
|
|
21
|
+
* Narrow presentation for the docked Elements column. Same CONTENT either
|
|
22
|
+
* way — the content is designed once and the two surfaces present it
|
|
23
|
+
* differently, rather than there being two detail views to keep in step.
|
|
24
|
+
*/
|
|
25
|
+
dense?: boolean;
|
|
26
|
+
/**
|
|
27
|
+
* Height the preview may take. Both surfaces now float or pane the detail,
|
|
28
|
+
* so the preview is no longer squeezed into whatever the text leaves — it
|
|
29
|
+
* gets the room, because it is the part that needs it.
|
|
30
|
+
*/
|
|
31
|
+
previewHeight?: number;
|
|
32
|
+
/**
|
|
33
|
+
* The picker item itself, when the surface wants a rendered preview above
|
|
34
|
+
* the text. Only ever the one selected or hovered element — the detail
|
|
35
|
+
* region is single-tenant by construction, so the preview is too.
|
|
36
|
+
*/
|
|
37
|
+
node?: any;
|
|
38
|
+
}
|
|
39
|
+
/**
|
|
40
|
+
* What a selected element actually is, shown before you commit to it
|
|
41
|
+
* (AGL-2486).
|
|
42
|
+
*
|
|
43
|
+
* Deliberately a DOCKED REGION rather than a hover popup. A popup over the
|
|
44
|
+
* grid would have to solve three problems this does not have: it can swallow
|
|
45
|
+
* the click meant for the card beneath it, it can cover the very item you
|
|
46
|
+
* are pointing at, and several can open at once. A region that lives outside
|
|
47
|
+
* the grid cannot do any of those by construction.
|
|
48
|
+
*
|
|
49
|
+
* Everything under the description is DERIVED from the schema, so it cannot
|
|
50
|
+
* go stale and third-party elements get it for free.
|
|
51
|
+
*/
|
|
52
|
+
export declare function ElementDetailView(props: ElementDetailViewProps): import("react").JSX.Element;
|
|
53
|
+
export declare namespace ElementDetailView {
|
|
54
|
+
var displayName: string;
|
|
55
|
+
}
|
|
56
|
+
export default ElementDetailView;
|
|
@@ -0,0 +1,171 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } 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 { Box, Chip, Link, Stack, Typography } from "@mui/material";
|
|
18
|
+
import ElementPreview from "./element-preview.component.js";
|
|
19
|
+
import { besignerDocsUrl } from "../utils/docs-help.js";
|
|
20
|
+
/**
|
|
21
|
+
* Element category → its section of the element catalog page.
|
|
22
|
+
*
|
|
23
|
+
* The catalog's H2s ARE the drawer's categories, so the deep link is derived
|
|
24
|
+
* rather than mapped by hand per element — 45+ hand-written anchors would be
|
|
25
|
+
* 45+ things to get wrong. A category with no section (plugin-registered
|
|
26
|
+
* labels, "Your components") lands on the page itself, which is correct
|
|
27
|
+
* rather than broken.
|
|
28
|
+
*/ const CATALOG_ANCHORS = {
|
|
29
|
+
Layout: '#layout',
|
|
30
|
+
Surface: '#surface',
|
|
31
|
+
Navigation: '#navigation',
|
|
32
|
+
Text: '#text',
|
|
33
|
+
'Data Display': '#data-display',
|
|
34
|
+
Media: '#media',
|
|
35
|
+
Forms: '#forms-input-commerce-members',
|
|
36
|
+
Input: '#forms-input-commerce-members',
|
|
37
|
+
Commerce: '#forms-input-commerce-members',
|
|
38
|
+
Members: '#forms-input-commerce-members'
|
|
39
|
+
};
|
|
40
|
+
/**
|
|
41
|
+
* What a selected element actually is, shown before you commit to it
|
|
42
|
+
* (AGL-2486).
|
|
43
|
+
*
|
|
44
|
+
* Deliberately a DOCKED REGION rather than a hover popup. A popup over the
|
|
45
|
+
* grid would have to solve three problems this does not have: it can swallow
|
|
46
|
+
* the click meant for the card beneath it, it can cover the very item you
|
|
47
|
+
* are pointing at, and several can open at once. A region that lives outside
|
|
48
|
+
* the grid cannot do any of those by construction.
|
|
49
|
+
*
|
|
50
|
+
* Everything under the description is DERIVED from the schema, so it cannot
|
|
51
|
+
* go stale and third-party elements get it for free.
|
|
52
|
+
*/ export function ElementDetailView(props) {
|
|
53
|
+
var _detail_category;
|
|
54
|
+
const { detail, dense, node, previewHeight } = props;
|
|
55
|
+
if (!detail) return null;
|
|
56
|
+
return /*#__PURE__*/ _jsxs(Stack, {
|
|
57
|
+
spacing: dense ? 0.5 : 0.75,
|
|
58
|
+
sx: {
|
|
59
|
+
minWidth: 0,
|
|
60
|
+
width: 1
|
|
61
|
+
},
|
|
62
|
+
"aria-live": "polite",
|
|
63
|
+
"data-testid": "element-detail",
|
|
64
|
+
children: [
|
|
65
|
+
node ? /*#__PURE__*/ _jsx(ElementPreview, {
|
|
66
|
+
node: node,
|
|
67
|
+
height: previewHeight != null ? previewHeight : dense ? 116 : 168,
|
|
68
|
+
requiredParents: detail.requiredParents
|
|
69
|
+
}) : null,
|
|
70
|
+
/*#__PURE__*/ _jsxs(Stack, {
|
|
71
|
+
direction: "row",
|
|
72
|
+
spacing: 1,
|
|
73
|
+
sx: {
|
|
74
|
+
alignItems: 'center',
|
|
75
|
+
minWidth: 0
|
|
76
|
+
},
|
|
77
|
+
children: [
|
|
78
|
+
/*#__PURE__*/ _jsx(Typography, {
|
|
79
|
+
variant: dense ? 'subtitle2' : 'subtitle1',
|
|
80
|
+
noWrap: true,
|
|
81
|
+
sx: {
|
|
82
|
+
textOverflow: 'ellipsis',
|
|
83
|
+
fontWeight: 'fontWeightMedium'
|
|
84
|
+
},
|
|
85
|
+
children: detail.name
|
|
86
|
+
}),
|
|
87
|
+
detail.category ? /*#__PURE__*/ _jsx(Chip, {
|
|
88
|
+
size: "small",
|
|
89
|
+
variant: "outlined",
|
|
90
|
+
label: detail.category,
|
|
91
|
+
sx: {
|
|
92
|
+
textTransform: 'capitalize',
|
|
93
|
+
flex: '0 0 auto'
|
|
94
|
+
}
|
|
95
|
+
}) : null
|
|
96
|
+
]
|
|
97
|
+
}),
|
|
98
|
+
detail.description ? /*#__PURE__*/ _jsx(Typography, {
|
|
99
|
+
variant: "caption",
|
|
100
|
+
color: "textSecondary",
|
|
101
|
+
children: detail.description
|
|
102
|
+
}) : null,
|
|
103
|
+
/*#__PURE__*/ _jsx(Box, {
|
|
104
|
+
component: "ul",
|
|
105
|
+
sx: {
|
|
106
|
+
m: 0,
|
|
107
|
+
pl: 0,
|
|
108
|
+
listStyle: 'none'
|
|
109
|
+
},
|
|
110
|
+
children: detail.facts.map((fact)=>/*#__PURE__*/ _jsxs(Stack, {
|
|
111
|
+
component: "li",
|
|
112
|
+
direction: "row",
|
|
113
|
+
spacing: 0.5,
|
|
114
|
+
sx: {
|
|
115
|
+
alignItems: 'flex-start'
|
|
116
|
+
},
|
|
117
|
+
children: [
|
|
118
|
+
/*#__PURE__*/ _jsx(Box, {
|
|
119
|
+
"aria-hidden": true,
|
|
120
|
+
sx: {
|
|
121
|
+
flex: '0 0 auto',
|
|
122
|
+
width: 4,
|
|
123
|
+
height: 4,
|
|
124
|
+
mt: '0.45em',
|
|
125
|
+
borderRadius: '50%',
|
|
126
|
+
backgroundColor: 'text.disabled'
|
|
127
|
+
}
|
|
128
|
+
}),
|
|
129
|
+
/*#__PURE__*/ _jsx(Typography, {
|
|
130
|
+
variant: "caption",
|
|
131
|
+
color: "textSecondary",
|
|
132
|
+
children: fact.label
|
|
133
|
+
})
|
|
134
|
+
]
|
|
135
|
+
}, fact.id))
|
|
136
|
+
}),
|
|
137
|
+
detail.attributes.length ? /*#__PURE__*/ _jsxs(Typography, {
|
|
138
|
+
variant: "caption",
|
|
139
|
+
color: "textSecondary",
|
|
140
|
+
sx: {
|
|
141
|
+
mt: 0.25
|
|
142
|
+
},
|
|
143
|
+
children: [
|
|
144
|
+
/*#__PURE__*/ _jsx(Box, {
|
|
145
|
+
component: "span",
|
|
146
|
+
sx: {
|
|
147
|
+
fontWeight: 'fontWeightMedium'
|
|
148
|
+
},
|
|
149
|
+
children: 'Attributes: '
|
|
150
|
+
}),
|
|
151
|
+
detail.attributes.slice(0, dense ? 4 : 8).join(', '),
|
|
152
|
+
detail.attributes.length > (dense ? 4 : 8) ? '…' : ''
|
|
153
|
+
]
|
|
154
|
+
}) : null,
|
|
155
|
+
/*#__PURE__*/ _jsx(Link, {
|
|
156
|
+
href: besignerDocsUrl('elementCatalog', CATALOG_ANCHORS[(_detail_category = detail.category) != null ? _detail_category : '']),
|
|
157
|
+
target: "_blank",
|
|
158
|
+
rel: "noopener noreferrer",
|
|
159
|
+
variant: "caption",
|
|
160
|
+
sx: {
|
|
161
|
+
fontWeight: 600
|
|
162
|
+
},
|
|
163
|
+
children: 'Learn more'
|
|
164
|
+
})
|
|
165
|
+
]
|
|
166
|
+
});
|
|
167
|
+
}
|
|
168
|
+
ElementDetailView.displayName = 'ElementDetailView';
|
|
169
|
+
export default ElementDetailView;
|
|
170
|
+
|
|
171
|
+
//# sourceMappingURL=element-detail.component.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../../../../../../libs/besigner/feature/designer/src/lib/components/element-detail.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 { Box, Chip, Link, Stack, Typography } from '@mui/material'\nimport type { ElementDetail } from '../utils/describe-element'\nimport ElementPreview from './element-preview.component'\nimport { besignerDocsUrl, type BesignerDocsAnchor } from '../utils/docs-help'\n\n/**\n * Element category → its section of the element catalog page.\n *\n * The catalog's H2s ARE the drawer's categories, so the deep link is derived\n * rather than mapped by hand per element — 45+ hand-written anchors would be\n * 45+ things to get wrong. A category with no section (plugin-registered\n * labels, \"Your components\") lands on the page itself, which is correct\n * rather than broken.\n */\nconst CATALOG_ANCHORS: Record<string, BesignerDocsAnchor<'elementCatalog'>> = {\n Layout: '#layout',\n Surface: '#surface',\n Navigation: '#navigation',\n Text: '#text',\n 'Data Display': '#data-display',\n Media: '#media',\n Forms: '#forms-input-commerce-members',\n Input: '#forms-input-commerce-members',\n Commerce: '#forms-input-commerce-members',\n Members: '#forms-input-commerce-members',\n}\n\nexport interface ElementDetailViewProps {\n detail: ElementDetail | null\n /**\n * Narrow presentation for the docked Elements column. Same CONTENT either\n * way — the content is designed once and the two surfaces present it\n * differently, rather than there being two detail views to keep in step.\n */\n dense?: boolean\n /**\n * Height the preview may take. Both surfaces now float or pane the detail,\n * so the preview is no longer squeezed into whatever the text leaves — it\n * gets the room, because it is the part that needs it.\n */\n previewHeight?: number\n /**\n * The picker item itself, when the surface wants a rendered preview above\n * the text. Only ever the one selected or hovered element — the detail\n * region is single-tenant by construction, so the preview is too.\n */\n node?: any\n}\n\n/**\n * What a selected element actually is, shown before you commit to it\n * (AGL-2486).\n *\n * Deliberately a DOCKED REGION rather than a hover popup. A popup over the\n * grid would have to solve three problems this does not have: it can swallow\n * the click meant for the card beneath it, it can cover the very item you\n * are pointing at, and several can open at once. A region that lives outside\n * the grid cannot do any of those by construction.\n *\n * Everything under the description is DERIVED from the schema, so it cannot\n * go stale and third-party elements get it for free.\n */\nexport function ElementDetailView(props: ElementDetailViewProps) {\n const { detail, dense, node, previewHeight } = props\n if (!detail) return null\n\n return (\n <Stack\n spacing={dense ? 0.5 : 0.75}\n sx={{ minWidth: 0, width: 1 }}\n aria-live=\"polite\"\n data-testid=\"element-detail\"\n >\n {node ? (\n <ElementPreview\n node={node}\n height={previewHeight ?? (dense ? 116 : 168)}\n requiredParents={detail.requiredParents}\n />\n ) : null}\n\n <Stack\n direction=\"row\"\n spacing={1}\n sx={{ alignItems: 'center', minWidth: 0 }}\n >\n <Typography\n variant={dense ? 'subtitle2' : 'subtitle1'}\n noWrap\n sx={{ textOverflow: 'ellipsis', fontWeight: 'fontWeightMedium' }}\n >\n {detail.name}\n </Typography>\n {detail.category ? (\n <Chip\n size=\"small\"\n variant=\"outlined\"\n label={detail.category}\n sx={{ textTransform: 'capitalize', flex: '0 0 auto' }}\n />\n ) : null}\n </Stack>\n\n {detail.description ? (\n <Typography variant=\"caption\" color=\"textSecondary\">\n {detail.description}\n </Typography>\n ) : null}\n\n {/* Derived facts. No heading — in a narrow column a heading costs a\n line and explains nothing the list does not. */}\n <Box component=\"ul\" sx={{ m: 0, pl: 0, listStyle: 'none' }}>\n {detail.facts.map((fact) => (\n <Stack\n key={fact.id}\n component=\"li\"\n direction=\"row\"\n spacing={0.5}\n sx={{ alignItems: 'flex-start' }}\n >\n <Box\n aria-hidden\n sx={{\n flex: '0 0 auto',\n width: 4,\n height: 4,\n mt: '0.45em',\n borderRadius: '50%',\n backgroundColor: 'text.disabled',\n }}\n />\n <Typography variant=\"caption\" color=\"textSecondary\">\n {fact.label}\n </Typography>\n </Stack>\n ))}\n </Box>\n\n {detail.attributes.length ? (\n <Typography variant=\"caption\" color=\"textSecondary\" sx={{ mt: 0.25 }}>\n <Box component=\"span\" sx={{ fontWeight: 'fontWeightMedium' }}>\n {'Attributes: '}\n </Box>\n {detail.attributes.slice(0, dense ? 4 : 8).join(', ')}\n {detail.attributes.length > (dense ? 4 : 8) ? '…' : ''}\n </Typography>\n ) : null}\n\n {/* Links to the catalog rather than restating it. Duplicated\n documentation drifts, and the docs page is the thing that is\n actually maintained. */}\n <Link\n href={besignerDocsUrl(\n 'elementCatalog',\n CATALOG_ANCHORS[detail.category ?? ''],\n )}\n target=\"_blank\"\n rel=\"noopener noreferrer\"\n variant=\"caption\"\n sx={{ fontWeight: 600 }}\n >\n {'Learn more'}\n </Link>\n </Stack>\n )\n}\nElementDetailView.displayName = 'ElementDetailView'\n\nexport default ElementDetailView\n"],"names":["Box","Chip","Link","Stack","Typography","ElementPreview","besignerDocsUrl","CATALOG_ANCHORS","Layout","Surface","Navigation","Text","Media","Forms","Input","Commerce","Members","ElementDetailView","props","detail","dense","node","previewHeight","spacing","sx","minWidth","width","aria-live","data-testid","height","requiredParents","direction","alignItems","variant","noWrap","textOverflow","fontWeight","name","category","size","label","textTransform","flex","description","color","component","m","pl","listStyle","facts","map","fact","aria-hidden","mt","borderRadius","backgroundColor","id","attributes","length","slice","join","href","target","rel","displayName"],"mappings":"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"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import type * as Aglyn from '@aglyn/aglyn';
|
|
2
|
+
/**
|
|
3
|
+
* What this element IS, at the bottom of Attributes.
|
|
4
|
+
*
|
|
5
|
+
* Two collapsed accordions: the component's own description, and the
|
|
6
|
+
* element / parent / component / plugin ids. Reference detail — worth having
|
|
7
|
+
* when a name is ambiguous or an id has to be quoted in a bug report, and not
|
|
8
|
+
* worth the tab it used to occupy. Beside the fields it describes it costs a
|
|
9
|
+
* reader nothing until they open it; as a tab it cost every reader a third of
|
|
10
|
+
* the panel's header.
|
|
11
|
+
*/
|
|
12
|
+
export declare function ElementInfoDetails({ node, }: {
|
|
13
|
+
node: Aglyn.NodeSchema<any>;
|
|
14
|
+
}): import("react").JSX.Element;
|
|
15
|
+
export declare namespace ElementInfoDetails {
|
|
16
|
+
var displayName: string;
|
|
17
|
+
}
|
|
18
|
+
export default ElementInfoDetails;
|
|
@@ -0,0 +1,169 @@
|
|
|
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
|
+
*/ 'use client';
|
|
17
|
+
import { _ as _extends } from "@swc/helpers/_/_extends";
|
|
18
|
+
import { _ as _object_without_properties_loose } from "@swc/helpers/_/_object_without_properties_loose";
|
|
19
|
+
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
20
|
+
import { components } from "@aglyn/aglyn";
|
|
21
|
+
import { mergeSxProps } from "@aglyn/shared-ui-theme";
|
|
22
|
+
import { Typography } from "@mui/material";
|
|
23
|
+
import { useMemo, useState } from "react";
|
|
24
|
+
import AccordionListComponent from "./accordion-list.component.js";
|
|
25
|
+
/**
|
|
26
|
+
* What this element IS, at the bottom of Attributes.
|
|
27
|
+
*
|
|
28
|
+
* Two collapsed accordions: the component's own description, and the
|
|
29
|
+
* element / parent / component / plugin ids. Reference detail — worth having
|
|
30
|
+
* when a name is ambiguous or an id has to be quoted in a bug report, and not
|
|
31
|
+
* worth the tab it used to occupy. Beside the fields it describes it costs a
|
|
32
|
+
* reader nothing until they open it; as a tab it cost every reader a third of
|
|
33
|
+
* the panel's header.
|
|
34
|
+
*/ export function ElementInfoDetails({ node }) {
|
|
35
|
+
const schema = components.getSchema(node == null ? void 0 : node.componentId);
|
|
36
|
+
const failoverText = 'n/a';
|
|
37
|
+
const details = useMemo(()=>[
|
|
38
|
+
{
|
|
39
|
+
key: 'element-overview',
|
|
40
|
+
label: 'Element Overview',
|
|
41
|
+
items: [
|
|
42
|
+
{
|
|
43
|
+
key: 'component-display-name',
|
|
44
|
+
label: 'Type',
|
|
45
|
+
value: schema == null ? void 0 : schema.displayName
|
|
46
|
+
},
|
|
47
|
+
{
|
|
48
|
+
key: 'component-title',
|
|
49
|
+
label: 'Title',
|
|
50
|
+
value: schema == null ? void 0 : schema.title
|
|
51
|
+
},
|
|
52
|
+
{
|
|
53
|
+
key: 'component-subtitle',
|
|
54
|
+
label: 'Subtitle',
|
|
55
|
+
value: schema == null ? void 0 : schema.subtitle
|
|
56
|
+
},
|
|
57
|
+
{
|
|
58
|
+
key: 'component-description',
|
|
59
|
+
label: 'Description',
|
|
60
|
+
value: schema == null ? void 0 : schema.description,
|
|
61
|
+
TypographyProps: {
|
|
62
|
+
gutterBottom: true
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
]
|
|
66
|
+
},
|
|
67
|
+
{
|
|
68
|
+
key: 'unique-identifiers',
|
|
69
|
+
label: 'Unique Identifiers',
|
|
70
|
+
items: [
|
|
71
|
+
{
|
|
72
|
+
key: 'element-id',
|
|
73
|
+
label: 'Element ID',
|
|
74
|
+
value: node.$id
|
|
75
|
+
},
|
|
76
|
+
{
|
|
77
|
+
key: 'parent-id',
|
|
78
|
+
label: 'Parent Element ID',
|
|
79
|
+
value: node == null ? void 0 : node.parentId
|
|
80
|
+
},
|
|
81
|
+
{
|
|
82
|
+
key: 'component-id',
|
|
83
|
+
label: 'Component ID',
|
|
84
|
+
value: node == null ? void 0 : node.componentId
|
|
85
|
+
},
|
|
86
|
+
{
|
|
87
|
+
key: 'plugin-id',
|
|
88
|
+
label: 'Add-on ID',
|
|
89
|
+
value: node == null ? void 0 : node.pluginId,
|
|
90
|
+
ValueTypographyProps: {}
|
|
91
|
+
}
|
|
92
|
+
]
|
|
93
|
+
}
|
|
94
|
+
], [
|
|
95
|
+
schema,
|
|
96
|
+
node
|
|
97
|
+
]);
|
|
98
|
+
const [expanded, setExpanded] = useState(details[0].key);
|
|
99
|
+
const handleChange = (panel)=>(event, newExpanded)=>{
|
|
100
|
+
setExpanded(newExpanded ? panel : false);
|
|
101
|
+
};
|
|
102
|
+
return /*#__PURE__*/ _jsx(_Fragment, {
|
|
103
|
+
children: /*#__PURE__*/ _jsx(AccordionListComponent, {
|
|
104
|
+
items: details,
|
|
105
|
+
getItemId: (item)=>item.key,
|
|
106
|
+
onRenderSummary: ({ item })=>/*#__PURE__*/ _jsx(_Fragment, {
|
|
107
|
+
children: item == null ? void 0 : item.label
|
|
108
|
+
}),
|
|
109
|
+
onRenderDetail: ({ item })=>{
|
|
110
|
+
var _item_items;
|
|
111
|
+
return /*#__PURE__*/ _jsx(_Fragment, {
|
|
112
|
+
children: item == null ? void 0 : (_item_items = item.items) == null ? void 0 : _item_items.map((_0)=>{
|
|
113
|
+
let { label, value, TypographyProps, ValueTypographyProps } = _0, item = _object_without_properties_loose(_0, [
|
|
114
|
+
"label",
|
|
115
|
+
"value",
|
|
116
|
+
"TypographyProps",
|
|
117
|
+
"ValueTypographyProps"
|
|
118
|
+
]);
|
|
119
|
+
return /*#__PURE__*/ _jsxs(Typography, _extends({
|
|
120
|
+
component: "div"
|
|
121
|
+
}, TypographyProps, {
|
|
122
|
+
children: [
|
|
123
|
+
/*#__PURE__*/ _jsx(Typography, {
|
|
124
|
+
variant: "caption",
|
|
125
|
+
sx: {
|
|
126
|
+
display: 'inline',
|
|
127
|
+
textTransform: 'uppercase'
|
|
128
|
+
},
|
|
129
|
+
children: /*#__PURE__*/ _jsxs("b", {
|
|
130
|
+
children: [
|
|
131
|
+
label,
|
|
132
|
+
":"
|
|
133
|
+
]
|
|
134
|
+
})
|
|
135
|
+
}),
|
|
136
|
+
' ',
|
|
137
|
+
/*#__PURE__*/ _jsx(Typography, _extends({
|
|
138
|
+
variant: "body1"
|
|
139
|
+
}, ValueTypographyProps, {
|
|
140
|
+
sx: mergeSxProps((theme)=>{
|
|
141
|
+
const tv = theme.vars || theme;
|
|
142
|
+
return {
|
|
143
|
+
bgcolor: `rgba(${tv.palette.primary.lightChannel} / 0.18)`,
|
|
144
|
+
border: `1px solid rgba(${tv.palette.primary.lightChannel} / 0.72)`,
|
|
145
|
+
borderRadius: '0.3em',
|
|
146
|
+
px: 0.5,
|
|
147
|
+
py: 0.15,
|
|
148
|
+
wordBreak: 'break-word',
|
|
149
|
+
fontSize: '0.8rem'
|
|
150
|
+
};
|
|
151
|
+
}, {
|
|
152
|
+
display: 'inline'
|
|
153
|
+
}, ValueTypographyProps == null ? void 0 : ValueTypographyProps.sx),
|
|
154
|
+
children: value || /*#__PURE__*/ _jsx("i", {
|
|
155
|
+
children: failoverText
|
|
156
|
+
})
|
|
157
|
+
}))
|
|
158
|
+
]
|
|
159
|
+
}), item.key);
|
|
160
|
+
})
|
|
161
|
+
});
|
|
162
|
+
}
|
|
163
|
+
})
|
|
164
|
+
});
|
|
165
|
+
}
|
|
166
|
+
ElementInfoDetails.displayName = 'ElementInfoDetails';
|
|
167
|
+
export default ElementInfoDetails;
|
|
168
|
+
|
|
169
|
+
//# sourceMappingURL=element-info-details.component.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../../../../../../libs/besigner/feature/designer/src/lib/components/element-info-details.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'use client'\n\nimport type * as Aglyn from '@aglyn/aglyn'\nimport { components } from '@aglyn/aglyn'\nimport { mergeSxProps } from '@aglyn/shared-ui-theme'\nimport { Typography } from '@mui/material'\nimport { useMemo, useState, type SyntheticEvent } from 'react'\nimport AccordionListComponent from './accordion-list.component'\n\n/**\n * What this element IS, at the bottom of Attributes.\n *\n * Two collapsed accordions: the component's own description, and the\n * element / parent / component / plugin ids. Reference detail — worth having\n * when a name is ambiguous or an id has to be quoted in a bug report, and not\n * worth the tab it used to occupy. Beside the fields it describes it costs a\n * reader nothing until they open it; as a tab it cost every reader a third of\n * the panel's header.\n */\nexport function ElementInfoDetails({\n node,\n}: {\n node: Aglyn.NodeSchema<any>\n}) {\n const schema = components.getSchema(node?.componentId)\n const failoverText = 'n/a'\n const details = useMemo(\n () => [\n {\n key: 'element-overview',\n label: 'Element Overview',\n items: [\n {\n key: 'component-display-name',\n label: 'Type',\n value: schema?.displayName,\n },\n {\n key: 'component-title',\n label: 'Title',\n value: schema?.title,\n },\n {\n key: 'component-subtitle',\n label: 'Subtitle',\n value: schema?.subtitle,\n },\n {\n key: 'component-description',\n label: 'Description',\n value: schema?.description,\n TypographyProps: { gutterBottom: true },\n },\n ],\n },\n {\n key: 'unique-identifiers',\n label: 'Unique Identifiers',\n items: [\n {\n key: 'element-id',\n label: 'Element ID',\n value: node.$id,\n },\n {\n key: 'parent-id',\n label: 'Parent Element ID',\n value: node?.parentId,\n },\n {\n key: 'component-id',\n label: 'Component ID',\n value: node?.componentId,\n },\n {\n key: 'plugin-id',\n label: 'Add-on ID',\n value: node?.pluginId,\n ValueTypographyProps: {},\n },\n ],\n },\n ],\n [schema, node],\n )\n const [expanded, setExpanded] = useState<string | false>(details[0].key)\n const handleChange =\n (panel: string) => (event: SyntheticEvent, newExpanded: boolean) => {\n setExpanded(newExpanded ? panel : false)\n }\n\n return (\n <>\n <AccordionListComponent\n items={details}\n getItemId={(item) => item.key}\n onRenderSummary={({ item }) => <>{item?.label}</>}\n onRenderDetail={({ item }) => (\n <>\n {item?.items?.map(\n ({\n label,\n value,\n TypographyProps,\n ValueTypographyProps,\n ...item\n }: any) => (\n <Typography key={item.key} component=\"div\" {...TypographyProps}>\n <Typography\n variant=\"caption\"\n sx={{\n display: 'inline',\n textTransform: 'uppercase',\n }}\n >\n <b>{label}:</b>\n </Typography>{' '}\n <Typography\n variant=\"body1\"\n {...ValueTypographyProps}\n sx={mergeSxProps(\n (theme) => {\n const tv = (theme as any).vars || theme\n return {\n bgcolor: `rgba(${tv.palette.primary.lightChannel} / 0.18)`,\n border: `1px solid rgba(${tv.palette.primary.lightChannel} / 0.72)`,\n borderRadius: '0.3em',\n px: 0.5,\n py: 0.15,\n wordBreak: 'break-word',\n fontSize: '0.8rem',\n }\n },\n { display: 'inline' },\n ValueTypographyProps?.sx,\n )}\n >\n {value || <i>{failoverText}</i>}\n </Typography>\n </Typography>\n ),\n )}\n </>\n )}\n />\n </>\n )\n}\nElementInfoDetails.displayName = 'ElementInfoDetails'\n\nexport default ElementInfoDetails\n"],"names":["components","mergeSxProps","Typography","useMemo","useState","AccordionListComponent","ElementInfoDetails","node","schema","getSchema","componentId","failoverText","details","key","label","items","value","displayName","title","subtitle","description","TypographyProps","gutterBottom","$id","parentId","pluginId","ValueTypographyProps","expanded","setExpanded","handleChange","panel","event","newExpanded","getItemId","item","onRenderSummary","onRenderDetail","map","component","variant","sx","display","textTransform","b","theme","tv","vars","bgcolor","palette","primary","lightChannel","border","borderRadius","px","py","wordBreak","fontSize","i"],"mappings":"AAAA;;;;;;;;;;;;;;;CAeC,GACD;;;;AAGA,SAASA,UAAU,QAAQ,eAAc;AACzC,SAASC,YAAY,QAAQ,yBAAwB;AACrD,SAASC,UAAU,QAAQ,gBAAe;AAC1C,SAASC,OAAO,EAAEC,QAAQ,QAA6B,QAAO;AAC9D,OAAOC,4BAA4B,gCAA4B;AAE/D;;;;;;;;;CASC,GACD,OAAO,SAASC,mBAAmB,EACjCC,IAAI,EAGL;IACC,MAAMC,SAASR,WAAWS,SAAS,CAACF,wBAAAA,KAAMG,WAAW;IACrD,MAAMC,eAAe;IACrB,MAAMC,UAAUT,QACd,IAAM;YACJ;gBACEU,KAAK;gBACLC,OAAO;gBACPC,OAAO;oBACL;wBACEF,KAAK;wBACLC,OAAO;wBACPE,KAAK,EAAER,0BAAAA,OAAQS,WAAW;oBAC5B;oBACA;wBACEJ,KAAK;wBACLC,OAAO;wBACPE,KAAK,EAAER,0BAAAA,OAAQU,KAAK;oBACtB;oBACA;wBACEL,KAAK;wBACLC,OAAO;wBACPE,KAAK,EAAER,0BAAAA,OAAQW,QAAQ;oBACzB;oBACA;wBACEN,KAAK;wBACLC,OAAO;wBACPE,KAAK,EAAER,0BAAAA,OAAQY,WAAW;wBAC1BC,iBAAiB;4BAAEC,cAAc;wBAAK;oBACxC;iBACD;YACH;YACA;gBACET,KAAK;gBACLC,OAAO;gBACPC,OAAO;oBACL;wBACEF,KAAK;wBACLC,OAAO;wBACPE,OAAOT,KAAKgB,GAAG;oBACjB;oBACA;wBACEV,KAAK;wBACLC,OAAO;wBACPE,KAAK,EAAET,wBAAAA,KAAMiB,QAAQ;oBACvB;oBACA;wBACEX,KAAK;wBACLC,OAAO;wBACPE,KAAK,EAAET,wBAAAA,KAAMG,WAAW;oBAC1B;oBACA;wBACEG,KAAK;wBACLC,OAAO;wBACPE,KAAK,EAAET,wBAAAA,KAAMkB,QAAQ;wBACrBC,sBAAsB,CAAC;oBACzB;iBACD;YACH;SACD,EACD;QAAClB;QAAQD;KAAK;IAEhB,MAAM,CAACoB,UAAUC,YAAY,GAAGxB,SAAyBQ,OAAO,CAAC,EAAE,CAACC,GAAG;IACvE,MAAMgB,eACJ,CAACC,QAAkB,CAACC,OAAuBC;YACzCJ,YAAYI,cAAcF,QAAQ;QACpC;IAEF,qBACE;kBACE,cAAA,KAACzB;YACCU,OAAOH;YACPqB,WAAW,CAACC,OAASA,KAAKrB,GAAG;YAC7BsB,iBAAiB,CAAC,EAAED,IAAI,EAAE,iBAAK;8BAAGA,wBAAAA,KAAMpB,KAAK;;YAC7CsB,gBAAgB,CAAC,EAAEF,IAAI,EAAE;oBAEpBA;qCADH;8BACGA,yBAAAA,cAAAA,KAAMnB,KAAK,qBAAXmB,YAAaG,GAAG,CACf;4BAAC,EACCvB,KAAK,EACLE,KAAK,EACLK,eAAe,EACfK,oBAAoB,EAEhB,OADDQ;;;;;;6CAEH,MAAChC;4BAA0BoC,WAAU;2BAAUjB;;8CAC7C,KAACnB;oCACCqC,SAAQ;oCACRC,IAAI;wCACFC,SAAS;wCACTC,eAAe;oCACjB;8CAEA,cAAA,MAACC;;4CAAG7B;4CAAM;;;;gCACE;8CACd,KAACZ;oCACCqC,SAAQ;mCACJb;oCACJc,IAAIvC,aACF,CAAC2C;wCACC,MAAMC,KAAK,AAACD,MAAcE,IAAI,IAAIF;wCAClC,OAAO;4CACLG,SAAS,CAAC,KAAK,EAAEF,GAAGG,OAAO,CAACC,OAAO,CAACC,YAAY,CAAC,QAAQ,CAAC;4CAC1DC,QAAQ,CAAC,eAAe,EAAEN,GAAGG,OAAO,CAACC,OAAO,CAACC,YAAY,CAAC,QAAQ,CAAC;4CACnEE,cAAc;4CACdC,IAAI;4CACJC,IAAI;4CACJC,WAAW;4CACXC,UAAU;wCACZ;oCACF,GACA;wCAAEf,SAAS;oCAAS,GACpBf,wCAAAA,qBAAsBc,EAAE;8CAGzBxB,uBAAS,KAACyC;kDAAG9C;;;;4BA9BDuB,KAAKrB,GAAG;;;;;;AAwCzC;AACAP,mBAAmBW,WAAW,GAAG;AAEjC,eAAeX,mBAAkB"}
|