@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 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../../../../../../libs/besigner/feature/designer/src/lib/components/property-values-form.component.tsx"],"sourcesContent":["/**\n * @license\n * Copyright 2026 Aglyn LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n'use client'\n\nimport type * as Aglyn from '@aglyn/aglyn'\nimport {\n canvas,\n components,\n EntityPickerContext,\n FieldComponentType,\n getKnownPluginInstallsVersion,\n ScreenLinkContext,\n subscribeKnownPluginInstalls,\n} from '@aglyn/aglyn'\nimport { useAglynSiteTheme } from '@aglyn/aglyn-node-renderer'\nimport {\n FormRenderer,\n FormSpy,\n type FormTemplateRenderProps,\n useFormApi,\n} from '@aglyn/shared-ui-jsx-forms'\nimport { useHostThemeDocument } from '@aglyn/shared-ui-theme'\nimport { Grid } from '@mui/material'\nimport {\n useContext,\n useEffect,\n useMemo,\n useRef,\n useState,\n useSyncExternalStore,\n} from 'react'\n\nimport { MediaPickerContext } from '../contexts/media-picker-context'\nimport useInsertTokenOptions from '../hooks/use-insert-token-options'\nimport { buildStyleThemeScales } from '../utils/theme-scale-options'\nimport {\n type AttributeFieldResolveContext,\n buildPropertyField,\n elementPropsComponentMapper,\n entityKindsForAttributes,\n type PropertyOwnerNoun,\n resolveAttributeField,\n withNumericValueParse,\n} from './element-props-form.component'\nimport { TOKEN_TEXT_FIELD_COMPONENT } from './token-text-field.component'\n\n/**\n * Property values edited OUTSIDE the Attributes panel, with the Attributes\n * panel's own controls (AGL-2893): the Properties dialog's Default for each\n * property, a kind's settings, a condition's operand, and a screen's values\n * for the layout it renders inside.\n *\n * Each field is an attribute field — {@link buildPropertyField} for a\n * property — finished by {@link resolveAttributeField} against the same site\n * data the panel reads and drawn by `elementPropsComponentMapper`. So a Yes /\n * no is the switch, an Icon the icon picker and a Color the color picker\n * here exactly as they are on an instance, and nothing here can drift from\n * the panel into a look-alike.\n */\n\n/** The form's nothing-to-submit: every change is reported as it happens. */\nconst noop = () => undefined\n\n/** The values each change reports, compared so a re-render is not a change. */\nfunction serialize(values: unknown): string {\n try {\n return JSON.stringify(values ?? {})\n } catch {\n return ''\n }\n}\n\n/** Hands the parent every change, and the form API for writes from outside. */\nfunction AttributeFieldsFormTemplate(\n props: FormTemplateRenderProps & {\n onValues: (values: Record<string, unknown>) => void\n formApiRef: { current: ReturnType<typeof useFormApi> | undefined }\n },\n) {\n const { formFields, onValues, formApiRef } = props\n const formApi = useFormApi()\n formApiRef.current = formApi\n // The values the form opened with, so the spy's first report — the state\n // it subscribed to, not a change — is not handed on as one.\n const last = useRef(serialize(formApi.getState().values))\n return (\n <form onSubmit={(event) => event.preventDefault()} noValidate>\n <Grid container spacing={2}>\n {formFields as unknown as JSX.Node}\n </Grid>\n <FormSpy\n subscription={{ values: true }}\n onChange={({ values }: { values: Record<string, unknown> }) => {\n const next = serialize(values)\n if (next === last.current) return\n last.current = next\n onValues(values)\n }}\n />\n </form>\n )\n}\n\nexport interface AttributeFieldsFormProps {\n /**\n * Attribute fields — as a coded component would declare them, or as\n * {@link buildPropertyField} draws a property — named for paths in\n * `values`.\n */\n fields: ReadonlyArray<Record<string, unknown>>\n /** The values the form starts from. Later changes to this are not re-read. */\n values?: Record<string, unknown>\n onChange: (values: Record<string, unknown>) => void\n /** Written into the field when a media library pick lands, by field name. */\n mediaFields?: ReadonlySet<string>\n}\n\n/**\n * Attribute fields in a form of their own, resolved and drawn exactly as the\n * Attributes panel draws them, reporting every change.\n */\nexport function AttributeFieldsForm(props: AttributeFieldsFormProps) {\n const { fields, values, onChange, mediaFields } = props\n const [initialValues] = useState(() => values ?? {})\n const formApiRef = useRef<ReturnType<typeof useFormApi> | undefined>(undefined)\n const onChangeRef = useRef(onChange)\n onChangeRef.current = onChange\n\n const { screens, labels } = useContext(ScreenLinkContext)\n const entityOptions = useContext(EntityPickerContext)\n const { onPickMedia } = useContext(MediaPickerContext)\n const { options: insertOptions, labelContext: tokenLabelContext } =\n useInsertTokenOptions(undefined)\n const pluginInstallsVersion = useSyncExternalStore(\n subscribeKnownPluginInstalls,\n getKnownPluginInstallsVersion,\n getKnownPluginInstallsVersion,\n )\n\n // Ask for the entity lists these fields' pickers show (AGL-703), as the\n // Attributes panel does for the element it edits.\n const requestEntities = entityOptions.request\n useEffect(() => {\n if (!requestEntities) return\n for (const kind of entityKindsForAttributes(\n fields as unknown as Aglyn.AglynAttributeSchema[],\n )) {\n requestEntities(kind)\n }\n }, [fields, requestEntities])\n\n // The canvas's elements, for element pickers.\n const wantsNodes = fields.some(\n (field) => field['component'] === FieldComponentType.NODE_SELECT,\n )\n const nodeOptions = useMemo(() => {\n if (!wantsNodes) return []\n const canvasNodes = (canvas.toJSON().nodes ?? {}) as Record<string, any>\n return Object.entries(canvasNodes)\n .filter(([id]) => Boolean(id))\n .map(([id, candidate]) => {\n const displayName =\n components.getSchema(candidate?.componentId)?.displayName ??\n candidate?.componentId ??\n 'Element'\n const text =\n typeof candidate?.props?.children === 'string'\n ? candidate.props.children.trim().slice(0, 24)\n : ''\n return {\n value: id,\n label: `${displayName}${text ? ` \"${text}\"` : ''} · ${id.slice(0, 6)}`,\n }\n })\n .sort((a, b) => a.label.localeCompare(b.label))\n }, [wantsNodes])\n\n const context = useMemo<AttributeFieldResolveContext>(\n () => ({\n screens,\n labels,\n values: initialValues,\n entityOptions,\n nodeOptions,\n insertOptions,\n tokenLabelContext,\n pluginInstallsVersion,\n }),\n [\n screens,\n labels,\n initialValues,\n entityOptions,\n nodeOptions,\n insertOptions,\n tokenLabelContext,\n pluginInstallsVersion,\n ],\n )\n\n const resolved = useMemo(\n () =>\n fields\n .map((field) => resolveAttributeField(field, context))\n .map((field) =>\n onPickMedia &&\n mediaFields?.has(String(field['name'])) &&\n field['component'] === TOKEN_TEXT_FIELD_COMPONENT\n ? {\n ...field,\n onBrowseMedia: () =>\n onPickMedia((value) =>\n formApiRef.current?.change(String(field['name']), value),\n ),\n }\n : field,\n )\n .filter((field) => String(field['component']) in elementPropsComponentMapper)\n .map(withNumericValueParse),\n [fields, context, onPickMedia, mediaFields],\n )\n\n // One component for the life of the form: a template created per render\n // would be a new component type each time, remounting every field.\n const [Template] = useState(\n () =>\n function BoundTemplate(templateProps: FormTemplateRenderProps) {\n return (\n <AttributeFieldsFormTemplate\n {...templateProps}\n formApiRef={formApiRef}\n onValues={(next) => onChangeRef.current(next)}\n />\n )\n },\n )\n\n return (\n <FormRenderer\n componentMapper={elementPropsComponentMapper}\n FormTemplate={Template}\n initialValues={initialValues}\n onSubmit={noop}\n schema={{ fields: resolved as never }}\n />\n )\n}\n\nexport interface PropertyValuesFormProps {\n /** The properties the owner declares. */\n declared: readonly Aglyn.ReusableComponentProp[]\n /** Each property's value, by name. */\n values?: Record<string, unknown>\n /** Every property's value, by name, after each change. */\n onChange: (values: Record<string, unknown>) => void\n /**\n * `value` for a page setting them, with each empty field falling back to\n * the default and every condition applied; `default` for declaring those\n * defaults.\n */\n role?: 'value' | 'default'\n noun?: PropertyOwnerNoun\n /** Only these properties, by name; all of them when omitted. */\n only?: readonly string[]\n}\n\n/** The path a property's value sits at inside this form. */\nconst VALUES_KEY = 'values'\nconst pathOf = (name: string) => `${VALUES_KEY}.${name}`\n\n/**\n * A component's or layout's properties, each edited with the control its\n * kind names in the Attributes panel.\n */\nexport function PropertyValuesForm(props: PropertyValuesFormProps) {\n const { declared, values, onChange, role = 'value', noun = 'component', only } = props\n const hostThemeDoc = useHostThemeDocument()\n const siteTheme = useAglynSiteTheme({ theme: hostThemeDoc })\n const themeScales = useMemo(\n () => buildStyleThemeScales(siteTheme as any) as unknown as Record<string, unknown>,\n [siteTheme],\n )\n const shown = useMemo(\n () =>\n declared.filter(\n (prop) => Boolean(prop?.name) && (!only || only.includes(prop.name)),\n ),\n [declared, only],\n )\n const fields = useMemo(\n () =>\n shown.map((prop) =>\n buildPropertyField(prop, {\n name: pathOf(prop.name),\n role,\n declared,\n valuePath: pathOf,\n noun,\n themeScales,\n }),\n ),\n [shown, role, declared, noun, themeScales],\n )\n const mediaFields = useMemo(\n () =>\n new Set(\n shown\n .filter((prop) => prop.type === 'image')\n .map((prop) => pathOf(prop.name)),\n ),\n [shown],\n )\n const [initial] = useState(() => ({ [VALUES_KEY]: values ?? {} }))\n return (\n <AttributeFieldsForm\n fields={fields}\n values={initial}\n mediaFields={mediaFields}\n onChange={(next) =>\n onChange(\n (next?.[VALUES_KEY] as Record<string, unknown> | undefined) ?? {},\n )\n }\n />\n )\n}\n\nexport default PropertyValuesForm\n"],"names":["canvas","components","EntityPickerContext","FieldComponentType","getKnownPluginInstallsVersion","ScreenLinkContext","subscribeKnownPluginInstalls","useAglynSiteTheme","FormRenderer","FormSpy","useFormApi","useHostThemeDocument","Grid","useContext","useEffect","useMemo","useRef","useState","useSyncExternalStore","MediaPickerContext","useInsertTokenOptions","buildStyleThemeScales","buildPropertyField","elementPropsComponentMapper","entityKindsForAttributes","resolveAttributeField","withNumericValueParse","TOKEN_TEXT_FIELD_COMPONENT","noop","undefined","serialize","values","JSON","stringify","AttributeFieldsFormTemplate","props","formFields","onValues","formApiRef","formApi","current","last","getState","form","onSubmit","event","preventDefault","noValidate","container","spacing","subscription","onChange","next","AttributeFieldsForm","fields","mediaFields","initialValues","onChangeRef","screens","labels","entityOptions","onPickMedia","options","insertOptions","labelContext","tokenLabelContext","pluginInstallsVersion","requestEntities","request","kind","wantsNodes","some","field","NODE_SELECT","nodeOptions","canvasNodes","toJSON","nodes","Object","entries","filter","id","Boolean","map","candidate","displayName","getSchema","componentId","text","children","trim","slice","value","label","sort","a","b","localeCompare","context","resolved","has","String","onBrowseMedia","change","Template","BoundTemplate","templateProps","componentMapper","FormTemplate","schema","VALUES_KEY","pathOf","name","PropertyValuesForm","declared","role","noun","only","hostThemeDoc","siteTheme","theme","themeScales","shown","prop","includes","valuePath","Set","type","initial"],"mappings":"AAAA;;;;;;;;;;;;;;;CAeC,GACD;;;AAGA,SACEA,MAAM,EACNC,UAAU,EACVC,mBAAmB,EACnBC,kBAAkB,EAClBC,6BAA6B,EAC7BC,iBAAiB,EACjBC,4BAA4B,QACvB,eAAc;AACrB,SAASC,iBAAiB,QAAQ,6BAA4B;AAC9D,SACEC,YAAY,EACZC,OAAO,EAEPC,UAAU,QACL,6BAA4B;AACnC,SAASC,oBAAoB,QAAQ,yBAAwB;AAC7D,SAASC,IAAI,QAAQ,gBAAe;AACpC,SACEC,UAAU,EACVC,SAAS,EACTC,OAAO,EACPC,MAAM,EACNC,QAAQ,EACRC,oBAAoB,QACf,QAAO;AAEd,SAASC,kBAAkB,QAAQ,sCAAkC;AACrE,OAAOC,2BAA2B,uCAAmC;AACrE,SAASC,qBAAqB,QAAQ,kCAA8B;AACpE,SAEEC,kBAAkB,EAClBC,2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U,CAACC;;mBACTD,iBACGC,wBAAAA,IAAM,CAAC0D,WAAW,mBAA4C,CAAC;;;AAK1E;AAEA,eAAeG,mBAAkB"}
|
|
@@ -0,0 +1,26 @@
|
|
|
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 IconButtonProps as MuiIconButtonProps } from '@mui/material';
|
|
18
|
+
export interface SchemePreviewControlsProps extends Partial<MuiIconButtonProps> {
|
|
19
|
+
}
|
|
20
|
+
/**
|
|
21
|
+
* Toggles the color scheme the canvas previews the host theme in. Only the
|
|
22
|
+
* artboard is affected — the surrounding console UI keeps its own theme.
|
|
23
|
+
*/
|
|
24
|
+
declare const SchemePreviewControlsComponent: import("react").ForwardRefExoticComponent<Omit<SchemePreviewControlsProps, "ref"> & import("react").RefAttributes<any>>;
|
|
25
|
+
export { SchemePreviewControlsComponent };
|
|
26
|
+
export default SchemePreviewControlsComponent;
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
import { _ as _extends } from "@swc/helpers/_/_extends";
|
|
2
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
3
|
+
/**
|
|
4
|
+
* @license
|
|
5
|
+
* Copyright 2026 Aglyn LLC
|
|
6
|
+
*
|
|
7
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
8
|
+
* you may not use this file except in compliance with the License.
|
|
9
|
+
* You may obtain a copy of the License at
|
|
10
|
+
*
|
|
11
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
12
|
+
*
|
|
13
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
14
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
15
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
16
|
+
* See the License for the specific language governing permissions and
|
|
17
|
+
* limitations under the License.
|
|
18
|
+
*/ import { ICON_VARIANT_THEME_DARK, ICON_VARIANT_THEME_LIGHT } from "@aglyn/shared-data-enums";
|
|
19
|
+
import { MdiIcon } from "@aglyn/shared-ui-jsx";
|
|
20
|
+
import { IconButton as MuiIconButton, Tooltip as MuiTooltip } from "@mui/material";
|
|
21
|
+
import { forwardRef, useCallback } from "react";
|
|
22
|
+
import useAglynBesignerFlag from "../hooks/use-aglyn-besigner-flag.js";
|
|
23
|
+
/**
|
|
24
|
+
* Toggles the color scheme the canvas previews the host theme in. Only the
|
|
25
|
+
* artboard is affected — the surrounding console UI keeps its own theme.
|
|
26
|
+
*/ const SchemePreviewControlsComponent = /*#__PURE__*/ forwardRef((props, ref)=>{
|
|
27
|
+
const {} = props, rest = _extends({}, props);
|
|
28
|
+
const [canvasScheme, setCanvasScheme] = useAglynBesignerFlag('canvasScheme');
|
|
29
|
+
const isDark = canvasScheme === 'dark';
|
|
30
|
+
const handleToggle = useCallback(()=>{
|
|
31
|
+
setCanvasScheme((prev)=>prev === 'dark' ? 'light' : 'dark');
|
|
32
|
+
}, [
|
|
33
|
+
setCanvasScheme
|
|
34
|
+
]);
|
|
35
|
+
return /*#__PURE__*/ _jsx(MuiTooltip, {
|
|
36
|
+
title: `Preview ${isDark ? 'light' : 'dark'} scheme on the artboard`,
|
|
37
|
+
children: /*#__PURE__*/ _jsx(MuiIconButton, _extends({
|
|
38
|
+
ref: ref,
|
|
39
|
+
"aria-label": "toggle artboard color scheme",
|
|
40
|
+
size: "small",
|
|
41
|
+
color: "inherit",
|
|
42
|
+
onClick: handleToggle
|
|
43
|
+
}, rest, {
|
|
44
|
+
children: /*#__PURE__*/ _jsx(MdiIcon, {
|
|
45
|
+
fontSize: "inherit",
|
|
46
|
+
path: isDark ? ICON_VARIANT_THEME_DARK.path : ICON_VARIANT_THEME_LIGHT.path
|
|
47
|
+
})
|
|
48
|
+
}))
|
|
49
|
+
});
|
|
50
|
+
});
|
|
51
|
+
SchemePreviewControlsComponent.displayName = 'SchemePreviewControlsComponent';
|
|
52
|
+
SchemePreviewControlsComponent.aglyn = true;
|
|
53
|
+
export { SchemePreviewControlsComponent };
|
|
54
|
+
export default SchemePreviewControlsComponent;
|
|
55
|
+
|
|
56
|
+
//# sourceMappingURL=scheme-preview-controls.component.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../../../../../../libs/besigner/feature/designer/src/lib/components/scheme-preview-controls.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 {\n ICON_VARIANT_THEME_DARK,\n ICON_VARIANT_THEME_LIGHT,\n} from '@aglyn/shared-data-enums'\nimport { MdiIcon } from '@aglyn/shared-ui-jsx'\nimport {\n IconButton as MuiIconButton,\n type IconButtonProps as MuiIconButtonProps,\n Tooltip as MuiTooltip,\n} from '@mui/material'\nimport { forwardRef, useCallback } from 'react'\nimport useAglynBesignerFlag from '../hooks/use-aglyn-besigner-flag'\n\nexport interface SchemePreviewControlsProps\n extends Partial<MuiIconButtonProps> {}\n\n/**\n * Toggles the color scheme the canvas previews the host theme in. Only the\n * artboard is affected — the surrounding console UI keeps its own theme.\n */\nconst SchemePreviewControlsComponent = forwardRef<\n any,\n SchemePreviewControlsProps\n>((props, ref) => {\n const { ...rest } = props\n const [canvasScheme, setCanvasScheme] = useAglynBesignerFlag('canvasScheme')\n const isDark = canvasScheme === 'dark'\n\n const handleToggle = useCallback(() => {\n setCanvasScheme((prev) => (prev === 'dark' ? 'light' : 'dark'))\n }, [setCanvasScheme])\n\n return (\n <MuiTooltip\n title={`Preview ${isDark ? 'light' : 'dark'} scheme on the artboard`}\n >\n <MuiIconButton\n ref={ref}\n aria-label=\"toggle artboard color scheme\"\n size=\"small\"\n color=\"inherit\"\n onClick={handleToggle}\n {...rest}\n >\n <MdiIcon\n fontSize=\"inherit\"\n path={\n isDark ? ICON_VARIANT_THEME_DARK.path : ICON_VARIANT_THEME_LIGHT.path\n }\n />\n </MuiIconButton>\n </MuiTooltip>\n )\n})\nSchemePreviewControlsComponent.displayName = 'SchemePreviewControlsComponent'\nSchemePreviewControlsComponent.aglyn = true\n\nexport { SchemePreviewControlsComponent }\nexport default SchemePreviewControlsComponent\n"],"names":["ICON_VARIANT_THEME_DARK","ICON_VARIANT_THEME_LIGHT","MdiIcon","IconButton","MuiIconButton","Tooltip","MuiTooltip","forwardRef","useCallback","useAglynBesignerFlag","SchemePreviewControlsComponent","props","ref","rest","canvasScheme","setCanvasScheme","isDark","handleToggle","prev","title","aria-label","size","color","onClick","fontSize","path","displayName","aglyn"],"mappings":";;AAAA;;;;;;;;;;;;;;;CAeC,GAED,SACEA,uBAAuB,EACvBC,wBAAwB,QACnB,2BAA0B;AACjC,SAASC,OAAO,QAAQ,uBAAsB;AAC9C,SACEC,cAAcC,aAAa,EAE3BC,WAAWC,UAAU,QAChB,gBAAe;AACtB,SAASC,UAAU,EAAEC,WAAW,QAAQ,QAAO;AAC/C,OAAOC,0BAA0B,sCAAkC;AAKnE;;;CAGC,GACD,MAAMC,+CAAiCH,WAGrC,CAACI,OAAOC;IACR,MAAM,EAAW,GAAGD,OAATE,oBAASF;IACpB,MAAM,CAACG,cAAcC,gBAAgB,GAAGN,qBAAqB;IAC7D,MAAMO,SAASF,iBAAiB;IAEhC,MAAMG,eAAeT,YAAY;QAC/BO,gBAAgB,CAACG,OAAUA,SAAS,SAAS,UAAU;IACzD,GAAG;QAACH;KAAgB;IAEpB,qBACE,KAACT;QACCa,OAAO,CAAC,QAAQ,EAAEH,SAAS,UAAU,OAAO,uBAAuB,CAAC;kBAEpE,cAAA,KAACZ;YACCQ,KAAKA;YACLQ,cAAW;YACXC,MAAK;YACLC,OAAM;YACNC,SAASN;WACLJ;sBAEJ,cAAA,KAACX;gBACCsB,UAAS;gBACTC,MACET,SAAShB,wBAAwByB,IAAI,GAAGxB,yBAAyBwB,IAAI;;;;AAMjF;AACAf,+BAA+BgB,WAAW,GAAG;AAC7ChB,+BAA+BiB,KAAK,GAAG;AAEvC,SAASjB,8BAA8B,GAAE;AACzC,eAAeA,+BAA8B"}
|
|
@@ -0,0 +1,118 @@
|
|
|
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 { EXTERNAL_URL_OPTION } from '@aglyn/aglyn-markdown-editor';
|
|
18
|
+
import { type FormFieldGridProps } from '@aglyn/shared-ui-jsx-forms';
|
|
19
|
+
import type { ReactNode } from 'react';
|
|
20
|
+
/**
|
|
21
|
+
* The picker's "type a URL instead" choice (AGL-1335) — UI-only and never
|
|
22
|
+
* stored. Defined beside the shared lookup, which offers the same choice in
|
|
23
|
+
* the markdown link dialog, and re-exported here where it was first needed.
|
|
24
|
+
*/
|
|
25
|
+
export { EXTERNAL_URL_OPTION };
|
|
26
|
+
/** Mapper key for {@link ScreenLinkField} in the attributes form. */
|
|
27
|
+
export declare const SCREEN_LINK_FIELD_COMPONENT = "aglyn-screen-link-field";
|
|
28
|
+
export interface ScreenLinkValuePickerProps {
|
|
29
|
+
/** Stored value: `screen:<id>`, a literal href, or empty. */
|
|
30
|
+
value?: string;
|
|
31
|
+
onChange: (next: string) => void;
|
|
32
|
+
label?: ReactNode;
|
|
33
|
+
helperText?: ReactNode;
|
|
34
|
+
/** Placeholder for the URL box — the component's default, where set. */
|
|
35
|
+
placeholder?: string;
|
|
36
|
+
disabled?: boolean;
|
|
37
|
+
size?: 'small' | 'medium';
|
|
38
|
+
/** Label on the "unset" option; the wording differs per surface. */
|
|
39
|
+
emptyLabel?: string;
|
|
40
|
+
/**
|
|
41
|
+
* The component default this field falls back to when left unset — named
|
|
42
|
+
* on the empty option so "not set" says what the page will actually
|
|
43
|
+
* render. A screen reference is resolved to the screen's NAME here: the
|
|
44
|
+
* stored `screen:9aXk…` is not a sentence anyone can act on.
|
|
45
|
+
*/
|
|
46
|
+
defaultValue?: string;
|
|
47
|
+
/** Whose default `defaultValue` is, in the empty option's words. */
|
|
48
|
+
defaultOwner?: 'component' | 'layout';
|
|
49
|
+
name?: string;
|
|
50
|
+
error?: boolean;
|
|
51
|
+
}
|
|
52
|
+
/**
|
|
53
|
+
* The screen picker a `Link`-typed value is authored with (AGL-1335) — a
|
|
54
|
+
* screen list with an external-URL escape hatch, controlled and free of the
|
|
55
|
+
* form stack so BOTH ends can use the same control: the component's
|
|
56
|
+
* Properties dialog (its `Default` cell) and the instance Attributes panel.
|
|
57
|
+
*
|
|
58
|
+
* Two ends mattering is the whole point of the issue. `Link` used to be a
|
|
59
|
+
* plain text box in both places, so a prop-driven CTA stored a hardcoded
|
|
60
|
+
* path and broke silently when the target screen was renamed — a regression
|
|
61
|
+
* against the Button's own `Link to screen` field (AGL-139) that the prop
|
|
62
|
+
* replaced. A picked screen stores `screen:<id>` and resolves through the
|
|
63
|
+
* published routing map at render, exactly like that field.
|
|
64
|
+
*
|
|
65
|
+
* The screen list comes from {@link Aglyn.ScreenLinkContext} — the same map
|
|
66
|
+
* the canvas resolves hrefs against, so the picker can never offer a screen
|
|
67
|
+
* the renderer would not resolve. A value the map does not know (a screen
|
|
68
|
+
* deleted since, or a component opened before the map loads) is kept and
|
|
69
|
+
* shown rather than silently reset to "not set".
|
|
70
|
+
*
|
|
71
|
+
* A search, not a list (AGL-3119): screens, listings and feeds narrow as the
|
|
72
|
+
* author types, and a collection ENTRY is looked up through
|
|
73
|
+
* `LinkTargetSearchContext` and stored as `entry:<collectionId>/<entryId>`,
|
|
74
|
+
* so a renamed post keeps every link to it.
|
|
75
|
+
*/
|
|
76
|
+
export declare function ScreenLinkValuePicker(props: ScreenLinkValuePickerProps): import("react").JSX.Element;
|
|
77
|
+
export declare namespace ScreenLinkValuePicker {
|
|
78
|
+
var displayName: string;
|
|
79
|
+
}
|
|
80
|
+
export interface ScreenLinkFieldProps {
|
|
81
|
+
[key: string]: unknown;
|
|
82
|
+
placeholder?: string;
|
|
83
|
+
FormFieldGridProps?: FormFieldGridProps;
|
|
84
|
+
}
|
|
85
|
+
/**
|
|
86
|
+
* The data-driven-forms adapter for {@link ScreenLinkValuePicker}, registered
|
|
87
|
+
* as {@link SCREEN_LINK_FIELD_COMPONENT} in the attributes mapper so a
|
|
88
|
+
* `Link`-typed instance prop edits with the picker instead of a text box
|
|
89
|
+
* (AGL-1335).
|
|
90
|
+
*
|
|
91
|
+
* The stored string flows through react-final-form exactly like the text
|
|
92
|
+
* field it replaces, so the debounced autosave commits it through the
|
|
93
|
+
* existing path with nothing new to teach it.
|
|
94
|
+
*/
|
|
95
|
+
export declare function ScreenLinkField(props: ScreenLinkFieldProps): import("react").JSX.Element;
|
|
96
|
+
export declare namespace ScreenLinkField {
|
|
97
|
+
var displayName: string;
|
|
98
|
+
}
|
|
99
|
+
/** Mapper key for {@link ScreenTargetField}, the attributes panel's Screen picker. */
|
|
100
|
+
export declare const SCREEN_TARGET_FIELD_COMPONENT = "aglyn-screen-target-field";
|
|
101
|
+
/**
|
|
102
|
+
* The attributes panel's Screen picker (`SCREEN_SELECT`) as the lookup
|
|
103
|
+
* (AGL-3119): the Screen Link's "Screen", the "Link to screen" of a Button and
|
|
104
|
+
* an Image, the Link Container's target, an Accordion header's, a Form's
|
|
105
|
+
* redirect, and each tab of a Tabs strip.
|
|
106
|
+
*
|
|
107
|
+
* It was a plain select over the routing map, which had no room for entries.
|
|
108
|
+
* Its options are still the ones `resolveAttributeField` builds, so both
|
|
109
|
+
* pickers offer one list; the value is stored exactly as the select stored it
|
|
110
|
+
* — a bare screen id, or a listing's, feed's or entry's own key — and there is
|
|
111
|
+
* no typed-address choice, because each of these elements carries its own
|
|
112
|
+
* External URL field for that.
|
|
113
|
+
*/
|
|
114
|
+
export declare function ScreenTargetField(props: ScreenLinkFieldProps): import("react").JSX.Element;
|
|
115
|
+
export declare namespace ScreenTargetField {
|
|
116
|
+
var displayName: string;
|
|
117
|
+
}
|
|
118
|
+
export default ScreenLinkField;
|
|
@@ -0,0 +1,282 @@
|
|
|
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, jsxs as _jsxs } from "react/jsx-runtime";
|
|
18
|
+
import { bareFragmentLinkWarning, formatScreenLinkValue, linkTargetKind, parseScreenLinkValue, resolveScreenHref, ScreenLinkContext, screenLinkTargetOptions, screenRoutesAnswerFor, unavailableScreenLabel, useLinkTargetLabel } from "@aglyn/aglyn";
|
|
19
|
+
import { EXTERNAL_URL_OPTION, LinkTargetAutocomplete } from "@aglyn/aglyn-markdown-editor";
|
|
20
|
+
import { FormFieldGrid, useFieldApi, validationError } from "@aglyn/shared-ui-jsx-forms";
|
|
21
|
+
import { Stack, TextField } from "@mui/material";
|
|
22
|
+
import { useCallback, useContext, useEffect, useMemo, useState } from "react";
|
|
23
|
+
/**
|
|
24
|
+
* The picker's "type a URL instead" choice (AGL-1335) — UI-only and never
|
|
25
|
+
* stored. Defined beside the shared lookup, which offers the same choice in
|
|
26
|
+
* the markdown link dialog, and re-exported here where it was first needed.
|
|
27
|
+
*/ export { EXTERNAL_URL_OPTION };
|
|
28
|
+
/** Mapper key for {@link ScreenLinkField} in the attributes form. */ export const SCREEN_LINK_FIELD_COMPONENT = 'aglyn-screen-link-field';
|
|
29
|
+
/** The escape hatch the `Link` picker ends its list with. */ const EXTERNAL_CHOICE = [
|
|
30
|
+
{
|
|
31
|
+
value: EXTERNAL_URL_OPTION,
|
|
32
|
+
label: 'External URL or path…'
|
|
33
|
+
}
|
|
34
|
+
];
|
|
35
|
+
/**
|
|
36
|
+
* The screen picker a `Link`-typed value is authored with (AGL-1335) — a
|
|
37
|
+
* screen list with an external-URL escape hatch, controlled and free of the
|
|
38
|
+
* form stack so BOTH ends can use the same control: the component's
|
|
39
|
+
* Properties dialog (its `Default` cell) and the instance Attributes panel.
|
|
40
|
+
*
|
|
41
|
+
* Two ends mattering is the whole point of the issue. `Link` used to be a
|
|
42
|
+
* plain text box in both places, so a prop-driven CTA stored a hardcoded
|
|
43
|
+
* path and broke silently when the target screen was renamed — a regression
|
|
44
|
+
* against the Button's own `Link to screen` field (AGL-139) that the prop
|
|
45
|
+
* replaced. A picked screen stores `screen:<id>` and resolves through the
|
|
46
|
+
* published routing map at render, exactly like that field.
|
|
47
|
+
*
|
|
48
|
+
* The screen list comes from {@link Aglyn.ScreenLinkContext} — the same map
|
|
49
|
+
* the canvas resolves hrefs against, so the picker can never offer a screen
|
|
50
|
+
* the renderer would not resolve. A value the map does not know (a screen
|
|
51
|
+
* deleted since, or a component opened before the map loads) is kept and
|
|
52
|
+
* shown rather than silently reset to "not set".
|
|
53
|
+
*
|
|
54
|
+
* A search, not a list (AGL-3119): screens, listings and feeds narrow as the
|
|
55
|
+
* author types, and a collection ENTRY is looked up through
|
|
56
|
+
* `LinkTargetSearchContext` and stored as `entry:<collectionId>/<entryId>`,
|
|
57
|
+
* so a renamed post keeps every link to it.
|
|
58
|
+
*/ export function ScreenLinkValuePicker(props) {
|
|
59
|
+
var _ref, // A bare `#fragment` goes nowhere on the published page
|
|
60
|
+
// (AGL-2867); saying so outranks the general note, and only a
|
|
61
|
+
// validation error outranks it.
|
|
62
|
+
_ref1;
|
|
63
|
+
const { value, onChange, label, helperText, placeholder, disabled, size = 'small', emptyLabel, defaultValue, defaultOwner = 'component', name, error } = props;
|
|
64
|
+
const { screens, labels } = useContext(ScreenLinkContext);
|
|
65
|
+
const screenId = parseScreenLinkValue(value);
|
|
66
|
+
const literal = screenId ? '' : value != null ? value : '';
|
|
67
|
+
// Mode is remembered, not derived, for one reason: choosing "External
|
|
68
|
+
// URL" leaves the value empty until something is typed, and a derived
|
|
69
|
+
// mode would snap the box shut under the author's cursor. It re-syncs
|
|
70
|
+
// whenever a value arrives from OUTSIDE (a different instance selected,
|
|
71
|
+
// an undo), which is what keeps a remembered flag from going stale.
|
|
72
|
+
const [external, setExternal] = useState(()=>!screenId && Boolean(literal));
|
|
73
|
+
useEffect(()=>{
|
|
74
|
+
if (screenId) setExternal(false);
|
|
75
|
+
else if (literal) setExternal(true);
|
|
76
|
+
}, [
|
|
77
|
+
screenId,
|
|
78
|
+
literal
|
|
79
|
+
]);
|
|
80
|
+
// Screens by name, then the site's collection listings (AGL-2799) and their
|
|
81
|
+
// feeds — built by the same function as the attributes panel's Screen
|
|
82
|
+
// picker.
|
|
83
|
+
const options = useMemo(()=>screenLinkTargetOptions(screens, labels, 'label'), [
|
|
84
|
+
screens,
|
|
85
|
+
labels
|
|
86
|
+
]);
|
|
87
|
+
// A stored id the routing map doesn't know still has to be selectable, or
|
|
88
|
+
// opening the dialog would silently rewrite the author's link to "unset".
|
|
89
|
+
// Not an entry: the map holds none, and the lookup names one by reading it.
|
|
90
|
+
const unknownScreen = screenId && linkTargetKind(screenId) !== 'entry' && resolveScreenHref(screens, screenId) === undefined ? screenId : undefined;
|
|
91
|
+
const defaultScreen = defaultValue ? parseScreenLinkValue(defaultValue) : undefined;
|
|
92
|
+
// An entry default is named by the same lookup a picked entry is.
|
|
93
|
+
const defaultEntry = useLinkTargetLabel(defaultScreen && linkTargetKind(defaultScreen) === 'entry' ? defaultScreen : undefined);
|
|
94
|
+
const describeDefault = ()=>{
|
|
95
|
+
var _ref, _ref1;
|
|
96
|
+
if (!defaultValue) return undefined;
|
|
97
|
+
if (!defaultScreen) return defaultValue;
|
|
98
|
+
if (defaultEntry) return defaultEntry.label;
|
|
99
|
+
return (_ref = (_ref1 = labels == null ? void 0 : labels[defaultScreen]) != null ? _ref1 : screens == null ? void 0 : screens[defaultScreen]) != null ? _ref : undefined;
|
|
100
|
+
};
|
|
101
|
+
const described = describeDefault();
|
|
102
|
+
const resolvedEmptyLabel = emptyLabel != null ? emptyLabel : described ? `Use the ${defaultOwner} default (${described})` : defaultValue ? `Use the ${defaultOwner} default` : 'Not set';
|
|
103
|
+
// A default that is a screen reference is not a URL, so it must not be
|
|
104
|
+
// offered as one in the text box.
|
|
105
|
+
const urlPlaceholder = placeholder && !parseScreenLinkValue(placeholder) ? placeholder : 'https://example.com';
|
|
106
|
+
const selectValue = external ? EXTERNAL_URL_OPTION : screenId ? screenId : '';
|
|
107
|
+
const leading = useMemo(()=>[
|
|
108
|
+
{
|
|
109
|
+
value: '',
|
|
110
|
+
label: resolvedEmptyLabel
|
|
111
|
+
},
|
|
112
|
+
...unknownScreen ? [
|
|
113
|
+
{
|
|
114
|
+
value: unknownScreen,
|
|
115
|
+
// Wording shared with the plain Screen picker (AGL-1893): the
|
|
116
|
+
// same condition told two different stories in two panels, and
|
|
117
|
+
// "Unknown screen" reads as "we cannot look it up" rather than
|
|
118
|
+
// "this link is dead". The value stays the bare id — the
|
|
119
|
+
// handler re-wraps it through `formatScreenLinkValue`.
|
|
120
|
+
label: unavailableScreenLabel(unknownScreen, screenRoutesAnswerFor(screens, unknownScreen))
|
|
121
|
+
}
|
|
122
|
+
] : []
|
|
123
|
+
], [
|
|
124
|
+
resolvedEmptyLabel,
|
|
125
|
+
unknownScreen,
|
|
126
|
+
screens
|
|
127
|
+
]);
|
|
128
|
+
const handleSelect = useCallback((next, detail)=>{
|
|
129
|
+
if (next === EXTERNAL_URL_OPTION) {
|
|
130
|
+
var _detail_address;
|
|
131
|
+
setExternal(true);
|
|
132
|
+
// An address typed straight into the lookup is used as typed.
|
|
133
|
+
// Otherwise keep whatever literal was already there — switching
|
|
134
|
+
// modes back and forth must not eat a URL typed a moment ago.
|
|
135
|
+
onChange((_detail_address = detail.address) != null ? _detail_address : literal);
|
|
136
|
+
return;
|
|
137
|
+
}
|
|
138
|
+
setExternal(false);
|
|
139
|
+
onChange(next ? formatScreenLinkValue(next) : '');
|
|
140
|
+
}, [
|
|
141
|
+
literal,
|
|
142
|
+
onChange
|
|
143
|
+
]);
|
|
144
|
+
return /*#__PURE__*/ _jsxs(Stack, {
|
|
145
|
+
spacing: 1,
|
|
146
|
+
sx: {
|
|
147
|
+
width: '100%'
|
|
148
|
+
},
|
|
149
|
+
children: [
|
|
150
|
+
/*#__PURE__*/ _jsx(LinkTargetAutocomplete, {
|
|
151
|
+
name: name,
|
|
152
|
+
label: label,
|
|
153
|
+
size: size,
|
|
154
|
+
value: selectValue,
|
|
155
|
+
disabled: disabled,
|
|
156
|
+
error: error,
|
|
157
|
+
onChange: handleSelect,
|
|
158
|
+
helperText: external ? undefined : helperText,
|
|
159
|
+
targets: options,
|
|
160
|
+
leading: leading,
|
|
161
|
+
trailing: EXTERNAL_CHOICE,
|
|
162
|
+
addressOption: EXTERNAL_URL_OPTION
|
|
163
|
+
}),
|
|
164
|
+
external ? /*#__PURE__*/ _jsx(TextField, {
|
|
165
|
+
size: size,
|
|
166
|
+
value: literal,
|
|
167
|
+
disabled: disabled,
|
|
168
|
+
placeholder: urlPlaceholder,
|
|
169
|
+
helperText: (_ref = (_ref1 = error ? helperText : bareFragmentLinkWarning(literal)) != null ? _ref1 : helperText) != null ? _ref : 'Typed addresses do not follow a screen rename.',
|
|
170
|
+
onChange: (event)=>onChange(event.target.value),
|
|
171
|
+
fullWidth: true,
|
|
172
|
+
slotProps: {
|
|
173
|
+
htmlInput: {
|
|
174
|
+
'aria-label': 'External URL'
|
|
175
|
+
}
|
|
176
|
+
}
|
|
177
|
+
}) : null
|
|
178
|
+
]
|
|
179
|
+
});
|
|
180
|
+
}
|
|
181
|
+
ScreenLinkValuePicker.displayName = 'ScreenLinkValuePicker';
|
|
182
|
+
/**
|
|
183
|
+
* The data-driven-forms adapter for {@link ScreenLinkValuePicker}, registered
|
|
184
|
+
* as {@link SCREEN_LINK_FIELD_COMPONENT} in the attributes mapper so a
|
|
185
|
+
* `Link`-typed instance prop edits with the picker instead of a text box
|
|
186
|
+
* (AGL-1335).
|
|
187
|
+
*
|
|
188
|
+
* The stored string flows through react-final-form exactly like the text
|
|
189
|
+
* field it replaces, so the debounced autosave commits it through the
|
|
190
|
+
* existing path with nothing new to teach it.
|
|
191
|
+
*/ export function ScreenLinkField(props) {
|
|
192
|
+
var _input_value;
|
|
193
|
+
const { input, isDisabled, isReadOnly, label, placeholder, helperText, description, validateOnMount, meta, help, propDefault, propDefaultOwner, emptyLabel, FormFieldGridProps = {} } = useFieldApi(props);
|
|
194
|
+
const invalid = validationError(meta, validateOnMount);
|
|
195
|
+
return /*#__PURE__*/ _jsx(FormFieldGrid, _extends({
|
|
196
|
+
help: help
|
|
197
|
+
}, FormFieldGridProps, {
|
|
198
|
+
children: /*#__PURE__*/ _jsx(ScreenLinkValuePicker, {
|
|
199
|
+
name: input.name,
|
|
200
|
+
value: (_input_value = input.value) != null ? _input_value : '',
|
|
201
|
+
onChange: input.onChange,
|
|
202
|
+
label: label,
|
|
203
|
+
placeholder: placeholder,
|
|
204
|
+
defaultValue: propDefault,
|
|
205
|
+
defaultOwner: propDefaultOwner,
|
|
206
|
+
emptyLabel: emptyLabel,
|
|
207
|
+
disabled: isDisabled || isReadOnly,
|
|
208
|
+
error: Boolean(invalid),
|
|
209
|
+
helperText: invalid || helperText || description
|
|
210
|
+
})
|
|
211
|
+
}));
|
|
212
|
+
}
|
|
213
|
+
ScreenLinkField.displayName = 'ScreenLinkField';
|
|
214
|
+
/** Mapper key for {@link ScreenTargetField}, the attributes panel's Screen picker. */ export const SCREEN_TARGET_FIELD_COMPONENT = 'aglyn-screen-target-field';
|
|
215
|
+
/**
|
|
216
|
+
* The options `resolveAttributeField` built, sorted into the targets the
|
|
217
|
+
* routing map holds — offered in groups, narrowed as the author types — and
|
|
218
|
+
* the choices pinned above them: the empty one, and a stored target the host
|
|
219
|
+
* no longer has. An entry is neither: the lookup names it by reading it.
|
|
220
|
+
*/ function splitScreenTargetOptions(options, screens) {
|
|
221
|
+
const leading = [];
|
|
222
|
+
const targets = [];
|
|
223
|
+
for (const option of Array.isArray(options) ? options : []){
|
|
224
|
+
var _ref;
|
|
225
|
+
const value = typeof (option == null ? void 0 : option.value) === 'string' ? option.value : '';
|
|
226
|
+
const choice = {
|
|
227
|
+
value,
|
|
228
|
+
label: String((_ref = option == null ? void 0 : option.label) != null ? _ref : value)
|
|
229
|
+
};
|
|
230
|
+
if (value && linkTargetKind(value) === 'entry') continue;
|
|
231
|
+
if (value && resolveScreenHref(screens, value) !== undefined) {
|
|
232
|
+
targets.push(choice);
|
|
233
|
+
} else {
|
|
234
|
+
leading.push(choice);
|
|
235
|
+
}
|
|
236
|
+
}
|
|
237
|
+
return {
|
|
238
|
+
leading,
|
|
239
|
+
targets
|
|
240
|
+
};
|
|
241
|
+
}
|
|
242
|
+
/**
|
|
243
|
+
* The attributes panel's Screen picker (`SCREEN_SELECT`) as the lookup
|
|
244
|
+
* (AGL-3119): the Screen Link's "Screen", the "Link to screen" of a Button and
|
|
245
|
+
* an Image, the Link Container's target, an Accordion header's, a Form's
|
|
246
|
+
* redirect, and each tab of a Tabs strip.
|
|
247
|
+
*
|
|
248
|
+
* It was a plain select over the routing map, which had no room for entries.
|
|
249
|
+
* Its options are still the ones `resolveAttributeField` builds, so both
|
|
250
|
+
* pickers offer one list; the value is stored exactly as the select stored it
|
|
251
|
+
* — a bare screen id, or a listing's, feed's or entry's own key — and there is
|
|
252
|
+
* no typed-address choice, because each of these elements carries its own
|
|
253
|
+
* External URL field for that.
|
|
254
|
+
*/ export function ScreenTargetField(props) {
|
|
255
|
+
const { input, isDisabled, isReadOnly, label, helperText, description, validateOnMount, meta, help, options, FormFieldGridProps = {} } = useFieldApi(props);
|
|
256
|
+
const { screens } = useContext(ScreenLinkContext);
|
|
257
|
+
const invalid = validationError(meta, validateOnMount);
|
|
258
|
+
const { leading, targets } = useMemo(()=>splitScreenTargetOptions(options, screens), [
|
|
259
|
+
options,
|
|
260
|
+
screens
|
|
261
|
+
]);
|
|
262
|
+
const stored = typeof input.value === 'string' ? input.value.trim() : '';
|
|
263
|
+
return /*#__PURE__*/ _jsx(FormFieldGrid, _extends({
|
|
264
|
+
help: help
|
|
265
|
+
}, FormFieldGridProps, {
|
|
266
|
+
children: /*#__PURE__*/ _jsx(LinkTargetAutocomplete, {
|
|
267
|
+
name: input.name,
|
|
268
|
+
value: stored,
|
|
269
|
+
onChange: (next)=>input.onChange(next),
|
|
270
|
+
targets: targets,
|
|
271
|
+
leading: leading,
|
|
272
|
+
label: label,
|
|
273
|
+
disabled: isDisabled || isReadOnly,
|
|
274
|
+
error: Boolean(invalid),
|
|
275
|
+
helperText: invalid || helperText || description
|
|
276
|
+
})
|
|
277
|
+
}));
|
|
278
|
+
}
|
|
279
|
+
ScreenTargetField.displayName = 'ScreenTargetField';
|
|
280
|
+
export default ScreenLinkField;
|
|
281
|
+
|
|
282
|
+
//# sourceMappingURL=screen-link-field.component.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../../../../../../libs/besigner/feature/designer/src/lib/components/screen-link-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 {\n bareFragmentLinkWarning,\n formatScreenLinkValue,\n linkTargetKind,\n parseScreenLinkValue,\n resolveScreenHref,\n ScreenLinkContext,\n screenLinkTargetOptions,\n screenRoutesAnswerFor,\n unavailableScreenLabel,\n useLinkTargetLabel,\n} from '@aglyn/aglyn'\nimport {\n EXTERNAL_URL_OPTION,\n LinkTargetAutocomplete,\n type LinkTargetChangeDetail,\n type LinkTargetChoice,\n} from '@aglyn/aglyn-markdown-editor'\nimport {\n FormFieldGrid,\n type FormFieldGridProps,\n useFieldApi,\n validationError,\n type ExtendedFieldMeta,\n} from '@aglyn/shared-ui-jsx-forms'\nimport { Stack, TextField } from '@mui/material'\nimport { useCallback, useContext, useEffect, useMemo, useState } from 'react'\nimport type { ReactNode } from 'react'\n\n/**\n * The picker's \"type a URL instead\" choice (AGL-1335) — UI-only and never\n * stored. Defined beside the shared lookup, which offers the same choice in\n * the markdown link dialog, and re-exported here where it was first needed.\n */\nexport { EXTERNAL_URL_OPTION }\n\n/** Mapper key for {@link ScreenLinkField} in the attributes form. */\nexport const SCREEN_LINK_FIELD_COMPONENT = 'aglyn-screen-link-field'\n\n/** The escape hatch the `Link` picker ends its list with. */\nconst EXTERNAL_CHOICE: readonly LinkTargetChoice[] = [\n { value: EXTERNAL_URL_OPTION, label: 'External URL or path…' },\n]\n\nexport interface ScreenLinkValuePickerProps {\n /** Stored value: `screen:<id>`, a literal href, or empty. */\n value?: string\n onChange: (next: string) => void\n label?: ReactNode\n helperText?: ReactNode\n /** Placeholder for the URL box — the component's default, where set. */\n placeholder?: string\n disabled?: boolean\n size?: 'small' | 'medium'\n /** Label on the \"unset\" option; the wording differs per surface. */\n emptyLabel?: string\n /**\n * The component default this field falls back to when left unset — named\n * on the empty option so \"not set\" says what the page will actually\n * render. A screen reference is resolved to the screen's NAME here: the\n * stored `screen:9aXk…` is not a sentence anyone can act on.\n */\n defaultValue?: string\n /** Whose default `defaultValue` is, in the empty option's words. */\n defaultOwner?: 'component' | 'layout'\n name?: string\n error?: boolean\n}\n\n/**\n * The screen picker a `Link`-typed value is authored with (AGL-1335) — a\n * screen list with an external-URL escape hatch, controlled and free of the\n * form stack so BOTH ends can use the same control: the component's\n * Properties dialog (its `Default` cell) and the instance Attributes panel.\n *\n * Two ends mattering is the whole point of the issue. `Link` used to be a\n * plain text box in both places, so a prop-driven CTA stored a hardcoded\n * path and broke silently when the target screen was renamed — a regression\n * against the Button's own `Link to screen` field (AGL-139) that the prop\n * replaced. A picked screen stores `screen:<id>` and resolves through the\n * published routing map at render, exactly like that field.\n *\n * The screen list comes from {@link Aglyn.ScreenLinkContext} — the same map\n * the canvas resolves hrefs against, so the picker can never offer a screen\n * the renderer would not resolve. A value the map does not know (a screen\n * deleted since, or a component opened before the map loads) is kept and\n * shown rather than silently reset to \"not set\".\n *\n * A search, not a list (AGL-3119): screens, listings and feeds narrow as the\n * author types, and a collection ENTRY is looked up through\n * `LinkTargetSearchContext` and stored as `entry:<collectionId>/<entryId>`,\n * so a renamed post keeps every link to it.\n */\nexport function ScreenLinkValuePicker(props: ScreenLinkValuePickerProps) {\n const {\n value,\n onChange,\n label,\n helperText,\n placeholder,\n disabled,\n size = 'small',\n emptyLabel,\n defaultValue,\n defaultOwner = 'component',\n name,\n error,\n } = props\n const { screens, labels } = useContext(ScreenLinkContext)\n const screenId = parseScreenLinkValue(value)\n const literal = screenId ? '' : (value ?? '')\n\n // Mode is remembered, not derived, for one reason: choosing \"External\n // URL\" leaves the value empty until something is typed, and a derived\n // mode would snap the box shut under the author's cursor. It re-syncs\n // whenever a value arrives from OUTSIDE (a different instance selected,\n // an undo), which is what keeps a remembered flag from going stale.\n const [external, setExternal] = useState(() => !screenId && Boolean(literal))\n useEffect(() => {\n if (screenId) setExternal(false)\n else if (literal) setExternal(true)\n }, [screenId, literal])\n\n // Screens by name, then the site's collection listings (AGL-2799) and their\n // feeds — built by the same function as the attributes panel's Screen\n // picker.\n const options = useMemo(\n () => screenLinkTargetOptions(screens, labels, 'label'),\n [screens, labels],\n )\n\n // A stored id the routing map doesn't know still has to be selectable, or\n // opening the dialog would silently rewrite the author's link to \"unset\".\n // Not an entry: the map holds none, and the lookup names one by reading it.\n const unknownScreen =\n screenId &&\n linkTargetKind(screenId) !== 'entry' &&\n resolveScreenHref(screens, screenId) === undefined\n ? screenId\n : undefined\n\n const defaultScreen = defaultValue\n ? parseScreenLinkValue(defaultValue)\n : undefined\n // An entry default is named by the same lookup a picked entry is.\n const defaultEntry = useLinkTargetLabel(\n defaultScreen && linkTargetKind(defaultScreen) === 'entry'\n ? defaultScreen\n : undefined,\n )\n const describeDefault = () => {\n if (!defaultValue) return undefined\n if (!defaultScreen) return defaultValue\n if (defaultEntry) return defaultEntry.label\n return labels?.[defaultScreen] ?? screens?.[defaultScreen] ?? undefined\n }\n const described = describeDefault()\n const resolvedEmptyLabel =\n emptyLabel ??\n (described\n ? `Use the ${defaultOwner} default (${described})`\n : defaultValue\n ? `Use the ${defaultOwner} default`\n : 'Not set')\n // A default that is a screen reference is not a URL, so it must not be\n // offered as one in the text box.\n const urlPlaceholder =\n placeholder && !parseScreenLinkValue(placeholder)\n ? placeholder\n : 'https://example.com'\n\n const selectValue = external\n ? EXTERNAL_URL_OPTION\n : screenId\n ? screenId\n : ''\n\n const leading = useMemo<LinkTargetChoice[]>(\n () => [\n { value: '', label: resolvedEmptyLabel },\n ...(unknownScreen\n ? [\n {\n value: unknownScreen,\n // Wording shared with the plain Screen picker (AGL-1893): the\n // same condition told two different stories in two panels, and\n // \"Unknown screen\" reads as \"we cannot look it up\" rather than\n // \"this link is dead\". The value stays the bare id — the\n // handler re-wraps it through `formatScreenLinkValue`.\n label: unavailableScreenLabel(\n unknownScreen,\n screenRoutesAnswerFor(screens, unknownScreen),\n ),\n },\n ]\n : []),\n ],\n [resolvedEmptyLabel, unknownScreen, screens],\n )\n\n const handleSelect = useCallback(\n (next: string, detail: LinkTargetChangeDetail) => {\n if (next === EXTERNAL_URL_OPTION) {\n setExternal(true)\n // An address typed straight into the lookup is used as typed.\n // Otherwise keep whatever literal was already there — switching\n // modes back and forth must not eat a URL typed a moment ago.\n onChange(detail.address ?? literal)\n return\n }\n setExternal(false)\n onChange(next ? formatScreenLinkValue(next) : '')\n },\n [literal, onChange],\n )\n\n return (\n <Stack spacing={1} sx={{ width: '100%' }}>\n <LinkTargetAutocomplete\n name={name}\n label={label}\n size={size}\n value={selectValue}\n disabled={disabled}\n error={error}\n onChange={handleSelect}\n helperText={external ? undefined : helperText}\n targets={options}\n leading={leading}\n trailing={EXTERNAL_CHOICE}\n addressOption={EXTERNAL_URL_OPTION}\n />\n {external ? (\n <TextField\n size={size}\n value={literal}\n disabled={disabled}\n placeholder={urlPlaceholder}\n helperText={\n // A bare `#fragment` goes nowhere on the published page\n // (AGL-2867); saying so outranks the general note, and only a\n // validation error outranks it.\n (error ? helperText : bareFragmentLinkWarning(literal)) ??\n helperText ??\n 'Typed addresses do not follow a screen rename.'\n }\n onChange={(event) => onChange(event.target.value)}\n fullWidth\n slotProps={{ htmlInput: { 'aria-label': 'External URL' } }}\n />\n ) : null}\n </Stack>\n )\n}\nScreenLinkValuePicker.displayName = 'ScreenLinkValuePicker'\n\nexport interface ScreenLinkFieldProps {\n [key: string]: unknown\n placeholder?: string\n FormFieldGridProps?: FormFieldGridProps\n}\n\n/**\n * The data-driven-forms adapter for {@link ScreenLinkValuePicker}, registered\n * as {@link SCREEN_LINK_FIELD_COMPONENT} in the attributes mapper so a\n * `Link`-typed instance prop edits with the picker instead of a text box\n * (AGL-1335).\n *\n * The stored string flows through react-final-form exactly like the text\n * field it replaces, so the debounced autosave commits it through the\n * existing path with nothing new to teach it.\n */\nexport function ScreenLinkField(props: ScreenLinkFieldProps) {\n const {\n input,\n isDisabled,\n isReadOnly,\n label,\n placeholder,\n helperText,\n description,\n validateOnMount,\n meta,\n help,\n propDefault,\n propDefaultOwner,\n emptyLabel,\n FormFieldGridProps = {},\n // Nothing is spread onto the controls below, so free-text leftovers\n // from a schema authored as a TEXT_FIELD (`multiline`, `inputProps`,\n // the token-picker inputs) are simply never read — they cannot reach\n // the select the way they would through a `{...rest}`.\n } = useFieldApi(props as never) as Record<string, any>\n const invalid = validationError(meta as ExtendedFieldMeta, validateOnMount)\n\n return (\n <FormFieldGrid help={help} {...FormFieldGridProps}>\n <ScreenLinkValuePicker\n name={input.name}\n value={input.value ?? ''}\n onChange={input.onChange}\n label={label}\n placeholder={placeholder}\n defaultValue={propDefault}\n defaultOwner={propDefaultOwner}\n emptyLabel={emptyLabel}\n disabled={isDisabled || isReadOnly}\n error={Boolean(invalid)}\n helperText={invalid || helperText || description}\n />\n </FormFieldGrid>\n )\n}\nScreenLinkField.displayName = 'ScreenLinkField'\n\n/** Mapper key for {@link ScreenTargetField}, the attributes panel's Screen picker. */\nexport const SCREEN_TARGET_FIELD_COMPONENT = 'aglyn-screen-target-field'\n\n/**\n * The options `resolveAttributeField` built, sorted into the targets the\n * routing map holds — offered in groups, narrowed as the author types — and\n * the choices pinned above them: the empty one, and a stored target the host\n * no longer has. An entry is neither: the lookup names it by reading it.\n */\nfunction splitScreenTargetOptions(\n options: unknown,\n screens: Aglyn.ScreenRouteMap | undefined,\n): { leading: LinkTargetChoice[]; targets: LinkTargetChoice[] } {\n const leading: LinkTargetChoice[] = []\n const targets: LinkTargetChoice[] = []\n for (const option of Array.isArray(options) ? options : []) {\n const value = typeof option?.value === 'string' ? option.value : ''\n const choice = { value, label: String(option?.label ?? value) }\n if (value && linkTargetKind(value) === 'entry') continue\n if (value && resolveScreenHref(screens, value) !== undefined) {\n targets.push(choice)\n } else {\n leading.push(choice)\n }\n }\n return { leading, targets }\n}\n\n/**\n * The attributes panel's Screen picker (`SCREEN_SELECT`) as the lookup\n * (AGL-3119): the Screen Link's \"Screen\", the \"Link to screen\" of a Button and\n * an Image, the Link Container's target, an Accordion header's, a Form's\n * redirect, and each tab of a Tabs strip.\n *\n * It was a plain select over the routing map, which had no room for entries.\n * Its options are still the ones `resolveAttributeField` builds, so both\n * pickers offer one list; the value is stored exactly as the select stored it\n * — a bare screen id, or a listing's, feed's or entry's own key — and there is\n * no typed-address choice, because each of these elements carries its own\n * External URL field for that.\n */\nexport function ScreenTargetField(props: ScreenLinkFieldProps) {\n const {\n input,\n isDisabled,\n isReadOnly,\n label,\n helperText,\n description,\n validateOnMount,\n meta,\n help,\n options,\n FormFieldGridProps = {},\n } = useFieldApi(props as never) as Record<string, any>\n const { screens } = useContext(ScreenLinkContext)\n const invalid = validationError(meta as ExtendedFieldMeta, validateOnMount)\n const { leading, targets } = useMemo(\n () => splitScreenTargetOptions(options, screens),\n [options, screens],\n )\n const stored = typeof input.value === 'string' ? input.value.trim() : ''\n\n return (\n <FormFieldGrid help={help} {...FormFieldGridProps}>\n <LinkTargetAutocomplete\n name={input.name}\n value={stored}\n onChange={(next) => input.onChange(next)}\n targets={targets}\n leading={leading}\n label={label}\n disabled={isDisabled || isReadOnly}\n error={Boolean(invalid)}\n helperText={invalid || helperText || description}\n />\n </FormFieldGrid>\n )\n}\nScreenTargetField.displayName = 'ScreenTargetField'\n\nexport default ScreenLinkField\n"],"names":["bareFragmentLinkWarning","formatScreenLinkValue","linkTargetKind","parseScreenLinkValue","resolveScreenHref","ScreenLinkContext","screenLinkTargetOptions","screenRoutesAnswerFor","unavailableScreenLabel","useLinkTargetLabel","EXTERNAL_URL_OPTION","LinkTargetAutocomplete","FormFieldGrid","useFieldApi","validationError","Stack","TextField","useCallback","useContext","useEffect","useMemo","useState","SCREEN_LINK_FIELD_COMPONENT","EXTERNAL_CHOICE","value","label","ScreenLinkValuePicker","props","error","onChange","helperText","placeholder","disabled","size","emptyLabel","defaultValue","defaultOwner","name","screens","labels","screenId","literal","external","setExternal","Boolean","options","unknownScreen","undefined","defaultScreen","defaultEntry","describeDefault","described","resolvedEmptyLabel","urlPlaceholder","selectValue","leading","handleSelect","next","detail","address","spacing","sx","width","targets","trailing","addressOption","event","target","fullWidth","slotProps","htmlInput","displayName","ScreenLinkField","input","isDisabled","isReadOnly","description","validateOnMount","meta","help","propDefault","propDefaultOwner","FormFieldGridProps","invalid","SCREEN_TARGET_FIELD_COMPONENT","splitScreenTargetOptions","option","Array","isArray","choice","String","push","ScreenTargetField","stored","trim"],"mappings":"AAAA;;;;;;;;;;;;;;;CAeC;;AAGD,SACEA,uBAAuB,EACvBC,qBAAqB,EACrBC,cAAc,EACdC,oBAAoB,EACpBC,iBAAiB,EACjBC,iBAAiB,EACjBC,uBAAuB,EACvBC,qBAAqB,EACrBC,sBAAsB,EACtBC,kBAAkB,QACb,eAAc;AACrB,SACEC,mBAAmB,EACnBC,sBAA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O,EAAE,GAAGpB,WAAWb;IAC/B,MAAM8E,UAAUrE,gBAAgBgE,MAA2BD;IAC3D,MAAM,EAAEtB,OAAO,EAAEQ,OAAO,EAAE,GAAG3C,QAC3B,IAAMiE,yBAAyBxC,SAASP,UACxC;QAACO;QAASP;KAAQ;IAEpB,MAAMuD,SAAS,OAAOpB,MAAMjD,KAAK,KAAK,WAAWiD,MAAMjD,KAAK,CAACsE,IAAI,KAAK;IAEtE,qBACE,KAAClF;QAAcmE,MAAMA;OAAUG;kBAC7B,cAAA,KAACvE;YACC0B,MAAMoC,MAAMpC,IAAI;YAChBb,OAAOqE;YACPhE,UAAU,CAAC4B,OAASgB,MAAM5C,QAAQ,CAAC4B;YACnCM,SAASA;YACTR,SAASA;YACT9B,OAAOA;YACPO,UAAU0C,cAAcC;YACxB/C,OAAOgB,QAAQuC;YACfrD,YAAYqD,WAAWrD,cAAc8C;;;AAI7C;AACAgB,kBAAkBrB,WAAW,GAAG;AAEhC,eAAeC,gBAAe"}
|
|
@@ -0,0 +1,33 @@
|
|
|
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
|
+
/**
|
|
18
|
+
* Feeds the two-stage color picker (AGL-588) with the SITE theme's
|
|
19
|
+
* palette token references, resolved through BOTH schemes of the host's
|
|
20
|
+
* persisted theme document so every swatch previews its light and dark
|
|
21
|
+
* colors. Mounted around the designer's aside panels, it reaches every
|
|
22
|
+
* COLOR_PICKER field — styles panel, attribute forms, and email block
|
|
23
|
+
* attributes — through the shared field component, with no per-form
|
|
24
|
+
* wiring.
|
|
25
|
+
*/
|
|
26
|
+
export declare const SiteThemeColorTokensProvider: {
|
|
27
|
+
(props: {
|
|
28
|
+
children?: JSX.Children;
|
|
29
|
+
}): import("react").JSX.Element;
|
|
30
|
+
displayName: string;
|
|
31
|
+
aglyn: boolean;
|
|
32
|
+
};
|
|
33
|
+
export default SiteThemeColorTokensProvider;
|