@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,368 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright 2026 Aglyn LLC
|
|
4
|
+
*
|
|
5
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
6
|
+
* you may not use this file except in compliance with the License.
|
|
7
|
+
* You may obtain a copy of the License at
|
|
8
|
+
*
|
|
9
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
10
|
+
*
|
|
11
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
12
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
13
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
14
|
+
* See the License for the specific language governing permissions and
|
|
15
|
+
* limitations under the License.
|
|
16
|
+
*/ import { _ as _extends } from "@swc/helpers/_/_extends";
|
|
17
|
+
import { _ as _object_without_properties_loose } from "@swc/helpers/_/_object_without_properties_loose";
|
|
18
|
+
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
19
|
+
import { ICON_VARIANT_CLOSE, ICON_VARIANT_FILTER } from "@aglyn/shared-data-enums";
|
|
20
|
+
import { MdiIcon } from "@aglyn/shared-ui-jsx";
|
|
21
|
+
import { AppBar, Box, Button, Collapse, Dialog, DialogContent, Divider, IconButton, Slide, Toolbar, Typography } from "@mui/material";
|
|
22
|
+
import { Observer, observer } from "mobx-react-lite";
|
|
23
|
+
import { forwardRef, useCallback, useState } from "react";
|
|
24
|
+
import usePickerFilter from "../hooks/use-picker-filter.js";
|
|
25
|
+
import useVisibleComponentCategories from "../hooks/use-visible-component-categories.js";
|
|
26
|
+
import { describeElement } from "../utils/describe-element.js";
|
|
27
|
+
import AccordionListComponent from "./accordion-list.component.js";
|
|
28
|
+
import ElementDetailView from "./element-detail.component.js";
|
|
29
|
+
import EmptyResults from "./empty-results.js";
|
|
30
|
+
import NodeCard from "./node-card.js";
|
|
31
|
+
import PickerSearchField from "./picker-search-field.js";
|
|
32
|
+
const Transition = /*#__PURE__*/ forwardRef(function Transition(props, ref) {
|
|
33
|
+
return /*#__PURE__*/ _jsx(Slide, _extends({
|
|
34
|
+
direction: "up",
|
|
35
|
+
ref: ref
|
|
36
|
+
}, props));
|
|
37
|
+
});
|
|
38
|
+
/**
|
|
39
|
+
* How the two panes share the dialog above the stacking breakpoint
|
|
40
|
+
* (AGL-2486).
|
|
41
|
+
*
|
|
42
|
+
* An even split, because the preview is sized by the pane and nothing else:
|
|
43
|
+
* `ElementPreview` composes at a fixed 1280px stage and scales by
|
|
44
|
+
* `paneWidth / 1280`, so the pane's width IS the preview's size. A 420px
|
|
45
|
+
* pane rendered at 0.30; half of a 1536px dialog renders at 0.57, which is
|
|
46
|
+
* the "make the preview bigger" ask answered by arithmetic rather than by a
|
|
47
|
+
* bigger `previewHeight` cap on the same small stage.
|
|
48
|
+
*
|
|
49
|
+
* The grid does not pay for it. At an even split the tiles keep their full
|
|
50
|
+
* `MIN_TILE_WIDTH` — a 1944px screen runs four 166px tiles where the fixed
|
|
51
|
+
* pane ran six 161px ones. Fewer columns, no narrower tiles.
|
|
52
|
+
*/ const PANE_SPLIT = '1 1 50%';
|
|
53
|
+
/**
|
|
54
|
+
* Narrowest a tile may be before its label stops fitting, in px (AGL-2486).
|
|
55
|
+
*
|
|
56
|
+
* The grid used to size its tiles off the VIEWPORT breakpoint (`sm` → 3/12 →
|
|
57
|
+
* four columns) which is the wrong question to ask: the tiles live in a pane
|
|
58
|
+
* whose width is the dialog minus the detail pane, and a viewport breakpoint
|
|
59
|
+
* cannot see the pane. So the detail pane came out of the tiles — four
|
|
60
|
+
* columns in 448px, 94px each, with `Announcement Bar` painting outside its
|
|
61
|
+
* own card. `auto-fill` asks the pane instead, so the two panes stop trading:
|
|
62
|
+
* widening the dialog adds columns, and the detail pane costs columns rather
|
|
63
|
+
* than shrinking every tile.
|
|
64
|
+
*
|
|
65
|
+
* 150px is measured, not chosen: the widest single word in the catalogue
|
|
66
|
+
* (`Announcement`) needs ~100px at `subtitle2`, and the tiles that survive
|
|
67
|
+
* on one line at 150 are the ones that wrapped at 94.
|
|
68
|
+
*/ const MIN_TILE_WIDTH = 150;
|
|
69
|
+
export const ComponentPicker = observer(/*#__PURE__*/ forwardRef((props, forwardRef)=>{
|
|
70
|
+
const { open, onClose, onSelectItem } = props, rest = _object_without_properties_loose(props, [
|
|
71
|
+
"open",
|
|
72
|
+
"onClose",
|
|
73
|
+
"onSelectItem"
|
|
74
|
+
]);
|
|
75
|
+
const allItems = useVisibleComponentCategories();
|
|
76
|
+
const [filterOpen, setFilterOpen] = useState(false);
|
|
77
|
+
const [selected, setSelected] = useState(null);
|
|
78
|
+
const clearSelected = useCallback(()=>setSelected(null), []);
|
|
79
|
+
// The SAME search the Elements panel runs (AGL-2486). Both surfaces read
|
|
80
|
+
// one hook so a query cannot mean two different things depending on
|
|
81
|
+
// which picker you happened to open.
|
|
82
|
+
const { filter, items, handleFilterChange } = usePickerFilter(allItems, clearSelected);
|
|
83
|
+
const handleConfirm = useCallback((e)=>{
|
|
84
|
+
onSelectItem == null ? void 0 : onSelectItem(e, {
|
|
85
|
+
option: selected
|
|
86
|
+
});
|
|
87
|
+
}, [
|
|
88
|
+
selected,
|
|
89
|
+
onSelectItem
|
|
90
|
+
]);
|
|
91
|
+
const handleClose = useCallback((e, reason = 'canceled')=>{
|
|
92
|
+
onClose == null ? void 0 : onClose(e, reason);
|
|
93
|
+
}, [
|
|
94
|
+
onClose
|
|
95
|
+
]);
|
|
96
|
+
const handleItemClick = useCallback((e, item)=>{
|
|
97
|
+
setSelected((prev)=>{
|
|
98
|
+
if (prev && (prev == null ? void 0 : prev.$id) === (item == null ? void 0 : item.$id)) {
|
|
99
|
+
return null;
|
|
100
|
+
}
|
|
101
|
+
return item;
|
|
102
|
+
});
|
|
103
|
+
}, []);
|
|
104
|
+
return /*#__PURE__*/ _jsxs(Dialog, _extends({
|
|
105
|
+
ref: forwardRef,
|
|
106
|
+
onClose: handleClose,
|
|
107
|
+
open: open,
|
|
108
|
+
// Picking one of ~110 elements is a browsing task, not a confirm box
|
|
109
|
+
// (AGL-2486). At `md` the paper was 900px on a 1944px screen and the
|
|
110
|
+
// detail pane took 420 of it, leaving the grid narrower than the
|
|
111
|
+
// whole dialog had been before the pane existed.
|
|
112
|
+
//
|
|
113
|
+
// `fullWidth` rather than the `width: '100%'` this carried before:
|
|
114
|
+
// `100%` ignores the paper's own 32px margins, so the paper overflows
|
|
115
|
+
// the viewport at any width below its cap. That was invisible while
|
|
116
|
+
// the cap was 900 and would be a horizontal scrollbar on every laptop
|
|
117
|
+
// at this one.
|
|
118
|
+
maxWidth: "xl",
|
|
119
|
+
fullWidth: true,
|
|
120
|
+
slots: {
|
|
121
|
+
transition: Transition
|
|
122
|
+
}
|
|
123
|
+
}, rest, {
|
|
124
|
+
children: [
|
|
125
|
+
/*#__PURE__*/ _jsxs(AppBar, {
|
|
126
|
+
position: "relative",
|
|
127
|
+
color: "surface",
|
|
128
|
+
enableColorOnDark: true,
|
|
129
|
+
children: [
|
|
130
|
+
/*#__PURE__*/ _jsxs(Toolbar, {
|
|
131
|
+
children: [
|
|
132
|
+
/*#__PURE__*/ _jsx(IconButton, {
|
|
133
|
+
edge: "start",
|
|
134
|
+
color: "inherit",
|
|
135
|
+
onClick: handleClose,
|
|
136
|
+
"aria-label": "close",
|
|
137
|
+
children: /*#__PURE__*/ _jsx(MdiIcon, {
|
|
138
|
+
path: ICON_VARIANT_CLOSE.path
|
|
139
|
+
})
|
|
140
|
+
}),
|
|
141
|
+
/*#__PURE__*/ _jsx(Typography, {
|
|
142
|
+
variant: "h6",
|
|
143
|
+
component: "div",
|
|
144
|
+
noWrap: true,
|
|
145
|
+
sx: {
|
|
146
|
+
textOverflow: 'ellipsis',
|
|
147
|
+
ml: 2,
|
|
148
|
+
flex: 1
|
|
149
|
+
},
|
|
150
|
+
children: 'Choose element'
|
|
151
|
+
}),
|
|
152
|
+
/*#__PURE__*/ _jsx(IconButton, {
|
|
153
|
+
type: "button",
|
|
154
|
+
color: "inherit",
|
|
155
|
+
sx: {
|
|
156
|
+
p: '10px'
|
|
157
|
+
},
|
|
158
|
+
"aria-label": "search",
|
|
159
|
+
onClick: ()=>setFilterOpen((prev)=>!prev),
|
|
160
|
+
children: /*#__PURE__*/ _jsx(MdiIcon, {
|
|
161
|
+
path: ICON_VARIANT_FILTER.path
|
|
162
|
+
})
|
|
163
|
+
}),
|
|
164
|
+
/*#__PURE__*/ _jsx(Divider, {
|
|
165
|
+
sx: {
|
|
166
|
+
height: 28,
|
|
167
|
+
m: 0.5
|
|
168
|
+
},
|
|
169
|
+
orientation: "vertical"
|
|
170
|
+
}),
|
|
171
|
+
/*#__PURE__*/ _jsx(Button, {
|
|
172
|
+
autoFocus: true,
|
|
173
|
+
color: "inherit",
|
|
174
|
+
onClick: handleClose,
|
|
175
|
+
children: 'Close'
|
|
176
|
+
})
|
|
177
|
+
]
|
|
178
|
+
}),
|
|
179
|
+
/*#__PURE__*/ _jsx(Collapse, {
|
|
180
|
+
orientation: "vertical",
|
|
181
|
+
in: filterOpen,
|
|
182
|
+
children: /*#__PURE__*/ _jsx(Toolbar, {
|
|
183
|
+
component: "form",
|
|
184
|
+
variant: "dense",
|
|
185
|
+
sx: {
|
|
186
|
+
display: 'flex',
|
|
187
|
+
alignItems: 'center',
|
|
188
|
+
width: 1,
|
|
189
|
+
borderTop: 1,
|
|
190
|
+
borderColor: 'divider'
|
|
191
|
+
},
|
|
192
|
+
children: /*#__PURE__*/ _jsx(PickerSearchField, {
|
|
193
|
+
value: filter,
|
|
194
|
+
onChange: handleFilterChange
|
|
195
|
+
})
|
|
196
|
+
})
|
|
197
|
+
})
|
|
198
|
+
]
|
|
199
|
+
}),
|
|
200
|
+
/*#__PURE__*/ _jsxs(DialogContent, {
|
|
201
|
+
dividers: true,
|
|
202
|
+
sx: {
|
|
203
|
+
p: 0,
|
|
204
|
+
display: 'flex',
|
|
205
|
+
// `md` is where an even split stops paying for itself, and the
|
|
206
|
+
// number is derived rather than picked: at a 900px viewport the
|
|
207
|
+
// paper is 836px, so each pane is 418. That is the LAST width at
|
|
208
|
+
// which the grid still runs two full-width tiles (2×150 + a 24
|
|
209
|
+
// gap + 32 of padding = 356) and the preview still composes at
|
|
210
|
+
// the 0.30 scale it had in the old fixed 420px pane. Below it,
|
|
211
|
+
// sharing a row makes both panes worse than stacking, where each
|
|
212
|
+
// gets the dialog's whole width — so the preview gets BIGGER on
|
|
213
|
+
// a tablet, not smaller.
|
|
214
|
+
//
|
|
215
|
+
// Stacking also keeps Confirm reachable. The pane used to be
|
|
216
|
+
// `display: none` under `sm` and Confirm lives inside it, so the
|
|
217
|
+
// dialog could be browsed and never used on a phone.
|
|
218
|
+
flexDirection: {
|
|
219
|
+
xs: 'column',
|
|
220
|
+
md: 'row'
|
|
221
|
+
},
|
|
222
|
+
alignItems: 'stretch',
|
|
223
|
+
minHeight: '60vh'
|
|
224
|
+
},
|
|
225
|
+
children: [
|
|
226
|
+
/*#__PURE__*/ _jsx(Box, {
|
|
227
|
+
sx: {
|
|
228
|
+
flex: {
|
|
229
|
+
xs: '1 1 auto',
|
|
230
|
+
md: PANE_SPLIT
|
|
231
|
+
},
|
|
232
|
+
// Without this the tiles' intrinsic width becomes the pane's
|
|
233
|
+
// floor and the split silently stops being even.
|
|
234
|
+
minWidth: 0,
|
|
235
|
+
// Stacked, the panes scroll together as one column; side by
|
|
236
|
+
// side, the grid scrolls under a detail pane that stays put.
|
|
237
|
+
overflowY: {
|
|
238
|
+
xs: 'visible',
|
|
239
|
+
md: 'auto'
|
|
240
|
+
}
|
|
241
|
+
},
|
|
242
|
+
children: !(items == null ? void 0 : items.length) ? /*#__PURE__*/ _jsx(EmptyResults, {
|
|
243
|
+
sx: {
|
|
244
|
+
minHeight: '40vh',
|
|
245
|
+
height: 1
|
|
246
|
+
}
|
|
247
|
+
}) : /*#__PURE__*/ _jsx(AccordionListComponent, {
|
|
248
|
+
// No `key` remount to force the results group open
|
|
249
|
+
// (AGL-2486) — see the Elements panel for why that could not
|
|
250
|
+
// work. The list opens a group when it first appears.
|
|
251
|
+
items: items,
|
|
252
|
+
defaultExpanded: items.map((i)=>i.$id),
|
|
253
|
+
getItemId: (item)=>item == null ? void 0 : item.$id,
|
|
254
|
+
onRenderSummary: ({ item })=>/*#__PURE__*/ _jsx(Observer, {
|
|
255
|
+
children: ()=>/*#__PURE__*/ _jsx(_Fragment, {
|
|
256
|
+
children: item == null ? void 0 : item.label
|
|
257
|
+
})
|
|
258
|
+
}),
|
|
259
|
+
AccordionDetailsProps: {
|
|
260
|
+
sx: {
|
|
261
|
+
overflowX: 'hidden'
|
|
262
|
+
}
|
|
263
|
+
},
|
|
264
|
+
onRenderDetail: ({ item })=>/*#__PURE__*/ _jsx(Observer, {
|
|
265
|
+
children: ()=>{
|
|
266
|
+
var _item_items;
|
|
267
|
+
return /*#__PURE__*/ _jsx(Box, {
|
|
268
|
+
children: /*#__PURE__*/ _jsx(Box, {
|
|
269
|
+
"data-testid": "picker-element-grid",
|
|
270
|
+
sx: {
|
|
271
|
+
display: 'grid',
|
|
272
|
+
gridTemplateColumns: `repeat(auto-fill, minmax(${MIN_TILE_WIDTH}px, 1fr))`,
|
|
273
|
+
gap: 3,
|
|
274
|
+
minWidth: 0
|
|
275
|
+
},
|
|
276
|
+
children: item == null ? void 0 : (_item_items = item.items) == null ? void 0 : _item_items.map((node, index)=>{
|
|
277
|
+
var _ref;
|
|
278
|
+
return /*#__PURE__*/ _jsx(Observer, {
|
|
279
|
+
children: ()=>/*#__PURE__*/ _jsx(NodeCard, {
|
|
280
|
+
sx: [
|
|
281
|
+
{
|
|
282
|
+
cursor: 'pointer'
|
|
283
|
+
},
|
|
284
|
+
(selected == null ? void 0 : selected.$id) === (node == null ? void 0 : node.$id) ? {
|
|
285
|
+
borderColor: 'primary.main'
|
|
286
|
+
} : null
|
|
287
|
+
],
|
|
288
|
+
node: node,
|
|
289
|
+
onClick: (e)=>handleItemClick(e, node)
|
|
290
|
+
})
|
|
291
|
+
}, (_ref = node == null ? void 0 : node.$id) != null ? _ref : index);
|
|
292
|
+
})
|
|
293
|
+
})
|
|
294
|
+
});
|
|
295
|
+
}
|
|
296
|
+
})
|
|
297
|
+
})
|
|
298
|
+
}),
|
|
299
|
+
/*#__PURE__*/ _jsxs(Box, {
|
|
300
|
+
sx: {
|
|
301
|
+
flex: {
|
|
302
|
+
xs: '0 0 auto',
|
|
303
|
+
md: PANE_SPLIT
|
|
304
|
+
},
|
|
305
|
+
width: {
|
|
306
|
+
xs: 1,
|
|
307
|
+
md: 'auto'
|
|
308
|
+
},
|
|
309
|
+
minWidth: 0,
|
|
310
|
+
display: 'flex',
|
|
311
|
+
flexDirection: 'column',
|
|
312
|
+
// Stacked, the divider that separates the panes is above it,
|
|
313
|
+
// not beside it.
|
|
314
|
+
borderLeft: {
|
|
315
|
+
xs: 0,
|
|
316
|
+
md: 1
|
|
317
|
+
},
|
|
318
|
+
borderTop: {
|
|
319
|
+
xs: 1,
|
|
320
|
+
md: 0
|
|
321
|
+
},
|
|
322
|
+
borderColor: 'divider',
|
|
323
|
+
backgroundColor: 'surface.main'
|
|
324
|
+
},
|
|
325
|
+
children: [
|
|
326
|
+
/*#__PURE__*/ _jsx(Box, {
|
|
327
|
+
sx: {
|
|
328
|
+
flex: 1,
|
|
329
|
+
minHeight: 0,
|
|
330
|
+
overflowY: 'auto',
|
|
331
|
+
p: 2
|
|
332
|
+
},
|
|
333
|
+
children: selected ? /* The same content component the panel floats over the
|
|
334
|
+
canvas — one description of an element, two placements. */ /*#__PURE__*/ _jsx(ElementDetailView, {
|
|
335
|
+
detail: describeElement(selected),
|
|
336
|
+
node: selected,
|
|
337
|
+
previewHeight: 380
|
|
338
|
+
}) : /*#__PURE__*/ _jsx(Typography, {
|
|
339
|
+
variant: "caption",
|
|
340
|
+
color: "textSecondary",
|
|
341
|
+
children: 'Choose an element to see what it does.'
|
|
342
|
+
})
|
|
343
|
+
}),
|
|
344
|
+
/*#__PURE__*/ _jsx(Box, {
|
|
345
|
+
sx: {
|
|
346
|
+
p: 1.5,
|
|
347
|
+
borderTop: 1,
|
|
348
|
+
borderColor: 'divider'
|
|
349
|
+
},
|
|
350
|
+
children: /*#__PURE__*/ _jsx(Button, {
|
|
351
|
+
fullWidth: true,
|
|
352
|
+
variant: "contained",
|
|
353
|
+
disabled: !selected,
|
|
354
|
+
onClick: handleConfirm,
|
|
355
|
+
children: 'Confirm'
|
|
356
|
+
})
|
|
357
|
+
})
|
|
358
|
+
]
|
|
359
|
+
})
|
|
360
|
+
]
|
|
361
|
+
})
|
|
362
|
+
]
|
|
363
|
+
}));
|
|
364
|
+
}));
|
|
365
|
+
ComponentPicker.displayName = 'ComponentPicker';
|
|
366
|
+
export default ComponentPicker;
|
|
367
|
+
|
|
368
|
+
//# sourceMappingURL=component-picker.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../../../../../../libs/besigner/feature/designer/src/lib/components/component-picker.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 {\n ICON_VARIANT_CLOSE,\n ICON_VARIANT_FILTER,\n} from '@aglyn/shared-data-enums'\nimport { MdiIcon } from '@aglyn/shared-ui-jsx'\nimport {\n AppBar,\n Box,\n Button,\n Collapse,\n Dialog,\n DialogContent,\n Divider,\n DialogProps,\n IconButton,\n Slide,\n Toolbar,\n Typography,\n} from '@mui/material'\nimport type { TransitionProps } from '@mui/material/transitions'\nimport { Observer, observer } from 'mobx-react-lite'\nimport { forwardRef, SyntheticEvent, useCallback, useState } from 'react'\nimport usePickerFilter from '../hooks/use-picker-filter'\nimport useVisibleComponentCategories from '../hooks/use-visible-component-categories'\nimport { describeElement } from '../utils/describe-element'\nimport AccordionListComponent from './accordion-list.component'\nimport ElementDetailView from './element-detail.component'\nimport EmptyResults from './empty-results'\nimport NodeCard from './node-card'\nimport PickerSearchField from './picker-search-field'\n\nconst Transition = forwardRef(function Transition(\n props: TransitionProps & {\n children: React.ReactElement\n },\n ref: React.Ref<unknown>,\n) {\n return <Slide direction=\"up\" ref={ref} {...props} />\n})\n\ntype PickerOption = Aglyn.ComponentSchema<any> | Aglyn.PresetSchema<any>\n\n/**\n * How the two panes share the dialog above the stacking breakpoint\n * (AGL-2486).\n *\n * An even split, because the preview is sized by the pane and nothing else:\n * `ElementPreview` composes at a fixed 1280px stage and scales by\n * `paneWidth / 1280`, so the pane's width IS the preview's size. A 420px\n * pane rendered at 0.30; half of a 1536px dialog renders at 0.57, which is\n * the \"make the preview bigger\" ask answered by arithmetic rather than by a\n * bigger `previewHeight` cap on the same small stage.\n *\n * The grid does not pay for it. At an even split the tiles keep their full\n * `MIN_TILE_WIDTH` — a 1944px screen runs four 166px tiles where the fixed\n * pane ran six 161px ones. Fewer columns, no narrower tiles.\n */\nconst PANE_SPLIT = '1 1 50%'\n\n/**\n * Narrowest a tile may be before its label stops fitting, in px (AGL-2486).\n *\n * The grid used to size its tiles off the VIEWPORT breakpoint (`sm` → 3/12 →\n * four columns) which is the wrong question to ask: the tiles live in a pane\n * whose width is the dialog minus the detail pane, and a viewport breakpoint\n * cannot see the pane. So the detail pane came out of the tiles — four\n * columns in 448px, 94px each, with `Announcement Bar` painting outside its\n * own card. `auto-fill` asks the pane instead, so the two panes stop trading:\n * widening the dialog adds columns, and the detail pane costs columns rather\n * than shrinking every tile.\n *\n * 150px is measured, not chosen: the widest single word in the catalogue\n * (`Announcement`) needs ~100px at `subtitle2`, and the tiles that survive\n * on one line at 150 are the ones that wrapped at 94.\n */\nconst MIN_TILE_WIDTH = 150\n\nexport interface ComponentPickerProps extends DialogProps {\n onSelectItem?: (e: SyntheticEvent, item?: { option: PickerOption }) => void\n}\n\nexport const ComponentPicker = observer(\n forwardRef<any, ComponentPickerProps>((props, forwardRef) => {\n const { open, onClose, onSelectItem, ...rest } = props\n const allItems = useVisibleComponentCategories()\n\n const [filterOpen, setFilterOpen] = useState(false)\n const [selected, setSelected] = useState<PickerOption>(null)\n\n const clearSelected = useCallback(() => setSelected(null), [])\n\n // The SAME search the Elements panel runs (AGL-2486). Both surfaces read\n // one hook so a query cannot mean two different things depending on\n // which picker you happened to open.\n const { filter, items, handleFilterChange } = usePickerFilter(\n allItems,\n clearSelected,\n )\n\n const handleConfirm = useCallback(\n (e: SyntheticEvent) => {\n onSelectItem?.(e, { option: selected })\n },\n [selected, onSelectItem],\n )\n\n const handleClose = useCallback(\n (e: object, reason = 'canceled') => {\n onClose?.(\n e,\n reason as Parameters<NonNullable<DialogProps['onClose']>>[1],\n )\n },\n [onClose],\n )\n\n const handleItemClick = useCallback((e, item: PickerOption) => {\n setSelected((prev) => {\n if (prev && prev?.$id === item?.$id) {\n return null\n }\n return item\n })\n }, [])\n\n return (\n <Dialog\n ref={forwardRef}\n onClose={handleClose}\n open={open}\n // Picking one of ~110 elements is a browsing task, not a confirm box\n // (AGL-2486). At `md` the paper was 900px on a 1944px screen and the\n // detail pane took 420 of it, leaving the grid narrower than the\n // whole dialog had been before the pane existed.\n //\n // `fullWidth` rather than the `width: '100%'` this carried before:\n // `100%` ignores the paper's own 32px margins, so the paper overflows\n // the viewport at any width below its cap. That was invisible while\n // the cap was 900 and would be a horizontal scrollbar on every laptop\n // at this one.\n maxWidth=\"xl\"\n fullWidth\n slots={{ transition: Transition }}\n {...rest}\n >\n {/* Shared app-bar treatment (AGL-704) — see the console's\n secondary-app-bar. enableColorOnDark is required or AppBar\n substitutes its own dark-mode colour. */}\n <AppBar position=\"relative\" color=\"surface\" enableColorOnDark>\n <Toolbar>\n <IconButton\n edge=\"start\"\n color=\"inherit\"\n onClick={handleClose}\n aria-label=\"close\"\n >\n <MdiIcon path={ICON_VARIANT_CLOSE.path} />\n </IconButton>\n <Typography\n variant=\"h6\"\n component=\"div\"\n noWrap\n sx={{\n textOverflow: 'ellipsis',\n ml: 2,\n flex: 1,\n }}\n >\n {'Choose element'}\n </Typography>\n <IconButton\n type=\"button\"\n color=\"inherit\"\n sx={{ p: '10px' }}\n aria-label=\"search\"\n onClick={() => setFilterOpen((prev) => !prev)}\n >\n <MdiIcon path={ICON_VARIANT_FILTER.path} />\n </IconButton>\n <Divider sx={{ height: 28, m: 0.5 }} orientation=\"vertical\" />\n <Button autoFocus color=\"inherit\" onClick={handleClose}>\n {'Close'}\n </Button>\n </Toolbar>\n\n <Collapse orientation=\"vertical\" in={filterOpen}>\n <Toolbar\n component=\"form\"\n variant=\"dense\"\n sx={{\n display: 'flex',\n alignItems: 'center',\n width: 1,\n borderTop: 1,\n borderColor: 'divider',\n }}\n >\n <PickerSearchField value={filter} onChange={handleFilterChange} />\n </Toolbar>\n </Collapse>\n </AppBar>\n {/* Grid left, detail right (AGL-2486). The detail used to be a strip\n under the grid, which gave a preview and five facts about a\n quarter of the height they need while the modal's width sat\n unused. A full-height pane is also the first place the rendered\n preview has room to be worth drawing. */}\n <DialogContent\n dividers\n sx={{\n p: 0,\n display: 'flex',\n // `md` is where an even split stops paying for itself, and the\n // number is derived rather than picked: at a 900px viewport the\n // paper is 836px, so each pane is 418. That is the LAST width at\n // which the grid still runs two full-width tiles (2×150 + a 24\n // gap + 32 of padding = 356) and the preview still composes at\n // the 0.30 scale it had in the old fixed 420px pane. Below it,\n // sharing a row makes both panes worse than stacking, where each\n // gets the dialog's whole width — so the preview gets BIGGER on\n // a tablet, not smaller.\n //\n // Stacking also keeps Confirm reachable. The pane used to be\n // `display: none` under `sm` and Confirm lives inside it, so the\n // dialog could be browsed and never used on a phone.\n flexDirection: { xs: 'column', md: 'row' },\n alignItems: 'stretch',\n minHeight: '60vh',\n }}\n >\n <Box\n sx={{\n flex: { xs: '1 1 auto', md: PANE_SPLIT },\n // Without this the tiles' intrinsic width becomes the pane's\n // floor and the split silently stops being even.\n minWidth: 0,\n // Stacked, the panes scroll together as one column; side by\n // side, the grid scrolls under a detail pane that stays put.\n overflowY: { xs: 'visible', md: 'auto' },\n }}\n >\n {!items?.length ? (\n <EmptyResults sx={{ minHeight: '40vh', height: 1 }} />\n ) : (\n <AccordionListComponent\n // No `key` remount to force the results group open\n // (AGL-2486) — see the Elements panel for why that could not\n // work. The list opens a group when it first appears.\n items={items}\n defaultExpanded={items.map((i) => i.$id)}\n getItemId={(item) => item?.$id}\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 {/* A CSS grid, not a 12-column one: the column count\n has to come from the pane's own width. See\n MIN_TILE_WIDTH. `1fr` as the max so the last\n column is not a ragged remainder. */}\n <Box\n data-testid=\"picker-element-grid\"\n sx={{\n display: 'grid',\n gridTemplateColumns: `repeat(auto-fill, minmax(${MIN_TILE_WIDTH}px, 1fr))`,\n gap: 3,\n minWidth: 0,\n }}\n >\n {item?.items?.map(\n (\n node: (typeof allItems)[number]['items'][number],\n index: number,\n ) => (\n <Observer key={node?.$id ?? index}>\n {() => (\n <NodeCard\n sx={[\n { cursor: 'pointer' },\n selected?.$id === node?.$id\n ? { borderColor: 'primary.main' }\n : null,\n ]}\n node={node as any}\n onClick={(e) => handleItemClick(e, node)}\n />\n )}\n </Observer>\n ),\n )}\n </Box>\n </Box>\n )}\n </Observer>\n )}\n />\n )}\n </Box>\n <Box\n sx={{\n flex: { xs: '0 0 auto', md: PANE_SPLIT },\n width: { xs: 1, md: 'auto' },\n minWidth: 0,\n display: 'flex',\n flexDirection: 'column',\n // Stacked, the divider that separates the panes is above it,\n // not beside it.\n borderLeft: { xs: 0, md: 1 },\n borderTop: { xs: 1, md: 0 },\n borderColor: 'divider',\n backgroundColor: 'surface.main',\n }}\n >\n <Box sx={{ flex: 1, minHeight: 0, overflowY: 'auto', p: 2 }}>\n {selected ? (\n /* The same content component the panel floats over the\n canvas — one description of an element, two placements. */\n <ElementDetailView\n detail={describeElement(selected)}\n node={selected}\n previewHeight={380}\n />\n ) : (\n <Typography variant=\"caption\" color=\"textSecondary\">\n {'Choose an element to see what it does.'}\n </Typography>\n )}\n </Box>\n {/* Anchored to the pane rather than the dialog: Confirm belongs\n with the thing being confirmed. */}\n <Box sx={{ p: 1.5, borderTop: 1, borderColor: 'divider' }}>\n <Button\n fullWidth\n variant=\"contained\"\n disabled={!selected}\n onClick={handleConfirm}\n >\n {'Confirm'}\n </Button>\n </Box>\n </Box>\n </DialogContent>\n </Dialog>\n )\n }),\n)\nComponentPicker.displayName = 'ComponentPicker'\n\nexport default ComponentPicker\n"],"names":["ICON_VARIANT_CLOSE","ICON_VARIANT_FILTER","MdiIcon","AppBar","Box","Button","Collapse","Dialog","DialogContent","Divider","IconButton","Slide","Toolbar","Typography","Observer","observer","forwardRef","useCallback","useState","usePickerFilter","useVisibleComponentCategories","describeElement","AccordionListComponent","ElementDetailView","EmptyResults","NodeCard","PickerSearchField","Transition","props","ref","direction","PANE_SPLIT","MIN_TILE_WIDTH","ComponentPicker","open","onClose","onSelectItem","rest","allItems","filterOpen","setFilterOpen","selected","setSelected","clearSelected","filter","items","handleFilterChange","handleConfirm","e","option","handleClose","reason","handleItemClick","item","prev","$id","maxWidth","fullWidth","slots","transition","position","color","enableColorOnDark","edge","onClick","aria-label","path","variant","component","noWrap","sx","textOverflow","ml","flex","type","p","height","m","orientation","autoFocus","in","display","alignItems","width","borderTop","borderColor","value","onChange","dividers","flexDirection","xs","md","minHeight","minWidth","overflowY","length","defaultExpanded","map","i","getItemId","onRenderSummary","label","AccordionDetailsProps","overflowX","onRenderDetail","data-testid","gridTemplateColumns","gap","node","index","cursor","borderLeft","backgroundColor","detail","previewHeight","disabled","displayName"],"mappings":"AAAA;;;;;;;;;;;;;;;CAeC;;;AAGD,SACEA,kBAAkB,EAClBC,mBAAmB,QACd,2BAA0B;AACjC,SAASC,OAAO,QAAQ,uBAAsB;AAC9C,SACEC,MAAM,EACNC,GAAG,EACHC,MAAM,EACNC,QAAQ,EACRC,MAAM,EACNC,aAAa,EACbC,OAAO,EAEPC,UAAU,EACVC,KAAK,EACLC,OAAO,EACPC,UAAU,QACL,gBAAe;AAEtB,SAASC,QAAQ,EAAEC,QAAQ,QAAQ,kBAAiB;AACpD,SAASC,UAAU,EAAkBC,WAAW,EAAEC,QAAQ,QAAQ,QAAO;AACzE,OAAOC,qBAAqB,gCAA4B;AACxD,OAAOC,mCAAmC,+CAA2C;AACrF,SAASC,eAAe,QAAQ,+BAA2B;AAC3D,OAAOC,4BAA4B,gCAA4B;AAC/D,OAAOC,uBAAuB,gCAA4B;AAC1D,OAAOC,kBAAkB,qBAAiB;AAC1C,OAAOC,cAAc,iBAAa;AAClC,OAAOC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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 { AglynNodePresetSchema } from '@aglyn/aglyn';
|
|
18
|
+
import { type GridListProps } from '@aglyn/shared-ui-jsx/components/grid-list';
|
|
19
|
+
import { type MouseEvent } from 'react';
|
|
20
|
+
export interface ComponentsGridListProps extends Partial<GridListProps> {
|
|
21
|
+
items?: AglynNodePresetSchema[];
|
|
22
|
+
onActionClick?: {
|
|
23
|
+
bivarianceHack<T>(event: null | MouseEvent<T>, data: {
|
|
24
|
+
type: string;
|
|
25
|
+
data: AglynNodePresetSchema;
|
|
26
|
+
}): void;
|
|
27
|
+
}['bivarianceHack'];
|
|
28
|
+
maxColumns?: number;
|
|
29
|
+
}
|
|
30
|
+
export declare const ComponentsGridListComponent: import("react").ForwardRefExoticComponent<ComponentsGridListProps & import("react").RefAttributes<any>>;
|
|
31
|
+
export default ComponentsGridListComponent;
|
|
@@ -0,0 +1,162 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright 2026 Aglyn LLC
|
|
4
|
+
*
|
|
5
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
6
|
+
* you may not use this file except in compliance with the License.
|
|
7
|
+
* You may obtain a copy of the License at
|
|
8
|
+
*
|
|
9
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
10
|
+
*
|
|
11
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
12
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
13
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
14
|
+
* See the License for the specific language governing permissions and
|
|
15
|
+
* limitations under the License.
|
|
16
|
+
*/ import { _ as _extends } from "@swc/helpers/_/_extends";
|
|
17
|
+
import { _ as _object_without_properties_loose } from "@swc/helpers/_/_object_without_properties_loose";
|
|
18
|
+
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
19
|
+
import { ICON_VARIANT_MENU_DOWN, ICON_VARIANT_SYMBOL_CONFIRMED } from "@aglyn/shared-data-enums";
|
|
20
|
+
import { GridList } from "@aglyn/shared-ui-jsx/components/grid-list";
|
|
21
|
+
import { MdiIcon, Menu } from "@aglyn/shared-ui-jsx";
|
|
22
|
+
import { mergeSxProps } from "@aglyn/shared-ui-theme";
|
|
23
|
+
import { arrayFromLength } from "@aglyn/shared-util-tools";
|
|
24
|
+
import { Box, Button, ButtonBase, Tooltip, Typography } from "@mui/material";
|
|
25
|
+
import { forwardRef, useCallback, useMemo, useState } from "react";
|
|
26
|
+
import ElementCardComponent from "./element-card.component.js";
|
|
27
|
+
const endIcon = (value, active)=>value !== active ? undefined : {
|
|
28
|
+
path: ICON_VARIANT_SYMBOL_CONFIRMED.path
|
|
29
|
+
};
|
|
30
|
+
export const ComponentsGridListComponent = /*#__PURE__*/ forwardRef((props, ref)=>{
|
|
31
|
+
const { onActionClick, items = [], sx, maxColumns = 4 } = props, rest = _object_without_properties_loose(props, [
|
|
32
|
+
"onActionClick",
|
|
33
|
+
"items",
|
|
34
|
+
"sx",
|
|
35
|
+
"maxColumns"
|
|
36
|
+
]);
|
|
37
|
+
const [columns, setColumns] = useState(maxColumns);
|
|
38
|
+
const handleColumnChange = useCallback((columns)=>(e)=>{
|
|
39
|
+
setColumns(columns);
|
|
40
|
+
}, []);
|
|
41
|
+
const handleOnActionClick = useCallback((e, item)=>{
|
|
42
|
+
onActionClick == null ? void 0 : onActionClick.call(null, e, {
|
|
43
|
+
type: 'selection',
|
|
44
|
+
data: item == null ? void 0 : item.data
|
|
45
|
+
});
|
|
46
|
+
}, [
|
|
47
|
+
onActionClick
|
|
48
|
+
]);
|
|
49
|
+
const columnOptions = useMemo(()=>{
|
|
50
|
+
return arrayFromLength(maxColumns).map((_, index)=>({
|
|
51
|
+
value: index + 1,
|
|
52
|
+
children: `${index + 1} columns`,
|
|
53
|
+
onClick: handleColumnChange(index + 1),
|
|
54
|
+
endIcon: endIcon(index + 1, columns),
|
|
55
|
+
selected: columns === index + 1
|
|
56
|
+
}));
|
|
57
|
+
}, [
|
|
58
|
+
handleColumnChange,
|
|
59
|
+
columns,
|
|
60
|
+
maxColumns
|
|
61
|
+
]);
|
|
62
|
+
const renderItemContent = useCallback((item)=>{
|
|
63
|
+
return /*#__PURE__*/ _jsx(ElementCardComponent, {
|
|
64
|
+
component: ButtonBase,
|
|
65
|
+
onClick: (e)=>handleOnActionClick(e, item),
|
|
66
|
+
label: (// Component cards show name + short description (AGL-93
|
|
67
|
+
// drawer polish, per the component-builder mockup).
|
|
68
|
+
item == null ? void 0 : item.description) ? /*#__PURE__*/ _jsxs(_Fragment, {
|
|
69
|
+
children: [
|
|
70
|
+
item == null ? void 0 : item.label,
|
|
71
|
+
/*#__PURE__*/ _jsx(Typography, {
|
|
72
|
+
variant: "caption",
|
|
73
|
+
color: "text.secondary",
|
|
74
|
+
component: "div",
|
|
75
|
+
sx: {
|
|
76
|
+
lineHeight: 1.25,
|
|
77
|
+
mt: 0.25
|
|
78
|
+
},
|
|
79
|
+
children: item.description
|
|
80
|
+
})
|
|
81
|
+
]
|
|
82
|
+
}) : item == null ? void 0 : item.label,
|
|
83
|
+
icon: item == null ? void 0 : item.icon,
|
|
84
|
+
item: _extends({
|
|
85
|
+
id: item == null ? void 0 : item.$id
|
|
86
|
+
}, item)
|
|
87
|
+
});
|
|
88
|
+
}, [
|
|
89
|
+
handleOnActionClick
|
|
90
|
+
]);
|
|
91
|
+
return /*#__PURE__*/ _jsx(GridList, _extends({
|
|
92
|
+
ref: ref,
|
|
93
|
+
GridContainerProps: {
|
|
94
|
+
spacing: 1,
|
|
95
|
+
children: /*#__PURE__*/ _jsx(Box, {
|
|
96
|
+
sx: {
|
|
97
|
+
mb: 2
|
|
98
|
+
},
|
|
99
|
+
children: /*#__PURE__*/ _jsx(Menu, {
|
|
100
|
+
id: "aglyn:component-drawer-columns-changer",
|
|
101
|
+
items: columnOptions,
|
|
102
|
+
// MenuProps={{variant: 'selectedMenu'}}
|
|
103
|
+
sx: {
|
|
104
|
+
display: {
|
|
105
|
+
xs: 'none',
|
|
106
|
+
sm: 'block'
|
|
107
|
+
}
|
|
108
|
+
},
|
|
109
|
+
children: /*#__PURE__*/ _jsx(Tooltip, {
|
|
110
|
+
title: 'Columns',
|
|
111
|
+
children: /*#__PURE__*/ _jsxs(Button, {
|
|
112
|
+
"aria-label": "columns",
|
|
113
|
+
"aria-haspopup": "menu",
|
|
114
|
+
"aria-controls": 'aglyn:component-drawer-columns-changer',
|
|
115
|
+
endIcon: /*#__PURE__*/ _jsx(MdiIcon, {
|
|
116
|
+
fontSize: "inherit",
|
|
117
|
+
path: ICON_VARIANT_MENU_DOWN.path
|
|
118
|
+
}),
|
|
119
|
+
sx: {
|
|
120
|
+
borderColor: 'divider',
|
|
121
|
+
'& .MuiButton-endIcon': {
|
|
122
|
+
ml: 0.15
|
|
123
|
+
},
|
|
124
|
+
'& .MuiButton-startIcon': {
|
|
125
|
+
mr: 0.85
|
|
126
|
+
}
|
|
127
|
+
},
|
|
128
|
+
children: [
|
|
129
|
+
columns,
|
|
130
|
+
" Columns"
|
|
131
|
+
]
|
|
132
|
+
})
|
|
133
|
+
})
|
|
134
|
+
})
|
|
135
|
+
})
|
|
136
|
+
},
|
|
137
|
+
GridItemProps: {
|
|
138
|
+
size: {
|
|
139
|
+
xs: 6,
|
|
140
|
+
sm: Math.floor(12 / columns)
|
|
141
|
+
}
|
|
142
|
+
},
|
|
143
|
+
renderItemContent: renderItemContent,
|
|
144
|
+
items: items,
|
|
145
|
+
sx: mergeSxProps({
|
|
146
|
+
overflowX: 'hidden',
|
|
147
|
+
'& .AglynGridList-itemContent': {
|
|
148
|
+
width: '100%',
|
|
149
|
+
height: '100%',
|
|
150
|
+
display: 'flex',
|
|
151
|
+
textAlign: 'center',
|
|
152
|
+
flexDirection: 'column',
|
|
153
|
+
justifyContent: 'space-evenly'
|
|
154
|
+
}
|
|
155
|
+
}, sx)
|
|
156
|
+
}, rest));
|
|
157
|
+
});
|
|
158
|
+
ComponentsGridListComponent.displayName = 'ComponentsGridListComponent';
|
|
159
|
+
ComponentsGridListComponent.aglyn = true;
|
|
160
|
+
export default ComponentsGridListComponent;
|
|
161
|
+
|
|
162
|
+
//# sourceMappingURL=components-grid-list.component.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../../../../../../libs/besigner/feature/designer/src/lib/components/components-grid-list.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 type { AglynNodePresetSchema } from '@aglyn/aglyn'\nimport {\n ICON_VARIANT_MENU_DOWN,\n ICON_VARIANT_SYMBOL_CONFIRMED,\n} from '@aglyn/shared-data-enums'\nimport { GridList, type GridListProps } from '@aglyn/shared-ui-jsx/components/grid-list'\nimport { MdiIcon, Menu } from '@aglyn/shared-ui-jsx'\nimport { mergeSxProps } from '@aglyn/shared-ui-theme'\nimport { arrayFromLength } from '@aglyn/shared-util-tools'\nimport { Box, Button, ButtonBase, Tooltip, Typography } from '@mui/material'\nimport {\n forwardRef,\n type MouseEvent,\n useCallback,\n useMemo,\n useState,\n} from 'react'\nimport ElementCardComponent from './element-card.component'\n\nconst endIcon = (value: number, active: number) =>\n value !== active\n ? undefined\n : {\n path: ICON_VARIANT_SYMBOL_CONFIRMED.path,\n }\n\nexport interface ComponentsGridListProps extends Partial<GridListProps> {\n items?: AglynNodePresetSchema[]\n onActionClick?: {\n bivarianceHack<T>(\n event: null | MouseEvent<T>,\n data: { type: string; data: AglynNodePresetSchema },\n ): void\n }['bivarianceHack']\n maxColumns?: number\n}\n\nexport const ComponentsGridListComponent = forwardRef<\n any,\n ComponentsGridListProps\n>((props, ref) => {\n const { onActionClick, items = [], sx, maxColumns = 4, ...rest } = props\n\n const [columns, setColumns] = useState(maxColumns)\n const handleColumnChange = useCallback(\n (columns: number) => (e) => {\n setColumns(columns)\n },\n [],\n )\n const handleOnActionClick = useCallback(\n (e, item) => {\n onActionClick?.call(null, e, { type: 'selection', data: item?.data })\n },\n [onActionClick],\n )\n\n const columnOptions = useMemo(() => {\n return arrayFromLength(maxColumns).map((_, index) => ({\n value: index + 1,\n children: `${index + 1} columns`,\n onClick: handleColumnChange(index + 1),\n endIcon: endIcon(index + 1, columns),\n selected: columns === index + 1,\n }))\n }, [handleColumnChange, columns, maxColumns])\n\n const renderItemContent = useCallback(\n (item: Aglyn.PresetSchema<any>) => {\n return (\n <ElementCardComponent\n component={ButtonBase}\n onClick={(e) => handleOnActionClick(e, item)}\n label={\n // Component cards show name + short description (AGL-93\n // drawer polish, per the component-builder mockup).\n (item as any)?.description ? (\n <>\n {item?.label}\n <Typography\n variant=\"caption\"\n color=\"text.secondary\"\n component=\"div\"\n sx={{ lineHeight: 1.25, mt: 0.25 }}\n >\n {(item as any).description}\n </Typography>\n </>\n ) : (\n item?.label\n )\n }\n icon={item?.icon as any}\n item={{ id: item?.$id, ...item } as any}\n />\n )\n },\n [handleOnActionClick],\n )\n\n return (\n <GridList\n ref={ref}\n GridContainerProps={{\n spacing: 1,\n children: (\n <Box sx={{ mb: 2 }}>\n <Menu\n id=\"aglyn:component-drawer-columns-changer\"\n items={columnOptions}\n // MenuProps={{variant: 'selectedMenu'}}\n sx={{ display: { xs: 'none', sm: 'block' } }}\n >\n <Tooltip title={'Columns'}>\n <Button\n aria-label=\"columns\"\n aria-haspopup=\"menu\"\n aria-controls={'aglyn:component-drawer-columns-changer'}\n endIcon={\n <MdiIcon\n fontSize=\"inherit\"\n path={ICON_VARIANT_MENU_DOWN.path}\n />\n }\n sx={{\n borderColor: 'divider',\n '& .MuiButton-endIcon': { ml: 0.15 },\n '& .MuiButton-startIcon': { mr: 0.85 },\n }}\n >\n {columns} Columns\n </Button>\n </Tooltip>\n </Menu>\n </Box>\n ),\n }}\n GridItemProps={{\n size: {\n xs: 6,\n sm: Math.floor(12 / columns),\n },\n }}\n renderItemContent={renderItemContent}\n items={items}\n sx={mergeSxProps(\n {\n overflowX: 'hidden',\n '& .AglynGridList-itemContent': {\n width: '100%',\n height: '100%',\n display: 'flex',\n textAlign: 'center',\n flexDirection: 'column',\n justifyContent: 'space-evenly',\n },\n },\n sx,\n )}\n {...rest}\n />\n )\n})\n\nComponentsGridListComponent.displayName = 'ComponentsGridListComponent'\nComponentsGridListComponent.aglyn = true\n\nexport default ComponentsGridListComponent\n"],"names":["ICON_VARIANT_MENU_DOWN","ICON_VARIANT_SYMBOL_CONFIRMED","GridList","MdiIcon","Menu","mergeSxProps","arrayFromLength","Box","Button","ButtonBase","Tooltip","Typography","forwardRef","useCallback","useMemo","useState","ElementCardComponent","endIcon","value","active","undefined","path","ComponentsGridListComponent","props","ref","onActionClick","items","sx","maxColumns","rest","columns","setColumns","handleColumnChange","e","handleOnActionClick","item","call","type","data","columnOptions","map","_","index","children","onClick","selected","renderItemContent","component","label","description","variant","color","lineHeight","mt","icon","id","$id","GridContainerProps","spacing","mb","display","xs","sm","title","aria-label","aria-haspopup","aria-controls","fontSize","borderColor","ml","mr","GridItemProps","size","Math","floor","overflowX","width","height","textAlign","flexDirection","justifyContent","displayName","aglyn"],"mappings":"AAAA;;;;;;;;;;;;;;;CAeC;;;AAID,SACEA,sBAAsB,EACtBC,6BAA6B,QACxB,2BAA0B;AACjC,SAASC,QAAQ,QAA4B,4CAA2C;AACxF,SAASC,OAAO,EAAEC,IAAI,QAAQ,uBAAsB;AACpD,SAASC,YAAY,QAAQ,yBAAwB;AACrD,SAASC,eAAe,QAAQ,2BAA0B;AAC1D,SAASC,GAAG,EAAEC,MAAM,EAAEC,UAAU,EAAEC,OAAO,EAAEC,UAAU,QAAQ,gBAAe;AAC5E,SACEC,UAAU,EAEVC,WAAW,EACXC,OAAO,EACPC,QAAQ,QACH,QAAO;AACd,OAAOC,0BAA0B,8BAA0B;AAE3D,MAAMC,UAAU,CAACC,OAAeC,SAC9BD,UAAUC,SACNC,YACA;QACEC,MAAMpB,8BAA8BoB,IAAI;IAC1C;AAaN,OAAO,MAAMC,4CAA8BV,WAGzC,CAACW,OAAOC;IACR,MAAM,EAAEC,aAAa,EAAEC,QAAQ,EAAE,EAAEC,EAAE,EAAEC,aAAa,CAAC,EAAW,GAAGL,OAATM,wCAASN;;;;;;IAEnE,MAAM,CAACO,SAASC,WAAW,GAAGhB,SAASa;IACvC,MAAMI,qBAAqBnB,YACzB,CAACiB,UAAoB,CAACG;YACpBF,WAAWD;QACb,GACA,EAAE;IAEJ,MAAMI,sBAAsBrB,YAC1B,CAACoB,GAAGE;QACFV,iCAAAA,cAAeW,IAAI,CAAC,MAAMH,GAAG;YAAEI,MAAM;YAAaC,IAAI,EAAEH,wBAAAA,KAAMG,IAAI;QAAC;IACrE,GACA;QAACb;KAAc;IAGjB,MAAMc,gBAAgBzB,QAAQ;QAC5B,OAAOR,gBAAgBsB,YAAYY,GAAG,CAAC,CAACC,GAAGC,QAAW,CAAA;gBACpDxB,OA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