@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,139 @@
|
|
|
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 } 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 * as Besigner from "@aglyn/besigner";
|
|
20
|
+
import { generateComponentClassKeys } from "@aglyn/shared-ui-theme";
|
|
21
|
+
import { _isEqualitySameType } from "@aglyn/shared-util-tools";
|
|
22
|
+
import { Portal, styled } from "@mui/material";
|
|
23
|
+
import clsx from "clsx";
|
|
24
|
+
import { motion } from "framer-motion";
|
|
25
|
+
import { forwardRef } from "react";
|
|
26
|
+
const classes = generateComponentClassKeys('DropIndicator', [
|
|
27
|
+
'root',
|
|
28
|
+
'line',
|
|
29
|
+
'handle'
|
|
30
|
+
]);
|
|
31
|
+
const lineW = 6;
|
|
32
|
+
const handleW = lineW + lineW * 1.27;
|
|
33
|
+
const handleHalf = handleW / 2;
|
|
34
|
+
const Indicator = styled(motion.div, {
|
|
35
|
+
name: 'DropIndicator',
|
|
36
|
+
shouldForwardProp: (propName)=>!_isEqualitySameType(propName, null, 'variant', 'visible')
|
|
37
|
+
})(({ theme, variant })=>{
|
|
38
|
+
const vertical = variant === 'vertical';
|
|
39
|
+
// In CSS vars mode, theme.palette.* is always the static light values.
|
|
40
|
+
// Use (theme.vars || theme) so these become live CSS custom-property refs.
|
|
41
|
+
const tv = theme.vars || theme;
|
|
42
|
+
return {
|
|
43
|
+
position: 'absolute',
|
|
44
|
+
display: 'flex',
|
|
45
|
+
flexDirection: vertical ? 'column' : 'row',
|
|
46
|
+
alignItems: 'center',
|
|
47
|
+
justifyContent: 'center',
|
|
48
|
+
zIndex: theme.zIndex.modal,
|
|
49
|
+
[`& .${classes.line}`]: {
|
|
50
|
+
// Slate, not the accent (AGL-1194): the indicator is drawn over the
|
|
51
|
+
// user's design and must not read as part of it.
|
|
52
|
+
border: `${lineW / 2}px solid ${tv.palette.tertiary.main}`,
|
|
53
|
+
flexGrow: 1,
|
|
54
|
+
width: !vertical ? undefined : lineW,
|
|
55
|
+
height: !vertical ? lineW : undefined,
|
|
56
|
+
display: 'block',
|
|
57
|
+
content: '""'
|
|
58
|
+
},
|
|
59
|
+
[`& .${classes.handle}`]: {
|
|
60
|
+
backgroundColor: tv.palette.surface.main,
|
|
61
|
+
borderRadius: handleW,
|
|
62
|
+
border: `1px solid ${tv.palette.tertiary.dark}`,
|
|
63
|
+
width: handleW,
|
|
64
|
+
height: handleW,
|
|
65
|
+
display: 'block',
|
|
66
|
+
content: '""'
|
|
67
|
+
}
|
|
68
|
+
};
|
|
69
|
+
});
|
|
70
|
+
export const DropIndicator = /*#__PURE__*/ forwardRef((props, ref)=>{
|
|
71
|
+
const { visible, region, rect, className } = props, rest = _object_without_properties_loose(props, [
|
|
72
|
+
"visible",
|
|
73
|
+
"region",
|
|
74
|
+
"rect",
|
|
75
|
+
"className"
|
|
76
|
+
]);
|
|
77
|
+
const styles = {
|
|
78
|
+
[Besigner.DropRegion.LEFT]: {
|
|
79
|
+
left: rect.left - handleHalf,
|
|
80
|
+
top: rect.top - handleHalf,
|
|
81
|
+
height: rect.height + handleW,
|
|
82
|
+
width: undefined
|
|
83
|
+
},
|
|
84
|
+
[Besigner.DropRegion.TOP]: {
|
|
85
|
+
left: rect.left - handleHalf,
|
|
86
|
+
top: rect.top - handleHalf,
|
|
87
|
+
width: rect.width + handleW,
|
|
88
|
+
height: undefined
|
|
89
|
+
},
|
|
90
|
+
[Besigner.DropRegion.RIGHT]: {
|
|
91
|
+
left: rect.left + rect.width - handleHalf,
|
|
92
|
+
top: rect.top - handleHalf,
|
|
93
|
+
height: rect.height + handleW,
|
|
94
|
+
width: undefined
|
|
95
|
+
},
|
|
96
|
+
[Besigner.DropRegion.BOTTOM]: {
|
|
97
|
+
left: rect.left - handleHalf,
|
|
98
|
+
top: rect.top + rect.height - handleHalf,
|
|
99
|
+
width: rect.width + handleW,
|
|
100
|
+
height: undefined
|
|
101
|
+
},
|
|
102
|
+
[Besigner.DropRegion.CHILDREN]: {
|
|
103
|
+
left: rect.left + handleHalf,
|
|
104
|
+
top: rect.top + rect.height / 2 - handleHalf,
|
|
105
|
+
width: rect.width - handleW,
|
|
106
|
+
height: undefined
|
|
107
|
+
}
|
|
108
|
+
};
|
|
109
|
+
const vertical = region === Besigner.DropRegion.LEFT || region === Besigner.DropRegion.RIGHT;
|
|
110
|
+
return /*#__PURE__*/ _jsx(Portal, {
|
|
111
|
+
children: /*#__PURE__*/ _jsxs(Indicator, _extends({
|
|
112
|
+
ref: ref,
|
|
113
|
+
className: clsx(classes.root, className),
|
|
114
|
+
variant: vertical ? 'vertical' : 'horizontal',
|
|
115
|
+
animate: _extends({}, styles[region], {
|
|
116
|
+
visibility: visible ? 'visible' : 'hidden'
|
|
117
|
+
}),
|
|
118
|
+
transition: {
|
|
119
|
+
type: 'keyframes'
|
|
120
|
+
}
|
|
121
|
+
}, rest, {
|
|
122
|
+
children: [
|
|
123
|
+
/*#__PURE__*/ _jsx("div", {
|
|
124
|
+
className: classes.handle
|
|
125
|
+
}),
|
|
126
|
+
/*#__PURE__*/ _jsx("div", {
|
|
127
|
+
className: classes.line
|
|
128
|
+
}),
|
|
129
|
+
/*#__PURE__*/ _jsx("div", {
|
|
130
|
+
className: classes.handle
|
|
131
|
+
})
|
|
132
|
+
]
|
|
133
|
+
}))
|
|
134
|
+
});
|
|
135
|
+
});
|
|
136
|
+
DropIndicator.displayName = 'DropIndicator';
|
|
137
|
+
export default DropIndicator;
|
|
138
|
+
|
|
139
|
+
//# sourceMappingURL=drop-indicator.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../../../../../../../libs/besigner/feature/designer/src/lib/components/dnd/drop-indicator.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 * as Besigner from '@aglyn/besigner'\nimport { generateComponentClassKeys } from '@aglyn/shared-ui-theme'\nimport { _isEqualitySameType } from '@aglyn/shared-util-tools'\nimport { type ClientRect } from '@dnd-kit/core'\nimport { Portal, styled } from '@mui/material'\nimport clsx from 'clsx'\nimport { motion } from 'framer-motion'\nimport type { ComponentProps } from 'react'\nimport { forwardRef } from 'react'\n\nconst classes = generateComponentClassKeys('DropIndicator', [\n 'root',\n 'line',\n 'handle',\n])\n\ntype IndicatorProps = ComponentProps<typeof motion.div> & {\n variant?: 'vertical' | 'horizontal'\n // framer-motion's HTML prop types omit className; MUI styled() accepts it.\n className?: string\n}\n\nconst lineW = 6\nconst handleW = lineW + lineW * 1.27\nconst handleHalf = handleW / 2\n\nconst Indicator = styled(motion.div, {\n name: 'DropIndicator',\n shouldForwardProp: (propName) =>\n !_isEqualitySameType(propName, null, 'variant', 'visible'),\n})<IndicatorProps>(({ theme, variant }) => {\n const vertical = variant === 'vertical'\n // In CSS vars mode, theme.palette.* is always the static light values.\n // Use (theme.vars || theme) so these become live CSS custom-property refs.\n const tv = (theme as any).vars || theme\n\n return {\n position: 'absolute',\n display: 'flex',\n flexDirection: vertical ? 'column' : 'row',\n alignItems: 'center',\n justifyContent: 'center',\n zIndex: theme.zIndex.modal,\n\n [`& .${classes.line}`]: {\n // Slate, not the accent (AGL-1194): the indicator is drawn over the\n // user's design and must not read as part of it.\n border: `${lineW / 2}px solid ${tv.palette.tertiary.main}`,\n flexGrow: 1,\n width: !vertical ? undefined : lineW,\n height: !vertical ? lineW : undefined,\n display: 'block',\n content: '\"\"',\n },\n [`& .${classes.handle}`]: {\n backgroundColor: tv.palette.surface.main,\n borderRadius: handleW,\n border: `1px solid ${tv.palette.tertiary.dark}`,\n width: handleW,\n height: handleW,\n display: 'block',\n content: '\"\"',\n },\n }\n})\n\nexport interface DropIndicatorProps extends ComponentProps<typeof Indicator> {\n visible?: boolean\n rect: ClientRect\n region: Besigner.DropRegion\n // framer-motion's HTML prop types omit className; MUI styled() accepts it.\n className?: string\n}\n\nexport const DropIndicator = forwardRef<HTMLDivElement, DropIndicatorProps>(\n (props, ref) => {\n const { visible, region, rect, className, ...rest } = props\n\n const styles = {\n [Besigner.DropRegion.LEFT]: {\n left: rect.left - handleHalf,\n top: rect.top - handleHalf,\n height: rect.height + handleW,\n width: undefined,\n },\n [Besigner.DropRegion.TOP]: {\n left: rect.left - handleHalf,\n top: rect.top - handleHalf,\n width: rect.width + handleW,\n height: undefined,\n },\n [Besigner.DropRegion.RIGHT]: {\n left: rect.left + rect.width - handleHalf,\n top: rect.top - handleHalf,\n height: rect.height + handleW,\n width: undefined,\n },\n [Besigner.DropRegion.BOTTOM]: {\n left: rect.left - handleHalf,\n top: rect.top + rect.height - handleHalf,\n width: rect.width + handleW,\n height: undefined,\n },\n [Besigner.DropRegion.CHILDREN]: {\n left: rect.left + handleHalf,\n top: rect.top + rect.height / 2 - handleHalf,\n width: rect.width - handleW,\n height: undefined,\n },\n }\n\n const vertical =\n region === Besigner.DropRegion.LEFT ||\n region === Besigner.DropRegion.RIGHT\n\n return (\n <Portal>\n <Indicator\n ref={ref}\n className={clsx(classes.root, className)}\n variant={vertical ? 'vertical' : 'horizontal'}\n animate={{\n ...styles[region],\n visibility: visible ? 'visible' : 'hidden',\n }}\n transition={{ type: 'keyframes' }}\n {...rest}\n >\n <div className={classes.handle} />\n <div className={classes.line} />\n <div className={classes.handle} />\n </Indicator>\n </Portal>\n )\n },\n)\nDropIndicator.displayName = 'DropIndicator'\n\nexport default DropIndicator\n"],"names":["Besigner","generateComponentClassKeys","_isEqualitySameType","Portal","styled","clsx","motion","forwardRef","classes","lineW","handleW","handleHalf","Indicator","div","name","shouldForwardProp","propName","theme","variant","vertical","tv","vars","position","display","flexDirection","alignItems","justifyContent","zIndex","modal","line","border","palette","tertiary","main","flexGrow","width","undefined","height","content","handle","backgroundColor","surface","borderRadius","dark","DropIndicator","props","ref","visible","region","rect","className","rest","styles","DropRegion","LEFT","left","top","TOP","RIGHT","BOTTOM","CHILDREN","root","animate","visibility","transition","type","displayName"],"mappings":"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"}
|
|
@@ -0,0 +1,43 @@
|
|
|
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 * as Besigner from '@aglyn/besigner';
|
|
18
|
+
import { useDroppable } from '@dnd-kit/core';
|
|
19
|
+
import { CSSProperties, MutableRefObject } from 'react';
|
|
20
|
+
export interface DroppableChildProps<T extends {
|
|
21
|
+
$id: string;
|
|
22
|
+
}> extends Omit<DroppableProps<T>, 'children'> {
|
|
23
|
+
droppable: ReturnType<typeof useDroppable>;
|
|
24
|
+
style: CSSProperties;
|
|
25
|
+
forwardRef: MutableRefObject<any>;
|
|
26
|
+
}
|
|
27
|
+
export type DroppableChild<T extends {
|
|
28
|
+
$id: string;
|
|
29
|
+
}> = (props: DroppableChildProps<T>) => JSX.Element;
|
|
30
|
+
export interface DroppableProps<T extends {
|
|
31
|
+
$id: string;
|
|
32
|
+
}> {
|
|
33
|
+
children: JSX.Element | DroppableChild<T>;
|
|
34
|
+
node: T;
|
|
35
|
+
type: Besigner.DragType;
|
|
36
|
+
accept: Besigner.DragType[];
|
|
37
|
+
disabled?: boolean;
|
|
38
|
+
idSuffix?: string;
|
|
39
|
+
}
|
|
40
|
+
export declare const Droppable: import("react").FunctionComponent<DroppableProps<{
|
|
41
|
+
$id: string;
|
|
42
|
+
}> & import("react").RefAttributes<unknown>>;
|
|
43
|
+
export default Droppable;
|
|
@@ -0,0 +1,63 @@
|
|
|
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
|
+
*/ import { _ as _extends } from "@swc/helpers/_/_extends";
|
|
17
|
+
import { _ as _object_without_properties_loose } from "@swc/helpers/_/_object_without_properties_loose";
|
|
18
|
+
import { mergeRefs, useId } from "@aglyn/shared-ui-jsx";
|
|
19
|
+
import { useDroppable } from "@dnd-kit/core";
|
|
20
|
+
import { mergeProps } from "@react-aria/utils";
|
|
21
|
+
import { observer } from "mobx-react-lite";
|
|
22
|
+
import { Children, cloneElement, forwardRef } from "react";
|
|
23
|
+
export const Droppable = observer(/*#__PURE__*/ forwardRef((props, ref)=>{
|
|
24
|
+
const { children } = props, rest = _object_without_properties_loose(props, [
|
|
25
|
+
"children"
|
|
26
|
+
]);
|
|
27
|
+
const { node, type, disabled, accept, idSuffix } = rest;
|
|
28
|
+
const id = useId(node == null ? void 0 : node.$id);
|
|
29
|
+
const droppable = useDroppable({
|
|
30
|
+
id: `${id}:${type}${idSuffix || ''}`,
|
|
31
|
+
data: {
|
|
32
|
+
type,
|
|
33
|
+
node,
|
|
34
|
+
accept
|
|
35
|
+
},
|
|
36
|
+
disabled
|
|
37
|
+
});
|
|
38
|
+
const style = _extends({
|
|
39
|
+
outlineWidth: '2',
|
|
40
|
+
outlineOffset: '-1',
|
|
41
|
+
outlineColor: 'grey',
|
|
42
|
+
outlineStyle: 'dotted'
|
|
43
|
+
}, droppable.isOver ? {
|
|
44
|
+
outlineColor: 'lime',
|
|
45
|
+
outlineStyle: 'solid',
|
|
46
|
+
outlineOffset: '3'
|
|
47
|
+
} : {});
|
|
48
|
+
if (typeof children === 'function') {
|
|
49
|
+
return children(_extends({}, rest, {
|
|
50
|
+
style,
|
|
51
|
+
droppable,
|
|
52
|
+
forwardRef: ref
|
|
53
|
+
}));
|
|
54
|
+
}
|
|
55
|
+
const child = Children.only(children);
|
|
56
|
+
return /*#__PURE__*/ cloneElement(child, mergeProps(child.props, {
|
|
57
|
+
ref: mergeRefs(ref, child.props.ref, droppable.setNodeRef)
|
|
58
|
+
}));
|
|
59
|
+
}));
|
|
60
|
+
Droppable.displayName = 'Droppable';
|
|
61
|
+
export default Droppable;
|
|
62
|
+
|
|
63
|
+
//# sourceMappingURL=droppable.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../../../../../../../libs/besigner/feature/designer/src/lib/components/dnd/droppable.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 * as Besigner from '@aglyn/besigner'\nimport { mergeRefs, useId } from '@aglyn/shared-ui-jsx'\nimport { useDroppable } from '@dnd-kit/core'\nimport { mergeProps } from '@react-aria/utils'\nimport { observer } from 'mobx-react-lite'\nimport {\n Children,\n cloneElement,\n CSSProperties,\n forwardRef,\n MutableRefObject,\n} from 'react'\n\nexport interface DroppableChildProps<T extends { $id: string }>\n extends Omit<DroppableProps<T>, 'children'> {\n droppable: ReturnType<typeof useDroppable>\n style: CSSProperties\n forwardRef: MutableRefObject<any>\n}\nexport type DroppableChild<T extends { $id: string }> = (\n props: DroppableChildProps<T>,\n) => JSX.Element\n\nexport interface DroppableProps<T extends { $id: string }> {\n children: JSX.Element | DroppableChild<T>\n node: T\n type: Besigner.DragType\n accept: Besigner.DragType[]\n disabled?: boolean\n idSuffix?: string\n}\n\nexport const Droppable = observer(\n forwardRef(<T extends { $id: string }>(props: DroppableProps<T>, ref) => {\n const { children, ...rest } = props\n const { node, type, disabled, accept, idSuffix } = rest\n const id = useId(node?.$id)\n\n const droppable = useDroppable({\n id: `${id}:${type}${idSuffix || ''}`,\n data: { type, node, accept },\n disabled,\n })\n\n const style: CSSProperties = {\n outlineWidth: '2',\n outlineOffset: '-1',\n outlineColor: 'grey',\n outlineStyle: 'dotted',\n ...(droppable.isOver\n ? {\n outlineColor: 'lime',\n outlineStyle: 'solid',\n outlineOffset: '3',\n }\n : {}),\n }\n\n if (typeof children === 'function') {\n return children({\n ...rest,\n style,\n droppable,\n forwardRef: ref,\n })\n }\n\n const child = Children.only(children)\n return cloneElement(\n child,\n mergeProps(child.props, {\n ref: mergeRefs(ref, child.props.ref, droppable.setNodeRef),\n }),\n )\n }),\n)\n\nDroppable.displayName = 'Droppable'\n\nexport default Droppable\n"],"names":["mergeRefs","useId","useDroppable","mergeProps","observer","Children","cloneElement","forwardRef","Droppable","props","ref","children","rest","node","type","disabled","accept","idSuffix","id","$id","droppable","data","style","outlineWidth","outlineOffset","outlineColor","outlineStyle","isOver","child","only","setNodeRef","displayName"],"mappings":"AAAA;;;;;;;;;;;;;;;CAeC;;AAGD,SAASA,SAAS,EAAEC,KAAK,QAAQ,uBAAsB;AACvD,SAASC,YAAY,QAAQ,gBAAe;AAC5C,SAASC,UAAU,QAAQ,oBAAmB;AAC9C,SAASC,QAAQ,QAAQ,kBAAiB;AAC1C,SACEC,QAAQ,EACRC,YAAY,EAEZC,UAAU,QAEL,QAAO;AAqBd,OAAO,MAAMC,YAAYJ,uBACvBG,WAAW,CAA4BE,OAA0BC;IAC/D,MAAM,EAAEC,QAAQ,EAAW,GAAGF,OAATG,wCAASH;;;IAC9B,MAAM,EAAEI,IAAI,EAAEC,IAAI,EAAEC,QAAQ,EAAEC,MAAM,EAAEC,QAAQ,EAAE,GAAGL;IACnD,MAAMM,KAAKjB,MAAMY,wBAAAA,KAAMM,GAAG;IAE1B,MAAMC,YAAYlB,aAAa;QAC7BgB,IAAI,GAAGA,GAAG,CAAC,EAAEJ,OAAOG,YAAY,IAAI;QACpCI,MAAM;YAAEP;YAAMD;YAAMG;QAAO;QAC3BD;IACF;IAEA,MAAMO,QAAuB;QAC3BC,cAAc;QACdC,eAAe;QACfC,cAAc;QACdC,cAAc;OACVN,UAAUO,MAAM,GAChB;QACEF,cAAc;QACdC,cAAc;QACdF,eAAe;IACjB,IACA,CAAC;IAGP,IAAI,OAAOb,aAAa,YAAY;QAClC,OAAOA,SAAS,aACXC;YACHU;YACAF;YACAb,YAAYG;;IAEhB;IAEA,MAAMkB,QAAQvB,SAASwB,IAAI,CAAClB;IAC5B,qBAAOL,aACLsB,OACAzB,WAAWyB,MAAMnB,KAAK,EAAE;QACtBC,KAAKV,UAAUU,KAAKkB,MAAMnB,KAAK,CAACC,GAAG,EAAEU,UAAUU,UAAU;IAC3D;AAEJ,IACD;AAEDtB,UAAUuB,WAAW,GAAG;AAExB,eAAevB,UAAS"}
|
|
@@ -0,0 +1,23 @@
|
|
|
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 CardListItemProps } from '@aglyn/shared-ui-jsx';
|
|
18
|
+
import { type MdiIconProps } from '@aglyn/shared-ui-jsx';
|
|
19
|
+
export interface ElementCardProps extends CardListItemProps {
|
|
20
|
+
icon?: MdiIconProps;
|
|
21
|
+
}
|
|
22
|
+
export declare const ElementCardComponent: import("react").ForwardRefExoticComponent<Omit<ElementCardProps, "ref"> & import("react").RefAttributes<any>>;
|
|
23
|
+
export default ElementCardComponent;
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import { _ as _extends } from "@swc/helpers/_/_extends";
|
|
2
|
+
import { _ as _object_without_properties_loose } from "@swc/helpers/_/_object_without_properties_loose";
|
|
3
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
4
|
+
/**
|
|
5
|
+
* @license
|
|
6
|
+
* Copyright 2026 Aglyn LLC
|
|
7
|
+
*
|
|
8
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
9
|
+
* you may not use this file except in compliance with the License.
|
|
10
|
+
* You may obtain a copy of the License at
|
|
11
|
+
*
|
|
12
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
13
|
+
*
|
|
14
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
15
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
16
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
17
|
+
* See the License for the specific language governing permissions and
|
|
18
|
+
* limitations under the License.
|
|
19
|
+
*/ import { ICON_VARIANT_ELEMENT } from "@aglyn/shared-data-enums";
|
|
20
|
+
import { CardListItem } from "@aglyn/shared-ui-jsx";
|
|
21
|
+
import { MdiIcon } from "@aglyn/shared-ui-jsx";
|
|
22
|
+
import { styled } from "@aglyn/shared-ui-theme";
|
|
23
|
+
import { forwardRef } from "react";
|
|
24
|
+
const Icon = styled(MdiIcon)(({ theme })=>({
|
|
25
|
+
fontSize: theme.typography.pxToRem(48),
|
|
26
|
+
padding: '0.15ch',
|
|
27
|
+
color: 'inherit',
|
|
28
|
+
overflow: 'visible',
|
|
29
|
+
opacity: 0.7
|
|
30
|
+
}));
|
|
31
|
+
export const ElementCardComponent = /*#__PURE__*/ forwardRef((props, ref)=>{
|
|
32
|
+
const { icon } = props, rest = _object_without_properties_loose(props, [
|
|
33
|
+
"icon"
|
|
34
|
+
]);
|
|
35
|
+
return /*#__PURE__*/ _jsx(CardListItem, _extends({
|
|
36
|
+
ref: ref
|
|
37
|
+
}, rest, {
|
|
38
|
+
children: ({ item })=>/*#__PURE__*/ _jsx("div", {
|
|
39
|
+
children: !(icon == null ? void 0 : icon.path) && icon ? icon : /*#__PURE__*/ _jsx(Icon, _extends({}, icon, {
|
|
40
|
+
path: (icon == null ? void 0 : icon.path) || ICON_VARIANT_ELEMENT.path
|
|
41
|
+
}))
|
|
42
|
+
})
|
|
43
|
+
}));
|
|
44
|
+
});
|
|
45
|
+
ElementCardComponent.displayName = 'ElementCardComponent';
|
|
46
|
+
ElementCardComponent.aglyn = true;
|
|
47
|
+
export default ElementCardComponent;
|
|
48
|
+
|
|
49
|
+
//# sourceMappingURL=element-card.component.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../../../../../../libs/besigner/feature/designer/src/lib/components/element-card.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_ELEMENT } from '@aglyn/shared-data-enums'\nimport { CardListItem, type CardListItemProps } from '@aglyn/shared-ui-jsx'\nimport { MdiIcon, type MdiIconProps } from '@aglyn/shared-ui-jsx'\nimport { styled } from '@aglyn/shared-ui-theme'\nimport { forwardRef } from 'react'\n\nconst Icon = styled(MdiIcon)(({ theme }) => ({\n fontSize: theme.typography.pxToRem(48),\n padding: '0.15ch',\n color: 'inherit',\n overflow: 'visible',\n opacity: 0.7,\n}))\n\nexport interface ElementCardProps extends CardListItemProps {\n icon?: MdiIconProps\n}\n\nexport const ElementCardComponent = forwardRef<any, ElementCardProps>(\n (props, ref) => {\n const { icon, ...rest } = props\n\n return (\n <CardListItem ref={ref} {...rest}>\n {({ item }) => (\n <div>\n {!icon?.path && icon ? (\n (icon as any)\n ) : (\n <Icon {...icon} path={icon?.path || ICON_VARIANT_ELEMENT.path} />\n )}\n </div>\n )}\n </CardListItem>\n )\n },\n)\nElementCardComponent.displayName = 'ElementCardComponent'\nElementCardComponent.aglyn = true\n\nexport default ElementCardComponent\n"],"names":["ICON_VARIANT_ELEMENT","CardListItem","MdiIcon","styled","forwardRef","Icon","theme","fontSize","typography","pxToRem","padding","color","overflow","opacity","ElementCardComponent","props","ref","icon","rest","item","div","path","displayName","aglyn"],"mappings":";;;AAAA;;;;;;;;;;;;;;;CAeC,GAED,SAASA,oBAAoB,QAAQ,2BAA0B;AAC/D,SAASC,YAAY,QAAgC,uBAAsB;AAC3E,SAASC,OAAO,QAA2B,uBAAsB;AACjE,SAASC,MAAM,QAAQ,yBAAwB;AAC/C,SAASC,UAAU,QAAQ,QAAO;AAElC,MAAMC,OAAOF,OAAOD,SAAS,CAAC,EAAEI,KAAK,EAAE,GAAM,CAAA;QAC3CC,UAAUD,MAAME,UAAU,CAACC,OAAO,CAAC;QACnCC,SAAS;QACTC,OAAO;QACPC,UAAU;QACVC,SAAS;IACX,CAAA;AAMA,OAAO,MAAMC,qCAAuBV,WAClC,CAACW,OAAOC;IACN,MAAM,EAAEC,IAAI,EAAW,GAAGF,OAATG,wCAASH;;;IAE1B,qBACE,KAACd;QAAae,KAAKA;OAASE;kBACzB,CAAC,EAAEC,IAAI,EAAE,iBACR,KAACC;0BACE,EAACH,wBAAAA,KAAMI,IAAI,KAAIJ,OACbA,qBAED,KAACZ,mBAASY;oBAAMI,MAAMJ,CAAAA,wBAAAA,KAAMI,IAAI,KAAIrB,qBAAqBqB,IAAI;;;;AAMzE,GACD;AACDP,qBAAqBQ,WAAW,GAAG;AACnCR,qBAAqBS,KAAK,GAAG;AAE7B,eAAeT,qBAAoB"}
|
|
@@ -0,0 +1,41 @@
|
|
|
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
|
+
export declare const isValidClassName: (name: string) => boolean;
|
|
19
|
+
export interface ElementClassesFieldProps {
|
|
20
|
+
node?: Aglyn.NodeSchema;
|
|
21
|
+
}
|
|
22
|
+
/**
|
|
23
|
+
* Custom CSS classes on the selected element (AGL-335): chips persisted
|
|
24
|
+
* into `node.props.className` (space-separated), merged into the
|
|
25
|
+
* rendered className by the node renderer. Pairs with theme stylesheet
|
|
26
|
+
* classes and the interaction builder's class actions.
|
|
27
|
+
*
|
|
28
|
+
* Each chip carries an eye as well as its ✕ (AGL-2486). The eye stops the
|
|
29
|
+
* class applying ON THE CANVAS and keeps it on the element; the ✕ is still
|
|
30
|
+
* the one control that takes a class off. Nothing about the eye is written
|
|
31
|
+
* down, so the chips are always the class list that ships.
|
|
32
|
+
*
|
|
33
|
+
* The hidden class is the exception, and deliberately so: switching it off
|
|
34
|
+
* on the canvas is the same act as the hierarchy's visibility eye (AGL-592),
|
|
35
|
+
* so its chip drives THAT state rather than a second one that could
|
|
36
|
+
* disagree with it.
|
|
37
|
+
*/
|
|
38
|
+
export declare const ElementClassesField: ((props: ElementClassesFieldProps) => import("react").JSX.Element) & {
|
|
39
|
+
displayName: string;
|
|
40
|
+
};
|
|
41
|
+
export default ElementClassesField;
|
|
@@ -0,0 +1,140 @@
|
|
|
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 { jsx as _jsx } from "react/jsx-runtime";
|
|
18
|
+
import { createElement as _createElement } from "react";
|
|
19
|
+
import { FieldMuteButton } from "@aglyn/shared-ui-jsx-forms";
|
|
20
|
+
import { Autocomplete, Chip, TextField } from "@mui/material";
|
|
21
|
+
import { action } from "mobx";
|
|
22
|
+
import { observer } from "mobx-react-lite";
|
|
23
|
+
import { useCallback, useMemo } from "react";
|
|
24
|
+
import useAglynBesignerFlag from "../hooks/use-aglyn-besigner-flag.js";
|
|
25
|
+
import { toggleRevealedNodeId } from "../utils/canvas-reveal.js";
|
|
26
|
+
import { isClassMuted, isClassSwitchable, toggleMutedClass } from "../utils/muted-classes.js";
|
|
27
|
+
/** Valid CSS class identifier (letters, digits, hyphen, underscore). */ const CLASS_NAME_PATTERN = /^-?[_a-zA-Z][_a-zA-Z0-9-]*$/;
|
|
28
|
+
export const isValidClassName = (name)=>CLASS_NAME_PATTERN.test(name);
|
|
29
|
+
/**
|
|
30
|
+
* Custom CSS classes on the selected element (AGL-335): chips persisted
|
|
31
|
+
* into `node.props.className` (space-separated), merged into the
|
|
32
|
+
* rendered className by the node renderer. Pairs with theme stylesheet
|
|
33
|
+
* classes and the interaction builder's class actions.
|
|
34
|
+
*
|
|
35
|
+
* Each chip carries an eye as well as its ✕ (AGL-2486). The eye stops the
|
|
36
|
+
* class applying ON THE CANVAS and keeps it on the element; the ✕ is still
|
|
37
|
+
* the one control that takes a class off. Nothing about the eye is written
|
|
38
|
+
* down, so the chips are always the class list that ships.
|
|
39
|
+
*
|
|
40
|
+
* The hidden class is the exception, and deliberately so: switching it off
|
|
41
|
+
* on the canvas is the same act as the hierarchy's visibility eye (AGL-592),
|
|
42
|
+
* so its chip drives THAT state rather than a second one that could
|
|
43
|
+
* disagree with it.
|
|
44
|
+
*/ export const ElementClassesField = observer((props)=>{
|
|
45
|
+
var _node_props;
|
|
46
|
+
const { node } = props;
|
|
47
|
+
const classes = useMemo(()=>{
|
|
48
|
+
var _ref;
|
|
49
|
+
var _node_props;
|
|
50
|
+
return String((_ref = node == null ? void 0 : (_node_props = node.props) == null ? void 0 : _node_props.className) != null ? _ref : '').split(/\s+/).filter(Boolean);
|
|
51
|
+
}, [
|
|
52
|
+
node == null ? void 0 : (_node_props = node.props) == null ? void 0 : _node_props.className
|
|
53
|
+
]);
|
|
54
|
+
const [mutedClasses, setMutedClasses] = useAglynBesignerFlag('mutedClasses');
|
|
55
|
+
const [revealedNodeIds, setRevealedNodeIds] = useAglynBesignerFlag('revealedNodeIds');
|
|
56
|
+
const nodeId = node == null ? void 0 : node.$id;
|
|
57
|
+
/** Whether the canvas is currently rendering without this class. */ const isSwitchedOff = useCallback((className)=>{
|
|
58
|
+
if (!nodeId) return false;
|
|
59
|
+
return isClassSwitchable(className) ? isClassMuted(mutedClasses, {
|
|
60
|
+
nodeId,
|
|
61
|
+
className
|
|
62
|
+
}) : Boolean(revealedNodeIds == null ? void 0 : revealedNodeIds.some((id)=>id === nodeId));
|
|
63
|
+
}, [
|
|
64
|
+
nodeId,
|
|
65
|
+
mutedClasses,
|
|
66
|
+
revealedNodeIds
|
|
67
|
+
]);
|
|
68
|
+
const toggleClass = useCallback((className)=>{
|
|
69
|
+
if (!nodeId) return;
|
|
70
|
+
if (isClassSwitchable(className)) {
|
|
71
|
+
setMutedClasses((current)=>toggleMutedClass(current, {
|
|
72
|
+
nodeId,
|
|
73
|
+
className
|
|
74
|
+
}));
|
|
75
|
+
return;
|
|
76
|
+
}
|
|
77
|
+
// One switch, two places to reach it.
|
|
78
|
+
setRevealedNodeIds((current)=>toggleRevealedNodeId(current, nodeId));
|
|
79
|
+
}, [
|
|
80
|
+
nodeId,
|
|
81
|
+
setMutedClasses,
|
|
82
|
+
setRevealedNodeIds
|
|
83
|
+
]);
|
|
84
|
+
const handleChange = useCallback((event, value)=>{
|
|
85
|
+
if (!node) return;
|
|
86
|
+
const cleaned = value.map((name)=>name.trim()).filter((name)=>isValidClassName(name));
|
|
87
|
+
action(()=>{
|
|
88
|
+
const nextProps = _extends({}, node.props);
|
|
89
|
+
if (cleaned.length) nextProps['className'] = cleaned.join(' ');
|
|
90
|
+
else delete nextProps['className'];
|
|
91
|
+
node.props = nextProps;
|
|
92
|
+
})();
|
|
93
|
+
}, [
|
|
94
|
+
node
|
|
95
|
+
]);
|
|
96
|
+
return /*#__PURE__*/ _jsx(Autocomplete, {
|
|
97
|
+
multiple: true,
|
|
98
|
+
freeSolo: true,
|
|
99
|
+
size: "small",
|
|
100
|
+
options: [],
|
|
101
|
+
value: classes,
|
|
102
|
+
onChange: handleChange,
|
|
103
|
+
renderValue: (value, getItemProps)=>value.map((option, index)=>{
|
|
104
|
+
const off = isSwitchedOff(option);
|
|
105
|
+
const switchable = isClassSwitchable(option);
|
|
106
|
+
return /*#__PURE__*/ _createElement(Chip, _extends({
|
|
107
|
+
label: option,
|
|
108
|
+
size: "small"
|
|
109
|
+
}, getItemProps({
|
|
110
|
+
index
|
|
111
|
+
}), {
|
|
112
|
+
key: option,
|
|
113
|
+
variant: off ? 'outlined' : 'filled',
|
|
114
|
+
sx: off ? {
|
|
115
|
+
textDecoration: 'line-through',
|
|
116
|
+
opacity: 0.6
|
|
117
|
+
} : undefined,
|
|
118
|
+
icon: /*#__PURE__*/ _jsx(FieldMuteButton, {
|
|
119
|
+
mute: {
|
|
120
|
+
muted: off,
|
|
121
|
+
label: switchable ? off ? `Apply ${option} again` : `Stop applying ${option} while designing` : off ? `Stop showing this element on the canvas` : `Show this element on the canvas`,
|
|
122
|
+
onToggle: ()=>toggleClass(option)
|
|
123
|
+
},
|
|
124
|
+
sx: {
|
|
125
|
+
ml: 0.5
|
|
126
|
+
}
|
|
127
|
+
})
|
|
128
|
+
}));
|
|
129
|
+
}),
|
|
130
|
+
renderInput: (params)=>/*#__PURE__*/ _jsx(TextField, _extends({}, params, {
|
|
131
|
+
label: "Classes",
|
|
132
|
+
placeholder: "Add class…",
|
|
133
|
+
helperText: "Custom CSS classes — targetable from theme styles and interactions"
|
|
134
|
+
}))
|
|
135
|
+
});
|
|
136
|
+
});
|
|
137
|
+
ElementClassesField.displayName = 'ElementClassesField';
|
|
138
|
+
export default ElementClassesField;
|
|
139
|
+
|
|
140
|
+
//# sourceMappingURL=element-classes-field.component.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../../../../../../libs/besigner/feature/designer/src/lib/components/element-classes-field.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 { FieldMuteButton } from '@aglyn/shared-ui-jsx-forms'\nimport { Autocomplete, Chip, TextField } from '@mui/material'\nimport { action } from 'mobx'\nimport { observer } from 'mobx-react-lite'\nimport { useCallback, useMemo } from 'react'\n\nimport useAglynBesignerFlag from '../hooks/use-aglyn-besigner-flag'\nimport { toggleRevealedNodeId } from '../utils/canvas-reveal'\nimport {\n isClassMuted,\n isClassSwitchable,\n toggleMutedClass,\n} from '../utils/muted-classes'\n\n/** Valid CSS class identifier (letters, digits, hyphen, underscore). */\nconst CLASS_NAME_PATTERN = /^-?[_a-zA-Z][_a-zA-Z0-9-]*$/\n\nexport const isValidClassName = (name: string): boolean =>\n CLASS_NAME_PATTERN.test(name)\n\nexport interface ElementClassesFieldProps {\n node?: Aglyn.NodeSchema\n}\n\n/**\n * Custom CSS classes on the selected element (AGL-335): chips persisted\n * into `node.props.className` (space-separated), merged into the\n * rendered className by the node renderer. Pairs with theme stylesheet\n * classes and the interaction builder's class actions.\n *\n * Each chip carries an eye as well as its ✕ (AGL-2486). The eye stops the\n * class applying ON THE CANVAS and keeps it on the element; the ✕ is still\n * the one control that takes a class off. Nothing about the eye is written\n * down, so the chips are always the class list that ships.\n *\n * The hidden class is the exception, and deliberately so: switching it off\n * on the canvas is the same act as the hierarchy's visibility eye (AGL-592),\n * so its chip drives THAT state rather than a second one that could\n * disagree with it.\n */\nexport const ElementClassesField = observer(\n (props: ElementClassesFieldProps) => {\n const { node } = props\n const classes = useMemo(\n () =>\n String((node?.props as any)?.className ?? '')\n .split(/\\s+/)\n .filter(Boolean),\n [(node?.props as any)?.className],\n )\n\n const [mutedClasses, setMutedClasses] = useAglynBesignerFlag('mutedClasses')\n const [revealedNodeIds, setRevealedNodeIds] =\n useAglynBesignerFlag('revealedNodeIds')\n\n const nodeId = node?.$id\n\n /** Whether the canvas is currently rendering without this class. */\n const isSwitchedOff = useCallback(\n (className: string) => {\n if (!nodeId) return false\n return isClassSwitchable(className)\n ? isClassMuted(mutedClasses, { nodeId, className })\n : Boolean(revealedNodeIds?.some((id) => id === nodeId))\n },\n [nodeId, mutedClasses, revealedNodeIds],\n )\n\n const toggleClass = useCallback(\n (className: string) => {\n if (!nodeId) return\n if (isClassSwitchable(className)) {\n setMutedClasses((current) =>\n toggleMutedClass(current, { nodeId, className }),\n )\n return\n }\n // One switch, two places to reach it.\n setRevealedNodeIds((current) => toggleRevealedNodeId(current, nodeId))\n },\n [nodeId, setMutedClasses, setRevealedNodeIds],\n )\n\n const handleChange = useCallback(\n (event: unknown, value: string[]) => {\n if (!node) return\n const cleaned = value\n .map((name) => name.trim())\n .filter((name) => isValidClassName(name))\n action(() => {\n const nextProps: Record<string, unknown> = { ...(node.props as any) }\n if (cleaned.length) nextProps['className'] = cleaned.join(' ')\n else delete nextProps['className']\n node.props = nextProps as any\n })()\n },\n [node],\n )\n\n return (\n <Autocomplete\n multiple\n freeSolo\n size=\"small\"\n options={[] as string[]}\n value={classes}\n onChange={handleChange}\n renderValue={(value, getItemProps) =>\n value.map((option, index) => {\n const off = isSwitchedOff(option)\n const switchable = isClassSwitchable(option)\n return (\n <Chip\n label={option}\n size=\"small\"\n {...getItemProps({ index })}\n key={option}\n variant={off ? 'outlined' : 'filled'}\n sx={\n off\n ? { textDecoration: 'line-through', opacity: 0.6 }\n : undefined\n }\n icon={\n <FieldMuteButton\n mute={{\n muted: off,\n label: switchable\n ? off\n ? `Apply ${option} again`\n : `Stop applying ${option} while designing`\n : off\n ? `Stop showing this element on the canvas`\n : `Show this element on the canvas`,\n onToggle: () => toggleClass(option),\n }}\n sx={{ ml: 0.5 }}\n />\n }\n />\n )\n })\n }\n renderInput={(params) => (\n <TextField\n {...params}\n label=\"Classes\"\n placeholder=\"Add class…\"\n helperText=\"Custom CSS classes — targetable from theme styles and interactions\"\n />\n )}\n />\n )\n },\n)\nElementClassesField.displayName = 'ElementClassesField'\n\nexport default ElementClassesField\n"],"names":["FieldMuteButton","Autocomplete","Chip","TextField","action","observer","useCallback","useMemo","useAglynBesignerFlag","toggleRevealedNodeId","isClassMuted","isClassSwitchable","toggleMutedClass","CLASS_NAME_PATTERN","isValidClassName","name","test","ElementClassesField","props","node","classes","String","className","split","filter","Boolean","mutedClasses","setMutedClasses","revealedNodeIds","setRevealedNodeIds","nodeId","$id","isSwitchedOff","some","id","toggleClass","current","handleChange","event","value","cleaned","map","trim","nextProps","length","join","multiple","freeSolo","size","options","onChange","renderValue","getItemProps","option","index","off","switchable","label","key","variant","sx","textDecoration","opacity","undefined","icon","mute","muted","onToggle","ml","renderInput","params","placeholder","helperText","displayName"],"mappings":"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"}
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright 2026 Aglyn LLC
|
|
4
|
+
*
|
|
5
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
6
|
+
* you may not use this file except in compliance with the License.
|
|
7
|
+
* You may obtain a copy of the License at
|
|
8
|
+
*
|
|
9
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
10
|
+
*
|
|
11
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
12
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
13
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
14
|
+
* See the License for the specific language governing permissions and
|
|
15
|
+
* limitations under the License.
|
|
16
|
+
*/
|
|
17
|
+
export interface ElementDetailOverlayProps {
|
|
18
|
+
/** The picker item to describe, or null when nothing is active. */
|
|
19
|
+
item: any;
|
|
20
|
+
/** The card the panel points at. */
|
|
21
|
+
anchor: HTMLElement | null;
|
|
22
|
+
/** Held open by a click rather than by the pointer. */
|
|
23
|
+
pinned?: boolean;
|
|
24
|
+
onPointerEnter?: () => void;
|
|
25
|
+
onPointerLeave?: () => void;
|
|
26
|
+
onDismiss?: () => void;
|
|
27
|
+
}
|
|
28
|
+
/**
|
|
29
|
+
* The Elements panel's detail, floated out over the canvas (AGL-2486).
|
|
30
|
+
*
|
|
31
|
+
* It started as a band docked under the grid, which was the safe answer to
|
|
32
|
+
* "a tooltip must not cover what it describes" and a bad answer to
|
|
33
|
+
* everything else: a ~300px column cannot hold a preview, a description,
|
|
34
|
+
* derived facts, an attribute list and a link, so the preview came out a
|
|
35
|
+
* sliver and the prose wrapped to nothing.
|
|
36
|
+
*
|
|
37
|
+
* Floating gives it real width. What floating costs — and what makes most
|
|
38
|
+
* of these unusable — is that the content follows the pointer, so moving
|
|
39
|
+
* toward a link inside it changes what it says. That is solved in
|
|
40
|
+
* `useDetailHoverIntent`, not here: a click PINS, and a pin outranks the
|
|
41
|
+
* pointer, so everything in this panel is reachable. This component only has
|
|
42
|
+
* to not undo that, which means keeping its own pointer events live and
|
|
43
|
+
* feeding enter/leave back to the same intent state.
|
|
44
|
+
*
|
|
45
|
+
* Anchored `right-start` so it opens INTO the canvas and never covers the
|
|
46
|
+
* card being pointed at — the failure the box-styler tooltips had. Portalled,
|
|
47
|
+
* so the panel's own `overflow: auto` cannot clip it, and out of flow, so it
|
|
48
|
+
* cannot push the grid and slide the card out from under the cursor the way
|
|
49
|
+
* the docked band did.
|
|
50
|
+
*/
|
|
51
|
+
export declare function ElementDetailOverlay(props: ElementDetailOverlayProps): import("react").JSX.Element;
|
|
52
|
+
export declare namespace ElementDetailOverlay {
|
|
53
|
+
var displayName: string;
|
|
54
|
+
}
|
|
55
|
+
export default ElementDetailOverlay;
|