@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,32 @@
|
|
|
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 NavigationDrawerProps } from '@aglyn/shared-ui-jsx/components/navigation-drawer.component';
|
|
18
|
+
import { type SyntheticEvent } from 'react';
|
|
19
|
+
export interface CloseableDrawerProps extends Partial<NavigationDrawerProps> {
|
|
20
|
+
drawerTitle?: JSX.Node;
|
|
21
|
+
disableCloseButton?: boolean;
|
|
22
|
+
onClose?: {
|
|
23
|
+
bivarianceHack(event: object, reason: 'backdropClick' | 'escapeKeyDown' | 'cancelClick'): void;
|
|
24
|
+
}['bivarianceHack'];
|
|
25
|
+
action?: JSX.Node;
|
|
26
|
+
extraActions?: JSX.Node;
|
|
27
|
+
onActionClick?: {
|
|
28
|
+
bivarianceHack(event: SyntheticEvent, reason: string): void;
|
|
29
|
+
}['bivarianceHack'];
|
|
30
|
+
}
|
|
31
|
+
export declare const CloseableDrawerComponent: import("react").ForwardRefExoticComponent<Omit<CloseableDrawerProps, "ref"> & import("react").RefAttributes<any>>;
|
|
32
|
+
export default CloseableDrawerComponent;
|
|
@@ -0,0 +1,134 @@
|
|
|
1
|
+
import { _ as _extends } from "@swc/helpers/_/_extends";
|
|
2
|
+
import { _ as _object_without_properties_loose } from "@swc/helpers/_/_object_without_properties_loose";
|
|
3
|
+
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
4
|
+
/**
|
|
5
|
+
* @license
|
|
6
|
+
* Copyright 2026 Aglyn LLC
|
|
7
|
+
*
|
|
8
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
9
|
+
* you may not use this file except in compliance with the License.
|
|
10
|
+
* You may obtain a copy of the License at
|
|
11
|
+
*
|
|
12
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
13
|
+
*
|
|
14
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
15
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
16
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
17
|
+
* See the License for the specific language governing permissions and
|
|
18
|
+
* limitations under the License.
|
|
19
|
+
*/ import { ICON_VARIANT_CLOSE } from "@aglyn/shared-data-enums";
|
|
20
|
+
import { SrOnly } from "@aglyn/shared-ui-jsx";
|
|
21
|
+
import { NavigationDrawerComponent } from "@aglyn/shared-ui-jsx/components/navigation-drawer.component";
|
|
22
|
+
import { MdiIcon } from "@aglyn/shared-ui-jsx";
|
|
23
|
+
import { styled } from "@aglyn/shared-ui-theme";
|
|
24
|
+
import { Button, IconButton, Typography } from "@mui/material";
|
|
25
|
+
import { forwardRef, useCallback } from "react";
|
|
26
|
+
const StyledDrawer = styled(NavigationDrawerComponent)(({ theme })=>({
|
|
27
|
+
'& > .MuiDrawer-paper': {
|
|
28
|
+
margin: '0 auto',
|
|
29
|
+
maxHeight: '100vh',
|
|
30
|
+
height: {
|
|
31
|
+
xs: '100%',
|
|
32
|
+
sm: '50%'
|
|
33
|
+
}
|
|
34
|
+
},
|
|
35
|
+
'& .MuiDrawer-paper': {
|
|
36
|
+
margin: '0 auto',
|
|
37
|
+
maxHeight: {
|
|
38
|
+
sm: '100%'
|
|
39
|
+
},
|
|
40
|
+
height: {
|
|
41
|
+
xs: '100%',
|
|
42
|
+
sm: '720px'
|
|
43
|
+
},
|
|
44
|
+
maxWidth: {
|
|
45
|
+
sm: '100%'
|
|
46
|
+
},
|
|
47
|
+
width: '100%',
|
|
48
|
+
[theme.breakpoints.up('sm')]: {
|
|
49
|
+
width: theme.breakpoints.values.sm
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
}));
|
|
53
|
+
export const CloseableDrawerComponent = /*#__PURE__*/ forwardRef((props, ref)=>{
|
|
54
|
+
const { disableCloseButton, onClose, action, onActionClick, children, drawerTitle, extraActions } = props, rest = _object_without_properties_loose(props, [
|
|
55
|
+
"disableCloseButton",
|
|
56
|
+
"onClose",
|
|
57
|
+
"action",
|
|
58
|
+
"onActionClick",
|
|
59
|
+
"children",
|
|
60
|
+
"drawerTitle",
|
|
61
|
+
"extraActions"
|
|
62
|
+
]);
|
|
63
|
+
const handleClose = useCallback((e, reason)=>{
|
|
64
|
+
onClose == null ? void 0 : onClose.call(null, e, reason);
|
|
65
|
+
}, [
|
|
66
|
+
onClose
|
|
67
|
+
]);
|
|
68
|
+
const handleCancelIconClick = useCallback((e)=>{
|
|
69
|
+
handleClose.call(null, e, 'cancelClick');
|
|
70
|
+
}, [
|
|
71
|
+
handleClose
|
|
72
|
+
]);
|
|
73
|
+
const handleActionClick = useCallback((e)=>{
|
|
74
|
+
onActionClick == null ? void 0 : onActionClick.call(null, e, 'actionButtonClick');
|
|
75
|
+
}, [
|
|
76
|
+
onActionClick
|
|
77
|
+
]);
|
|
78
|
+
const appBarLeft = /*#__PURE__*/ _jsxs(_Fragment, {
|
|
79
|
+
children: [
|
|
80
|
+
disableCloseButton ? null : /*#__PURE__*/ _jsxs(IconButton, {
|
|
81
|
+
color: "inherit",
|
|
82
|
+
edge: "start",
|
|
83
|
+
onClick: handleCancelIconClick,
|
|
84
|
+
sx: {
|
|
85
|
+
mr: 2
|
|
86
|
+
},
|
|
87
|
+
children: [
|
|
88
|
+
/*#__PURE__*/ _jsx(MdiIcon, {
|
|
89
|
+
path: ICON_VARIANT_CLOSE.path
|
|
90
|
+
}),
|
|
91
|
+
/*#__PURE__*/ _jsx(SrOnly, {
|
|
92
|
+
children: "close"
|
|
93
|
+
})
|
|
94
|
+
]
|
|
95
|
+
}),
|
|
96
|
+
/*#__PURE__*/ _jsx(Typography, {
|
|
97
|
+
variant: "h6",
|
|
98
|
+
sx: {
|
|
99
|
+
color: "inherit",
|
|
100
|
+
fontSize: (theme)=>theme.typography.pxToRem(20)
|
|
101
|
+
},
|
|
102
|
+
children: drawerTitle
|
|
103
|
+
})
|
|
104
|
+
]
|
|
105
|
+
});
|
|
106
|
+
const appBarRight = action ? /*#__PURE__*/ _jsxs(_Fragment, {
|
|
107
|
+
children: [
|
|
108
|
+
extraActions,
|
|
109
|
+
/*#__PURE__*/ _jsx(Button, {
|
|
110
|
+
color: "inherit",
|
|
111
|
+
onClick: handleActionClick,
|
|
112
|
+
sx: {
|
|
113
|
+
mr: -1.2
|
|
114
|
+
},
|
|
115
|
+
children: action
|
|
116
|
+
})
|
|
117
|
+
]
|
|
118
|
+
}) : null;
|
|
119
|
+
return /*#__PURE__*/ _jsx(StyledDrawer, _extends({
|
|
120
|
+
ref: ref,
|
|
121
|
+
anchor: "bottom",
|
|
122
|
+
variant: "temporary",
|
|
123
|
+
appBarLeft: appBarLeft,
|
|
124
|
+
appBarRight: appBarRight,
|
|
125
|
+
onClose: handleClose
|
|
126
|
+
}, rest, {
|
|
127
|
+
children: children
|
|
128
|
+
}));
|
|
129
|
+
});
|
|
130
|
+
CloseableDrawerComponent.displayName = 'CloseableDrawerComponent';
|
|
131
|
+
CloseableDrawerComponent.aglyn = true;
|
|
132
|
+
export default CloseableDrawerComponent;
|
|
133
|
+
|
|
134
|
+
//# sourceMappingURL=closeable-drawer.component.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../../../../../../libs/besigner/feature/designer/src/lib/components/closeable-drawer.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 {\n SrOnly,\n} from '@aglyn/shared-ui-jsx'\nimport { NavigationDrawerComponent, type NavigationDrawerProps } from '@aglyn/shared-ui-jsx/components/navigation-drawer.component'\nimport { MdiIcon } from '@aglyn/shared-ui-jsx'\nimport { styled } from '@aglyn/shared-ui-theme'\nimport { Button, IconButton, Typography } from '@mui/material'\nimport { forwardRef, type SyntheticEvent, useCallback } from 'react'\n\nconst StyledDrawer = styled(NavigationDrawerComponent)(({ theme }) => ({\n '& > .MuiDrawer-paper': {\n margin: '0 auto',\n maxHeight: '100vh',\n height: {\n xs: '100%',\n sm: '50%',\n },\n },\n '& .MuiDrawer-paper': {\n margin: '0 auto',\n maxHeight: { sm: '100%' },\n height: { xs: '100%', sm: '720px' },\n maxWidth: { sm: '100%' },\n width: '100%',\n [theme.breakpoints.up('sm')]: {\n width: theme.breakpoints.values.sm,\n },\n },\n}))\n\nexport interface CloseableDrawerProps extends Partial<NavigationDrawerProps> {\n drawerTitle?: JSX.Node\n disableCloseButton?: boolean\n onClose?: {\n bivarianceHack(\n event: object,\n reason: 'backdropClick' | 'escapeKeyDown' | 'cancelClick',\n ): void\n }['bivarianceHack']\n action?: JSX.Node\n extraActions?: JSX.Node\n onActionClick?: {\n bivarianceHack(event: SyntheticEvent, reason: string): void\n }['bivarianceHack']\n}\n\nexport const CloseableDrawerComponent = forwardRef<any, CloseableDrawerProps>(\n (props, ref) => {\n const {\n disableCloseButton,\n onClose,\n action,\n onActionClick,\n children,\n drawerTitle,\n extraActions,\n ...rest\n } = props\n\n const handleClose = useCallback(\n (e, reason) => {\n onClose?.call(null, e, reason)\n },\n [onClose],\n )\n const handleCancelIconClick = useCallback(\n (e) => {\n handleClose.call(null, e, 'cancelClick')\n },\n [handleClose],\n )\n const handleActionClick = useCallback(\n (e) => {\n onActionClick?.call(null, e, 'actionButtonClick')\n },\n [onActionClick],\n )\n\n const appBarLeft = (\n <>\n {disableCloseButton ? null : (\n <IconButton\n color=\"inherit\"\n edge=\"start\"\n onClick={handleCancelIconClick}\n sx={{ mr: 2 }}\n >\n <MdiIcon path={ICON_VARIANT_CLOSE.path} />\n <SrOnly>close</SrOnly>\n </IconButton>\n )}\n\n <Typography\n variant=\"h6\"\n sx={{\n color: \"inherit\",\n fontSize: (theme) => theme.typography.pxToRem(20)\n }}>\n {drawerTitle}\n </Typography>\n </>\n )\n\n const appBarRight = action ? (\n <>\n {extraActions}\n <Button color=\"inherit\" onClick={handleActionClick} sx={{ mr: -1.2 }}>\n {action}\n </Button>\n </>\n ) : null\n\n return (\n <StyledDrawer\n ref={ref}\n anchor=\"bottom\"\n variant=\"temporary\"\n appBarLeft={appBarLeft}\n appBarRight={appBarRight}\n onClose={handleClose}\n {...rest}\n >\n {children}\n </StyledDrawer>\n )\n },\n)\n\nCloseableDrawerComponent.displayName = 'CloseableDrawerComponent'\nCloseableDrawerComponent.aglyn = true\n\nexport default CloseableDrawerComponent\n"],"names":["ICON_VARIANT_CLOSE","SrOnly","NavigationDrawerComponent","MdiIcon","styled","Button","IconButton","Typography","forwardRef","useCallback","StyledDrawer","theme","margin","maxHeight","height","xs","sm","maxWidth","width","breakpoints","up","values","CloseableDrawerComponent","props","ref","disableCloseButton","onClose","action","onActionClick","children","drawerTitle","extraActions","rest","handleClose","e","reason","call","handleCancelIconClick","handleActionClick","appBarLeft","color","edge","onClick","sx","mr","path","variant","fontSize","typography","pxToRem","appBarRight","anchor","displayName","aglyn"],"mappings":";;;AAAA;;;;;;;;;;;;;;;CAeC,GAED,SAASA,kBAAkB,QAAQ,2BAA0B;AAC7D,SACEC,MAAM,QACD,uBAAsB;AAC7B,SAASC,yBAAyB,QAAoC,8DAA6D;AACnI,SAASC,OAAO,QAAQ,uBAAsB;AAC9C,SAASC,MAAM,QAAQ,yBAAwB;AAC/C,SAASC,MAAM,EAAEC,UAAU,EAAEC,UAAU,QAAQ,gBAAe;AAC9D,SAASC,UAAU,EAAuBC,WAAW,QAAQ,QAAO;AAEpE,MAAMC,eAAeN,OAAOF,2BAA2B,CAAC,EAAES,KAAK,EAAE,GAAM,CAAA;QACrE,wBAAwB;YACtBC,QAAQ;YACRC,WAAW;YACXC,QAAQ;gBACNC,IAAI;gBACJC,IAAI;YACN;QACF;QACA,sBAAsB;YACpBJ,QAAQ;YACRC,WAAW;gBAAEG,IAAI;YAAO;YACxBF,QAAQ;gBAAEC,IAAI;gBAAQC,IAAI;YAAQ;YAClCC,UAAU;gBAAED,IAAI;YAAO;YACvBE,OAAO;YACP,CAACP,MAAMQ,WAAW,CAACC,EAAE,CAAC,MAAM,EAAE;gBAC5BF,OAAOP,MAAMQ,WAAW,CAACE,MAAM,CAACL,EAAE;YACpC;QACF;IACF,CAAA;AAkBA,OAAO,MAAMM,yCAA2Bd,WACtC,CAACe,OAAOC;IACN,MAAM,EACJC,kBAAkB,EAClBC,OAAO,EACPC,MAAM,EACNC,aAAa,EACbC,QAAQ,EACRC,WAAW,EACXC,YAAY,EAEb,GAAGR,OADCS,wCACDT;;;;;;;;;IAEJ,MAAMU,cAAcxB,YAClB,CAACyB,GAAGC;QACFT,2BAAAA,QAASU,IAAI,CAAC,MAAMF,GAAGC;IACzB,GACA;QAACT;KAAQ;IAEX,MAAMW,wBAAwB5B,YAC5B,CAACyB;QACCD,YAAYG,IAAI,CAAC,MAAMF,GAAG;IAC5B,GACA;QAACD;KAAY;IAEf,MAAMK,oBAAoB7B,YACxB,CAACyB;QACCN,iCAAAA,cAAeQ,IAAI,CAAC,MAAMF,GAAG;IAC/B,GACA;QAACN;KAAc;IAGjB,MAAMW,2BACJ;;YACGd,qBAAqB,qBACpB,MAACnB;gBACCkC,OAAM;gBACNC,MAAK;gBACLC,SAASL;gBACTM,IAAI;oBAAEC,IAAI;gBAAE;;kCAEZ,KAACzC;wBAAQ0C,MAAM7C,mBAAmB6C,IAAI;;kCACtC,KAAC5C;kCAAO;;;;0BAIZ,KAACM;gBACCuC,SAAQ;gBACRH,IAAI;oBACFH,OAAO;oBACPO,UAAU,CAACpC,QAAUA,MAAMqC,UAAU,CAACC,OAAO,CAAC;gBAChD;0BACCnB;;;;IAKP,MAAMoB,cAAcvB,uBAClB;;YACGI;0BACD,KAAC1B;gBAAOmC,OAAM;gBAAUE,SAASJ;gBAAmBK,IAAI;oBAAEC,IAAI,CAAC;gBAAI;0BAChEjB;;;SAGH;IAEJ,qBACE,KAACjB;QACCc,KAAKA;QACL2B,QAAO;QACPL,SAAQ;QACRP,YAAYA;QACZW,aAAaA;QACbxB,SAASO;OACLD;kBAEHH;;AAGP,GACD;AAEDP,yBAAyB8B,WAAW,GAAG;AACvC9B,yBAAyB+B,KAAK,GAAG;AAEjC,eAAe/B,yBAAwB"}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright 2023 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 NodeCardItemData } from './node-card';
|
|
18
|
+
export type ComponentGridGroupItemData = {
|
|
19
|
+
$id: string;
|
|
20
|
+
label: string;
|
|
21
|
+
items: NodeCardItemData[];
|
|
22
|
+
};
|
|
23
|
+
interface ComponentAccordionListProp {
|
|
24
|
+
}
|
|
25
|
+
export declare const ComponentAccordionList: ((props: ComponentAccordionListProp) => import("react").JSX.Element) & {
|
|
26
|
+
displayName: string;
|
|
27
|
+
};
|
|
28
|
+
export default ComponentAccordionList;
|
|
@@ -0,0 +1,205 @@
|
|
|
1
|
+
import { _ as _extends } from "@swc/helpers/_/_extends";
|
|
2
|
+
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
3
|
+
/**
|
|
4
|
+
* @license
|
|
5
|
+
* Copyright 2023 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 { REUSABLE_COMPONENT_CATEGORY } from "@aglyn/aglyn";
|
|
19
|
+
import { DragType } from "@aglyn/besigner";
|
|
20
|
+
import { mergeRefs } from "@aglyn/shared-ui-jsx";
|
|
21
|
+
import { DragOverlay, useDndMonitor } from "@dnd-kit/core";
|
|
22
|
+
import { Box, Grid, Stack } from "@mui/material";
|
|
23
|
+
import { Observer, observer } from "mobx-react-lite";
|
|
24
|
+
import { useEffect } from "react";
|
|
25
|
+
import { useElementDrawerContext } from "../contexts/element-drawer-context.js";
|
|
26
|
+
import useDetailHoverIntent from "../hooks/use-detail-hover-intent.js";
|
|
27
|
+
import usePickerFilter from "../hooks/use-picker-filter.js";
|
|
28
|
+
import useVisibleComponentCategories from "../hooks/use-visible-component-categories.js";
|
|
29
|
+
import { besignerDocsUrl } from "../utils/docs-help.js";
|
|
30
|
+
import { AccordionListComponent } from "./accordion-list.component.js";
|
|
31
|
+
import Draggable from "./dnd/draggable.js";
|
|
32
|
+
import ElementDetailOverlay from "./element-detail-overlay.component.js";
|
|
33
|
+
import EmptyResults from "./empty-results.js";
|
|
34
|
+
import NodeCard from "./node-card.js";
|
|
35
|
+
import PickerSearchField from "./picker-search-field.js";
|
|
36
|
+
NodeCard.displayName = 'NodeCard';
|
|
37
|
+
export const ComponentAccordionList = observer((props)=>{
|
|
38
|
+
var _ref;
|
|
39
|
+
var _useElementDrawerContext, _detail_active, _detail_active1;
|
|
40
|
+
const {} = props, rest = _extends({}, props);
|
|
41
|
+
const allItems = useVisibleComponentCategories();
|
|
42
|
+
// The SAME search the Choose-element dialog runs (AGL-2486). The panel
|
|
43
|
+
// had no search at all; giving it a second implementation would mean two
|
|
44
|
+
// pickers disagreeing about what `icon` matches, which is worse than one
|
|
45
|
+
// of them having none.
|
|
46
|
+
const { filter, items, handleFilterChange } = usePickerFilter(allItems);
|
|
47
|
+
// Hover previews, click PINS, and the pin outranks the pointer — which
|
|
48
|
+
// is what makes the floating panel clickable at all. See
|
|
49
|
+
// `useDetailHoverIntent` for why each half is load-bearing.
|
|
50
|
+
const detail = useDetailHoverIntent();
|
|
51
|
+
// The panel floats over the CANVAS, which is exactly where a dragged
|
|
52
|
+
// element is going. It leaves the drop path on drag START — waiting for
|
|
53
|
+
// the drop would leave it sitting under the pointer for the whole
|
|
54
|
+
// gesture — and stays suspended until the drag ends so the cards the
|
|
55
|
+
// pointer crosses on the way out cannot re-open it.
|
|
56
|
+
useDndMonitor({
|
|
57
|
+
onDragStart: detail.suspend,
|
|
58
|
+
onDragEnd: detail.resume,
|
|
59
|
+
onDragCancel: detail.resume
|
|
60
|
+
});
|
|
61
|
+
// A modal opening over the panel is a context change, and a pinned
|
|
62
|
+
// detail has no business outliving it.
|
|
63
|
+
const drawerOpen = (_useElementDrawerContext = useElementDrawerContext()) == null ? void 0 : _useElementDrawerContext.open;
|
|
64
|
+
useEffect(()=>{
|
|
65
|
+
if (drawerOpen) detail.dismiss();
|
|
66
|
+
}, [
|
|
67
|
+
drawerOpen,
|
|
68
|
+
detail
|
|
69
|
+
]);
|
|
70
|
+
return /*#__PURE__*/ _jsxs(Stack, {
|
|
71
|
+
sx: {
|
|
72
|
+
height: 1,
|
|
73
|
+
minHeight: 0
|
|
74
|
+
},
|
|
75
|
+
children: [
|
|
76
|
+
/*#__PURE__*/ _jsx(Box, {
|
|
77
|
+
sx: {
|
|
78
|
+
display: 'flex',
|
|
79
|
+
alignItems: 'center',
|
|
80
|
+
px: 1,
|
|
81
|
+
py: 0.5,
|
|
82
|
+
borderBottom: 1,
|
|
83
|
+
borderColor: 'divider',
|
|
84
|
+
// The panel is a scrolling column; the search must stay reachable
|
|
85
|
+
// without scrolling back to the top of ~45 elements.
|
|
86
|
+
position: 'sticky',
|
|
87
|
+
top: 0,
|
|
88
|
+
zIndex: 6,
|
|
89
|
+
backgroundColor: 'surface.main'
|
|
90
|
+
},
|
|
91
|
+
children: /*#__PURE__*/ _jsx(PickerSearchField, {
|
|
92
|
+
value: filter,
|
|
93
|
+
onChange: handleFilterChange
|
|
94
|
+
})
|
|
95
|
+
}),
|
|
96
|
+
!(items == null ? void 0 : items.length) ? /*#__PURE__*/ _jsx(EmptyResults, {
|
|
97
|
+
sx: {
|
|
98
|
+
minHeight: 200
|
|
99
|
+
}
|
|
100
|
+
}) : // The grid scrolls; the detail region below it does not, so the
|
|
101
|
+
// description stays put while you browse.
|
|
102
|
+
// Scrolling moves the card the panel is anchored to, so a pinned
|
|
103
|
+
// panel would end up pointing at whatever slid into its place.
|
|
104
|
+
/*#__PURE__*/ _jsx(Box, {
|
|
105
|
+
sx: {
|
|
106
|
+
flex: 1,
|
|
107
|
+
minHeight: 0,
|
|
108
|
+
overflowY: 'auto'
|
|
109
|
+
},
|
|
110
|
+
onScroll: detail.dismiss,
|
|
111
|
+
children: /*#__PURE__*/ _jsx(AccordionListComponent, _extends({
|
|
112
|
+
// No `key` remount to force the results group open (AGL-2486).
|
|
113
|
+
// Keying on the filter flipped one render too EARLY — the query
|
|
114
|
+
// changes synchronously, the results group only exists after
|
|
115
|
+
// fuse.js loads — so the remount reseeded from the categories
|
|
116
|
+
// and the group that arrived next was collapsed. The list now
|
|
117
|
+
// opens a group when it first appears, which is the same render
|
|
118
|
+
// the group actually exists in.
|
|
119
|
+
items: items,
|
|
120
|
+
defaultExpanded: items.map((i)=>i.$id),
|
|
121
|
+
getItemId: (item)=>item == null ? void 0 : item.$id,
|
|
122
|
+
// Only the host's own components group carries help (AGL-2167).
|
|
123
|
+
// The built-in groups are self-evident from their contents; this one
|
|
124
|
+
// is the only group whose items the user has to CREATE before it
|
|
125
|
+
// holds anything, and an empty-looking group explains nothing.
|
|
126
|
+
getItemHelp: (item)=>(item == null ? void 0 : item.$id) === REUSABLE_COMPONENT_CATEGORY ? {
|
|
127
|
+
title: 'Your components',
|
|
128
|
+
excerpt: 'Sections you promoted into reusable components. Drop one to place an instance — edit the component once and every instance follows.',
|
|
129
|
+
href: besignerDocsUrl('reusableComponents', '#insert-instances')
|
|
130
|
+
} : undefined,
|
|
131
|
+
onRenderSummary: ({ item })=>/*#__PURE__*/ _jsx(Observer, {
|
|
132
|
+
children: ()=>/*#__PURE__*/ _jsx(_Fragment, {
|
|
133
|
+
children: item == null ? void 0 : item.label
|
|
134
|
+
})
|
|
135
|
+
}),
|
|
136
|
+
AccordionDetailsProps: {
|
|
137
|
+
sx: {
|
|
138
|
+
overflowX: 'hidden'
|
|
139
|
+
}
|
|
140
|
+
},
|
|
141
|
+
onRenderDetail: ({ item })=>/*#__PURE__*/ _jsx(Observer, {
|
|
142
|
+
children: ()=>{
|
|
143
|
+
var _item_items;
|
|
144
|
+
return /*#__PURE__*/ _jsx(Box, {
|
|
145
|
+
children: /*#__PURE__*/ _jsx(Grid, {
|
|
146
|
+
spacing: 2,
|
|
147
|
+
container: true,
|
|
148
|
+
sx: {
|
|
149
|
+
overflowX: 'hidden'
|
|
150
|
+
},
|
|
151
|
+
children: item == null ? void 0 : (_item_items = item.items) == null ? void 0 : _item_items.map((node, index)=>{
|
|
152
|
+
var _ref;
|
|
153
|
+
return /*#__PURE__*/ _jsx(Grid, {
|
|
154
|
+
size: 6,
|
|
155
|
+
onMouseEnter: (e)=>detail.open(node, e.currentTarget),
|
|
156
|
+
onMouseLeave: detail.scheduleClose,
|
|
157
|
+
onClick: (e)=>detail.togglePin(node, e.currentTarget),
|
|
158
|
+
children: /*#__PURE__*/ _jsx(Draggable, {
|
|
159
|
+
node: node,
|
|
160
|
+
type: DragType.PRESET,
|
|
161
|
+
idSuffix: item == null ? void 0 : item.$id,
|
|
162
|
+
children: ({ draggable, node, forwardRef })=>/*#__PURE__*/ _jsxs(_Fragment, {
|
|
163
|
+
children: [
|
|
164
|
+
/*#__PURE__*/ _jsx(NodeCard, _extends({
|
|
165
|
+
ref: mergeRefs(forwardRef, draggable.setNodeRef),
|
|
166
|
+
node: node,
|
|
167
|
+
style: draggable.isDragging ? {
|
|
168
|
+
opacity: 0.5
|
|
169
|
+
} : {}
|
|
170
|
+
}, draggable.listeners)),
|
|
171
|
+
/*#__PURE__*/ _jsx(DragOverlay, {
|
|
172
|
+
dropAnimation: null,
|
|
173
|
+
children: draggable.isDragging && /*#__PURE__*/ _jsx(NodeCard, {
|
|
174
|
+
node: node,
|
|
175
|
+
sx: {
|
|
176
|
+
zIndex: 9999
|
|
177
|
+
}
|
|
178
|
+
})
|
|
179
|
+
})
|
|
180
|
+
]
|
|
181
|
+
})
|
|
182
|
+
})
|
|
183
|
+
}, (_ref = node == null ? void 0 : node.$id) != null ? _ref : index);
|
|
184
|
+
})
|
|
185
|
+
})
|
|
186
|
+
});
|
|
187
|
+
}
|
|
188
|
+
})
|
|
189
|
+
}, rest))
|
|
190
|
+
}),
|
|
191
|
+
/*#__PURE__*/ _jsx(ElementDetailOverlay, {
|
|
192
|
+
item: (_detail_active = detail.active) == null ? void 0 : _detail_active.item,
|
|
193
|
+
anchor: (_ref = (_detail_active1 = detail.active) == null ? void 0 : _detail_active1.anchor) != null ? _ref : null,
|
|
194
|
+
pinned: detail.isPinned,
|
|
195
|
+
onPointerEnter: detail.keepOpen,
|
|
196
|
+
onPointerLeave: detail.scheduleClose,
|
|
197
|
+
onDismiss: detail.dismiss
|
|
198
|
+
})
|
|
199
|
+
]
|
|
200
|
+
});
|
|
201
|
+
});
|
|
202
|
+
ComponentAccordionList.displayName = 'ComponentAccordionList';
|
|
203
|
+
export default ComponentAccordionList;
|
|
204
|
+
|
|
205
|
+
//# sourceMappingURL=component-accordion-list.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../../../../../../libs/besigner/feature/designer/src/lib/components/component-accordion-list.tsx"],"sourcesContent":["/**\n * @license\n * Copyright 2023 Aglyn LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { REUSABLE_COMPONENT_CATEGORY } from '@aglyn/aglyn'\nimport { DragType } from '@aglyn/besigner'\nimport { mergeRefs } from '@aglyn/shared-ui-jsx'\nimport { DragOverlay, useDndMonitor } from '@dnd-kit/core'\nimport { Box, Grid, Stack } from '@mui/material'\nimport { Observer, observer } from 'mobx-react-lite'\nimport { useEffect } from 'react'\nimport { useElementDrawerContext } from '../contexts/element-drawer-context'\nimport useDetailHoverIntent from '../hooks/use-detail-hover-intent'\nimport usePickerFilter from '../hooks/use-picker-filter'\nimport useVisibleComponentCategories from '../hooks/use-visible-component-categories'\nimport { besignerDocsUrl } from '../utils/docs-help'\nimport { AccordionListComponent } from './accordion-list.component'\nimport Draggable from './dnd/draggable'\nimport ElementDetailOverlay from './element-detail-overlay.component'\nimport EmptyResults from './empty-results'\nimport NodeCard, { type NodeCardItemData } from './node-card'\nimport PickerSearchField from './picker-search-field'\n\nexport type ComponentGridGroupItemData = {\n $id: string\n label: string\n items: NodeCardItemData[]\n}\n\nNodeCard.displayName = 'NodeCard'\n\ninterface ComponentAccordionListProp {}\n\nexport const ComponentAccordionList = observer(\n (props: ComponentAccordionListProp) => {\n const { ...rest } = props\n const allItems = useVisibleComponentCategories()\n\n // The SAME search the Choose-element dialog runs (AGL-2486). The panel\n // had no search at all; giving it a second implementation would mean two\n // pickers disagreeing about what `icon` matches, which is worse than one\n // of them having none.\n const { filter, items, handleFilterChange } = usePickerFilter(allItems)\n\n // Hover previews, click PINS, and the pin outranks the pointer — which\n // is what makes the floating panel clickable at all. See\n // `useDetailHoverIntent` for why each half is load-bearing.\n const detail = useDetailHoverIntent<NodeCardItemData>()\n\n // The panel floats over the CANVAS, which is exactly where a dragged\n // element is going. It leaves the drop path on drag START — waiting for\n // the drop would leave it sitting under the pointer for the whole\n // gesture — and stays suspended until the drag ends so the cards the\n // pointer crosses on the way out cannot re-open it.\n useDndMonitor({\n onDragStart: detail.suspend,\n onDragEnd: detail.resume,\n onDragCancel: detail.resume,\n })\n\n // A modal opening over the panel is a context change, and a pinned\n // detail has no business outliving it.\n const drawerOpen = useElementDrawerContext()?.open\n useEffect(() => {\n if (drawerOpen) detail.dismiss()\n }, [drawerOpen, detail])\n\n return (\n <Stack sx={{ height: 1, minHeight: 0 }}>\n <Box\n sx={{\n display: 'flex',\n alignItems: 'center',\n px: 1,\n py: 0.5,\n borderBottom: 1,\n borderColor: 'divider',\n // The panel is a scrolling column; the search must stay reachable\n // without scrolling back to the top of ~45 elements.\n position: 'sticky',\n top: 0,\n zIndex: 6,\n backgroundColor: 'surface.main',\n }}\n >\n <PickerSearchField value={filter} onChange={handleFilterChange} />\n </Box>\n {!items?.length ? (\n <EmptyResults sx={{ minHeight: 200 }} />\n ) : (\n // The grid scrolls; the detail region below it does not, so the\n // description stays put while you browse.\n // Scrolling moves the card the panel is anchored to, so a pinned\n // panel would end up pointing at whatever slid into its place.\n <Box\n sx={{ flex: 1, minHeight: 0, overflowY: 'auto' }}\n onScroll={detail.dismiss}\n >\n <AccordionListComponent\n // No `key` remount to force the results group open (AGL-2486).\n // Keying on the filter flipped one render too EARLY — the query\n // changes synchronously, the results group only exists after\n // fuse.js loads — so the remount reseeded from the categories\n // and the group that arrived next was collapsed. The list now\n // opens a group when it first appears, which is the same render\n // the group actually exists in.\n items={items}\n defaultExpanded={items.map((i) => i.$id)}\n getItemId={(item) => item?.$id}\n // Only the host's own components group carries help (AGL-2167).\n // The built-in groups are self-evident from their contents; this one\n // is the only group whose items the user has to CREATE before it\n // holds anything, and an empty-looking group explains nothing.\n getItemHelp={(item) =>\n item?.$id === REUSABLE_COMPONENT_CATEGORY\n ? {\n title: 'Your components',\n excerpt:\n 'Sections you promoted into reusable components. Drop one to place an instance — edit the component once and every instance follows.',\n href: besignerDocsUrl(\n 'reusableComponents',\n '#insert-instances',\n ),\n }\n : undefined\n }\n onRenderSummary={({ item }) => (\n <Observer>{() => <>{item?.label}</>}</Observer>\n )}\n AccordionDetailsProps={{\n sx: { overflowX: 'hidden' },\n }}\n onRenderDetail={({ item }) => (\n <Observer>\n {() => (\n <Box>\n <Grid spacing={2} container sx={{ overflowX: 'hidden' }}>\n {item?.items?.map((node, index) => (\n <Grid\n key={node?.$id ?? index}\n size={6}\n onMouseEnter={(e) =>\n detail.open(node, e.currentTarget as HTMLElement)\n }\n onMouseLeave={detail.scheduleClose}\n onClick={(e) =>\n detail.togglePin(\n node,\n e.currentTarget as HTMLElement,\n )\n }\n >\n <Draggable\n node={node}\n type={DragType.PRESET}\n idSuffix={item?.$id}\n >\n {({ draggable, node, forwardRef }) => (\n <>\n <NodeCard\n ref={mergeRefs(\n forwardRef,\n draggable.setNodeRef,\n )}\n node={node as any}\n style={\n draggable.isDragging\n ? { opacity: 0.5 }\n : {}\n }\n {...draggable.listeners}\n />\n <DragOverlay dropAnimation={null}>\n {draggable.isDragging && (\n <NodeCard\n node={node as any}\n sx={{ zIndex: 9999 }}\n />\n )}\n </DragOverlay>\n </>\n )}\n </Draggable>\n </Grid>\n ))}\n </Grid>\n </Box>\n )}\n </Observer>\n )}\n {...rest}\n />\n </Box>\n )}\n <ElementDetailOverlay\n item={detail.active?.item}\n anchor={detail.active?.anchor ?? null}\n pinned={detail.isPinned}\n onPointerEnter={detail.keepOpen}\n onPointerLeave={detail.scheduleClose}\n onDismiss={detail.dismiss}\n />\n </Stack>\n )\n },\n)\nComponentAccordionList.displayName = 'ComponentAccordionList'\n\nexport default ComponentAccordionList\n"],"names":["REUSABLE_COMPONENT_CATEGORY","DragType","mergeRefs","DragOverlay","useDndMonitor","Box","Grid","Stack","Observer","observer","useEffect","useElementDrawerContext","useDetailHoverIntent","usePickerFilter","useVisibleComponentCategories","besignerDocsUrl","AccordionListComponent","Draggable","ElementDetailOverlay","EmptyResults","NodeCard","PickerSearchField","displayName","ComponentAccordionList","props","detail","rest","allItems","filter","items","handleFilterChange","onDragStart","suspend","onDragEnd","resume","onDragCancel","drawerOpen","open","dismiss","sx","height","minHeight","display","alignItems","px","py","borderBottom","borderColor","position","top","zIndex","backgroundColor","value","onChange","length","flex","overflowY","onScroll","defaultExpanded","map","i","$id","getItemId","item","getItemHelp","title","excerpt","href","undefined","onRenderSummary","label","AccordionDetailsProps","overflowX","onRenderDetail","spacing","container","node","index","size","onMouseEnter","e","currentTarget","onMouseLeave","scheduleClose","onClick","togglePin","type","PRESET","idSuffix","draggable","forwardRef","ref","setNodeRef","style","isDragging","opacity","listeners","dropAnimation","active","anchor","pinned","isPinned","onPointerEnter","keepOpen","onPointerLeave","onDismiss"],"mappings":"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"}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright 2026 Aglyn LLC
|
|
4
|
+
*
|
|
5
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
6
|
+
* you may not use this file except in compliance with the License.
|
|
7
|
+
* You may obtain a copy of the License at
|
|
8
|
+
*
|
|
9
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
10
|
+
*
|
|
11
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
12
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
13
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
14
|
+
* See the License for the specific language governing permissions and
|
|
15
|
+
* limitations under the License.
|
|
16
|
+
*/
|
|
17
|
+
import type * as Aglyn from '@aglyn/aglyn';
|
|
18
|
+
import { type MdiIconProps } from '@aglyn/shared-ui-jsx';
|
|
19
|
+
export interface ComponentIconProps extends MdiIconProps {
|
|
20
|
+
component?: Aglyn.ComponentSchema;
|
|
21
|
+
/**
|
|
22
|
+
* The node being drawn, when there is one. Only a reusable-component
|
|
23
|
+
* instance needs it, and only to reach the icon its definition chose —
|
|
24
|
+
* `component` alone cannot answer that, since every instance shares the
|
|
25
|
+
* one `reusableInstance` schema (AGL-1193).
|
|
26
|
+
*/
|
|
27
|
+
node?: Aglyn.NodeSchema<any>;
|
|
28
|
+
}
|
|
29
|
+
export declare const ComponentIconComponent: ((props: ComponentIconProps) => import("react").JSX.Element) & {
|
|
30
|
+
displayName: string;
|
|
31
|
+
};
|
|
32
|
+
export default ComponentIconComponent;
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright 2026 Aglyn LLC
|
|
4
|
+
*
|
|
5
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
6
|
+
* you may not use this file except in compliance with the License.
|
|
7
|
+
* You may obtain a copy of the License at
|
|
8
|
+
*
|
|
9
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
10
|
+
*
|
|
11
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
12
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
13
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
14
|
+
* See the License for the specific language governing permissions and
|
|
15
|
+
* limitations under the License.
|
|
16
|
+
*/ import { _ as _extends } from "@swc/helpers/_/_extends";
|
|
17
|
+
import { _ as _object_without_properties_loose } from "@swc/helpers/_/_object_without_properties_loose";
|
|
18
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
19
|
+
import { resolveInstanceIconPath } from "@aglyn/aglyn";
|
|
20
|
+
import { ICON_VARIANT_ELEMENT } from "@aglyn/shared-data-enums";
|
|
21
|
+
import { MdiIcon } from "@aglyn/shared-ui-jsx";
|
|
22
|
+
import { observer } from "mobx-react-lite";
|
|
23
|
+
import { useContext } from "react";
|
|
24
|
+
import { isElement, isValidElementType } from "react-is";
|
|
25
|
+
import ComponentPromotionContext from "../contexts/component-promotion-context.js";
|
|
26
|
+
export const ComponentIconComponent = observer((props)=>{
|
|
27
|
+
const { component, node } = props, rest = _object_without_properties_loose(props, [
|
|
28
|
+
"component",
|
|
29
|
+
"node"
|
|
30
|
+
]);
|
|
31
|
+
const Icon = component == null ? void 0 : component.icon;
|
|
32
|
+
// An instance's definition icon outranks the schema's package glyph, which
|
|
33
|
+
// is the same glyph for every component anyone has ever promoted. Read live
|
|
34
|
+
// off the definition rather than denormalized onto the node, so changing a
|
|
35
|
+
// component's icon reaches the instances already placed.
|
|
36
|
+
const { definitions } = useContext(ComponentPromotionContext);
|
|
37
|
+
const definitionIconPath = resolveInstanceIconPath(node, definitions);
|
|
38
|
+
if (definitionIconPath) return /*#__PURE__*/ _jsx(MdiIcon, _extends({
|
|
39
|
+
path: definitionIconPath
|
|
40
|
+
}, rest));
|
|
41
|
+
if (isElement(Icon)) return Icon;
|
|
42
|
+
return /*#__PURE__*/ _jsx(MdiIcon, _extends({
|
|
43
|
+
path: (Icon == null ? void 0 : Icon.path) || ICON_VARIANT_ELEMENT.path
|
|
44
|
+
}, isValidElementType(Icon) ? {
|
|
45
|
+
component: Icon
|
|
46
|
+
} : {}, rest));
|
|
47
|
+
});
|
|
48
|
+
ComponentIconComponent.displayName = 'ComponentIconComponent';
|
|
49
|
+
export default ComponentIconComponent;
|
|
50
|
+
|
|
51
|
+
//# sourceMappingURL=component-icon.component.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../../../../../../libs/besigner/feature/designer/src/lib/components/component-icon.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 type * as Aglyn from '@aglyn/aglyn'\nimport { resolveInstanceIconPath } from '@aglyn/aglyn'\nimport { ICON_VARIANT_ELEMENT } from '@aglyn/shared-data-enums'\nimport { MdiIcon, type MdiIconProps } from '@aglyn/shared-ui-jsx'\nimport { observer } from 'mobx-react-lite'\nimport { useContext } from 'react'\nimport { isElement, isValidElementType } from 'react-is'\nimport ComponentPromotionContext from '../contexts/component-promotion-context'\n\nexport interface ComponentIconProps extends MdiIconProps {\n component?: Aglyn.ComponentSchema\n /**\n * The node being drawn, when there is one. Only a reusable-component\n * instance needs it, and only to reach the icon its definition chose —\n * `component` alone cannot answer that, since every instance shares the\n * one `reusableInstance` schema (AGL-1193).\n */\n node?: Aglyn.NodeSchema<any>\n}\n\nexport const ComponentIconComponent = observer((props: ComponentIconProps) => {\n const { component, node, ...rest } = props\n const Icon = component?.icon\n\n // An instance's definition icon outranks the schema's package glyph, which\n // is the same glyph for every component anyone has ever promoted. Read live\n // off the definition rather than denormalized onto the node, so changing a\n // component's icon reaches the instances already placed.\n const { definitions } = useContext(ComponentPromotionContext)\n const definitionIconPath = resolveInstanceIconPath(node, definitions)\n if (definitionIconPath) return <MdiIcon path={definitionIconPath} {...rest} />\n\n if (isElement(Icon)) return Icon\n\n return (\n <MdiIcon\n path={Icon?.path || ICON_VARIANT_ELEMENT.path}\n {...(isValidElementType(Icon) ? { component: Icon } : {})}\n {...rest}\n />\n )\n})\nComponentIconComponent.displayName = 'ComponentIconComponent'\n\nexport default ComponentIconComponent\n"],"names":["resolveInstanceIconPath","ICON_VARIANT_ELEMENT","MdiIcon","observer","useContext","isElement","isValidElementType","ComponentPromotionContext","ComponentIconComponent","props","component","node","rest","Icon","icon","definitions","definitionIconPath","path","displayName"],"mappings":"AAAA;;;;;;;;;;;;;;;CAeC;;;AAGD,SAASA,uBAAuB,QAAQ,eAAc;AACtD,SAASC,oBAAoB,QAAQ,2BAA0B;AAC/D,SAASC,OAAO,QAA2B,uBAAsB;AACjE,SAASC,QAAQ,QAAQ,kBAAiB;AAC1C,SAASC,UAAU,QAAQ,QAAO;AAClC,SAASC,SAAS,EAAEC,kBAAkB,QAAQ,WAAU;AACxD,OAAOC,+BAA+B,6CAAyC;AAa/E,OAAO,MAAMC,yBAAyBL,SAAS,CAACM;IAC9C,MAAM,EAAEC,SAAS,EAAEC,IAAI,EAAW,GAAGF,OAATG,wCAASH;;;;IACrC,MAAMI,OAAOH,6BAAAA,UAAWI,IAAI;IAE5B,2EAA2E;IAC3E,4EAA4E;IAC5E,2EAA2E;IAC3E,yDAAyD;IACzD,MAAM,EAAEC,WAAW,EAAE,GAAGX,WAAWG;IACnC,MAAMS,qBAAqBhB,wBAAwBW,MAAMI;IACzD,IAAIC,oBAAoB,qBAAO,KAACd;QAAQe,MAAMD;OAAwBJ;IAEtE,IAAIP,UAAUQ,OAAO,OAAOA;IAE5B,qBACE,KAACX;QACCe,MAAMJ,CAAAA,wBAAAA,KAAMI,IAAI,KAAIhB,qBAAqBgB,IAAI;OACxCX,mBAAmBO,QAAQ;QAAEH,WAAWG;IAAK,IAAI,CAAC,GACnDD;AAGV,GAAE;AACFJ,uBAAuBU,WAAW,GAAG;AAErC,eAAeV,uBAAsB"}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright 2026 Aglyn LLC
|
|
4
|
+
*
|
|
5
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
6
|
+
* you may not use this file except in compliance with the License.
|
|
7
|
+
* You may obtain a copy of the License at
|
|
8
|
+
*
|
|
9
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
10
|
+
*
|
|
11
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
12
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
13
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
14
|
+
* See the License for the specific language governing permissions and
|
|
15
|
+
* limitations under the License.
|
|
16
|
+
*/
|
|
17
|
+
import type * as Aglyn from '@aglyn/aglyn';
|
|
18
|
+
import { DialogProps } from '@mui/material';
|
|
19
|
+
import { SyntheticEvent } from 'react';
|
|
20
|
+
type PickerOption = Aglyn.ComponentSchema<any> | Aglyn.PresetSchema<any>;
|
|
21
|
+
export interface ComponentPickerProps extends DialogProps {
|
|
22
|
+
onSelectItem?: (e: SyntheticEvent, item?: {
|
|
23
|
+
option: PickerOption;
|
|
24
|
+
}) => void;
|
|
25
|
+
}
|
|
26
|
+
export declare const ComponentPicker: import("react").FunctionComponent<Omit<ComponentPickerProps, "ref"> & import("react").RefAttributes<any>>;
|
|
27
|
+
export default ComponentPicker;
|