@threadlabs/looma 0.30.1 → 0.30.3
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/EXPRESSIVE-MARKDOWN.md +5 -0
- package/components/ui-combobox/ui-combobox.html +10 -10
- package/components/ui-editor-table-overlay/ui-editor-table-overlay.html +2 -4
- package/components/ui-image/ui-image.html +2 -2
- package/components/ui-listbox/ui-listbox.html +1 -1
- package/components/ui-tree-item/ui-tree-item.html +4 -2
- package/dist/index.js +5 -4
- package/package.json +4 -4
- package/styles/ui-action-bar.css +1 -1
- package/styles/ui-affordance-scope.css +1 -1
- package/styles/ui-avatar-group.css +1 -1
- package/styles/ui-avatar.css +1 -1
- package/styles/ui-badge.css +1 -1
- package/styles/ui-breadcrumb-item.css +1 -1
- package/styles/ui-breadcrumbs.css +1 -1
- package/styles/ui-button.css +1 -1
- package/styles/ui-callout.css +1 -1
- package/styles/ui-card.css +1 -1
- package/styles/ui-checkbox.css +1 -1
- package/styles/ui-cluster.css +1 -1
- package/styles/ui-combobox.css +1 -1
- package/styles/ui-container.css +1 -1
- package/styles/ui-context-menu.css +1 -1
- package/styles/ui-cover.css +1 -1
- package/styles/ui-description-item.css +1 -1
- package/styles/ui-description-list.css +1 -1
- package/styles/ui-dialog.css +1 -1
- package/styles/ui-disclosure.css +1 -1
- package/styles/ui-editable.css +1 -1
- package/styles/ui-editor-block-actions.css +1 -1
- package/styles/ui-editor-chip-editor.css +1 -1
- package/styles/ui-editor-code-language.css +1 -1
- package/styles/ui-editor-image-toolbar.css +1 -1
- package/styles/ui-editor-insert-table-grid.css +1 -1
- package/styles/ui-editor-link-card.css +1 -1
- package/styles/ui-editor-link-form.css +1 -1
- package/styles/ui-editor-mention-menu-item.css +1 -1
- package/styles/ui-editor-mention-menu.css +1 -1
- package/styles/ui-editor-slash-menu-group.css +1 -1
- package/styles/ui-editor-slash-menu-item.css +1 -1
- package/styles/ui-editor-slash-menu.css +1 -1
- package/styles/ui-editor-surface.css +1 -1
- package/styles/ui-editor-table-context-menu.css +1 -1
- package/styles/ui-editor-table-overlay.css +1 -1
- package/styles/ui-editor-table-toolbar.css +1 -1
- package/styles/ui-editor-toolbar.css +1 -1
- package/styles/ui-floating-action-button.css +1 -1
- package/styles/ui-form-field.css +1 -1
- package/styles/ui-grid.css +1 -1
- package/styles/ui-icon-button.css +1 -1
- package/styles/ui-icon.css +1 -1
- package/styles/ui-image.css +1 -1
- package/styles/ui-input-group.css +1 -1
- package/styles/ui-input.css +1 -1
- package/styles/ui-list-item.css +1 -1
- package/styles/ui-list.css +1 -1
- package/styles/ui-listbox.css +1 -1
- package/styles/ui-menu-group.css +1 -1
- package/styles/ui-menu-item.css +1 -1
- package/styles/ui-menu.css +1 -1
- package/styles/ui-meter.css +1 -1
- package/styles/ui-nav-item.css +1 -1
- package/styles/ui-page-header.css +1 -1
- package/styles/ui-popover.css +1 -1
- package/styles/ui-radio-group.css +1 -1
- package/styles/ui-radio.css +1 -1
- package/styles/ui-reel.css +1 -1
- package/styles/ui-scroll-area.css +1 -1
- package/styles/ui-search-result-row.css +1 -1
- package/styles/ui-search-shell.css +1 -1
- package/styles/ui-section.css +1 -1
- package/styles/ui-select.css +1 -1
- package/styles/ui-separator.css +1 -1
- package/styles/ui-sidebar.css +1 -1
- package/styles/ui-spinner.css +1 -1
- package/styles/ui-stack.css +1 -1
- package/styles/ui-status-message.css +1 -1
- package/styles/ui-swatch.css +1 -1
- package/styles/ui-switch.css +1 -1
- package/styles/ui-switcher.css +1 -1
- package/styles/ui-table.css +1 -1
- package/styles/ui-tabs.css +1 -1
- package/styles/ui-text.css +1 -1
- package/styles/ui-textarea.css +1 -1
- package/styles/ui-toast-region.css +1 -1
- package/styles/ui-toast.css +1 -1
- package/styles/ui-tooltip.css +1 -1
- package/styles/ui-top-bar.css +1 -1
- package/styles/ui-tree-item.css +1 -1
- package/styles/ui-tree.css +1 -1
- package/vanilla/UiActionBar.d.ts +1 -1
- package/vanilla/UiActionBar.js +1 -1
- package/vanilla/UiAffordanceScope.d.ts +1 -1
- package/vanilla/UiAffordanceScope.js +4 -4
- package/vanilla/UiAvatar.d.ts +1 -1
- package/vanilla/UiAvatar.js +4 -4
- package/vanilla/UiAvatarGroup.d.ts +1 -1
- package/vanilla/UiAvatarGroup.js +4 -4
- package/vanilla/UiBadge.d.ts +1 -1
- package/vanilla/UiBadge.js +4 -4
- package/vanilla/UiBreadcrumbItem.d.ts +1 -1
- package/vanilla/UiBreadcrumbItem.js +3 -3
- package/vanilla/UiBreadcrumbs.d.ts +1 -1
- package/vanilla/UiBreadcrumbs.js +3 -3
- package/vanilla/UiButton.d.ts +1 -1
- package/vanilla/UiButton.js +6 -6
- package/vanilla/UiCallout.d.ts +1 -1
- package/vanilla/UiCallout.js +4 -4
- package/vanilla/UiCard.d.ts +1 -1
- package/vanilla/UiCard.js +6 -6
- package/vanilla/UiCheckbox.d.ts +1 -1
- package/vanilla/UiCheckbox.js +4 -4
- package/vanilla/UiCluster.d.ts +1 -1
- package/vanilla/UiCluster.js +4 -4
- package/vanilla/UiCombobox.d.ts +12 -12
- package/vanilla/UiCombobox.js +12 -10
- package/vanilla/UiContainer.d.ts +1 -1
- package/vanilla/UiContainer.js +4 -4
- package/vanilla/UiContextMenu.d.ts +2 -2
- package/vanilla/UiContextMenu.js +3 -3
- package/vanilla/UiCover.d.ts +1 -1
- package/vanilla/UiCover.js +4 -4
- package/vanilla/UiDescriptionItem.d.ts +1 -1
- package/vanilla/UiDescriptionItem.js +3 -3
- package/vanilla/UiDescriptionList.d.ts +1 -1
- package/vanilla/UiDescriptionList.js +4 -4
- package/vanilla/UiDialog.d.ts +1 -1
- package/vanilla/UiDialog.js +4 -4
- package/vanilla/UiDisclosure.d.ts +1 -1
- package/vanilla/UiDisclosure.js +4 -4
- package/vanilla/UiEditable.d.ts +1 -1
- package/vanilla/UiEditable.js +3 -3
- package/vanilla/UiEditorBlockActions.d.ts +1 -1
- package/vanilla/UiEditorBlockActions.js +4 -4
- package/vanilla/UiEditorChipEditor.d.ts +1 -1
- package/vanilla/UiEditorChipEditor.js +4 -4
- package/vanilla/UiEditorCodeLanguage.d.ts +1 -1
- package/vanilla/UiEditorCodeLanguage.js +3 -3
- package/vanilla/UiEditorImageToolbar.d.ts +1 -1
- package/vanilla/UiEditorImageToolbar.js +4 -4
- package/vanilla/UiEditorInsertTableGrid.d.ts +1 -1
- package/vanilla/UiEditorInsertTableGrid.js +3 -3
- package/vanilla/UiEditorLinkCard.d.ts +1 -1
- package/vanilla/UiEditorLinkCard.js +8 -6
- package/vanilla/UiEditorLinkForm.d.ts +2 -2
- package/vanilla/UiEditorLinkForm.js +9 -7
- package/vanilla/UiEditorMentionMenu.d.ts +3 -3
- package/vanilla/UiEditorMentionMenu.js +3 -3
- package/vanilla/UiEditorMentionMenuItem.d.ts +1 -1
- package/vanilla/UiEditorMentionMenuItem.js +3 -3
- package/vanilla/UiEditorSlashMenu.d.ts +3 -3
- package/vanilla/UiEditorSlashMenu.js +3 -3
- package/vanilla/UiEditorSlashMenuGroup.d.ts +1 -1
- package/vanilla/UiEditorSlashMenuGroup.js +3 -3
- package/vanilla/UiEditorSlashMenuItem.d.ts +1 -1
- package/vanilla/UiEditorSlashMenuItem.js +3 -3
- package/vanilla/UiEditorSurface.d.ts +1 -1
- package/vanilla/UiEditorSurface.js +4 -4
- package/vanilla/UiEditorTableContextMenu.d.ts +1 -1
- package/vanilla/UiEditorTableContextMenu.js +4 -4
- package/vanilla/UiEditorTableOverlay.d.ts +2 -2
- package/vanilla/UiEditorTableOverlay.js +4 -4
- package/vanilla/UiEditorTableToolbar.d.ts +1 -1
- package/vanilla/UiEditorTableToolbar.js +4 -4
- package/vanilla/UiEditorToolbar.d.ts +1 -1
- package/vanilla/UiEditorToolbar.js +3 -3
- package/vanilla/UiFloatingActionButton.d.ts +1 -1
- package/vanilla/UiFloatingActionButton.js +3 -3
- package/vanilla/UiFormField.d.ts +1 -1
- package/vanilla/UiFormField.js +3 -3
- package/vanilla/UiGrid.d.ts +1 -1
- package/vanilla/UiGrid.js +4 -4
- package/vanilla/UiIcon.d.ts +1 -1
- package/vanilla/UiIcon.js +9 -7
- package/vanilla/UiIconButton.d.ts +1 -1
- package/vanilla/UiIconButton.js +4 -4
- package/vanilla/UiImage.d.ts +1 -1
- package/vanilla/UiImage.js +4 -4
- package/vanilla/UiInput.d.ts +1 -1
- package/vanilla/UiInput.js +4 -4
- package/vanilla/UiInputGroup.d.ts +1 -1
- package/vanilla/UiInputGroup.js +4 -4
- package/vanilla/UiList.d.ts +1 -1
- package/vanilla/UiList.js +6 -6
- package/vanilla/UiListItem.d.ts +1 -1
- package/vanilla/UiListItem.js +4 -4
- package/vanilla/UiListbox.d.ts +2 -2
- package/vanilla/UiListbox.js +3 -3
- package/vanilla/UiMenu.d.ts +2 -2
- package/vanilla/UiMenu.js +4 -4
- package/vanilla/UiMenuGroup.d.ts +1 -1
- package/vanilla/UiMenuGroup.js +3 -3
- package/vanilla/UiMenuItem.d.ts +1 -1
- package/vanilla/UiMenuItem.js +6 -6
- package/vanilla/UiMeter.d.ts +1 -1
- package/vanilla/UiMeter.js +9 -7
- package/vanilla/UiNavItem.d.ts +1 -1
- package/vanilla/UiNavItem.js +6 -6
- package/vanilla/UiPageHeader.d.ts +1 -1
- package/vanilla/UiPageHeader.js +4 -4
- package/vanilla/UiPopover.d.ts +1 -1
- package/vanilla/UiPopover.js +4 -4
- package/vanilla/UiRadio.d.ts +1 -1
- package/vanilla/UiRadio.js +4 -4
- package/vanilla/UiRadioGroup.d.ts +1 -1
- package/vanilla/UiRadioGroup.js +4 -4
- package/vanilla/UiReel.d.ts +1 -1
- package/vanilla/UiReel.js +4 -4
- package/vanilla/UiScrollArea.d.ts +1 -1
- package/vanilla/UiScrollArea.js +4 -4
- package/vanilla/UiSearchResultRow.d.ts +1 -1
- package/vanilla/UiSearchResultRow.js +4 -4
- package/vanilla/UiSearchShell.d.ts +1 -1
- package/vanilla/UiSearchShell.js +3 -3
- package/vanilla/UiSection.d.ts +1 -1
- package/vanilla/UiSection.js +4 -4
- package/vanilla/UiSelect.d.ts +1 -1
- package/vanilla/UiSelect.js +4 -4
- package/vanilla/UiSeparator.d.ts +1 -1
- package/vanilla/UiSeparator.js +4 -4
- package/vanilla/UiSidebar.d.ts +1 -1
- package/vanilla/UiSidebar.js +4 -4
- package/vanilla/UiSpinner.d.ts +1 -1
- package/vanilla/UiSpinner.js +4 -4
- package/vanilla/UiStack.d.ts +1 -1
- package/vanilla/UiStack.js +4 -4
- package/vanilla/UiStatusMessage.d.ts +1 -1
- package/vanilla/UiStatusMessage.js +4 -4
- package/vanilla/UiSwatch.d.ts +1 -1
- package/vanilla/UiSwatch.js +9 -7
- package/vanilla/UiSwitch.d.ts +1 -1
- package/vanilla/UiSwitch.js +4 -4
- package/vanilla/UiSwitcher.d.ts +1 -1
- package/vanilla/UiSwitcher.js +4 -4
- package/vanilla/UiTable.d.ts +1 -1
- package/vanilla/UiTable.js +4 -4
- package/vanilla/UiTabs.d.ts +1 -1
- package/vanilla/UiTabs.js +4 -4
- package/vanilla/UiText.d.ts +1 -1
- package/vanilla/UiText.js +6 -6
- package/vanilla/UiTextarea.d.ts +1 -1
- package/vanilla/UiTextarea.js +4 -4
- package/vanilla/UiToast.d.ts +1 -1
- package/vanilla/UiToast.js +4 -4
- package/vanilla/UiToastRegion.d.ts +2 -2
- package/vanilla/UiToastRegion.js +4 -4
- package/vanilla/UiTooltip.d.ts +1 -1
- package/vanilla/UiTooltip.js +4 -4
- package/vanilla/UiTopBar.d.ts +1 -1
- package/vanilla/UiTopBar.js +1 -1
- package/vanilla/UiTree.d.ts +1 -1
- package/vanilla/UiTree.js +4 -4
- package/vanilla/UiTreeItem.d.ts +1 -1
- package/vanilla/UiTreeItem.js +35 -23
- package/vue/UiActionBar.vue +1 -1
- package/vue/UiAffordanceScope.d.ts +8 -8
- package/vue/UiAffordanceScope.vue +57 -20
- package/vue/UiAvatar.d.ts +9 -27
- package/vue/UiAvatar.vue +100 -68
- package/vue/UiAvatarGroup.d.ts +9 -18
- package/vue/UiAvatarGroup.vue +73 -44
- package/vue/UiBadge.d.ts +9 -15
- package/vue/UiBadge.vue +67 -39
- package/vue/UiBreadcrumbItem.d.ts +8 -5
- package/vue/UiBreadcrumbItem.vue +45 -12
- package/vue/UiBreadcrumbs.d.ts +8 -5
- package/vue/UiBreadcrumbs.vue +45 -12
- package/vue/UiButton.d.ts +9 -45
- package/vue/UiButton.vue +148 -119
- package/vue/UiCallout.d.ts +8 -8
- package/vue/UiCallout.vue +68 -25
- package/vue/UiCard.d.ts +8 -17
- package/vue/UiCard.vue +77 -53
- package/vue/UiCheckbox.d.ts +8 -29
- package/vue/UiCheckbox.vue +118 -76
- package/vue/UiCluster.d.ts +9 -24
- package/vue/UiCluster.vue +91 -66
- package/vue/UiCombobox.d.ts +135 -219
- package/vue/UiCombobox.vue +528 -496
- package/vue/UiContainer.d.ts +8 -11
- package/vue/UiContainer.vue +61 -28
- package/vue/UiContextMenu.d.ts +10 -10
- package/vue/UiContextMenu.vue +55 -22
- package/vue/UiCover.d.ts +8 -5
- package/vue/UiCover.vue +45 -12
- package/vue/UiDescriptionItem.d.ts +8 -5
- package/vue/UiDescriptionItem.vue +40 -12
- package/vue/UiDescriptionList.d.ts +8 -11
- package/vue/UiDescriptionList.vue +61 -34
- package/vue/UiDialog.d.ts +8 -26
- package/vue/UiDialog.vue +99 -74
- package/vue/UiDisclosure.d.ts +8 -29
- package/vue/UiDisclosure.vue +118 -79
- package/vue/UiEditable.d.ts +8 -35
- package/vue/UiEditable.vue +136 -92
- package/vue/UiEditorBlockActions.d.ts +8 -8
- package/vue/UiEditorBlockActions.vue +58 -23
- package/vue/UiEditorChipEditor.d.ts +8 -8
- package/vue/UiEditorChipEditor.vue +65 -20
- package/vue/UiEditorCodeLanguage.d.ts +8 -11
- package/vue/UiEditorCodeLanguage.vue +74 -31
- package/vue/UiEditorImageToolbar.d.ts +8 -11
- package/vue/UiEditorImageToolbar.vue +175 -144
- package/vue/UiEditorInsertTableGrid.d.ts +8 -14
- package/vue/UiEditorInsertTableGrid.vue +73 -36
- package/vue/UiEditorLinkCard.d.ts +8 -17
- package/vue/UiEditorLinkCard.vue +157 -90
- package/vue/UiEditorLinkForm.d.ts +10 -44
- package/vue/UiEditorLinkForm.vue +336 -228
- package/vue/UiEditorMentionMenu.d.ts +28 -60
- package/vue/UiEditorMentionMenu.vue +166 -121
- package/vue/UiEditorMentionMenuItem.d.ts +8 -11
- package/vue/UiEditorMentionMenuItem.vue +61 -28
- package/vue/UiEditorSlashMenu.d.ts +26 -52
- package/vue/UiEditorSlashMenu.vue +141 -104
- package/vue/UiEditorSlashMenuGroup.d.ts +8 -5
- package/vue/UiEditorSlashMenuGroup.vue +40 -12
- package/vue/UiEditorSlashMenuItem.d.ts +8 -17
- package/vue/UiEditorSlashMenuItem.vue +90 -48
- package/vue/UiEditorSurface.d.ts +8 -5
- package/vue/UiEditorSurface.vue +45 -15
- package/vue/UiEditorTableContextMenu.d.ts +8 -20
- package/vue/UiEditorTableContextMenu.vue +151 -113
- package/vue/UiEditorTableOverlay.d.ts +10 -29
- package/vue/UiEditorTableOverlay.vue +180 -153
- package/vue/UiEditorTableToolbar.d.ts +8 -20
- package/vue/UiEditorTableToolbar.vue +158 -116
- package/vue/UiEditorToolbar.d.ts +8 -5
- package/vue/UiEditorToolbar.vue +48 -12
- package/vue/UiFloatingActionButton.d.ts +8 -11
- package/vue/UiFloatingActionButton.vue +60 -28
- package/vue/UiFormField.d.ts +8 -11
- package/vue/UiFormField.vue +63 -28
- package/vue/UiGrid.d.ts +8 -11
- package/vue/UiGrid.vue +56 -28
- package/vue/UiIcon.d.ts +8 -8
- package/vue/UiIcon.vue +444 -395
- package/vue/UiIconButton.d.ts +9 -39
- package/vue/UiIconButton.vue +138 -103
- package/vue/UiImage.d.ts +8 -23
- package/vue/UiImage.vue +80 -60
- package/vue/UiInput.d.ts +4 -7
- package/vue/UiInput.vue +169 -149
- package/vue/UiInputGroup.d.ts +8 -17
- package/vue/UiInputGroup.vue +81 -47
- package/vue/UiList.d.ts +9 -15
- package/vue/UiList.vue +67 -39
- package/vue/UiListItem.d.ts +8 -20
- package/vue/UiListItem.vue +87 -52
- package/vue/UiListbox.d.ts +10 -28
- package/vue/UiListbox.vue +111 -71
- package/vue/UiMenu.d.ts +10 -25
- package/vue/UiMenu.vue +96 -65
- package/vue/UiMenuGroup.d.ts +8 -5
- package/vue/UiMenuGroup.vue +40 -12
- package/vue/UiMenuItem.d.ts +8 -20
- package/vue/UiMenuItem.vue +91 -55
- package/vue/UiMeter.d.ts +9 -33
- package/vue/UiMeter.vue +202 -147
- package/vue/UiNavItem.d.ts +9 -24
- package/vue/UiNavItem.vue +78 -63
- package/vue/UiPageHeader.d.ts +8 -5
- package/vue/UiPageHeader.vue +45 -12
- package/vue/UiPopover.d.ts +8 -14
- package/vue/UiPopover.vue +90 -58
- package/vue/UiRadio.d.ts +8 -20
- package/vue/UiRadio.vue +91 -52
- package/vue/UiRadioGroup.d.ts +8 -26
- package/vue/UiRadioGroup.vue +109 -74
- package/vue/UiReel.d.ts +8 -11
- package/vue/UiReel.vue +56 -28
- package/vue/UiScrollArea.d.ts +9 -18
- package/vue/UiScrollArea.vue +81 -53
- package/vue/UiSearchResultRow.d.ts +8 -11
- package/vue/UiSearchResultRow.vue +60 -31
- package/vue/UiSearchShell.d.ts +8 -14
- package/vue/UiSearchShell.vue +73 -36
- package/vue/UiSection.d.ts +8 -11
- package/vue/UiSection.vue +60 -31
- package/vue/UiSelect.d.ts +8 -17
- package/vue/UiSelect.vue +83 -51
- package/vue/UiSeparator.d.ts +9 -15
- package/vue/UiSeparator.vue +69 -39
- package/vue/UiSidebar.d.ts +8 -29
- package/vue/UiSidebar.vue +118 -76
- package/vue/UiSpinner.d.ts +8 -8
- package/vue/UiSpinner.vue +51 -20
- package/vue/UiStack.d.ts +9 -18
- package/vue/UiStack.vue +73 -53
- package/vue/UiStatusMessage.d.ts +8 -11
- package/vue/UiStatusMessage.vue +60 -33
- package/vue/UiSwatch.d.ts +8 -5
- package/vue/UiSwatch.vue +64 -22
- package/vue/UiSwitch.d.ts +8 -20
- package/vue/UiSwitch.vue +91 -52
- package/vue/UiSwitcher.d.ts +9 -15
- package/vue/UiSwitcher.vue +64 -39
- package/vue/UiTable.d.ts +8 -8
- package/vue/UiTable.vue +56 -23
- package/vue/UiTabs.d.ts +8 -23
- package/vue/UiTabs.vue +100 -66
- package/vue/UiText.d.ts +9 -36
- package/vue/UiText.vue +152 -109
- package/vue/UiTextarea.d.ts +8 -29
- package/vue/UiTextarea.vue +118 -83
- package/vue/UiToast.d.ts +8 -8
- package/vue/UiToast.vue +55 -20
- package/vue/UiToastRegion.d.ts +14 -14
- package/vue/UiToastRegion.vue +66 -28
- package/vue/UiTooltip.d.ts +8 -23
- package/vue/UiTooltip.vue +117 -82
- package/vue/UiTopBar.vue +1 -1
- package/vue/UiTree.d.ts +8 -23
- package/vue/UiTree.vue +99 -69
- package/vue/UiTreeItem.d.ts +8 -47
- package/vue/UiTreeItem.vue +178 -127
- package/vue/chunks/UiActionBar.js +1 -1
- package/vue/chunks/UiAffordanceScope.js +35 -22
- package/vue/chunks/UiAvatar.js +81 -70
- package/vue/chunks/UiAvatarGroup.js +58 -46
- package/vue/chunks/UiBadge.js +46 -38
- package/vue/chunks/UiBreadcrumbItem.js +22 -11
- package/vue/chunks/UiBreadcrumbs.js +22 -11
- package/vue/chunks/UiButton.js +115 -118
- package/vue/chunks/UiCallout.js +32 -22
- package/vue/chunks/UiCard.js +53 -46
- package/vue/chunks/UiCheckbox.js +84 -78
- package/vue/chunks/UiCluster.js +63 -62
- package/vue/chunks/UiCombobox.js +359 -382
- package/vue/chunks/UiContainer.js +35 -30
- package/vue/chunks/UiContextMenu.js +36 -23
- package/vue/chunks/UiCover.js +22 -11
- package/vue/chunks/UiDescriptionItem.js +22 -11
- package/vue/chunks/UiDescriptionList.js +38 -30
- package/vue/chunks/UiDialog.js +78 -70
- package/vue/chunks/UiDisclosure.js +87 -78
- package/vue/chunks/UiEditable.js +102 -94
- package/vue/chunks/UiEditorBlockActions.js +49 -23
- package/vue/chunks/UiEditorChipEditor.js +48 -25
- package/vue/chunks/UiEditorCodeLanguage.js +58 -41
- package/vue/chunks/UiEditorImageToolbar.js +153 -148
- package/vue/chunks/UiEditorInsertTableGrid.js +55 -38
- package/vue/chunks/UiEditorLinkCard.js +104 -82
- package/vue/chunks/UiEditorLinkForm.js +282 -258
- package/vue/chunks/UiEditorMentionMenu.js +156 -145
- package/vue/chunks/UiEditorMentionMenuItem.js +39 -30
- package/vue/chunks/UiEditorSlashMenu.js +141 -130
- package/vue/chunks/UiEditorSlashMenuGroup.js +22 -11
- package/vue/chunks/UiEditorSlashMenuItem.js +62 -47
- package/vue/chunks/UiEditorSurface.js +22 -11
- package/vue/chunks/UiEditorTableContextMenu.js +98 -87
- package/vue/chunks/UiEditorTableOverlay.js +286 -308
- package/vue/chunks/UiEditorTableToolbar.js +102 -87
- package/vue/chunks/UiEditorToolbar.js +24 -11
- package/vue/chunks/UiFloatingActionButton.js +39 -30
- package/vue/chunks/UiFormField.js +41 -30
- package/vue/chunks/UiGrid.js +35 -30
- package/vue/chunks/UiIcon.js +38 -25
- package/vue/chunks/UiIconButton.js +102 -102
- package/vue/chunks/UiImage.js +67 -62
- package/vue/chunks/UiInput.js +275 -274
- package/vue/chunks/UiInputGroup.js +55 -46
- package/vue/chunks/UiList.js +46 -38
- package/vue/chunks/UiListItem.js +60 -54
- package/vue/chunks/UiListbox.js +83 -72
- package/vue/chunks/UiMenu.js +71 -63
- package/vue/chunks/UiMenuGroup.js +22 -11
- package/vue/chunks/UiMenuItem.js +63 -54
- package/vue/chunks/UiMeter.js +124 -119
- package/vue/chunks/UiNavItem.js +64 -62
- package/vue/chunks/UiPageHeader.js +22 -11
- package/vue/chunks/UiPopover.js +49 -38
- package/vue/chunks/UiRadio.js +63 -54
- package/vue/chunks/UiRadioGroup.js +77 -70
- package/vue/chunks/UiReel.js +35 -30
- package/vue/chunks/UiScrollArea.js +55 -46
- package/vue/chunks/UiSearchResultRow.js +39 -30
- package/vue/chunks/UiSearchShell.js +49 -38
- package/vue/chunks/UiSection.js +39 -30
- package/vue/chunks/UiSelect.js +57 -48
- package/vue/chunks/UiSeparator.js +46 -38
- package/vue/chunks/UiSidebar.js +88 -78
- package/vue/chunks/UiSpinner.js +32 -22
- package/vue/chunks/UiStack.js +47 -46
- package/vue/chunks/UiStatusMessage.js +39 -30
- package/vue/chunks/UiSwatch.js +28 -14
- package/vue/chunks/UiSwitch.js +63 -54
- package/vue/chunks/UiSwitcher.js +44 -38
- package/vue/chunks/UiTable.js +34 -22
- package/vue/chunks/UiTabs.js +73 -62
- package/vue/chunks/UiText.js +95 -94
- package/vue/chunks/UiTextarea.js +84 -80
- package/vue/chunks/UiToast.js +34 -22
- package/vue/chunks/UiToastRegion.js +36 -23
- package/vue/chunks/UiTooltip.js +70 -62
- package/vue/chunks/UiTopBar.js +1 -1
- package/vue/chunks/UiTree.js +69 -62
- package/vue/chunks/UiTreeItem.js +154 -151
- package/vue/chunks/_plugin-vue_export-helper.js +185 -36
- package/vue/chunks/control.js +6 -1
- package/vue/chunks/props.js +435 -11
- package/vue/components.css +39 -39
- package/vue/editor/index.js +129 -291
- package/vue/host.ts +320 -14
- package/vue/props.d.ts +272 -0
package/vue/chunks/props.js
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { computed, shallowRef, watch } from "vue";
|
|
1
2
|
//#region .build/vue/props.ts
|
|
2
3
|
var CSS_NAMED_COLOR_SET = /* @__PURE__ */ new Set([
|
|
3
4
|
"accentcolor",
|
|
@@ -429,8 +430,9 @@ function parse(value, node, path) {
|
|
|
429
430
|
const issues = [];
|
|
430
431
|
const fields = new Map(node.fields.map((field) => [field.name, field]));
|
|
431
432
|
for (const field of node.fields) {
|
|
432
|
-
if (!(field.name in input)) {
|
|
433
|
+
if (!(field.name in input) || field.optional && input[field.name] == null) {
|
|
433
434
|
if (!field.optional) issues.push(pathAt(path, field.name) + ": Required field is absent.");
|
|
435
|
+
else if (field.name in input) output[field.name] = null;
|
|
434
436
|
continue;
|
|
435
437
|
}
|
|
436
438
|
const result = parse(input[field.name], field.type, pathAt(path, field.name));
|
|
@@ -512,13 +514,10 @@ function boundProblem(value, type, bounds) {
|
|
|
512
514
|
}
|
|
513
515
|
}
|
|
514
516
|
function checkedProp(value, type, _required, name, accepted, inputAccepted, htmlBoolean = true) {
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
}
|
|
520
|
-
if (htmlBoolean && value === "" && type.kind === "terminal" && type.name === "boolean") value = true;
|
|
521
|
-
const result = parse(value, type, "$");
|
|
517
|
+
const result = value === void 0 ? {
|
|
518
|
+
ok: true,
|
|
519
|
+
value: null
|
|
520
|
+
} : checkPropInput(value, type, htmlBoolean);
|
|
522
521
|
if (inputAccepted !== void 0) inputAccepted[name] = result.ok;
|
|
523
522
|
if (result.ok) {
|
|
524
523
|
if (accepted !== void 0) accepted[name] = result.value;
|
|
@@ -526,6 +525,14 @@ function checkedProp(value, type, _required, name, accepted, inputAccepted, html
|
|
|
526
525
|
}
|
|
527
526
|
return accepted?.[name] ?? null;
|
|
528
527
|
}
|
|
528
|
+
function checkPropInput(value, type, htmlBoolean = true, optional = true) {
|
|
529
|
+
if (optional && value === null) return {
|
|
530
|
+
ok: true,
|
|
531
|
+
value: null
|
|
532
|
+
};
|
|
533
|
+
if (htmlBoolean && value === "" && type.kind === "terminal" && type.name === "boolean") value = true;
|
|
534
|
+
return parse(value, type, "$");
|
|
535
|
+
}
|
|
529
536
|
function propValidity(binding) {
|
|
530
537
|
const errors = [];
|
|
531
538
|
for (const [name, prop] of Object.entries(binding.contract.props)) {
|
|
@@ -752,8 +759,7 @@ var vPropValidity = {
|
|
|
752
759
|
function acceptsControllerWrite(value, type, keys) {
|
|
753
760
|
if (type === void 0) return true;
|
|
754
761
|
if (keys.length === 0) {
|
|
755
|
-
if (value === void 0) return true;
|
|
756
|
-
if (value === null) return parse(value, type, "$").ok;
|
|
762
|
+
if (value === void 0 || value === null) return true;
|
|
757
763
|
if (type.kind === "list") return Array.isArray(value);
|
|
758
764
|
if (type.kind === "object" || type.kind === "record") return typeof value === "object" && !Array.isArray(value);
|
|
759
765
|
if (type.kind === "union") return type.members.some((member) => acceptsControllerWrite(value, member, keys));
|
|
@@ -766,5 +772,423 @@ function acceptsControllerWrite(value, type, keys) {
|
|
|
766
772
|
if (type.kind === "object" && !type.open && !type.fields.some((field) => field.name === key)) return value === void 0;
|
|
767
773
|
return acceptsControllerWrite(value, type.kind === "object" ? type.fields.find((field) => field.name === key)?.type : type.kind === "list" ? /^\d+$/.test(key) ? type.item : void 0 : type.kind === "record" ? type.value : void 0, keys.slice(1));
|
|
768
774
|
}
|
|
775
|
+
var READY_INPUT = {
|
|
776
|
+
ready: true,
|
|
777
|
+
pending: false,
|
|
778
|
+
error: null,
|
|
779
|
+
stale: false
|
|
780
|
+
};
|
|
781
|
+
var UNRESOLVED_INPUT = {
|
|
782
|
+
ready: false,
|
|
783
|
+
pending: false,
|
|
784
|
+
error: null,
|
|
785
|
+
stale: false
|
|
786
|
+
};
|
|
787
|
+
/** Public error identity is its name/message, not the producer's object allocation. */
|
|
788
|
+
function sameInputStatus(left, right) {
|
|
789
|
+
return left === right || left !== void 0 && right !== void 0 && left.ready === right.ready && left.pending === right.pending && left.stale === right.stale && left.error?.name === right.error?.name && left.error?.message === right.error?.message;
|
|
790
|
+
}
|
|
791
|
+
var inputObservation;
|
|
792
|
+
/** Only synchronous reads made by this evaluation contribute prerequisites. */
|
|
793
|
+
function observingInputs() {
|
|
794
|
+
return inputObservation !== void 0;
|
|
795
|
+
}
|
|
796
|
+
function observeInputStatus(status) {
|
|
797
|
+
if (inputObservation === void 0) return;
|
|
798
|
+
inputObservation.ready &&= status.ready;
|
|
799
|
+
inputObservation.pending ||= status.pending;
|
|
800
|
+
inputObservation.error ??= status.error;
|
|
801
|
+
inputObservation.stale ||= status.stale;
|
|
802
|
+
}
|
|
803
|
+
/** Compiler adapters wrap declaration reads; ordinary application values keep their types. */
|
|
804
|
+
function inputRead(value, status) {
|
|
805
|
+
observeInputStatus(status);
|
|
806
|
+
return value;
|
|
807
|
+
}
|
|
808
|
+
/** Native expression evaluation and framework computeds share status composition, not reactivity. */
|
|
809
|
+
function evaluateInput(compute, previous, invalid = Symbol.for("html-next.invalid-result")) {
|
|
810
|
+
const parent = inputObservation;
|
|
811
|
+
const observed = {
|
|
812
|
+
ready: true,
|
|
813
|
+
pending: false,
|
|
814
|
+
error: null,
|
|
815
|
+
stale: false
|
|
816
|
+
};
|
|
817
|
+
inputObservation = observed;
|
|
818
|
+
let value;
|
|
819
|
+
try {
|
|
820
|
+
value = compute();
|
|
821
|
+
} finally {
|
|
822
|
+
inputObservation = parent;
|
|
823
|
+
}
|
|
824
|
+
if (value === void 0 || value === invalid && previous?.ready !== true) observed.ready = false;
|
|
825
|
+
if (!observed.ready) observed.stale = false;
|
|
826
|
+
const status = sameInputStatus(previous, observed) ? previous : observed.ready && !observed.pending && observed.error === null && !observed.stale ? READY_INPUT : !observed.ready && !observed.pending && observed.error === null ? UNRESOLVED_INPUT : observed;
|
|
827
|
+
return {
|
|
828
|
+
value,
|
|
829
|
+
status
|
|
830
|
+
};
|
|
831
|
+
}
|
|
832
|
+
/** The adapter supplies its own memo/computed primitive; acceptance runs only for available data. */
|
|
833
|
+
function inputComputed(compute, make, accept, initialStatus) {
|
|
834
|
+
let previous;
|
|
835
|
+
const cell = make(() => {
|
|
836
|
+
const result = evaluateInput(compute, previous?.status ?? initialStatus);
|
|
837
|
+
const value = result.status.ready ? accept === void 0 ? result.value : accept(result.value) : null;
|
|
838
|
+
if (previous !== void 0 && Object.is(previous.value, value) && previous.status === result.status) return previous;
|
|
839
|
+
return previous = {
|
|
840
|
+
value,
|
|
841
|
+
status: result.status
|
|
842
|
+
};
|
|
843
|
+
});
|
|
844
|
+
return {
|
|
845
|
+
get: () => cell.get().value,
|
|
846
|
+
get value() {
|
|
847
|
+
return cell.get().value;
|
|
848
|
+
},
|
|
849
|
+
status: () => cell.get().status
|
|
850
|
+
};
|
|
851
|
+
}
|
|
852
|
+
/** Project only the status a template may observe, retaining no mutable producer-owned object. */
|
|
853
|
+
function publicInputStatus(status) {
|
|
854
|
+
if (typeof status.ready !== "boolean" || typeof status.pending !== "boolean" || typeof status.stale !== "boolean" || !status.ready && status.stale) throw new TypeError("Input status requires boolean ready, pending and stale; stale requires an accepted value.");
|
|
855
|
+
const error = status.error;
|
|
856
|
+
if (error !== null && (typeof error.name !== "string" || typeof error.message !== "string")) throw new TypeError("An input failure requires public string name and message fields.");
|
|
857
|
+
return {
|
|
858
|
+
ready: status.ready,
|
|
859
|
+
pending: status.pending,
|
|
860
|
+
stale: status.stale,
|
|
861
|
+
error: error === null ? null : {
|
|
862
|
+
name: error.name,
|
|
863
|
+
message: error.message
|
|
864
|
+
}
|
|
865
|
+
};
|
|
866
|
+
}
|
|
867
|
+
function requireInputStatus(status, handlesError) {
|
|
868
|
+
if (!status.ready && status.error !== null && !handlesError) throw Object.assign(new Error(status.error.message), { name: status.error.name });
|
|
869
|
+
return status;
|
|
870
|
+
}
|
|
871
|
+
/**
|
|
872
|
+
* One source capability per prop. The adapter owns accepted storage and type checks; this port
|
|
873
|
+
* owns neither a second value store nor a second reactive engine. It also enforces caller precedence
|
|
874
|
+
* before the adapter sees any source proposal, including proposals that arrive after disposal.
|
|
875
|
+
*/
|
|
876
|
+
function createInputPort(adapter) {
|
|
877
|
+
const names = [...adapter.names];
|
|
878
|
+
const readNames = [.../* @__PURE__ */ new Set([...names, ...adapter.readNames ?? []])];
|
|
879
|
+
const owners = /* @__PURE__ */ new Map();
|
|
880
|
+
const declared = (name) => {
|
|
881
|
+
if (!names.includes(name)) throw new TypeError(`Input \`${name}\` is not a declared prop.`);
|
|
882
|
+
};
|
|
883
|
+
const readable = (name) => {
|
|
884
|
+
if (!readNames.includes(name)) throw new TypeError(`Binding \`${name}\` is not declared in this component.`);
|
|
885
|
+
};
|
|
886
|
+
return {
|
|
887
|
+
get names() {
|
|
888
|
+
return [...names];
|
|
889
|
+
},
|
|
890
|
+
get readNames() {
|
|
891
|
+
return [...readNames];
|
|
892
|
+
},
|
|
893
|
+
read(name) {
|
|
894
|
+
readable(name);
|
|
895
|
+
const value = adapter.read(name);
|
|
896
|
+
if (observingInputs()) observeInputStatus(adapter.status(name));
|
|
897
|
+
return value;
|
|
898
|
+
},
|
|
899
|
+
status(name) {
|
|
900
|
+
readable(name);
|
|
901
|
+
return publicInputStatus(adapter.status(name));
|
|
902
|
+
},
|
|
903
|
+
supplied(name) {
|
|
904
|
+
declared(name);
|
|
905
|
+
return adapter.supplied(name);
|
|
906
|
+
},
|
|
907
|
+
revision(name) {
|
|
908
|
+
declared(name);
|
|
909
|
+
return adapter.revision?.(name);
|
|
910
|
+
},
|
|
911
|
+
capture(read) {
|
|
912
|
+
const result = evaluateInput(() => {
|
|
913
|
+
try {
|
|
914
|
+
return {
|
|
915
|
+
ok: true,
|
|
916
|
+
value: read()
|
|
917
|
+
};
|
|
918
|
+
} catch (error) {
|
|
919
|
+
return {
|
|
920
|
+
ok: false,
|
|
921
|
+
error
|
|
922
|
+
};
|
|
923
|
+
}
|
|
924
|
+
});
|
|
925
|
+
return {
|
|
926
|
+
...result.value,
|
|
927
|
+
status: publicInputStatus(result.status)
|
|
928
|
+
};
|
|
929
|
+
},
|
|
930
|
+
watch: (run) => adapter.watch(run),
|
|
931
|
+
source(name) {
|
|
932
|
+
declared(name);
|
|
933
|
+
if (owners.has(name)) throw new TypeError(`Input \`${name}\` already has a source.`);
|
|
934
|
+
const token = {};
|
|
935
|
+
owners.set(name, token);
|
|
936
|
+
return {
|
|
937
|
+
current: () => ({
|
|
938
|
+
value: adapter.read(name),
|
|
939
|
+
status: publicInputStatus(adapter.status(name))
|
|
940
|
+
}),
|
|
941
|
+
publish(snapshot) {
|
|
942
|
+
if (owners.get(name) !== token) return false;
|
|
943
|
+
return adapter.untracked(() => !adapter.supplied(name) && adapter.publish(name, {
|
|
944
|
+
value: snapshot.value,
|
|
945
|
+
status: publicInputStatus(snapshot.status)
|
|
946
|
+
}));
|
|
947
|
+
},
|
|
948
|
+
dispose() {
|
|
949
|
+
if (owners.get(name) === token) owners.delete(name);
|
|
950
|
+
}
|
|
951
|
+
};
|
|
952
|
+
}
|
|
953
|
+
};
|
|
954
|
+
}
|
|
955
|
+
/** Renderer-neutral input bookkeeping. Accepted values remain in the renderer's existing store. */
|
|
956
|
+
var BINDING_INPUTS_PROP = "\0htmlNextInputStatus";
|
|
957
|
+
var PropInputs = class PropInputs {
|
|
958
|
+
#options;
|
|
959
|
+
#records = Object.create(null);
|
|
960
|
+
#port;
|
|
961
|
+
#reactions;
|
|
962
|
+
#portOwner;
|
|
963
|
+
#baseRevisions;
|
|
964
|
+
constructor(options) {
|
|
965
|
+
this.#options = options;
|
|
966
|
+
}
|
|
967
|
+
/** Imperative code reads the connected instance, even during a speculative render. */
|
|
968
|
+
get committed() {
|
|
969
|
+
return this.#portOwner ?? this;
|
|
970
|
+
}
|
|
971
|
+
/** Concurrent renderers may examine a candidate without changing the connected instance. */
|
|
972
|
+
fork(options) {
|
|
973
|
+
const candidate = new PropInputs({
|
|
974
|
+
...options,
|
|
975
|
+
defaults: this.#options.defaults,
|
|
976
|
+
values: { ...this.#options.values }
|
|
977
|
+
});
|
|
978
|
+
for (const [name, record] of Object.entries(this.#records)) candidate.#records[name] = { ...record };
|
|
979
|
+
candidate.#portOwner = this;
|
|
980
|
+
candidate.#baseRevisions = new Map(Object.entries(this.#records).map(([name, record]) => [name, record.revision]));
|
|
981
|
+
return candidate;
|
|
982
|
+
}
|
|
983
|
+
commit(candidate) {
|
|
984
|
+
const values = this.#options.values;
|
|
985
|
+
for (const [name, next] of Object.entries(candidate.#records)) {
|
|
986
|
+
const current = this.#record(name);
|
|
987
|
+
const base = candidate.#baseRevisions?.get(name) ?? 0;
|
|
988
|
+
if (current.revision !== base && current.source && !next.provided) this.#records[name] = {
|
|
989
|
+
...current,
|
|
990
|
+
caller: next.caller,
|
|
991
|
+
refused: next.refused,
|
|
992
|
+
accepted: next.accepted,
|
|
993
|
+
input: next.refused || next.caller !== current.caller ? next.input : current.input
|
|
994
|
+
};
|
|
995
|
+
else {
|
|
996
|
+
values[name] = candidate.#options.values[name];
|
|
997
|
+
this.#records[name] = {
|
|
998
|
+
...next,
|
|
999
|
+
revision: next.revision === base ? current.revision : Math.max(next.revision, current.revision + 1)
|
|
1000
|
+
};
|
|
1001
|
+
}
|
|
1002
|
+
}
|
|
1003
|
+
this.#options = {
|
|
1004
|
+
...candidate.#options,
|
|
1005
|
+
values
|
|
1006
|
+
};
|
|
1007
|
+
}
|
|
1008
|
+
#record(name) {
|
|
1009
|
+
return this.#records[name] ??= {
|
|
1010
|
+
caller: void 0,
|
|
1011
|
+
input: null,
|
|
1012
|
+
provided: false,
|
|
1013
|
+
source: false,
|
|
1014
|
+
refused: false,
|
|
1015
|
+
accepted: true,
|
|
1016
|
+
status: void 0,
|
|
1017
|
+
revision: 0
|
|
1018
|
+
};
|
|
1019
|
+
}
|
|
1020
|
+
#fallback(name) {
|
|
1021
|
+
return Object.hasOwn(this.#options.defaults, name) ? this.#options.defaults[name] : null;
|
|
1022
|
+
}
|
|
1023
|
+
#status(record, status) {
|
|
1024
|
+
const old = record.status;
|
|
1025
|
+
if (sameInputStatus(old, status)) return;
|
|
1026
|
+
record.status = publicInputStatus(status);
|
|
1027
|
+
}
|
|
1028
|
+
value(name, input, bindings, flags) {
|
|
1029
|
+
const record = this.#record(name);
|
|
1030
|
+
const released = record.caller !== void 0 && input === void 0;
|
|
1031
|
+
record.caller = input;
|
|
1032
|
+
const upstream = bindings !== void 0 && Object.hasOwn(bindings, name) ? bindings[name]() : void 0;
|
|
1033
|
+
if (upstream !== void 0) {
|
|
1034
|
+
if (!upstream.status.ready) {
|
|
1035
|
+
record.revision += 1;
|
|
1036
|
+
this.#options.values[name] = this.#fallback(name);
|
|
1037
|
+
record.input = upstream.value ?? null;
|
|
1038
|
+
record.provided = true;
|
|
1039
|
+
record.source = false;
|
|
1040
|
+
record.refused = false;
|
|
1041
|
+
record.accepted = true;
|
|
1042
|
+
this.#status(record, upstream.status);
|
|
1043
|
+
} else {
|
|
1044
|
+
const result = this.#options.check(name, upstream.value === null ? this.#fallback(name) : upstream.value, false, this.#options.values);
|
|
1045
|
+
record.accepted = result.ok;
|
|
1046
|
+
if (result.ok) {
|
|
1047
|
+
record.revision += 1;
|
|
1048
|
+
this.#options.values[name] = result.value;
|
|
1049
|
+
record.input = upstream.value;
|
|
1050
|
+
record.provided = true;
|
|
1051
|
+
record.source = false;
|
|
1052
|
+
record.refused = false;
|
|
1053
|
+
this.#status(record, upstream.status);
|
|
1054
|
+
}
|
|
1055
|
+
}
|
|
1056
|
+
} else if (input === void 0 && record.source && !released) record.accepted = true;
|
|
1057
|
+
else {
|
|
1058
|
+
const candidate = input === void 0 || input === null ? this.#fallback(name) : input;
|
|
1059
|
+
const result = input === void 0 && !Object.hasOwn(this.#options.defaults, name) ? {
|
|
1060
|
+
ok: true,
|
|
1061
|
+
value: null
|
|
1062
|
+
} : this.#options.check(name, candidate, false, this.#options.values);
|
|
1063
|
+
record.input = input === void 0 ? null : input;
|
|
1064
|
+
record.accepted = result.ok;
|
|
1065
|
+
record.refused = !result.ok && input !== void 0;
|
|
1066
|
+
if (result.ok) {
|
|
1067
|
+
record.revision += 1;
|
|
1068
|
+
this.#options.values[name] = result.value;
|
|
1069
|
+
record.provided = input !== void 0;
|
|
1070
|
+
record.source = false;
|
|
1071
|
+
record.status = void 0;
|
|
1072
|
+
}
|
|
1073
|
+
}
|
|
1074
|
+
if (flags !== void 0) flags[name] = record.accepted;
|
|
1075
|
+
return this.#options.values[name];
|
|
1076
|
+
}
|
|
1077
|
+
read(name) {
|
|
1078
|
+
return this.#options.values[name];
|
|
1079
|
+
}
|
|
1080
|
+
inputValue(name) {
|
|
1081
|
+
return this.#record(name).input;
|
|
1082
|
+
}
|
|
1083
|
+
supplied(name) {
|
|
1084
|
+
return this.#record(name).provided;
|
|
1085
|
+
}
|
|
1086
|
+
revision(name) {
|
|
1087
|
+
return this.#record(name).revision;
|
|
1088
|
+
}
|
|
1089
|
+
status(name) {
|
|
1090
|
+
const record = this.#record(name);
|
|
1091
|
+
return record.status ?? (record.provided || Object.hasOwn(this.#options.defaults, name) ? READY_INPUT : UNRESOLVED_INPUT);
|
|
1092
|
+
}
|
|
1093
|
+
publish(name, snapshot) {
|
|
1094
|
+
const record = this.#record(name);
|
|
1095
|
+
if (record.provided) return false;
|
|
1096
|
+
let value = this.#fallback(name);
|
|
1097
|
+
if (snapshot.status.ready) {
|
|
1098
|
+
const result = this.#options.check(name, snapshot.value === null ? this.#fallback(name) : snapshot.value, true, this.#options.values);
|
|
1099
|
+
if (!result.ok) return false;
|
|
1100
|
+
value = result.value;
|
|
1101
|
+
}
|
|
1102
|
+
this.#options.values[name] = value;
|
|
1103
|
+
record.revision += 1;
|
|
1104
|
+
if (!record.refused) record.input = snapshot.value ?? null;
|
|
1105
|
+
record.source = true;
|
|
1106
|
+
this.#status(record, !snapshot.status.ready && Object.hasOwn(this.#options.defaults, name) ? {
|
|
1107
|
+
...snapshot.status,
|
|
1108
|
+
ready: true,
|
|
1109
|
+
stale: false
|
|
1110
|
+
} : snapshot.status);
|
|
1111
|
+
this.#options.invalidate();
|
|
1112
|
+
if (this.#reactions?.notify !== void 0) {
|
|
1113
|
+
this.#reactions.notify(name, "value");
|
|
1114
|
+
this.#reactions.notify(name, "status");
|
|
1115
|
+
}
|
|
1116
|
+
return true;
|
|
1117
|
+
}
|
|
1118
|
+
port(reactions) {
|
|
1119
|
+
if (this.#portOwner !== void 0) return this.#portOwner.port(reactions);
|
|
1120
|
+
this.#reactions ??= reactions;
|
|
1121
|
+
return this.#port ??= createInputPort({
|
|
1122
|
+
names: this.#options.names,
|
|
1123
|
+
readNames: [...this.#options.names, ...Object.keys(reactions.declarations ?? {})],
|
|
1124
|
+
read: (name) => {
|
|
1125
|
+
if (!this.#options.names.includes(name)) return reactions.declarations[name].read();
|
|
1126
|
+
reactions.track(name, "value");
|
|
1127
|
+
return this.read(name);
|
|
1128
|
+
},
|
|
1129
|
+
status: (name) => {
|
|
1130
|
+
if (!this.#options.names.includes(name)) return reactions.declarations[name].status();
|
|
1131
|
+
reactions.track(name, "status");
|
|
1132
|
+
return this.status(name);
|
|
1133
|
+
},
|
|
1134
|
+
supplied: (name) => {
|
|
1135
|
+
reactions.track(name, "supplied");
|
|
1136
|
+
return this.supplied(name);
|
|
1137
|
+
},
|
|
1138
|
+
revision: (name) => this.revision(name),
|
|
1139
|
+
publish: (name, snapshot) => this.publish(name, snapshot),
|
|
1140
|
+
watch: (run) => reactions.watch(run),
|
|
1141
|
+
untracked: (run) => reactions.untracked(run)
|
|
1142
|
+
});
|
|
1143
|
+
}
|
|
1144
|
+
};
|
|
1145
|
+
function vuePropInputs(values, defaults, check, prepare) {
|
|
1146
|
+
const version = shallowRef(0);
|
|
1147
|
+
const inputs = new PropInputs({
|
|
1148
|
+
names: Object.keys(values),
|
|
1149
|
+
values,
|
|
1150
|
+
defaults,
|
|
1151
|
+
check,
|
|
1152
|
+
invalidate: () => {
|
|
1153
|
+
version.value += 1;
|
|
1154
|
+
}
|
|
1155
|
+
});
|
|
1156
|
+
const reads = /* @__PURE__ */ new Map();
|
|
1157
|
+
return {
|
|
1158
|
+
inputs,
|
|
1159
|
+
version,
|
|
1160
|
+
track(name, kind) {
|
|
1161
|
+
const key = kind + ":" + name;
|
|
1162
|
+
let read = reads.get(key);
|
|
1163
|
+
if (read === void 0) {
|
|
1164
|
+
read = computed(() => {
|
|
1165
|
+
prepare();
|
|
1166
|
+
version.value;
|
|
1167
|
+
return kind === "value" ? inputs.read(name) : kind === "status" ? inputs.status(name) : inputs.supplied(name);
|
|
1168
|
+
});
|
|
1169
|
+
reads.set(key, read);
|
|
1170
|
+
}
|
|
1171
|
+
read.value;
|
|
1172
|
+
},
|
|
1173
|
+
untracked(run) {
|
|
1174
|
+
let value;
|
|
1175
|
+
let error;
|
|
1176
|
+
let failed = false;
|
|
1177
|
+
watch(() => true, () => {
|
|
1178
|
+
try {
|
|
1179
|
+
value = run();
|
|
1180
|
+
} catch (caught) {
|
|
1181
|
+
error = caught;
|
|
1182
|
+
failed = true;
|
|
1183
|
+
}
|
|
1184
|
+
}, {
|
|
1185
|
+
immediate: true,
|
|
1186
|
+
flush: "sync"
|
|
1187
|
+
})();
|
|
1188
|
+
if (failed) throw error;
|
|
1189
|
+
return value;
|
|
1190
|
+
}
|
|
1191
|
+
};
|
|
1192
|
+
}
|
|
769
1193
|
//#endregion
|
|
770
|
-
export {
|
|
1194
|
+
export { checkedProp as a, inputRead as c, selectedPropNode as d, vPropValidity as f, checkPropInput as i, propValidityState as l, READY_INPUT as n, evaluateInput as o, vuePropInputs as p, acceptsControllerWrite as r, inputComputed as s, BINDING_INPUTS_PROP as t, requireInputStatus as u };
|