@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,505 @@
|
|
|
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
|
+
/**
|
|
18
|
+
* What authors call these things when they are not reading a CSS spec.
|
|
19
|
+
*
|
|
20
|
+
* Keyed by the panel's own field name so a field added later is findable by
|
|
21
|
+
* its label and property name with no entry here at all — this list only ever
|
|
22
|
+
* ADDS reach, it is never the thing that makes search work.
|
|
23
|
+
*/ export const STYLE_FIELD_KEYWORDS = {
|
|
24
|
+
// Colors
|
|
25
|
+
color: [
|
|
26
|
+
'colour',
|
|
27
|
+
'text colour',
|
|
28
|
+
'font colour',
|
|
29
|
+
'type colour',
|
|
30
|
+
'ink'
|
|
31
|
+
],
|
|
32
|
+
backgroundColor: [
|
|
33
|
+
'colour',
|
|
34
|
+
'fill',
|
|
35
|
+
'background',
|
|
36
|
+
'bg',
|
|
37
|
+
'behind',
|
|
38
|
+
'panel colour'
|
|
39
|
+
],
|
|
40
|
+
backgroundImage: [
|
|
41
|
+
'gradient',
|
|
42
|
+
'fill',
|
|
43
|
+
'background',
|
|
44
|
+
'image',
|
|
45
|
+
'fade',
|
|
46
|
+
'ramp',
|
|
47
|
+
'photo'
|
|
48
|
+
],
|
|
49
|
+
// Sizing
|
|
50
|
+
width: [
|
|
51
|
+
'size',
|
|
52
|
+
'wide',
|
|
53
|
+
'how wide'
|
|
54
|
+
],
|
|
55
|
+
height: [
|
|
56
|
+
'size',
|
|
57
|
+
'tall',
|
|
58
|
+
'how tall'
|
|
59
|
+
],
|
|
60
|
+
minWidth: [
|
|
61
|
+
'size',
|
|
62
|
+
'narrowest',
|
|
63
|
+
'at least wide'
|
|
64
|
+
],
|
|
65
|
+
maxWidth: [
|
|
66
|
+
'size',
|
|
67
|
+
'widest',
|
|
68
|
+
'cap width',
|
|
69
|
+
'no wider than'
|
|
70
|
+
],
|
|
71
|
+
minHeight: [
|
|
72
|
+
'size',
|
|
73
|
+
'shortest',
|
|
74
|
+
'at least tall'
|
|
75
|
+
],
|
|
76
|
+
maxHeight: [
|
|
77
|
+
'size',
|
|
78
|
+
'tallest',
|
|
79
|
+
'no taller than'
|
|
80
|
+
],
|
|
81
|
+
// Typography
|
|
82
|
+
fontSize: [
|
|
83
|
+
'text size',
|
|
84
|
+
'type size',
|
|
85
|
+
'bigger text',
|
|
86
|
+
'smaller text',
|
|
87
|
+
'scale'
|
|
88
|
+
],
|
|
89
|
+
fontWeight: [
|
|
90
|
+
'bold',
|
|
91
|
+
'boldness',
|
|
92
|
+
'thickness',
|
|
93
|
+
'weight',
|
|
94
|
+
'light',
|
|
95
|
+
'heavy'
|
|
96
|
+
],
|
|
97
|
+
fontFamily: [
|
|
98
|
+
'typeface',
|
|
99
|
+
'font',
|
|
100
|
+
'typography'
|
|
101
|
+
],
|
|
102
|
+
lineHeight: [
|
|
103
|
+
'leading',
|
|
104
|
+
'line spacing',
|
|
105
|
+
'space between lines'
|
|
106
|
+
],
|
|
107
|
+
letterSpacing: [
|
|
108
|
+
'tracking',
|
|
109
|
+
'kerning',
|
|
110
|
+
'space between letters'
|
|
111
|
+
],
|
|
112
|
+
textTransform: [
|
|
113
|
+
'uppercase',
|
|
114
|
+
'caps',
|
|
115
|
+
'all caps',
|
|
116
|
+
'lowercase',
|
|
117
|
+
'capitalise'
|
|
118
|
+
],
|
|
119
|
+
textDecoration: [
|
|
120
|
+
'underline',
|
|
121
|
+
'strikethrough',
|
|
122
|
+
'strike through',
|
|
123
|
+
'overline'
|
|
124
|
+
],
|
|
125
|
+
// Borders & shadows
|
|
126
|
+
border: [
|
|
127
|
+
'outline',
|
|
128
|
+
'stroke',
|
|
129
|
+
'edge',
|
|
130
|
+
'line',
|
|
131
|
+
'rule',
|
|
132
|
+
'frame'
|
|
133
|
+
],
|
|
134
|
+
borderColor: [
|
|
135
|
+
'colour',
|
|
136
|
+
'outline colour',
|
|
137
|
+
'stroke colour',
|
|
138
|
+
'edge colour'
|
|
139
|
+
],
|
|
140
|
+
borderTop: [
|
|
141
|
+
'line above',
|
|
142
|
+
'rule above',
|
|
143
|
+
'edge',
|
|
144
|
+
'divider'
|
|
145
|
+
],
|
|
146
|
+
borderRight: [
|
|
147
|
+
'line right',
|
|
148
|
+
'edge',
|
|
149
|
+
'divider'
|
|
150
|
+
],
|
|
151
|
+
borderBottom: [
|
|
152
|
+
'line below',
|
|
153
|
+
'rule below',
|
|
154
|
+
'underline bar',
|
|
155
|
+
'divider'
|
|
156
|
+
],
|
|
157
|
+
borderLeft: [
|
|
158
|
+
'line left',
|
|
159
|
+
'accent rail',
|
|
160
|
+
'edge',
|
|
161
|
+
'divider'
|
|
162
|
+
],
|
|
163
|
+
borderRadius: [
|
|
164
|
+
'rounded',
|
|
165
|
+
'rounding',
|
|
166
|
+
'round corners',
|
|
167
|
+
'corner',
|
|
168
|
+
'corners',
|
|
169
|
+
'curve',
|
|
170
|
+
'radius',
|
|
171
|
+
'pill'
|
|
172
|
+
],
|
|
173
|
+
outline: [
|
|
174
|
+
'focus ring',
|
|
175
|
+
'ring',
|
|
176
|
+
'stroke'
|
|
177
|
+
],
|
|
178
|
+
boxShadow: [
|
|
179
|
+
'shadow',
|
|
180
|
+
'drop shadow',
|
|
181
|
+
'elevation',
|
|
182
|
+
'depth',
|
|
183
|
+
'lift',
|
|
184
|
+
'glow'
|
|
185
|
+
],
|
|
186
|
+
// Position & overflow
|
|
187
|
+
position: [
|
|
188
|
+
'sticky',
|
|
189
|
+
'fixed',
|
|
190
|
+
'absolute',
|
|
191
|
+
'pin',
|
|
192
|
+
'float above'
|
|
193
|
+
],
|
|
194
|
+
top: [
|
|
195
|
+
'offset',
|
|
196
|
+
'from the top'
|
|
197
|
+
],
|
|
198
|
+
right: [
|
|
199
|
+
'offset',
|
|
200
|
+
'from the right'
|
|
201
|
+
],
|
|
202
|
+
bottom: [
|
|
203
|
+
'offset',
|
|
204
|
+
'from the bottom'
|
|
205
|
+
],
|
|
206
|
+
left: [
|
|
207
|
+
'offset',
|
|
208
|
+
'from the left'
|
|
209
|
+
],
|
|
210
|
+
zIndex: [
|
|
211
|
+
'stacking',
|
|
212
|
+
'layer',
|
|
213
|
+
'on top',
|
|
214
|
+
'in front',
|
|
215
|
+
'behind',
|
|
216
|
+
'z order'
|
|
217
|
+
],
|
|
218
|
+
overflow: [
|
|
219
|
+
'scroll',
|
|
220
|
+
'clip',
|
|
221
|
+
'cut off',
|
|
222
|
+
'hidden',
|
|
223
|
+
'spill'
|
|
224
|
+
],
|
|
225
|
+
opacity: [
|
|
226
|
+
'transparency',
|
|
227
|
+
'transparent',
|
|
228
|
+
'see through',
|
|
229
|
+
'fade',
|
|
230
|
+
'alpha',
|
|
231
|
+
'ghost'
|
|
232
|
+
],
|
|
233
|
+
cursor: [
|
|
234
|
+
'pointer',
|
|
235
|
+
'hand',
|
|
236
|
+
'mouse'
|
|
237
|
+
],
|
|
238
|
+
// Layout
|
|
239
|
+
display: [
|
|
240
|
+
'block',
|
|
241
|
+
'inline',
|
|
242
|
+
'flex',
|
|
243
|
+
'grid',
|
|
244
|
+
'hide',
|
|
245
|
+
'layout'
|
|
246
|
+
],
|
|
247
|
+
float: [
|
|
248
|
+
'wrap text',
|
|
249
|
+
'align left',
|
|
250
|
+
'align right'
|
|
251
|
+
],
|
|
252
|
+
// Flexbox & grid
|
|
253
|
+
gap: [
|
|
254
|
+
'spacing',
|
|
255
|
+
'gutter',
|
|
256
|
+
'space between',
|
|
257
|
+
'breathing room'
|
|
258
|
+
],
|
|
259
|
+
rowGap: [
|
|
260
|
+
'spacing',
|
|
261
|
+
'gutter',
|
|
262
|
+
'space between rows'
|
|
263
|
+
],
|
|
264
|
+
columnGap: [
|
|
265
|
+
'spacing',
|
|
266
|
+
'gutter',
|
|
267
|
+
'space between columns'
|
|
268
|
+
],
|
|
269
|
+
gridTemplateColumns: [
|
|
270
|
+
'columns',
|
|
271
|
+
'grid',
|
|
272
|
+
'tracks',
|
|
273
|
+
'how many columns'
|
|
274
|
+
],
|
|
275
|
+
gridTemplateRows: [
|
|
276
|
+
'rows',
|
|
277
|
+
'grid',
|
|
278
|
+
'tracks'
|
|
279
|
+
],
|
|
280
|
+
gridAutoFlow: [
|
|
281
|
+
'grid',
|
|
282
|
+
'flow',
|
|
283
|
+
'fill order'
|
|
284
|
+
],
|
|
285
|
+
gridColumn: [
|
|
286
|
+
'span',
|
|
287
|
+
'columns',
|
|
288
|
+
'placement'
|
|
289
|
+
],
|
|
290
|
+
gridRow: [
|
|
291
|
+
'span',
|
|
292
|
+
'rows',
|
|
293
|
+
'placement'
|
|
294
|
+
],
|
|
295
|
+
flexGrow: [
|
|
296
|
+
'grow',
|
|
297
|
+
'fill space',
|
|
298
|
+
'stretch'
|
|
299
|
+
],
|
|
300
|
+
flexShrink: [
|
|
301
|
+
'shrink',
|
|
302
|
+
'squeeze'
|
|
303
|
+
],
|
|
304
|
+
flexBasis: [
|
|
305
|
+
'starting size',
|
|
306
|
+
'base size'
|
|
307
|
+
],
|
|
308
|
+
order: [
|
|
309
|
+
'reorder',
|
|
310
|
+
'move first',
|
|
311
|
+
'move last',
|
|
312
|
+
'sequence'
|
|
313
|
+
],
|
|
314
|
+
flexDirection: [
|
|
315
|
+
'row',
|
|
316
|
+
'column',
|
|
317
|
+
'direction',
|
|
318
|
+
'stack',
|
|
319
|
+
'side by side'
|
|
320
|
+
],
|
|
321
|
+
flexWrap: [
|
|
322
|
+
'wrap',
|
|
323
|
+
'no wrap',
|
|
324
|
+
'onto a new line'
|
|
325
|
+
],
|
|
326
|
+
justifyContent: [
|
|
327
|
+
'spacing',
|
|
328
|
+
'centre',
|
|
329
|
+
'center',
|
|
330
|
+
'spread',
|
|
331
|
+
'distribute'
|
|
332
|
+
],
|
|
333
|
+
alignItems: [
|
|
334
|
+
'centre',
|
|
335
|
+
'center',
|
|
336
|
+
'middle',
|
|
337
|
+
'top',
|
|
338
|
+
'bottom',
|
|
339
|
+
'align'
|
|
340
|
+
],
|
|
341
|
+
alignContent: [
|
|
342
|
+
'centre',
|
|
343
|
+
'center',
|
|
344
|
+
'distribute',
|
|
345
|
+
'align rows'
|
|
346
|
+
],
|
|
347
|
+
justifyItems: [
|
|
348
|
+
'centre',
|
|
349
|
+
'center',
|
|
350
|
+
'align'
|
|
351
|
+
],
|
|
352
|
+
alignSelf: [
|
|
353
|
+
'centre',
|
|
354
|
+
'center',
|
|
355
|
+
'this one only',
|
|
356
|
+
'align myself'
|
|
357
|
+
],
|
|
358
|
+
justifySelf: [
|
|
359
|
+
'centre',
|
|
360
|
+
'center',
|
|
361
|
+
'this one only',
|
|
362
|
+
'align myself'
|
|
363
|
+
]
|
|
364
|
+
};
|
|
365
|
+
/** Sections and controls that are not schema fields but must still be found. */ export const STYLE_SECTION_ENTRIES = {
|
|
366
|
+
box: {
|
|
367
|
+
name: 'box',
|
|
368
|
+
label: 'Margin & padding',
|
|
369
|
+
keywords: [
|
|
370
|
+
'margin',
|
|
371
|
+
'padding',
|
|
372
|
+
'spacing',
|
|
373
|
+
'space',
|
|
374
|
+
'inset',
|
|
375
|
+
'gutter',
|
|
376
|
+
'inner space',
|
|
377
|
+
'outer space',
|
|
378
|
+
'room',
|
|
379
|
+
'indent'
|
|
380
|
+
]
|
|
381
|
+
},
|
|
382
|
+
textAlign: {
|
|
383
|
+
name: 'textAlign',
|
|
384
|
+
label: 'Text Alignment',
|
|
385
|
+
keywords: [
|
|
386
|
+
'align',
|
|
387
|
+
'alignment',
|
|
388
|
+
'centre',
|
|
389
|
+
'center',
|
|
390
|
+
'left',
|
|
391
|
+
'right',
|
|
392
|
+
'justify',
|
|
393
|
+
'ragged'
|
|
394
|
+
]
|
|
395
|
+
},
|
|
396
|
+
visibility: {
|
|
397
|
+
name: 'visibility',
|
|
398
|
+
label: 'Visibility',
|
|
399
|
+
keywords: [
|
|
400
|
+
'hide',
|
|
401
|
+
'hidden',
|
|
402
|
+
'show',
|
|
403
|
+
'responsive',
|
|
404
|
+
'mobile',
|
|
405
|
+
'tablet',
|
|
406
|
+
'desktop',
|
|
407
|
+
'hide on mobile',
|
|
408
|
+
'device',
|
|
409
|
+
'breakpoint'
|
|
410
|
+
]
|
|
411
|
+
},
|
|
412
|
+
classes: {
|
|
413
|
+
name: 'classes',
|
|
414
|
+
label: 'Classes & custom CSS',
|
|
415
|
+
keywords: [
|
|
416
|
+
'class',
|
|
417
|
+
'classes',
|
|
418
|
+
'css',
|
|
419
|
+
'custom css',
|
|
420
|
+
'sx',
|
|
421
|
+
'raw css',
|
|
422
|
+
'stylesheet',
|
|
423
|
+
'advanced'
|
|
424
|
+
]
|
|
425
|
+
}
|
|
426
|
+
};
|
|
427
|
+
/** Normalizes a label or query for matching: lowercase, single-spaced. */ function normalize(text) {
|
|
428
|
+
return `${text != null ? text : ''}`.toLowerCase().replace(/[_-]+/g, ' ').replace(/\s+/g, ' ').trim();
|
|
429
|
+
}
|
|
430
|
+
/** `borderRadius` → `border radius`, so a two-word query hits a camel name. */ function humanizeName(name) {
|
|
431
|
+
return normalize(name.replace(/([a-z0-9])([A-Z])/g, '$1 $2'));
|
|
432
|
+
}
|
|
433
|
+
/** Score of one query TERM against one haystack, 0 when it does not match. */ function scoreTerm(haystack, term, weight) {
|
|
434
|
+
if (!haystack || !term) return 0;
|
|
435
|
+
if (haystack === term) return weight * 4;
|
|
436
|
+
if (haystack.startsWith(term)) return weight * 3;
|
|
437
|
+
// A hit at a word boundary ("radius" in "corner radius") is a real name
|
|
438
|
+
// match; one mid-word ("us" in "radius") is barely evidence of anything.
|
|
439
|
+
if (haystack.includes(` ${term}`)) return weight * 2;
|
|
440
|
+
if (haystack.includes(term)) return weight;
|
|
441
|
+
return 0;
|
|
442
|
+
}
|
|
443
|
+
/**
|
|
444
|
+
* How well one entry answers a query, or 0 when it does not.
|
|
445
|
+
*
|
|
446
|
+
* Every term must land somewhere — `border color` must not return every
|
|
447
|
+
* border field AND every colour field — and the entry's own name and label
|
|
448
|
+
* are weighted far above its aliases, so searching `color` puts Text Color
|
|
449
|
+
* ahead of Border (which merely lists "edge colour" among its words).
|
|
450
|
+
*/ export function scoreStyleEntry(entry, query) {
|
|
451
|
+
var _ref, _entry_keywords;
|
|
452
|
+
const terms = normalize(query).split(' ').filter(Boolean);
|
|
453
|
+
if (!terms.length) return 0;
|
|
454
|
+
const label = normalize(entry.label);
|
|
455
|
+
const name = humanizeName(entry.name);
|
|
456
|
+
// The same two with their separators gone, because `zindex`, `zIndex` and
|
|
457
|
+
// `z-index` are one word to the person typing them and three to a matcher
|
|
458
|
+
// that only ever sees `z index`.
|
|
459
|
+
const compact = [
|
|
460
|
+
label,
|
|
461
|
+
name
|
|
462
|
+
].map((text)=>text.replace(/ /g, ''));
|
|
463
|
+
const keywords = ((_ref = (_entry_keywords = entry.keywords) != null ? _entry_keywords : STYLE_FIELD_KEYWORDS[entry.name]) != null ? _ref : []).map(normalize);
|
|
464
|
+
let total = 0;
|
|
465
|
+
for (const term of terms){
|
|
466
|
+
const best = Math.max(scoreTerm(label, term, 10), scoreTerm(name, term, 8), ...compact.map((text)=>scoreTerm(text, term, 7)), ...keywords.map((keyword)=>scoreTerm(keyword, term, 3)));
|
|
467
|
+
// One unmatched term disqualifies the entry: a query is a conjunction.
|
|
468
|
+
if (best <= 0) return 0;
|
|
469
|
+
total += best;
|
|
470
|
+
}
|
|
471
|
+
return total;
|
|
472
|
+
}
|
|
473
|
+
/** Whether an entry answers the query (an empty query matches everything). */ export function matchesStyleQuery(entry, query) {
|
|
474
|
+
if (!normalize(query)) return true;
|
|
475
|
+
return scoreStyleEntry(entry, query) > 0;
|
|
476
|
+
}
|
|
477
|
+
/** The search entry for one schema field of a style group. */ export function styleFieldEntry(field) {
|
|
478
|
+
var _field_label, _field_keywords;
|
|
479
|
+
return {
|
|
480
|
+
name: field.name,
|
|
481
|
+
label: `${(_field_label = field.label) != null ? _field_label : field.name}`,
|
|
482
|
+
keywords: (_field_keywords = field.keywords) != null ? _field_keywords : STYLE_FIELD_KEYWORDS[field.name]
|
|
483
|
+
};
|
|
484
|
+
}
|
|
485
|
+
/**
|
|
486
|
+
* A group holding only the fields that answer the query, best match first,
|
|
487
|
+
* or `undefined` when none of them do — which is what lets the panel drop
|
|
488
|
+
* the whole accordion instead of showing an empty one.
|
|
489
|
+
*
|
|
490
|
+
* An empty query returns the group unchanged, by identity, so the ordinary
|
|
491
|
+
* (not-searching) render allocates nothing and the field order authors have
|
|
492
|
+
* learned is untouched.
|
|
493
|
+
*/ export function filterStyleGroup(group, query) {
|
|
494
|
+
if (!normalize(query)) return group;
|
|
495
|
+
const ranked = group.fields.map((field)=>({
|
|
496
|
+
field,
|
|
497
|
+
score: scoreStyleEntry(styleFieldEntry(field), query)
|
|
498
|
+
})).filter((entry)=>entry.score > 0).sort((a, b)=>b.score - a.score);
|
|
499
|
+
if (!ranked.length) return undefined;
|
|
500
|
+
return _extends({}, group, {
|
|
501
|
+
fields: ranked.map((entry)=>entry.field)
|
|
502
|
+
});
|
|
503
|
+
}
|
|
504
|
+
|
|
505
|
+
//# sourceMappingURL=style-field-search.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../../../../../../libs/besigner/feature/designer/src/lib/utils/style-field-search.ts"],"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 { StyleFieldGroup } from './style-field-groups'\n\n/**\n * Searching the styles panel (AGL-2486, item 13).\n *\n * The panel is seven accordions deep — Colors, Sizing, Typography, Borders &\n * Shadows, Position & Overflow, Flexbox & Grid, Classes & custom CSS — plus\n * the box stylers, the alignment toggles and the visibility switches. Finding\n * one property means remembering which section its author put it in.\n *\n * The part that makes this useful rather than decorative is the SECOND index:\n * matching the CSS property name alone would only help someone who already\n * knows CSS, and they are not the people this product is for. So every field\n * also carries the words a non-developer reaches for — `rounded` finds Corner\n * Radius, `shadow` finds the box-shadow control, `see through` finds Opacity,\n * `bold` finds Font Weight — and both spellings of colour are indexed because\n * half of Aglyn's authors type the other one.\n *\n * Ranking is deliberately simple and deterministic: an exact or prefix hit on\n * what the field is CALLED outranks a hit on one of its aliases, which\n * outranks a substring anywhere. Every term of a multi-word query has to\n * match something, so `border color` narrows instead of widening.\n */\n\n/** Something the panel can find: a field, a control, or a whole section. */\nexport interface StyleSearchEntry {\n /** Stable id — a style property name, or a section key. */\n name: string\n /** What the panel calls it on screen. */\n label: string\n /** The words an author might use for it instead. */\n keywords?: readonly string[]\n}\n\n/**\n * What authors call these things when they are not reading a CSS spec.\n *\n * Keyed by the panel's own field name so a field added later is findable by\n * its label and property name with no entry here at all — this list only ever\n * ADDS reach, it is never the thing that makes search work.\n */\nexport const STYLE_FIELD_KEYWORDS: Record<string, readonly string[]> = {\n // Colors\n color: ['colour', 'text colour', 'font colour', 'type colour', 'ink'],\n backgroundColor: [\n 'colour',\n 'fill',\n 'background',\n 'bg',\n 'behind',\n 'panel colour',\n ],\n backgroundImage: [\n 'gradient',\n 'fill',\n 'background',\n 'image',\n 'fade',\n 'ramp',\n 'photo',\n ],\n // Sizing\n width: ['size', 'wide', 'how wide'],\n height: ['size', 'tall', 'how tall'],\n minWidth: ['size', 'narrowest', 'at least wide'],\n maxWidth: ['size', 'widest', 'cap width', 'no wider than'],\n minHeight: ['size', 'shortest', 'at least tall'],\n maxHeight: ['size', 'tallest', 'no taller than'],\n // Typography\n fontSize: ['text size', 'type size', 'bigger text', 'smaller text', 'scale'],\n fontWeight: ['bold', 'boldness', 'thickness', 'weight', 'light', 'heavy'],\n fontFamily: ['typeface', 'font', 'typography'],\n lineHeight: ['leading', 'line spacing', 'space between lines'],\n letterSpacing: ['tracking', 'kerning', 'space between letters'],\n textTransform: ['uppercase', 'caps', 'all caps', 'lowercase', 'capitalise'],\n textDecoration: ['underline', 'strikethrough', 'strike through', 'overline'],\n // Borders & shadows\n border: ['outline', 'stroke', 'edge', 'line', 'rule', 'frame'],\n borderColor: ['colour', 'outline colour', 'stroke colour', 'edge colour'],\n borderTop: ['line above', 'rule above', 'edge', 'divider'],\n borderRight: ['line right', 'edge', 'divider'],\n borderBottom: ['line below', 'rule below', 'underline bar', 'divider'],\n borderLeft: ['line left', 'accent rail', 'edge', 'divider'],\n borderRadius: [\n 'rounded',\n 'rounding',\n 'round corners',\n 'corner',\n 'corners',\n 'curve',\n 'radius',\n 'pill',\n ],\n outline: ['focus ring', 'ring', 'stroke'],\n boxShadow: ['shadow', 'drop shadow', 'elevation', 'depth', 'lift', 'glow'],\n // Position & overflow\n position: ['sticky', 'fixed', 'absolute', 'pin', 'float above'],\n top: ['offset', 'from the top'],\n right: ['offset', 'from the right'],\n bottom: ['offset', 'from the bottom'],\n left: ['offset', 'from the left'],\n zIndex: ['stacking', 'layer', 'on top', 'in front', 'behind', 'z order'],\n overflow: ['scroll', 'clip', 'cut off', 'hidden', 'spill'],\n opacity: [\n 'transparency',\n 'transparent',\n 'see through',\n 'fade',\n 'alpha',\n 'ghost',\n ],\n cursor: ['pointer', 'hand', 'mouse'],\n // Layout\n display: ['block', 'inline', 'flex', 'grid', 'hide', 'layout'],\n float: ['wrap text', 'align left', 'align right'],\n // Flexbox & grid\n gap: ['spacing', 'gutter', 'space between', 'breathing room'],\n rowGap: ['spacing', 'gutter', 'space between rows'],\n columnGap: ['spacing', 'gutter', 'space between columns'],\n gridTemplateColumns: ['columns', 'grid', 'tracks', 'how many columns'],\n gridTemplateRows: ['rows', 'grid', 'tracks'],\n gridAutoFlow: ['grid', 'flow', 'fill order'],\n gridColumn: ['span', 'columns', 'placement'],\n gridRow: ['span', 'rows', 'placement'],\n flexGrow: ['grow', 'fill space', 'stretch'],\n flexShrink: ['shrink', 'squeeze'],\n flexBasis: ['starting size', 'base size'],\n order: ['reorder', 'move first', 'move last', 'sequence'],\n flexDirection: ['row', 'column', 'direction', 'stack', 'side by side'],\n flexWrap: ['wrap', 'no wrap', 'onto a new line'],\n justifyContent: ['spacing', 'centre', 'center', 'spread', 'distribute'],\n alignItems: ['centre', 'center', 'middle', 'top', 'bottom', 'align'],\n alignContent: ['centre', 'center', 'distribute', 'align rows'],\n justifyItems: ['centre', 'center', 'align'],\n alignSelf: ['centre', 'center', 'this one only', 'align myself'],\n justifySelf: ['centre', 'center', 'this one only', 'align myself'],\n}\n\n/** Sections and controls that are not schema fields but must still be found. */\nexport const STYLE_SECTION_ENTRIES: Record<string, StyleSearchEntry> = {\n box: {\n name: 'box',\n label: 'Margin & padding',\n keywords: [\n 'margin',\n 'padding',\n 'spacing',\n 'space',\n 'inset',\n 'gutter',\n 'inner space',\n 'outer space',\n 'room',\n 'indent',\n ],\n },\n textAlign: {\n name: 'textAlign',\n label: 'Text Alignment',\n keywords: [\n 'align',\n 'alignment',\n 'centre',\n 'center',\n 'left',\n 'right',\n 'justify',\n 'ragged',\n ],\n },\n visibility: {\n name: 'visibility',\n label: 'Visibility',\n keywords: [\n 'hide',\n 'hidden',\n 'show',\n 'responsive',\n 'mobile',\n 'tablet',\n 'desktop',\n 'hide on mobile',\n 'device',\n 'breakpoint',\n ],\n },\n classes: {\n name: 'classes',\n label: 'Classes & custom CSS',\n keywords: [\n 'class',\n 'classes',\n 'css',\n 'custom css',\n 'sx',\n 'raw css',\n 'stylesheet',\n 'advanced',\n ],\n },\n}\n\n/** Normalizes a label or query for matching: lowercase, single-spaced. */\nfunction normalize(text: unknown): string {\n return `${text ?? ''}`\n .toLowerCase()\n .replace(/[_-]+/g, ' ')\n .replace(/\\s+/g, ' ')\n .trim()\n}\n\n/** `borderRadius` → `border radius`, so a two-word query hits a camel name. */\nfunction humanizeName(name: string): string {\n return normalize(name.replace(/([a-z0-9])([A-Z])/g, '$1 $2'))\n}\n\n/** Score of one query TERM against one haystack, 0 when it does not match. */\nfunction scoreTerm(haystack: string, term: string, weight: number): number {\n if (!haystack || !term) return 0\n if (haystack === term) return weight * 4\n if (haystack.startsWith(term)) return weight * 3\n // A hit at a word boundary (\"radius\" in \"corner radius\") is a real name\n // match; one mid-word (\"us\" in \"radius\") is barely evidence of anything.\n if (haystack.includes(` ${term}`)) return weight * 2\n if (haystack.includes(term)) return weight\n return 0\n}\n\n/**\n * How well one entry answers a query, or 0 when it does not.\n *\n * Every term must land somewhere — `border color` must not return every\n * border field AND every colour field — and the entry's own name and label\n * are weighted far above its aliases, so searching `color` puts Text Color\n * ahead of Border (which merely lists \"edge colour\" among its words).\n */\nexport function scoreStyleEntry(\n entry: StyleSearchEntry,\n query: string,\n): number {\n const terms = normalize(query).split(' ').filter(Boolean)\n if (!terms.length) return 0\n const label = normalize(entry.label)\n const name = humanizeName(entry.name)\n // The same two with their separators gone, because `zindex`, `zIndex` and\n // `z-index` are one word to the person typing them and three to a matcher\n // that only ever sees `z index`.\n const compact = [label, name].map((text) => text.replace(/ /g, ''))\n const keywords = (\n entry.keywords ??\n STYLE_FIELD_KEYWORDS[entry.name] ??\n []\n ).map(normalize)\n let total = 0\n for (const term of terms) {\n const best = Math.max(\n scoreTerm(label, term, 10),\n scoreTerm(name, term, 8),\n ...compact.map((text) => scoreTerm(text, term, 7)),\n ...keywords.map((keyword) => scoreTerm(keyword, term, 3)),\n )\n // One unmatched term disqualifies the entry: a query is a conjunction.\n if (best <= 0) return 0\n total += best\n }\n return total\n}\n\n/** Whether an entry answers the query (an empty query matches everything). */\nexport function matchesStyleQuery(\n entry: StyleSearchEntry,\n query: string,\n): boolean {\n if (!normalize(query)) return true\n return scoreStyleEntry(entry, query) > 0\n}\n\n/** The search entry for one schema field of a style group. */\nexport function styleFieldEntry(field: {\n name: string\n label?: unknown\n keywords?: readonly string[]\n}): StyleSearchEntry {\n return {\n name: field.name,\n label: `${field.label ?? field.name}`,\n keywords: field.keywords ?? STYLE_FIELD_KEYWORDS[field.name],\n }\n}\n\n/**\n * A group holding only the fields that answer the query, best match first,\n * or `undefined` when none of them do — which is what lets the panel drop\n * the whole accordion instead of showing an empty one.\n *\n * An empty query returns the group unchanged, by identity, so the ordinary\n * (not-searching) render allocates nothing and the field order authors have\n * learned is untouched.\n */\nexport function filterStyleGroup(\n group: StyleFieldGroup,\n query: string,\n): StyleFieldGroup | undefined {\n if (!normalize(query)) return group\n const ranked = group.fields\n .map((field) => ({\n field,\n score: scoreStyleEntry(styleFieldEntry(field as any), query),\n }))\n .filter((entry) => entry.score > 0)\n .sort((a, b) => b.score - a.score)\n if (!ranked.length) return undefined\n return { ...group, fields: ranked.map((entry) => entry.field) }\n}\n"],"names":["STYLE_FIELD_KEYWORDS","color","backgroundColor","backgroundImage","width","height","minWidth","maxWidth","minHeight","maxHeight","fontSize","fontWeight","fontFamily","lineHeight","letterSpacing","textTransform","textDecoration","border","borderColor","borderTop","borderRight","borderBottom","borderLeft","borderRadius","outline","boxShadow","position","top","right","bottom","left","zIndex","overflow","opacity","cursor","display","float","gap","rowGap","columnGap","gridTemplateColumns","gridTemplateRows","gridAutoFlow","gridColumn","gridRow","flexGrow","flexShrink","flexBasis","order","flexDirection","flexWrap","justifyContent","alignItems","alignContent","justifyItems","alignSelf","justifySelf","STYLE_SECTION_ENTRIES","box","name","label","keywords","textAlign","visibility","classes","normalize","text","toLowerCase","replace","trim","humanizeName","scoreTerm","haystack","term","weight","startsWith","includes","scoreStyleEntry","entry","query","terms","split","filter","Boolean","length","compact","map","total","best","Math","max","keyword","matchesStyleQuery","styleFieldEntry","field","filterStyleGroup","group","ranked","fields","score","sort","a","b","undefined"],"mappings":"AAAA;;;;;;;;;;;;;;;CAeC;AAoCD;;;;;;CAMC,GACD,OAAO,MAAMA,uBAA0D;IACrE,SAAS;IACTC,OAAO;QAAC;QAAU;QAAe;QAAe;QAAe;KAAM;IACrEC,iBAAiB;QACf;QACA;QACA;QACA;QACA;QACA;KACD;IACDC,iBAAiB;QACf;QACA;QACA;QACA;QACA;QACA;QACA;KACD;IACD,SAAS;IACTC,OAAO;QAAC;QAAQ;QAAQ;KAAW;IACnCC,QAAQ;QAAC;QAAQ;QAAQ;KAAW;IACpCC,UAAU;QAAC;QAAQ;QAAa;KAAgB;IAChDC,UAAU;QAAC;QAAQ;QAAU;QAAa;KAAgB;IAC1DC,WAAW;QAAC;QAAQ;QAAY;KAAgB;I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,CAACJ,QAAUA,MAAMqB,KAAK,GAAG,GAChCC,IAAI,CAAC,CAACC,GAAGC,IAAMA,EAAEH,KAAK,GAAGE,EAAEF,KAAK;IACnC,IAAI,CAACF,OAAOb,MAAM,EAAE,OAAOmB;IAC3B,OAAO,aAAKP;QAAOE,QAAQD,OAAOX,GAAG,CAAC,CAACR,QAAUA,MAAMgB,KAAK;;AAC9D"}
|
|
@@ -0,0 +1,69 @@
|
|
|
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
|
+
/**
|
|
19
|
+
* Where the Styles panel's edits land for the selected node (AGL-1306,
|
|
20
|
+
* AGL-1332, AGL-1346).
|
|
21
|
+
*
|
|
22
|
+
* A plain node's edits read and write `node.sx`, exactly as they always
|
|
23
|
+
* have. A reusable-component INSTANCE's edits read and write one slice of
|
|
24
|
+
* `node.styleOverrides` instead — the root slice by default, or the slice
|
|
25
|
+
* keyed by a DEFINITION-internal node id when the author has picked a leaf
|
|
26
|
+
* inside the component. Either way the panel behaves like it does on a
|
|
27
|
+
* fresh plain node (empty until this instance overrides something), and
|
|
28
|
+
* the canvas/Preview/tenant render the override merged over the matching
|
|
29
|
+
* component node via `composeReusableComponentNodes`. Mutating the
|
|
30
|
+
* component itself from a placing document is exactly what this layer
|
|
31
|
+
* exists to avoid — a leaf target styles the instance's copy of that leaf,
|
|
32
|
+
* and never unlocks the component's content, which stays the component's.
|
|
33
|
+
*
|
|
34
|
+
* `sx` is a GETTER so observer components track the underlying MobX state
|
|
35
|
+
* at read time; a snapshot captured when the target was built would go
|
|
36
|
+
* stale after the first write.
|
|
37
|
+
*/
|
|
38
|
+
export interface NodeStyleTarget {
|
|
39
|
+
/**
|
|
40
|
+
* The sx record edits read from and write to (live view).
|
|
41
|
+
*
|
|
42
|
+
* For a plain node this is the COMPOSED record — `props.sx` with
|
|
43
|
+
* `node.sx` merged over it (AGL-1346) — so what the panel displays is
|
|
44
|
+
* what renders. Writes are split back across the two records by
|
|
45
|
+
* {@link writeComposedNodeSx}.
|
|
46
|
+
*/
|
|
47
|
+
readonly sx: Record<string, any> | undefined;
|
|
48
|
+
/** True when edits land in one of the instance's override slices. */
|
|
49
|
+
readonly isInstanceOverride: boolean;
|
|
50
|
+
/**
|
|
51
|
+
* The `styleOverrides` key being edited — `root`, or a definition-internal
|
|
52
|
+
* node id. Empty string for a plain node, which has no override layer.
|
|
53
|
+
*/
|
|
54
|
+
readonly overrideKey: string;
|
|
55
|
+
/** True when the target is a leaf inside the component, not its root. */
|
|
56
|
+
readonly isLeafOverride: boolean;
|
|
57
|
+
/** Replaces the target sx wholesale (MobX action inside). */
|
|
58
|
+
setSx(next: Record<string, any> | undefined): void;
|
|
59
|
+
}
|
|
60
|
+
/**
|
|
61
|
+
* The style target for a selected node — see {@link NodeStyleTarget}.
|
|
62
|
+
*
|
|
63
|
+
* `overrideKey` selects WHICH slice of an instance's overrides is edited;
|
|
64
|
+
* it is ignored for a plain node. A falsy key falls back to the root, so a
|
|
65
|
+
* caller that has not resolved a definition yet still edits something real
|
|
66
|
+
* rather than writing an `undefined`-keyed slice no renderer reads.
|
|
67
|
+
*/
|
|
68
|
+
export declare function getNodeStyleTarget(node: Aglyn.NodeSchema<any> | null | undefined, overrideKey?: string | null): NodeStyleTarget;
|
|
69
|
+
export default getNodeStyleTarget;
|