spell-ui 0.8.5 → 0.8.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README-components.md +14 -6
- package/README-frameworks.md +22 -12
- package/README-migrating.md +7 -6
- package/README-runtime.md +14 -13
- package/README-site.md +11 -11
- package/README-themes.md +38 -11
- package/README.md +61 -73
- package/dist/Dragging-CMZoLEWQ.js +169 -0
- package/dist/Dragging-CMZoLEWQ.js.map +1 -0
- package/dist/{MarkdownEngine-CbuT9Mjc.js → MarkdownEngine-CW1WGqNp.js} +122 -100
- package/dist/MarkdownEngine-CW1WGqNp.js.map +1 -0
- package/dist/{PrefStore-CeaTtjTz.js → PrefStore-Qv0e5y04.js} +22 -22
- package/dist/PrefStore-Qv0e5y04.js.map +1 -0
- package/dist/ScrollingRow-7n7Z-HIE.js +88 -0
- package/dist/ScrollingRow-7n7Z-HIE.js.map +1 -0
- package/dist/SitePages-CciwREek.js +51 -0
- package/dist/SitePages-CciwREek.js.map +1 -0
- package/dist/{SlottedItems-Ch0tzzlL.js → SlottedItems-Du3aJwG1.js} +22 -22
- package/dist/{SlottedItems-Ch0tzzlL.js.map → SlottedItems-Du3aJwG1.js.map} +1 -1
- package/dist/ThemeDraft-B7NPif4d.js +805 -0
- package/dist/ThemeDraft-B7NPif4d.js.map +1 -0
- package/dist/TreeMeasure-BVJeGb1L.js +42 -0
- package/dist/TreeMeasure-BVJeGb1L.js.map +1 -0
- package/dist/UIButton-DFEds67r.js +6 -0
- package/dist/UIButton-DFEds67r.js.map +1 -0
- package/dist/UIInput-BodVbUoQ.js +6 -0
- package/dist/UIInput-BodVbUoQ.js.map +1 -0
- package/dist/{UIKeys-DJF2TIKE.js → UIKeys-Rh_gUZjP.js} +10 -9
- package/dist/UIKeys-Rh_gUZjP.js.map +1 -0
- package/dist/UILabel-DgJUBzB_.js +6 -0
- package/dist/UILabel-DgJUBzB_.js.map +1 -0
- package/dist/UIMenu-zdcAtwTa.js +42 -0
- package/dist/UIMenu-zdcAtwTa.js.map +1 -0
- package/dist/{UIRuntime-BBuehGly.js → UIRuntime-KH309p5B.js} +398 -207
- package/dist/UIRuntime-KH309p5B.js.map +1 -0
- package/dist/_spell-element/DOMElement.d.ts +62 -5
- package/dist/_spell-element/MoveAndResize.d.ts +75 -0
- package/dist/_spell-element/UIComponent.d.ts +42 -0
- package/dist/_spell-element/elements.types.d.ts +47 -0
- package/dist/_spell-element/index.d.ts +1 -0
- package/dist/_spell-element/vocabulary.types.d.ts +34 -2
- package/dist/{runtime → _util}/Api.d.ts +14 -4
- package/dist/_util/Dragging.d.ts +148 -0
- package/dist/_util/ListSelection.d.ts +46 -0
- package/dist/{util → _util}/LoadOnce.d.ts +9 -1
- package/dist/_util/ReconnectingSocket.d.ts +51 -0
- package/dist/_util/diagram/DiagramColumns.d.ts +14 -0
- package/dist/_util/diagram/DiagramLayout.d.ts +119 -0
- package/dist/_util/diagram/DiagramSVG.d.ts +17 -0
- package/dist/_util/dom.d.ts +10 -0
- package/dist/_util/fetching.d.ts +92 -0
- package/dist/_util/measures/Dimension.d.ts +63 -0
- package/dist/_util/measures/MeasureSystem.d.ts +66 -0
- package/dist/_util/measures/dimensions.generated.d.ts +16 -0
- package/dist/_util/persist/ColorScheme.d.ts +6 -0
- package/dist/_util/persist/ServerPlace.d.ts +42 -0
- package/dist/_util/persist/WaitedOnPlace.d.ts +27 -0
- package/dist/_util/persist/persist.types.d.ts +21 -2
- package/dist/_util/timing.d.ts +10 -1
- package/dist/api.js +8 -7
- package/dist/api.js.map +1 -1
- package/dist/components/ComponentDefinitions.d.ts +29 -0
- package/dist/components/components.es.d.ts +13 -0
- package/dist/components/components.types.d.ts +113 -8
- package/dist/components/ui-accordion/UIAccordion.d.ts +1 -0
- package/dist/components/ui-accordion/UIAccordion.en.d.ts +1 -0
- package/dist/components/ui-action/UIAction.en.d.ts +5 -1
- package/dist/components/ui-ad/UIAd.d.ts +1 -0
- package/dist/components/ui-ad/UIAd.en.d.ts +1 -0
- package/dist/components/ui-breadcrumbs/UIBreadcrumb.d.ts +1 -0
- package/dist/components/ui-breadcrumbs/UIBreadcrumb.en.d.ts +1 -0
- package/dist/components/ui-breadcrumbs/UIBreadcrumbs.d.ts +1 -0
- package/dist/components/ui-breadcrumbs/UIBreadcrumbs.en.d.ts +1 -0
- package/dist/components/ui-button/UIButton.d.ts +8 -3
- package/dist/components/ui-button/UIButton.en.d.ts +9 -4
- package/dist/components/ui-button/UIButton.es.d.ts +6 -0
- package/dist/components/ui-button/UIButton.fallback.d.ts +8 -3
- package/dist/components/ui-button/UIButtons.d.ts +1 -0
- package/dist/components/ui-button/UIButtons.en.d.ts +1 -0
- package/dist/components/ui-button/UIOr.d.ts +1 -0
- package/dist/components/ui-button/UIOr.en.d.ts +1 -0
- package/dist/components/ui-calendar/UICalendar.d.ts +6 -0
- package/dist/components/ui-calendar/UICalendar.en.d.ts +6 -0
- package/dist/components/ui-calendar/UICalendar.fallback.d.ts +6 -0
- package/dist/components/ui-card/CardClicks.d.ts +40 -0
- package/dist/components/ui-card/UICard.d.ts +41 -0
- package/dist/components/ui-card/UICard.en.d.ts +49 -0
- package/dist/components/ui-card/UICard.es.d.ts +1 -0
- package/dist/components/ui-card/UICards.d.ts +31 -0
- package/dist/components/ui-card/UICards.en.d.ts +31 -0
- package/dist/components/ui-card/UICards.es.d.ts +8 -0
- package/dist/components/ui-checkbox/CheckControl.d.ts +7 -0
- package/dist/components/ui-checkbox/UICheckbox.d.ts +7 -0
- package/dist/components/ui-checkbox/UICheckbox.en.d.ts +7 -0
- package/dist/components/ui-checkbox/UICheckbox.es.d.ts +1 -0
- package/dist/components/ui-checkbox/UICheckbox.fallback.d.ts +7 -0
- package/dist/components/ui-checkbox/UICheckbox.types.d.ts +5 -0
- package/dist/components/ui-checkbox/UIRadio.d.ts +8 -0
- package/dist/components/ui-checkbox/UIRadio.en.d.ts +6 -0
- package/dist/components/ui-code/UICode.en.d.ts +1 -0
- package/dist/components/ui-comment/UIComment.d.ts +1 -0
- package/dist/components/ui-comment/UIComment.en.d.ts +1 -0
- package/dist/components/ui-comment/UIComments.d.ts +1 -0
- package/dist/components/ui-comment/UIComments.en.d.ts +1 -0
- package/dist/components/ui-components/PackHotSwap.d.ts +17 -1
- package/dist/components/ui-components/UIComponents.d.ts +1 -0
- package/dist/components/ui-components/UIComponents.en.d.ts +1 -0
- package/dist/components/ui-container/UIContainer.d.ts +11 -0
- package/dist/components/ui-container/UIContainer.en.d.ts +7 -0
- package/dist/components/ui-container/UIContainer.es.d.ts +1 -0
- package/dist/components/ui-diagram/UIDiagram.d.ts +268 -0
- package/dist/components/ui-diagram/UIDiagram.en.d.ts +106 -0
- package/dist/components/ui-diagram/UIDiagram.es.d.ts +37 -0
- package/dist/components/ui-diagram/UIDiagramNode.d.ts +98 -0
- package/dist/components/ui-diagram/UIDiagramNode.en.d.ts +38 -0
- package/dist/components/ui-diagram/UIDiagramNode.es.d.ts +16 -0
- package/dist/components/ui-diagram/index.d.ts +8 -0
- package/dist/components/ui-dimension/UIDimension.d.ts +81 -0
- package/dist/components/ui-dimension/UIDimension.en.d.ts +54 -0
- package/dist/components/ui-dimension/UIDimension.es.d.ts +22 -0
- package/dist/components/ui-dimension/index.d.ts +2 -0
- package/dist/components/ui-dimmer/UIDimmer.d.ts +6 -1
- package/dist/components/ui-dimmer/UIDimmer.en.d.ts +1 -0
- package/dist/components/ui-dimmer/UIDimmer.es.d.ts +1 -1
- package/dist/components/ui-divider/UIDivider.d.ts +2 -0
- package/dist/components/ui-divider/UIDivider.en.d.ts +2 -0
- package/dist/components/ui-divider/UIDivider.es.d.ts +1 -0
- package/dist/components/ui-dropdown/UIDropdown.d.ts +6 -0
- package/dist/components/ui-dropdown/UIDropdown.en.d.ts +6 -0
- package/dist/components/ui-dropdown/UIDropdown.fallback.d.ts +6 -0
- package/dist/components/ui-embed/UIEmbed.d.ts +1 -0
- package/dist/components/ui-embed/UIEmbed.en.d.ts +1 -0
- package/dist/components/ui-emoji/UIEmoji.d.ts +1 -0
- package/dist/components/ui-emoji/UIEmoji.en.d.ts +1 -0
- package/dist/components/ui-example/UIExample.en.d.ts +4 -2
- package/dist/components/ui-example/UIExample.es.d.ts +3 -2
- package/dist/components/ui-feed/UIFeed.d.ts +1 -0
- package/dist/components/ui-feed/UIFeed.en.d.ts +1 -0
- package/dist/components/ui-feed/UIFeedEvent.d.ts +1 -0
- package/dist/components/ui-feed/UIFeedEvent.en.d.ts +1 -0
- package/dist/components/ui-flag/UIFlag.d.ts +1 -0
- package/dist/components/ui-flag/UIFlag.en.d.ts +1 -0
- package/dist/components/ui-flyout/UIFlyout.d.ts +1 -0
- package/dist/components/ui-flyout/UIFlyout.en.d.ts +1 -0
- package/dist/components/ui-form/FormBinding.d.ts +13 -1
- package/dist/components/ui-form/FormFields.d.ts +4 -4
- package/dist/components/ui-form/UIField.d.ts +30 -3
- package/dist/components/ui-form/UIField.en.d.ts +9 -0
- package/dist/components/ui-form/UIField.es.d.ts +6 -0
- package/dist/components/ui-form/UIFields.d.ts +1 -0
- package/dist/components/ui-form/UIFields.en.d.ts +1 -0
- package/dist/components/ui-form/UIForm.d.ts +15 -0
- package/dist/components/ui-form/UIForm.en.d.ts +6 -0
- package/dist/components/ui-form/UIRepeat.d.ts +1 -0
- package/dist/components/ui-form/UIRepeat.en.d.ts +1 -0
- package/dist/components/ui-form/index.d.ts +2 -1
- package/dist/components/ui-grid/UIColumn.d.ts +1 -0
- package/dist/components/ui-grid/UIColumn.en.d.ts +1 -0
- package/dist/components/ui-grid/UIGrid.d.ts +1 -0
- package/dist/components/ui-grid/UIGrid.en.d.ts +1 -0
- package/dist/components/ui-grid/UIRow.d.ts +1 -0
- package/dist/components/ui-grid/UIRow.en.d.ts +1 -0
- package/dist/components/ui-icon/UIIcon.d.ts +3 -2
- package/dist/components/ui-icon/UIIcon.en.d.ts +3 -2
- package/dist/components/ui-icon/UIIcons.d.ts +1 -0
- package/dist/components/ui-icon/UIIcons.en.d.ts +1 -0
- package/dist/components/ui-icon-picker/UIIconPicker.d.ts +6 -0
- package/dist/components/ui-icon-picker/UIIconPicker.en.d.ts +6 -0
- package/dist/components/ui-icon-picker/UIIconPicker.fallback.d.ts +6 -0
- package/dist/components/ui-image/UIImage.d.ts +34 -0
- package/dist/components/ui-image/UIImage.en.d.ts +23 -0
- package/dist/components/ui-image/UIImage.es.d.ts +2 -0
- package/dist/components/ui-image/UIImages.d.ts +1 -0
- package/dist/components/ui-image/UIImages.en.d.ts +1 -0
- package/dist/components/ui-include/UIInclude.d.ts +1 -0
- package/dist/components/ui-include/UIInclude.en.d.ts +1 -0
- package/dist/components/ui-input/TextControl.d.ts +7 -0
- package/dist/components/ui-input/UIInput.d.ts +22 -3
- package/dist/components/ui-input/UIInput.en.d.ts +9 -2
- package/dist/components/ui-input/UIInput.es.d.ts +2 -0
- package/dist/components/ui-input/UIInput.fallback.d.ts +9 -2
- package/dist/components/ui-input/UITextarea.d.ts +20 -0
- package/dist/components/ui-input/UITextarea.en.d.ts +15 -0
- package/dist/components/ui-input/UITextarea.es.d.ts +4 -0
- package/dist/components/ui-item/UIItem.d.ts +27 -4
- package/dist/components/ui-item/UIItem.en.d.ts +5 -1
- package/dist/components/ui-items/UIItems.d.ts +1 -0
- package/dist/components/ui-items/UIItems.en.d.ts +1 -0
- package/dist/components/ui-json/JsonChild.d.ts +30 -0
- package/dist/components/ui-json/UIJson.d.ts +128 -0
- package/dist/components/ui-json/UIJson.en.d.ts +71 -0
- package/dist/components/ui-json/UIJson.es.d.ts +12 -0
- package/dist/components/ui-json/index.d.ts +3 -0
- package/dist/components/ui-keys/UIKeys.d.ts +1 -0
- package/dist/components/ui-keys/UIKeys.en.d.ts +1 -0
- package/dist/components/ui-label/UILabel.d.ts +2 -0
- package/dist/components/ui-label/UILabel.en.d.ts +2 -0
- package/dist/components/ui-label/UILabel.es.d.ts +1 -0
- package/dist/components/ui-label/UILabels.d.ts +1 -0
- package/dist/components/ui-label/UILabels.en.d.ts +1 -0
- package/dist/components/ui-list/UIList.d.ts +2 -0
- package/dist/components/ui-list/UIList.en.d.ts +2 -0
- package/dist/components/ui-list/UIList.es.d.ts +1 -0
- package/dist/components/ui-loader/UILoader.d.ts +1 -0
- package/dist/components/ui-loader/UILoader.en.d.ts +1 -0
- package/dist/components/ui-markdown/MarkdownBox.d.ts +143 -0
- package/dist/components/ui-markdown/MarkdownEngine.d.ts +14 -2
- package/dist/components/ui-markdown/MarkdownFormats.d.ts +95 -0
- package/dist/components/ui-markdown/MarkdownSource.d.ts +57 -0
- package/dist/components/ui-markdown/UIMarkdown.d.ts +126 -6
- package/dist/components/ui-markdown/UIMarkdown.en.d.ts +111 -8
- package/dist/components/ui-markdown/UIMarkdown.es.d.ts +29 -1
- package/dist/components/ui-markdown/UIMarkdown.types.d.ts +26 -0
- package/dist/components/ui-menu/ScrollingRow.d.ts +79 -0
- package/dist/components/ui-menu/TitleFit.d.ts +3 -0
- package/dist/components/ui-menu/UIMenu.d.ts +97 -4
- package/dist/components/ui-menu/UIMenu.en.d.ts +50 -1
- package/dist/components/ui-menu/UIMenu.es.d.ts +4 -0
- package/dist/components/ui-message/UIMessage.d.ts +2 -0
- package/dist/components/ui-message/UIMessage.en.d.ts +2 -0
- package/dist/components/ui-message/UIMessage.es.d.ts +1 -0
- package/dist/components/ui-modal/UIModal.d.ts +1 -0
- package/dist/components/ui-modal/UIModal.en.d.ts +1 -0
- package/dist/components/ui-nag/UINag.d.ts +1 -0
- package/dist/components/ui-nag/UINag.en.d.ts +1 -0
- package/dist/components/ui-page/UIPage.d.ts +15 -0
- package/dist/components/ui-page/UIPage.en.d.ts +15 -0
- package/dist/components/ui-page/UIPage.es.d.ts +1 -0
- package/dist/components/ui-panel/UIPanel.d.ts +6 -0
- package/dist/components/ui-panel/UIPanel.en.d.ts +33 -20
- package/dist/components/ui-parts/UIActions.d.ts +1 -0
- package/dist/components/ui-parts/UIActions.en.d.ts +1 -0
- package/dist/components/ui-parts/UIAuthor.d.ts +1 -0
- package/dist/components/ui-parts/UIAuthor.en.d.ts +1 -0
- package/dist/components/ui-parts/UIAvatar.d.ts +1 -0
- package/dist/components/ui-parts/UIAvatar.en.d.ts +1 -0
- package/dist/components/ui-parts/UIContent.d.ts +1 -0
- package/dist/components/ui-parts/UIContent.en.d.ts +1 -0
- package/dist/components/ui-parts/UIDate.d.ts +1 -0
- package/dist/components/ui-parts/UIDate.en.d.ts +1 -0
- package/dist/components/ui-parts/UIDescription.d.ts +1 -0
- package/dist/components/ui-parts/UIDescription.en.d.ts +1 -0
- package/dist/components/ui-parts/UIDetail.d.ts +1 -0
- package/dist/components/ui-parts/UIDetail.en.d.ts +1 -0
- package/dist/components/ui-parts/UIExtra.d.ts +1 -0
- package/dist/components/ui-parts/UIExtra.en.d.ts +1 -0
- package/dist/components/ui-parts/UIHeader.d.ts +3 -1
- package/dist/components/ui-parts/UIHeader.en.d.ts +3 -1
- package/dist/components/ui-parts/UIMeta.d.ts +1 -0
- package/dist/components/ui-parts/UIMeta.en.d.ts +1 -0
- package/dist/components/ui-parts/UIParts.types.d.ts +15 -1
- package/dist/components/ui-parts/UISummary.d.ts +1 -0
- package/dist/components/ui-parts/UISummary.en.d.ts +1 -0
- package/dist/components/ui-parts/UITitle.d.ts +1 -0
- package/dist/components/ui-parts/UITitle.en.d.ts +1 -0
- package/dist/components/ui-parts/UIValue.d.ts +1 -0
- package/dist/components/ui-parts/UIValue.en.d.ts +1 -0
- package/dist/components/ui-placeholder/UIPlaceholder.d.ts +1 -0
- package/dist/components/ui-placeholder/UIPlaceholder.en.d.ts +1 -0
- package/dist/components/ui-placeholder/UIPlaceholderHeader.d.ts +1 -0
- package/dist/components/ui-placeholder/UIPlaceholderHeader.en.d.ts +1 -0
- package/dist/components/ui-placeholder/UIPlaceholderImage.d.ts +1 -0
- package/dist/components/ui-placeholder/UIPlaceholderImage.en.d.ts +1 -0
- package/dist/components/ui-placeholder/UIPlaceholderLine.d.ts +1 -0
- package/dist/components/ui-placeholder/UIPlaceholderLine.en.d.ts +1 -0
- package/dist/components/ui-placeholder/UIPlaceholderParagraph.d.ts +1 -0
- package/dist/components/ui-placeholder/UIPlaceholderParagraph.en.d.ts +1 -0
- package/dist/components/ui-popup/UIPopup.d.ts +30 -3
- package/dist/components/ui-popup/UIPopup.en.d.ts +7 -0
- package/dist/components/ui-popup/UIPopup.es.d.ts +1 -0
- package/dist/components/ui-progress/UIProgress.d.ts +2 -0
- package/dist/components/ui-progress/UIProgress.en.d.ts +2 -0
- package/dist/components/ui-progress/UIProgress.es.d.ts +1 -0
- package/dist/components/ui-property-editor/UIProperty.d.ts +132 -5
- package/dist/components/ui-property-editor/UIProperty.en.d.ts +11 -44
- package/dist/components/ui-property-editor/UIProperty.es.d.ts +4 -0
- package/dist/components/ui-property-editor/UIPropertyEditor.d.ts +38 -0
- package/dist/components/ui-property-editor/UIPropertyEditor.en.d.ts +1 -0
- package/dist/components/ui-property-editor/UIPropertyEditor.es.d.ts +4 -0
- package/dist/components/ui-property-editor/UIPropertyEditor.types.d.ts +33 -0
- package/dist/components/ui-property-editor/UIPropertyGroup.d.ts +12 -0
- package/dist/components/ui-property-editor/UIPropertyGroup.en.d.ts +2 -0
- package/dist/components/ui-property-editor/UIPropertyGroup.es.d.ts +9 -0
- package/dist/components/ui-property-editor/index.d.ts +1 -0
- package/dist/components/ui-quote/UIQuote.d.ts +1 -0
- package/dist/components/ui-quote/UIQuote.en.d.ts +1 -0
- package/dist/components/ui-rail/UIRail.d.ts +1 -0
- package/dist/components/ui-rail/UIRail.en.d.ts +1 -0
- package/dist/components/ui-rating/UIRating.d.ts +6 -0
- package/dist/components/ui-rating/UIRating.en.d.ts +6 -0
- package/dist/components/ui-rating/UIRating.fallback.d.ts +6 -0
- package/dist/components/ui-reveal/UIReveal.d.ts +1 -0
- package/dist/components/ui-reveal/UIReveal.en.d.ts +1 -0
- package/dist/components/ui-root/UIRoot.d.ts +18 -3
- package/dist/components/ui-root/UIRoot.en.d.ts +15 -0
- package/dist/components/ui-root/UIRoot.es.d.ts +1 -0
- package/dist/components/ui-search/UISearch.d.ts +48 -7
- package/dist/components/ui-search/UISearch.en.d.ts +13 -1
- package/dist/components/ui-search/UISearch.es.d.ts +1 -0
- package/dist/components/ui-search/UISearch.fallback.d.ts +13 -1
- package/dist/components/ui-section/UISection.d.ts +30 -1
- package/dist/components/ui-section/UISection.en.d.ts +10 -0
- package/dist/components/ui-section/UISection.es.d.ts +1 -0
- package/dist/components/ui-section/UISections.d.ts +1 -0
- package/dist/components/ui-section/UISections.en.d.ts +1 -0
- package/dist/components/ui-segment/UISegment.d.ts +2 -0
- package/dist/components/ui-segment/UISegment.en.d.ts +2 -0
- package/dist/components/ui-segment/UISegment.es.d.ts +1 -0
- package/dist/components/ui-segment/UISegments.d.ts +1 -0
- package/dist/components/ui-segment/UISegments.en.d.ts +1 -0
- package/dist/components/ui-select/UISelect.d.ts +6 -0
- package/dist/components/ui-select/UISelect.en.d.ts +6 -0
- package/dist/components/ui-select/UISelect.fallback.d.ts +6 -0
- package/dist/components/ui-shape/UIShape.d.ts +23 -2
- package/dist/components/ui-shape/UIShape.en.d.ts +8 -0
- package/dist/components/ui-shape/UIShape.es.d.ts +1 -0
- package/dist/components/ui-shape/UISide.d.ts +4 -0
- package/dist/components/ui-shape/UISide.en.d.ts +4 -0
- package/dist/components/ui-sidebar/UIPushable.d.ts +1 -0
- package/dist/components/ui-sidebar/UIPushable.en.d.ts +1 -0
- package/dist/components/ui-sidebar/UIPusher.d.ts +1 -0
- package/dist/components/ui-sidebar/UIPusher.en.d.ts +1 -0
- package/dist/components/ui-sidebar/UISidebar.d.ts +1 -0
- package/dist/components/ui-sidebar/UISidebar.en.d.ts +1 -0
- package/dist/components/ui-sides/UISides.d.ts +209 -0
- package/dist/components/ui-sides/UISides.en.d.ts +122 -0
- package/dist/components/ui-sides/UISides.es.d.ts +30 -0
- package/dist/components/ui-sides/UISides.fallback.d.ts +134 -0
- package/dist/components/ui-sides/index.d.ts +2 -0
- package/dist/components/ui-site-nav/SitePages.d.ts +53 -0
- package/dist/components/ui-site-nav/UISiteNav.d.ts +207 -0
- package/dist/components/ui-site-nav/UISiteNav.en.d.ts +87 -0
- package/dist/components/ui-site-nav/UISiteNav.es.d.ts +29 -0
- package/dist/components/ui-site-nav/index.d.ts +1 -0
- package/dist/components/ui-site-tabs/UISiteTabs.d.ts +126 -0
- package/dist/components/ui-site-tabs/UISiteTabs.en.d.ts +49 -0
- package/dist/components/ui-site-tabs/UISiteTabs.es.d.ts +18 -0
- package/dist/components/ui-site-tabs/index.d.ts +1 -0
- package/dist/components/ui-slider/UISlider.d.ts +7 -0
- package/dist/components/ui-slider/UISlider.en.d.ts +7 -0
- package/dist/components/ui-slider/UISlider.es.d.ts +1 -0
- package/dist/components/ui-slider/UISlider.fallback.d.ts +7 -0
- package/dist/components/ui-space/UISpace.d.ts +1 -0
- package/dist/components/ui-space/UISpace.en.d.ts +1 -0
- package/dist/components/ui-split-panel/UISplitPanel.d.ts +175 -0
- package/dist/components/ui-split-panel/UISplitPanel.en.d.ts +74 -0
- package/dist/components/ui-split-panel/UISplitPanel.es.d.ts +25 -0
- package/dist/components/ui-split-panel/index.d.ts +2 -0
- package/dist/components/ui-stack/UIStack.d.ts +31 -5
- package/dist/components/ui-stack/UIStack.en.d.ts +15 -3
- package/dist/components/ui-statistic/UIStatistic.d.ts +1 -0
- package/dist/components/ui-statistic/UIStatistic.en.d.ts +1 -0
- package/dist/components/ui-statistic/UIStatistics.d.ts +1 -0
- package/dist/components/ui-statistic/UIStatistics.en.d.ts +1 -0
- package/dist/components/ui-step/UIStep.d.ts +1 -0
- package/dist/components/ui-step/UIStep.en.d.ts +1 -0
- package/dist/components/ui-step/UISteps.d.ts +1 -0
- package/dist/components/ui-step/UISteps.en.d.ts +1 -0
- package/dist/components/ui-sticky/UISticky.d.ts +4 -0
- package/dist/components/ui-sticky/UISticky.en.d.ts +1 -0
- package/dist/components/ui-tab/UITab.d.ts +8 -0
- package/dist/components/ui-tab/UITab.en.d.ts +1 -0
- package/dist/components/ui-tab/UITabs.d.ts +107 -16
- package/dist/components/ui-tab/UITabs.en.d.ts +40 -1
- package/dist/components/ui-tab/UITabs.es.d.ts +4 -0
- package/dist/components/ui-table/TableEditing.d.ts +77 -0
- package/dist/components/ui-table/UICell.d.ts +1 -0
- package/dist/components/ui-table/UICell.en.d.ts +1 -0
- package/dist/components/ui-table/UITable.d.ts +145 -5
- package/dist/components/ui-table/UITable.en.d.ts +19 -0
- package/dist/components/ui-table/UITable.es.d.ts +3 -0
- package/dist/components/ui-terms/UITerm.d.ts +1 -0
- package/dist/components/ui-terms/UITerm.en.d.ts +1 -0
- package/dist/components/ui-terms/UITerms.d.ts +1 -0
- package/dist/components/ui-terms/UITerms.en.d.ts +1 -0
- package/dist/components/ui-text/UILink.d.ts +11 -0
- package/dist/components/ui-text/UILink.en.d.ts +4 -0
- package/dist/components/ui-text/UIText.d.ts +7 -0
- package/dist/components/ui-text/UIText.en.d.ts +7 -0
- package/dist/components/ui-text/UIText.es.d.ts +2 -0
- package/dist/components/ui-theme-editor/SavedTheme.d.ts +55 -43
- package/dist/components/ui-theme-editor/ThemeDraft.d.ts +15 -0
- package/dist/components/ui-theme-editor/UIColorChip.d.ts +1 -0
- package/dist/components/ui-theme-editor/UIColorChip.en.d.ts +1 -0
- package/dist/components/ui-theme-editor/UIThemeEditor.d.ts +157 -26
- package/dist/components/ui-theme-editor/UIThemeEditor.en.d.ts +79 -6
- package/dist/components/ui-theme-editor/UIThemeEditor.es.d.ts +20 -2
- package/dist/components/ui-theme-editor/UIThemeEditor.types.d.ts +0 -2
- package/dist/components/ui-theme-editor/UIThemeToken.d.ts +1 -0
- package/dist/components/ui-theme-editor/UIThemeToken.en.d.ts +1 -0
- package/dist/components/ui-theme-menu/HueDropdown.d.ts +47 -0
- package/dist/components/ui-theme-menu/ThemeMenu.d.ts +18 -7
- package/dist/components/ui-theme-menu/ThemePreference.d.ts +145 -36
- package/dist/components/ui-theme-menu/UIThemeMenu.d.ts +118 -7
- package/dist/components/ui-theme-menu/UIThemeMenu.en.d.ts +82 -2
- package/dist/components/ui-theme-menu/UIThemeMenu.es.d.ts +21 -1
- package/dist/components/ui-theme-menu/UIThemeMenu.types.d.ts +36 -8
- package/dist/components/ui-theme-menu/index.d.ts +2 -1
- package/dist/components/ui-toast/UIToast.d.ts +1 -0
- package/dist/components/ui-toast/UIToast.en.d.ts +1 -0
- package/dist/components/ui-toc/UIToc.d.ts +1 -0
- package/dist/components/ui-toc/UIToc.en.d.ts +1 -0
- package/dist/components/ui-toolbar/UIToolbar.d.ts +13 -10
- package/dist/components/ui-toolbar/UIToolbar.en.d.ts +138 -84
- package/dist/components/ui-toolbar/UIToolbar.es.d.ts +2 -0
- package/dist/components/ui-transition/UITransition.d.ts +1 -0
- package/dist/components/ui-transition/UITransition.en.d.ts +1 -0
- package/dist/components/ui-tree/UITree.d.ts +162 -0
- package/dist/components/ui-tree/UITree.en.d.ts +88 -0
- package/dist/components/ui-tree/UITree.es.d.ts +35 -0
- package/dist/components/ui-tree/UITreeItem.d.ts +204 -0
- package/dist/components/ui-tree/UITreeItem.en.d.ts +142 -0
- package/dist/components/ui-tree/UITreeItem.es.d.ts +32 -0
- package/dist/components/ui-tree/index.d.ts +3 -0
- package/dist/components/ui-tree-diagram/TreeData.d.ts +3 -12
- package/dist/components/ui-tree-diagram/TreeLayout.d.ts +54 -21
- package/dist/components/ui-tree-diagram/TreeMeasure.d.ts +36 -0
- package/dist/components/ui-tree-diagram/UITreeDiagram.d.ts +152 -27
- package/dist/components/ui-tree-diagram/UITreeDiagram.en.d.ts +47 -7
- package/dist/components/ui-tree-diagram/UITreeDiagram.es.d.ts +12 -1
- package/dist/components/ui-tree-diagram/UITreeDiagram.types.d.ts +66 -21
- package/dist/components/ui-tree-diagram/UITreeNode.d.ts +148 -0
- package/dist/components/ui-tree-diagram/UITreeNode.en.d.ts +69 -0
- package/dist/components/ui-tree-diagram/UITreeNode.es.d.ts +21 -0
- package/dist/components/ui-tree-diagram/index.d.ts +4 -2
- package/dist/components/ui-video/UIAudio.d.ts +1 -0
- package/dist/components/ui-video/UIAudio.en.d.ts +1 -0
- package/dist/components/ui-video/UIVideo.d.ts +1 -0
- package/dist/components/ui-video/UIVideo.en.d.ts +1 -0
- package/dist/components/ui-visibility/UIVisibility.d.ts +1 -0
- package/dist/components/ui-visibility/UIVisibility.en.d.ts +1 -0
- package/dist/components/ui-zoom/UIZoom.d.ts +1 -0
- package/dist/components/ui-zoom/UIZoom.en.d.ts +1 -0
- package/dist/{components.es-DmLzT-Bq.js → components.es-BOa_7gFF.js} +498 -109
- package/dist/components.es-BOa_7gFF.js.map +1 -0
- package/dist/core.d.ts +3 -1
- package/dist/core.js +1082 -511
- package/dist/core.js.map +1 -1
- package/dist/crisp-VfYZlTph.js +6 -0
- package/dist/{crisp-CoZRRDuQ.js.map → crisp-VfYZlTph.js.map} +1 -1
- package/dist/docs-components/index.d.ts +1 -0
- package/dist/docs-components/ui-docs-index/UIDocsIndex.d.ts +89 -0
- package/dist/docs-components/ui-docs-index/UIDocsIndex.en.d.ts +43 -0
- package/dist/docs-components/ui-docs-index/index.d.ts +2 -0
- package/dist/docs-components/ui-docs-nav/UIDocsNav.d.ts +54 -87
- package/dist/docs-components/ui-docs-nav/UIDocsNav.types.d.ts +2 -29
- package/dist/docs-components/ui-docs-search/SearchIndex.d.ts +8 -2
- package/dist/docs-components/ui-docs-search/UIDocsSearch.d.ts +10 -0
- package/dist/docs-components/ui-docs-search/UIDocsSearch.en.d.ts +5 -0
- package/dist/elements/AddressParameter.d.ts +87 -0
- package/dist/elements/DOMFormControl.d.ts +5 -0
- package/dist/elements/FormComponent.d.ts +32 -0
- package/dist/elements/LoadableBody.d.ts +6 -1
- package/dist/elements/LoadableComponent.d.ts +10 -1
- package/dist/elements/RootSettings.d.ts +43 -6
- package/dist/elements/SpellUISettings.d.ts +1 -0
- package/dist/elements/StickyWatch.d.ts +20 -0
- package/dist/elements/elements.types.d.ts +15 -0
- package/dist/elements/index.d.ts +2 -0
- package/dist/forms.js +93 -63
- package/dist/forms.js.map +1 -1
- package/dist/fruity-BRVlgJZd.js +6 -0
- package/dist/fruity-BRVlgJZd.js.map +1 -0
- package/dist/{fruity.theme-BJcMiPl1.js → fruity.theme-CbC7Jyvk.js} +2 -2
- package/dist/fruity.theme-CbC7Jyvk.js.map +1 -0
- package/dist/glass-x9tbbwVq.js +6 -0
- package/dist/glass-x9tbbwVq.js.map +1 -0
- package/dist/glass.theme-24wY2wH9.js +6 -0
- package/dist/glass.theme-24wY2wH9.js.map +1 -0
- package/dist/hot.js +536 -26
- package/dist/hot.js.map +1 -1
- package/dist/index.d.ts +8 -0
- package/dist/index.js +91 -81
- package/dist/jsx.d.ts +21149 -10377
- package/dist/matrix-QY2gWbJ0.js +6 -0
- package/dist/{matrix-CqA59hiF.js.map → matrix-QY2gWbJ0.js.map} +1 -1
- package/dist/{matrix.theme-jqQZjcq3.js → matrix.theme-_8xtwhDq.js} +2 -2
- package/dist/matrix.theme-_8xtwhDq.js.map +1 -0
- package/dist/midnight-BxlTQSfw.js +6 -0
- package/dist/{midnight-BnoVOrhC.js.map → midnight-BxlTQSfw.js.map} +1 -1
- package/dist/mockup-83ELBuVr.js +6 -0
- package/dist/mockup-83ELBuVr.js.map +1 -0
- package/dist/mockup.theme-DmpBgGBl.js +6 -0
- package/dist/mockup.theme-DmpBgGBl.js.map +1 -0
- package/dist/paper-M61nUilz.js +6 -0
- package/dist/{paper-CynH8ZuT.js.map → paper-M61nUilz.js.map} +1 -1
- package/dist/persist.types-D2m6wD-S.js +9 -0
- package/dist/persist.types-D2m6wD-S.js.map +1 -0
- package/dist/pop-CxXfytjk.js +6 -0
- package/dist/{pop-D2i9V_rG.js.map → pop-CxXfytjk.js.map} +1 -1
- package/dist/runtime/DataTooltips.d.ts +75 -0
- package/dist/runtime/PropertyControls.d.ts +15 -1
- package/dist/runtime/Sources.d.ts +16 -4
- package/dist/runtime/Styles.d.ts +11 -0
- package/dist/runtime/Themes.d.ts +10 -4
- package/dist/runtime/UIRuntime.d.ts +4 -1
- package/dist/runtime/index.d.ts +1 -1
- package/dist/runtime/runtime.types.d.ts +18 -85
- package/dist/spell-By5Y3jKP.js +6 -0
- package/dist/{spell-BFtLICm7.js.map → spell-By5Y3jKP.js.map} +1 -1
- package/dist/{spell.theme-B7AU7SQX.js → spell.theme-DxGj7qHx.js} +2 -2
- package/dist/spell.theme-DxGj7qHx.js.map +1 -0
- package/dist/styles/CodeThemeFile.d.ts +73 -0
- package/dist/styles/StyleGenerator.d.ts +6 -0
- package/dist/styles/styles.en.d.ts +141 -3
- package/dist/styles/styles.types.d.ts +2 -0
- package/dist/{styles.en-RLpYiO5_.js → styles.en-CUUxNwHo.js} +71 -14
- package/dist/styles.en-CUUxNwHo.js.map +1 -0
- package/dist/styles.js +13 -13
- package/dist/styles.js.map +1 -1
- package/dist/ui-accordion.js +54 -53
- package/dist/ui-accordion.js.map +1 -1
- package/dist/ui-action.js +20 -19
- package/dist/ui-action.js.map +1 -1
- package/dist/ui-ad.js +5 -4
- package/dist/ui-ad.js.map +1 -1
- package/dist/ui-breadcrumbs.js +15 -13
- package/dist/ui-breadcrumbs.js.map +1 -1
- package/dist/ui-button.js +132 -125
- package/dist/ui-button.js.map +1 -1
- package/dist/ui-calendar.js +208 -206
- package/dist/ui-calendar.js.map +1 -1
- package/dist/ui-card.js +260 -98
- package/dist/ui-card.js.map +1 -1
- package/dist/ui-checkbox.js +95 -81
- package/dist/ui-checkbox.js.map +1 -1
- package/dist/ui-code.js +25 -24
- package/dist/ui-code.js.map +1 -1
- package/dist/ui-comment.js +14 -12
- package/dist/ui-comment.js.map +1 -1
- package/dist/ui-components.js +7 -6
- package/dist/ui-components.js.map +1 -1
- package/dist/ui-container.js +24 -12
- package/dist/ui-container.js.map +1 -1
- package/dist/ui-diagram.js +1328 -0
- package/dist/ui-diagram.js.map +1 -0
- package/dist/ui-dimension.js +779 -0
- package/dist/ui-dimension.js.map +1 -0
- package/dist/ui-dimmer.js +36 -34
- package/dist/ui-dimmer.js.map +1 -1
- package/dist/ui-divider.js +7 -5
- package/dist/ui-divider.js.map +1 -1
- package/dist/ui-dropdown.js +107 -105
- package/dist/ui-dropdown.js.map +1 -1
- package/dist/ui-embed.js +36 -35
- package/dist/ui-embed.js.map +1 -1
- package/dist/ui-emoji.js +10 -9
- package/dist/ui-emoji.js.map +1 -1
- package/dist/ui-example.js +63 -61
- package/dist/ui-example.js.map +1 -1
- package/dist/ui-feed.js +12 -10
- package/dist/ui-feed.js.map +1 -1
- package/dist/ui-flag.js +10 -9
- package/dist/ui-flag.js.map +1 -1
- package/dist/ui-flyout.js +7 -6
- package/dist/ui-flyout.js.map +1 -1
- package/dist/ui-form.js +244 -162
- package/dist/ui-form.js.map +1 -1
- package/dist/ui-grid.js +21 -18
- package/dist/ui-grid.js.map +1 -1
- package/dist/ui-icon-picker.js +46 -44
- package/dist/ui-icon-picker.js.map +1 -1
- package/dist/ui-icon.js +17 -14
- package/dist/ui-icon.js.map +1 -1
- package/dist/ui-image.js +93 -55
- package/dist/ui-image.js.map +1 -1
- package/dist/ui-include.js +18 -17
- package/dist/ui-include.js.map +1 -1
- package/dist/ui-input.js +154 -112
- package/dist/ui-input.js.map +1 -1
- package/dist/ui-item.js +152 -102
- package/dist/ui-item.js.map +1 -1
- package/dist/ui-items.js +9 -8
- package/dist/ui-items.js.map +1 -1
- package/dist/ui-json.js +115 -0
- package/dist/ui-json.js.map +1 -0
- package/dist/ui-keys.js +1 -1
- package/dist/ui-label.js +18 -15
- package/dist/ui-label.js.map +1 -1
- package/dist/ui-list.js +7 -5
- package/dist/ui-list.js.map +1 -1
- package/dist/ui-loader.js +7 -6
- package/dist/ui-loader.js.map +1 -1
- package/dist/ui-markdown.js +975 -83
- package/dist/ui-markdown.js.map +1 -1
- package/dist/ui-menu.js +329 -196
- package/dist/ui-menu.js.map +1 -1
- package/dist/ui-message.js +20 -18
- package/dist/ui-message.js.map +1 -1
- package/dist/ui-modal.js +46 -45
- package/dist/ui-modal.js.map +1 -1
- package/dist/ui-nag.js +19 -18
- package/dist/ui-nag.js.map +1 -1
- package/dist/ui-page.js +8 -7
- package/dist/ui-page.js.map +1 -1
- package/dist/ui-panel.js +28 -17
- package/dist/ui-panel.js.map +1 -1
- package/dist/ui-parts.js +66 -52
- package/dist/ui-parts.js.map +1 -1
- package/dist/ui-placeholder.js +21 -16
- package/dist/ui-placeholder.js.map +1 -1
- package/dist/ui-popup.js +113 -84
- package/dist/ui-popup.js.map +1 -1
- package/dist/ui-progress.js +9 -7
- package/dist/ui-progress.js.map +1 -1
- package/dist/ui-property-editor.js +706 -203
- package/dist/ui-property-editor.js.map +1 -1
- package/dist/ui-quote.js +5 -4
- package/dist/ui-quote.js.map +1 -1
- package/dist/ui-rail.js +5 -4
- package/dist/ui-rail.js.map +1 -1
- package/dist/ui-rating.js +31 -29
- package/dist/ui-rating.js.map +1 -1
- package/dist/ui-reveal.js +7 -6
- package/dist/ui-reveal.js.map +1 -1
- package/dist/ui-root.js +324 -158
- package/dist/ui-root.js.map +1 -1
- package/dist/ui-search.js +210 -168
- package/dist/ui-search.js.map +1 -1
- package/dist/ui-section.js +167 -130
- package/dist/ui-section.js.map +1 -1
- package/dist/ui-segment.js +15 -12
- package/dist/ui-segment.js.map +1 -1
- package/dist/ui-select.js +83 -81
- package/dist/ui-select.js.map +1 -1
- package/dist/ui-shape.js +86 -58
- package/dist/ui-shape.js.map +1 -1
- package/dist/ui-sidebar.js +59 -56
- package/dist/ui-sidebar.js.map +1 -1
- package/dist/ui-sides.js +325 -0
- package/dist/ui-sides.js.map +1 -0
- package/dist/ui-site-nav.js +329 -0
- package/dist/ui-site-nav.js.map +1 -0
- package/dist/ui-site-tabs.js +177 -0
- package/dist/ui-site-tabs.js.map +1 -0
- package/dist/ui-slider.js +84 -81
- package/dist/ui-slider.js.map +1 -1
- package/dist/ui-space.js +7 -6
- package/dist/ui-space.js.map +1 -1
- package/dist/ui-split-panel.js +298 -0
- package/dist/ui-split-panel.js.map +1 -0
- package/dist/ui-stack.js +47 -23
- package/dist/ui-stack.js.map +1 -1
- package/dist/ui-statistic.js +15 -13
- package/dist/ui-statistic.js.map +1 -1
- package/dist/ui-step.js +31 -29
- package/dist/ui-step.js.map +1 -1
- package/dist/ui-sticky.js +7 -6
- package/dist/ui-sticky.js.map +1 -1
- package/dist/ui-tab.js +230 -138
- package/dist/ui-tab.js.map +1 -1
- package/dist/ui-table.js +724 -162
- package/dist/ui-table.js.map +1 -1
- package/dist/ui-terms.js +12 -10
- package/dist/ui-terms.js.map +1 -1
- package/dist/ui-text.js +53 -28
- package/dist/ui-text.js.map +1 -1
- package/dist/ui-theme-editor.js +1018 -1545
- package/dist/ui-theme-editor.js.map +1 -1
- package/dist/ui-theme-menu-CuIjr8Ou.js +1493 -0
- package/dist/ui-theme-menu-CuIjr8Ou.js.map +1 -0
- package/dist/ui-toast.js +45 -44
- package/dist/ui-toast.js.map +1 -1
- package/dist/ui-toc.js +75 -74
- package/dist/ui-toc.js.map +1 -1
- package/dist/ui-toolbar.js +51 -73
- package/dist/ui-toolbar.js.map +1 -1
- package/dist/ui-transition.js +12 -11
- package/dist/ui-transition.js.map +1 -1
- package/dist/ui-tree-diagram.js +676 -197
- package/dist/ui-tree-diagram.js.map +1 -1
- package/dist/ui-tree.js +625 -0
- package/dist/ui-tree.js.map +1 -0
- package/dist/ui-video.js +13 -11
- package/dist/ui-video.js.map +1 -1
- package/dist/ui-visibility.js +26 -25
- package/dist/ui-visibility.js.map +1 -1
- package/dist/ui-zoom.js +79 -78
- package/dist/ui-zoom.js.map +1 -1
- package/dist/util/TopLayerTip.d.ts +28 -0
- package/dist/util/index.d.ts +5 -2
- package/dist/vocabulary/DefaultValues.d.ts +34 -0
- package/dist/vocabulary/SharedVocabulary.d.ts +4 -0
- package/dist/vocabulary/SharedVocabulary.es.d.ts +7 -0
- package/dist/vocabulary/ValueSets.d.ts +18 -0
- package/dist/vocabulary/Vocabulary.d.ts +1 -0
- package/dist/vocabulary/defaults.generated.d.ts +6 -0
- package/dist/vocabulary/index.d.ts +1 -0
- package/package.json +1 -1
- package/dist/MarkdownEngine-CbuT9Mjc.js.map +0 -1
- package/dist/PrefStore-CeaTtjTz.js.map +0 -1
- package/dist/UIButton-XkfGqgh6.js +0 -6
- package/dist/UIButton-XkfGqgh6.js.map +0 -1
- package/dist/UIInput-BUudZstW.js +0 -6
- package/dist/UIInput-BUudZstW.js.map +0 -1
- package/dist/UIKeys-DJF2TIKE.js.map +0 -1
- package/dist/UILabel-C1jy3Yl8.js +0 -6
- package/dist/UILabel-C1jy3Yl8.js.map +0 -1
- package/dist/UIMenu-Btd-8V3A.js +0 -42
- package/dist/UIMenu-Btd-8V3A.js.map +0 -1
- package/dist/UIRuntime-BBuehGly.js.map +0 -1
- package/dist/components.es-DmLzT-Bq.js.map +0 -1
- package/dist/crisp-CoZRRDuQ.js +0 -6
- package/dist/fruity-CQFYeRlh.js +0 -6
- package/dist/fruity-CQFYeRlh.js.map +0 -1
- package/dist/fruity.theme-BJcMiPl1.js.map +0 -1
- package/dist/glass-CAfW11kL.js +0 -6
- package/dist/glass-CAfW11kL.js.map +0 -1
- package/dist/glass.theme-DQcBbtCW.js +0 -6
- package/dist/glass.theme-DQcBbtCW.js.map +0 -1
- package/dist/matrix-CqA59hiF.js +0 -6
- package/dist/matrix.theme-jqQZjcq3.js.map +0 -1
- package/dist/midnight-BnoVOrhC.js +0 -6
- package/dist/paper-CynH8ZuT.js +0 -6
- package/dist/persist.types-CsZxS8TG.js +0 -9
- package/dist/persist.types-CsZxS8TG.js.map +0 -1
- package/dist/pop-D2i9V_rG.js +0 -6
- package/dist/spell-BFtLICm7.js +0 -6
- package/dist/spell.theme-B7AU7SQX.js.map +0 -1
- package/dist/styles.en-RLpYiO5_.js.map +0 -1
- package/dist/ui-theme-menu-DyKZygpV.js +0 -921
- package/dist/ui-theme-menu-DyKZygpV.js.map +0 -1
|
@@ -0,0 +1,298 @@
|
|
|
1
|
+
import "./rolldown-runtime-CYGlBXrH.js";
|
|
2
|
+
import { Bt as e, Ht as t, Lt as n, Rt as r, UIComponent as i, Ut as a, Vt as o, cssState as s, isSameList as c, on as l, onChange as u, proto as d, protoMerged as f, state as p, untracked as m, watches as h, zt as g } from "./core.js";
|
|
3
|
+
import { For as _ } from "solid-js";
|
|
4
|
+
import { addEvent as v, createComponent as y, delegateEvents as b, effect as x, getOwner as S, setAttribute as C, setStyleProperty as w, template as T } from "@solidjs/web";
|
|
5
|
+
//#region src/components/ui-split-panel/UISplitPanel.en.ts
|
|
6
|
+
var ee = {
|
|
7
|
+
tag: "ui-split-panel",
|
|
8
|
+
icon: "columns",
|
|
9
|
+
topics: ["layout", "containers"],
|
|
10
|
+
aka: [
|
|
11
|
+
"split view",
|
|
12
|
+
"split pane",
|
|
13
|
+
"resizable panes",
|
|
14
|
+
"panes",
|
|
15
|
+
"splitter",
|
|
16
|
+
"sash"
|
|
17
|
+
],
|
|
18
|
+
noun: "split panel",
|
|
19
|
+
description: "A split panel lays its children out side by side or one above the other, with bars to resize them.",
|
|
20
|
+
attributes: [
|
|
21
|
+
{
|
|
22
|
+
name: "columns",
|
|
23
|
+
group: "layout",
|
|
24
|
+
kind: "string",
|
|
25
|
+
description: "Side by side, sized across: a comma list, one size for each pane, such as `\"20%,*,380px\"`. A number, `px` or `em` is a fixed size; `%` is that share of what the fixed panes leave; `*` or a missing size shares the percent that's left; `auto` is as big as its content. Empty: all the same."
|
|
26
|
+
},
|
|
27
|
+
{
|
|
28
|
+
name: "rows",
|
|
29
|
+
group: "layout",
|
|
30
|
+
kind: "string",
|
|
31
|
+
description: "One above the other, sized down, as `columns` says. With neither, the panes are side by side."
|
|
32
|
+
},
|
|
33
|
+
{
|
|
34
|
+
name: "resizable",
|
|
35
|
+
group: "behaviour",
|
|
36
|
+
kind: "keyOnly",
|
|
37
|
+
description: "A bar between each two panes, to drag or to move with the arrow keys."
|
|
38
|
+
},
|
|
39
|
+
{
|
|
40
|
+
name: "grows",
|
|
41
|
+
group: "behaviour",
|
|
42
|
+
kind: "string",
|
|
43
|
+
description: "The one pane that takes every change: `first`, `last` or its number from 1, such as the app between its tools. A bar then sizes the pane on its other side, and this one takes the difference, so the panes between keep their widths; the panel growing or shrinking is this pane's too."
|
|
44
|
+
},
|
|
45
|
+
{
|
|
46
|
+
name: "min-size",
|
|
47
|
+
group: "behaviour",
|
|
48
|
+
kind: "string",
|
|
49
|
+
description: "The smallest a dragged pane may get, `10%` for shares or `60px` for fixed sizes. Default: `5%` and `0px`."
|
|
50
|
+
}
|
|
51
|
+
],
|
|
52
|
+
events: [{
|
|
53
|
+
name: "ui-changed",
|
|
54
|
+
detail: "{ sizes: string, panes: HTMLElement[] }",
|
|
55
|
+
description: "A bar was let go, or moved with a key: `sizes` in the form `columns` and `rows` take, to keep and give back."
|
|
56
|
+
}],
|
|
57
|
+
slots: [{
|
|
58
|
+
name: "",
|
|
59
|
+
description: "The panes, one per child. A child with `hidden` isn't one: the others share its room, and it stays as it is."
|
|
60
|
+
}],
|
|
61
|
+
parts: [{
|
|
62
|
+
name: "bar",
|
|
63
|
+
description: "The bar between two panes."
|
|
64
|
+
}, {
|
|
65
|
+
name: "last-bar",
|
|
66
|
+
description: "The last of them, also a `bar`: before the last pane."
|
|
67
|
+
}],
|
|
68
|
+
states: [
|
|
69
|
+
{
|
|
70
|
+
name: "rows",
|
|
71
|
+
description: "One above the other."
|
|
72
|
+
},
|
|
73
|
+
{
|
|
74
|
+
name: "resizable",
|
|
75
|
+
description: "Its bars drag."
|
|
76
|
+
},
|
|
77
|
+
{
|
|
78
|
+
name: "dragging",
|
|
79
|
+
description: "A bar is being dragged."
|
|
80
|
+
}
|
|
81
|
+
],
|
|
82
|
+
texts: [{
|
|
83
|
+
key: "resizePanes",
|
|
84
|
+
text: "Resize these panes",
|
|
85
|
+
description: "A bar's name, for a screen reader."
|
|
86
|
+
}]
|
|
87
|
+
}, E = "@layer ui.components{:host{box-sizing:border-box;flex:1 1 0;width:100%;min-width:0;min-height:0;display:flex;position:relative}:host(:state(rows)){flex-direction:column;width:auto;height:100%}:host([hidden]){display:none}::slotted(*){box-sizing:border-box;min-width:0;min-height:0;position:relative;overflow:hidden}.bar{flex:0 0 var(--ui-split-panel-bar-size,0);background:var(--ui-split-panel-bar-background,transparent);pointer-events:none;touch-action:none}:host(:state(resizable)) .bar{flex-basis:var(--ui-split-panel-bar-size,8px);pointer-events:auto;cursor:col-resize;transition:background-color .1s}:host(:state(resizable):state(rows)) .bar{cursor:row-resize}:host(:state(resizable)) .bar:hover,:host(:state(dragging)) .bar:active{background:var(--ui-split-panel-bar-active-background,var(--ui-split-panel-bar-background,transparent))}.bar:focus-visible{outline:var(--ui-focus-ring-width,2px) solid var(--ui-focus-ring-color,currentColor);outline-offset:-1px}}", D = /* @__PURE__ */ T("<slot>"), O = /* @__PURE__ */ T("<div class=bar>"), k, A, j, M, N, P, F, I, L, R, z, B, V, H, U, W, G, K = class _UISplitPanel extends (V = i, B = [d], z = [f], R = [p({ equals: c })], L = [p, s("dragging")], I = [p({ equals: c })], F = [s("rows")], P = [l("slotchange", { target: "renderRoot" })], N = [h({
|
|
88
|
+
attributes: !0,
|
|
89
|
+
attributeFilter: ["hidden"],
|
|
90
|
+
subtree: !0
|
|
91
|
+
})], M = [u("panes", "sizesGiven", { writesDOMElement: !0 })], j = [m], A = [m], k = [m], V) {
|
|
92
|
+
constructor() {
|
|
93
|
+
super(...arguments), a(H, 5, this), o(this, U, a(H, 8, this, [])), a(H, 11, this), o(this, W, a(H, 12, this, !1)), a(H, 15, this), o(this, G, a(H, 16, this, [])), a(H, 19, this), t(this, "sizes", []), t(this, "dragged"), t(this, "drag", a(H, 28, this, /* @__PURE__ */ e((e) => {
|
|
94
|
+
this.dragged && this.moveTo(this.dragged, this.isRows ? e.clientY : e.clientX);
|
|
95
|
+
}, "drag"))), a(H, 31, this), t(this, "stopDragging", a(H, 32, this, /* @__PURE__ */ e(() => {
|
|
96
|
+
this.dragged && (this.dragged = void 0, this.isDragging = !1, this.findBarPlaces(), this.sendSizes());
|
|
97
|
+
}, "stopDragging"))), a(H, 35, this);
|
|
98
|
+
}
|
|
99
|
+
get isRows() {
|
|
100
|
+
return this.rows !== void 0;
|
|
101
|
+
}
|
|
102
|
+
get sizesGiven() {
|
|
103
|
+
return (this.isRows ? this.rows : this.columns) ?? "";
|
|
104
|
+
}
|
|
105
|
+
get growingPane() {
|
|
106
|
+
let e = this.grows?.trim();
|
|
107
|
+
if (!e) return;
|
|
108
|
+
if (e === "first") return 0;
|
|
109
|
+
if (e === "last") return this.panes.length - 1;
|
|
110
|
+
let t = parseInt(e, 10);
|
|
111
|
+
return t >= 1 && t <= this.panes.length ? t - 1 : void 0;
|
|
112
|
+
}
|
|
113
|
+
get lastBarPart() {
|
|
114
|
+
return `${this.partForName("bar")} ${this.partForName("last-bar")}`;
|
|
115
|
+
}
|
|
116
|
+
render() {
|
|
117
|
+
let e = this;
|
|
118
|
+
return [(() => {
|
|
119
|
+
var e = D();
|
|
120
|
+
return e._$owner = S(), e;
|
|
121
|
+
})(), y(_, {
|
|
122
|
+
get each() {
|
|
123
|
+
return e.panes.slice(1);
|
|
124
|
+
},
|
|
125
|
+
children: (t, n) => (() => {
|
|
126
|
+
var t = O();
|
|
127
|
+
return t._$$keydown = (t) => e.moveByKey(t, n()), v(t, "pointercancel", e.stopDragging), v(t, "pointerup", e.stopDragging, !0), v(t, "pointermove", e.drag, !0), t._$$pointerdown = (t) => e.startDragging(t, n()), x(() => ({
|
|
128
|
+
e: n() === e.panes.length - 2 ? e.lastBarPart : e.partForName("bar"),
|
|
129
|
+
t: n() * 2 + 1,
|
|
130
|
+
a: e.resizable ? "separator" : void 0,
|
|
131
|
+
o: e.resizable ? 0 : void 0,
|
|
132
|
+
i: e.resizable ? e.translationForKey("resizePanes") : void 0,
|
|
133
|
+
n: e.isRows ? "horizontal" : "vertical",
|
|
134
|
+
s: e.resizable ? e.barPlaces[n()] ?? Z : void 0
|
|
135
|
+
}), ({ e, t: n, a: r, o: i, i: a, n: o, s }, c) => {
|
|
136
|
+
e !== c?.e && C(t, "part", e), n !== c?.t && w(t, "order", n), r !== c?.a && C(t, "role", r), i !== c?.o && C(t, "tabindex", i), a !== c?.i && C(t, "aria-label", a), o !== c?.n && C(t, "aria-orientation", o), s !== c?.s && C(t, "aria-valuenow", s);
|
|
137
|
+
}), t;
|
|
138
|
+
})()
|
|
139
|
+
})];
|
|
140
|
+
}
|
|
141
|
+
onSlotChanged() {
|
|
142
|
+
this.findPanes();
|
|
143
|
+
}
|
|
144
|
+
onHiddenChanged(e) {
|
|
145
|
+
e.some(({ target: e }) => e.parentNode === this.domElement) && this.findPanes();
|
|
146
|
+
}
|
|
147
|
+
findPanes() {
|
|
148
|
+
this.panes = [...this.domElement.children].filter((e) => !e.hasAttribute("hidden"));
|
|
149
|
+
}
|
|
150
|
+
onPanesChanged(e, t) {
|
|
151
|
+
this.apply(_UISplitPanel.sizesFor(t, e.length)), this.findBarPlaces();
|
|
152
|
+
}
|
|
153
|
+
findBarPlaces() {
|
|
154
|
+
let e = this.panes.map((e) => {
|
|
155
|
+
let { width: t, height: n } = e.getBoundingClientRect();
|
|
156
|
+
return this.isRows ? n : t;
|
|
157
|
+
});
|
|
158
|
+
this.barPlaces = e.slice(1).map((t, n) => {
|
|
159
|
+
let r = e[n];
|
|
160
|
+
return r + t ? Math.round(r * 100 / (r + t)) : Z;
|
|
161
|
+
});
|
|
162
|
+
}
|
|
163
|
+
apply(e) {
|
|
164
|
+
this.sizes = e;
|
|
165
|
+
let t = this.growingPane === void 0 ? 0 : 1;
|
|
166
|
+
this.panes.forEach((n, r) => {
|
|
167
|
+
let i = e[r];
|
|
168
|
+
n.style.order = String(r * 2), n.style.flex = i.units === "%" ? `${i.value} ${i.value} 0` : i.units === J ? "0 1 auto" : `0 ${t} ${i.value}${i.units}`, n.toggleAttribute(X, i.units === J);
|
|
169
|
+
});
|
|
170
|
+
}
|
|
171
|
+
startDragging(e, t) {
|
|
172
|
+
this.resizable && e.button === 0 && (this.dragged = this.measure(t, this.isRows ? e.clientY : e.clientX), e.currentTarget.setPointerCapture(e.pointerId), this.isDragging = !0, e.preventDefault());
|
|
173
|
+
}
|
|
174
|
+
moveByKey(e, t) {
|
|
175
|
+
let n = (this.isRows ? ie : re)[e.key];
|
|
176
|
+
if (!this.resizable || !n) return;
|
|
177
|
+
let r = this.measure(t, 0);
|
|
178
|
+
this.moveTo(r, n * te * (e.shiftKey ? ne : 1)), this.findBarPlaces(), this.sendSizes(), e.preventDefault();
|
|
179
|
+
}
|
|
180
|
+
sendSizes() {
|
|
181
|
+
this.send("ui-changed", {
|
|
182
|
+
sizes: _UISplitPanel.sizeText(this.sizes),
|
|
183
|
+
panes: this.panes
|
|
184
|
+
});
|
|
185
|
+
}
|
|
186
|
+
measure(e, t) {
|
|
187
|
+
let n = this.isRows, r = this.panes[e].getBoundingClientRect(), i = this.panes[e + 1].getBoundingClientRect(), a = n ? r.height : r.width, o = n ? i.height : i.width, s = this.sizes.reduce((t, n, r) => r === e || r === e + 1 || n.units !== "%" ? t : t + n.value, 0), [c, l] = _UISplitPanel.minimums(this.minSize);
|
|
188
|
+
return {
|
|
189
|
+
lengths: this.panes.map((e) => {
|
|
190
|
+
let { width: t, height: r } = e.getBoundingClientRect();
|
|
191
|
+
return n ? r : t;
|
|
192
|
+
}),
|
|
193
|
+
pane1: e,
|
|
194
|
+
pane2: e + 1,
|
|
195
|
+
pointerStart: t,
|
|
196
|
+
size1: a,
|
|
197
|
+
size2: o,
|
|
198
|
+
activeShare: Math.max(100 - s, c * 2),
|
|
199
|
+
minShare: c,
|
|
200
|
+
minPixels: l
|
|
201
|
+
};
|
|
202
|
+
}
|
|
203
|
+
moveTo(t, n) {
|
|
204
|
+
let { pane1: r, pane2: i, pointerStart: a, size1: o, size2: s, activeShare: c, minShare: l, minPixels: u } = t, d = n - a, f = this.growingPane;
|
|
205
|
+
if (f !== void 0) return this.moveBeside(t, f, d);
|
|
206
|
+
let p = /* @__PURE__ */ e((e) => this.sizes[e]?.units, "units"), m = [r, i].find((e) => p(e) !== "%" && p(e) !== J) ?? [r, i].find((e) => p(e) !== "%");
|
|
207
|
+
if (m !== void 0) {
|
|
208
|
+
let e = m === r ? i : r, t = m === r ? o + d : s - d, n = p(e) === J ? Infinity : o + s, a = Math.round(Math.min(n, Math.max(u, t)));
|
|
209
|
+
this.apply(this.sizes.map((e, t) => t === m ? {
|
|
210
|
+
value: a,
|
|
211
|
+
units: "px"
|
|
212
|
+
} : e));
|
|
213
|
+
return;
|
|
214
|
+
}
|
|
215
|
+
let h = o + s;
|
|
216
|
+
if (!h) return;
|
|
217
|
+
let g = (o + d) * c / h, _ = Math.round(Math.min(c - l, Math.max(l, g)) * 100) / 100, v = Math.round((c - _) * 100) / 100;
|
|
218
|
+
this.apply(this.sizes.map((e, t) => t === r ? {
|
|
219
|
+
value: _,
|
|
220
|
+
units: "%"
|
|
221
|
+
} : t === i ? {
|
|
222
|
+
value: v,
|
|
223
|
+
units: "%"
|
|
224
|
+
} : e));
|
|
225
|
+
}
|
|
226
|
+
moveBeside(e, t, n) {
|
|
227
|
+
let { pane1: r, pane2: i, size1: a, size2: o, lengths: s, minPixels: c } = e, l = t <= r ? i : r, u = l === r ? a + n : o - n, d = s.reduce((e, t) => e + t, 0), f = Math.max(c, d * $ / 100), p = s[l] + s[t] - f, m = Math.round(Math.min(p, Math.max(c, u)));
|
|
228
|
+
this.apply(this.sizes.map((e, n) => n === t ? {
|
|
229
|
+
value: 100,
|
|
230
|
+
units: "%"
|
|
231
|
+
} : n === l ? {
|
|
232
|
+
value: m,
|
|
233
|
+
units: "px"
|
|
234
|
+
} : e.units === "%" || e.units === J ? {
|
|
235
|
+
value: Math.round(s[n]),
|
|
236
|
+
units: "px"
|
|
237
|
+
} : e));
|
|
238
|
+
}
|
|
239
|
+
static sizesFor(e, t) {
|
|
240
|
+
let n = e ? e.split(",").slice(0, t) : [];
|
|
241
|
+
for (; n.length < t;) n.push(Y);
|
|
242
|
+
let r = 0, i = 0, a = n.map((e) => {
|
|
243
|
+
let t = e.trim();
|
|
244
|
+
if (t === J) return {
|
|
245
|
+
value: 0,
|
|
246
|
+
units: J
|
|
247
|
+
};
|
|
248
|
+
let n = Q.exec(t);
|
|
249
|
+
if (n) {
|
|
250
|
+
let e = n[2] || "px", t = parseFloat(n[1]);
|
|
251
|
+
return e === "%" && (i += t), {
|
|
252
|
+
value: t,
|
|
253
|
+
units: e
|
|
254
|
+
};
|
|
255
|
+
}
|
|
256
|
+
return t !== Y && console.warn(`<ui-split-panel>: the size "${t}" isn't one; it shares what's left`), r++, {
|
|
257
|
+
value: Y,
|
|
258
|
+
units: "%"
|
|
259
|
+
};
|
|
260
|
+
}), o = Math.max(1, (100 - i) / Math.max(r, 1));
|
|
261
|
+
return a.map(({ value: e, units: t }) => ({
|
|
262
|
+
value: e === Y ? o : e,
|
|
263
|
+
units: t
|
|
264
|
+
}));
|
|
265
|
+
}
|
|
266
|
+
static sizeText(e) {
|
|
267
|
+
return e.map(({ value: e, units: t }) => t === J ? J : `${e}${t}`).join(",");
|
|
268
|
+
}
|
|
269
|
+
static minimums(e) {
|
|
270
|
+
let t = Q.exec(e?.trim() ?? "");
|
|
271
|
+
if (!t) return [$, 0];
|
|
272
|
+
let n = parseFloat(t[1]);
|
|
273
|
+
return t[2] === "%" ? [n, 0] : [$, n];
|
|
274
|
+
}
|
|
275
|
+
};
|
|
276
|
+
H = g(V), U = /* @__PURE__ */ new WeakMap(), W = /* @__PURE__ */ new WeakMap(), G = /* @__PURE__ */ new WeakMap(), n(H, 4, "panes", R, K, U), n(H, 4, "isDragging", L, K, W), n(H, 4, "barPlaces", I, K, G), n(H, 2, "isRows", F, K), n(H, 1, "onSlotChanged", P, K), n(H, 1, "onHiddenChanged", N, K), n(H, 1, "onPanesChanged", M, K), n(H, 1, "moveByKey", k, K), n(H, 13, "vocabulary", B, K), n(H, 13, "elementSetup", z, K), n(H, 5, "drag", j, K), n(H, 5, "stopDragging", A, K), r(H, K), e(K, "UISplitPanel"), t(K, "vocabulary", a(H, 20, K, ee)), a(H, 23, K), t(K, "elementSetup", a(H, 24, K, {
|
|
277
|
+
styleSheets: { splitPanel: E },
|
|
278
|
+
cssStates: ["resizable"]
|
|
279
|
+
})), a(H, 27, K);
|
|
280
|
+
var q = K, J = "auto", Y = "*", X = "data-split-fit", Z = 50, Q = /^([0-9]*\.?[0-9]+)(px|em|rem|%)?$/, $ = 5, te = 16, ne = 10, re = {
|
|
281
|
+
ArrowLeft: -1,
|
|
282
|
+
ArrowRight: 1
|
|
283
|
+
}, ie = {
|
|
284
|
+
ArrowUp: -1,
|
|
285
|
+
ArrowDown: 1
|
|
286
|
+
};
|
|
287
|
+
//#endregion
|
|
288
|
+
//#region src/components/ui-split-panel/index.ts
|
|
289
|
+
b([
|
|
290
|
+
"pointerdown",
|
|
291
|
+
"pointermove",
|
|
292
|
+
"pointerup",
|
|
293
|
+
"keydown"
|
|
294
|
+
]), q.define();
|
|
295
|
+
//#endregion
|
|
296
|
+
export { q as UISplitPanel };
|
|
297
|
+
|
|
298
|
+
//# sourceMappingURL=ui-split-panel.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ui-split-panel.js","names":["<For each={this.panes.slice(1)}>\n {(_pane, index) => <div\n class=\"bar\"\n part={index() === this.panes.length - 2 ? this.lastBarPart : this.partForName(\"bar\")}\n style={{ order: index() * 2 + 1 }}\n role={this.resizable ? \"separator\" : void 0}\n tabindex={this.resizable ? 0 : void 0}\n aria-label={this.resizable ? this.translationForKey(\"resizePanes\") : void 0}\n aria-orientation={this.isRows ? \"horizontal\" : \"vertical\"}\n aria-valuenow={this.resizable ? this.barPlaces[index()] ?? MIDDLE : void 0}\n onPointerDown={(event) => this.startDragging(event, index())}\n onPointerMove={this.drag}\n onPointerUp={this.stopDragging}\n onPointerCancel={this.stopDragging}\n onKeyDown={(event) => this.moveByKey(event, index())}\n />}\n </For>","this","order: index() * 2 + 1","role={this.resizable ? \"separator\" : void 0}","tabindex={this.resizable ? 0 : void 0}","aria-label={this.resizable ? this.translationForKey(\"resizePanes\") : void 0}","aria-orientation={this.isRows ? \"horizontal\" : \"vertical\"}","aria-valuenow={this.resizable ? this.barPlaces[index()] ?? MIDDLE : void 0}","E.UIComponent","E.proto","E.protoMerged","E.state","E.isSameList","E.cssState","E.on","E.watches","E.onChange","E.untracked","_$getOwner","_$createComponent","_$setAttribute","_$setStyleProperty","__name","splitPanelCSS","_$delegateEvents","__name$1","__publicField","__decorateElement","__decoratorMetadata","__runInitializers","__privateAdd","__decoratorStart","getOwner$1","splitPanelVocabulary","UISplitPanel_default","_tmpl$","_tmpl$2","_moveByKey_dec","_stopDragging_dec","_drag_dec","_onPanesChanged_dec","_onHiddenChanged_dec","_onSlotChanged_dec","_isRows_dec","_barPlaces_dec","_isDragging_dec","_panes_dec","_elementSetup_dec","_vocabulary_dec","_a","_init","_panes","_isDragging","_barPlaces","_UISplitPanel","UIComponent","proto","protoMerged","state","isSameList","cssState","on","watches","onChange","untracked","event","grows","position","_self$","_el$","createComponent","For","_el$2","index","addEvent","effect","MIDDLE","_p$","setAttribute","t","setStyleProperty","a","o","i","n","mutations","target","child","sizesGiven","panes","lengths","pane","height","width","before","after","sizes","fixedShrink","size","AUTO","FIT_ATTRIBUTE","bar","direction","ROW_KEYS","COLUMN_KEYS","held","KEY_STEP_PX","SHIFT_STEPS","isRows","rect1","rect2","size1","size2","shareOfOthers","total","minShare","minPixels","pointer","moved","pointerStart","growing","units","fixed","pane1","pane2","other","wanted","most","value","room","share","activeShare","value1","value2","sized","length","growingLeast","DEFAULT_MIN_SHARE","given","spec","count","STAR","stars","percents","text","match","NUMBER_WITH_UNITS","perStar","minSize","UISplitPanel","delegateEvents"],"sources":["../src/components/ui-split-panel/UISplitPanel.en.ts","../src/components/ui-split-panel/UISplitPanel.css?inline","../src/components/ui-split-panel/UISplitPanel.tsx","../src/components/ui-split-panel/index.ts"],"sourcesContent":["/**\n * The English vocabulary of `<ui-split-panel>`: every name the tag uses.\n * The shape is `E.ComponentVocabulary` (`spell/ui/vocabulary`).\n */\n\nimport type { E } from \"spell/ui/core\"\n\n/****************\n * ### `splitPanelVocabulary`\n * The names of `<ui-split-panel>`: its children side by side or one above the other,\n * sized as `columns` or `rows` say, with bars to drag between them when `resizable`.\n ****************/\nexport const splitPanelVocabulary = {\n tag: \"ui-split-panel\",\n icon: \"columns\",\n topics: [\"layout\", \"containers\"],\n aka: [\"split view\", \"split pane\", \"resizable panes\", \"panes\", \"splitter\", \"sash\"],\n noun: \"split panel\",\n description: \"A split panel lays its children out side by side or one above the other, with bars to resize them.\",\n attributes: [\n {\n name: \"columns\",\n group: \"layout\",\n kind: \"string\",\n description:\n 'Side by side, sized across: a comma list, one size for each pane, such as `\"20%,*,380px\"`. ' +\n \"A number, `px` or `em` is a fixed size; `%` is that share of what the fixed panes leave; \" +\n \"`*` or a missing size shares the percent that's left; `auto` is as big as its content. Empty: all the same.\"\n },\n {\n name: \"rows\",\n group: \"layout\",\n kind: \"string\",\n description: \"One above the other, sized down, as `columns` says. With neither, the panes are side by side.\"\n },\n {\n name: \"resizable\",\n group: \"behaviour\",\n kind: \"keyOnly\",\n description: \"A bar between each two panes, to drag or to move with the arrow keys.\"\n },\n {\n name: \"grows\",\n group: \"behaviour\",\n kind: \"string\",\n description:\n \"The one pane that takes every change: `first`, `last` or its number from 1, such as the app between its tools. \" +\n \"A bar then sizes the pane on its other side, and this one takes the difference, so the panes between keep \" +\n \"their widths; the panel growing or shrinking is this pane's too.\"\n },\n {\n name: \"min-size\",\n group: \"behaviour\",\n kind: \"string\",\n description:\n \"The smallest a dragged pane may get, `10%` for shares or `60px` for fixed sizes. Default: `5%` and `0px`.\"\n }\n ],\n events: [\n {\n name: \"ui-changed\",\n detail: \"{ sizes: string, panes: HTMLElement[] }\",\n description:\n \"A bar was let go, or moved with a key: `sizes` in the form `columns` and `rows` take, to keep and give back.\"\n }\n ],\n slots: [\n {\n name: \"\",\n description:\n \"The panes, one per child. A child with `hidden` isn't one: the others share its room, and it stays as it is.\"\n }\n ],\n parts: [\n { name: \"bar\", description: \"The bar between two panes.\" },\n { name: \"last-bar\", description: \"The last of them, also a `bar`: before the last pane.\" }\n ],\n states: [\n { name: \"rows\", description: \"One above the other.\" },\n { name: \"resizable\", description: \"Its bars drag.\" },\n { name: \"dragging\", description: \"A bar is being dragged.\" }\n ],\n texts: [{ key: \"resizePanes\", text: \"Resize these panes\", description: \"A bar's name, for a screen reader.\" }]\n} as const satisfies E.ComponentVocabulary\n","/*\n * `<ui-split-panel>` (`UISplitPanel.tsx`): its children as flex items, with its bars between them.\n * - `<slot>` draws no box, so the panes and the bars are all items of the host's one flex row:\n * each pane's inline `order` and `flex`, set by the component, put a bar between each two.\n * - Tokens:\n * | `--ui-split-panel-bar-size` | a bar's thickness, and so the room between panes; `0` unless `resizable` |\n * | `--ui-split-panel-bar-background` | a bar's fill |\n * | `--ui-split-panel-bar-active-background` | a bar's fill as it's hovered or dragged |\n */\n@layer ui.components {\n :host {\n position: relative;\n display: flex;\n flex: 1 1 0;\n box-sizing: border-box;\n min-width: 0;\n min-height: 0;\n width: 100%;\n }\n :host(:state(rows)) {\n flex-direction: column;\n width: auto;\n height: 100%;\n }\n :host([hidden]) {\n display: none;\n }\n\n /* a pane: what it holds never pushes it past its share */\n ::slotted(*) {\n position: relative;\n box-sizing: border-box;\n min-width: 0;\n min-height: 0;\n overflow: hidden;\n }\n\n .bar {\n flex: 0 0 var(--ui-split-panel-bar-size, 0);\n background: var(--ui-split-panel-bar-background, transparent);\n pointer-events: none;\n touch-action: none;\n }\n :host(:state(resizable)) .bar {\n flex-basis: var(--ui-split-panel-bar-size, 8px);\n pointer-events: auto;\n cursor: col-resize;\n transition: background-color 0.1s;\n }\n :host(:state(resizable):state(rows)) .bar {\n cursor: row-resize;\n }\n :host(:state(resizable)) .bar:hover,\n :host(:state(dragging)) .bar:active {\n background: var(--ui-split-panel-bar-active-background, var(--ui-split-panel-bar-background, transparent));\n }\n .bar:focus-visible {\n outline: var(--ui-focus-ring-width, 2px) solid var(--ui-focus-ring-color, currentColor);\n outline-offset: -1px;\n }\n}\n","import { For } from \"solid-js\"\n\nimport { E } from \"spell/ui/core\"\nimport { splitPanelVocabulary } from \"./UISplitPanel.en\"\n\nimport splitPanelCSS from \"./UISplitPanel.css?inline\"\n\n/****************\n * ### `UISplitPanel`\n * The component behind `<ui-split-panel>`: its children side by side (`columns`) or one above the other (`rows`),\n * sized as those say, with a bar between each two to drag when `resizable`.\n *\n * <slot></slot> (the panes: your children, in the host's flex row)\n * <div part=\"bar\" role=\"separator\"></div> (one less than the panes)\n *\n * - Each child is a pane, written anywhere: `<ui-panel parent=\"its id\">` joins it, as a section joins a section.\n * - A child with `hidden` isn't a pane: the others share its room, and nothing in it is redrawn.\n * - A pane is never moved or redrawn as panes come and go or bars drag: the sizes are its inline `flex`,\n * and its place is its inline `order`, between the bars'. So a running program in one keeps running.\n * - The price: Tab reaches the bars after every pane, not between them.\n * - The sizes aren't remembered here: `ui-changed` hands over `sizes`, to keep and give back as `columns` or `rows`.\n * - Sizes, in `columns` or `rows`: a comma list, one for each pane (`\"20%,*,380px\"`).\n * - a number, `px` or `em`: fixed\n * - `%`: that share of what the fixed panes leave\n * - `*`, or missing: an equal share of the percent left\n * - `auto`: as big as its content, shrinking when there's no room, marked `data-split-fit`; a drag fixes it, in px\n * - `grows`: ONE pane takes every change, e.g. the app between its tools (`grows=\"first\"`):\n * - a bar sizes the pane on its other side, in px, and the growing pane takes the difference\n * - so the panes between keep their widths, and slide\n * - the panel's own growth and shrinking is that pane's too; past its `min-width`, the others give way\n * - Keyboard: a bar takes the focus; the arrow keys along it move it, Shift by ten times as much.\n ****************/\nexport class UISplitPanel extends E.UIComponent<typeof splitPanelVocabulary> {\n @E.proto static vocabulary = splitPanelVocabulary\n @E.protoMerged static elementSetup: Partial<E.ElementSetup> = {\n styleSheets: { splitPanel: splitPanelCSS },\n cssStates: [\"resizable\"]\n }\n\n /** The panes now, in order: the children without `hidden`. */\n @E.state({ equals: E.isSameList }) accessor panes: HTMLElement[] = []\n\n /** A bar is being dragged. */\n @E.state @E.cssState(\"dragging\") accessor isDragging = false\n\n /** Each bar's place, as a percent of the room of the two panes beside it: what a screen reader says. */\n @E.state({ equals: E.isSameList }) accessor barPlaces: number[] = []\n\n /** Sizes now, one per pane. NOT a reactive member: a drag rewrites them on every move. */\n private sizes: PaneSize[] = []\n\n /** What a drag works from, measured when it starts. */\n private dragged: BarDrag | undefined\n\n /** One above the other. */\n @E.cssState(\"rows\")\n get isRows(): boolean {\n return this.rows !== undefined\n }\n\n /** The sizes as given, whichever way the panes go. */\n get sizesGiven(): string {\n return (this.isRows ? this.rows : this.columns) ?? \"\"\n }\n\n /** Index of the pane that takes every change (`grows`): `undefined` without one. */\n private get growingPane(): number | undefined {\n const grows = this.grows?.trim()\n if (!grows) return undefined\n if (grows === \"first\") return 0\n if (grows === \"last\") return this.panes.length - 1\n const position = parseInt(grows, 10)\n return position >= 1 && position <= this.panes.length ? position - 1 : undefined\n }\n\n /** The last bar's parts: it's a bar, and the last. */\n private get lastBarPart(): string {\n return `${this.partForName(\"bar\")} ${this.partForName(\"last-bar\")}`\n }\n\n render() {\n return (\n <>\n <slot />\n <For each={this.panes.slice(1)}>\n {(_pane, index) => (\n <div\n class=\"bar\"\n part={index() === this.panes.length - 2 ? this.lastBarPart : this.partForName(\"bar\")}\n style={{ order: index() * 2 + 1 }}\n role={this.resizable ? \"separator\" : undefined}\n tabindex={this.resizable ? 0 : undefined}\n aria-label={this.resizable ? this.translationForKey(\"resizePanes\") : undefined}\n aria-orientation={this.isRows ? \"horizontal\" : \"vertical\"}\n aria-valuenow={this.resizable ? (this.barPlaces[index()] ?? MIDDLE) : undefined}\n onPointerDown={(event) => this.startDragging(event, index())}\n onPointerMove={this.drag}\n onPointerUp={this.stopDragging}\n onPointerCancel={this.stopDragging}\n onKeyDown={(event) => this.moveByKey(event, index())}\n />\n )}\n </For>\n </>\n )\n }\n\n ////////////////\n // ## Panes\n ////////////////\n\n /** Children came or went: they're the panes now. */\n @E.on(\"slotchange\", { target: \"renderRoot\" })\n protected onSlotChanged() {\n this.findPanes()\n }\n\n /** A child's `hidden` changed. */\n @E.watches({ attributes: true, attributeFilter: [\"hidden\"], subtree: true })\n protected onHiddenChanged(mutations: MutationRecord[]) {\n if (mutations.some(({ target }) => target.parentNode === this.domElement)) this.findPanes()\n }\n\n /** Read the panes from the children. */\n private findPanes() {\n this.panes = [...this.domElement.children].filter((child) => !child.hasAttribute(\"hidden\")) as HTMLElement[]\n }\n\n /** Size the panes once drawn, and again when their number or the sizes given change. */\n @E.onChange(\"panes\", \"sizesGiven\", { writesDOMElement: true })\n protected onPanesChanged(panes: HTMLElement[], sizesGiven: string) {\n this.apply(UISplitPanel.sizesFor(sizesGiven, panes.length))\n this.findBarPlaces()\n }\n\n /** Read each bar's place from where the panes are now: not on every move of a drag. */\n private findBarPlaces() {\n const lengths = this.panes.map((pane) => {\n const { width, height } = pane.getBoundingClientRect()\n return this.isRows ? height : width\n })\n this.barPlaces = lengths.slice(1).map((after, index) => {\n const before = lengths[index]\n return before + after ? Math.round((before * 100) / (before + after)) : MIDDLE\n })\n }\n\n /** Make `sizes` the sizes: each pane's inline `order` and `flex`. */\n private apply(sizes: PaneSize[]) {\n this.sizes = sizes\n // beside a growing pane, a fixed pane still gives way once that one is as small as it gets\n const fixedShrink = this.growingPane === undefined ? 0 : 1\n this.panes.forEach((pane, index) => {\n const size = sizes[index]\n pane.style.order = String(index * 2)\n pane.style.flex =\n size.units === \"%\"\n ? `${size.value} ${size.value} 0`\n : size.units === AUTO\n ? \"0 1 auto\"\n : `0 ${fixedShrink} ${size.value}${size.units}`\n pane.toggleAttribute(FIT_ATTRIBUTE, size.units === AUTO)\n })\n }\n\n ////////////////\n // ## Dragging a bar\n ////////////////\n\n /** A bar's `pointerdown`: measure the two panes it sits between, and take the pointer until it's let go. */\n private startDragging(event: PointerEvent & { currentTarget: HTMLElement }, bar: number) {\n if (!this.resizable || event.button !== 0) return\n this.dragged = this.measure(bar, this.isRows ? event.clientY : event.clientX)\n event.currentTarget.setPointerCapture(event.pointerId)\n this.isDragging = true\n event.preventDefault()\n }\n\n /** `pointermove` while dragging: the bar follows the pointer. */\n @E.untracked private readonly drag = (event: PointerEvent) => {\n if (this.dragged) this.moveTo(this.dragged, this.isRows ? event.clientY : event.clientX)\n }\n\n /** Let go: say where the sizes ended up. */\n @E.untracked private readonly stopDragging = () => {\n if (!this.dragged) return\n this.dragged = undefined\n this.isDragging = false\n this.findBarPlaces()\n this.sendSizes()\n }\n\n /** An arrow key along the bar moves it, Shift by ten times as much. */\n @E.untracked private moveByKey(event: KeyboardEvent, bar: number) {\n const direction = (this.isRows ? ROW_KEYS : COLUMN_KEYS)[event.key]\n if (!this.resizable || !direction) return\n const held = this.measure(bar, 0)\n this.moveTo(held, direction * KEY_STEP_PX * (event.shiftKey ? SHIFT_STEPS : 1))\n this.findBarPlaces()\n this.sendSizes()\n event.preventDefault()\n }\n\n /** Say the sizes now, in the form `columns` and `rows` take. */\n private sendSizes() {\n this.send(\"ui-changed\", { sizes: UISplitPanel.sizeText(this.sizes), panes: this.panes })\n }\n\n /**\n * What moving bar `bar` works from, with the pointer at `pointer`.\n * - Measures ONCE, here: `getBoundingClientRect()` is too slow for every move.\n */\n private measure(bar: number, pointer: number): BarDrag {\n const isRows = this.isRows\n const rect1 = this.panes[bar].getBoundingClientRect()\n const rect2 = this.panes[bar + 1].getBoundingClientRect()\n const size1 = isRows ? rect1.height : rect1.width\n const size2 = isRows ? rect2.height : rect2.width\n const shareOfOthers = this.sizes.reduce(\n (total, size, index) => (index === bar || index === bar + 1 || size.units !== \"%\" ? total : total + size.value),\n 0\n )\n const [minShare, minPixels] = UISplitPanel.minimums(this.minSize)\n return {\n lengths: this.panes.map((pane) => {\n const { width, height } = pane.getBoundingClientRect()\n return isRows ? height : width\n }),\n pane1: bar,\n pane2: bar + 1,\n pointerStart: pointer,\n size1,\n size2,\n activeShare: Math.max(100 - shareOfOthers, minShare * 2),\n minShare,\n minPixels\n }\n }\n\n /**\n * Move the bar to `pointer`.\n * - A fixed pane takes the move in px, and the shares take up the difference: no fixed pane moves.\n * - Beside an `auto` pane, it's only limited by `min-size`: the panel grows with it.\n * - An `auto` pane with nothing fixed beside it becomes fixed.\n * - Two shares: the first takes the share at the pointer, clamped to 2 decimals, the second what's left.\n */\n private moveTo(held: BarDrag, pointer: number) {\n const { pane1, pane2, pointerStart, size1, size2, activeShare, minShare, minPixels } = held\n const moved = pointer - pointerStart\n const growing = this.growingPane\n if (growing !== undefined) return this.moveBeside(held, growing, moved)\n const units = (index: number) => this.sizes[index]?.units\n const fixed =\n [pane1, pane2].find((index) => units(index) !== \"%\" && units(index) !== AUTO) ??\n [pane1, pane2].find((index) => units(index) !== \"%\")\n if (fixed !== undefined) {\n const other = fixed === pane1 ? pane2 : pane1\n const wanted = fixed === pane1 ? size1 + moved : size2 - moved\n const most = units(other) === AUTO ? Infinity : size1 + size2\n const value = Math.round(Math.min(most, Math.max(minPixels, wanted)))\n this.apply(this.sizes.map((size, index) => (index === fixed ? { value, units: \"px\" } : size)))\n return\n }\n const room = size1 + size2\n if (!room) return\n const share = ((size1 + moved) * activeShare) / room\n const value1 = Math.round(Math.min(activeShare - minShare, Math.max(minShare, share)) * 100) / 100\n const value2 = Math.round((activeShare - value1) * 100) / 100\n this.apply(\n this.sizes.map((size, index) => {\n if (index === pane1) return { value: value1, units: \"%\" }\n if (index === pane2) return { value: value2, units: \"%\" }\n return size\n })\n )\n }\n\n /**\n * Move a bar in a panel with a growing pane (`grows`): the pane on the bar's other side takes the move, in px,\n * and the growing pane the difference.\n * - Every other pane is fixed at its width as the drag started, so none moves but those two.\n * - Neither gets smaller than `min-size` (px), and the growing pane keeps `DEFAULT_MIN_SHARE` of the room.\n */\n private moveBeside(held: BarDrag, growing: number, moved: number) {\n const { pane1, pane2, size1, size2, lengths, minPixels } = held\n const sized = growing <= pane1 ? pane2 : pane1\n const wanted = sized === pane1 ? size1 + moved : size2 - moved\n const room = lengths.reduce((total, length) => total + length, 0)\n const growingLeast = Math.max(minPixels, (room * DEFAULT_MIN_SHARE) / 100)\n const most = lengths[sized] + lengths[growing] - growingLeast\n const value = Math.round(Math.min(most, Math.max(minPixels, wanted)))\n this.apply(\n this.sizes.map((size, index) => {\n if (index === growing) return { value: 100, units: \"%\" }\n if (index === sized) return { value, units: \"px\" }\n return size.units === \"%\" || size.units === AUTO ? { value: Math.round(lengths[index]), units: \"px\" } : size\n })\n )\n }\n\n ////////////////\n // ## Sizes\n ////////////////\n\n /**\n * One `PaneSize` per pane from `spec`, in the form `columns` and `rows` take.\n * - Cut or padded to `count`: a missing or unreadable entry counts as `*`.\n * - `*` entries share the percent the `%` entries leave, equally (at least 1% each).\n */\n static sizesFor(spec: string, count: number): PaneSize[] {\n const given = spec ? spec.split(\",\").slice(0, count) : []\n while (given.length < count) given.push(STAR)\n let stars = 0\n let percents = 0\n const sizes = given.map((text): { value: number | typeof STAR; units: string } => {\n const size = text.trim()\n if (size === AUTO) return { value: 0, units: AUTO }\n const match = NUMBER_WITH_UNITS.exec(size)\n if (match) {\n const units = match[2] || \"px\"\n const value = parseFloat(match[1])\n if (units === \"%\") percents += value\n return { value, units }\n }\n if (size !== STAR) console.warn(`<ui-split-panel>: the size \"${size}\" isn't one; it shares what's left`)\n stars++\n return { value: STAR, units: \"%\" }\n })\n const perStar = Math.max(1, (100 - percents) / Math.max(stars, 1))\n return sizes.map(({ value, units }) => ({ value: value === STAR ? perStar : value, units }))\n }\n\n /** `sizes` in the form `columns` and `rows` take: `\"60%,40%\"`. */\n static sizeText(sizes: PaneSize[]): string {\n return sizes.map(({ value, units }) => (units === AUTO ? AUTO : `${value}${units}`)).join(\",\")\n }\n\n /** `min-size`, as the smallest share and the smallest px. */\n private static minimums(minSize: string | undefined): [share: number, pixels: number] {\n const match = NUMBER_WITH_UNITS.exec(minSize?.trim() ?? \"\")\n if (!match) return [DEFAULT_MIN_SHARE, 0]\n const value = parseFloat(match[1])\n return match[2] === \"%\" ? [value, 0] : [DEFAULT_MIN_SHARE, value]\n }\n}\n\nexport interface UISplitPanel extends E.AttributeValues<typeof splitPanelVocabulary> {}\n\n/** One pane's size, e.g. `{ value: 20, units: \"%\" }`. */\nexport type PaneSize = {\n /** How much, in `units`. */\n value: number\n /** `px`, `em`, `%` or `auto` (its `value` unused). */\n units: string\n}\n\n/** What moving a bar works from, measured once as it starts. */\ntype BarDrag = {\n /** Every pane's size as it started, px. */\n lengths: number[]\n /** Index of the pane before the bar. */\n pane1: number\n /** Index of the pane after it. */\n pane2: number\n /** Where the pointer was as it started, px. */\n pointerStart: number\n /** `pane1`'s size as it started, px. */\n size1: number\n /** `pane2`'s size as it started, px. */\n size2: number\n /** Percent the two panes share. */\n activeShare: number\n /** Smallest share either may have. */\n minShare: number\n /** Smallest size a fixed pane may have, px. */\n minPixels: number\n}\n\n/** A pane as big as its content: its units, and how a spec says it. */\nconst AUTO = \"auto\"\n/** A size that shares what's left. */\nconst STAR = \"*\"\n/** The attribute an `auto` pane carries, for what it holds to lay out in it rather than over it. */\nconst FIT_ATTRIBUTE = \"data-split-fit\"\n/** A bar's place before the panes are measured. */\nconst MIDDLE = 50\n/** One size in a spec: a number with optional units. */\nconst NUMBER_WITH_UNITS = /^([0-9]*\\.?[0-9]+)(px|em|rem|%)?$/\n/** Smallest share a pane may be dragged to, unless `min-size` says. */\nconst DEFAULT_MIN_SHARE = 5\n/** How far an arrow key moves a bar, px. */\nconst KEY_STEP_PX = 16\n/** How many steps Shift makes it. */\nconst SHIFT_STEPS = 10\n/** The arrow keys along a bar between panes side by side, and which way each moves it. */\nconst COLUMN_KEYS: Record<string, number> = { ArrowLeft: -1, ArrowRight: 1 }\n/** The arrow keys along a bar between panes one above the other, and which way each moves it. */\nconst ROW_KEYS: Record<string, number> = { ArrowUp: -1, ArrowDown: 1 }\n","/**\n * The split panel family: defines `<ui-split-panel>` and exports its component, `UISplitPanel`.\n * - SIDE EFFECT: importing it defines the tag.\n * - Also the library's `spell/ui/ui-split-panel` entry.\n */\n\nimport { UISplitPanel } from \"./UISplitPanel\"\n\nUISplitPanel.define()\n\nexport { UISplitPanel }\n"],"mappings":";;;;;AAYA,IAAaiC,KAAuB;CAClC,KAAK;CACL,MAAM;CACN,QAAQ,CAAC,UAAU,YAAY;CAC/B,KAAK;EAAC;EAAc;EAAc;EAAmB;EAAS;EAAY;CAAM;CAChF,MAAM;CACN,aAAa;CACb,YAAY;EACV;GACE,MAAM;GACN,OAAO;GACP,MAAM;GACN,aACE;EAGJ;EACA;GACE,MAAM;GACN,OAAO;GACP,MAAM;GACN,aAAa;EACf;EACA;GACE,MAAM;GACN,OAAO;GACP,MAAM;GACN,aAAa;EACf;EACA;GACE,MAAM;GACN,OAAO;GACP,MAAM;GACN,aACE;EAGJ;EACA;GACE,MAAM;GACN,OAAO;GACP,MAAM;GACN,aACE;EACJ;CACF;CACA,QAAQ,CACN;EACE,MAAM;EACN,QAAQ;EACR,aACE;CACJ,CACF;CACA,OAAO,CACL;EACE,MAAM;EACN,aACE;CACJ,CACF;CACA,OAAO,CACL;EAAE,MAAM;EAAO,aAAa;CAA6B,GACzD;EAAE,MAAM;EAAY,aAAa;CAAyD,CAC5F;CACA,QAAQ;EACN;GAAE,MAAM;GAAQ,aAAa;EAAuB;EACpD;GAAE,MAAM;GAAa,aAAa;EAAiB;EACnD;GAAE,MAAM;GAAY,aAAa;EAA0B;CAC7D;CACA,OAAO,CAAC;EAAE,KAAK;EAAe,MAAM;EAAsB,aAAa;CAAqC,CAAC;AAC/G,6hCEnFAI,GAAAC,GAAAC,GAAAC,GAAAC,GAAAC,GAAAC,GAAAC,GAAAC,GAAAC,GAAAC,GAAAC,GAAAC,GAAAC,GAAAC,GAAAC,GAAAC,GAgCaC,IAAN,MAAM,uBAAqB,IAAA9C,GAChC,IAAA,CAACC,CAAE,GACH,IAAA,CAACC,CAAE,GAMH,IAAA,CAACC,EAAQ,E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,GAAA,GAAiB,gBAA9BZ,GAxJWgB,CAAA,GAAN1B,EAAAsB,GAAMI,CAAA,GAAgEhC,EAAAgC,GAAA,cAAA,GAClE5B,EADE4B,GACK,cAAazB,EAApBqB,GAAA,IADEI,GACkBrB,EAAA,CAAA,GAApBJ,EAAAqB,GAAA,IADEI,CAAA,GAEI5B,EAFJ4B,GAEW,gBAAwCzB,EAA/CqB,GAAA,IAFJI,GAEmD;CAC5D,aAAa,EAAE,YAAY/B,EAAc;CACzC,WAAW,CAAC,WAAW;AACzB,CAAA,CAAA,GAHeM,EAAAqB,GAAA,IAFJI,CAAA;AAAN,IAAM+F,IAAN/F,GA2VD6C,IAAO,QAEP0C,IAAO,KAEPzC,IAAgB,kBAEhBxB,IAAS,IAETsE,IAAoB,qCAEpBT,IAAoB,GAEpB/B,KAAc,IAEdC,KAAc,IAEdH,KAAsC;CAAE,WAAW;CAAI,YAAY;AAAE,GAErED,KAAmC;CAAE,SAAS;CAAI,WAAW;AAAE;;;;;;;;ICrYrE8C,EAAa,OAAO"}
|
package/dist/ui-stack.js
CHANGED
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import "./rolldown-runtime-CYGlBXrH.js";
|
|
2
|
-
import { Bt as e,
|
|
3
|
-
import { getOwner as
|
|
2
|
+
import { Bt as e, Converters as t, Ht as n, Lt as r, Rt as i, UIComponent as a, Ut as o, cssState as s, derived as c, gt as l, proto as u, protoMerged as d, zt as f } from "./core.js";
|
|
3
|
+
import { getOwner as p, template as m } from "@solidjs/web";
|
|
4
4
|
//#region src/components/ui-stack/UIStack.en.ts
|
|
5
|
-
var
|
|
5
|
+
var h = {
|
|
6
6
|
tag: "ui-stack",
|
|
7
|
+
icon: "layer group",
|
|
7
8
|
topics: ["layout", "basic"],
|
|
8
9
|
aka: [
|
|
9
10
|
"stack",
|
|
@@ -77,48 +78,71 @@ var p = {
|
|
|
77
78
|
name: "fluid",
|
|
78
79
|
group: "layout",
|
|
79
80
|
kind: "boolean",
|
|
80
|
-
description: "Takes the full width of its container."
|
|
81
|
+
description: "Takes the full width of its container; in another stack's row, the room left."
|
|
82
|
+
},
|
|
83
|
+
{
|
|
84
|
+
name: "stackable",
|
|
85
|
+
group: "layout",
|
|
86
|
+
kind: "string",
|
|
87
|
+
description: "A row that becomes a column when the room it's in is narrower than a length: `stackable=\"34em\"`; bare, a phone's width (768px). The room: the nearest container around it (a form, a table, an app that's a size container), or the window, whichever is narrower; so it works in a side bar too. An icon in it with `rotated=\"when stacked\"` turns a quarter while it's a column: an arrow points down."
|
|
81
88
|
}
|
|
82
89
|
],
|
|
83
90
|
events: [],
|
|
84
91
|
slots: [{
|
|
85
92
|
name: "",
|
|
86
|
-
description: "What it lays out: any elements."
|
|
93
|
+
description: "What it lays out: any elements. In a row, a `fluid` one (`<ui-input fluid>` ...) takes the room left."
|
|
87
94
|
}],
|
|
88
95
|
parts: [],
|
|
89
|
-
states: [
|
|
96
|
+
states: [{
|
|
97
|
+
name: "horizontal",
|
|
98
|
+
description: "A row (`direction=\"horizontal\"`): a `fluid` child takes the room left."
|
|
99
|
+
}, {
|
|
100
|
+
name: "stackable",
|
|
101
|
+
description: "`stackable`: a row that becomes a column when its room is narrow."
|
|
102
|
+
}],
|
|
90
103
|
texts: []
|
|
91
|
-
},
|
|
104
|
+
}, g = "@layer ui.components.stack.types{:host{--_ui-stack-turn:0deg;gap:var(--ui-space-m);flex-direction:column;min-inline-size:0;display:flex}::slotted(:where(h1,h2,h3,h4,h5,h6,p,ul,ol,dl,blockquote,figure,pre)){margin-block:0}:host(:state(horizontal)) ::slotted(:state(fluid)){min-inline-size:var(--_ui-min-width,0);flex:1 1 0}::slotted(*){--_ui-stacked:1}}", _ = /* @__PURE__ */ m("<slot>"), v, y, b, x, S, C, w, T = class _UIStack extends (C = a, S = [u], x = [d], b = [s("horizontal")], y = [s("stackable")], v = [c], C) {
|
|
92
105
|
constructor() {
|
|
93
|
-
super(...arguments), o(
|
|
106
|
+
super(...arguments), o(w, 5, this);
|
|
94
107
|
}
|
|
95
108
|
get isHorizontal() {
|
|
96
|
-
return this.direction ===
|
|
109
|
+
return this.direction === D;
|
|
110
|
+
}
|
|
111
|
+
get stacksBelow() {
|
|
112
|
+
let { stackable: e } = this;
|
|
113
|
+
if (this.isHorizontal && t.boolean(e)) return /^(|true|yes|stackable)$/i.test(e.trim()) ? O : e;
|
|
97
114
|
}
|
|
98
115
|
get hostLayout() {
|
|
99
|
-
let e = [`gap: ${
|
|
116
|
+
let e = [`gap: ${l[this.spacing] ?? l.md}`];
|
|
100
117
|
this.isHorizontal && e.push("flex-direction: row", "align-items: center"), this.wrap && e.push("flex-wrap: wrap");
|
|
101
|
-
let t =
|
|
118
|
+
let t = A[this.align];
|
|
102
119
|
t && e.push(`align-items: ${t}`);
|
|
103
|
-
let n =
|
|
104
|
-
|
|
120
|
+
let n = j[this.justify];
|
|
121
|
+
n && e.push(`justify-content: ${n}`), this.fluid && e.push("inline-size: 100%");
|
|
122
|
+
let r = this.stacksBelow;
|
|
123
|
+
if (r) {
|
|
124
|
+
let t = `flex-direction: column; ${k}: 90deg; & > slot::slotted(:state(fluid)) { flex: none }`;
|
|
125
|
+
e.push(`@container (width < ${r}) { ${t} }`, `@media (width < ${r}) { ${t} }`);
|
|
126
|
+
}
|
|
127
|
+
return e.join("; ");
|
|
105
128
|
}
|
|
106
129
|
render() {
|
|
107
|
-
var e =
|
|
108
|
-
return e._$owner =
|
|
130
|
+
var e = _();
|
|
131
|
+
return e._$owner = p(), e;
|
|
109
132
|
}
|
|
110
133
|
};
|
|
111
|
-
|
|
112
|
-
styleSheets: { stack:
|
|
113
|
-
delegatesFocus: !1
|
|
114
|
-
|
|
115
|
-
|
|
134
|
+
w = f(C), r(w, 2, "isHorizontal", b, T), r(w, 2, "stacksBelow", y, T), r(w, 2, "hostLayout", v, T), r(w, 13, "vocabulary", S, T), r(w, 13, "elementSetup", x, T), i(w, T), e(T, "UIStack"), n(T, "vocabulary", o(w, 8, T, h)), o(w, 11, T), n(T, "elementSetup", o(w, 12, T, {
|
|
135
|
+
styleSheets: { stack: g },
|
|
136
|
+
delegatesFocus: !1,
|
|
137
|
+
cssStates: ["fluid"]
|
|
138
|
+
})), o(w, 15, T);
|
|
139
|
+
var E = T, D = "horizontal", O = "768px", k = "--_ui-stack-turn", A = {
|
|
116
140
|
start: "flex-start",
|
|
117
141
|
center: "center",
|
|
118
142
|
end: "flex-end",
|
|
119
143
|
stretch: "stretch",
|
|
120
144
|
baseline: "baseline"
|
|
121
|
-
},
|
|
145
|
+
}, j = {
|
|
122
146
|
start: "flex-start",
|
|
123
147
|
center: "center",
|
|
124
148
|
end: "flex-end",
|
|
@@ -127,8 +151,8 @@ var S = x, C = "horizontal", w = {
|
|
|
127
151
|
};
|
|
128
152
|
//#endregion
|
|
129
153
|
//#region src/components/ui-stack/index.ts
|
|
130
|
-
|
|
154
|
+
E.define();
|
|
131
155
|
//#endregion
|
|
132
|
-
export {
|
|
156
|
+
export { E as UIStack };
|
|
133
157
|
|
|
134
158
|
//# sourceMappingURL=ui-stack.js.map
|
package/dist/ui-stack.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ui-stack.js","names":["<slot />","E.UIComponent","E.proto","E.protoMerged","E.derived","UIT.SpaceSteps","_$getOwner","__name","stackCSS","__publicField","__decorateElement","__decoratorMetadata","__decoratorStart","__name$1","__runInitializers","SpaceSteps","stackVocabulary","UIStack_default","_tmpl$","_hostLayout_dec","_elementSetup_dec","_vocabulary_dec","_a","_init","_UIStack","UIComponent","proto","protoMerged","derived","HORIZONTAL","rules","align","ALIGN","justify","JUSTIFY","_el$","getOwner","UIStack"],"sources":["../src/components/ui-stack/UIStack.en.ts","../src/components/ui-stack/UIStack.css?inline","../src/components/ui-stack/UIStack.tsx","../src/components/ui-stack/index.ts"],"sourcesContent":["/**\n * The English vocabulary of `<ui-stack>`: every name the tag uses.\n * - Its tag, attributes (each with its kind and allowed values) and slots.\n * The shape is `E.ComponentVocabulary` (`spell/ui/vocabulary`).\n * - A plain layout box, with no look of its own (epic `ui-gaps` P8): Web Awesome's stack and cluster in one tag,\n * as the `.ui-stack` / `.ui-cluster` utilities are for plain HTML.\n * - No class words: every attribute is property-only, drawn as the box's own layout.\n */\n\nimport type { E } from \"spell/ui/core\"\n\n/****************\n * ### `stackVocabulary`\n * The names of `<ui-stack>`, a box that lays its children out in a column or a row.\n ****************/\nexport const stackVocabulary = {\n tag: \"ui-stack\",\n topics: [\"layout\", \"basic\"],\n aka: [\"stack\", \"cluster\", \"flex box\", \"row\", \"column\", \"hbox\", \"vbox\", \"spacer\"],\n noun: \"stack\",\n description:\n \"A stack lays its children out in a column, or a row that wraps, evenly spaced. It has no look of its own.\",\n attributes: [\n {\n name: \"direction\",\n group: \"layout\",\n kind: \"enum\",\n values: [\"vertical\", \"horizontal\"],\n default: \"vertical\",\n description: \"`vertical`, a column (the default), or `horizontal`, a row.\"\n },\n {\n name: \"wrap\",\n group: \"layout\",\n kind: \"boolean\",\n description: \"A row wraps onto the next line when its children don't fit (Web Awesome's cluster).\"\n },\n {\n name: \"spacing\",\n group: \"layout\",\n kind: \"enum\",\n values: [\"none\", \"xs\", \"sm\", \"md\", \"lg\", \"xl\"],\n default: \"md\",\n description: \"The space between children: `none` to `xl`; `md` (1em) by default.\"\n },\n {\n name: \"align\",\n group: \"layout\",\n kind: \"enum\",\n values: [\"start\", \"center\", \"end\", \"stretch\", \"baseline\"],\n description:\n \"Lines children up ACROSS the stack: a column's left edges, centres or right edges; a row's tops, \" +\n \"middles, bottoms or text baselines. By default a column stretches them, a row centres them.\"\n },\n {\n name: \"justify\",\n group: \"layout\",\n kind: \"enum\",\n values: [\"start\", \"center\", \"end\", \"between\", \"around\"],\n description:\n \"Places children ALONG the stack: packed at its `start`, `center` or `end`, or spread out \" +\n \"(`between`: the first and last at the ends, `around`: equal space around each). \" +\n '`<ui-stack direction=\"horizontal\" justify=\"between\">` puts one thing left and one right.'\n },\n { name: \"fluid\", group: \"layout\", kind: \"boolean\", description: \"Takes the full width of its container.\" }\n ],\n events: [],\n slots: [{ name: \"\", description: \"What it lays out: any elements.\" }],\n parts: [],\n states: [],\n texts: []\n} as const satisfies E.ComponentVocabulary\n","/*\n * The style sheet of `<ui-stack>`: a flex box, its children the items, with no look of its own.\n * - The shadow root is a bare slot, so the children are the DOM element's flex items.\n * - What its attributes set (direction, wrap, spacing, align, justify, fluid) is a `:host` rule the component\n * writes for each element (`UIStack.hostLayout`): this sheet is the default, a column 1em apart.\n * - Its children's own block margins are dropped, as `.ui-stack`'s are: the stack's spacing is the space.\n * A Spell UI child's are drawn in its own shadow root: `reset.css` drops those, from the mark this sheet sets.\n */\n\n@layer ui.components.stack.types {\n :host {\n display: flex;\n flex-direction: column;\n gap: var(--ui-space-m);\n min-inline-size: 0;\n }\n ::slotted(:where(h1, h2, h3, h4, h5, h6, p, ul, ol, dl, blockquote, figure, pre)) {\n margin-block: 0;\n }\n /* a Spell UI child drops its own outside margins too (`reset.css`, \"A child of a `<ui-stack>`\") */\n ::slotted(*) {\n --_ui-stacked: 1;\n }\n}\n","import type { JSX } from \"@solidjs/web\"\n\nimport { E, UIT } from \"spell/ui/core\"\nimport { stackVocabulary } from \"./UIStack.en\"\n\nimport stackCSS from \"./UIStack.css?inline\"\n\n/****************\n * ### `<ui-stack>`\n * The component behind `<ui-stack>`: a box that lays its children out in a column or a row (epic `ui-gaps` P8).\n *\n * - Web Awesome's stack AND cluster in one tag: a column by default;\n * `direction=\"horizontal\"` a row, `wrap` one that wraps.\n * - No look: no padding, border or colour. For a drawing, which holds no `<div>` to put `.ui-stack` on.\n * - The shadow root is a bare slot: the children are the DOM element's flex items.\n * - Its attributes become one `:host` rule of its own (`hostLayout`, written by `UIComponent`),\n * so the page's own `style` stays the author's.\n * - Nothing focusable: no `delegatesFocus`.\n ****************/\nexport class UIStack extends E.UIComponent<typeof stackVocabulary> {\n @E.proto static vocabulary = stackVocabulary\n @E.protoMerged static elementSetup = {\n styleSheets: { stack: stackCSS },\n delegatesFocus: false\n } satisfies Partial<E.ElementSetup>\n\n /** A row, not a column. */\n get isHorizontal(): boolean {\n return this.direction === HORIZONTAL\n }\n\n /** Its `:host` rule: direction, wrap, spacing, alignment, width. */\n @E.derived\n protected get hostLayout(): string {\n const rules = [`gap: ${UIT.SpaceSteps[this.spacing as UIT.SpaceStep] ?? UIT.SpaceSteps.md}`]\n if (this.isHorizontal) rules.push(\"flex-direction: row\", \"align-items: center\")\n if (this.wrap) rules.push(\"flex-wrap: wrap\")\n const align = ALIGN[this.align as keyof typeof ALIGN]\n if (align) rules.push(`align-items: ${align}`)\n const justify = JUSTIFY[this.justify as keyof typeof JUSTIFY]\n if (justify) rules.push(`justify-content: ${justify}`)\n if (this.fluid) rules.push(\"inline-size: 100%\")\n return rules.join(\"; \")\n }\n\n render(): JSX.Element {\n return <slot />\n }\n}\n\n/** The vocabulary's attribute getters, typed (see \"Attributes\" in `UIComponent`). */\nexport interface UIStack extends E.AttributeValues<typeof stackVocabulary> {}\n\n/** `direction`'s row. */\nconst HORIZONTAL = \"horizontal\"\n\n/** `align` => `align-items`. */\nconst ALIGN = {\n start: \"flex-start\",\n center: \"center\",\n end: \"flex-end\",\n stretch: \"stretch\",\n baseline: \"baseline\"\n} as const\n\n/** `justify` => `justify-content`. */\nconst JUSTIFY = {\n start: \"flex-start\",\n center: \"center\",\n end: \"flex-end\",\n between: \"space-between\",\n around: \"space-around\"\n} as const\n","/**\n * The stack family: defines `<ui-stack>` and exports its component, `UIStack`.\n * - SIDE EFFECT: importing it defines the tag.\n * - Also the library's `spell/ui/ui-stack` entry (its size is in `notes/report.md`).\n */\n\nimport { UIStack } from \"./UIStack\"\n\nUIStack.define()\n\nexport { UIStack }\n"],"mappings":";;;;AAeA,IAAagB,IAAkB;CAC7B,KAAK;CACL,QAAQ,CAAC,UAAU,OAAO;CAC1B,KAAK;EAAC;EAAS;EAAW;EAAY;EAAO;EAAU;EAAQ;EAAQ;CAAQ;CAC/E,MAAM;CACN,aACE;CAC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K,gBAAgBC,GAAO;EAC7C,IAAME,IAAUC,EAAQ,KAAK;EAG7B,OAFID,KAASH,EAAM,KAAK,oBAAoBG,GAAS,GACjD,KAAK,SAAOH,EAAM,KAAK,mBAAmB,GACvCA,EAAM,KAAK,KAAK;CACzB;CAEA,SAAsB;EACb,IAAAK,IAAAjB,EAAM;EAAb,OAAO,EAAA,UAAAZ,EAAM,GAANN;CACT;AACF;AA7BO,IAAAY,EAAAU,CAAA,GAcLZ,EAAAa,GAAA,GAAc,cADdJ,GAbWK,CAAA,GACFd,EAAAa,GAAA,IAAO,cAAhBF,GADWG,CAAA,GAEId,EAAAa,GAAA,IAAO,gBAAtBH,GAFWI,CAAA,GAANb,EAAAY,GAAMC,CAAA,GAAsDjB,EAAAiB,GAAA,SAAA,GACxDf,EADEe,GACK,cAAaV,EAApBS,GAAA,GADEC,GACkBR,CAAA,CAAA,GAApBF,EAAAS,GAAA,IADEC,CAAA,GAEIf,EAFJe,GAEW,gBAAeV,EAAtBS,GAAA,IAFJC,GAE0B;CACnC,aAAa,EAAE,OAAOhB,EAAS;CAC/B,gBAAgB;AAClB,CAAA,CAAA,GAHeM,EAAAS,GAAA,IAFJC,CAAA;AAAN,IAAMa,IAANb,GAmCDK,IAAa,cAGbG,IAAQ;CACZ,OAAO;CACP,QAAQ;CACR,KAAK;CACL,SAAS;CACT,UAAU;AACZ,GAGME,IAAU;CACd,OAAO;CACP,QAAQ;CACR,KAAK;CACL,SAAS;CACT,QAAQ;AACV;;;AChEAG,EAAQ,OAAO"}
|
|
1
|
+
{"version":3,"file":"ui-stack.js","names":["<slot />","E.UIComponent","E.proto","E.protoMerged","E.cssState","E.derived","UIT.SpaceSteps","_$getOwner","__name","stackCSS","__name$1","__publicField","__decorateElement","__decoratorMetadata","__runInitializers","SpaceSteps","__decoratorStart","stackVocabulary","UIStack_default","_tmpl$","_hostLayout_dec","_stacksBelow_dec","_isHorizontal_dec","_elementSetup_dec","_vocabulary_dec","_a","_init","_UIStack","UIComponent","proto","protoMerged","cssState","derived","HORIZONTAL","Converters","stackable","PHONE_WIDTH","rules","align","ALIGN","justify","JUSTIFY","below","column","STACK_TURN","_el$","getOwner","UIStack"],"sources":["../src/components/ui-stack/UIStack.en.ts","../src/components/ui-stack/UIStack.css?inline","../src/components/ui-stack/UIStack.tsx","../src/components/ui-stack/index.ts"],"sourcesContent":["/**\n * The English vocabulary of `<ui-stack>`: every name the tag uses.\n * - Its tag, attributes (each with its kind and allowed values) and slots.\n * The shape is `E.ComponentVocabulary` (`spell/ui/vocabulary`).\n * - A plain layout box, with no look of its own (epic `ui-gaps` P8): Web Awesome's stack and cluster in one tag,\n * as the `.ui-stack` / `.ui-cluster` utilities are for plain HTML.\n * - No class words: every attribute is property-only, drawn as the box's own layout.\n */\n\nimport type { E } from \"spell/ui/core\"\n\n/****************\n * ### `stackVocabulary`\n * The names of `<ui-stack>`, a box that lays its children out in a column or a row.\n ****************/\nexport const stackVocabulary = {\n tag: \"ui-stack\",\n icon: \"layer group\",\n topics: [\"layout\", \"basic\"],\n aka: [\"stack\", \"cluster\", \"flex box\", \"row\", \"column\", \"hbox\", \"vbox\", \"spacer\"],\n noun: \"stack\",\n description:\n \"A stack lays its children out in a column, or a row that wraps, evenly spaced. It has no look of its own.\",\n attributes: [\n {\n name: \"direction\",\n group: \"layout\",\n kind: \"enum\",\n values: [\"vertical\", \"horizontal\"],\n default: \"vertical\",\n description: \"`vertical`, a column (the default), or `horizontal`, a row.\"\n },\n {\n name: \"wrap\",\n group: \"layout\",\n kind: \"boolean\",\n description: \"A row wraps onto the next line when its children don't fit (Web Awesome's cluster).\"\n },\n {\n name: \"spacing\",\n group: \"layout\",\n kind: \"enum\",\n values: [\"none\", \"xs\", \"sm\", \"md\", \"lg\", \"xl\"],\n default: \"md\",\n description: \"The space between children: `none` to `xl`; `md` (1em) by default.\"\n },\n {\n name: \"align\",\n group: \"layout\",\n kind: \"enum\",\n values: [\"start\", \"center\", \"end\", \"stretch\", \"baseline\"],\n description:\n \"Lines children up ACROSS the stack: a column's left edges, centres or right edges; a row's tops, \" +\n \"middles, bottoms or text baselines. By default a column stretches them, a row centres them.\"\n },\n {\n name: \"justify\",\n group: \"layout\",\n kind: \"enum\",\n values: [\"start\", \"center\", \"end\", \"between\", \"around\"],\n description:\n \"Places children ALONG the stack: packed at its `start`, `center` or `end`, or spread out \" +\n \"(`between`: the first and last at the ends, `around`: equal space around each). \" +\n '`<ui-stack direction=\"horizontal\" justify=\"between\">` puts one thing left and one right.'\n },\n {\n name: \"fluid\",\n group: \"layout\",\n kind: \"boolean\",\n description: \"Takes the full width of its container; in another stack's row, the room left.\"\n },\n {\n name: \"stackable\",\n group: \"layout\",\n kind: \"string\",\n description:\n 'A row that becomes a column when the room it\\'s in is narrower than a length: `stackable=\"34em\"`; ' +\n \"bare, a phone's width (768px). The room: the nearest container around it (a form, a table, an app \" +\n \"that's a size container), or the window, whichever is narrower; so it works in a side bar too. \" +\n 'An icon in it with `rotated=\"when stacked\"` turns a quarter while it\\'s a column: an arrow points down.'\n }\n ],\n events: [],\n slots: [\n {\n name: \"\",\n description:\n \"What it lays out: any elements. In a row, a `fluid` one (`<ui-input fluid>` ...) takes the room left.\"\n }\n ],\n parts: [],\n states: [\n { name: \"horizontal\", description: 'A row (`direction=\"horizontal\"`): a `fluid` child takes the room left.' },\n { name: \"stackable\", description: \"`stackable`: a row that becomes a column when its room is narrow.\" }\n ],\n texts: []\n} as const satisfies E.ComponentVocabulary\n","/*\n * The style sheet of `<ui-stack>`: a flex box, its children the items, with no look of its own.\n * - The shadow root is a bare slot, so the children are the DOM element's flex items.\n * - What its attributes set (direction, wrap, spacing, align, justify, fluid) is a `:host` rule the component\n * writes for each element (`UIStack.hostLayout`): this sheet is the default, a column 1em apart.\n * - Its children's own block margins are dropped, as `.ui-stack`'s are: the stack's spacing is the space.\n * A Spell UI child's are drawn in its own shadow root: `reset.css` drops those, from the mark this sheet sets.\n */\n\n@layer ui.components.stack.types {\n :host {\n /* turned by a `stackable` row while it's a column (`UIStack.hostLayout`); never an outer stack's */\n --_ui-stack-turn: 0deg;\n display: flex;\n flex-direction: column;\n gap: var(--ui-space-m);\n min-inline-size: 0;\n }\n ::slotted(:where(h1, h2, h3, h4, h5, h6, p, ul, ol, dl, blockquote, figure, pre)) {\n margin-block: 0;\n }\n /* In a row, a `fluid` child takes the room left, and gives it back when there's none: a task's title field fills\n its row, between its checkbox and its priority. (A column already stretches it across.) */\n :host(:state(horizontal)) ::slotted(:state(fluid)) {\n flex: 1 1 0;\n /* down to nothing, unless it has a shared `min-width` (`reset.css`): this rule would beat its own */\n min-inline-size: var(--_ui-min-width, 0);\n }\n /* a Spell UI child drops its own outside margins too (`reset.css`, \"A child of a `<ui-stack>`\") */\n ::slotted(*) {\n --_ui-stacked: 1;\n }\n}\n","import type { JSX } from \"@solidjs/web\"\n\nimport { E, UIT } from \"spell/ui/core\"\nimport { stackVocabulary } from \"./UIStack.en\"\n\nimport stackCSS from \"./UIStack.css?inline\"\n\n/****************\n * ### `<ui-stack>`\n * The component behind `<ui-stack>`: a box that lays its children out in a column or a row (epic `ui-gaps` P8).\n *\n * - Web Awesome's stack AND cluster in one tag: a column by default;\n * `direction=\"horizontal\"` a row, `wrap` one that wraps.\n * - No look: no padding, border or colour. For a drawing, which holds no `<div>` to put `.ui-stack` on.\n * - The shadow root is a bare slot: the children are the DOM element's flex items.\n * - In a row, a `fluid` child (`<ui-input fluid>`, `<ui-dropdown fluid>` ...) takes the room left (epic `language` T57):\n * a task's title field fills its row, between its checkbox and its priority.\n * - A `fluid` stack too (`:state(fluid)`, epic `language` T88): a picture's details beside it.\n * - `stackable=\"34em\"`: a row that becomes a column when the room it's in is narrower (epic `language` P35, I63).\n * - The room: the nearest size container around it (`@container`), or the window (`@media`), whichever is\n * narrower. NOT its own width: a stack sized by what's in it would be a row or a column by its own choice.\n * - Nested in its `:host` rule, so each stack queries its own length.\n * - While a column, it hands its children `--_ui-stack-turn: 90deg`: an icon `rotated=\"when stacked\"` turns.\n * - Its attributes become one `:host` rule of its own (`hostLayout`, written by `UIComponent`),\n * so the page's own `style` stays the author's.\n * - Nothing focusable: no `delegatesFocus`.\n ****************/\nexport class UIStack extends E.UIComponent<typeof stackVocabulary> {\n @E.proto static vocabulary = stackVocabulary\n @E.protoMerged static elementSetup = {\n styleSheets: { stack: stackCSS },\n delegatesFocus: false,\n // a `fluid` stack in another stack's row takes the room left, as a `fluid` input does (epic `language` T88)\n cssStates: [\"fluid\"]\n } satisfies Partial<E.ElementSetup>\n\n /** A row, not a column: `:state(horizontal)`, where a `fluid` child takes the row's leftover room. */\n @E.cssState(\"horizontal\")\n get isHorizontal(): boolean {\n return this.direction === HORIZONTAL\n }\n\n /**\n * The width of room below which a `stackable` row becomes a column: its length, or a phone's (768px) when bare;\n * `undefined` when it isn't `stackable`, or isn't a row.\n */\n @E.cssState(\"stackable\")\n get stacksBelow(): string | undefined {\n const { stackable } = this\n if (!this.isHorizontal || !E.Converters.boolean(stackable)) return undefined\n return /^(|true|yes|stackable)$/i.test(stackable!.trim()) ? PHONE_WIDTH : stackable\n }\n\n /** Its `:host` rule: direction, wrap, spacing, alignment, width; and, `stackable`, the column it becomes. */\n @E.derived\n protected get hostLayout(): string {\n const rules = [`gap: ${UIT.SpaceSteps[this.spacing as UIT.SpaceStep] ?? UIT.SpaceSteps.md}`]\n if (this.isHorizontal) rules.push(\"flex-direction: row\", \"align-items: center\")\n if (this.wrap) rules.push(\"flex-wrap: wrap\")\n const align = ALIGN[this.align as keyof typeof ALIGN]\n if (align) rules.push(`align-items: ${align}`)\n const justify = JUSTIFY[this.justify as keyof typeof JUSTIFY]\n if (justify) rules.push(`justify-content: ${justify}`)\n if (this.fluid) rules.push(\"inline-size: 100%\")\n const below = this.stacksBelow\n if (below) {\n // a column, its arrows turned; a `fluid` child keeps its own height in a column\n const column = `flex-direction: column; ${STACK_TURN}: 90deg; & > slot::slotted(:state(fluid)) { flex: none }`\n rules.push(`@container (width < ${below}) { ${column} }`, `@media (width < ${below}) { ${column} }`)\n }\n return rules.join(\"; \")\n }\n\n render(): JSX.Element {\n return <slot />\n }\n}\n\n/** The vocabulary's attribute getters, typed (see \"Attributes\" in `UIComponent`). */\nexport interface UIStack extends E.AttributeValues<typeof stackVocabulary> {}\n\n/** `direction`'s row. */\nconst HORIZONTAL = \"horizontal\"\n\n/** A bare `stackable`'s width: a phone's, as every other family's `stackable` (`media.css`'s `--ui-mobile`). */\nconst PHONE_WIDTH = \"768px\"\n\n/** What a stacked stack hands its children: an icon `rotated=\"when stacked\"` turns by it (`UIIcon.css`). */\nconst STACK_TURN = \"--_ui-stack-turn\"\n\n/** `align` => `align-items`. */\nconst ALIGN = {\n start: \"flex-start\",\n center: \"center\",\n end: \"flex-end\",\n stretch: \"stretch\",\n baseline: \"baseline\"\n} as const\n\n/** `justify` => `justify-content`. */\nconst JUSTIFY = {\n start: \"flex-start\",\n center: \"center\",\n end: \"flex-end\",\n between: \"space-between\",\n around: \"space-around\"\n} as const\n","/**\n * The stack family: defines `<ui-stack>` and exports its component, `UIStack`.\n * - SIDE EFFECT: importing it defines the tag.\n * - Also the library's `spell/ui/ui-stack` entry (its size is in `notes/report.md`).\n */\n\nimport { UIStack } from \"./UIStack\"\n\nUIStack.define()\n\nexport { UIStack }\n"],"mappings":";;;;AAeA,IAAaiB,IAAkB;CAC7B,KAAK;CACL,MAAM;CACN,QAAQ,CAAC,UAAU,OAAO;CAC1B,KAAK;EAAC;EAAS;EAAW;EAAY;EAAO;EAAU;EAAQ;EAAQ;CAAQ;CAC/E,MAAM;CACN,aACE;CACF,YAAY;EACV;GACE,MAAM;GACN,OAAO;GACP,MAAM;GACN,QAAQ,CAAC,YAAY,YAAY;GACjC,SAAS;GACT,aAAa;EACf;EACA;GACE,MAAM;GACN,OAAO;GACP,MAAM;GACN,aAAa;EACf;EACA;GACE,MAAM;GACN,OAAO;GACP,MAAM;GACN,QAAQ;IAAC;IAAQ;IAAM;IAAM;IAAM;IAAM;GAAI;GAC7C,SAAS;GACT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