spell-ui 0.8.5 → 0.8.7
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/README-components.md +14 -6
- package/README-frameworks.md +22 -12
- package/README-migrating.md +7 -6
- package/README-runtime.md +14 -13
- package/README-site.md +11 -11
- package/README-themes.md +38 -11
- package/README.md +61 -73
- package/dist/Dragging-CMZoLEWQ.js +169 -0
- package/dist/Dragging-CMZoLEWQ.js.map +1 -0
- package/dist/{MarkdownEngine-CbuT9Mjc.js → MarkdownEngine-CW1WGqNp.js} +122 -100
- package/dist/MarkdownEngine-CW1WGqNp.js.map +1 -0
- package/dist/{PrefStore-CeaTtjTz.js → PrefStore-Qv0e5y04.js} +22 -22
- package/dist/PrefStore-Qv0e5y04.js.map +1 -0
- package/dist/ScrollingRow-7n7Z-HIE.js +88 -0
- package/dist/ScrollingRow-7n7Z-HIE.js.map +1 -0
- package/dist/SitePages-CciwREek.js +51 -0
- package/dist/SitePages-CciwREek.js.map +1 -0
- package/dist/{SlottedItems-Ch0tzzlL.js → SlottedItems-Du3aJwG1.js} +22 -22
- package/dist/{SlottedItems-Ch0tzzlL.js.map → SlottedItems-Du3aJwG1.js.map} +1 -1
- package/dist/ThemeDraft-B7NPif4d.js +805 -0
- package/dist/ThemeDraft-B7NPif4d.js.map +1 -0
- package/dist/TreeMeasure-BVJeGb1L.js +42 -0
- package/dist/TreeMeasure-BVJeGb1L.js.map +1 -0
- package/dist/UIButton-DFEds67r.js +6 -0
- package/dist/UIButton-DFEds67r.js.map +1 -0
- package/dist/UIInput-BodVbUoQ.js +6 -0
- package/dist/UIInput-BodVbUoQ.js.map +1 -0
- package/dist/{UIKeys-DJF2TIKE.js → UIKeys-Rh_gUZjP.js} +10 -9
- package/dist/UIKeys-Rh_gUZjP.js.map +1 -0
- package/dist/UILabel-DgJUBzB_.js +6 -0
- package/dist/UILabel-DgJUBzB_.js.map +1 -0
- package/dist/UIMenu-zdcAtwTa.js +42 -0
- package/dist/UIMenu-zdcAtwTa.js.map +1 -0
- package/dist/{UIRuntime-BBuehGly.js → UIRuntime-KH309p5B.js} +398 -207
- package/dist/UIRuntime-KH309p5B.js.map +1 -0
- package/dist/_spell-element/DOMElement.d.ts +62 -5
- package/dist/_spell-element/MoveAndResize.d.ts +75 -0
- package/dist/_spell-element/UIComponent.d.ts +42 -0
- package/dist/_spell-element/elements.types.d.ts +47 -0
- package/dist/_spell-element/index.d.ts +1 -0
- package/dist/_spell-element/vocabulary.types.d.ts +34 -2
- package/dist/{runtime → _util}/Api.d.ts +14 -4
- package/dist/_util/Dragging.d.ts +148 -0
- package/dist/_util/ListSelection.d.ts +46 -0
- package/dist/{util → _util}/LoadOnce.d.ts +9 -1
- package/dist/_util/ReconnectingSocket.d.ts +51 -0
- package/dist/_util/diagram/DiagramColumns.d.ts +14 -0
- package/dist/_util/diagram/DiagramLayout.d.ts +119 -0
- package/dist/_util/diagram/DiagramSVG.d.ts +17 -0
- package/dist/_util/dom.d.ts +10 -0
- package/dist/_util/fetching.d.ts +92 -0
- package/dist/_util/measures/Dimension.d.ts +63 -0
- package/dist/_util/measures/MeasureSystem.d.ts +66 -0
- package/dist/_util/measures/dimensions.generated.d.ts +16 -0
- package/dist/_util/persist/ColorScheme.d.ts +6 -0
- package/dist/_util/persist/ServerPlace.d.ts +42 -0
- package/dist/_util/persist/WaitedOnPlace.d.ts +27 -0
- package/dist/_util/persist/persist.types.d.ts +21 -2
- package/dist/_util/timing.d.ts +10 -1
- package/dist/api.js +8 -7
- package/dist/api.js.map +1 -1
- package/dist/components/ComponentDefinitions.d.ts +29 -0
- package/dist/components/components.es.d.ts +13 -0
- package/dist/components/components.types.d.ts +113 -8
- package/dist/components/ui-accordion/UIAccordion.d.ts +1 -0
- package/dist/components/ui-accordion/UIAccordion.en.d.ts +1 -0
- package/dist/components/ui-action/UIAction.en.d.ts +5 -1
- package/dist/components/ui-ad/UIAd.d.ts +1 -0
- package/dist/components/ui-ad/UIAd.en.d.ts +1 -0
- package/dist/components/ui-breadcrumbs/UIBreadcrumb.d.ts +1 -0
- package/dist/components/ui-breadcrumbs/UIBreadcrumb.en.d.ts +1 -0
- package/dist/components/ui-breadcrumbs/UIBreadcrumbs.d.ts +1 -0
- package/dist/components/ui-breadcrumbs/UIBreadcrumbs.en.d.ts +1 -0
- package/dist/components/ui-button/UIButton.d.ts +8 -3
- package/dist/components/ui-button/UIButton.en.d.ts +9 -4
- package/dist/components/ui-button/UIButton.es.d.ts +6 -0
- package/dist/components/ui-button/UIButton.fallback.d.ts +8 -3
- package/dist/components/ui-button/UIButtons.d.ts +1 -0
- package/dist/components/ui-button/UIButtons.en.d.ts +1 -0
- package/dist/components/ui-button/UIOr.d.ts +1 -0
- package/dist/components/ui-button/UIOr.en.d.ts +1 -0
- package/dist/components/ui-calendar/UICalendar.d.ts +6 -0
- package/dist/components/ui-calendar/UICalendar.en.d.ts +6 -0
- package/dist/components/ui-calendar/UICalendar.fallback.d.ts +6 -0
- package/dist/components/ui-card/CardClicks.d.ts +40 -0
- package/dist/components/ui-card/UICard.d.ts +41 -0
- package/dist/components/ui-card/UICard.en.d.ts +49 -0
- package/dist/components/ui-card/UICard.es.d.ts +1 -0
- package/dist/components/ui-card/UICards.d.ts +31 -0
- package/dist/components/ui-card/UICards.en.d.ts +31 -0
- package/dist/components/ui-card/UICards.es.d.ts +8 -0
- package/dist/components/ui-checkbox/CheckControl.d.ts +7 -0
- package/dist/components/ui-checkbox/UICheckbox.d.ts +7 -0
- package/dist/components/ui-checkbox/UICheckbox.en.d.ts +7 -0
- package/dist/components/ui-checkbox/UICheckbox.es.d.ts +1 -0
- package/dist/components/ui-checkbox/UICheckbox.fallback.d.ts +7 -0
- package/dist/components/ui-checkbox/UICheckbox.types.d.ts +5 -0
- package/dist/components/ui-checkbox/UIRadio.d.ts +8 -0
- package/dist/components/ui-checkbox/UIRadio.en.d.ts +6 -0
- package/dist/components/ui-code/UICode.en.d.ts +1 -0
- package/dist/components/ui-comment/UIComment.d.ts +1 -0
- package/dist/components/ui-comment/UIComment.en.d.ts +1 -0
- package/dist/components/ui-comment/UIComments.d.ts +1 -0
- package/dist/components/ui-comment/UIComments.en.d.ts +1 -0
- package/dist/components/ui-components/PackHotSwap.d.ts +17 -1
- package/dist/components/ui-components/UIComponents.d.ts +1 -0
- package/dist/components/ui-components/UIComponents.en.d.ts +1 -0
- package/dist/components/ui-container/UIContainer.d.ts +11 -0
- package/dist/components/ui-container/UIContainer.en.d.ts +7 -0
- package/dist/components/ui-container/UIContainer.es.d.ts +1 -0
- package/dist/components/ui-diagram/UIDiagram.d.ts +268 -0
- package/dist/components/ui-diagram/UIDiagram.en.d.ts +106 -0
- package/dist/components/ui-diagram/UIDiagram.es.d.ts +37 -0
- package/dist/components/ui-diagram/UIDiagramNode.d.ts +98 -0
- package/dist/components/ui-diagram/UIDiagramNode.en.d.ts +38 -0
- package/dist/components/ui-diagram/UIDiagramNode.es.d.ts +16 -0
- package/dist/components/ui-diagram/index.d.ts +8 -0
- package/dist/components/ui-dimension/UIDimension.d.ts +81 -0
- package/dist/components/ui-dimension/UIDimension.en.d.ts +54 -0
- package/dist/components/ui-dimension/UIDimension.es.d.ts +22 -0
- package/dist/components/ui-dimension/index.d.ts +2 -0
- package/dist/components/ui-dimmer/UIDimmer.d.ts +6 -1
- package/dist/components/ui-dimmer/UIDimmer.en.d.ts +1 -0
- package/dist/components/ui-dimmer/UIDimmer.es.d.ts +1 -1
- package/dist/components/ui-divider/UIDivider.d.ts +2 -0
- package/dist/components/ui-divider/UIDivider.en.d.ts +2 -0
- package/dist/components/ui-divider/UIDivider.es.d.ts +1 -0
- package/dist/components/ui-dropdown/UIDropdown.d.ts +6 -0
- package/dist/components/ui-dropdown/UIDropdown.en.d.ts +6 -0
- package/dist/components/ui-dropdown/UIDropdown.fallback.d.ts +6 -0
- package/dist/components/ui-embed/UIEmbed.d.ts +1 -0
- package/dist/components/ui-embed/UIEmbed.en.d.ts +1 -0
- package/dist/components/ui-emoji/UIEmoji.d.ts +1 -0
- package/dist/components/ui-emoji/UIEmoji.en.d.ts +1 -0
- package/dist/components/ui-example/UIExample.en.d.ts +4 -2
- package/dist/components/ui-example/UIExample.es.d.ts +3 -2
- package/dist/components/ui-feed/UIFeed.d.ts +1 -0
- package/dist/components/ui-feed/UIFeed.en.d.ts +1 -0
- package/dist/components/ui-feed/UIFeedEvent.d.ts +1 -0
- package/dist/components/ui-feed/UIFeedEvent.en.d.ts +1 -0
- package/dist/components/ui-flag/UIFlag.d.ts +1 -0
- package/dist/components/ui-flag/UIFlag.en.d.ts +1 -0
- package/dist/components/ui-flyout/UIFlyout.d.ts +1 -0
- package/dist/components/ui-flyout/UIFlyout.en.d.ts +1 -0
- package/dist/components/ui-form/FormBinding.d.ts +13 -1
- package/dist/components/ui-form/FormFields.d.ts +4 -4
- package/dist/components/ui-form/UIField.d.ts +30 -3
- package/dist/components/ui-form/UIField.en.d.ts +9 -0
- package/dist/components/ui-form/UIField.es.d.ts +6 -0
- package/dist/components/ui-form/UIFields.d.ts +1 -0
- package/dist/components/ui-form/UIFields.en.d.ts +1 -0
- package/dist/components/ui-form/UIForm.d.ts +15 -0
- package/dist/components/ui-form/UIForm.en.d.ts +6 -0
- package/dist/components/ui-form/UIRepeat.d.ts +1 -0
- package/dist/components/ui-form/UIRepeat.en.d.ts +1 -0
- package/dist/components/ui-form/index.d.ts +2 -1
- package/dist/components/ui-grid/UIColumn.d.ts +1 -0
- package/dist/components/ui-grid/UIColumn.en.d.ts +1 -0
- package/dist/components/ui-grid/UIGrid.d.ts +1 -0
- package/dist/components/ui-grid/UIGrid.en.d.ts +1 -0
- package/dist/components/ui-grid/UIRow.d.ts +1 -0
- package/dist/components/ui-grid/UIRow.en.d.ts +1 -0
- package/dist/components/ui-icon/UIIcon.d.ts +3 -2
- package/dist/components/ui-icon/UIIcon.en.d.ts +3 -2
- package/dist/components/ui-icon/UIIcons.d.ts +1 -0
- package/dist/components/ui-icon/UIIcons.en.d.ts +1 -0
- package/dist/components/ui-icon-picker/UIIconPicker.d.ts +6 -0
- package/dist/components/ui-icon-picker/UIIconPicker.en.d.ts +6 -0
- package/dist/components/ui-icon-picker/UIIconPicker.fallback.d.ts +6 -0
- package/dist/components/ui-image/UIImage.d.ts +34 -0
- package/dist/components/ui-image/UIImage.en.d.ts +23 -0
- package/dist/components/ui-image/UIImage.es.d.ts +2 -0
- package/dist/components/ui-image/UIImages.d.ts +1 -0
- package/dist/components/ui-image/UIImages.en.d.ts +1 -0
- package/dist/components/ui-include/UIInclude.d.ts +1 -0
- package/dist/components/ui-include/UIInclude.en.d.ts +1 -0
- package/dist/components/ui-input/TextControl.d.ts +7 -0
- package/dist/components/ui-input/UIInput.d.ts +22 -3
- package/dist/components/ui-input/UIInput.en.d.ts +9 -2
- package/dist/components/ui-input/UIInput.es.d.ts +2 -0
- package/dist/components/ui-input/UIInput.fallback.d.ts +9 -2
- package/dist/components/ui-input/UITextarea.d.ts +20 -0
- package/dist/components/ui-input/UITextarea.en.d.ts +15 -0
- package/dist/components/ui-input/UITextarea.es.d.ts +4 -0
- package/dist/components/ui-item/UIItem.d.ts +27 -4
- package/dist/components/ui-item/UIItem.en.d.ts +5 -1
- package/dist/components/ui-items/UIItems.d.ts +1 -0
- package/dist/components/ui-items/UIItems.en.d.ts +1 -0
- package/dist/components/ui-json/JsonChild.d.ts +30 -0
- package/dist/components/ui-json/UIJson.d.ts +128 -0
- package/dist/components/ui-json/UIJson.en.d.ts +71 -0
- package/dist/components/ui-json/UIJson.es.d.ts +12 -0
- package/dist/components/ui-json/index.d.ts +3 -0
- package/dist/components/ui-keys/UIKeys.d.ts +1 -0
- package/dist/components/ui-keys/UIKeys.en.d.ts +1 -0
- package/dist/components/ui-label/UILabel.d.ts +2 -0
- package/dist/components/ui-label/UILabel.en.d.ts +2 -0
- package/dist/components/ui-label/UILabel.es.d.ts +1 -0
- package/dist/components/ui-label/UILabels.d.ts +1 -0
- package/dist/components/ui-label/UILabels.en.d.ts +1 -0
- package/dist/components/ui-list/UIList.d.ts +2 -0
- package/dist/components/ui-list/UIList.en.d.ts +2 -0
- package/dist/components/ui-list/UIList.es.d.ts +1 -0
- package/dist/components/ui-loader/UILoader.d.ts +1 -0
- package/dist/components/ui-loader/UILoader.en.d.ts +1 -0
- package/dist/components/ui-markdown/MarkdownBox.d.ts +143 -0
- package/dist/components/ui-markdown/MarkdownEngine.d.ts +14 -2
- package/dist/components/ui-markdown/MarkdownFormats.d.ts +95 -0
- package/dist/components/ui-markdown/MarkdownSource.d.ts +57 -0
- package/dist/components/ui-markdown/UIMarkdown.d.ts +126 -6
- package/dist/components/ui-markdown/UIMarkdown.en.d.ts +111 -8
- package/dist/components/ui-markdown/UIMarkdown.es.d.ts +29 -1
- package/dist/components/ui-markdown/UIMarkdown.types.d.ts +26 -0
- package/dist/components/ui-menu/ScrollingRow.d.ts +79 -0
- package/dist/components/ui-menu/TitleFit.d.ts +3 -0
- package/dist/components/ui-menu/UIMenu.d.ts +97 -4
- package/dist/components/ui-menu/UIMenu.en.d.ts +50 -1
- package/dist/components/ui-menu/UIMenu.es.d.ts +4 -0
- package/dist/components/ui-message/UIMessage.d.ts +2 -0
- package/dist/components/ui-message/UIMessage.en.d.ts +2 -0
- package/dist/components/ui-message/UIMessage.es.d.ts +1 -0
- package/dist/components/ui-modal/UIModal.d.ts +1 -0
- package/dist/components/ui-modal/UIModal.en.d.ts +1 -0
- package/dist/components/ui-nag/UINag.d.ts +1 -0
- package/dist/components/ui-nag/UINag.en.d.ts +1 -0
- package/dist/components/ui-page/UIPage.d.ts +15 -0
- package/dist/components/ui-page/UIPage.en.d.ts +15 -0
- package/dist/components/ui-page/UIPage.es.d.ts +1 -0
- package/dist/components/ui-panel/UIPanel.d.ts +6 -0
- package/dist/components/ui-panel/UIPanel.en.d.ts +33 -20
- package/dist/components/ui-parts/UIActions.d.ts +1 -0
- package/dist/components/ui-parts/UIActions.en.d.ts +1 -0
- package/dist/components/ui-parts/UIAuthor.d.ts +1 -0
- package/dist/components/ui-parts/UIAuthor.en.d.ts +1 -0
- package/dist/components/ui-parts/UIAvatar.d.ts +1 -0
- package/dist/components/ui-parts/UIAvatar.en.d.ts +1 -0
- package/dist/components/ui-parts/UIContent.d.ts +1 -0
- package/dist/components/ui-parts/UIContent.en.d.ts +1 -0
- package/dist/components/ui-parts/UIDate.d.ts +1 -0
- package/dist/components/ui-parts/UIDate.en.d.ts +1 -0
- package/dist/components/ui-parts/UIDescription.d.ts +1 -0
- package/dist/components/ui-parts/UIDescription.en.d.ts +1 -0
- package/dist/components/ui-parts/UIDetail.d.ts +1 -0
- package/dist/components/ui-parts/UIDetail.en.d.ts +1 -0
- package/dist/components/ui-parts/UIExtra.d.ts +1 -0
- package/dist/components/ui-parts/UIExtra.en.d.ts +1 -0
- package/dist/components/ui-parts/UIHeader.d.ts +3 -1
- package/dist/components/ui-parts/UIHeader.en.d.ts +3 -1
- package/dist/components/ui-parts/UIMeta.d.ts +1 -0
- package/dist/components/ui-parts/UIMeta.en.d.ts +1 -0
- package/dist/components/ui-parts/UIParts.types.d.ts +15 -1
- package/dist/components/ui-parts/UISummary.d.ts +1 -0
- package/dist/components/ui-parts/UISummary.en.d.ts +1 -0
- package/dist/components/ui-parts/UITitle.d.ts +1 -0
- package/dist/components/ui-parts/UITitle.en.d.ts +1 -0
- package/dist/components/ui-parts/UIValue.d.ts +1 -0
- package/dist/components/ui-parts/UIValue.en.d.ts +1 -0
- package/dist/components/ui-placeholder/UIPlaceholder.d.ts +1 -0
- package/dist/components/ui-placeholder/UIPlaceholder.en.d.ts +1 -0
- package/dist/components/ui-placeholder/UIPlaceholderHeader.d.ts +1 -0
- package/dist/components/ui-placeholder/UIPlaceholderHeader.en.d.ts +1 -0
- package/dist/components/ui-placeholder/UIPlaceholderImage.d.ts +1 -0
- package/dist/components/ui-placeholder/UIPlaceholderImage.en.d.ts +1 -0
- package/dist/components/ui-placeholder/UIPlaceholderLine.d.ts +1 -0
- package/dist/components/ui-placeholder/UIPlaceholderLine.en.d.ts +1 -0
- package/dist/components/ui-placeholder/UIPlaceholderParagraph.d.ts +1 -0
- package/dist/components/ui-placeholder/UIPlaceholderParagraph.en.d.ts +1 -0
- package/dist/components/ui-popup/UIPopup.d.ts +30 -3
- package/dist/components/ui-popup/UIPopup.en.d.ts +7 -0
- package/dist/components/ui-popup/UIPopup.es.d.ts +1 -0
- package/dist/components/ui-progress/UIProgress.d.ts +2 -0
- package/dist/components/ui-progress/UIProgress.en.d.ts +2 -0
- package/dist/components/ui-progress/UIProgress.es.d.ts +1 -0
- package/dist/components/ui-property-editor/UIProperty.d.ts +132 -5
- package/dist/components/ui-property-editor/UIProperty.en.d.ts +11 -44
- package/dist/components/ui-property-editor/UIProperty.es.d.ts +4 -0
- package/dist/components/ui-property-editor/UIPropertyEditor.d.ts +38 -0
- package/dist/components/ui-property-editor/UIPropertyEditor.en.d.ts +1 -0
- package/dist/components/ui-property-editor/UIPropertyEditor.es.d.ts +4 -0
- package/dist/components/ui-property-editor/UIPropertyEditor.types.d.ts +33 -0
- package/dist/components/ui-property-editor/UIPropertyGroup.d.ts +12 -0
- package/dist/components/ui-property-editor/UIPropertyGroup.en.d.ts +2 -0
- package/dist/components/ui-property-editor/UIPropertyGroup.es.d.ts +9 -0
- package/dist/components/ui-property-editor/index.d.ts +1 -0
- package/dist/components/ui-quote/UIQuote.d.ts +1 -0
- package/dist/components/ui-quote/UIQuote.en.d.ts +1 -0
- package/dist/components/ui-rail/UIRail.d.ts +1 -0
- package/dist/components/ui-rail/UIRail.en.d.ts +1 -0
- package/dist/components/ui-rating/UIRating.d.ts +6 -0
- package/dist/components/ui-rating/UIRating.en.d.ts +6 -0
- package/dist/components/ui-rating/UIRating.fallback.d.ts +6 -0
- package/dist/components/ui-reveal/UIReveal.d.ts +1 -0
- package/dist/components/ui-reveal/UIReveal.en.d.ts +1 -0
- package/dist/components/ui-root/UIRoot.d.ts +18 -3
- package/dist/components/ui-root/UIRoot.en.d.ts +15 -0
- package/dist/components/ui-root/UIRoot.es.d.ts +1 -0
- package/dist/components/ui-search/UISearch.d.ts +48 -7
- package/dist/components/ui-search/UISearch.en.d.ts +13 -1
- package/dist/components/ui-search/UISearch.es.d.ts +1 -0
- package/dist/components/ui-search/UISearch.fallback.d.ts +13 -1
- package/dist/components/ui-section/UISection.d.ts +30 -1
- package/dist/components/ui-section/UISection.en.d.ts +10 -0
- package/dist/components/ui-section/UISection.es.d.ts +1 -0
- package/dist/components/ui-section/UISections.d.ts +1 -0
- package/dist/components/ui-section/UISections.en.d.ts +1 -0
- package/dist/components/ui-segment/UISegment.d.ts +2 -0
- package/dist/components/ui-segment/UISegment.en.d.ts +2 -0
- package/dist/components/ui-segment/UISegment.es.d.ts +1 -0
- package/dist/components/ui-segment/UISegments.d.ts +1 -0
- package/dist/components/ui-segment/UISegments.en.d.ts +1 -0
- package/dist/components/ui-select/UISelect.d.ts +6 -0
- package/dist/components/ui-select/UISelect.en.d.ts +6 -0
- package/dist/components/ui-select/UISelect.fallback.d.ts +6 -0
- package/dist/components/ui-shape/UIShape.d.ts +23 -2
- package/dist/components/ui-shape/UIShape.en.d.ts +8 -0
- package/dist/components/ui-shape/UIShape.es.d.ts +1 -0
- package/dist/components/ui-shape/UISide.d.ts +4 -0
- package/dist/components/ui-shape/UISide.en.d.ts +4 -0
- package/dist/components/ui-sidebar/UIPushable.d.ts +1 -0
- package/dist/components/ui-sidebar/UIPushable.en.d.ts +1 -0
- package/dist/components/ui-sidebar/UIPusher.d.ts +1 -0
- package/dist/components/ui-sidebar/UIPusher.en.d.ts +1 -0
- package/dist/components/ui-sidebar/UISidebar.d.ts +1 -0
- package/dist/components/ui-sidebar/UISidebar.en.d.ts +1 -0
- package/dist/components/ui-sides/UISides.d.ts +209 -0
- package/dist/components/ui-sides/UISides.en.d.ts +122 -0
- package/dist/components/ui-sides/UISides.es.d.ts +30 -0
- package/dist/components/ui-sides/UISides.fallback.d.ts +134 -0
- package/dist/components/ui-sides/index.d.ts +2 -0
- package/dist/components/ui-site-nav/SitePages.d.ts +53 -0
- package/dist/components/ui-site-nav/UISiteNav.d.ts +207 -0
- package/dist/components/ui-site-nav/UISiteNav.en.d.ts +87 -0
- package/dist/components/ui-site-nav/UISiteNav.es.d.ts +29 -0
- package/dist/components/ui-site-nav/index.d.ts +1 -0
- package/dist/components/ui-site-tabs/UISiteTabs.d.ts +126 -0
- package/dist/components/ui-site-tabs/UISiteTabs.en.d.ts +49 -0
- package/dist/components/ui-site-tabs/UISiteTabs.es.d.ts +18 -0
- package/dist/components/ui-site-tabs/index.d.ts +1 -0
- package/dist/components/ui-slider/UISlider.d.ts +7 -0
- package/dist/components/ui-slider/UISlider.en.d.ts +7 -0
- package/dist/components/ui-slider/UISlider.es.d.ts +1 -0
- package/dist/components/ui-slider/UISlider.fallback.d.ts +7 -0
- package/dist/components/ui-space/UISpace.d.ts +1 -0
- package/dist/components/ui-space/UISpace.en.d.ts +1 -0
- package/dist/components/ui-split-panel/UISplitPanel.d.ts +175 -0
- package/dist/components/ui-split-panel/UISplitPanel.en.d.ts +74 -0
- package/dist/components/ui-split-panel/UISplitPanel.es.d.ts +25 -0
- package/dist/components/ui-split-panel/index.d.ts +2 -0
- package/dist/components/ui-stack/UIStack.d.ts +31 -5
- package/dist/components/ui-stack/UIStack.en.d.ts +15 -3
- package/dist/components/ui-statistic/UIStatistic.d.ts +1 -0
- package/dist/components/ui-statistic/UIStatistic.en.d.ts +1 -0
- package/dist/components/ui-statistic/UIStatistics.d.ts +1 -0
- package/dist/components/ui-statistic/UIStatistics.en.d.ts +1 -0
- package/dist/components/ui-step/UIStep.d.ts +1 -0
- package/dist/components/ui-step/UIStep.en.d.ts +1 -0
- package/dist/components/ui-step/UISteps.d.ts +1 -0
- package/dist/components/ui-step/UISteps.en.d.ts +1 -0
- package/dist/components/ui-sticky/UISticky.d.ts +4 -0
- package/dist/components/ui-sticky/UISticky.en.d.ts +1 -0
- package/dist/components/ui-tab/UITab.d.ts +8 -0
- package/dist/components/ui-tab/UITab.en.d.ts +1 -0
- package/dist/components/ui-tab/UITabs.d.ts +107 -16
- package/dist/components/ui-tab/UITabs.en.d.ts +40 -1
- package/dist/components/ui-tab/UITabs.es.d.ts +4 -0
- package/dist/components/ui-table/TableEditing.d.ts +77 -0
- package/dist/components/ui-table/UICell.d.ts +1 -0
- package/dist/components/ui-table/UICell.en.d.ts +1 -0
- package/dist/components/ui-table/UITable.d.ts +145 -5
- package/dist/components/ui-table/UITable.en.d.ts +19 -0
- package/dist/components/ui-table/UITable.es.d.ts +3 -0
- package/dist/components/ui-terms/UITerm.d.ts +1 -0
- package/dist/components/ui-terms/UITerm.en.d.ts +1 -0
- package/dist/components/ui-terms/UITerms.d.ts +1 -0
- package/dist/components/ui-terms/UITerms.en.d.ts +1 -0
- package/dist/components/ui-text/UILink.d.ts +11 -0
- package/dist/components/ui-text/UILink.en.d.ts +4 -0
- package/dist/components/ui-text/UIText.d.ts +7 -0
- package/dist/components/ui-text/UIText.en.d.ts +7 -0
- package/dist/components/ui-text/UIText.es.d.ts +2 -0
- package/dist/components/ui-theme-editor/SavedTheme.d.ts +55 -43
- package/dist/components/ui-theme-editor/ThemeDraft.d.ts +15 -0
- package/dist/components/ui-theme-editor/UIColorChip.d.ts +1 -0
- package/dist/components/ui-theme-editor/UIColorChip.en.d.ts +1 -0
- package/dist/components/ui-theme-editor/UIThemeEditor.d.ts +157 -26
- package/dist/components/ui-theme-editor/UIThemeEditor.en.d.ts +79 -6
- package/dist/components/ui-theme-editor/UIThemeEditor.es.d.ts +20 -2
- package/dist/components/ui-theme-editor/UIThemeEditor.types.d.ts +0 -2
- package/dist/components/ui-theme-editor/UIThemeToken.d.ts +1 -0
- package/dist/components/ui-theme-editor/UIThemeToken.en.d.ts +1 -0
- package/dist/components/ui-theme-menu/HueDropdown.d.ts +47 -0
- package/dist/components/ui-theme-menu/ThemeMenu.d.ts +18 -7
- package/dist/components/ui-theme-menu/ThemePreference.d.ts +145 -36
- package/dist/components/ui-theme-menu/UIThemeMenu.d.ts +118 -7
- package/dist/components/ui-theme-menu/UIThemeMenu.en.d.ts +82 -2
- package/dist/components/ui-theme-menu/UIThemeMenu.es.d.ts +21 -1
- package/dist/components/ui-theme-menu/UIThemeMenu.types.d.ts +36 -8
- package/dist/components/ui-theme-menu/index.d.ts +2 -1
- package/dist/components/ui-toast/UIToast.d.ts +1 -0
- package/dist/components/ui-toast/UIToast.en.d.ts +1 -0
- package/dist/components/ui-toc/UIToc.d.ts +1 -0
- package/dist/components/ui-toc/UIToc.en.d.ts +1 -0
- package/dist/components/ui-toolbar/UIToolbar.d.ts +13 -10
- package/dist/components/ui-toolbar/UIToolbar.en.d.ts +138 -84
- package/dist/components/ui-toolbar/UIToolbar.es.d.ts +2 -0
- package/dist/components/ui-transition/UITransition.d.ts +1 -0
- package/dist/components/ui-transition/UITransition.en.d.ts +1 -0
- package/dist/components/ui-tree/UITree.d.ts +162 -0
- package/dist/components/ui-tree/UITree.en.d.ts +88 -0
- package/dist/components/ui-tree/UITree.es.d.ts +35 -0
- package/dist/components/ui-tree/UITreeItem.d.ts +204 -0
- package/dist/components/ui-tree/UITreeItem.en.d.ts +142 -0
- package/dist/components/ui-tree/UITreeItem.es.d.ts +32 -0
- package/dist/components/ui-tree/index.d.ts +3 -0
- package/dist/components/ui-tree-diagram/TreeData.d.ts +3 -12
- package/dist/components/ui-tree-diagram/TreeLayout.d.ts +54 -21
- package/dist/components/ui-tree-diagram/TreeMeasure.d.ts +36 -0
- package/dist/components/ui-tree-diagram/UITreeDiagram.d.ts +152 -27
- package/dist/components/ui-tree-diagram/UITreeDiagram.en.d.ts +47 -7
- package/dist/components/ui-tree-diagram/UITreeDiagram.es.d.ts +12 -1
- package/dist/components/ui-tree-diagram/UITreeDiagram.types.d.ts +66 -21
- package/dist/components/ui-tree-diagram/UITreeNode.d.ts +148 -0
- package/dist/components/ui-tree-diagram/UITreeNode.en.d.ts +69 -0
- package/dist/components/ui-tree-diagram/UITreeNode.es.d.ts +21 -0
- package/dist/components/ui-tree-diagram/index.d.ts +4 -2
- package/dist/components/ui-video/UIAudio.d.ts +1 -0
- package/dist/components/ui-video/UIAudio.en.d.ts +1 -0
- package/dist/components/ui-video/UIVideo.d.ts +1 -0
- package/dist/components/ui-video/UIVideo.en.d.ts +1 -0
- package/dist/components/ui-visibility/UIVisibility.d.ts +1 -0
- package/dist/components/ui-visibility/UIVisibility.en.d.ts +1 -0
- package/dist/components/ui-zoom/UIZoom.d.ts +1 -0
- package/dist/components/ui-zoom/UIZoom.en.d.ts +1 -0
- package/dist/{components.es-DmLzT-Bq.js → components.es-BOa_7gFF.js} +498 -109
- package/dist/components.es-BOa_7gFF.js.map +1 -0
- package/dist/core.d.ts +3 -1
- package/dist/core.js +1082 -511
- package/dist/core.js.map +1 -1
- package/dist/crisp-VfYZlTph.js +6 -0
- package/dist/{crisp-CoZRRDuQ.js.map → crisp-VfYZlTph.js.map} +1 -1
- package/dist/docs-components/index.d.ts +1 -0
- package/dist/docs-components/ui-docs-index/UIDocsIndex.d.ts +89 -0
- package/dist/docs-components/ui-docs-index/UIDocsIndex.en.d.ts +43 -0
- package/dist/docs-components/ui-docs-index/index.d.ts +2 -0
- package/dist/docs-components/ui-docs-nav/UIDocsNav.d.ts +54 -87
- package/dist/docs-components/ui-docs-nav/UIDocsNav.types.d.ts +2 -29
- package/dist/docs-components/ui-docs-search/SearchIndex.d.ts +8 -2
- package/dist/docs-components/ui-docs-search/UIDocsSearch.d.ts +10 -0
- package/dist/docs-components/ui-docs-search/UIDocsSearch.en.d.ts +5 -0
- package/dist/elements/AddressParameter.d.ts +87 -0
- package/dist/elements/DOMFormControl.d.ts +5 -0
- package/dist/elements/FormComponent.d.ts +32 -0
- package/dist/elements/LoadableBody.d.ts +6 -1
- package/dist/elements/LoadableComponent.d.ts +10 -1
- package/dist/elements/RootSettings.d.ts +43 -6
- package/dist/elements/SpellUISettings.d.ts +1 -0
- package/dist/elements/StickyWatch.d.ts +20 -0
- package/dist/elements/elements.types.d.ts +15 -0
- package/dist/elements/index.d.ts +2 -0
- package/dist/forms.js +93 -63
- package/dist/forms.js.map +1 -1
- package/dist/fruity-BRVlgJZd.js +6 -0
- package/dist/fruity-BRVlgJZd.js.map +1 -0
- package/dist/{fruity.theme-BJcMiPl1.js → fruity.theme-CbC7Jyvk.js} +2 -2
- package/dist/fruity.theme-CbC7Jyvk.js.map +1 -0
- package/dist/glass-x9tbbwVq.js +6 -0
- package/dist/glass-x9tbbwVq.js.map +1 -0
- package/dist/glass.theme-24wY2wH9.js +6 -0
- package/dist/glass.theme-24wY2wH9.js.map +1 -0
- package/dist/hot.js +536 -26
- package/dist/hot.js.map +1 -1
- package/dist/index.d.ts +8 -0
- package/dist/index.js +91 -81
- package/dist/jsx.d.ts +21149 -10377
- package/dist/matrix-QY2gWbJ0.js +6 -0
- package/dist/{matrix-CqA59hiF.js.map → matrix-QY2gWbJ0.js.map} +1 -1
- package/dist/{matrix.theme-jqQZjcq3.js → matrix.theme-_8xtwhDq.js} +2 -2
- package/dist/matrix.theme-_8xtwhDq.js.map +1 -0
- package/dist/midnight-BxlTQSfw.js +6 -0
- package/dist/{midnight-BnoVOrhC.js.map → midnight-BxlTQSfw.js.map} +1 -1
- package/dist/mockup-83ELBuVr.js +6 -0
- package/dist/mockup-83ELBuVr.js.map +1 -0
- package/dist/mockup.theme-DmpBgGBl.js +6 -0
- package/dist/mockup.theme-DmpBgGBl.js.map +1 -0
- package/dist/paper-M61nUilz.js +6 -0
- package/dist/{paper-CynH8ZuT.js.map → paper-M61nUilz.js.map} +1 -1
- package/dist/persist.types-D2m6wD-S.js +9 -0
- package/dist/persist.types-D2m6wD-S.js.map +1 -0
- package/dist/pop-CxXfytjk.js +6 -0
- package/dist/{pop-D2i9V_rG.js.map → pop-CxXfytjk.js.map} +1 -1
- package/dist/runtime/DataTooltips.d.ts +75 -0
- package/dist/runtime/PropertyControls.d.ts +15 -1
- package/dist/runtime/Sources.d.ts +16 -4
- package/dist/runtime/Styles.d.ts +11 -0
- package/dist/runtime/Themes.d.ts +10 -4
- package/dist/runtime/UIRuntime.d.ts +4 -1
- package/dist/runtime/index.d.ts +1 -1
- package/dist/runtime/runtime.types.d.ts +18 -85
- package/dist/spell-By5Y3jKP.js +6 -0
- package/dist/{spell-BFtLICm7.js.map → spell-By5Y3jKP.js.map} +1 -1
- package/dist/{spell.theme-B7AU7SQX.js → spell.theme-DxGj7qHx.js} +2 -2
- package/dist/spell.theme-DxGj7qHx.js.map +1 -0
- package/dist/styles/CodeThemeFile.d.ts +73 -0
- package/dist/styles/StyleGenerator.d.ts +6 -0
- package/dist/styles/styles.en.d.ts +141 -3
- package/dist/styles/styles.types.d.ts +2 -0
- package/dist/{styles.en-RLpYiO5_.js → styles.en-CUUxNwHo.js} +71 -14
- package/dist/styles.en-CUUxNwHo.js.map +1 -0
- package/dist/styles.js +13 -13
- package/dist/styles.js.map +1 -1
- package/dist/ui-accordion.js +54 -53
- package/dist/ui-accordion.js.map +1 -1
- package/dist/ui-action.js +20 -19
- package/dist/ui-action.js.map +1 -1
- package/dist/ui-ad.js +5 -4
- package/dist/ui-ad.js.map +1 -1
- package/dist/ui-breadcrumbs.js +15 -13
- package/dist/ui-breadcrumbs.js.map +1 -1
- package/dist/ui-button.js +132 -125
- package/dist/ui-button.js.map +1 -1
- package/dist/ui-calendar.js +208 -206
- package/dist/ui-calendar.js.map +1 -1
- package/dist/ui-card.js +260 -98
- package/dist/ui-card.js.map +1 -1
- package/dist/ui-checkbox.js +95 -81
- package/dist/ui-checkbox.js.map +1 -1
- package/dist/ui-code.js +25 -24
- package/dist/ui-code.js.map +1 -1
- package/dist/ui-comment.js +14 -12
- package/dist/ui-comment.js.map +1 -1
- package/dist/ui-components.js +7 -6
- package/dist/ui-components.js.map +1 -1
- package/dist/ui-container.js +24 -12
- package/dist/ui-container.js.map +1 -1
- package/dist/ui-diagram.js +1328 -0
- package/dist/ui-diagram.js.map +1 -0
- package/dist/ui-dimension.js +779 -0
- package/dist/ui-dimension.js.map +1 -0
- package/dist/ui-dimmer.js +36 -34
- package/dist/ui-dimmer.js.map +1 -1
- package/dist/ui-divider.js +7 -5
- package/dist/ui-divider.js.map +1 -1
- package/dist/ui-dropdown.js +107 -105
- package/dist/ui-dropdown.js.map +1 -1
- package/dist/ui-embed.js +36 -35
- package/dist/ui-embed.js.map +1 -1
- package/dist/ui-emoji.js +10 -9
- package/dist/ui-emoji.js.map +1 -1
- package/dist/ui-example.js +63 -61
- package/dist/ui-example.js.map +1 -1
- package/dist/ui-feed.js +12 -10
- package/dist/ui-feed.js.map +1 -1
- package/dist/ui-flag.js +10 -9
- package/dist/ui-flag.js.map +1 -1
- package/dist/ui-flyout.js +7 -6
- package/dist/ui-flyout.js.map +1 -1
- package/dist/ui-form.js +244 -162
- package/dist/ui-form.js.map +1 -1
- package/dist/ui-grid.js +21 -18
- package/dist/ui-grid.js.map +1 -1
- package/dist/ui-icon-picker.js +46 -44
- package/dist/ui-icon-picker.js.map +1 -1
- package/dist/ui-icon.js +17 -14
- package/dist/ui-icon.js.map +1 -1
- package/dist/ui-image.js +93 -55
- package/dist/ui-image.js.map +1 -1
- package/dist/ui-include.js +18 -17
- package/dist/ui-include.js.map +1 -1
- package/dist/ui-input.js +154 -112
- package/dist/ui-input.js.map +1 -1
- package/dist/ui-item.js +152 -102
- package/dist/ui-item.js.map +1 -1
- package/dist/ui-items.js +9 -8
- package/dist/ui-items.js.map +1 -1
- package/dist/ui-json.js +115 -0
- package/dist/ui-json.js.map +1 -0
- package/dist/ui-keys.js +1 -1
- package/dist/ui-label.js +18 -15
- package/dist/ui-label.js.map +1 -1
- package/dist/ui-list.js +7 -5
- package/dist/ui-list.js.map +1 -1
- package/dist/ui-loader.js +7 -6
- package/dist/ui-loader.js.map +1 -1
- package/dist/ui-markdown.js +975 -83
- package/dist/ui-markdown.js.map +1 -1
- package/dist/ui-menu.js +329 -196
- package/dist/ui-menu.js.map +1 -1
- package/dist/ui-message.js +20 -18
- package/dist/ui-message.js.map +1 -1
- package/dist/ui-modal.js +46 -45
- package/dist/ui-modal.js.map +1 -1
- package/dist/ui-nag.js +19 -18
- package/dist/ui-nag.js.map +1 -1
- package/dist/ui-page.js +8 -7
- package/dist/ui-page.js.map +1 -1
- package/dist/ui-panel.js +28 -17
- package/dist/ui-panel.js.map +1 -1
- package/dist/ui-parts.js +66 -52
- package/dist/ui-parts.js.map +1 -1
- package/dist/ui-placeholder.js +21 -16
- package/dist/ui-placeholder.js.map +1 -1
- package/dist/ui-popup.js +113 -84
- package/dist/ui-popup.js.map +1 -1
- package/dist/ui-progress.js +9 -7
- package/dist/ui-progress.js.map +1 -1
- package/dist/ui-property-editor.js +706 -203
- package/dist/ui-property-editor.js.map +1 -1
- package/dist/ui-quote.js +5 -4
- package/dist/ui-quote.js.map +1 -1
- package/dist/ui-rail.js +5 -4
- package/dist/ui-rail.js.map +1 -1
- package/dist/ui-rating.js +31 -29
- package/dist/ui-rating.js.map +1 -1
- package/dist/ui-reveal.js +7 -6
- package/dist/ui-reveal.js.map +1 -1
- package/dist/ui-root.js +324 -158
- package/dist/ui-root.js.map +1 -1
- package/dist/ui-search.js +210 -168
- package/dist/ui-search.js.map +1 -1
- package/dist/ui-section.js +167 -130
- package/dist/ui-section.js.map +1 -1
- package/dist/ui-segment.js +15 -12
- package/dist/ui-segment.js.map +1 -1
- package/dist/ui-select.js +83 -81
- package/dist/ui-select.js.map +1 -1
- package/dist/ui-shape.js +86 -58
- package/dist/ui-shape.js.map +1 -1
- package/dist/ui-sidebar.js +59 -56
- package/dist/ui-sidebar.js.map +1 -1
- package/dist/ui-sides.js +325 -0
- package/dist/ui-sides.js.map +1 -0
- package/dist/ui-site-nav.js +329 -0
- package/dist/ui-site-nav.js.map +1 -0
- package/dist/ui-site-tabs.js +177 -0
- package/dist/ui-site-tabs.js.map +1 -0
- package/dist/ui-slider.js +84 -81
- package/dist/ui-slider.js.map +1 -1
- package/dist/ui-space.js +7 -6
- package/dist/ui-space.js.map +1 -1
- package/dist/ui-split-panel.js +298 -0
- package/dist/ui-split-panel.js.map +1 -0
- package/dist/ui-stack.js +47 -23
- package/dist/ui-stack.js.map +1 -1
- package/dist/ui-statistic.js +15 -13
- package/dist/ui-statistic.js.map +1 -1
- package/dist/ui-step.js +31 -29
- package/dist/ui-step.js.map +1 -1
- package/dist/ui-sticky.js +7 -6
- package/dist/ui-sticky.js.map +1 -1
- package/dist/ui-tab.js +230 -138
- package/dist/ui-tab.js.map +1 -1
- package/dist/ui-table.js +724 -162
- package/dist/ui-table.js.map +1 -1
- package/dist/ui-terms.js +12 -10
- package/dist/ui-terms.js.map +1 -1
- package/dist/ui-text.js +53 -28
- package/dist/ui-text.js.map +1 -1
- package/dist/ui-theme-editor.js +1018 -1545
- package/dist/ui-theme-editor.js.map +1 -1
- package/dist/ui-theme-menu-CuIjr8Ou.js +1493 -0
- package/dist/ui-theme-menu-CuIjr8Ou.js.map +1 -0
- package/dist/ui-toast.js +45 -44
- package/dist/ui-toast.js.map +1 -1
- package/dist/ui-toc.js +75 -74
- package/dist/ui-toc.js.map +1 -1
- package/dist/ui-toolbar.js +51 -73
- package/dist/ui-toolbar.js.map +1 -1
- package/dist/ui-transition.js +12 -11
- package/dist/ui-transition.js.map +1 -1
- package/dist/ui-tree-diagram.js +676 -197
- package/dist/ui-tree-diagram.js.map +1 -1
- package/dist/ui-tree.js +625 -0
- package/dist/ui-tree.js.map +1 -0
- package/dist/ui-video.js +13 -11
- package/dist/ui-video.js.map +1 -1
- package/dist/ui-visibility.js +26 -25
- package/dist/ui-visibility.js.map +1 -1
- package/dist/ui-zoom.js +79 -78
- package/dist/ui-zoom.js.map +1 -1
- package/dist/util/TopLayerTip.d.ts +28 -0
- package/dist/util/index.d.ts +5 -2
- package/dist/vocabulary/DefaultValues.d.ts +34 -0
- package/dist/vocabulary/SharedVocabulary.d.ts +4 -0
- package/dist/vocabulary/SharedVocabulary.es.d.ts +7 -0
- package/dist/vocabulary/ValueSets.d.ts +18 -0
- package/dist/vocabulary/Vocabulary.d.ts +1 -0
- package/dist/vocabulary/defaults.generated.d.ts +6 -0
- package/dist/vocabulary/index.d.ts +1 -0
- package/package.json +1 -1
- package/dist/MarkdownEngine-CbuT9Mjc.js.map +0 -1
- package/dist/PrefStore-CeaTtjTz.js.map +0 -1
- package/dist/UIButton-XkfGqgh6.js +0 -6
- package/dist/UIButton-XkfGqgh6.js.map +0 -1
- package/dist/UIInput-BUudZstW.js +0 -6
- package/dist/UIInput-BUudZstW.js.map +0 -1
- package/dist/UIKeys-DJF2TIKE.js.map +0 -1
- package/dist/UILabel-C1jy3Yl8.js +0 -6
- package/dist/UILabel-C1jy3Yl8.js.map +0 -1
- package/dist/UIMenu-Btd-8V3A.js +0 -42
- package/dist/UIMenu-Btd-8V3A.js.map +0 -1
- package/dist/UIRuntime-BBuehGly.js.map +0 -1
- package/dist/components.es-DmLzT-Bq.js.map +0 -1
- package/dist/crisp-CoZRRDuQ.js +0 -6
- package/dist/fruity-CQFYeRlh.js +0 -6
- package/dist/fruity-CQFYeRlh.js.map +0 -1
- package/dist/fruity.theme-BJcMiPl1.js.map +0 -1
- package/dist/glass-CAfW11kL.js +0 -6
- package/dist/glass-CAfW11kL.js.map +0 -1
- package/dist/glass.theme-DQcBbtCW.js +0 -6
- package/dist/glass.theme-DQcBbtCW.js.map +0 -1
- package/dist/matrix-CqA59hiF.js +0 -6
- package/dist/matrix.theme-jqQZjcq3.js.map +0 -1
- package/dist/midnight-BnoVOrhC.js +0 -6
- package/dist/paper-CynH8ZuT.js +0 -6
- package/dist/persist.types-CsZxS8TG.js +0 -9
- package/dist/persist.types-CsZxS8TG.js.map +0 -1
- package/dist/pop-D2i9V_rG.js +0 -6
- package/dist/spell-BFtLICm7.js +0 -6
- package/dist/spell.theme-B7AU7SQX.js.map +0 -1
- package/dist/styles.en-RLpYiO5_.js.map +0 -1
- package/dist/ui-theme-menu-DyKZygpV.js +0 -921
- package/dist/ui-theme-menu-DyKZygpV.js.map +0 -1
package/dist/ui-tree-diagram.js
CHANGED
|
@@ -1,25 +1,21 @@
|
|
|
1
1
|
import "./rolldown-runtime-CYGlBXrH.js";
|
|
2
|
-
import { Bt as e,
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
2
|
+
import { Bt as e, F as t, Ht as n, Lt as r, Rt as i, UI as a, UIComponent as o, Ut as s, Vt as c, derived as l, on as u, onChange as d, proto as f, protoMerged as p, state as m, untracked as h, watches as g, whileConnected as _, zt as v } from "./core.js";
|
|
3
|
+
import { JsonChild as y, t as b } from "./ui-json.js";
|
|
4
|
+
import { t as x } from "./TreeMeasure-BVJeGb1L.js";
|
|
5
|
+
import { For as S, Show as C } from "solid-js";
|
|
6
|
+
import { className as w, createComponent as T, delegateEvents as E, effect as D, getOwner as O, insert as k, isServer as A, memo as ee, readShallow as j, ref as M, setAttribute as N, style as P, template as F } from "@solidjs/web";
|
|
5
7
|
//#region src/components/ui-tree-diagram/TreeData.ts
|
|
6
|
-
var
|
|
8
|
+
var I = class TreeData {
|
|
7
9
|
static node(e, t = /* @__PURE__ */ new Set()) {
|
|
8
10
|
if (typeof e != "object" || !e || Array.isArray(e) || t.has(e)) return;
|
|
9
11
|
t.add(e);
|
|
10
|
-
let n = e, r = { label: TreeData.text(n.label) ?? "" }, i = TreeData.text(n.detail), a = TreeData.text(n.slot), o = TreeData.text(n.title);
|
|
11
|
-
if (i && (r.detail = i), a && (r.
|
|
12
|
+
let n = e, r = { label: TreeData.text(n.label) ?? "" }, i = TreeData.text(n.detail), a = TreeData.text(n.edgeLabel) ?? TreeData.text(n.slot), o = TreeData.text(n.title), s = TreeData.text(n.color), c = TreeData.text(n.kind);
|
|
13
|
+
if (i && (r.detail = i), a && (r.edgeLabel = a), o && (r.title = o), s && (r.color = s), c && (r.kind = c), n.folded === !0 && (r.folded = !0), Array.isArray(n.children)) {
|
|
12
14
|
let e = n.children.flatMap((e) => TreeData.node(e, t) ?? []);
|
|
13
15
|
e.length && (r.children = e);
|
|
14
16
|
}
|
|
15
17
|
return r;
|
|
16
18
|
}
|
|
17
|
-
static scriptText(e) {
|
|
18
|
-
for (let t of e.children) if (t.localName === "script" && t.getAttribute("type")?.trim() === "application/json") return t.textContent ?? "";
|
|
19
|
-
}
|
|
20
|
-
static parse(e) {
|
|
21
|
-
if (e?.trim()) return TreeData.node(JSON.parse(e));
|
|
22
|
-
}
|
|
23
19
|
static summary(e, t) {
|
|
24
20
|
let n = e.children?.length ?? 0;
|
|
25
21
|
return t(n === 0 ? "summaryLeaf" : n === 1 ? "summaryOne" : "summary", {
|
|
@@ -31,160 +27,216 @@ var S = class TreeData {
|
|
|
31
27
|
if (typeof e == "string") return e;
|
|
32
28
|
if (typeof e == "number" || typeof e == "boolean") return String(e);
|
|
33
29
|
}
|
|
34
|
-
},
|
|
30
|
+
}, te = ["top-down", "left-right"], L = {
|
|
35
31
|
fontSize: 12,
|
|
36
32
|
detailFontSize: 10,
|
|
37
|
-
|
|
33
|
+
edgeLabelFontSize: 10,
|
|
38
34
|
charWidth: .6,
|
|
39
|
-
|
|
35
|
+
edgeLabelCharWidth: .56,
|
|
40
36
|
lineHeight: 1.25,
|
|
41
37
|
paddingX: 10,
|
|
42
38
|
paddingY: 6,
|
|
43
39
|
minBoxWidth: 32,
|
|
44
40
|
levelGap: 36,
|
|
45
41
|
siblingGap: 14,
|
|
46
|
-
|
|
47
|
-
|
|
42
|
+
edgeLabelPaddingX: 4,
|
|
43
|
+
edgeLabelPaddingY: 2,
|
|
48
44
|
margin: 2
|
|
49
|
-
},
|
|
45
|
+
}, ne = class TreeLayout {
|
|
50
46
|
metrics;
|
|
51
|
-
|
|
52
|
-
|
|
47
|
+
direction;
|
|
48
|
+
sizes;
|
|
49
|
+
folded;
|
|
50
|
+
constructor(e = {}) {
|
|
51
|
+
this.metrics = e.metrics ?? L, this.direction = e.direction ?? "top-down", this.sizes = e.sizes, this.folded = e.folded;
|
|
53
52
|
}
|
|
54
53
|
static of(e, t) {
|
|
55
54
|
return new TreeLayout(t).layout(e);
|
|
56
55
|
}
|
|
57
56
|
layout(e) {
|
|
58
|
-
let { margin: t, levelGap: n } = this.metrics, r = this.measure(e, 0), i = [];
|
|
57
|
+
let { margin: t, levelGap: n } = this.metrics, r = this.measure(e, 0, re), i = [], a = [];
|
|
59
58
|
TreeLayout.visit(r, (e) => {
|
|
60
|
-
i[e.depth] = Math.max(i[e.depth] ?? 0, e.
|
|
59
|
+
i[e.depth] = Math.max(i[e.depth] ?? 0, e.mainLength), a[e.depth] = Math.max(a[e.depth] ?? n, this.gapFor(e));
|
|
61
60
|
});
|
|
62
|
-
let
|
|
63
|
-
for (let e = 1; e < i.length; e++)
|
|
61
|
+
let o = [t];
|
|
62
|
+
for (let e = 1; e < i.length; e++) o[e] = o[e - 1] + i[e - 1] + a[e];
|
|
64
63
|
this.place(r);
|
|
65
|
-
let
|
|
64
|
+
let s = /* @__PURE__ */ new Map([[r, 0]]);
|
|
66
65
|
TreeLayout.visit(r, (e) => {
|
|
67
|
-
for (let t of e.children)
|
|
66
|
+
for (let t of e.children) s.set(t, s.get(e) + t.offset);
|
|
68
67
|
});
|
|
69
|
-
let
|
|
68
|
+
let c = Infinity, l = -Infinity;
|
|
70
69
|
TreeLayout.visit(r, (e) => {
|
|
71
|
-
let t =
|
|
72
|
-
|
|
70
|
+
let t = s.get(e);
|
|
71
|
+
c = Math.min(c, t - e.crossLength / 2), l = Math.max(l, t + e.crossLength / 2);
|
|
73
72
|
for (let n of e.children) {
|
|
74
|
-
if (!n.
|
|
75
|
-
let e = (t +
|
|
76
|
-
|
|
73
|
+
if (!n.edgeLabel) continue;
|
|
74
|
+
let e = (t + s.get(n)) / 2;
|
|
75
|
+
c = Math.min(c, e - n.edgeLabelCross / 2), l = Math.max(l, e + n.edgeLabelCross / 2);
|
|
77
76
|
}
|
|
78
77
|
});
|
|
79
|
-
let
|
|
78
|
+
let u = t - c, d = [], f = [];
|
|
80
79
|
TreeLayout.visit(r, (e, t) => {
|
|
81
|
-
let n =
|
|
82
|
-
if (
|
|
83
|
-
let
|
|
84
|
-
|
|
85
|
-
y: a[t.depth] + i[t.depth]
|
|
86
|
-
};
|
|
87
|
-
d.push(this.edge(e, s, {
|
|
88
|
-
x: n,
|
|
89
|
-
y: r
|
|
90
|
-
}));
|
|
80
|
+
let n = s.get(e) + u, r = o[e.depth];
|
|
81
|
+
if (d.push(this.box(e, n, r, i[e.depth])), !t) return;
|
|
82
|
+
let a = this.point(o[t.depth] + i[t.depth], s.get(t) + u);
|
|
83
|
+
f.push(this.edge(e, a, this.point(r, n)));
|
|
91
84
|
});
|
|
92
|
-
let
|
|
85
|
+
let p = i.length - 1, m = TreeLayout.round(l - c + 2 * t), h = TreeLayout.round(o[p] + i[p] + t);
|
|
93
86
|
return {
|
|
94
|
-
width:
|
|
95
|
-
height:
|
|
96
|
-
boxes:
|
|
97
|
-
edges:
|
|
87
|
+
width: this.isTopDown ? m : h,
|
|
88
|
+
height: this.isTopDown ? h : m,
|
|
89
|
+
boxes: d,
|
|
90
|
+
edges: f
|
|
98
91
|
};
|
|
99
92
|
}
|
|
100
|
-
|
|
101
|
-
|
|
93
|
+
get isTopDown() {
|
|
94
|
+
return this.direction === "top-down";
|
|
95
|
+
}
|
|
96
|
+
measure(e, t, n) {
|
|
97
|
+
let { fontSize: r, detailFontSize: i, edgeLabelFontSize: a, charWidth: o, edgeLabelCharWidth: s, lineHeight: c } = this.metrics, { paddingX: l, paddingY: u, minBoxWidth: d, edgeLabelPaddingX: f, edgeLabelPaddingY: p } = this.metrics, m = this.sizes?.get(e), h = m?.labelWidth ?? TreeLayout.chars(e.label) * o * r, g = e.detail ? m?.detailWidth ?? TreeLayout.chars(e.detail) * o * i : 0, _ = m?.contentWidth ?? 0, v = m?.contentHeight ?? 0, y = Math.max(d, Math.max(h, g, _) + 2 * l), b = e.label || !v ? r * c : 0, x = e.detail ? i * c : 0, S = 2 * u + b + x + v, C = e.edgeLabel || void 0, w = C ? (m?.edgeLabelWidth ?? TreeLayout.chars(C) * s * a) + 2 * f : 0, T = C ? a * c + 2 * p : 0, E = this.isTopDown ? w : T, D = this.isTopDown ? y : S, O = !!this.folded?.has(e);
|
|
102
98
|
return {
|
|
103
99
|
node: e,
|
|
104
100
|
depth: t,
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
101
|
+
path: n,
|
|
102
|
+
width: y,
|
|
103
|
+
height: S,
|
|
104
|
+
labelLine: b,
|
|
105
|
+
detailLine: x,
|
|
106
|
+
contentWidth: _,
|
|
107
|
+
contentHeight: v,
|
|
108
|
+
crossLength: D,
|
|
109
|
+
mainLength: this.isTopDown ? S : y,
|
|
110
|
+
edgeLabel: C,
|
|
111
|
+
edgeLabelWidth: w,
|
|
112
|
+
edgeLabelHeight: T,
|
|
113
|
+
edgeLabelCross: E,
|
|
114
|
+
footprint: Math.max(D, 2 * E),
|
|
115
|
+
isFolded: O,
|
|
116
|
+
children: O ? [] : (e.children ?? []).map((e, r) => this.measure(e, t + 1, `${n}.${r}`)),
|
|
111
117
|
offset: 0
|
|
112
118
|
};
|
|
113
119
|
}
|
|
120
|
+
gapFor(e) {
|
|
121
|
+
return this.isTopDown ? this.metrics.levelGap : e.edgeLabelWidth + ie;
|
|
122
|
+
}
|
|
114
123
|
static chars(e) {
|
|
115
124
|
return Array.from(e).length;
|
|
116
125
|
}
|
|
117
126
|
place(e) {
|
|
118
127
|
let t = e.footprint / 2;
|
|
119
128
|
if (!e.children.length) return {
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
};
|
|
123
|
-
let n = e.children.map((e) => this.place(e)), r = [0], i = {
|
|
124
|
-
left: [...n[0].left],
|
|
125
|
-
right: [...n[0].right]
|
|
129
|
+
low: [-t],
|
|
130
|
+
high: [t]
|
|
126
131
|
};
|
|
132
|
+
let n = e.children.map((e) => this.place(e)), r = [0];
|
|
127
133
|
for (let e = 1; e < n.length; e++) {
|
|
128
|
-
let t =
|
|
129
|
-
for (let
|
|
130
|
-
|
|
131
|
-
|
|
134
|
+
let t = -Infinity, i = e - 1, a = -Infinity;
|
|
135
|
+
for (let o = e - 1; o >= 0; o--) {
|
|
136
|
+
let s = r[o] + this.clearance(n[o], n[e]);
|
|
137
|
+
o === e - 1 && (a = s), s > t && (t = s, i = o);
|
|
138
|
+
}
|
|
139
|
+
r[e] = t, TreeLayout.spreadBetween(r, i, e, t - a);
|
|
140
|
+
}
|
|
141
|
+
let i = (r[0] + r[r.length - 1]) / 2;
|
|
142
|
+
for (let [t, n] of e.children.entries()) n.offset = r[t] - i;
|
|
143
|
+
let a = {
|
|
144
|
+
low: [],
|
|
145
|
+
high: []
|
|
146
|
+
};
|
|
147
|
+
for (let [e, t] of n.entries()) {
|
|
148
|
+
let n = r[e] - i;
|
|
149
|
+
for (let e = 0; e < t.low.length; e++) a.low[e] = Math.min(a.low[e] ?? Infinity, t.low[e] + n), a.high[e] = Math.max(a.high[e] ?? -Infinity, t.high[e] + n);
|
|
132
150
|
}
|
|
133
|
-
let a = (r[0] + r[r.length - 1]) / 2;
|
|
134
|
-
for (let [t, n] of e.children.entries()) n.offset = r[t] - a;
|
|
135
151
|
return {
|
|
136
|
-
|
|
137
|
-
|
|
152
|
+
low: [-t, ...a.low],
|
|
153
|
+
high: [t, ...a.high]
|
|
154
|
+
};
|
|
155
|
+
}
|
|
156
|
+
clearance(e, t) {
|
|
157
|
+
let n = -Infinity, r = Math.min(e.high.length, t.low.length);
|
|
158
|
+
for (let i = 0; i < r; i++) n = Math.max(n, e.high[i] - t.low[i] + this.metrics.siblingGap);
|
|
159
|
+
return n;
|
|
160
|
+
}
|
|
161
|
+
static spreadBetween(e, t, n, r) {
|
|
162
|
+
let i = n - t;
|
|
163
|
+
if (!(i < 2 || r <= 0)) for (let a = t + 1; a < n; a++) e[a] += r * (a - t) / i;
|
|
164
|
+
}
|
|
165
|
+
point(e, t) {
|
|
166
|
+
return this.isTopDown ? {
|
|
167
|
+
x: t,
|
|
168
|
+
y: e
|
|
169
|
+
} : {
|
|
170
|
+
x: e,
|
|
171
|
+
y: t
|
|
138
172
|
};
|
|
139
173
|
}
|
|
140
174
|
box(e, t, n, r) {
|
|
141
|
-
let {
|
|
175
|
+
let { labelLine: i, detailLine: a, contentHeight: o, contentWidth: s } = e, c = this.isTopDown ? e.width : r, l = this.isTopDown ? r : e.height, u = this.isTopDown ? t - c / 2 : n, d = this.isTopDown ? n : t - l / 2, f = u + c / 2, p = d + (l - i - a - o) / 2, m = TreeLayout.round, { point: h } = TreeLayout, g = e.node.children?.length ?? 0;
|
|
142
176
|
return {
|
|
143
177
|
node: e.node,
|
|
144
178
|
depth: e.depth,
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
179
|
+
path: e.path,
|
|
180
|
+
x: m(u),
|
|
181
|
+
y: m(d),
|
|
182
|
+
width: m(c),
|
|
183
|
+
height: m(l),
|
|
184
|
+
exit: h(this.isTopDown ? {
|
|
185
|
+
x: f,
|
|
186
|
+
y: d + l
|
|
187
|
+
} : {
|
|
188
|
+
x: u + c,
|
|
189
|
+
y: d + l / 2
|
|
190
|
+
}),
|
|
191
|
+
label: h({
|
|
192
|
+
x: f,
|
|
193
|
+
y: p + i / 2
|
|
152
194
|
}),
|
|
153
|
-
...e.node.detail && { detail:
|
|
154
|
-
x:
|
|
155
|
-
y:
|
|
156
|
-
}) }
|
|
195
|
+
...e.node.detail && { detail: h({
|
|
196
|
+
x: f,
|
|
197
|
+
y: p + i + a / 2
|
|
198
|
+
}) },
|
|
199
|
+
...o > 0 && { content: {
|
|
200
|
+
...h({
|
|
201
|
+
x: f,
|
|
202
|
+
y: p + i + a + o / 2
|
|
203
|
+
}),
|
|
204
|
+
width: m(s),
|
|
205
|
+
height: m(o)
|
|
206
|
+
} },
|
|
207
|
+
...g > 0 && { childCount: g },
|
|
208
|
+
...e.isFolded && g > 0 && { isFolded: !0 }
|
|
157
209
|
};
|
|
158
210
|
}
|
|
159
211
|
edge(e, t, n) {
|
|
160
|
-
let r = TreeLayout
|
|
161
|
-
if (!e.
|
|
212
|
+
let { point: r } = TreeLayout;
|
|
213
|
+
if (!e.edgeLabel) return {
|
|
162
214
|
from: r(t),
|
|
163
215
|
to: r(n)
|
|
164
216
|
};
|
|
165
|
-
let
|
|
166
|
-
x: t.x +
|
|
167
|
-
y: t.y +
|
|
168
|
-
},
|
|
169
|
-
text: e.
|
|
170
|
-
...r(
|
|
171
|
-
width: TreeLayout.round(
|
|
172
|
-
height: TreeLayout.round(
|
|
173
|
-
},
|
|
217
|
+
let i = n.x - t.x, a = n.y - t.y, o = {
|
|
218
|
+
x: t.x + i / 2,
|
|
219
|
+
y: t.y + a / 2
|
|
220
|
+
}, s = e.edgeLabelWidth, c = e.edgeLabelHeight, l = Math.min(i ? s / 2 / Math.abs(i) : Infinity, a ? c / 2 / Math.abs(a) : Infinity, .5), u = {
|
|
221
|
+
text: e.edgeLabel,
|
|
222
|
+
...r(o),
|
|
223
|
+
width: TreeLayout.round(s),
|
|
224
|
+
height: TreeLayout.round(c)
|
|
225
|
+
}, d = {
|
|
174
226
|
from: r({
|
|
175
|
-
x:
|
|
176
|
-
y:
|
|
227
|
+
x: o.x - l * i,
|
|
228
|
+
y: o.y - l * a
|
|
177
229
|
}),
|
|
178
230
|
to: r({
|
|
179
|
-
x:
|
|
180
|
-
y:
|
|
231
|
+
x: o.x + l * i,
|
|
232
|
+
y: o.y + l * a
|
|
181
233
|
})
|
|
182
234
|
};
|
|
183
235
|
return {
|
|
184
236
|
from: r(t),
|
|
185
237
|
to: r(n),
|
|
186
|
-
|
|
187
|
-
gap:
|
|
238
|
+
label: u,
|
|
239
|
+
gap: d
|
|
188
240
|
};
|
|
189
241
|
}
|
|
190
242
|
static round(e) {
|
|
@@ -200,8 +252,9 @@ var S = class TreeData {
|
|
|
200
252
|
t(e, n);
|
|
201
253
|
for (let n of e.children) TreeLayout.visit(n, t, e);
|
|
202
254
|
}
|
|
203
|
-
},
|
|
255
|
+
}, re = "0", ie = 24, ae = {
|
|
204
256
|
tag: "ui-tree-diagram",
|
|
257
|
+
icon: "project diagram",
|
|
205
258
|
topics: [
|
|
206
259
|
"data display",
|
|
207
260
|
"images",
|
|
@@ -220,16 +273,49 @@ var S = class TreeData {
|
|
|
220
273
|
],
|
|
221
274
|
skeleton: "12 tall",
|
|
222
275
|
noun: "tree diagram",
|
|
223
|
-
description: "A tree diagram draws a tree
|
|
224
|
-
attributes: [
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
276
|
+
description: "A tree diagram draws a tree: a box for each node, a line to each of its children. Write it as nested tags or as JSON.",
|
|
277
|
+
attributes: [
|
|
278
|
+
{
|
|
279
|
+
name: "tree",
|
|
280
|
+
group: "content",
|
|
281
|
+
kind: "json",
|
|
282
|
+
reflect: !1,
|
|
283
|
+
description: "The tree to draw, a `TreeDiagramNode`: `label`, and optional `detail`, `edgeLabel`, `title`, `color`, `kind`, `folded` and `children`. A JS property (JSON in the attribute); wins over `<ui-tree-node>`, `<ui-json>` or `<script type=\"application/json\">` children. Set a NEW tree to redraw."
|
|
284
|
+
},
|
|
285
|
+
{
|
|
286
|
+
name: "direction",
|
|
287
|
+
group: "layout",
|
|
288
|
+
kind: "enum",
|
|
289
|
+
values: te,
|
|
290
|
+
default: "top-down",
|
|
291
|
+
description: "Which way it grows: `top-down`, children under their parent, or `left-right`, children after it."
|
|
292
|
+
},
|
|
293
|
+
{
|
|
294
|
+
name: "foldable",
|
|
295
|
+
group: "behaviour",
|
|
296
|
+
kind: "boolean",
|
|
297
|
+
description: "A node with children gets a button that folds them away, and opens them again; `ui-node-toggled` says so."
|
|
298
|
+
},
|
|
299
|
+
{
|
|
300
|
+
name: "clickable",
|
|
301
|
+
group: "behaviour",
|
|
302
|
+
kind: "boolean",
|
|
303
|
+
description: "Its nodes look clickable and can be reached by keyboard: Enter or Space sends `ui-node-clicked`, as a click does."
|
|
304
|
+
}
|
|
305
|
+
],
|
|
306
|
+
events: [{
|
|
307
|
+
name: "ui-node-clicked",
|
|
308
|
+
detail: "{ node: { label: string, element?: Element }, path: string, originalEvent: Event }",
|
|
309
|
+
description: "A node was clicked, with or without `clickable`. `path` is its place, its child index at each depth: `0.2.1`. A nested tag's node has its `element`."
|
|
310
|
+
}, {
|
|
311
|
+
name: "ui-node-toggled",
|
|
312
|
+
detail: "{ node: { label: string, element?: Element }, path: string, folded: boolean, originalEvent: Event }",
|
|
313
|
+
description: "A person folded a node, or opened it again."
|
|
314
|
+
}],
|
|
315
|
+
slots: [{
|
|
316
|
+
name: "",
|
|
317
|
+
description: "The tree's root, a `<ui-tree-node>`, with the nodes under it inside it."
|
|
230
318
|
}],
|
|
231
|
-
events: [],
|
|
232
|
-
slots: [],
|
|
233
319
|
parts: [
|
|
234
320
|
{
|
|
235
321
|
name: "diagram",
|
|
@@ -248,8 +334,12 @@ var S = class TreeData {
|
|
|
248
334
|
description: "Each line from a parent to a child."
|
|
249
335
|
},
|
|
250
336
|
{
|
|
251
|
-
name: "
|
|
252
|
-
description: "Each
|
|
337
|
+
name: "edge-label",
|
|
338
|
+
description: "Each edge label, on its line."
|
|
339
|
+
},
|
|
340
|
+
{
|
|
341
|
+
name: "toggle",
|
|
342
|
+
description: "Each fold button, with `foldable`."
|
|
253
343
|
}
|
|
254
344
|
],
|
|
255
345
|
states: [],
|
|
@@ -268,125 +358,503 @@ var S = class TreeData {
|
|
|
268
358
|
key: "summaryLeaf",
|
|
269
359
|
text: "Tree: {label}",
|
|
270
360
|
description: "Name of a tree of one node."
|
|
361
|
+
},
|
|
362
|
+
{
|
|
363
|
+
key: "foldNode",
|
|
364
|
+
text: "Fold {label}",
|
|
365
|
+
description: "A fold button's name, while the node's open."
|
|
366
|
+
},
|
|
367
|
+
{
|
|
368
|
+
key: "unfoldNode",
|
|
369
|
+
text: "Open {label}",
|
|
370
|
+
description: "A fold button's name, while the node's folded."
|
|
271
371
|
}
|
|
272
372
|
]
|
|
273
|
-
},
|
|
373
|
+
}, oe = {
|
|
374
|
+
tag: "ui-tree-node",
|
|
375
|
+
icon: "circle outline",
|
|
376
|
+
topics: ["data display", "images"],
|
|
377
|
+
aka: [
|
|
378
|
+
"diagram node",
|
|
379
|
+
"tree diagram node",
|
|
380
|
+
"org chart box",
|
|
381
|
+
"node"
|
|
382
|
+
],
|
|
383
|
+
noun: "tree node",
|
|
384
|
+
description: "A tree node is one box of a tree diagram: its label, and the nodes under it as its children. Its text is its label; any other element inside it shows in its box.",
|
|
385
|
+
attributes: [
|
|
386
|
+
{
|
|
387
|
+
name: "label",
|
|
388
|
+
group: "content",
|
|
389
|
+
kind: "string",
|
|
390
|
+
description: "The box's text. None: the node's own text."
|
|
391
|
+
},
|
|
392
|
+
{
|
|
393
|
+
name: "detail",
|
|
394
|
+
group: "content",
|
|
395
|
+
kind: "string",
|
|
396
|
+
description: "A second, smaller, muted line under the label, e.g. a datatype."
|
|
397
|
+
},
|
|
398
|
+
{
|
|
399
|
+
name: "edge-label",
|
|
400
|
+
group: "content",
|
|
401
|
+
kind: "string",
|
|
402
|
+
property: "edgeLabel",
|
|
403
|
+
description: "Text on the line from its parent, e.g. `condition`: which part of its parent it is."
|
|
404
|
+
},
|
|
405
|
+
{
|
|
406
|
+
name: "hover-text",
|
|
407
|
+
group: "content",
|
|
408
|
+
kind: "string",
|
|
409
|
+
property: "hoverText",
|
|
410
|
+
description: "What shows when the pointer rests on its box, e.g. the source it came from."
|
|
411
|
+
},
|
|
412
|
+
{
|
|
413
|
+
name: "color",
|
|
414
|
+
group: "appearance",
|
|
415
|
+
kind: "enum",
|
|
416
|
+
values: "hues",
|
|
417
|
+
description: "The box's colour: its fill and border, in that hue."
|
|
418
|
+
},
|
|
419
|
+
{
|
|
420
|
+
name: "kind",
|
|
421
|
+
group: "appearance",
|
|
422
|
+
kind: "string",
|
|
423
|
+
description: "A word for what sort of node it is, for a page's own style: its box is also part `kind-<word>`, so `::part(kind-call)` reaches every node of that kind."
|
|
424
|
+
},
|
|
425
|
+
{
|
|
426
|
+
name: "folded",
|
|
427
|
+
group: "behaviour",
|
|
428
|
+
kind: "boolean",
|
|
429
|
+
description: "Starts folded: the nodes under it don't show. A `foldable` diagram can open it again."
|
|
430
|
+
}
|
|
431
|
+
],
|
|
432
|
+
events: [],
|
|
433
|
+
slots: [{
|
|
434
|
+
name: "",
|
|
435
|
+
description: "What shows in its box, besides its label; and the `<ui-tree-node>`s under it."
|
|
436
|
+
}],
|
|
437
|
+
parts: [{
|
|
438
|
+
name: "content",
|
|
439
|
+
description: "The box around what it holds, placed over the node's box in the drawing."
|
|
440
|
+
}],
|
|
441
|
+
states: [],
|
|
442
|
+
texts: []
|
|
443
|
+
}, se = "@layer ui.components.tree-node.types{:host{display:contents}.ui.tree.node{width:max-content;transform:translate(-50%, -50%) scale(var(--_ui-tree-diagram-scale,1));visibility:hidden;position:absolute;&.placed{visibility:visible}}}@layer ui.components.tree-node.content,ui.components.tree-node.variations,ui.components.tree-node.states;", ce = /* @__PURE__ */ F("<div><slot>"), le = /* @__PURE__ */ F("<slot>"), ue, de, fe, pe, me, he, R, z, B, V = "ui-tree-node-resized", H = class _UITreeNode extends (R = o, he = [f], me = [p], pe = [m], fe = [g({ childList: !0 })], de = [d("children", "isReady")], ue = [d("isConnected", "isReady")], R) {
|
|
444
|
+
constructor() {
|
|
445
|
+
super(...arguments), s(z, 5, this), c(this, B, s(z, 8, this)), s(z, 11, this), n(this, "contentBox"), n(this, "contentSlot"), n(this, "nodesSlot");
|
|
446
|
+
}
|
|
447
|
+
get children() {
|
|
448
|
+
return [...this.domElement.childNodes];
|
|
449
|
+
}
|
|
450
|
+
get nodeChildren() {
|
|
451
|
+
return this.children.filter((e) => _UITreeNode.isNode(e));
|
|
452
|
+
}
|
|
453
|
+
get contentChildren() {
|
|
454
|
+
return _UITreeNode.contentOf(this.domElement);
|
|
455
|
+
}
|
|
456
|
+
get contentSize() {
|
|
457
|
+
let e = this.contentBox;
|
|
458
|
+
if (e && this.contentChildren.length && e.offsetWidth) return {
|
|
459
|
+
width: e.offsetWidth,
|
|
460
|
+
height: e.offsetHeight
|
|
461
|
+
};
|
|
462
|
+
}
|
|
463
|
+
onChildrenChanged(e, t) {
|
|
464
|
+
t && (this.contentSlot?.assign(...this.contentChildren), this.nodesSlot?.assign(...this.nodeChildren), this.domElement.dispatchEvent(new Event(V, { bubbles: !0 })));
|
|
465
|
+
}
|
|
466
|
+
watchContentSize(e, t) {
|
|
467
|
+
let n = this.contentBox;
|
|
468
|
+
if (!e || !t || !n) return;
|
|
469
|
+
let r = new ResizeObserver(() => {
|
|
470
|
+
this.domElement.dispatchEvent(new Event(V, { bubbles: !0 }));
|
|
471
|
+
});
|
|
472
|
+
return r.observe(n), () => r.disconnect();
|
|
473
|
+
}
|
|
474
|
+
render() {
|
|
475
|
+
let e = this;
|
|
476
|
+
return [(() => {
|
|
477
|
+
var t = ce(), n = t.firstChild;
|
|
478
|
+
return M(() => (t) => e.contentBox = t, t), M(() => (t) => e.contentSlot = t, n), n._$owner = O(), D(() => ({
|
|
479
|
+
e: j([e.rootClass, { [ge]: !!e.placement }]),
|
|
480
|
+
t: e.partForName("content"),
|
|
481
|
+
a: j(e.placementStyle())
|
|
482
|
+
}), ({ e, t: n, a: r }, i) => {
|
|
483
|
+
w(t, e, i?.e), n !== i?.t && N(t, "part", n), P(t, r, i?.a);
|
|
484
|
+
}), t;
|
|
485
|
+
})(), (() => {
|
|
486
|
+
var t = le();
|
|
487
|
+
return M(() => (t) => e.nodesSlot = t, t), t._$owner = O(), t;
|
|
488
|
+
})()];
|
|
489
|
+
}
|
|
490
|
+
placementStyle() {
|
|
491
|
+
let e = this.placement;
|
|
492
|
+
return e && {
|
|
493
|
+
left: `${e.left}%`,
|
|
494
|
+
top: `${e.top}%`
|
|
495
|
+
};
|
|
496
|
+
}
|
|
497
|
+
static isNode(e) {
|
|
498
|
+
if (e.nodeType !== W) return !1;
|
|
499
|
+
let t = e.localName;
|
|
500
|
+
return t === oe.tag || "vocabulary" in a && a.vocabulary.canonicalTagFor(t) === oe.tag;
|
|
501
|
+
}
|
|
502
|
+
static firstNodeOf(e) {
|
|
503
|
+
return [...e.children].find((e) => _UITreeNode.isNode(e));
|
|
504
|
+
}
|
|
505
|
+
static nodeFrom(t) {
|
|
506
|
+
let n = /* @__PURE__ */ e((e) => {
|
|
507
|
+
let n = _UITreeNode.value(t, e);
|
|
508
|
+
return typeof n == "string" && n ? n : void 0;
|
|
509
|
+
}, "value"), r = [...t.children].filter((e) => _UITreeNode.isNode(e)).map(_UITreeNode.nodeFrom), i = n("color"), a = n("kind"), o = n("detail"), s = n("edge-label"), c = n("hover-text");
|
|
510
|
+
return {
|
|
511
|
+
label: n("label") ?? _UITreeNode.textOf(t),
|
|
512
|
+
element: t,
|
|
513
|
+
...o && { detail: o },
|
|
514
|
+
...s && { edgeLabel: s },
|
|
515
|
+
...c && { title: c },
|
|
516
|
+
...i && { color: i },
|
|
517
|
+
...a && { kind: a },
|
|
518
|
+
..._UITreeNode.isFolded(t) && { folded: !0 },
|
|
519
|
+
...r.length && { children: r }
|
|
520
|
+
};
|
|
521
|
+
}
|
|
522
|
+
static contentOf(e) {
|
|
523
|
+
let t = [...e.childNodes].filter((e) => !_UITreeNode.isNode(e) && (e.nodeType === W || e.nodeType === _e && !!e.textContent?.trim()));
|
|
524
|
+
return t.some((e) => e.nodeType === W) ? t : [];
|
|
525
|
+
}
|
|
526
|
+
static textOf(e) {
|
|
527
|
+
if (_UITreeNode.contentOf(e).length) return "";
|
|
528
|
+
let t = "";
|
|
529
|
+
for (let n of e.childNodes) n.nodeType === _e && (t += n.textContent);
|
|
530
|
+
return t.trim().replace(/\s+/g, " ");
|
|
531
|
+
}
|
|
532
|
+
static isFolded(e) {
|
|
533
|
+
let t = _UITreeNode.value(e, "folded");
|
|
534
|
+
return t === !0 || t === "" || t === "true";
|
|
535
|
+
}
|
|
536
|
+
static value(e, t) {
|
|
537
|
+
try {
|
|
538
|
+
let n = e.valueNamed?.(t);
|
|
539
|
+
if (n !== void 0) return n;
|
|
540
|
+
} catch {}
|
|
541
|
+
return e.getAttribute(t) ?? void 0;
|
|
542
|
+
}
|
|
543
|
+
};
|
|
544
|
+
z = v(R), B = /* @__PURE__ */ new WeakMap(), r(z, 4, "placement", pe, H, B), r(z, 2, "children", fe, H), r(z, 1, "onChildrenChanged", de, H), r(z, 1, "watchContentSize", ue, H), r(z, 13, "vocabulary", he, H), r(z, 13, "elementSetup", me, H), i(z, H), e(H, "UITreeNode"), n(H, "vocabulary", s(z, 12, H, oe)), s(z, 15, H), n(H, "elementSetup", s(z, 16, H, {
|
|
545
|
+
styleSheets: { "tree-node": se },
|
|
546
|
+
delegatesFocus: !1,
|
|
547
|
+
slotAssignment: "manual"
|
|
548
|
+
})), s(z, 19, H);
|
|
549
|
+
var U = H, ge = "placed", W = 1, _e = 3, ve = "@layer ui.components.tree-diagram.types{:host{max-width:100%;display:block;overflow-x:auto}.canvas{width:fit-content;min-width:min-content;max-width:100%;position:relative}.font-sentinel{visibility:hidden;pointer-events:none;font-family:var(--_ui-tree-diagram-font-family);font-size:14px;line-height:1;position:absolute;top:0;left:0}.font-sentinel,.ui.tree.diagram,.ui.tree.diagram :is(.node,.edge,.edge-label){--_ui-tree-diagram-font-family:var(--ui-tree-diagram-font-family,var(--ui-font-family));--_ui-tree-diagram-font-size:var(--ui-tree-diagram-font-size,.8125em);--_ui-tree-diagram-edge-label-font-family:var(--ui-tree-diagram-edge-label-font-family,var(--ui-font-family));--_ui-tree-diagram-min-scale:var(--ui-tree-diagram-min-scale,.75);--_ui-tree-diagram-radius:var(--ui-tree-diagram-radius,var(--ui-radius-m));--_ui-tree-diagram-node-background:var(--ui-tree-diagram-node-background,var(--ui-surface-muted));--_ui-tree-diagram-node-border-color:var(--ui-tree-diagram-node-border-color,var(--ui-border-color-strong));--_ui-tree-diagram-root-background:var(--ui-tree-diagram-root-background,var(--ui-primary-background));--_ui-tree-diagram-root-border-color:var(--ui-tree-diagram-root-border-color,var(--ui-primary));--_ui-tree-diagram-label-color:var(--ui-tree-diagram-label-color,var(--ui-text-color));--_ui-tree-diagram-detail-color:var(--ui-tree-diagram-detail-color,var(--ui-text-muted));--_ui-tree-diagram-edge-color:var(--ui-tree-diagram-edge-color,var(--ui-text-light));--_ui-tree-diagram-edge-label-color:var(--ui-tree-diagram-edge-label-color,var(--ui-text-muted));--_ui-tree-diagram-focus-color:var(--ui-tree-diagram-focus-color,var(--ui-primary))}svg.ui.tree.diagram{font-family:var(--_ui-tree-diagram-font-family);font-size:var(--_ui-tree-diagram-font-size);width:calc(var(--_ui-tree-diagram-natural-width,0) * 1em);min-width:calc(var(--_ui-tree-diagram-natural-width,0) * var(--_ui-tree-diagram-min-scale) * 1em);max-width:100%;height:auto;display:block;overflow:visible}}@layer ui.components.tree-diagram.content{.ui.tree.diagram{& .box{fill:var(--_ui-tree-diagram-node-background);stroke:var(--_ui-tree-diagram-node-border-color);stroke-width:1px;rx:var(--_ui-tree-diagram-radius)}& .root .box{fill:var(--_ui-tree-diagram-root-background);stroke:var(--_ui-tree-diagram-root-border-color);stroke-width:2px}& :is(.label,.detail,.edge-label){text-anchor:middle;dominant-baseline:central}& .label{fill:var(--_ui-tree-diagram-label-color)}& .root .label{font-weight:var(--ui-font-weight-semibold)}& .detail{fill:var(--_ui-tree-diagram-detail-color)}& .edge{fill:none;stroke:var(--_ui-tree-diagram-edge-color);stroke-width:1.5px;stroke-linecap:round}& .edge-label{fill:var(--_ui-tree-diagram-edge-label-color);font-family:var(--_ui-tree-diagram-edge-label-font-family);font-style:italic}& .label,& .detail{font-family:var(--_ui-tree-diagram-font-family)}& .toggle{cursor:var(--ui-control-cursor,pointer)}& .toggle-target{fill:#0000}& .toggle-circle{fill:var(--_ui-tree-diagram-edge-color)}& .toggle-mark{fill:none;stroke:var(--ui-text-inverted-color);stroke-width:1.5px;stroke-linecap:round}& .clickable{cursor:var(--ui-control-cursor,pointer)}& .clickable:hover .box{stroke:var(--_ui-tree-diagram-focus-color)}& :is(.clickable,.toggle):focus{outline:none}& .clickable:focus-visible .box,& .toggle:focus-visible .toggle-circle{stroke:var(--_ui-tree-diagram-focus-color);stroke-width:2.5px}& .toggle:hover .toggle-circle{fill:var(--_ui-tree-diagram-focus-color)}}}@layer ui.components.tree-diagram.variations;@layer ui.components.tree-diagram.states{.ui.tree.diagram.empty{display:none}}", ye = /* @__PURE__ */ F("<div><svg><!><!><!></svg><span aria-hidden=true>Mg</span><slot>"), be = /* @__PURE__ */ F("<svg><defs><g><text></text></g><g><text></text><text></text></g><text></svg>", 2), G = /* @__PURE__ */ F("<svg><text></svg>", 2), xe = /* @__PURE__ */ F("<svg><g><rect></rect><!><!><!></svg>", 2), Se = /* @__PURE__ */ F("<title>"), Ce = /* @__PURE__ */ F("<svg><g role=button tabindex=0><title></title><circle></circle><circle></circle><path></svg>", 2), we = /* @__PURE__ */ F("<svg><path></svg>", 2), Te, Ee, De, Oe, ke, Ae, je, Me, Ne, Pe, Fe, Ie, Le, Re, ze, Be, Ve, He, Ue, We, Ge, K, q, J, Y, X, Z, Q = class _UITreeDiagram extends (K = o, Ge = [f], We = [p], Ue = [g({
|
|
550
|
+
childList: !0,
|
|
551
|
+
characterData: !0,
|
|
552
|
+
subtree: !0
|
|
553
|
+
})], He = [m], Ve = [u(b)], Be = [l], ze = [g({
|
|
274
554
|
childList: !0,
|
|
275
555
|
characterData: !0,
|
|
556
|
+
attributes: !0,
|
|
276
557
|
subtree: !0
|
|
277
|
-
})],
|
|
558
|
+
})], Re = [l], Le = [l], Ie = [m], Fe = [m], Pe = [u(V)], Ne = [_], Me = [l], je = [m], Ae = [l], ke = [h], Oe = [l], De = [d("layout", "nodesTree", "isReady")], Ee = [u("click")], Te = [h], K) {
|
|
278
559
|
constructor() {
|
|
279
|
-
super(...arguments),
|
|
560
|
+
super(...arguments), s(q, 5, this), c(this, J, s(q, 8, this, 0)), s(q, 11, this), n(this, "warnedText"), n(this, "samples", {}), n(this, "svg"), n(this, "fontSentinel"), n(this, "nodesSlot"), c(this, Y, s(q, 12, this, 0)), s(q, 15, this), c(this, X, s(q, 16, this, 1)), s(q, 19, this), n(this, "lastSentinelWidth"), c(this, Z, s(q, 20, this, /* @__PURE__ */ new Map())), s(q, 23, this);
|
|
561
|
+
}
|
|
562
|
+
get childText() {
|
|
563
|
+
return A ? void 0 : y.textOf(this.domElement);
|
|
564
|
+
}
|
|
565
|
+
onChildDataChanged() {
|
|
566
|
+
this.childDataVersion++;
|
|
567
|
+
}
|
|
568
|
+
get childTree() {
|
|
569
|
+
let e = this.childText;
|
|
570
|
+
if (this.childDataVersion, !(e === void 0 || A)) return this.readChild(e);
|
|
280
571
|
}
|
|
281
|
-
get
|
|
282
|
-
|
|
572
|
+
get nodesText() {
|
|
573
|
+
let e = U.firstNodeOf(this.domElement);
|
|
574
|
+
return e && JSON.stringify(U.nodeFrom(e), (e, t) => e === "element" ? void 0 : t);
|
|
283
575
|
}
|
|
284
|
-
get
|
|
285
|
-
|
|
576
|
+
get nodesTree() {
|
|
577
|
+
if (this.nodesText === void 0) return;
|
|
578
|
+
let e = U.firstNodeOf(this.domElement);
|
|
579
|
+
return e && U.nodeFrom(e);
|
|
286
580
|
}
|
|
287
581
|
get drawnTree() {
|
|
288
|
-
return
|
|
582
|
+
return I.node(this.tree) ?? this.nodesTree ?? this.childTree;
|
|
583
|
+
}
|
|
584
|
+
readChild(e) {
|
|
585
|
+
try {
|
|
586
|
+
return I.node(y.valueOf(this.domElement));
|
|
587
|
+
} catch (t) {
|
|
588
|
+
e !== this.warnedText && console.warn(`<${this.domElement.localName}>: invalid JSON in its script child`, t), this.warnedText = e;
|
|
589
|
+
return;
|
|
590
|
+
}
|
|
591
|
+
}
|
|
592
|
+
onNodeResized() {
|
|
593
|
+
this.measureVersion++;
|
|
594
|
+
}
|
|
595
|
+
watchFontsAndSize() {
|
|
596
|
+
this.measureVersion++;
|
|
597
|
+
let t = /* @__PURE__ */ e(() => this.measureVersion++, "remeasure");
|
|
598
|
+
document.fonts?.addEventListener("loadingdone", t);
|
|
599
|
+
let n = new ResizeObserver(() => this.onDrawingResized());
|
|
600
|
+
return this.fontSentinel && n.observe(this.fontSentinel), this.svg && n.observe(this.svg), () => {
|
|
601
|
+
document.fonts?.removeEventListener("loadingdone", t), n.disconnect();
|
|
602
|
+
};
|
|
603
|
+
}
|
|
604
|
+
onDrawingResized() {
|
|
605
|
+
let e = this.fontSentinel?.offsetWidth;
|
|
606
|
+
e !== this.lastSentinelWidth && (this.lastSentinelWidth = e, this.measureVersion++), this.drawnScale = this.scaleNow();
|
|
607
|
+
}
|
|
608
|
+
scaleNow() {
|
|
609
|
+
let { svg: e, layout: t } = this, n = e?.getBoundingClientRect().width;
|
|
610
|
+
return !e || !n || !t ? 1 : n / (t.width * this.pixelsPerUnit() || n);
|
|
611
|
+
}
|
|
612
|
+
pixelsPerUnit() {
|
|
613
|
+
return Number.parseFloat(getComputedStyle(this.svg).fontSize) / L.fontSize;
|
|
614
|
+
}
|
|
615
|
+
get sizes() {
|
|
616
|
+
let e = this.drawnTree;
|
|
617
|
+
this.measureVersion;
|
|
618
|
+
let { rootLabel: t, label: n, detail: r, edgeLabel: i } = this.samples;
|
|
619
|
+
if (!A && e && this.svg && t && n && r && i) return x.sizes(e, {
|
|
620
|
+
rootLabel: t,
|
|
621
|
+
label: n,
|
|
622
|
+
detail: r,
|
|
623
|
+
edgeLabel: i
|
|
624
|
+
}, (e) => this.contentSizeOf(e));
|
|
625
|
+
}
|
|
626
|
+
contentSizeOf(e) {
|
|
627
|
+
let t = e.element?.component?.contentSize;
|
|
628
|
+
if (!t) return;
|
|
629
|
+
let n = 1 / this.pixelsPerUnit();
|
|
630
|
+
return {
|
|
631
|
+
width: t.width * n,
|
|
632
|
+
height: t.height * n
|
|
633
|
+
};
|
|
634
|
+
}
|
|
635
|
+
get foldedNodes() {
|
|
636
|
+
let t = /* @__PURE__ */ new Set(), { drawnTree: n, foldChanges: r } = this, i = /* @__PURE__ */ e((e, n) => {
|
|
637
|
+
(r.get(n) ?? e.folded) && t.add(e), e.children?.forEach((e, t) => i(e, `${n}.${t}`));
|
|
638
|
+
}, "visit");
|
|
639
|
+
return n && i(n, "0"), t;
|
|
640
|
+
}
|
|
641
|
+
toggle(e, t) {
|
|
642
|
+
let n = !e.isFolded;
|
|
643
|
+
this.foldChanges = new Map(this.foldChanges).set(e.path, n), this.send("ui-node-toggled", {
|
|
644
|
+
node: e.node,
|
|
645
|
+
path: e.path,
|
|
646
|
+
folded: n,
|
|
647
|
+
originalEvent: t
|
|
648
|
+
});
|
|
289
649
|
}
|
|
290
650
|
get layout() {
|
|
291
651
|
let e = this.drawnTree;
|
|
292
|
-
|
|
652
|
+
if (e) return ne.of(e, {
|
|
653
|
+
direction: this.direction,
|
|
654
|
+
sizes: this.sizes,
|
|
655
|
+
folded: this.foldedNodes,
|
|
656
|
+
metrics: this.foldable ? dt : L
|
|
657
|
+
});
|
|
658
|
+
}
|
|
659
|
+
onLayoutChanged(t, n, r) {
|
|
660
|
+
if (!r) return;
|
|
661
|
+
this.nodesSlot?.assign(...n?.element ? [n.element] : []), this.drawnScale = this.scaleNow();
|
|
662
|
+
let i = new Map(t?.boxes.map((e) => [e.node.element, e])), a = /* @__PURE__ */ e((e) => {
|
|
663
|
+
let n = e.element?.component, r = i.get(e.element)?.content;
|
|
664
|
+
n && (n.placement = r && t ? {
|
|
665
|
+
left: r.x / t.width * 100,
|
|
666
|
+
top: r.y / t.height * 100
|
|
667
|
+
} : void 0), e.children?.forEach(a);
|
|
668
|
+
}, "place");
|
|
669
|
+
n && a(n);
|
|
670
|
+
}
|
|
671
|
+
onContentClick(e) {
|
|
672
|
+
let t = e.composedPath().find((e) => e !== this.domElement && U.isNode(e));
|
|
673
|
+
if (!t) return;
|
|
674
|
+
let n = this.layout?.boxes.find((e) => e.node.element === t);
|
|
675
|
+
n && this.sendClick(n, e);
|
|
676
|
+
}
|
|
677
|
+
sendClick(e, t) {
|
|
678
|
+
this.send("ui-node-clicked", {
|
|
679
|
+
node: e.node,
|
|
680
|
+
path: e.path,
|
|
681
|
+
originalEvent: t
|
|
682
|
+
});
|
|
683
|
+
}
|
|
684
|
+
onButtonKey(e, n) {
|
|
685
|
+
(e.key === t.enter || e.key === t.space) && (e.preventDefault(), e.stopPropagation(), n(e));
|
|
293
686
|
}
|
|
294
687
|
get extraClass() {
|
|
295
|
-
return
|
|
688
|
+
return I.node(this.tree) || this.nodesTree || this.childTree ? void 0 : qe;
|
|
296
689
|
}
|
|
297
690
|
render() {
|
|
298
691
|
let e = this;
|
|
299
|
-
var t =
|
|
300
|
-
return
|
|
692
|
+
var t = ye(), n = t.firstChild, r = n.firstChild, i = r.nextSibling, a = i.nextSibling, o = n.nextSibling, s = o.nextSibling;
|
|
693
|
+
return M(() => (t) => e.svg = t, n), k(n, () => e.fontSamples(), r), k(n, T(S, {
|
|
301
694
|
get each() {
|
|
302
695
|
return e.layout?.edges ?? [];
|
|
303
696
|
},
|
|
304
697
|
keyed: !1,
|
|
305
698
|
children: (t) => e.edge(t)
|
|
306
|
-
}),
|
|
699
|
+
}), i), k(n, T(S, {
|
|
307
700
|
get each() {
|
|
308
701
|
return e.layout?.boxes ?? [];
|
|
309
702
|
},
|
|
310
703
|
keyed: !1,
|
|
311
704
|
children: (t) => e.box(t)
|
|
312
|
-
}),
|
|
313
|
-
e:
|
|
314
|
-
t: e.
|
|
315
|
-
a: e.
|
|
316
|
-
o: e.
|
|
317
|
-
i: e.
|
|
318
|
-
n:
|
|
319
|
-
|
|
320
|
-
|
|
705
|
+
}), a), M(() => (t) => e.fontSentinel = t, o), M(() => (t) => e.nodesSlot = t, s), s._$owner = O(), D(() => ({
|
|
706
|
+
e: j(Je),
|
|
707
|
+
t: j(e.canvasStyle()),
|
|
708
|
+
a: j(e.rootClass),
|
|
709
|
+
o: e.partForName("diagram"),
|
|
710
|
+
i: e.layout ? e.foldable || e.clickable ? "group" : "img" : void 0,
|
|
711
|
+
n: e.summary(),
|
|
712
|
+
s: e.viewBox(),
|
|
713
|
+
h: j(e.sizeStyle()),
|
|
714
|
+
r: j(Ye)
|
|
715
|
+
}), ({ e, t: r, a: i, o: a, i: s, n: c, s: l, h: u, r: d }, f) => {
|
|
716
|
+
w(t, e, f?.e), P(t, r, f?.t), w(n, i, f?.a), a !== f?.o && N(n, "part", a), s !== f?.i && N(n, "role", s), c !== f?.n && N(n, "aria-label", c), l !== f?.s && N(n, "viewBox", l), P(n, u, f?.h), w(o, d, f?.r);
|
|
321
717
|
}), t;
|
|
322
718
|
}
|
|
323
|
-
|
|
324
|
-
let { fontSize:
|
|
325
|
-
var
|
|
326
|
-
return
|
|
719
|
+
fontSamples() {
|
|
720
|
+
let { fontSize: e, detailFontSize: t, edgeLabelFontSize: n } = L, r = this;
|
|
721
|
+
var i = be(), a = i.firstChild, o = a.firstChild, s = a.nextSibling, c = s.firstChild, l = c.nextSibling, u = s.nextSibling;
|
|
722
|
+
return M(() => (e) => r.samples.rootLabel = e, o), M(() => (e) => r.samples.label = e, c), M(() => (e) => r.samples.detail = e, l), M(() => (e) => r.samples.edgeLabel = e, u), D(() => ({
|
|
723
|
+
e: j([Xe, Ze]),
|
|
724
|
+
t: j($),
|
|
725
|
+
a: String(e),
|
|
726
|
+
o: j(Xe),
|
|
727
|
+
i: j($),
|
|
728
|
+
n: String(e),
|
|
729
|
+
s: j(et),
|
|
730
|
+
h: String(t),
|
|
731
|
+
r: j(nt),
|
|
732
|
+
d: String(n)
|
|
733
|
+
}), ({ e, t, a: n, o: r, i, n: d, s: f, h: p, r: m, d: h }, g) => {
|
|
734
|
+
w(a, e, g?.e), w(o, t, g?.t), n !== g?.a && N(o, "font-size", n), w(s, r, g?.o), w(c, i, g?.i), d !== g?.n && N(c, "font-size", d), w(l, f, g?.s), p !== g?.h && N(l, "font-size", p), w(u, m, g?.r), h !== g?.d && N(u, "font-size", h);
|
|
735
|
+
}), i;
|
|
736
|
+
}
|
|
737
|
+
box(t) {
|
|
738
|
+
let { fontSize: n, detailFontSize: r } = L, i = /* @__PURE__ */ e(() => t().depth === 0, "isRoot"), a = /* @__PURE__ */ e(() => _UITreeDiagram.wordFor(t().node.kind), "kind"), o = this;
|
|
739
|
+
var s = xe(), c = s.firstChild, l = c.nextSibling, u = l.nextSibling, d = u.nextSibling;
|
|
740
|
+
return s._$$keydown = (e) => {
|
|
741
|
+
o.clickable && e.target === e.currentTarget && o.onButtonKey(e, (e) => o.sendClick(t(), e));
|
|
742
|
+
}, s._$$click = (e) => o.sendClick(t(), e), k(s, T(C, {
|
|
327
743
|
get when() {
|
|
328
|
-
return
|
|
744
|
+
return t().node.title;
|
|
329
745
|
},
|
|
330
746
|
children: (e) => (() => {
|
|
331
|
-
var t =
|
|
332
|
-
return
|
|
747
|
+
var t = Se();
|
|
748
|
+
return k(t, e), t;
|
|
333
749
|
})()
|
|
334
|
-
}),
|
|
750
|
+
}), c), k(s, T(C, {
|
|
335
751
|
get when() {
|
|
336
|
-
return
|
|
752
|
+
return t().node.label;
|
|
337
753
|
},
|
|
338
|
-
children
|
|
339
|
-
var
|
|
340
|
-
return
|
|
341
|
-
e:
|
|
342
|
-
t: t().x,
|
|
343
|
-
a: t().y,
|
|
754
|
+
get children() {
|
|
755
|
+
var e = G();
|
|
756
|
+
return k(e, () => t().node.label), D(() => ({
|
|
757
|
+
e: j($),
|
|
758
|
+
t: t().label.x,
|
|
759
|
+
a: t().label.y,
|
|
344
760
|
o: String(n)
|
|
345
|
-
}), ({ e, t, a:
|
|
346
|
-
|
|
347
|
-
}),
|
|
761
|
+
}), ({ e: t, t: n, a: r, o: i }, a) => {
|
|
762
|
+
w(e, t, a?.e), n !== a?.t && N(e, "x", n), r !== a?.a && N(e, "y", r), i !== a?.o && N(e, "font-size", i);
|
|
763
|
+
}), e;
|
|
764
|
+
}
|
|
765
|
+
}), l), k(s, T(C, {
|
|
766
|
+
get when() {
|
|
767
|
+
return t().detail;
|
|
768
|
+
},
|
|
769
|
+
children: (e) => (() => {
|
|
770
|
+
var n = G();
|
|
771
|
+
return k(n, () => t().node.detail), D(() => ({
|
|
772
|
+
e: j(et),
|
|
773
|
+
t: e().x,
|
|
774
|
+
a: e().y,
|
|
775
|
+
o: String(r)
|
|
776
|
+
}), ({ e, t, a: r, o: i }, a) => {
|
|
777
|
+
w(n, e, a?.e), t !== a?.t && N(n, "x", t), r !== a?.a && N(n, "y", r), i !== a?.o && N(n, "font-size", i);
|
|
778
|
+
}), n;
|
|
348
779
|
})()
|
|
349
|
-
}),
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
780
|
+
}), u), k(s, T(C, {
|
|
781
|
+
get when() {
|
|
782
|
+
return ee(() => !!o.foldable)() ? t().childCount : o.foldable;
|
|
783
|
+
},
|
|
784
|
+
get children() {
|
|
785
|
+
return o.foldButton(t);
|
|
786
|
+
}
|
|
787
|
+
}), d), D(() => ({
|
|
788
|
+
e: j([
|
|
789
|
+
Xe,
|
|
790
|
+
{
|
|
791
|
+
[Ze]: i(),
|
|
792
|
+
[Qe]: !!o.clickable
|
|
793
|
+
},
|
|
794
|
+
a() && `kind-${a()}`
|
|
795
|
+
]),
|
|
796
|
+
t: [
|
|
797
|
+
o.partForName("node"),
|
|
798
|
+
i() && o.partForName("root-node"),
|
|
799
|
+
a() && `kind-${a()}`
|
|
800
|
+
].filter(Boolean).join(" "),
|
|
801
|
+
a: j(_UITreeDiagram.colorStyle(t().node.color)),
|
|
802
|
+
o: o.clickable ? "button" : void 0,
|
|
803
|
+
i: o.clickable ? "0" : void 0,
|
|
804
|
+
n: o.clickable ? t().node.label : void 0,
|
|
805
|
+
s: j($e),
|
|
806
|
+
h: t().x,
|
|
807
|
+
r: t().y,
|
|
808
|
+
d: t().width,
|
|
809
|
+
l: t().height
|
|
810
|
+
}), ({ e, t, a: n, o: r, i, n: a, s: o, h: l, r: u, d, l: f }, p) => {
|
|
811
|
+
w(s, e, p?.e), t !== p?.t && N(s, "part", t), P(s, n, p?.a), r !== p?.o && N(s, "role", r), i !== p?.i && N(s, "tabindex", i), a !== p?.n && N(s, "aria-label", a), w(c, o, p?.s), l !== p?.h && N(c, "x", l), u !== p?.r && N(c, "y", u), d !== p?.d && N(c, "width", d), f !== p?.l && N(c, "height", f);
|
|
812
|
+
}), s;
|
|
813
|
+
}
|
|
814
|
+
foldButton(t) {
|
|
815
|
+
let n = /* @__PURE__ */ e(() => this.translationForKey(t().isFolded ? "unfoldNode" : "foldNode", { label: t().node.label }), "label"), r = this;
|
|
816
|
+
var i = Ce(), a = i.firstChild, o = a.nextSibling, s = o.nextSibling, c = s.nextSibling;
|
|
817
|
+
return i._$$keydown = (e) => r.onButtonKey(e, (e) => r.toggle(t(), e)), i._$$click = (e) => {
|
|
818
|
+
e.stopPropagation(), r.toggle(t(), e);
|
|
819
|
+
}, k(a, n), N(o, "r", ct), N(s, "r", st), D(() => ({
|
|
820
|
+
e: j(rt),
|
|
821
|
+
t: r.partForName("toggle"),
|
|
822
|
+
a: t().isFolded ? "false" : "true",
|
|
823
|
+
o: n(),
|
|
824
|
+
i: `translate(${t().exit.x} ${t().exit.y})`,
|
|
825
|
+
n: j(it),
|
|
826
|
+
s: j(at),
|
|
827
|
+
h: j(ot),
|
|
828
|
+
r: t().isFolded ? lt : ut
|
|
829
|
+
}), ({ e, t, a: n, o: r, i: a, n: l, s: u, h: d, r: f }, p) => {
|
|
830
|
+
w(i, e, p?.e), t !== p?.t && N(i, "part", t), n !== p?.a && N(i, "aria-expanded", n), r !== p?.o && N(i, "aria-label", r), a !== p?.i && N(i, "transform", a), w(o, l, p?.n), w(s, u, p?.s), w(c, d, p?.h), f !== p?.r && N(c, "d", f);
|
|
831
|
+
}), i;
|
|
364
832
|
}
|
|
365
833
|
edge(e) {
|
|
366
834
|
let t = this;
|
|
367
835
|
return [(() => {
|
|
368
|
-
var n =
|
|
369
|
-
return
|
|
370
|
-
e:
|
|
836
|
+
var n = we();
|
|
837
|
+
return D(() => ({
|
|
838
|
+
e: j(tt),
|
|
371
839
|
t: t.partForName("edge"),
|
|
372
840
|
a: _UITreeDiagram.path(e())
|
|
373
841
|
}), ({ e, t, a: r }, i) => {
|
|
374
|
-
|
|
842
|
+
w(n, e, i?.e), t !== i?.t && N(n, "part", t), r !== i?.a && N(n, "d", r);
|
|
375
843
|
}), n;
|
|
376
|
-
})(),
|
|
844
|
+
})(), T(C, {
|
|
377
845
|
get when() {
|
|
378
|
-
return e().
|
|
846
|
+
return e().label;
|
|
379
847
|
},
|
|
380
848
|
children: (e) => (() => {
|
|
381
|
-
var n =
|
|
382
|
-
return
|
|
383
|
-
e:
|
|
384
|
-
t: t.partForName("
|
|
849
|
+
var n = G();
|
|
850
|
+
return k(n, () => e().text), D(() => ({
|
|
851
|
+
e: j(nt),
|
|
852
|
+
t: t.partForName("edge-label"),
|
|
385
853
|
a: e().x,
|
|
386
854
|
o: e().y,
|
|
387
|
-
i: String(
|
|
855
|
+
i: String(L.edgeLabelFontSize)
|
|
388
856
|
}), ({ e, t, a: r, o: i, i: a }, o) => {
|
|
389
|
-
|
|
857
|
+
w(n, e, o?.e), t !== o?.t && N(n, "part", t), r !== o?.a && N(n, "x", r), i !== o?.o && N(n, "y", i), a !== o?.i && N(n, "font-size", a);
|
|
390
858
|
}), n;
|
|
391
859
|
})()
|
|
392
860
|
})];
|
|
@@ -397,33 +865,44 @@ var S = class TreeData {
|
|
|
397
865
|
}
|
|
398
866
|
sizeStyle() {
|
|
399
867
|
let e = this.layout;
|
|
400
|
-
return e && { [
|
|
868
|
+
return e && { [ft]: (e.width / L.fontSize).toFixed(3) };
|
|
869
|
+
}
|
|
870
|
+
canvasStyle() {
|
|
871
|
+
return { [pt]: this.drawnScale.toFixed(4) };
|
|
401
872
|
}
|
|
402
873
|
summary() {
|
|
403
874
|
let e = this.drawnTree;
|
|
404
|
-
if (e) return
|
|
405
|
-
}
|
|
406
|
-
parseScript(e) {
|
|
407
|
-
try {
|
|
408
|
-
return S.parse(e);
|
|
409
|
-
} catch (t) {
|
|
410
|
-
e !== this.warnedText && console.warn(`<${this.domElement.localName}>: invalid JSON in its script child`, t), this.warnedText = e;
|
|
411
|
-
return;
|
|
412
|
-
}
|
|
875
|
+
if (e) return I.summary(e, (e, t) => this.translationForKey(e, t));
|
|
413
876
|
}
|
|
414
877
|
static path({ from: e, to: t, gap: n }) {
|
|
415
878
|
return n ? `M${e.x} ${e.y}L${n.from.x} ${n.from.y}M${n.to.x} ${n.to.y}L${t.x} ${t.y}` : `M${e.x} ${e.y}L${t.x} ${t.y}`;
|
|
416
879
|
}
|
|
880
|
+
static wordFor(e) {
|
|
881
|
+
return e && /^[\w-]+$/.test(e) ? e : void 0;
|
|
882
|
+
}
|
|
883
|
+
static colorStyle(e) {
|
|
884
|
+
let t = _UITreeDiagram.wordFor(e);
|
|
885
|
+
if (!t) return;
|
|
886
|
+
let n = `var(--ui-${t}-background)`, r = `var(--ui-${t})`;
|
|
887
|
+
return {
|
|
888
|
+
"--ui-tree-diagram-node-background": n,
|
|
889
|
+
"--ui-tree-diagram-node-border-color": r,
|
|
890
|
+
"--ui-tree-diagram-root-background": n,
|
|
891
|
+
"--ui-tree-diagram-root-border-color": r
|
|
892
|
+
};
|
|
893
|
+
}
|
|
417
894
|
};
|
|
418
|
-
|
|
419
|
-
styleSheets: { "tree-diagram":
|
|
420
|
-
delegatesFocus: !1
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
895
|
+
q = v(K), J = /* @__PURE__ */ new WeakMap(), Y = /* @__PURE__ */ new WeakMap(), X = /* @__PURE__ */ new WeakMap(), Z = /* @__PURE__ */ new WeakMap(), r(q, 2, "childText", Ue, Q), r(q, 4, "childDataVersion", He, Q, J), r(q, 1, "onChildDataChanged", Ve, Q), r(q, 2, "childTree", Be, Q), r(q, 2, "nodesText", ze, Q), r(q, 2, "nodesTree", Re, Q), r(q, 2, "drawnTree", Le, Q), r(q, 4, "measureVersion", Ie, Q, Y), r(q, 4, "drawnScale", Fe, Q, X), r(q, 1, "onNodeResized", Pe, Q), r(q, 1, "watchFontsAndSize", Ne, Q), r(q, 2, "sizes", Me, Q), r(q, 4, "foldChanges", je, Q, Z), r(q, 2, "foldedNodes", Ae, Q), r(q, 1, "toggle", ke, Q), r(q, 2, "layout", Oe, Q), r(q, 1, "onLayoutChanged", De, Q), r(q, 1, "onContentClick", Ee, Q), r(q, 1, "sendClick", Te, Q), r(q, 13, "vocabulary", Ge, Q), r(q, 13, "elementSetup", We, Q), i(q, Q), e(Q, "UITreeDiagram"), n(Q, "vocabulary", s(q, 24, Q, ae)), s(q, 27, Q), n(Q, "elementSetup", s(q, 28, Q, {
|
|
896
|
+
styleSheets: { "tree-diagram": ve },
|
|
897
|
+
delegatesFocus: !1,
|
|
898
|
+
slotAssignment: "manual"
|
|
899
|
+
})), s(q, 31, Q);
|
|
900
|
+
var Ke = Q, qe = "empty", Je = "canvas", Ye = "font-sentinel", Xe = "node", Ze = "root", Qe = "clickable", $e = "box", $ = "label", et = "detail", tt = "edge", nt = "edge-label", rt = "toggle", it = "toggle-target", at = "toggle-circle", ot = "toggle-mark", st = 6, ct = 12, lt = "M-3 0H3M0 -3V3", ut = "M-3 0H3", dt = {
|
|
901
|
+
...L,
|
|
902
|
+
margin: 8
|
|
903
|
+
}, ft = "--_ui-tree-diagram-natural-width", pt = "--_ui-tree-diagram-scale";
|
|
904
|
+
E(["click", "keydown"]), Ke.define(), U.define();
|
|
426
905
|
//#endregion
|
|
427
|
-
export {
|
|
906
|
+
export { I as TreeData, ne as TreeLayout, x as TreeMeasure, Ke as UITreeDiagram, U as UITreeNode };
|
|
428
907
|
|
|
429
908
|
//# sourceMappingURL=ui-tree-diagram.js.map
|