spell-ui 0.8.6 → 0.8.8
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 +13 -3
- 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 +22 -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 +530 -24
- 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 +124 -92
- 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
|
@@ -0,0 +1,1328 @@
|
|
|
1
|
+
import "./rolldown-runtime-CYGlBXrH.js";
|
|
2
|
+
import { Bt as e, DOMElement as t, Ht as r, Lt as i, MoveAndResize as a, Rt as o, UI as s, UIComponent as c, Ut as l, Vt as u, after as d, beforeNextPaint as f, cssState as ee, derived as p, escapeHTML as te, on as m, onChange as h, proto as ne, protoMerged as re, state as g, untracked as ie, watches as ae, whileConnected as oe, zt as se } from "./core.js";
|
|
3
|
+
import { t as ce } from "./PrefStore-Qv0e5y04.js";
|
|
4
|
+
import "./ui-menu.js";
|
|
5
|
+
import { JsonChild as le, t as ue } from "./ui-json.js";
|
|
6
|
+
import { t as de } from "./TreeMeasure-BVJeGb1L.js";
|
|
7
|
+
import { t as fe } from "./Dragging-CMZoLEWQ.js";
|
|
8
|
+
import { For as pe, Match as _, Show as me, Switch as he } from "solid-js";
|
|
9
|
+
import { addEvent as ge, className as v, createComponent as y, delegateEvents as _e, effect as b, getOwner as x, insert as S, isServer as C, readShallow as w, ref as T, setAttribute as E, setStyleProperty as ve, spread as D, style as O, template as k } from "@solidjs/web";
|
|
10
|
+
//#region ../src/util/diagram/DiagramColumns.ts
|
|
11
|
+
var DiagramColumns = class {
|
|
12
|
+
static of(e, t) {
|
|
13
|
+
let r = e.nodes ?? [], i = Math.max(1, Math.floor(t)), a = new Map(r.map((e) => [e.name, []]));
|
|
14
|
+
for (let t of e.edges ?? []) {
|
|
15
|
+
let e = t.from.split(".", 1)[0];
|
|
16
|
+
e !== t.to && a.get(e)?.push(t.to);
|
|
17
|
+
}
|
|
18
|
+
let o = /* @__PURE__ */ new Map(), s = /* @__PURE__ */ new Set(), c = new Map(r.map((e) => [e.name, []]));
|
|
19
|
+
for (let [e, t] of a) for (let r of t) c.get(r)?.push(e);
|
|
20
|
+
let depthOf = (e) => {
|
|
21
|
+
let t = o.get(e);
|
|
22
|
+
if (t !== void 0) return t;
|
|
23
|
+
if (s.has(e)) return 0;
|
|
24
|
+
s.add(e);
|
|
25
|
+
let r = c.get(e) ?? [], i = r.length ? Math.max(...r.map((e) => depthOf(e) + 1)) : 0;
|
|
26
|
+
return s.delete(e), o.set(e, i), i;
|
|
27
|
+
}, l = [];
|
|
28
|
+
for (let e of r) {
|
|
29
|
+
let t = Math.min(depthOf(e.name), i - 1);
|
|
30
|
+
(l[t] ??= []).push(e);
|
|
31
|
+
}
|
|
32
|
+
return l.filter((e) => e?.length).map((e) => ({ groups: [{
|
|
33
|
+
bg: "none",
|
|
34
|
+
nodes: e
|
|
35
|
+
}] }));
|
|
36
|
+
}
|
|
37
|
+
}, A = class DiagramLayout {
|
|
38
|
+
static of(e, t = {}) {
|
|
39
|
+
return new DiagramLayout(e, t).drawing();
|
|
40
|
+
}
|
|
41
|
+
static estimatedWidth(e, t, r = !1) {
|
|
42
|
+
let i = 0;
|
|
43
|
+
for (let t of e) i += ke.get(t) ?? 600;
|
|
44
|
+
return i / 1e3 * t * 1.07 * (r ? 1.06 : 1);
|
|
45
|
+
}
|
|
46
|
+
static tint(e, t) {
|
|
47
|
+
let r = /^#([\da-f]{6})$/i.exec(e)?.[1];
|
|
48
|
+
if (!r) return e;
|
|
49
|
+
let channel = (e) => {
|
|
50
|
+
let i = Number.parseInt(r.slice(e, e + 2), 16);
|
|
51
|
+
return Math.round(255 - (255 - i) * t).toString(16).padStart(2, "0");
|
|
52
|
+
};
|
|
53
|
+
return `#${channel(0)}${channel(2)}${channel(4)}`;
|
|
54
|
+
}
|
|
55
|
+
constructor(e, t) {
|
|
56
|
+
this.spec = e, this.measure = t.measure ?? DiagramLayout.estimatedWidth, this.words = t.words ?? De, this.moved = t.moved ?? /* @__PURE__ */ new Map(), this.sizes = t.sizes ?? /* @__PURE__ */ new Map(), this.columns = e.columns ?? DiagramColumns.of(e, t.maxColumns ?? xe);
|
|
57
|
+
}
|
|
58
|
+
spec;
|
|
59
|
+
measure;
|
|
60
|
+
words;
|
|
61
|
+
moved;
|
|
62
|
+
sizes;
|
|
63
|
+
columns;
|
|
64
|
+
nodes = /* @__PURE__ */ new Map();
|
|
65
|
+
lanes = [];
|
|
66
|
+
groups = [];
|
|
67
|
+
kindsUsed = [];
|
|
68
|
+
back = [];
|
|
69
|
+
front = [];
|
|
70
|
+
drawing() {
|
|
71
|
+
this.sizeNodes(), this.stackVertically();
|
|
72
|
+
let e = this.routedEdges(), t = this.placeHorizontally(e);
|
|
73
|
+
this.applyMoves(), this.drawGroups(), this.drawNodes(), this.drawEdges(e), t = this.drawCornerLegend(e, t);
|
|
74
|
+
let r = Math.max(j, ...this.groups.map((e) => e.y1)) + 4;
|
|
75
|
+
return this.finished(t + 4, r, e.all.length);
|
|
76
|
+
}
|
|
77
|
+
sizeNodes() {
|
|
78
|
+
let e = /* @__PURE__ */ new Map();
|
|
79
|
+
this.columns.forEach((t, r) => {
|
|
80
|
+
for (let i of t.groups) {
|
|
81
|
+
let t = {
|
|
82
|
+
spec: i,
|
|
83
|
+
column: r,
|
|
84
|
+
lanes: [],
|
|
85
|
+
legendLane: void 0,
|
|
86
|
+
y0: 0,
|
|
87
|
+
y1: 0
|
|
88
|
+
};
|
|
89
|
+
this.groups.push(t), (i.legend ? [[]] : i.lanes ?? [i.nodes ?? []]).forEach((i, a) => {
|
|
90
|
+
i === "legend" && (t.legendLane = a);
|
|
91
|
+
let o = `${r}:${a}`, s = e.get(o);
|
|
92
|
+
s || (s = {
|
|
93
|
+
column: r,
|
|
94
|
+
lane: a,
|
|
95
|
+
width: 0,
|
|
96
|
+
nodes: [],
|
|
97
|
+
index: 0,
|
|
98
|
+
...ye
|
|
99
|
+
}, e.set(o, s));
|
|
100
|
+
let c = i === "legend" ? [] : i.map((e) => this.workingNode(e, t, s));
|
|
101
|
+
t.lanes.push(c), s.nodes.push(...c);
|
|
102
|
+
});
|
|
103
|
+
}
|
|
104
|
+
}), this.lanes.push(...[...e.values()].sort((e, t) => e.column - t.column || e.lane - t.lane)), this.lanes.forEach((e, t) => {
|
|
105
|
+
e.index = t;
|
|
106
|
+
let r = e.nodes.length ? this.columns[e.column].min_width ?? 150 : 112;
|
|
107
|
+
e.width = Math.max(r, ...e.nodes.map((e) => e.width)), !e.nodes.filter((e) => !e.hasContent).length && e.nodes.length && (e.width = Math.max(...e.nodes.map((e) => e.width)));
|
|
108
|
+
for (let r of e.nodes) r.hasContent || (r.width = e.width), r.lane = t;
|
|
109
|
+
});
|
|
110
|
+
let t = new Set((this.spec.edges ?? []).map((e) => e.kind ?? "ref"));
|
|
111
|
+
this.kindsUsed = ["contains", "ref"].filter((e) => t.has(e));
|
|
112
|
+
}
|
|
113
|
+
workingNode(e, t, r) {
|
|
114
|
+
if (this.nodes.has(e.name)) throw TypeError(`DiagramLayout.of(): two boxes are named \`${e.name}\`; give each its own name`);
|
|
115
|
+
let i = (e.fields ?? []).map((e) => typeof e == "string" ? { name: e } : e), a = e.bullets ?? [], o = this.sizes.get(e.name), s = i.length + a.length, c = o ? o.height : 22 + (e.note ? 14 : 0), l = o ? o.height : c + (s ? 10 + 18 * s : 0), u = o ? o.width : Math.max(this.measure(e.name, 13, !0), this.measure(e.note ?? "", 9.5, !1), ...i.map((e) => this.measure(this.fieldLabel(e), 10.5, !1)), ...a.map((e) => this.measure(`• ${e}`, 10.5, !1))) + 24, d = {
|
|
116
|
+
spec: e,
|
|
117
|
+
group: t,
|
|
118
|
+
color: e.color ?? t.spec.color ?? Ce,
|
|
119
|
+
fields: i,
|
|
120
|
+
bullets: a,
|
|
121
|
+
hasContent: !!o,
|
|
122
|
+
headerHeight: c,
|
|
123
|
+
height: l,
|
|
124
|
+
width: u,
|
|
125
|
+
lane: r.lane,
|
|
126
|
+
x0: 0,
|
|
127
|
+
x1: 0,
|
|
128
|
+
y0: 0,
|
|
129
|
+
headerY: 0,
|
|
130
|
+
fieldY: /* @__PURE__ */ new Map(),
|
|
131
|
+
tail: 0
|
|
132
|
+
};
|
|
133
|
+
return this.nodes.set(e.name, d), d;
|
|
134
|
+
}
|
|
135
|
+
fieldLabel(e) {
|
|
136
|
+
return e.derived ? `${e.name} ${this.words.derived}` : e.name;
|
|
137
|
+
}
|
|
138
|
+
stackVertically() {
|
|
139
|
+
let e = this.spec.node_gap ?? 22, t = this.kindsUsed.length;
|
|
140
|
+
this.columns.forEach((r, i) => {
|
|
141
|
+
let a = j;
|
|
142
|
+
for (let r of this.groups.filter((e) => e.column === i)) {
|
|
143
|
+
a += r.spec.gap_before ?? 0, r.y0 = a, a += M, r.spec.legend && (a += 18 * t - 4);
|
|
144
|
+
let i = a + (r.legendLane === void 0 ? 0 : 18 * t + 10);
|
|
145
|
+
for (let t of r.lanes) {
|
|
146
|
+
let r = a;
|
|
147
|
+
t.forEach((i, a) => {
|
|
148
|
+
r += i.spec.gap_before ?? 0, i.y0 = r, r += i.height, a < t.length - 1 && (r += e);
|
|
149
|
+
}), i = Math.max(i, r);
|
|
150
|
+
}
|
|
151
|
+
a = i + M, r.y1 = a, a += this.spec.group_gap ?? 40;
|
|
152
|
+
}
|
|
153
|
+
});
|
|
154
|
+
for (let e of this.nodes.values()) this.placeRows(e);
|
|
155
|
+
}
|
|
156
|
+
placeRows(e) {
|
|
157
|
+
e.headerY = e.y0 + e.headerHeight / 2, e.fieldY = new Map(e.fields.map((t, r) => [t.name, e.hasContent ? e.headerY : e.y0 + e.headerHeight + 5 + 18 * r + 9]));
|
|
158
|
+
}
|
|
159
|
+
routedEdges() {
|
|
160
|
+
let e = this.spec.node_gap ?? 22, t = (this.spec.edges ?? []).map((e) => {
|
|
161
|
+
let t = e.from.indexOf("."), r = t < 0 ? e.from : e.from.slice(0, t), i = t < 0 ? "" : e.from.slice(t + 1), a = this.nodes.get(r), o = this.nodes.get(e.to);
|
|
162
|
+
if (!a || !o) throw TypeError(`DiagramLayout.of(): the edge from \`${e.from}\` to \`${e.to}\` names a box the diagram has none of`);
|
|
163
|
+
let s = t < 0 ? a.headerY : a.fieldY.get(i);
|
|
164
|
+
if (s === void 0) throw TypeError(`DiagramLayout.of(): box \`${r}\` has no field \`${i}\`; add it to its \`fields\``);
|
|
165
|
+
let c = a === o ? "self" : a.lane === o.lane ? o.y0 > a.y0 ? "down" : "up" : o.lane < a.lane ? "left" : "right";
|
|
166
|
+
return {
|
|
167
|
+
from: a,
|
|
168
|
+
to: o,
|
|
169
|
+
field: i,
|
|
170
|
+
kind: e.kind ?? "ref",
|
|
171
|
+
route: c,
|
|
172
|
+
fieldY: s,
|
|
173
|
+
laneIndex: 0
|
|
174
|
+
};
|
|
175
|
+
}), r = /* @__PURE__ */ new Map(), i = /* @__PURE__ */ new Map(), pack = (e, t, a) => {
|
|
176
|
+
let o = [...t.map((e) => e.fieldY), a], s = Math.min(...o) - 8, c = Math.max(...o) + 8, l = i.get(e) ?? [], u = 0;
|
|
177
|
+
for (; l.some(([e, t, r]) => e === u && !(c < t || s > r));) u++;
|
|
178
|
+
l.push([
|
|
179
|
+
u,
|
|
180
|
+
s,
|
|
181
|
+
c
|
|
182
|
+
]), i.set(e, l);
|
|
183
|
+
for (let e of t) e.laneIndex = u;
|
|
184
|
+
r.set(e, Math.max(r.get(e) ?? -1, u));
|
|
185
|
+
}, reach = (e, t) => Math.max(...e.map((e) => Math.abs(e.fieldY - t.headerY))), a = /* @__PURE__ */ new Map();
|
|
186
|
+
for (let e of t) {
|
|
187
|
+
if (e.route !== "down" && e.route !== "up") continue;
|
|
188
|
+
let t = e.route === "down" ? "R" : "L", r = `${e.from.lane}|${t}|${e.to.spec.name}|${e.kind}`, i = a.get(r) ?? {
|
|
189
|
+
lane: e.from.lane,
|
|
190
|
+
side: t,
|
|
191
|
+
to: e.to,
|
|
192
|
+
kind: e.kind,
|
|
193
|
+
edges: []
|
|
194
|
+
};
|
|
195
|
+
i.edges.push(e), a.set(r, i);
|
|
196
|
+
}
|
|
197
|
+
for (let t of [...a.values()].sort((e, t) => reach(e.edges, e.to) - reach(t.edges, t.to))) {
|
|
198
|
+
let { to: r } = t, i = t.side === "R" ? r.headerY : r.y0 + r.height + e / 2;
|
|
199
|
+
pack(`${t.lane}|${t.side}`, t.edges, i);
|
|
200
|
+
}
|
|
201
|
+
let o = /* @__PURE__ */ new Map();
|
|
202
|
+
for (let e of t) {
|
|
203
|
+
if (e.route !== "left") continue;
|
|
204
|
+
let t = `${e.from.lane}|${e.to.spec.name}|${e.kind}`, r = o.get(t) ?? {
|
|
205
|
+
lane: e.from.lane,
|
|
206
|
+
side: "G",
|
|
207
|
+
to: e.to,
|
|
208
|
+
kind: e.kind,
|
|
209
|
+
edges: []
|
|
210
|
+
};
|
|
211
|
+
r.edges.push(e), o.set(t, r);
|
|
212
|
+
}
|
|
213
|
+
for (let [e, t] of o) t.edges.length < 2 && o.delete(e);
|
|
214
|
+
for (let e of o.values()) for (let t of e.edges) t.route = "bus";
|
|
215
|
+
for (let e of [...o.values()].sort((e, t) => reach(e.edges, e.to) - reach(t.edges, t.to))) pack(`${e.lane}|G`, e.edges, e.to.headerY);
|
|
216
|
+
let s = /* @__PURE__ */ new Map();
|
|
217
|
+
for (let e of t) e.route === "self" && s.set(e.from, [...s.get(e.from) ?? [], e]);
|
|
218
|
+
return {
|
|
219
|
+
all: t,
|
|
220
|
+
brackets: [...a.values()],
|
|
221
|
+
buses: [...o.values()],
|
|
222
|
+
selfLoops: s,
|
|
223
|
+
lanesUsed: r
|
|
224
|
+
};
|
|
225
|
+
}
|
|
226
|
+
placeHorizontally(e) {
|
|
227
|
+
let t = this.spec.column_gap ?? 64, r = this.spec.lane_gap ?? 56, used = (t, r) => e.lanesUsed.get(`${t}|${r}`), i = 0;
|
|
228
|
+
this.lanes.forEach((a, o) => {
|
|
229
|
+
o && a.column === this.lanes[o - 1].column && (i += r - t);
|
|
230
|
+
let s = used(o, "G");
|
|
231
|
+
s !== void 0 && (i += Math.max(0, 30 + I * s + 30 - t));
|
|
232
|
+
let c = used(o, "L"), l = c === void 0 ? 0 : F + I * c + 8, u = [...e.selfLoops].filter(([e]) => e.lane === o).map(([, e]) => e.length);
|
|
233
|
+
u.length && (l = Math.max(l, 16 + 11 * Math.max(...u) + 6));
|
|
234
|
+
let d = used(o, "R"), f = d === void 0 ? 0 : F + I * d + 8;
|
|
235
|
+
a.groupX0 = i, a.nodeX0 = i + M + l, a.nodeX1 = a.nodeX0 + a.width, a.groupX1 = a.nodeX1 + M + f, i = a.groupX1 + t;
|
|
236
|
+
});
|
|
237
|
+
for (let e of this.nodes.values()) {
|
|
238
|
+
let t = this.lanes[e.lane];
|
|
239
|
+
e.x0 = t.nodeX0, e.x1 = t.nodeX0 + e.width, e.tail = this.tailOf(e);
|
|
240
|
+
}
|
|
241
|
+
return i - t;
|
|
242
|
+
}
|
|
243
|
+
tailOf(e) {
|
|
244
|
+
if (e.hasContent) return e.x1;
|
|
245
|
+
let t = e.fields.map((e) => this.measure(this.fieldLabel(e), 10.5, !1));
|
|
246
|
+
return e.x0 + 12 + Math.max(0, ...t) + 8;
|
|
247
|
+
}
|
|
248
|
+
applyMoves() {
|
|
249
|
+
for (let [e, t] of this.moved) {
|
|
250
|
+
let r = this.nodes.get(e);
|
|
251
|
+
r && (t.dx || t.dy) && (r.x0 += t.dx, r.x1 += t.dx, r.tail += t.dx, r.y0 += t.dy, this.placeRows(r));
|
|
252
|
+
}
|
|
253
|
+
}
|
|
254
|
+
drawGroups() {
|
|
255
|
+
for (let e of this.groups) {
|
|
256
|
+
let { spec: t } = e, r = t.legend ? t.color ?? we : t.color ?? Ce, i = t.legend ? t.label ?? this.words.legend : t.label, a = e.lanes.map((e, t) => e.length ? t : -1).filter((e) => e >= 0), o = this.laneAt(e.column, a[0] ?? 0), s = this.laneAt(e.column, a.at(-1) ?? 0), c = o.groupX0, l = t.legend ? c + L : s.groupX1, { y0: u, y1: d } = e;
|
|
257
|
+
for (let t of e.lanes.flat()) c = Math.min(c, t.x0 - M), l = Math.max(l, t.x1 + M), u = Math.min(u, t.y0 - M), d = Math.max(d, t.y0 + t.height + M);
|
|
258
|
+
let f = t.legend ? t.bg ?? Te : t.bg ?? DiagramLayout.tint(r, .12);
|
|
259
|
+
if (f !== "none") {
|
|
260
|
+
let e = t.legend && !t.bg ? "legend" : "group";
|
|
261
|
+
this.rect("back", e, {
|
|
262
|
+
x: c,
|
|
263
|
+
y: u,
|
|
264
|
+
width: l - c,
|
|
265
|
+
height: d - u,
|
|
266
|
+
rx: 10,
|
|
267
|
+
fill: f
|
|
268
|
+
});
|
|
269
|
+
}
|
|
270
|
+
if (t.legend && this.legendRows(c, u), i && this.text("back", t.legend ? "legend-label" : "group-label", c + 4, u - 7, i, 12.5, 600, r), e.legendLane !== void 0) {
|
|
271
|
+
let t = this.laneAt(e.column, e.legendLane).groupX0;
|
|
272
|
+
this.legendBox(t, e.y0);
|
|
273
|
+
}
|
|
274
|
+
}
|
|
275
|
+
}
|
|
276
|
+
laneAt(e, t) {
|
|
277
|
+
return this.lanes.find((r) => r.column === e && r.lane === t) ?? this.lanes[0];
|
|
278
|
+
}
|
|
279
|
+
legendBox(e, t) {
|
|
280
|
+
let r = 14 + 18 * this.kindsUsed.length;
|
|
281
|
+
this.rect("back", "legend", {
|
|
282
|
+
x: e,
|
|
283
|
+
y: t,
|
|
284
|
+
width: L,
|
|
285
|
+
height: r,
|
|
286
|
+
rx: 10,
|
|
287
|
+
fill: Te
|
|
288
|
+
}), this.text("back", "legend-label", e + 4, t - 7, this.words.legend, 12.5, 600, we), this.legendRows(e, t);
|
|
289
|
+
}
|
|
290
|
+
legendRows(e, t) {
|
|
291
|
+
this.kindsUsed.forEach((r, i) => {
|
|
292
|
+
let a = t + 14 + 18 * i;
|
|
293
|
+
this.path(`M${n(e + 14)},${n(a)} H${n(e + 40)}`, r), this.arrow(e + 47, a, "right"), this.text("front", "legend-text", e + 54, a + 3.6, this.wordFor(r), 10.5, 400, R);
|
|
294
|
+
});
|
|
295
|
+
}
|
|
296
|
+
wordFor(e) {
|
|
297
|
+
return e === "contains" ? this.words.contains : this.words.refersTo;
|
|
298
|
+
}
|
|
299
|
+
drawCornerLegend(e, t) {
|
|
300
|
+
let r = this.kindsUsed.filter((t) => e.all.some((e) => e.kind === t)), i = this.groups.some((e) => e.spec.legend || e.legendLane !== void 0);
|
|
301
|
+
if (!r.length || this.spec.legend === !1 || i) return t;
|
|
302
|
+
let a = 14 + 18 * r.length, o = t - L;
|
|
303
|
+
return [...this.nodes.values()].some((e) => e.x1 > o && e.y0 < j + a + 30) && (o = t + 30, t = o + L), this.legendBox(o, j), t;
|
|
304
|
+
}
|
|
305
|
+
drawNodes() {
|
|
306
|
+
for (let e of this.nodes.values()) {
|
|
307
|
+
let { x0: t, y0: r, width: i, height: a, headerHeight: o, color: s } = e, c = e.spec.name;
|
|
308
|
+
if (e.hasContent) {
|
|
309
|
+
this.rect("front", "outline", {
|
|
310
|
+
x: t,
|
|
311
|
+
y: r,
|
|
312
|
+
width: i,
|
|
313
|
+
height: a,
|
|
314
|
+
rx: N,
|
|
315
|
+
fill: "none",
|
|
316
|
+
node: c
|
|
317
|
+
});
|
|
318
|
+
continue;
|
|
319
|
+
}
|
|
320
|
+
if (a > o) {
|
|
321
|
+
this.rect("front", "box", {
|
|
322
|
+
x: t,
|
|
323
|
+
y: r,
|
|
324
|
+
width: i,
|
|
325
|
+
height: a,
|
|
326
|
+
rx: N,
|
|
327
|
+
fill: "#ffffff",
|
|
328
|
+
node: c
|
|
329
|
+
});
|
|
330
|
+
let e = `M${n(t)},${n(r + o)} V${n(r + N)} Q${n(t)},${n(r)} ${n(t + N)},${n(r)} H${n(t + i - N)} Q${n(t + i)},${n(r)} ${n(t + i)},${n(r + N)} V${n(r + o)} Z`;
|
|
331
|
+
this.front.push({
|
|
332
|
+
type: "path",
|
|
333
|
+
role: "header",
|
|
334
|
+
d: e,
|
|
335
|
+
fill: s,
|
|
336
|
+
stroke: s,
|
|
337
|
+
node: c
|
|
338
|
+
}), this.rect("front", "outline", {
|
|
339
|
+
x: t,
|
|
340
|
+
y: r,
|
|
341
|
+
width: i,
|
|
342
|
+
height: a,
|
|
343
|
+
rx: N,
|
|
344
|
+
fill: "none",
|
|
345
|
+
stroke: s,
|
|
346
|
+
node: c
|
|
347
|
+
});
|
|
348
|
+
} else this.rect("front", "header", {
|
|
349
|
+
x: t,
|
|
350
|
+
y: r,
|
|
351
|
+
width: i,
|
|
352
|
+
height: o,
|
|
353
|
+
rx: N,
|
|
354
|
+
fill: s,
|
|
355
|
+
node: c
|
|
356
|
+
});
|
|
357
|
+
this.text("front", "name", t + 12, r + 17, c, 13, 600, "#ffffff", c), e.spec.note && this.text("front", "note", t + 12, r + 31, e.spec.note, 9.5, 500, "#f8fafc", c), e.fields.forEach((r) => {
|
|
358
|
+
let i = e.fieldY.get(r.name) + 3.6;
|
|
359
|
+
this.front.push({
|
|
360
|
+
type: "text",
|
|
361
|
+
role: "field",
|
|
362
|
+
x: t + 12,
|
|
363
|
+
y: i,
|
|
364
|
+
text: this.fieldLabel(r),
|
|
365
|
+
size: 10.5,
|
|
366
|
+
weight: 400,
|
|
367
|
+
fill: R,
|
|
368
|
+
node: c,
|
|
369
|
+
...r.derived && { italic: !0 }
|
|
370
|
+
});
|
|
371
|
+
}), e.bullets.forEach((i, a) => {
|
|
372
|
+
let s = r + o + 5 + 18 * (e.fields.length + a) + 12.6;
|
|
373
|
+
this.text("front", "bullet", t + 12, s, `• ${i}`, 10.5, 400, R, c);
|
|
374
|
+
});
|
|
375
|
+
}
|
|
376
|
+
}
|
|
377
|
+
drawEdges(e) {
|
|
378
|
+
let t = this.spec.node_gap ?? 22, r = /* @__PURE__ */ new Map(), slot = (e, t, i, a) => {
|
|
379
|
+
let o = `${e.spec.name}|${t}`, s = r.get(o) ?? [];
|
|
380
|
+
s.includes(`${i}|${a}`) || s.push(`${i}|${a}`), r.set(o, s);
|
|
381
|
+
};
|
|
382
|
+
for (let t of e.all) t.route === "down" && slot(t.to, "R", t.kind, "down"), (t.route === "left" || t.route === "bus") && slot(t.to, "R", t.kind, "x"), t.route === "right" && slot(t.to, "L", t.kind, "x"), t.route === "up" && slot(t.to, "B", t.kind, "up");
|
|
383
|
+
let landing = (e, t, i, a) => {
|
|
384
|
+
let o = r.get(`${e.spec.name}|${t}`), s = (o.indexOf(`${i}|${a}`) - (o.length - 1) / 2) * be;
|
|
385
|
+
return t === "B" ? (e.x0 + e.x1) / 2 + s : e.headerY + s;
|
|
386
|
+
};
|
|
387
|
+
for (let { side: r, to: i, kind: a, edges: o } of e.brackets) {
|
|
388
|
+
let e = o[0].laneIndex, s = this.lanes[o[0].from.lane];
|
|
389
|
+
if (r === "R") {
|
|
390
|
+
let t = Math.max(s.nodeX1, i.x1, ...o.map((e) => e.from.x1)) + F + I * e, r = landing(i, "R", a, "down"), c = Math.min(...o.map((e) => e.fieldY));
|
|
391
|
+
for (let e of o) {
|
|
392
|
+
let r = e.fieldY;
|
|
393
|
+
this.path(`M${n(e.from.tail)},${n(r)} H${n(t - P)} Q${n(t)},${n(r)} ${n(t)},${n(r + P)}`, a);
|
|
394
|
+
}
|
|
395
|
+
this.path(`M${n(t)},${n(c + P)} V${n(r - P)} Q${n(t)},${n(r)} ${n(t - P)},${n(r)} H${n(i.x1 + 7)}`, a), this.arrow(i.x1, r, "left");
|
|
396
|
+
} else {
|
|
397
|
+
let r = Math.min(s.nodeX0, i.x0, ...o.map((e) => e.from.x0)) - F - I * e, c = i.y0 + i.height + t / 2, l = landing(i, "B", a, "up"), u = i.y0 + i.height, d = Math.max(...o.map((e) => e.fieldY));
|
|
398
|
+
for (let e of o) {
|
|
399
|
+
let t = e.fieldY;
|
|
400
|
+
this.path(`M${n(e.from.x0 + 3)},${n(t)} H${n(r + P)} Q${n(r)},${n(t)} ${n(r)},${n(t - P)}`, a);
|
|
401
|
+
}
|
|
402
|
+
this.path(`M${n(r)},${n(d - P)} V${n(c + P)} Q${n(r)},${n(c)} ${n(r + P)},${n(c)} H${n(l - P)} Q${n(l)},${n(c)} ${n(l)},${n(c - P)} V${n(u + 7)}`, a), this.arrow(l, u, "up");
|
|
403
|
+
}
|
|
404
|
+
}
|
|
405
|
+
for (let { to: t, kind: r, edges: i } of e.buses) {
|
|
406
|
+
let e = i[0].laneIndex, a = this.lanes[i[0].from.lane], o = Math.min(a.groupX0, ...i.map((e) => e.from.x0 - (a.nodeX0 - a.groupX0))) - 16 - I * e, s = landing(t, "R", r, "x"), c = t.x1;
|
|
407
|
+
for (let e of i) {
|
|
408
|
+
let t = e.fieldY;
|
|
409
|
+
if (Math.abs(t - s) < 1) {
|
|
410
|
+
this.path(`M${n(e.from.x0 + 3)},${n(t)} H${n(o)}`, r);
|
|
411
|
+
continue;
|
|
412
|
+
}
|
|
413
|
+
let i = s > t ? 1 : -1;
|
|
414
|
+
this.path(`M${n(e.from.x0 + 3)},${n(t)} H${n(o + P)} Q${n(o)},${n(t)} ${n(o)},${n(t + i * P)}`, r);
|
|
415
|
+
}
|
|
416
|
+
let l = i.map((e) => e.fieldY), u = l.filter((e) => e < s), d = l.filter((e) => e > s);
|
|
417
|
+
u.length && this.path(`M${n(o)},${n(Math.min(...u) + P)} V${n(s - (d.length ? 0 : P))}`, r), d.length && this.path(`M${n(o)},${n(Math.max(...d) - P)} V${n(s + (u.length ? 0 : P))}`, r), u.length && !d.length ? this.path(`M${n(o)},${n(s - P)} Q${n(o)},${n(s)} ${n(o - P)},${n(s)} H${n(c + 7)}`, r) : d.length && !u.length ? this.path(`M${n(o)},${n(s + P)} Q${n(o)},${n(s)} ${n(o - P)},${n(s)} H${n(c + 7)}`, r) : this.path(`M${n(o)},${n(s)} H${n(c + 7)}`, r), this.arrow(c, s, "left");
|
|
418
|
+
}
|
|
419
|
+
for (let [t, r] of e.selfLoops) {
|
|
420
|
+
let { x0: e, headerY: i } = t;
|
|
421
|
+
r.forEach((t, r) => {
|
|
422
|
+
let a = 16 + 11 * r, o = t.fieldY;
|
|
423
|
+
this.path(`M${n(e + 3)},${n(o)} H${n(e - 4)} C${n(e - a)},${n(o)} ${n(e - a)},${n(i)} ${n(e - 7)},${n(i)}`, t.kind);
|
|
424
|
+
}), this.arrow(e, i, "right");
|
|
425
|
+
}
|
|
426
|
+
for (let t of e.all) {
|
|
427
|
+
let { from: e, to: r, kind: i } = t, a = t.fieldY, o = this.lanes[e.lane];
|
|
428
|
+
if (t.route === "left") {
|
|
429
|
+
let t = landing(r, "R", i, "x"), s = (Math.min(o.groupX0, e.x0 - (o.nodeX0 - o.groupX0)) + r.x1) / 2;
|
|
430
|
+
this.path(`M${n(e.x0 + 3)},${n(a)} L${n(e.x0 - 6)},${n(a)} C${n(s)},${n(a)} ${n(s)},${n(t)} ${n(r.x1 + 7)},${n(t)}`, i), this.arrow(r.x1, t, "left");
|
|
431
|
+
} else if (t.route === "right") {
|
|
432
|
+
let t = landing(r, "L", i, "x"), s = Math.max(o.groupX1, e.x1 + (o.groupX1 - o.nodeX1)), c = (s + r.x0) / 2;
|
|
433
|
+
this.path(`M${n(e.tail)},${n(a)} L${n(s)},${n(a)} C${n(c)},${n(a)} ${n(c)},${n(t)} ${n(r.x0 - 7)},${n(t)}`, i), this.arrow(r.x0, t, "right");
|
|
434
|
+
}
|
|
435
|
+
}
|
|
436
|
+
}
|
|
437
|
+
rect(e, t, r) {
|
|
438
|
+
let { node: i, stroke: a, ...o } = r;
|
|
439
|
+
this[e].push({
|
|
440
|
+
type: "rect",
|
|
441
|
+
role: t,
|
|
442
|
+
...o,
|
|
443
|
+
...a && { stroke: a },
|
|
444
|
+
...i && { node: i }
|
|
445
|
+
});
|
|
446
|
+
}
|
|
447
|
+
text(e, t, r, i, a, o, s, c, l) {
|
|
448
|
+
this[e].push({
|
|
449
|
+
type: "text",
|
|
450
|
+
role: t,
|
|
451
|
+
x: r,
|
|
452
|
+
y: i,
|
|
453
|
+
text: a,
|
|
454
|
+
size: o,
|
|
455
|
+
weight: s,
|
|
456
|
+
fill: c,
|
|
457
|
+
...l && { node: l }
|
|
458
|
+
});
|
|
459
|
+
}
|
|
460
|
+
path(e, t) {
|
|
461
|
+
this.front.push({
|
|
462
|
+
type: "path",
|
|
463
|
+
role: "line",
|
|
464
|
+
d: e,
|
|
465
|
+
fill: "none",
|
|
466
|
+
stroke: Se,
|
|
467
|
+
...Ee[t] && { dash: Ee[t] }
|
|
468
|
+
});
|
|
469
|
+
}
|
|
470
|
+
arrow(e, t, r) {
|
|
471
|
+
let i = r === "left" ? [
|
|
472
|
+
[e, t],
|
|
473
|
+
[e + 7, t - 3],
|
|
474
|
+
[e + 7, t + 3]
|
|
475
|
+
] : r === "right" ? [
|
|
476
|
+
[e, t],
|
|
477
|
+
[e - 7, t - 3],
|
|
478
|
+
[e - 7, t + 3]
|
|
479
|
+
] : [
|
|
480
|
+
[e, t],
|
|
481
|
+
[e - 3, t + 7],
|
|
482
|
+
[e + 3, t + 7]
|
|
483
|
+
];
|
|
484
|
+
this.front.push({
|
|
485
|
+
type: "arrow",
|
|
486
|
+
role: "arrow",
|
|
487
|
+
points: i,
|
|
488
|
+
fill: Se
|
|
489
|
+
});
|
|
490
|
+
}
|
|
491
|
+
finished(e, t, r) {
|
|
492
|
+
let i = -4, a = 0, o = e - 4, s = t;
|
|
493
|
+
for (let e of this.moved.keys()) {
|
|
494
|
+
let t = this.nodes.get(e);
|
|
495
|
+
t && (i = Math.min(i, t.x0 - M - 30), a = Math.min(a, t.y0 - M - 20), o = Math.max(o, t.x1 + M + 30), s = Math.max(s, t.y0 + t.height + M));
|
|
496
|
+
}
|
|
497
|
+
let c = {
|
|
498
|
+
type: "rect",
|
|
499
|
+
role: "background",
|
|
500
|
+
x: i,
|
|
501
|
+
y: a,
|
|
502
|
+
width: o - i,
|
|
503
|
+
height: s - a,
|
|
504
|
+
rx: 0,
|
|
505
|
+
fill: "#ffffff"
|
|
506
|
+
}, l = new Map([...this.nodes.values()].map((e) => [e.spec.name, {
|
|
507
|
+
name: e.spec.name,
|
|
508
|
+
x: e.x0,
|
|
509
|
+
y: e.y0,
|
|
510
|
+
width: e.width,
|
|
511
|
+
height: e.height,
|
|
512
|
+
headerHeight: e.headerHeight
|
|
513
|
+
}]));
|
|
514
|
+
return {
|
|
515
|
+
x: i,
|
|
516
|
+
y: a,
|
|
517
|
+
width: o - i,
|
|
518
|
+
height: s - a,
|
|
519
|
+
shapes: [
|
|
520
|
+
c,
|
|
521
|
+
...this.back,
|
|
522
|
+
...this.front
|
|
523
|
+
],
|
|
524
|
+
boxes: l,
|
|
525
|
+
edgeCount: r
|
|
526
|
+
};
|
|
527
|
+
}
|
|
528
|
+
}, ye = {
|
|
529
|
+
groupX0: 0,
|
|
530
|
+
nodeX0: 0,
|
|
531
|
+
nodeX1: 0,
|
|
532
|
+
groupX1: 0
|
|
533
|
+
};
|
|
534
|
+
function n(e) {
|
|
535
|
+
return String(Math.round(e * 10) / 10);
|
|
536
|
+
}
|
|
537
|
+
var j = 22, M = 12, N = 6, P = 5, F = 14, I = 9, be = 9, L = 112, xe = 3, R = "#1f2430", Se = "#374151", Ce = "#475569", we = "#4b5563", Te = "#eceef2", Ee = {
|
|
538
|
+
contains: void 0,
|
|
539
|
+
ref: "5,2"
|
|
540
|
+
}, De = {
|
|
541
|
+
legend: "Legend",
|
|
542
|
+
contains: "contains",
|
|
543
|
+
refersTo: "refers to",
|
|
544
|
+
derived: "(derived)"
|
|
545
|
+
}, Oe = [
|
|
546
|
+
278,
|
|
547
|
+
278,
|
|
548
|
+
355,
|
|
549
|
+
556,
|
|
550
|
+
556,
|
|
551
|
+
889,
|
|
552
|
+
667,
|
|
553
|
+
191,
|
|
554
|
+
333,
|
|
555
|
+
333,
|
|
556
|
+
389,
|
|
557
|
+
584,
|
|
558
|
+
278,
|
|
559
|
+
333,
|
|
560
|
+
278,
|
|
561
|
+
278,
|
|
562
|
+
556,
|
|
563
|
+
556,
|
|
564
|
+
556,
|
|
565
|
+
556,
|
|
566
|
+
556,
|
|
567
|
+
556,
|
|
568
|
+
556,
|
|
569
|
+
556,
|
|
570
|
+
556,
|
|
571
|
+
556,
|
|
572
|
+
278,
|
|
573
|
+
278,
|
|
574
|
+
584,
|
|
575
|
+
584,
|
|
576
|
+
584,
|
|
577
|
+
556,
|
|
578
|
+
1015,
|
|
579
|
+
667,
|
|
580
|
+
667,
|
|
581
|
+
722,
|
|
582
|
+
722,
|
|
583
|
+
667,
|
|
584
|
+
611,
|
|
585
|
+
778,
|
|
586
|
+
722,
|
|
587
|
+
278,
|
|
588
|
+
500,
|
|
589
|
+
667,
|
|
590
|
+
556,
|
|
591
|
+
833,
|
|
592
|
+
722,
|
|
593
|
+
778,
|
|
594
|
+
667,
|
|
595
|
+
778,
|
|
596
|
+
722,
|
|
597
|
+
667,
|
|
598
|
+
611,
|
|
599
|
+
722,
|
|
600
|
+
667,
|
|
601
|
+
944,
|
|
602
|
+
667,
|
|
603
|
+
667,
|
|
604
|
+
611,
|
|
605
|
+
278,
|
|
606
|
+
278,
|
|
607
|
+
278,
|
|
608
|
+
469,
|
|
609
|
+
556,
|
|
610
|
+
333,
|
|
611
|
+
556,
|
|
612
|
+
556,
|
|
613
|
+
500,
|
|
614
|
+
556,
|
|
615
|
+
556,
|
|
616
|
+
278,
|
|
617
|
+
556,
|
|
618
|
+
556,
|
|
619
|
+
222,
|
|
620
|
+
222,
|
|
621
|
+
500,
|
|
622
|
+
222,
|
|
623
|
+
833,
|
|
624
|
+
556,
|
|
625
|
+
556,
|
|
626
|
+
556,
|
|
627
|
+
556,
|
|
628
|
+
333,
|
|
629
|
+
500,
|
|
630
|
+
278,
|
|
631
|
+
556,
|
|
632
|
+
500,
|
|
633
|
+
722,
|
|
634
|
+
500,
|
|
635
|
+
500,
|
|
636
|
+
500,
|
|
637
|
+
334,
|
|
638
|
+
260,
|
|
639
|
+
334,
|
|
640
|
+
584
|
|
641
|
+
], ke = new Map(Array.from(" !\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~", (e, t) => [e, Oe[t]])), Ae = class DiagramSVG {
|
|
642
|
+
static of(e, t = je) {
|
|
643
|
+
let { x: r, y: i, width: a, height: o } = e, s = e.shapes.map((e) => DiagramSVG.shape(e, t)).join("\n");
|
|
644
|
+
return `<svg xmlns="http://www.w3.org/2000/svg" width="${Math.round(a)}pt" height="${Math.round(o)}pt" viewBox="${round(r)} ${round(i)} ${round(a)} ${round(o)}">\n${s}\n</svg>\n`;
|
|
645
|
+
}
|
|
646
|
+
static shape(e, t) {
|
|
647
|
+
let r = DiagramSVG.paint(e);
|
|
648
|
+
switch (e.type) {
|
|
649
|
+
case "rect": return `<rect x="${round(e.x)}" y="${round(e.y)}" width="${round(e.width)}" height="${round(e.height)}" rx="${e.rx}"${r}/>`;
|
|
650
|
+
case "path": return `<path d="${e.d}"${r}/>`;
|
|
651
|
+
case "arrow": return `<polygon points="${e.points.map(([e, t]) => `${round(e)},${round(t)}`).join(" ")}"${r}/>`;
|
|
652
|
+
case "text": return `<text x="${round(e.x)}" y="${round(e.y)}" font-family="${te(t)}" font-size="${e.size}" font-weight="${e.weight}"${r}${e.italic ? " font-style=\"italic\"" : ""}>${te(e.text)}</text>`;
|
|
653
|
+
}
|
|
654
|
+
}
|
|
655
|
+
static paint(e) {
|
|
656
|
+
let t = e.stroke ? ` stroke="${e.stroke}" stroke-width="${e.type === "path" ? 1.3 : 1.2}"` : "", r = e.dash ? ` stroke-dasharray="${e.dash}"` : "";
|
|
657
|
+
return ` fill="${e.fill ?? "none"}"${t}${r}`;
|
|
658
|
+
}
|
|
659
|
+
}, je = "Inter, 'Helvetica Neue', Helvetica, Arial, sans-serif";
|
|
660
|
+
function round(e) {
|
|
661
|
+
return String(Math.round(e * 10) / 10);
|
|
662
|
+
}
|
|
663
|
+
//#endregion
|
|
664
|
+
//#region src/components/ui-diagram/UIDiagram.en.ts
|
|
665
|
+
var Me = {
|
|
666
|
+
tag: "ui-diagram",
|
|
667
|
+
icon: "sitemap",
|
|
668
|
+
topics: [
|
|
669
|
+
"data display",
|
|
670
|
+
"images",
|
|
671
|
+
"views"
|
|
672
|
+
],
|
|
673
|
+
aka: [
|
|
674
|
+
"graph",
|
|
675
|
+
"node graph",
|
|
676
|
+
"network diagram",
|
|
677
|
+
"boxes and lines",
|
|
678
|
+
"entity relationship diagram",
|
|
679
|
+
"ERD",
|
|
680
|
+
"NERD",
|
|
681
|
+
"data model",
|
|
682
|
+
"flowchart",
|
|
683
|
+
"concept map"
|
|
684
|
+
],
|
|
685
|
+
skeleton: "14 tall",
|
|
686
|
+
noun: "diagram",
|
|
687
|
+
description: "A diagram draws boxes in columns and the links between them, solid for what a box contains and dashed for what it refers to. Drag a box to move it.",
|
|
688
|
+
attributes: [
|
|
689
|
+
{
|
|
690
|
+
name: "spec",
|
|
691
|
+
group: "content",
|
|
692
|
+
kind: "json",
|
|
693
|
+
reflect: !1,
|
|
694
|
+
description: "What to draw, a `DiagramSpec`: `columns` of `groups` (each a `label`, a `color`, and `nodes` or side-by-side `lanes`), and `edges`, each `{ from: \"Box.field\", to: \"Other\", kind: \"contains\" | \"ref\" }`. Or a flat `{ nodes, edges }`, put in columns for you. A JS property (JSON in the attribute); wins over a `<ui-json>` or `<script type=\"application/json\">` child. Set a NEW spec to redraw."
|
|
695
|
+
},
|
|
696
|
+
{
|
|
697
|
+
name: "columns",
|
|
698
|
+
group: "layout",
|
|
699
|
+
kind: "number",
|
|
700
|
+
default: 3,
|
|
701
|
+
description: "A flat spec's most columns: what would go further stacks in the last. A spec with `columns` says its own."
|
|
702
|
+
},
|
|
703
|
+
{
|
|
704
|
+
name: "remember",
|
|
705
|
+
group: "behaviour",
|
|
706
|
+
kind: "string",
|
|
707
|
+
description: "Keep where each person dragged the boxes, under this name, across reloads and visits. None: only while the page is open."
|
|
708
|
+
},
|
|
709
|
+
{
|
|
710
|
+
name: "fixed",
|
|
711
|
+
group: "behaviour",
|
|
712
|
+
kind: "boolean",
|
|
713
|
+
description: "Its boxes can't be moved, by pointer or keyboard."
|
|
714
|
+
}
|
|
715
|
+
],
|
|
716
|
+
events: [{
|
|
717
|
+
name: "ui-node-clicked",
|
|
718
|
+
detail: "{ name: string, originalEvent: Event }",
|
|
719
|
+
description: "A box was clicked (not dragged): `name` is the box's name."
|
|
720
|
+
}, {
|
|
721
|
+
name: "ui-node-moved",
|
|
722
|
+
detail: "{ name: string, dx: number, dy: number }",
|
|
723
|
+
description: "A box was dragged and let go: `dx`, `dy` is how far it now is from where the layout put it, in user units."
|
|
724
|
+
}],
|
|
725
|
+
slots: [{
|
|
726
|
+
name: "",
|
|
727
|
+
description: "`<ui-diagram-node name>`s: what each holds shows in that box instead of its texts (a `<ui-shape>` that flips), the box sized to it."
|
|
728
|
+
}],
|
|
729
|
+
parts: [{
|
|
730
|
+
name: "diagram",
|
|
731
|
+
description: "The `<svg>`."
|
|
732
|
+
}, {
|
|
733
|
+
name: "menu",
|
|
734
|
+
description: "The menu a right click opens: Put back, Save as SVG, Save as JSON."
|
|
735
|
+
}],
|
|
736
|
+
states: [{
|
|
737
|
+
name: "moved",
|
|
738
|
+
description: "A box has been dragged from where the layout put it."
|
|
739
|
+
}],
|
|
740
|
+
texts: [
|
|
741
|
+
{
|
|
742
|
+
key: "summary",
|
|
743
|
+
text: "Diagram: {boxes} boxes, {links} links",
|
|
744
|
+
description: "Name of the drawing."
|
|
745
|
+
},
|
|
746
|
+
{
|
|
747
|
+
key: "legend",
|
|
748
|
+
text: "Legend",
|
|
749
|
+
description: "The legend's label."
|
|
750
|
+
},
|
|
751
|
+
{
|
|
752
|
+
key: "contains",
|
|
753
|
+
text: "contains",
|
|
754
|
+
description: "A solid line in the legend."
|
|
755
|
+
},
|
|
756
|
+
{
|
|
757
|
+
key: "refersTo",
|
|
758
|
+
text: "refers to",
|
|
759
|
+
description: "A dashed line in the legend."
|
|
760
|
+
},
|
|
761
|
+
{
|
|
762
|
+
key: "derived",
|
|
763
|
+
text: "(derived)",
|
|
764
|
+
description: "After a field that's worked out, not kept."
|
|
765
|
+
},
|
|
766
|
+
{
|
|
767
|
+
key: "putBack",
|
|
768
|
+
text: "Put back",
|
|
769
|
+
description: "The menu item that puts every moved box back."
|
|
770
|
+
},
|
|
771
|
+
{
|
|
772
|
+
key: "saveSVG",
|
|
773
|
+
text: "Save as SVG",
|
|
774
|
+
description: "The menu item that saves it as an SVG file."
|
|
775
|
+
},
|
|
776
|
+
{
|
|
777
|
+
key: "saveJSON",
|
|
778
|
+
text: "Save as JSON",
|
|
779
|
+
description: "The menu item that saves its spec as a JSON file."
|
|
780
|
+
},
|
|
781
|
+
{
|
|
782
|
+
key: "moveHint",
|
|
783
|
+
text: "Arrow keys move it",
|
|
784
|
+
description: "A box's description, for screen readers."
|
|
785
|
+
}
|
|
786
|
+
]
|
|
787
|
+
}, z = {
|
|
788
|
+
tag: "ui-diagram-node",
|
|
789
|
+
icon: "square outline",
|
|
790
|
+
topics: ["data display", "images"],
|
|
791
|
+
aka: [
|
|
792
|
+
"diagram box",
|
|
793
|
+
"box content",
|
|
794
|
+
"flip card in a diagram"
|
|
795
|
+
],
|
|
796
|
+
noun: "diagram node",
|
|
797
|
+
description: "A diagram node holds what one box of a diagram shows instead of its texts, e.g. a `<ui-shape>` that flips: the box takes its size, and its lines follow when it changes.",
|
|
798
|
+
attributes: [{
|
|
799
|
+
name: "name",
|
|
800
|
+
group: "content",
|
|
801
|
+
kind: "string",
|
|
802
|
+
description: "The box it fills: a node's `name` in the diagram's spec."
|
|
803
|
+
}, {
|
|
804
|
+
name: "resizable",
|
|
805
|
+
group: "behaviour",
|
|
806
|
+
kind: "string",
|
|
807
|
+
description: "People can drag its corner to resize it, and the box and its lines follow: bare or `both`, `horizontally` or `vertically`. Limit it with plain CSS on what it holds (`max-width: 50%`, `min-height`)."
|
|
808
|
+
}],
|
|
809
|
+
events: [],
|
|
810
|
+
slots: [{
|
|
811
|
+
name: "",
|
|
812
|
+
description: "What the box shows."
|
|
813
|
+
}],
|
|
814
|
+
parts: [{
|
|
815
|
+
name: "content",
|
|
816
|
+
description: "The box around what it holds."
|
|
817
|
+
}],
|
|
818
|
+
states: [],
|
|
819
|
+
texts: []
|
|
820
|
+
}, Ne = "@layer ui.components.diagram-node.types{:host{display:contents}.ui.diagram.node{transform-origin:0 0;width:max-content;scale:var(--_ui-diagram-scale,1);visibility:hidden;cursor:grab;position:absolute;&.placed{visibility:visible}&:is(.resize-both,.resize-horizontally,.resize-vertically){overflow:hidden}&.resize-both{resize:both}&.resize-horizontally{resize:horizontal}&.resize-vertically{resize:vertical}}}@layer ui.components.diagram-node.content,ui.components.diagram-node.variations,ui.components.diagram-node.states;", Pe = /* @__PURE__ */ k("<div><slot>"), Fe, Ie, Le, Re, B, V, H, ze = "ui-diagram-node-resized", U = class _UIDiagramNode extends (B = c, Re = [ne], Le = [re], Ie = [g], Fe = [h("isConnected", "isReady")], B) {
|
|
821
|
+
constructor() {
|
|
822
|
+
super(...arguments), l(V, 5, this), u(this, H, l(V, 8, this)), l(V, 11, this), r(this, "contentBox");
|
|
823
|
+
}
|
|
824
|
+
get contentSize() {
|
|
825
|
+
let e = this.contentBox;
|
|
826
|
+
if (e?.offsetWidth) return {
|
|
827
|
+
width: e.offsetWidth,
|
|
828
|
+
height: e.offsetHeight
|
|
829
|
+
};
|
|
830
|
+
}
|
|
831
|
+
watchContentSize(e, t) {
|
|
832
|
+
let r = this.contentBox;
|
|
833
|
+
if (!e || !t || !r) return;
|
|
834
|
+
let i = new ResizeObserver(() => {
|
|
835
|
+
this.domElement.dispatchEvent(new Event(ze, { bubbles: !0 }));
|
|
836
|
+
});
|
|
837
|
+
return i.observe(r), () => i.disconnect();
|
|
838
|
+
}
|
|
839
|
+
render() {
|
|
840
|
+
let e = this;
|
|
841
|
+
var t = Pe(), r = t.firstChild;
|
|
842
|
+
return T(() => (t) => e.contentBox = t, t), r._$owner = x(), b(() => ({
|
|
843
|
+
e: w([
|
|
844
|
+
e.rootClass,
|
|
845
|
+
{ [Ve]: !!e.placement },
|
|
846
|
+
e.resizeClass
|
|
847
|
+
]),
|
|
848
|
+
t: e.partForName("content"),
|
|
849
|
+
a: w(e.placementStyle())
|
|
850
|
+
}), ({ e, t: r, a: i }, a) => {
|
|
851
|
+
v(t, e, a?.e), r !== a?.t && E(t, "part", r), O(t, i, a?.a);
|
|
852
|
+
}), t;
|
|
853
|
+
}
|
|
854
|
+
get resizeClass() {
|
|
855
|
+
let e = a.wayOf(this.resizable);
|
|
856
|
+
return e && `resize-${e}`;
|
|
857
|
+
}
|
|
858
|
+
isOnResizeGrip(e, t) {
|
|
859
|
+
if (!this.resizeClass || !this.contentBox) return !1;
|
|
860
|
+
let r = this.contentBox.getBoundingClientRect();
|
|
861
|
+
return e > r.right - Be && t > r.bottom - Be;
|
|
862
|
+
}
|
|
863
|
+
placementStyle() {
|
|
864
|
+
let e = this.placement;
|
|
865
|
+
return e && {
|
|
866
|
+
left: `${e.left}%`,
|
|
867
|
+
top: `${e.top}%`
|
|
868
|
+
};
|
|
869
|
+
}
|
|
870
|
+
static isNode(e) {
|
|
871
|
+
if (e.nodeType !== He) return !1;
|
|
872
|
+
let t = e.localName;
|
|
873
|
+
return t === z.tag || "vocabulary" in s && s.vocabulary.canonicalTagFor(t) === z.tag;
|
|
874
|
+
}
|
|
875
|
+
};
|
|
876
|
+
V = se(B), H = /* @__PURE__ */ new WeakMap(), i(V, 4, "placement", Ie, U, H), i(V, 1, "watchContentSize", Fe, U), i(V, 13, "vocabulary", Re, U), i(V, 13, "elementSetup", Le, U), o(V, U), e(U, "UIDiagramNode"), r(U, "vocabulary", l(V, 12, U, z)), l(V, 15, U), r(U, "elementSetup", l(V, 16, U, {
|
|
877
|
+
styleSheets: { "diagram-node": Ne },
|
|
878
|
+
delegatesFocus: !1
|
|
879
|
+
})), l(V, 19, U);
|
|
880
|
+
var W = U, Be = 16, Ve = "placed", He = 1, Ue = "@layer ui.components.diagram.types{:host{max-width:100%;display:block;overflow-x:auto}.canvas{width:fit-content;max-width:100%;position:relative}.canvas,.ui.diagram{--_ui-diagram-font-family:var(--ui-diagram-font-family,var(--ui-font-family));--_ui-diagram-background:var(--ui-diagram-background,var(--ui-background));--_ui-diagram-box-background:var(--ui-diagram-box-background,var(--ui-background));--_ui-diagram-ink:var(--ui-diagram-ink,var(--ui-text-color));--_ui-diagram-line-color:var(--ui-diagram-line-color,var(--ui-text-muted));--_ui-diagram-legend-background:var(--ui-diagram-legend-background,var(--ui-surface-muted))}svg.ui.diagram{font-family:var(--_ui-diagram-font-family);width:calc(var(--_ui-diagram-natural-width,0) * 1px);-webkit-user-select:none;user-select:none;max-width:100%;height:auto;display:block;overflow:visible;&.empty{display:none}}.menu{background:0 0;border:none;margin:0;padding:0;position:fixed;inset:auto;overflow:visible}}@layer ui.components.diagram.content{.ui.diagram{& .background{fill:var(--_ui-diagram-background)}& .box{fill:var(--_ui-diagram-box-background)}& :is(.field,.bullet,.legend-text){fill:var(--_ui-diagram-ink)}& .line{stroke:var(--_ui-diagram-line-color)}& .arrow{fill:var(--_ui-diagram-line-color)}& .legend{fill:var(--_ui-diagram-legend-background)}& .legend-label{fill:var(--_ui-diagram-ink)}& :is(.box,.header,.outline,.name,.note,.field,.bullet){cursor:grab}&.fixed :is(.box,.header,.outline,.name,.note,.field,.bullet){cursor:default}& text{pointer-events:auto}}}@layer ui.components.diagram.variations,ui.components.diagram.states;", We = /* @__PURE__ */ k("<div><svg></svg><slot>"), Ge = /* @__PURE__ */ k("<ui-item icon=undo>", 1), Ke = /* @__PURE__ */ k("<div popover=auto><ui-menu direction=vertical size=small><ui-item icon=download></ui-item><ui-item icon=code>", 1), qe = /* @__PURE__ */ k("<svg><rect></svg>", 2), Je = /* @__PURE__ */ k("<svg><path></svg>", 2), Ye = /* @__PURE__ */ k("<svg><polygon></svg>", 2), Xe = /* @__PURE__ */ k("<svg><text></svg>", 2), Ze, Qe, $e, et, tt, nt, rt, it, at, ot, st, ct, lt, ut, dt, ft, pt, mt, ht, gt, _t, vt, yt, bt, G, K, q, J, Y, X, Z, Q, DOMDiagramElement = class extends t {
|
|
881
|
+
static {
|
|
882
|
+
e(this, "DOMDiagramElement");
|
|
883
|
+
}
|
|
884
|
+
putBack() {
|
|
885
|
+
this.component?.putBack();
|
|
886
|
+
}
|
|
887
|
+
toSVG() {
|
|
888
|
+
return this.component?.toSVG();
|
|
889
|
+
}
|
|
890
|
+
saveSVG(e) {
|
|
891
|
+
this.component?.saveSVG(e);
|
|
892
|
+
}
|
|
893
|
+
saveJSON(e) {
|
|
894
|
+
this.component?.saveJSON(e);
|
|
895
|
+
}
|
|
896
|
+
}, $ = class _UIDiagram extends (G = c, bt = [ne], yt = [re], vt = [ae({
|
|
897
|
+
childList: !0,
|
|
898
|
+
characterData: !0,
|
|
899
|
+
subtree: !0
|
|
900
|
+
})], _t = [g], gt = [m(ue)], ht = [p], mt = [g], pt = [g], ft = [oe], dt = [p], ut = [ae({ childList: !0 })], lt = [g], ct = [m(ze)], st = [p], ot = [h("layout", "contentNodes", "isReady")], at = [g], it = [ee("moved")], rt = [m("pointerdown")], nt = [m("click")], tt = [ie], et = [m("keydown")], $e = [g], Qe = [m("contextmenu")], Ze = [h("menuAt")], G) {
|
|
901
|
+
constructor() {
|
|
902
|
+
super(...arguments), l(K, 5, this), u(this, q, l(K, 8, this, 0)), l(K, 11, this), r(this, "warned", /* @__PURE__ */ new Set()), r(this, "svg"), u(this, J, l(K, 12, this, 0)), l(K, 15, this), u(this, Y, l(K, 16, this, 1)), l(K, 19, this), u(this, X, l(K, 20, this, /* @__PURE__ */ new Map())), l(K, 23, this), u(this, Z, l(K, 24, this, /* @__PURE__ */ new Map())), l(K, 27, this), u(this, Q, l(K, 28, this)), l(K, 31, this), r(this, "menu"), r(this, "onMenuToggle", /* @__PURE__ */ e((e) => {
|
|
903
|
+
e.newState === "closed" && (this.menuAt = void 0);
|
|
904
|
+
}, "onMenuToggle"));
|
|
905
|
+
}
|
|
906
|
+
get childText() {
|
|
907
|
+
return C ? void 0 : le.textOf(this.domElement);
|
|
908
|
+
}
|
|
909
|
+
onChildDataChanged() {
|
|
910
|
+
this.childDataVersion++;
|
|
911
|
+
}
|
|
912
|
+
get drawnSpec() {
|
|
913
|
+
let e = _UIDiagram.specOf(this.spec);
|
|
914
|
+
if (e) return e;
|
|
915
|
+
let t = this.childText;
|
|
916
|
+
if (this.childDataVersion, !(t === void 0 || C)) try {
|
|
917
|
+
return _UIDiagram.specOf(le.valueOf(this.domElement));
|
|
918
|
+
} catch (e) {
|
|
919
|
+
this.warnOnce(`<${this.domElement.localName}>: invalid JSON in its script child`, e);
|
|
920
|
+
return;
|
|
921
|
+
}
|
|
922
|
+
}
|
|
923
|
+
static specOf(e) {
|
|
924
|
+
if (!e || typeof e != "object") return;
|
|
925
|
+
let { columns: t, nodes: r } = e;
|
|
926
|
+
return Array.isArray(t) || Array.isArray(r) ? e : void 0;
|
|
927
|
+
}
|
|
928
|
+
warnOnce(e, t) {
|
|
929
|
+
this.warned.has(e) || (this.warned.add(e), console.warn(e, ...t ? [t] : []));
|
|
930
|
+
}
|
|
931
|
+
watchFontsAndSize() {
|
|
932
|
+
this.measureVersion++, this.moves = this.rememberedMoves();
|
|
933
|
+
let t = /* @__PURE__ */ e(() => this.measureVersion++, "remeasure");
|
|
934
|
+
document.fonts?.addEventListener("loadingdone", t);
|
|
935
|
+
let r = new ResizeObserver(() => f(() => this.drawnScale = this.scaleNow()));
|
|
936
|
+
return this.svg && r.observe(this.svg), () => {
|
|
937
|
+
document.fonts?.removeEventListener("loadingdone", t), r.disconnect();
|
|
938
|
+
};
|
|
939
|
+
}
|
|
940
|
+
scaleNow() {
|
|
941
|
+
let e = this.svg?.getBoundingClientRect().width, t = this.layout;
|
|
942
|
+
if (!e || !t) return 1;
|
|
943
|
+
let r = e / t.width;
|
|
944
|
+
return Math.abs(r - this.drawnScale) < Ot ? this.drawnScale : r;
|
|
945
|
+
}
|
|
946
|
+
get measure() {
|
|
947
|
+
if (this.measureVersion, C || !this.svg) return A.estimatedWidth;
|
|
948
|
+
let e = getComputedStyle(this.svg).fontFamily;
|
|
949
|
+
return (t, r, i) => de.widthOf(t, `${i ? 600 : 400} ${r}px ${e}`) ?? A.estimatedWidth(t, r, i);
|
|
950
|
+
}
|
|
951
|
+
get words() {
|
|
952
|
+
return {
|
|
953
|
+
legend: this.translationForKey("legend"),
|
|
954
|
+
contains: this.translationForKey("contains"),
|
|
955
|
+
refersTo: this.translationForKey("refersTo"),
|
|
956
|
+
derived: this.translationForKey("derived")
|
|
957
|
+
};
|
|
958
|
+
}
|
|
959
|
+
get contentNodes() {
|
|
960
|
+
return [...this.domElement.children].filter((e) => W.isNode(e));
|
|
961
|
+
}
|
|
962
|
+
onContentResized() {
|
|
963
|
+
let e = /* @__PURE__ */ new Map();
|
|
964
|
+
for (let t of this.contentNodes) {
|
|
965
|
+
let r = t.getAttribute("name"), i = t.component?.contentSize;
|
|
966
|
+
r && i && e.set(r, i);
|
|
967
|
+
}
|
|
968
|
+
this.contentSizes = e;
|
|
969
|
+
}
|
|
970
|
+
get layout() {
|
|
971
|
+
let e = this.drawnSpec;
|
|
972
|
+
if (e) try {
|
|
973
|
+
return A.of(e, {
|
|
974
|
+
measure: this.measure,
|
|
975
|
+
words: this.words,
|
|
976
|
+
moved: this.moves,
|
|
977
|
+
sizes: this.contentSizes,
|
|
978
|
+
maxColumns: this.columns
|
|
979
|
+
});
|
|
980
|
+
} catch (e) {
|
|
981
|
+
if (!(e instanceof TypeError)) throw e;
|
|
982
|
+
this.warnOnce(`<${this.domElement.localName}>: ${e.message}`);
|
|
983
|
+
return;
|
|
984
|
+
}
|
|
985
|
+
}
|
|
986
|
+
onLayoutChanged(e, t, r) {
|
|
987
|
+
if (r) {
|
|
988
|
+
this.drawnScale = this.scaleNow();
|
|
989
|
+
for (let r of t) {
|
|
990
|
+
let t = e?.boxes.get(r.getAttribute("name") ?? ""), i = r.component;
|
|
991
|
+
i && (i.placement = t && e ? {
|
|
992
|
+
left: (t.x - e.x) / e.width * 100,
|
|
993
|
+
top: (t.y - e.y) / e.height * 100
|
|
994
|
+
} : void 0);
|
|
995
|
+
}
|
|
996
|
+
}
|
|
997
|
+
}
|
|
998
|
+
get isMoved() {
|
|
999
|
+
return [...this.moves.values()].some((e) => e.dx || e.dy);
|
|
1000
|
+
}
|
|
1001
|
+
onPress(t) {
|
|
1002
|
+
if (this.fixed || t.button !== 0 || !this.layout) return;
|
|
1003
|
+
let r = this.boxNameAt(t);
|
|
1004
|
+
if (!r || this.contentNodes.find((e) => e.getAttribute("name") === r)?.component?.isOnResizeGrip(t.clientX, t.clientY)) return;
|
|
1005
|
+
let i = t.composedPath()[0], a = this.moves, o = a.get(r) ?? {
|
|
1006
|
+
dx: 0,
|
|
1007
|
+
dy: 0
|
|
1008
|
+
}, s = 1 / this.drawnScale, c = i;
|
|
1009
|
+
new fe(c, t, {
|
|
1010
|
+
carried: [c],
|
|
1011
|
+
follows: !1,
|
|
1012
|
+
placing: /* @__PURE__ */ e((e, i) => {
|
|
1013
|
+
let c = {
|
|
1014
|
+
dx: o.dx + (e - t.clientX) * s,
|
|
1015
|
+
dy: o.dy + (i - t.clientY) * s
|
|
1016
|
+
};
|
|
1017
|
+
this.moves = new Map(a).set(r, c);
|
|
1018
|
+
}, "placing"),
|
|
1019
|
+
onDrop: /* @__PURE__ */ e(() => {
|
|
1020
|
+
this.keepMoves();
|
|
1021
|
+
let e = this.moves.get(r) ?? {
|
|
1022
|
+
dx: 0,
|
|
1023
|
+
dy: 0
|
|
1024
|
+
};
|
|
1025
|
+
this.send("ui-node-moved", {
|
|
1026
|
+
name: r,
|
|
1027
|
+
dx: e.dx,
|
|
1028
|
+
dy: e.dy
|
|
1029
|
+
});
|
|
1030
|
+
}, "onDrop"),
|
|
1031
|
+
onCancel: /* @__PURE__ */ e(() => this.moves = a, "onCancel")
|
|
1032
|
+
});
|
|
1033
|
+
}
|
|
1034
|
+
onBoxClick(e) {
|
|
1035
|
+
let t = this.boxNameAt(e);
|
|
1036
|
+
t && this.send("ui-node-clicked", {
|
|
1037
|
+
name: t,
|
|
1038
|
+
originalEvent: e
|
|
1039
|
+
});
|
|
1040
|
+
}
|
|
1041
|
+
boxNameAt(e) {
|
|
1042
|
+
for (let t of e.composedPath()) {
|
|
1043
|
+
if (!(t instanceof Element)) continue;
|
|
1044
|
+
if (t === this.domElement) return;
|
|
1045
|
+
let e = t.getAttribute("data-node") ?? (W.isNode(t) ? t.getAttribute("name") : null);
|
|
1046
|
+
if (e) return e;
|
|
1047
|
+
}
|
|
1048
|
+
}
|
|
1049
|
+
putBack() {
|
|
1050
|
+
this.moves = /* @__PURE__ */ new Map(), this.keepMoves();
|
|
1051
|
+
}
|
|
1052
|
+
rememberedMoves() {
|
|
1053
|
+
let e = this.remember ? _UIDiagram.store.get(this.remember) : void 0;
|
|
1054
|
+
if (!e || typeof e != "object") return /* @__PURE__ */ new Map();
|
|
1055
|
+
let t = /* @__PURE__ */ new Map();
|
|
1056
|
+
for (let [r, i] of Object.entries(e)) Array.isArray(i) && typeof i[0] == "number" && typeof i[1] == "number" && t.set(r, {
|
|
1057
|
+
dx: i[0],
|
|
1058
|
+
dy: i[1]
|
|
1059
|
+
});
|
|
1060
|
+
return t;
|
|
1061
|
+
}
|
|
1062
|
+
keepMoves() {
|
|
1063
|
+
if (!this.remember) return;
|
|
1064
|
+
let t = [...this.moves].filter(([, e]) => e.dx || e.dy);
|
|
1065
|
+
if (!t.length) return _UIDiagram.store.forget(this.remember);
|
|
1066
|
+
let r = /* @__PURE__ */ e((e) => Math.round(e * 10) / 10, "rounded");
|
|
1067
|
+
_UIDiagram.store.set(this.remember, Object.fromEntries(t.map(([e, t]) => [e, [r(t.dx), r(t.dy)]])));
|
|
1068
|
+
}
|
|
1069
|
+
static get store() {
|
|
1070
|
+
return _UIDiagram.prefs ??= new ce(Mt);
|
|
1071
|
+
}
|
|
1072
|
+
onBoxKey(e) {
|
|
1073
|
+
let t = this.boxNameAt(e);
|
|
1074
|
+
if (!t || !this.layout) return;
|
|
1075
|
+
if (e.key === "Enter" || e.key === " ") {
|
|
1076
|
+
e.preventDefault(), this.send("ui-node-clicked", {
|
|
1077
|
+
name: t,
|
|
1078
|
+
originalEvent: e
|
|
1079
|
+
});
|
|
1080
|
+
return;
|
|
1081
|
+
}
|
|
1082
|
+
let [r, i] = jt[e.key] ?? [];
|
|
1083
|
+
if (r === void 0 || i === void 0 || this.fixed) return;
|
|
1084
|
+
e.preventDefault();
|
|
1085
|
+
let a = e.shiftKey ? At : kt, o = this.moves.get(t) ?? {
|
|
1086
|
+
dx: 0,
|
|
1087
|
+
dy: 0
|
|
1088
|
+
}, s = {
|
|
1089
|
+
dx: o.dx + r * a,
|
|
1090
|
+
dy: o.dy + i * a
|
|
1091
|
+
};
|
|
1092
|
+
this.moves = new Map(this.moves).set(t, s), this.keepMoves(), this.send("ui-node-moved", {
|
|
1093
|
+
name: t,
|
|
1094
|
+
dx: s.dx,
|
|
1095
|
+
dy: s.dy
|
|
1096
|
+
});
|
|
1097
|
+
}
|
|
1098
|
+
static isFocusTarget(e) {
|
|
1099
|
+
return e.type === "rect" && !!e.node && (e.role === "outline" || e.role === "header");
|
|
1100
|
+
}
|
|
1101
|
+
onContextMenu(e) {
|
|
1102
|
+
this.layout && (e.preventDefault(), this.menuAt = {
|
|
1103
|
+
x: e.clientX,
|
|
1104
|
+
y: e.clientY
|
|
1105
|
+
});
|
|
1106
|
+
}
|
|
1107
|
+
onMenuAt(e) {
|
|
1108
|
+
e && f(() => {
|
|
1109
|
+
this.menu?.isConnected && !this.menu.matches(":popover-open") && this.menu.showPopover();
|
|
1110
|
+
});
|
|
1111
|
+
}
|
|
1112
|
+
pick(e) {
|
|
1113
|
+
this.menu?.hidePopover(), e();
|
|
1114
|
+
}
|
|
1115
|
+
toSVG() {
|
|
1116
|
+
let e = this.layout;
|
|
1117
|
+
if (e) return Ae.of(e, this.svg ? getComputedStyle(this.svg).fontFamily : void 0);
|
|
1118
|
+
}
|
|
1119
|
+
saveSVG(e = this.remember || Nt) {
|
|
1120
|
+
let t = this.toSVG();
|
|
1121
|
+
t && _UIDiagram.download(t, "image/svg+xml", `${e}.svg`);
|
|
1122
|
+
}
|
|
1123
|
+
saveJSON(e = this.remember || Nt) {
|
|
1124
|
+
let t = this.drawnSpec;
|
|
1125
|
+
t && _UIDiagram.download(`${JSON.stringify(t, null, 2)}
|
|
1126
|
+
`, "application/json", `${e}.json`);
|
|
1127
|
+
}
|
|
1128
|
+
static download(e, t, r) {
|
|
1129
|
+
let i = document.createElement("a");
|
|
1130
|
+
i.href = URL.createObjectURL(new Blob([e], { type: t })), i.download = r, i.click(), d(Pt, () => URL.revokeObjectURL(i.href)).catch((e) => console.error(e));
|
|
1131
|
+
}
|
|
1132
|
+
get extraClass() {
|
|
1133
|
+
return this.layout ? void 0 : St;
|
|
1134
|
+
}
|
|
1135
|
+
render() {
|
|
1136
|
+
let e = this;
|
|
1137
|
+
var t = We(), r = t.firstChild, i = r.nextSibling;
|
|
1138
|
+
return T(() => (t) => e.svg = t, r), S(r, y(pe, {
|
|
1139
|
+
get each() {
|
|
1140
|
+
return e.layout?.shapes ?? [];
|
|
1141
|
+
},
|
|
1142
|
+
keyed: !1,
|
|
1143
|
+
children: (t) => e.shape(t)
|
|
1144
|
+
})), i._$owner = x(), S(t, y(me, {
|
|
1145
|
+
get when() {
|
|
1146
|
+
return e.menuAt;
|
|
1147
|
+
},
|
|
1148
|
+
children: (t) => (() => {
|
|
1149
|
+
var r = Ke(), i = r.firstChild, a = i.firstChild, o = a.nextSibling;
|
|
1150
|
+
return ge(r, "toggle", e.onMenuToggle), T(() => (t) => e.menu = t, r), i._$owner = x(), S(i, y(me, {
|
|
1151
|
+
get when() {
|
|
1152
|
+
return e.isMoved;
|
|
1153
|
+
},
|
|
1154
|
+
get children() {
|
|
1155
|
+
var t = Ge();
|
|
1156
|
+
return t._$$click = () => e.pick(() => e.putBack()), t._$owner = x(), S(t, () => e.translationForKey("putBack")), t;
|
|
1157
|
+
}
|
|
1158
|
+
}), a), a._$$click = () => e.pick(() => e.saveSVG()), a._$owner = x(), S(a, () => e.translationForKey("saveSVG")), o._$$click = () => e.pick(() => e.saveJSON()), o._$owner = x(), S(o, () => e.translationForKey("saveJSON")), b(() => ({
|
|
1159
|
+
e: w(wt),
|
|
1160
|
+
t: e.partForName("menu"),
|
|
1161
|
+
a: `${t().x}px`,
|
|
1162
|
+
o: `${t().y}px`
|
|
1163
|
+
}), ({ e, t, a: i, o: a }, o) => {
|
|
1164
|
+
v(r, e, o?.e), t !== o?.t && E(r, "part", t), i !== o?.a && ve(r, "left", i), a !== o?.o && ve(r, "top", a);
|
|
1165
|
+
}), r;
|
|
1166
|
+
})()
|
|
1167
|
+
}), null), b(() => ({
|
|
1168
|
+
e: w(Ct),
|
|
1169
|
+
t: { [Dt]: e.drawnScale.toFixed(4) },
|
|
1170
|
+
a: w([e.rootClass, { [Tt]: !!e.fixed }]),
|
|
1171
|
+
o: e.partForName("diagram"),
|
|
1172
|
+
i: e.layout ? "group" : void 0,
|
|
1173
|
+
n: e.summary(),
|
|
1174
|
+
s: e.viewBox(),
|
|
1175
|
+
h: w(e.layout && { [Et]: String(Math.round(e.layout.width)) })
|
|
1176
|
+
}), ({ e, t: i, a, o, i: s, n: c, s: l, h: u }, d) => {
|
|
1177
|
+
v(t, e, d?.e), O(t, i, d?.t), v(r, a, d?.a), o !== d?.o && E(r, "part", o), s !== d?.i && E(r, "role", s), c !== d?.n && E(r, "aria-label", c), l !== d?.s && E(r, "viewBox", l), O(r, u, d?.h);
|
|
1178
|
+
}), t;
|
|
1179
|
+
}
|
|
1180
|
+
shape(t) {
|
|
1181
|
+
let r = /* @__PURE__ */ e(() => {
|
|
1182
|
+
let { fill: e, stroke: r, dash: i } = t();
|
|
1183
|
+
return {
|
|
1184
|
+
fill: e ?? "none",
|
|
1185
|
+
...r && {
|
|
1186
|
+
stroke: r,
|
|
1187
|
+
"stroke-width": t().type === "path" ? "1.3" : "1.2"
|
|
1188
|
+
},
|
|
1189
|
+
...i && { "stroke-dasharray": i }
|
|
1190
|
+
};
|
|
1191
|
+
}, "paint"), i = this;
|
|
1192
|
+
return y(he, { get children() {
|
|
1193
|
+
return [
|
|
1194
|
+
y(_, {
|
|
1195
|
+
get when() {
|
|
1196
|
+
return _UIDiagram.as(t(), "rect");
|
|
1197
|
+
},
|
|
1198
|
+
children: (e) => (() => {
|
|
1199
|
+
var t = qe();
|
|
1200
|
+
return D(t, [{
|
|
1201
|
+
get class() {
|
|
1202
|
+
return e().role;
|
|
1203
|
+
},
|
|
1204
|
+
get "data-node"() {
|
|
1205
|
+
return e().node;
|
|
1206
|
+
},
|
|
1207
|
+
get tabindex() {
|
|
1208
|
+
return _UIDiagram.isFocusTarget(e()) ? 0 : void 0;
|
|
1209
|
+
},
|
|
1210
|
+
get role() {
|
|
1211
|
+
return _UIDiagram.isFocusTarget(e()) ? "button" : void 0;
|
|
1212
|
+
},
|
|
1213
|
+
get "aria-label"() {
|
|
1214
|
+
return _UIDiagram.isFocusTarget(e()) ? e().node : void 0;
|
|
1215
|
+
},
|
|
1216
|
+
get "aria-description"() {
|
|
1217
|
+
return _UIDiagram.isFocusTarget(e()) && !i.fixed ? i.moveHint() : void 0;
|
|
1218
|
+
},
|
|
1219
|
+
get x() {
|
|
1220
|
+
return e().x;
|
|
1221
|
+
},
|
|
1222
|
+
get y() {
|
|
1223
|
+
return e().y;
|
|
1224
|
+
},
|
|
1225
|
+
get width() {
|
|
1226
|
+
return e().width;
|
|
1227
|
+
},
|
|
1228
|
+
get height() {
|
|
1229
|
+
return e().height;
|
|
1230
|
+
},
|
|
1231
|
+
get rx() {
|
|
1232
|
+
return e().rx;
|
|
1233
|
+
}
|
|
1234
|
+
}, r], !1), t;
|
|
1235
|
+
})()
|
|
1236
|
+
}),
|
|
1237
|
+
y(_, {
|
|
1238
|
+
get when() {
|
|
1239
|
+
return _UIDiagram.as(t(), "path");
|
|
1240
|
+
},
|
|
1241
|
+
children: (e) => (() => {
|
|
1242
|
+
var t = Je();
|
|
1243
|
+
return D(t, [{
|
|
1244
|
+
get class() {
|
|
1245
|
+
return e().role;
|
|
1246
|
+
},
|
|
1247
|
+
get "data-node"() {
|
|
1248
|
+
return e().node;
|
|
1249
|
+
},
|
|
1250
|
+
get d() {
|
|
1251
|
+
return e().d;
|
|
1252
|
+
}
|
|
1253
|
+
}, r], !1), t;
|
|
1254
|
+
})()
|
|
1255
|
+
}),
|
|
1256
|
+
y(_, {
|
|
1257
|
+
get when() {
|
|
1258
|
+
return _UIDiagram.as(t(), "arrow");
|
|
1259
|
+
},
|
|
1260
|
+
children: (e) => (() => {
|
|
1261
|
+
var t = Ye();
|
|
1262
|
+
return D(t, [{
|
|
1263
|
+
get class() {
|
|
1264
|
+
return e().role;
|
|
1265
|
+
},
|
|
1266
|
+
get points() {
|
|
1267
|
+
return e().points.map(([e, t]) => `${e},${t}`).join(" ");
|
|
1268
|
+
}
|
|
1269
|
+
}, r], !1), t;
|
|
1270
|
+
})()
|
|
1271
|
+
}),
|
|
1272
|
+
y(_, {
|
|
1273
|
+
get when() {
|
|
1274
|
+
return _UIDiagram.as(t(), "text");
|
|
1275
|
+
},
|
|
1276
|
+
children: (e) => (() => {
|
|
1277
|
+
var t = Xe();
|
|
1278
|
+
return S(t, () => e().text), b(() => ({
|
|
1279
|
+
e: w(e().role),
|
|
1280
|
+
t: e().node,
|
|
1281
|
+
a: e().x,
|
|
1282
|
+
o: e().y,
|
|
1283
|
+
i: String(e().size),
|
|
1284
|
+
n: String(e().weight),
|
|
1285
|
+
s: e().italic ? "italic" : void 0,
|
|
1286
|
+
h: e().fill
|
|
1287
|
+
}), ({ e, t: r, a: i, o: a, i: o, n: s, s: c, h: l }, u) => {
|
|
1288
|
+
v(t, e, u?.e), r !== u?.t && E(t, "data-node", r), i !== u?.a && E(t, "x", i), a !== u?.o && E(t, "y", a), o !== u?.i && E(t, "font-size", o), s !== u?.n && E(t, "font-weight", s), c !== u?.s && E(t, "font-style", c), l !== u?.h && E(t, "fill", l);
|
|
1289
|
+
}), t;
|
|
1290
|
+
})()
|
|
1291
|
+
})
|
|
1292
|
+
];
|
|
1293
|
+
} });
|
|
1294
|
+
}
|
|
1295
|
+
static as(e, t) {
|
|
1296
|
+
return e.type === t ? e : void 0;
|
|
1297
|
+
}
|
|
1298
|
+
moveHint() {
|
|
1299
|
+
return this.translationForKey("moveHint");
|
|
1300
|
+
}
|
|
1301
|
+
viewBox() {
|
|
1302
|
+
let e = this.layout;
|
|
1303
|
+
return e && `${e.x} ${e.y} ${e.width} ${e.height}`;
|
|
1304
|
+
}
|
|
1305
|
+
summary() {
|
|
1306
|
+
let e = this.layout;
|
|
1307
|
+
if (e) return this.translationForKey("summary", {
|
|
1308
|
+
boxes: e.boxes.size,
|
|
1309
|
+
links: e.edgeCount
|
|
1310
|
+
});
|
|
1311
|
+
}
|
|
1312
|
+
};
|
|
1313
|
+
K = se(G), q = /* @__PURE__ */ new WeakMap(), J = /* @__PURE__ */ new WeakMap(), Y = /* @__PURE__ */ new WeakMap(), X = /* @__PURE__ */ new WeakMap(), Z = /* @__PURE__ */ new WeakMap(), Q = /* @__PURE__ */ new WeakMap(), i(K, 2, "childText", vt, $), i(K, 4, "childDataVersion", _t, $, q), i(K, 1, "onChildDataChanged", gt, $), i(K, 2, "drawnSpec", ht, $), i(K, 4, "measureVersion", mt, $, J), i(K, 4, "drawnScale", pt, $, Y), i(K, 1, "watchFontsAndSize", ft, $), i(K, 2, "measure", dt, $), i(K, 2, "contentNodes", ut, $), i(K, 4, "contentSizes", lt, $, X), i(K, 1, "onContentResized", ct, $), i(K, 2, "layout", st, $), i(K, 1, "onLayoutChanged", ot, $), i(K, 4, "moves", at, $, Z), i(K, 2, "isMoved", it, $), i(K, 1, "onPress", rt, $), i(K, 1, "onBoxClick", nt, $), i(K, 1, "putBack", tt, $), i(K, 1, "onBoxKey", et, $), i(K, 4, "menuAt", $e, $, Q), i(K, 1, "onContextMenu", Qe, $), i(K, 1, "onMenuAt", Ze, $), i(K, 13, "vocabulary", bt, $), i(K, 13, "elementSetup", yt, $), o(K, $), e($, "UIDiagram"), r($, "vocabulary", l(K, 32, $, Me)), l(K, 35, $), r($, "elementSetup", l(K, 36, $, {
|
|
1314
|
+
styleSheets: { diagram: Ue },
|
|
1315
|
+
delegatesFocus: !1,
|
|
1316
|
+
DOMElement: DOMDiagramElement
|
|
1317
|
+
})), l(K, 39, $), r($, "prefs");
|
|
1318
|
+
var xt = $, St = "empty", Ct = "canvas", wt = "menu", Tt = "fixed", Et = "--_ui-diagram-natural-width", Dt = "--_ui-diagram-scale", Ot = .001, kt = 8, At = 40, jt = {
|
|
1319
|
+
ArrowLeft: [-1, 0],
|
|
1320
|
+
ArrowRight: [1, 0],
|
|
1321
|
+
ArrowUp: [0, -1],
|
|
1322
|
+
ArrowDown: [0, 1]
|
|
1323
|
+
}, Mt = "ui-diagram", Nt = "diagram", Pt = 10;
|
|
1324
|
+
_e(["click"]), xt.define(), W.define();
|
|
1325
|
+
//#endregion
|
|
1326
|
+
export { DiagramColumns, A as DiagramLayout, Ae as DiagramSVG, xt as UIDiagram, W as UIDiagramNode };
|
|
1327
|
+
|
|
1328
|
+
//# sourceMappingURL=ui-diagram.js.map
|