spell-ui 0.8.6 → 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 +13 -3
- package/dist/components/ui-components/UIComponents.d.ts +1 -0
- package/dist/components/ui-components/UIComponents.en.d.ts +1 -0
- package/dist/components/ui-container/UIContainer.d.ts +11 -0
- package/dist/components/ui-container/UIContainer.en.d.ts +7 -0
- package/dist/components/ui-container/UIContainer.es.d.ts +1 -0
- package/dist/components/ui-diagram/UIDiagram.d.ts +268 -0
- package/dist/components/ui-diagram/UIDiagram.en.d.ts +106 -0
- package/dist/components/ui-diagram/UIDiagram.es.d.ts +37 -0
- package/dist/components/ui-diagram/UIDiagramNode.d.ts +98 -0
- package/dist/components/ui-diagram/UIDiagramNode.en.d.ts +38 -0
- package/dist/components/ui-diagram/UIDiagramNode.es.d.ts +16 -0
- package/dist/components/ui-diagram/index.d.ts +8 -0
- package/dist/components/ui-dimension/UIDimension.d.ts +81 -0
- package/dist/components/ui-dimension/UIDimension.en.d.ts +54 -0
- package/dist/components/ui-dimension/UIDimension.es.d.ts +22 -0
- package/dist/components/ui-dimension/index.d.ts +2 -0
- package/dist/components/ui-dimmer/UIDimmer.d.ts +6 -1
- package/dist/components/ui-dimmer/UIDimmer.en.d.ts +1 -0
- package/dist/components/ui-dimmer/UIDimmer.es.d.ts +1 -1
- package/dist/components/ui-divider/UIDivider.d.ts +2 -0
- package/dist/components/ui-divider/UIDivider.en.d.ts +2 -0
- package/dist/components/ui-divider/UIDivider.es.d.ts +1 -0
- package/dist/components/ui-dropdown/UIDropdown.d.ts +6 -0
- package/dist/components/ui-dropdown/UIDropdown.en.d.ts +6 -0
- package/dist/components/ui-dropdown/UIDropdown.fallback.d.ts +6 -0
- package/dist/components/ui-embed/UIEmbed.d.ts +1 -0
- package/dist/components/ui-embed/UIEmbed.en.d.ts +1 -0
- package/dist/components/ui-emoji/UIEmoji.d.ts +1 -0
- package/dist/components/ui-emoji/UIEmoji.en.d.ts +1 -0
- package/dist/components/ui-example/UIExample.en.d.ts +4 -2
- package/dist/components/ui-example/UIExample.es.d.ts +3 -2
- package/dist/components/ui-feed/UIFeed.d.ts +1 -0
- package/dist/components/ui-feed/UIFeed.en.d.ts +1 -0
- package/dist/components/ui-feed/UIFeedEvent.d.ts +1 -0
- package/dist/components/ui-feed/UIFeedEvent.en.d.ts +1 -0
- package/dist/components/ui-flag/UIFlag.d.ts +1 -0
- package/dist/components/ui-flag/UIFlag.en.d.ts +1 -0
- package/dist/components/ui-flyout/UIFlyout.d.ts +1 -0
- package/dist/components/ui-flyout/UIFlyout.en.d.ts +1 -0
- package/dist/components/ui-form/FormBinding.d.ts +13 -1
- package/dist/components/ui-form/FormFields.d.ts +4 -4
- package/dist/components/ui-form/UIField.d.ts +30 -3
- package/dist/components/ui-form/UIField.en.d.ts +9 -0
- package/dist/components/ui-form/UIField.es.d.ts +6 -0
- package/dist/components/ui-form/UIFields.d.ts +1 -0
- package/dist/components/ui-form/UIFields.en.d.ts +1 -0
- package/dist/components/ui-form/UIForm.d.ts +15 -0
- package/dist/components/ui-form/UIForm.en.d.ts +6 -0
- package/dist/components/ui-form/UIRepeat.d.ts +1 -0
- package/dist/components/ui-form/UIRepeat.en.d.ts +1 -0
- package/dist/components/ui-form/index.d.ts +2 -1
- package/dist/components/ui-grid/UIColumn.d.ts +1 -0
- package/dist/components/ui-grid/UIColumn.en.d.ts +1 -0
- package/dist/components/ui-grid/UIGrid.d.ts +1 -0
- package/dist/components/ui-grid/UIGrid.en.d.ts +1 -0
- package/dist/components/ui-grid/UIRow.d.ts +1 -0
- package/dist/components/ui-grid/UIRow.en.d.ts +1 -0
- package/dist/components/ui-icon/UIIcon.d.ts +3 -2
- package/dist/components/ui-icon/UIIcon.en.d.ts +3 -2
- package/dist/components/ui-icon/UIIcons.d.ts +1 -0
- package/dist/components/ui-icon/UIIcons.en.d.ts +1 -0
- package/dist/components/ui-icon-picker/UIIconPicker.d.ts +6 -0
- package/dist/components/ui-icon-picker/UIIconPicker.en.d.ts +6 -0
- package/dist/components/ui-icon-picker/UIIconPicker.fallback.d.ts +6 -0
- package/dist/components/ui-image/UIImage.d.ts +34 -0
- package/dist/components/ui-image/UIImage.en.d.ts +23 -0
- package/dist/components/ui-image/UIImage.es.d.ts +2 -0
- package/dist/components/ui-image/UIImages.d.ts +1 -0
- package/dist/components/ui-image/UIImages.en.d.ts +1 -0
- package/dist/components/ui-include/UIInclude.d.ts +1 -0
- package/dist/components/ui-include/UIInclude.en.d.ts +1 -0
- package/dist/components/ui-input/TextControl.d.ts +7 -0
- package/dist/components/ui-input/UIInput.d.ts +22 -3
- package/dist/components/ui-input/UIInput.en.d.ts +9 -2
- package/dist/components/ui-input/UIInput.es.d.ts +2 -0
- package/dist/components/ui-input/UIInput.fallback.d.ts +9 -2
- package/dist/components/ui-input/UITextarea.d.ts +20 -0
- package/dist/components/ui-input/UITextarea.en.d.ts +15 -0
- package/dist/components/ui-input/UITextarea.es.d.ts +4 -0
- package/dist/components/ui-item/UIItem.d.ts +27 -4
- package/dist/components/ui-item/UIItem.en.d.ts +5 -1
- package/dist/components/ui-items/UIItems.d.ts +1 -0
- package/dist/components/ui-items/UIItems.en.d.ts +1 -0
- package/dist/components/ui-json/JsonChild.d.ts +30 -0
- package/dist/components/ui-json/UIJson.d.ts +128 -0
- package/dist/components/ui-json/UIJson.en.d.ts +71 -0
- package/dist/components/ui-json/UIJson.es.d.ts +12 -0
- package/dist/components/ui-json/index.d.ts +3 -0
- package/dist/components/ui-keys/UIKeys.d.ts +1 -0
- package/dist/components/ui-keys/UIKeys.en.d.ts +1 -0
- package/dist/components/ui-label/UILabel.d.ts +2 -0
- package/dist/components/ui-label/UILabel.en.d.ts +2 -0
- package/dist/components/ui-label/UILabel.es.d.ts +1 -0
- package/dist/components/ui-label/UILabels.d.ts +1 -0
- package/dist/components/ui-label/UILabels.en.d.ts +1 -0
- package/dist/components/ui-list/UIList.d.ts +2 -0
- package/dist/components/ui-list/UIList.en.d.ts +2 -0
- package/dist/components/ui-list/UIList.es.d.ts +1 -0
- package/dist/components/ui-loader/UILoader.d.ts +1 -0
- package/dist/components/ui-loader/UILoader.en.d.ts +1 -0
- package/dist/components/ui-markdown/MarkdownBox.d.ts +143 -0
- package/dist/components/ui-markdown/MarkdownEngine.d.ts +14 -2
- package/dist/components/ui-markdown/MarkdownFormats.d.ts +95 -0
- package/dist/components/ui-markdown/MarkdownSource.d.ts +57 -0
- package/dist/components/ui-markdown/UIMarkdown.d.ts +126 -6
- package/dist/components/ui-markdown/UIMarkdown.en.d.ts +111 -8
- package/dist/components/ui-markdown/UIMarkdown.es.d.ts +29 -1
- package/dist/components/ui-markdown/UIMarkdown.types.d.ts +26 -0
- package/dist/components/ui-menu/ScrollingRow.d.ts +79 -0
- package/dist/components/ui-menu/TitleFit.d.ts +3 -0
- package/dist/components/ui-menu/UIMenu.d.ts +97 -4
- package/dist/components/ui-menu/UIMenu.en.d.ts +50 -1
- package/dist/components/ui-menu/UIMenu.es.d.ts +4 -0
- package/dist/components/ui-message/UIMessage.d.ts +2 -0
- package/dist/components/ui-message/UIMessage.en.d.ts +2 -0
- package/dist/components/ui-message/UIMessage.es.d.ts +1 -0
- package/dist/components/ui-modal/UIModal.d.ts +1 -0
- package/dist/components/ui-modal/UIModal.en.d.ts +1 -0
- package/dist/components/ui-nag/UINag.d.ts +1 -0
- package/dist/components/ui-nag/UINag.en.d.ts +1 -0
- package/dist/components/ui-page/UIPage.d.ts +15 -0
- package/dist/components/ui-page/UIPage.en.d.ts +15 -0
- package/dist/components/ui-page/UIPage.es.d.ts +1 -0
- package/dist/components/ui-panel/UIPanel.d.ts +6 -0
- package/dist/components/ui-panel/UIPanel.en.d.ts +33 -20
- package/dist/components/ui-parts/UIActions.d.ts +1 -0
- package/dist/components/ui-parts/UIActions.en.d.ts +1 -0
- package/dist/components/ui-parts/UIAuthor.d.ts +1 -0
- package/dist/components/ui-parts/UIAuthor.en.d.ts +1 -0
- package/dist/components/ui-parts/UIAvatar.d.ts +1 -0
- package/dist/components/ui-parts/UIAvatar.en.d.ts +1 -0
- package/dist/components/ui-parts/UIContent.d.ts +1 -0
- package/dist/components/ui-parts/UIContent.en.d.ts +1 -0
- package/dist/components/ui-parts/UIDate.d.ts +1 -0
- package/dist/components/ui-parts/UIDate.en.d.ts +1 -0
- package/dist/components/ui-parts/UIDescription.d.ts +1 -0
- package/dist/components/ui-parts/UIDescription.en.d.ts +1 -0
- package/dist/components/ui-parts/UIDetail.d.ts +1 -0
- package/dist/components/ui-parts/UIDetail.en.d.ts +1 -0
- package/dist/components/ui-parts/UIExtra.d.ts +1 -0
- package/dist/components/ui-parts/UIExtra.en.d.ts +1 -0
- package/dist/components/ui-parts/UIHeader.d.ts +3 -1
- package/dist/components/ui-parts/UIHeader.en.d.ts +3 -1
- package/dist/components/ui-parts/UIMeta.d.ts +1 -0
- package/dist/components/ui-parts/UIMeta.en.d.ts +1 -0
- package/dist/components/ui-parts/UIParts.types.d.ts +15 -1
- package/dist/components/ui-parts/UISummary.d.ts +1 -0
- package/dist/components/ui-parts/UISummary.en.d.ts +1 -0
- package/dist/components/ui-parts/UITitle.d.ts +1 -0
- package/dist/components/ui-parts/UITitle.en.d.ts +1 -0
- package/dist/components/ui-parts/UIValue.d.ts +1 -0
- package/dist/components/ui-parts/UIValue.en.d.ts +1 -0
- package/dist/components/ui-placeholder/UIPlaceholder.d.ts +1 -0
- package/dist/components/ui-placeholder/UIPlaceholder.en.d.ts +1 -0
- package/dist/components/ui-placeholder/UIPlaceholderHeader.d.ts +1 -0
- package/dist/components/ui-placeholder/UIPlaceholderHeader.en.d.ts +1 -0
- package/dist/components/ui-placeholder/UIPlaceholderImage.d.ts +1 -0
- package/dist/components/ui-placeholder/UIPlaceholderImage.en.d.ts +1 -0
- package/dist/components/ui-placeholder/UIPlaceholderLine.d.ts +1 -0
- package/dist/components/ui-placeholder/UIPlaceholderLine.en.d.ts +1 -0
- package/dist/components/ui-placeholder/UIPlaceholderParagraph.d.ts +1 -0
- package/dist/components/ui-placeholder/UIPlaceholderParagraph.en.d.ts +1 -0
- package/dist/components/ui-popup/UIPopup.d.ts +30 -3
- package/dist/components/ui-popup/UIPopup.en.d.ts +7 -0
- package/dist/components/ui-popup/UIPopup.es.d.ts +1 -0
- package/dist/components/ui-progress/UIProgress.d.ts +2 -0
- package/dist/components/ui-progress/UIProgress.en.d.ts +2 -0
- package/dist/components/ui-progress/UIProgress.es.d.ts +1 -0
- package/dist/components/ui-property-editor/UIProperty.d.ts +132 -5
- package/dist/components/ui-property-editor/UIProperty.en.d.ts +11 -44
- package/dist/components/ui-property-editor/UIProperty.es.d.ts +4 -0
- package/dist/components/ui-property-editor/UIPropertyEditor.d.ts +38 -0
- package/dist/components/ui-property-editor/UIPropertyEditor.en.d.ts +1 -0
- package/dist/components/ui-property-editor/UIPropertyEditor.es.d.ts +4 -0
- package/dist/components/ui-property-editor/UIPropertyEditor.types.d.ts +33 -0
- package/dist/components/ui-property-editor/UIPropertyGroup.d.ts +12 -0
- package/dist/components/ui-property-editor/UIPropertyGroup.en.d.ts +2 -0
- package/dist/components/ui-property-editor/UIPropertyGroup.es.d.ts +9 -0
- package/dist/components/ui-property-editor/index.d.ts +1 -0
- package/dist/components/ui-quote/UIQuote.d.ts +1 -0
- package/dist/components/ui-quote/UIQuote.en.d.ts +1 -0
- package/dist/components/ui-rail/UIRail.d.ts +1 -0
- package/dist/components/ui-rail/UIRail.en.d.ts +1 -0
- package/dist/components/ui-rating/UIRating.d.ts +6 -0
- package/dist/components/ui-rating/UIRating.en.d.ts +6 -0
- package/dist/components/ui-rating/UIRating.fallback.d.ts +6 -0
- package/dist/components/ui-reveal/UIReveal.d.ts +1 -0
- package/dist/components/ui-reveal/UIReveal.en.d.ts +1 -0
- package/dist/components/ui-root/UIRoot.d.ts +18 -3
- package/dist/components/ui-root/UIRoot.en.d.ts +15 -0
- package/dist/components/ui-root/UIRoot.es.d.ts +1 -0
- package/dist/components/ui-search/UISearch.d.ts +48 -7
- package/dist/components/ui-search/UISearch.en.d.ts +13 -1
- package/dist/components/ui-search/UISearch.es.d.ts +1 -0
- package/dist/components/ui-search/UISearch.fallback.d.ts +13 -1
- package/dist/components/ui-section/UISection.d.ts +22 -1
- package/dist/components/ui-section/UISection.en.d.ts +10 -0
- package/dist/components/ui-section/UISection.es.d.ts +1 -0
- package/dist/components/ui-section/UISections.d.ts +1 -0
- package/dist/components/ui-section/UISections.en.d.ts +1 -0
- package/dist/components/ui-segment/UISegment.d.ts +2 -0
- package/dist/components/ui-segment/UISegment.en.d.ts +2 -0
- package/dist/components/ui-segment/UISegment.es.d.ts +1 -0
- package/dist/components/ui-segment/UISegments.d.ts +1 -0
- package/dist/components/ui-segment/UISegments.en.d.ts +1 -0
- package/dist/components/ui-select/UISelect.d.ts +6 -0
- package/dist/components/ui-select/UISelect.en.d.ts +6 -0
- package/dist/components/ui-select/UISelect.fallback.d.ts +6 -0
- package/dist/components/ui-shape/UIShape.d.ts +23 -2
- package/dist/components/ui-shape/UIShape.en.d.ts +8 -0
- package/dist/components/ui-shape/UIShape.es.d.ts +1 -0
- package/dist/components/ui-shape/UISide.d.ts +4 -0
- package/dist/components/ui-shape/UISide.en.d.ts +4 -0
- package/dist/components/ui-sidebar/UIPushable.d.ts +1 -0
- package/dist/components/ui-sidebar/UIPushable.en.d.ts +1 -0
- package/dist/components/ui-sidebar/UIPusher.d.ts +1 -0
- package/dist/components/ui-sidebar/UIPusher.en.d.ts +1 -0
- package/dist/components/ui-sidebar/UISidebar.d.ts +1 -0
- package/dist/components/ui-sidebar/UISidebar.en.d.ts +1 -0
- package/dist/components/ui-sides/UISides.d.ts +209 -0
- package/dist/components/ui-sides/UISides.en.d.ts +122 -0
- package/dist/components/ui-sides/UISides.es.d.ts +30 -0
- package/dist/components/ui-sides/UISides.fallback.d.ts +134 -0
- package/dist/components/ui-sides/index.d.ts +2 -0
- package/dist/components/ui-site-nav/SitePages.d.ts +53 -0
- package/dist/components/ui-site-nav/UISiteNav.d.ts +207 -0
- package/dist/components/ui-site-nav/UISiteNav.en.d.ts +87 -0
- package/dist/components/ui-site-nav/UISiteNav.es.d.ts +29 -0
- package/dist/components/ui-site-nav/index.d.ts +1 -0
- package/dist/components/ui-site-tabs/UISiteTabs.d.ts +126 -0
- package/dist/components/ui-site-tabs/UISiteTabs.en.d.ts +49 -0
- package/dist/components/ui-site-tabs/UISiteTabs.es.d.ts +18 -0
- package/dist/components/ui-site-tabs/index.d.ts +1 -0
- package/dist/components/ui-slider/UISlider.d.ts +7 -0
- package/dist/components/ui-slider/UISlider.en.d.ts +7 -0
- package/dist/components/ui-slider/UISlider.es.d.ts +1 -0
- package/dist/components/ui-slider/UISlider.fallback.d.ts +7 -0
- package/dist/components/ui-space/UISpace.d.ts +1 -0
- package/dist/components/ui-space/UISpace.en.d.ts +1 -0
- package/dist/components/ui-split-panel/UISplitPanel.d.ts +175 -0
- package/dist/components/ui-split-panel/UISplitPanel.en.d.ts +74 -0
- package/dist/components/ui-split-panel/UISplitPanel.es.d.ts +25 -0
- package/dist/components/ui-split-panel/index.d.ts +2 -0
- package/dist/components/ui-stack/UIStack.d.ts +31 -5
- package/dist/components/ui-stack/UIStack.en.d.ts +15 -3
- package/dist/components/ui-statistic/UIStatistic.d.ts +1 -0
- package/dist/components/ui-statistic/UIStatistic.en.d.ts +1 -0
- package/dist/components/ui-statistic/UIStatistics.d.ts +1 -0
- package/dist/components/ui-statistic/UIStatistics.en.d.ts +1 -0
- package/dist/components/ui-step/UIStep.d.ts +1 -0
- package/dist/components/ui-step/UIStep.en.d.ts +1 -0
- package/dist/components/ui-step/UISteps.d.ts +1 -0
- package/dist/components/ui-step/UISteps.en.d.ts +1 -0
- package/dist/components/ui-sticky/UISticky.d.ts +4 -0
- package/dist/components/ui-sticky/UISticky.en.d.ts +1 -0
- package/dist/components/ui-tab/UITab.d.ts +8 -0
- package/dist/components/ui-tab/UITab.en.d.ts +1 -0
- package/dist/components/ui-tab/UITabs.d.ts +107 -16
- package/dist/components/ui-tab/UITabs.en.d.ts +40 -1
- package/dist/components/ui-tab/UITabs.es.d.ts +4 -0
- package/dist/components/ui-table/TableEditing.d.ts +77 -0
- package/dist/components/ui-table/UICell.d.ts +1 -0
- package/dist/components/ui-table/UICell.en.d.ts +1 -0
- package/dist/components/ui-table/UITable.d.ts +145 -5
- package/dist/components/ui-table/UITable.en.d.ts +19 -0
- package/dist/components/ui-table/UITable.es.d.ts +3 -0
- package/dist/components/ui-terms/UITerm.d.ts +1 -0
- package/dist/components/ui-terms/UITerm.en.d.ts +1 -0
- package/dist/components/ui-terms/UITerms.d.ts +1 -0
- package/dist/components/ui-terms/UITerms.en.d.ts +1 -0
- package/dist/components/ui-text/UILink.d.ts +11 -0
- package/dist/components/ui-text/UILink.en.d.ts +4 -0
- package/dist/components/ui-text/UIText.d.ts +7 -0
- package/dist/components/ui-text/UIText.en.d.ts +7 -0
- package/dist/components/ui-text/UIText.es.d.ts +2 -0
- package/dist/components/ui-theme-editor/SavedTheme.d.ts +55 -43
- package/dist/components/ui-theme-editor/ThemeDraft.d.ts +15 -0
- package/dist/components/ui-theme-editor/UIColorChip.d.ts +1 -0
- package/dist/components/ui-theme-editor/UIColorChip.en.d.ts +1 -0
- package/dist/components/ui-theme-editor/UIThemeEditor.d.ts +157 -26
- package/dist/components/ui-theme-editor/UIThemeEditor.en.d.ts +79 -6
- package/dist/components/ui-theme-editor/UIThemeEditor.es.d.ts +20 -2
- package/dist/components/ui-theme-editor/UIThemeEditor.types.d.ts +0 -2
- package/dist/components/ui-theme-editor/UIThemeToken.d.ts +1 -0
- package/dist/components/ui-theme-editor/UIThemeToken.en.d.ts +1 -0
- package/dist/components/ui-theme-menu/HueDropdown.d.ts +47 -0
- package/dist/components/ui-theme-menu/ThemeMenu.d.ts +18 -7
- package/dist/components/ui-theme-menu/ThemePreference.d.ts +145 -36
- package/dist/components/ui-theme-menu/UIThemeMenu.d.ts +118 -7
- package/dist/components/ui-theme-menu/UIThemeMenu.en.d.ts +82 -2
- package/dist/components/ui-theme-menu/UIThemeMenu.es.d.ts +21 -1
- package/dist/components/ui-theme-menu/UIThemeMenu.types.d.ts +36 -8
- package/dist/components/ui-theme-menu/index.d.ts +2 -1
- package/dist/components/ui-toast/UIToast.d.ts +1 -0
- package/dist/components/ui-toast/UIToast.en.d.ts +1 -0
- package/dist/components/ui-toc/UIToc.d.ts +1 -0
- package/dist/components/ui-toc/UIToc.en.d.ts +1 -0
- package/dist/components/ui-toolbar/UIToolbar.d.ts +13 -10
- package/dist/components/ui-toolbar/UIToolbar.en.d.ts +138 -84
- package/dist/components/ui-toolbar/UIToolbar.es.d.ts +2 -0
- package/dist/components/ui-transition/UITransition.d.ts +1 -0
- package/dist/components/ui-transition/UITransition.en.d.ts +1 -0
- package/dist/components/ui-tree/UITree.d.ts +162 -0
- package/dist/components/ui-tree/UITree.en.d.ts +88 -0
- package/dist/components/ui-tree/UITree.es.d.ts +35 -0
- package/dist/components/ui-tree/UITreeItem.d.ts +204 -0
- package/dist/components/ui-tree/UITreeItem.en.d.ts +142 -0
- package/dist/components/ui-tree/UITreeItem.es.d.ts +32 -0
- package/dist/components/ui-tree/index.d.ts +3 -0
- package/dist/components/ui-tree-diagram/TreeData.d.ts +3 -12
- package/dist/components/ui-tree-diagram/TreeLayout.d.ts +54 -21
- package/dist/components/ui-tree-diagram/TreeMeasure.d.ts +36 -0
- package/dist/components/ui-tree-diagram/UITreeDiagram.d.ts +152 -27
- package/dist/components/ui-tree-diagram/UITreeDiagram.en.d.ts +47 -7
- package/dist/components/ui-tree-diagram/UITreeDiagram.es.d.ts +12 -1
- package/dist/components/ui-tree-diagram/UITreeDiagram.types.d.ts +66 -21
- package/dist/components/ui-tree-diagram/UITreeNode.d.ts +148 -0
- package/dist/components/ui-tree-diagram/UITreeNode.en.d.ts +69 -0
- package/dist/components/ui-tree-diagram/UITreeNode.es.d.ts +21 -0
- package/dist/components/ui-tree-diagram/index.d.ts +4 -2
- package/dist/components/ui-video/UIAudio.d.ts +1 -0
- package/dist/components/ui-video/UIAudio.en.d.ts +1 -0
- package/dist/components/ui-video/UIVideo.d.ts +1 -0
- package/dist/components/ui-video/UIVideo.en.d.ts +1 -0
- package/dist/components/ui-visibility/UIVisibility.d.ts +1 -0
- package/dist/components/ui-visibility/UIVisibility.en.d.ts +1 -0
- package/dist/components/ui-zoom/UIZoom.d.ts +1 -0
- package/dist/components/ui-zoom/UIZoom.en.d.ts +1 -0
- package/dist/{components.es-DmLzT-Bq.js → components.es-BOa_7gFF.js} +498 -109
- package/dist/components.es-BOa_7gFF.js.map +1 -0
- package/dist/core.d.ts +3 -1
- package/dist/core.js +1082 -511
- package/dist/core.js.map +1 -1
- package/dist/crisp-VfYZlTph.js +6 -0
- package/dist/{crisp-CoZRRDuQ.js.map → crisp-VfYZlTph.js.map} +1 -1
- package/dist/docs-components/index.d.ts +1 -0
- package/dist/docs-components/ui-docs-index/UIDocsIndex.d.ts +89 -0
- package/dist/docs-components/ui-docs-index/UIDocsIndex.en.d.ts +43 -0
- package/dist/docs-components/ui-docs-index/index.d.ts +2 -0
- package/dist/docs-components/ui-docs-nav/UIDocsNav.d.ts +54 -87
- package/dist/docs-components/ui-docs-nav/UIDocsNav.types.d.ts +2 -29
- package/dist/docs-components/ui-docs-search/SearchIndex.d.ts +8 -2
- package/dist/docs-components/ui-docs-search/UIDocsSearch.d.ts +10 -0
- package/dist/docs-components/ui-docs-search/UIDocsSearch.en.d.ts +5 -0
- package/dist/elements/AddressParameter.d.ts +87 -0
- package/dist/elements/DOMFormControl.d.ts +5 -0
- package/dist/elements/FormComponent.d.ts +32 -0
- package/dist/elements/LoadableBody.d.ts +6 -1
- package/dist/elements/LoadableComponent.d.ts +10 -1
- package/dist/elements/RootSettings.d.ts +43 -6
- package/dist/elements/SpellUISettings.d.ts +1 -0
- package/dist/elements/StickyWatch.d.ts +20 -0
- package/dist/elements/elements.types.d.ts +15 -0
- package/dist/elements/index.d.ts +2 -0
- package/dist/forms.js +93 -63
- package/dist/forms.js.map +1 -1
- package/dist/fruity-BRVlgJZd.js +6 -0
- package/dist/fruity-BRVlgJZd.js.map +1 -0
- package/dist/{fruity.theme-BJcMiPl1.js → fruity.theme-CbC7Jyvk.js} +2 -2
- package/dist/fruity.theme-CbC7Jyvk.js.map +1 -0
- package/dist/glass-x9tbbwVq.js +6 -0
- package/dist/glass-x9tbbwVq.js.map +1 -0
- package/dist/glass.theme-24wY2wH9.js +6 -0
- package/dist/glass.theme-24wY2wH9.js.map +1 -0
- package/dist/hot.js +530 -24
- package/dist/hot.js.map +1 -1
- package/dist/index.d.ts +8 -0
- package/dist/index.js +91 -81
- package/dist/jsx.d.ts +21149 -10377
- package/dist/matrix-QY2gWbJ0.js +6 -0
- package/dist/{matrix-CqA59hiF.js.map → matrix-QY2gWbJ0.js.map} +1 -1
- package/dist/{matrix.theme-jqQZjcq3.js → matrix.theme-_8xtwhDq.js} +2 -2
- package/dist/matrix.theme-_8xtwhDq.js.map +1 -0
- package/dist/midnight-BxlTQSfw.js +6 -0
- package/dist/{midnight-BnoVOrhC.js.map → midnight-BxlTQSfw.js.map} +1 -1
- package/dist/mockup-83ELBuVr.js +6 -0
- package/dist/mockup-83ELBuVr.js.map +1 -0
- package/dist/mockup.theme-DmpBgGBl.js +6 -0
- package/dist/mockup.theme-DmpBgGBl.js.map +1 -0
- package/dist/paper-M61nUilz.js +6 -0
- package/dist/{paper-CynH8ZuT.js.map → paper-M61nUilz.js.map} +1 -1
- package/dist/persist.types-D2m6wD-S.js +9 -0
- package/dist/persist.types-D2m6wD-S.js.map +1 -0
- package/dist/pop-CxXfytjk.js +6 -0
- package/dist/{pop-D2i9V_rG.js.map → pop-CxXfytjk.js.map} +1 -1
- package/dist/runtime/DataTooltips.d.ts +75 -0
- package/dist/runtime/PropertyControls.d.ts +15 -1
- package/dist/runtime/Sources.d.ts +16 -4
- package/dist/runtime/Styles.d.ts +11 -0
- package/dist/runtime/Themes.d.ts +10 -4
- package/dist/runtime/UIRuntime.d.ts +4 -1
- package/dist/runtime/index.d.ts +1 -1
- package/dist/runtime/runtime.types.d.ts +18 -85
- package/dist/spell-By5Y3jKP.js +6 -0
- package/dist/{spell-BFtLICm7.js.map → spell-By5Y3jKP.js.map} +1 -1
- package/dist/{spell.theme-B7AU7SQX.js → spell.theme-DxGj7qHx.js} +2 -2
- package/dist/spell.theme-DxGj7qHx.js.map +1 -0
- package/dist/styles/CodeThemeFile.d.ts +73 -0
- package/dist/styles/StyleGenerator.d.ts +6 -0
- package/dist/styles/styles.en.d.ts +141 -3
- package/dist/styles/styles.types.d.ts +2 -0
- package/dist/{styles.en-RLpYiO5_.js → styles.en-CUUxNwHo.js} +71 -14
- package/dist/styles.en-CUUxNwHo.js.map +1 -0
- package/dist/styles.js +13 -13
- package/dist/styles.js.map +1 -1
- package/dist/ui-accordion.js +54 -53
- package/dist/ui-accordion.js.map +1 -1
- package/dist/ui-action.js +20 -19
- package/dist/ui-action.js.map +1 -1
- package/dist/ui-ad.js +5 -4
- package/dist/ui-ad.js.map +1 -1
- package/dist/ui-breadcrumbs.js +15 -13
- package/dist/ui-breadcrumbs.js.map +1 -1
- package/dist/ui-button.js +132 -125
- package/dist/ui-button.js.map +1 -1
- package/dist/ui-calendar.js +208 -206
- package/dist/ui-calendar.js.map +1 -1
- package/dist/ui-card.js +260 -98
- package/dist/ui-card.js.map +1 -1
- package/dist/ui-checkbox.js +95 -81
- package/dist/ui-checkbox.js.map +1 -1
- package/dist/ui-code.js +25 -24
- package/dist/ui-code.js.map +1 -1
- package/dist/ui-comment.js +14 -12
- package/dist/ui-comment.js.map +1 -1
- package/dist/ui-components.js +7 -6
- package/dist/ui-components.js.map +1 -1
- package/dist/ui-container.js +24 -12
- package/dist/ui-container.js.map +1 -1
- package/dist/ui-diagram.js +1328 -0
- package/dist/ui-diagram.js.map +1 -0
- package/dist/ui-dimension.js +779 -0
- package/dist/ui-dimension.js.map +1 -0
- package/dist/ui-dimmer.js +36 -34
- package/dist/ui-dimmer.js.map +1 -1
- package/dist/ui-divider.js +7 -5
- package/dist/ui-divider.js.map +1 -1
- package/dist/ui-dropdown.js +107 -105
- package/dist/ui-dropdown.js.map +1 -1
- package/dist/ui-embed.js +36 -35
- package/dist/ui-embed.js.map +1 -1
- package/dist/ui-emoji.js +10 -9
- package/dist/ui-emoji.js.map +1 -1
- package/dist/ui-example.js +63 -61
- package/dist/ui-example.js.map +1 -1
- package/dist/ui-feed.js +12 -10
- package/dist/ui-feed.js.map +1 -1
- package/dist/ui-flag.js +10 -9
- package/dist/ui-flag.js.map +1 -1
- package/dist/ui-flyout.js +7 -6
- package/dist/ui-flyout.js.map +1 -1
- package/dist/ui-form.js +244 -162
- package/dist/ui-form.js.map +1 -1
- package/dist/ui-grid.js +21 -18
- package/dist/ui-grid.js.map +1 -1
- package/dist/ui-icon-picker.js +46 -44
- package/dist/ui-icon-picker.js.map +1 -1
- package/dist/ui-icon.js +17 -14
- package/dist/ui-icon.js.map +1 -1
- package/dist/ui-image.js +93 -55
- package/dist/ui-image.js.map +1 -1
- package/dist/ui-include.js +18 -17
- package/dist/ui-include.js.map +1 -1
- package/dist/ui-input.js +154 -112
- package/dist/ui-input.js.map +1 -1
- package/dist/ui-item.js +152 -102
- package/dist/ui-item.js.map +1 -1
- package/dist/ui-items.js +9 -8
- package/dist/ui-items.js.map +1 -1
- package/dist/ui-json.js +115 -0
- package/dist/ui-json.js.map +1 -0
- package/dist/ui-keys.js +1 -1
- package/dist/ui-label.js +18 -15
- package/dist/ui-label.js.map +1 -1
- package/dist/ui-list.js +7 -5
- package/dist/ui-list.js.map +1 -1
- package/dist/ui-loader.js +7 -6
- package/dist/ui-loader.js.map +1 -1
- package/dist/ui-markdown.js +975 -83
- package/dist/ui-markdown.js.map +1 -1
- package/dist/ui-menu.js +329 -196
- package/dist/ui-menu.js.map +1 -1
- package/dist/ui-message.js +20 -18
- package/dist/ui-message.js.map +1 -1
- package/dist/ui-modal.js +46 -45
- package/dist/ui-modal.js.map +1 -1
- package/dist/ui-nag.js +19 -18
- package/dist/ui-nag.js.map +1 -1
- package/dist/ui-page.js +8 -7
- package/dist/ui-page.js.map +1 -1
- package/dist/ui-panel.js +28 -17
- package/dist/ui-panel.js.map +1 -1
- package/dist/ui-parts.js +66 -52
- package/dist/ui-parts.js.map +1 -1
- package/dist/ui-placeholder.js +21 -16
- package/dist/ui-placeholder.js.map +1 -1
- package/dist/ui-popup.js +113 -84
- package/dist/ui-popup.js.map +1 -1
- package/dist/ui-progress.js +9 -7
- package/dist/ui-progress.js.map +1 -1
- package/dist/ui-property-editor.js +706 -203
- package/dist/ui-property-editor.js.map +1 -1
- package/dist/ui-quote.js +5 -4
- package/dist/ui-quote.js.map +1 -1
- package/dist/ui-rail.js +5 -4
- package/dist/ui-rail.js.map +1 -1
- package/dist/ui-rating.js +31 -29
- package/dist/ui-rating.js.map +1 -1
- package/dist/ui-reveal.js +7 -6
- package/dist/ui-reveal.js.map +1 -1
- package/dist/ui-root.js +324 -158
- package/dist/ui-root.js.map +1 -1
- package/dist/ui-search.js +210 -168
- package/dist/ui-search.js.map +1 -1
- package/dist/ui-section.js +124 -92
- package/dist/ui-section.js.map +1 -1
- package/dist/ui-segment.js +15 -12
- package/dist/ui-segment.js.map +1 -1
- package/dist/ui-select.js +83 -81
- package/dist/ui-select.js.map +1 -1
- package/dist/ui-shape.js +86 -58
- package/dist/ui-shape.js.map +1 -1
- package/dist/ui-sidebar.js +59 -56
- package/dist/ui-sidebar.js.map +1 -1
- package/dist/ui-sides.js +325 -0
- package/dist/ui-sides.js.map +1 -0
- package/dist/ui-site-nav.js +329 -0
- package/dist/ui-site-nav.js.map +1 -0
- package/dist/ui-site-tabs.js +177 -0
- package/dist/ui-site-tabs.js.map +1 -0
- package/dist/ui-slider.js +84 -81
- package/dist/ui-slider.js.map +1 -1
- package/dist/ui-space.js +7 -6
- package/dist/ui-space.js.map +1 -1
- package/dist/ui-split-panel.js +298 -0
- package/dist/ui-split-panel.js.map +1 -0
- package/dist/ui-stack.js +47 -23
- package/dist/ui-stack.js.map +1 -1
- package/dist/ui-statistic.js +15 -13
- package/dist/ui-statistic.js.map +1 -1
- package/dist/ui-step.js +31 -29
- package/dist/ui-step.js.map +1 -1
- package/dist/ui-sticky.js +7 -6
- package/dist/ui-sticky.js.map +1 -1
- package/dist/ui-tab.js +230 -138
- package/dist/ui-tab.js.map +1 -1
- package/dist/ui-table.js +724 -162
- package/dist/ui-table.js.map +1 -1
- package/dist/ui-terms.js +12 -10
- package/dist/ui-terms.js.map +1 -1
- package/dist/ui-text.js +53 -28
- package/dist/ui-text.js.map +1 -1
- package/dist/ui-theme-editor.js +1018 -1545
- package/dist/ui-theme-editor.js.map +1 -1
- package/dist/ui-theme-menu-CuIjr8Ou.js +1493 -0
- package/dist/ui-theme-menu-CuIjr8Ou.js.map +1 -0
- package/dist/ui-toast.js +45 -44
- package/dist/ui-toast.js.map +1 -1
- package/dist/ui-toc.js +75 -74
- package/dist/ui-toc.js.map +1 -1
- package/dist/ui-toolbar.js +51 -73
- package/dist/ui-toolbar.js.map +1 -1
- package/dist/ui-transition.js +12 -11
- package/dist/ui-transition.js.map +1 -1
- package/dist/ui-tree-diagram.js +676 -197
- package/dist/ui-tree-diagram.js.map +1 -1
- package/dist/ui-tree.js +625 -0
- package/dist/ui-tree.js.map +1 -0
- package/dist/ui-video.js +13 -11
- package/dist/ui-video.js.map +1 -1
- package/dist/ui-visibility.js +26 -25
- package/dist/ui-visibility.js.map +1 -1
- package/dist/ui-zoom.js +79 -78
- package/dist/ui-zoom.js.map +1 -1
- package/dist/util/TopLayerTip.d.ts +28 -0
- package/dist/util/index.d.ts +5 -2
- package/dist/vocabulary/DefaultValues.d.ts +34 -0
- package/dist/vocabulary/SharedVocabulary.d.ts +4 -0
- package/dist/vocabulary/SharedVocabulary.es.d.ts +7 -0
- package/dist/vocabulary/ValueSets.d.ts +18 -0
- package/dist/vocabulary/Vocabulary.d.ts +1 -0
- package/dist/vocabulary/defaults.generated.d.ts +6 -0
- package/dist/vocabulary/index.d.ts +1 -0
- package/package.json +1 -1
- package/dist/MarkdownEngine-CbuT9Mjc.js.map +0 -1
- package/dist/PrefStore-CeaTtjTz.js.map +0 -1
- package/dist/UIButton-XkfGqgh6.js +0 -6
- package/dist/UIButton-XkfGqgh6.js.map +0 -1
- package/dist/UIInput-BUudZstW.js +0 -6
- package/dist/UIInput-BUudZstW.js.map +0 -1
- package/dist/UIKeys-DJF2TIKE.js.map +0 -1
- package/dist/UILabel-C1jy3Yl8.js +0 -6
- package/dist/UILabel-C1jy3Yl8.js.map +0 -1
- package/dist/UIMenu-Btd-8V3A.js +0 -42
- package/dist/UIMenu-Btd-8V3A.js.map +0 -1
- package/dist/UIRuntime-BBuehGly.js.map +0 -1
- package/dist/components.es-DmLzT-Bq.js.map +0 -1
- package/dist/crisp-CoZRRDuQ.js +0 -6
- package/dist/fruity-CQFYeRlh.js +0 -6
- package/dist/fruity-CQFYeRlh.js.map +0 -1
- package/dist/fruity.theme-BJcMiPl1.js.map +0 -1
- package/dist/glass-CAfW11kL.js +0 -6
- package/dist/glass-CAfW11kL.js.map +0 -1
- package/dist/glass.theme-DQcBbtCW.js +0 -6
- package/dist/glass.theme-DQcBbtCW.js.map +0 -1
- package/dist/matrix-CqA59hiF.js +0 -6
- package/dist/matrix.theme-jqQZjcq3.js.map +0 -1
- package/dist/midnight-BnoVOrhC.js +0 -6
- package/dist/paper-CynH8ZuT.js +0 -6
- package/dist/persist.types-CsZxS8TG.js +0 -9
- package/dist/persist.types-CsZxS8TG.js.map +0 -1
- package/dist/pop-D2i9V_rG.js +0 -6
- package/dist/spell-BFtLICm7.js +0 -6
- package/dist/spell.theme-B7AU7SQX.js.map +0 -1
- package/dist/styles.en-RLpYiO5_.js.map +0 -1
- package/dist/ui-theme-menu-DyKZygpV.js +0 -921
- package/dist/ui-theme-menu-DyKZygpV.js.map +0 -1
package/dist/ui-example.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ui-example.js","names":["<Show when={this.heading}>\n <div class={HEADING_CLASS}>\n <ui-header\n part={this.partForName(\"header\")}\n level={UIT.HeadingLevels.attributeFor(UIT.HeadingLevels.levelFor(this.level, LEVELS))}\n size={this.variation ? \"small\" : void 0}\n >\n {this.heading}\n </ui-header>\n </div>\n </Show>","this","part={this.partForName(\"header\")}","level={UIT.HeadingLevels.attributeFor(UIT.HeadingLevels.levelFor(this.level, LEVELS))}","size={this.variation ? \"small\" : void 0}","<div class={HEADING_CLASS}>\n <ui-header\n part={this.partForName(\"header\")}\n level={UIT.HeadingLevels.attributeFor(UIT.HeadingLevels.levelFor(this.level, LEVELS))}\n size={this.variation ? \"small\" : void 0}\n >\n {this.heading}\n </ui-header>\n </div>","<section class={this.rootClass} part={this.partForName(\"example\")}>\n <Show when={this.heading}>\n <div class={HEADING_CLASS}>\n <ui-header\n part={this.partForName(\"header\")}\n level={UIT.HeadingLevels.attributeFor(UIT.HeadingLevels.levelFor(this.level, LEVELS))}\n size={this.variation ? \"small\" : void 0}\n >\n {this.heading}\n </ui-header>\n </div>\n </Show>\n <Show when={this.description || this.slots.hasContent(this.slotForName(\"description\"))}>\n <div class={UIT.DESCRIPTION} part={this.partForName(\"description\")}>\n {\n /* the attribute's sentence, then any richer description markup slotted beside it (a message) */\n }\n {this.descriptionWithCode}\n <slot name={this.slotForName(\"description\")} />\n </div>\n </Show>\n <div class={FRAME_CLASS}>\n {\n /* before the code button: the Tab order follows the row, left to right */\n }\n <div class={TOOLS_CLASS} part={this.partForName(\"tools\")}>\n <slot name={this.slotForName(\"tools\")} />\n </div>\n <ui-button\n part={this.partForName(\"toggle\")}\n icon={CODE_ICON}\n size={this.variation ? \"mini\" : \"tiny\"}\n aria-label={this.toggleLabel}\n title={this.toggleLabel}\n aria-expanded={this.disclosure.ariaExpanded}\n aria-controls={CODE_PANE_ID}\n ref={(button) => button.addEventListener(\"click\", (event) => this.toggle(event))}\n appearance=\"circular basic\"\n />\n <ui-segment\n part={this.partForName(\"demo\")}\n appearance={this.demoIsFramed ? void 0 : \"basic\"}\n attach={this.demoIsFramed ? UIT.TOP : void 0}\n >\n <slot />\n </ui-segment>\n <Show when={this.isCodeShown}>\n <ui-segment\n id={CODE_PANE_ID}\n part={this.partForName(\"code\")}\n attach={this.bare ? void 0 : UIT.BOTTOM}\n appearance=\"secondary\"\n >\n <slot name={this.slotForName(\"source\")}>\n <ui-code\n part={this.partForName(\"source\")}\n language={this.language || DEFAULT_LANGUAGE}\n copy=\"\"\n content={this.sourceMarkup}\n />\n </slot>\n </ui-segment>\n </Show>\n </div>\n </section>","<Show when={this.description || this.slots.hasContent(this.slotForName(\"description\"))}>\n <div class={UIT.DESCRIPTION} part={this.partForName(\"description\")}>\n {\n /* the attribute's sentence, then any richer description markup slotted beside it (a message) */\n }\n {this.descriptionWithCode}\n <slot name={this.slotForName(\"description\")} />\n </div>\n </Show>","<div class={UIT.DESCRIPTION} part={this.partForName(\"description\")}>\n {\n /* the attribute's sentence, then any richer description markup slotted beside it (a message) */\n }\n {this.descriptionWithCode}\n <slot name={this.slotForName(\"description\")} />\n </div>","part={this.partForName(\"description\")}","name={this.slotForName(\"description\")}","ref={(button) => button.addEventListener(\"click\", (event) => this.toggle(event))}","<Show when={this.isCodeShown}>\n <ui-segment\n id={CODE_PANE_ID}\n part={this.partForName(\"code\")}\n attach={this.bare ? void 0 : UIT.BOTTOM}\n appearance=\"secondary\"\n >\n <slot name={this.slotForName(\"source\")}>\n <ui-code\n part={this.partForName(\"source\")}\n language={this.language || DEFAULT_LANGUAGE}\n copy=\"\"\n content={this.sourceMarkup}\n />\n </slot>\n </ui-segment>\n </Show>","attach={this.bare ? void 0 : UIT.BOTTOM}","name={this.slotForName(\"source\")}","part={this.partForName(\"source\")}","language={this.language || DEFAULT_LANGUAGE}","content={this.sourceMarkup}","<ui-segment\n id={CODE_PANE_ID}\n part={this.partForName(\"code\")}\n attach={this.bare ? void 0 : UIT.BOTTOM}\n appearance=\"secondary\"\n >\n <slot name={this.slotForName(\"source\")}>\n <ui-code\n part={this.partForName(\"source\")}\n language={this.language || DEFAULT_LANGUAGE}\n copy=\"\"\n content={this.sourceMarkup}\n />\n </slot>\n </ui-segment>","part={this.partForName(\"example\")}","class={FRAME_CLASS}","class={TOOLS_CLASS}","part={this.partForName(\"tools\")}","name={this.slotForName(\"tools\")}","part={this.partForName(\"toggle\")}","size={this.variation ? \"mini\" : \"tiny\"}","aria-label={this.toggleLabel}","title={this.toggleLabel}","aria-expanded={this.disclosure.ariaExpanded}","part={this.partForName(\"demo\")}","appearance={this.demoIsFramed ? void 0 : \"basic\"}","attach={this.demoIsFramed ? UIT.TOP : void 0}","E.UIComponent","E.proto","E.protoMerged","E.cssState","E.controlled","E.state","E.onChange","E.SlotContent","E.Disclosure","E.after","UIT.CODE_SPAN","_$getOwner","_$createComponent","_$readShallow","_$setAttribute","UIT.DESCRIPTION","UIT.BOTTOM","__name","exampleCSS","__publicField","__decorateElement","__decoratorMetadata","__decoratorStart","__name$1","__runInitializers","CODE_SPAN","HeadingLevels","DESCRIPTION","BOTTOM","__privateAdd","getOwner$1","HtmlFormatter","width","indent","root","html","stack","last","match","TOKEN","parent","token","comment","closing","tagName","depth","open","tag","element","RAW","end","stop","close","VOID","lines","pad","run","node","nodes","text","VERBATIM","raw","child","oneLine","inner","common","line","INLINE","quoted","name","ENUMERATED_TRUE","whole","space","ExampleSource","count","example","EXAMPLE_TAG","DOMElement","template","snapshot","inert","OWN_SLOTS","origin","RUNTIME_ATTRIBUTES","SNAPSHOTS_KEY","copy","attribute","ORIGINAL_PREFIX","exampleVocabulary","UIExample_default","_tmpl$","_tmpl$2","_tmpl$3","_tmpl$4","_tmpl$5","_tmpl$6","_onCodeOpenChanged_dec","_isOpenAtStart_dec","_isCodeShown_dec","_isCodeOpen_dec","_elementSetup_dec","_vocabulary_dec","_a","_init","_isCodeOpen","_isCodeShown","_isOpenAtStart","_UIExample","UIComponent","proto","protoMerged","cssState","controlled","state","onChange","args","isServer","SlotContent","Disclosure","isOpen","after","CLOSE_SECONDS","event","index","_el$","insert","piece","parts","LINK","drawn","at","_el$2","_o$","effect","setAttribute","_v$","claimElement","afterSolidUpdate","_self$","_el$3","_el$6","_el$9","_el$10","_el$11","_el$12","_el$13","_el$14","createComponent","Show","_el$4","_el$5","readShallow","HEADING_CLASS","LEVELS","className","_p$","t","a","o","_el$7","_el$8","CODE_ICON","CODE_PANE_ID","ref","button","_el$15","_el$16","_el$17","DEFAULT_LANGUAGE","i","n","FRAME_CLASS","TOOLS_CLASS","s","h","r","d","l","u","c","w","UIExample"],"sources":["../src/components/ui-example/HtmlFormatter.ts","../src/components/ui-example/ExampleSource.ts","../src/components/ui-example/UIExample.en.ts","../src/components/ui-example/UIExample.css?inline","../src/components/ui-example/UIExample.tsx","../src/components/ui-example/index.ts"],"sourcesContent":["/****************\n * ### `HtmlFormatter`\n * Pretty-prints an HTML fragment for `<ui-example>`'s code pane (`ExampleSource`).\n * - Why re-indent, not show the markup as found: it comes from `innerHTML`, indented however the page around it\n * was (and a `<ui-include>`d part, or a live tree, has no indentation of its own), so it's rebuilt to one style.\n * - From the old Astro site's `HtmlFormatter` (deleted with it, epic `spell-ui-pages` P7), plus:\n * - whitespace inside an opening tag collapses to one space (an author's attributes over several lines)\n * - `<ui-code>` and `<ui-markdown>` keep their content verbatim, like `<pre>`: it's code / markdown text\n * - Deliberately small, not a full HTML parser: examples are hand-written, well-formed fragments.\n * - Rules, prettier-ish:\n * - text-level elements (`<a>`, `<code>`, `<strong>` ...) and text stay together on one line as a \"run\"\n * - every other element, `ui-*` included, starts its own line\n * - an element with no block-level children that fits in `width` stays on one line\n * - `<pre>`, `<textarea>`, `<script>`, `<style>`, `<ui-code>`, `<ui-markdown>` keep their content verbatim\n * - Pure: text in, text out.\n ****************/\nexport class HtmlFormatter {\n /** Max line length before an element is expanded onto several lines. */\n readonly width: number\n\n /** One level of indentation. */\n readonly indent: string\n\n constructor({ width = 100, indent = \" \" }: HtmlFormatterProps = {}) {\n this.width = width\n this.indent = indent\n }\n\n /** Format `html`: parse it into a tree, then print it. */\n format(html: string): string {\n const root = this.parse(html)\n return this.printChildren(root.children, 0).join(\"\\n\").trim()\n }\n\n ////////////////\n // ## Parsing\n ////////////////\n\n /** Parse `html` into a tree of `HtmlNode`s under a synthetic root; unbalanced closers are ignored. */\n private parse(html: string): HtmlElementNode {\n const root: HtmlElementNode = { kind: \"element\", tag: \"#root\", open: \"\", children: [] }\n const stack: HtmlElementNode[] = [root]\n let last = 0\n TOKEN.lastIndex = 0\n for (let match = TOKEN.exec(html); match; match = TOKEN.exec(html)) {\n const parent = stack.at(-1)!\n if (match.index > last) parent.children.push({ kind: \"text\", text: html.slice(last, match.index) })\n last = TOKEN.lastIndex\n const [token, comment, closing, tagName] = match\n if (comment !== undefined) {\n parent.children.push({ kind: \"comment\", text: token })\n } else if (closing) {\n const depth = stack.findLastIndex((open) => open.tag === tagName!.toLowerCase())\n if (depth > 0) stack.length = depth\n } else {\n const tag = tagName!.toLowerCase()\n const element: HtmlElementNode = { kind: \"element\", tag, open: HtmlFormatter.cleanOpenTag(token), children: [] }\n parent.children.push(element)\n if (RAW.has(tag)) {\n // raw text elements: everything up to the matching closer is content, verbatim\n const end = html.toLowerCase().indexOf(`</${tag}`, last)\n const stop = end === -1 ? html.length : end\n element.raw = html.slice(last, stop)\n const close = html.indexOf(\">\", stop)\n last = close === -1 ? html.length : close + 1\n TOKEN.lastIndex = last\n } else if (!VOID.has(tag) && !token.endsWith(\"/>\")) {\n stack.push(element)\n }\n }\n }\n if (last < html.length) stack.at(-1)!.children.push({ kind: \"text\", text: html.slice(last) })\n return root\n }\n\n ////////////////\n // ## Printing\n ////////////////\n\n /** Print `nodes` at `depth`: inline runs joined onto one line, block elements one per line. */\n private printChildren(nodes: HtmlNode[], depth: number): string[] {\n const lines: string[] = []\n const pad = this.indent.repeat(depth)\n let run = \"\"\n for (const node of nodes) {\n if (this.isInline(node)) {\n run += this.inline(node)\n continue\n }\n flushRun()\n if (node.kind === \"comment\") lines.push(pad + node.text.trim())\n else if (node.kind === \"element\") lines.push(...this.printElement(node, depth))\n }\n flushRun()\n return lines\n\n /** Push the pending inline run as one line, whitespace collapsed. */\n function flushRun() {\n const text = run.replace(/\\s+/g, \" \").trim()\n if (text) lines.push(pad + text)\n run = \"\"\n }\n }\n\n /** Print one block-level element: on one line if it fits and has no block children, else expanded. */\n private printElement(element: HtmlElementNode, depth: number): string[] {\n const pad = this.indent.repeat(depth)\n const close = VOID.has(element.tag) ? \"\" : `</${element.tag}>`\n if (element.raw !== undefined) {\n // `<pre>` / `<textarea>` / code text: whitespace is content, never re-indent it\n if (VERBATIM.has(element.tag)) return [pad + element.open + element.raw + close]\n const raw = element.raw.replace(/^\\n+|\\s+$/g, \"\")\n if (!raw.includes(\"\\n\")) return [`${pad}${element.open}${raw}${close}`]\n return [pad + element.open, ...this.reindent(raw, pad + this.indent), pad + close]\n }\n if (!element.children.some((child) => !this.isInline(child))) {\n const oneLine = pad + element.open + this.inlineChildren(element) + close\n if (oneLine.length <= this.width) return [oneLine]\n }\n const inner = this.printChildren(element.children, depth + 1)\n if (!inner.length) return [pad + element.open + close]\n return [pad + element.open, ...inner, pad + close]\n }\n\n /**\n * `raw`'s lines (a `<script>` / `<style>` body) moved to `pad`: their common leading whitespace dropped, so a\n * script indented with the page around it reads like the markup around it. Blank lines stay blank.\n */\n private reindent(raw: string, pad: string): string[] {\n const lines = raw.split(\"\\n\")\n const common = Math.min(...lines.filter((line) => line.trim()).map((line) => line.match(/^\\s*/)![0].length))\n return lines.map((line) => (line.trim() ? pad + line.slice(common) : \"\"))\n }\n\n /** Is `node` part of an inline run (text, or a text-level element with only inline content)? */\n private isInline(node: HtmlNode): boolean {\n if (node.kind === \"text\") return true\n if (node.kind === \"comment\") return false\n return INLINE.has(node.tag) && node.children.every((child) => this.isInline(child))\n }\n\n /** `node` on one line. */\n private inline(node: HtmlNode): string {\n if (node.kind !== \"element\") return node.text\n const close = VOID.has(node.tag) ? \"\" : `</${node.tag}>`\n return node.open + (node.raw ?? this.inlineChildren(node)) + close\n }\n\n /** `element`'s children on one line, whitespace collapsed and trimmed. */\n private inlineChildren(element: HtmlElementNode): string {\n return element.children\n .map((child) => this.inline(child))\n .join(\"\")\n .replace(/\\s+/g, \" \")\n .trim()\n }\n\n ////////////////\n // ## Statics\n ////////////////\n\n /**\n * Format `html` with default options.\n * - Static: the one call `ExampleSource` needs; a formatter with other options is `new HtmlFormatter(props)`.\n */\n static format(html: string): string {\n return new HtmlFormatter().format(html)\n }\n\n /**\n * Undo artefacts in an opening tag, so the shown code reads as authored:\n * - whitespace (newlines between attributes) collapses to one space, outside quoted values\n * - `basic=\"\"` => `basic`: `innerHTML` serializes every boolean attribute with an empty value\n * - `basic=\"true\"` => `basic`: JSX renders a bare attribute as `=\"true\"`; the library reads both alike.\n * NEVER for `aria-*` or enumerated attributes (`draggable` ...), where `\"true\"` is the value.\n * - Static: pure, whatever the options.\n */\n private static cleanOpenTag(tag: string): string {\n return tag\n .replace(/(\"[^\"]*\"|'[^']*')|\\s+/g, (whole, quoted: string | undefined) => quoted ?? \" \")\n .replace(/ (\\/?>)$/, \"$1\")\n .replace(/(\\s)([\\w:-]+)=\"\"/g, \"$1$2\")\n .replace(/(\\s)([\\w:-]+)=\"true\"/g, (whole, space: string, name: string) =>\n name.startsWith(\"aria-\") || ENUMERATED_TRUE.has(name) ? whole : space + name\n )\n }\n}\n\n/** Props of `new HtmlFormatter()`. */\nexport type HtmlFormatterProps = {\n /** max line length before expanding an element, default `100` */\n width?: number\n /** one indentation level, default two spaces */\n indent?: string\n}\n\n/** A parsed node. */\ntype HtmlNode = HtmlElementNode | { kind: \"text\"; text: string } | { kind: \"comment\"; text: string }\n\n/** A parsed element. */\ntype HtmlElementNode = {\n kind: \"element\"\n /** lower-case tag name, `#root` for the synthetic root */\n tag: string\n /** the opening tag as written, whitespace collapsed, minus rendering artefacts (`cleanOpenTag()`) */\n open: string\n /** child nodes, empty for void and raw-text elements */\n children: HtmlNode[]\n /** verbatim content of a raw-text element (`<pre>`, `<script>` ...) */\n raw?: string\n}\n\n/** Attributes whose `\"true\"` is an enumerated VALUE, not a boolean presence. */\nconst ENUMERATED_TRUE = new Set([\"contenteditable\", \"draggable\", \"spellcheck\", \"translate\", \"autocapitalize\"])\n\n/**\n * One token: a comment (group 1), or a tag with an optional `/` (group 2) and its name (group 3).\n * - Attribute values may contain `>`, so quoted values are matched explicitly.\n * - Global: `parse()` walks it with `exec()`, resetting `lastIndex` first.\n */\nconst TOKEN =\n /(<!--[\\s\\S]*?-->)|<(\\/?)([a-zA-Z][\\w:-]*)(?:\\s+[^\\s\"'>/=]+(?:\\s*=\\s*(?:\"[^\"]*\"|'[^']*'|[^\\s\"'=<>`]+))?)*\\s*\\/?>/g\n\n/** Elements with no content or closing tag. */\nconst VOID = new Set([\n \"area\",\n \"base\",\n \"br\",\n \"col\",\n \"embed\",\n \"hr\",\n \"img\",\n \"input\",\n \"link\",\n \"meta\",\n \"source\",\n \"track\",\n \"wbr\"\n])\n\n/** Elements whose content is not parsed: kept as text. */\nconst RAW = new Set([\"pre\", \"textarea\", \"script\", \"style\", \"ui-code\", \"ui-markdown\"])\n\n/** Raw elements whose content is printed exactly as found, never re-indented. */\nconst VERBATIM = new Set([\"pre\", \"textarea\", \"ui-code\", \"ui-markdown\"])\n\n/** Text-level elements that stay on the same line as surrounding text. */\nconst INLINE = new Set([\n \"a\",\n \"abbr\",\n \"b\",\n \"bdi\",\n \"bdo\",\n \"br\",\n \"cite\",\n \"code\",\n \"data\",\n \"dfn\",\n \"em\",\n \"i\",\n \"kbd\",\n \"mark\",\n \"q\",\n \"s\",\n \"samp\",\n \"small\",\n \"span\",\n \"strong\",\n \"sub\",\n \"sup\",\n \"time\",\n \"u\",\n \"var\",\n \"wbr\"\n])\n","import { E } from \"spell/ui/core\"\nimport { HtmlFormatter } from \"./HtmlFormatter\"\n\n/****************\n * ### `ExampleSource`\n * The markup `<ui-example>` shows as its code: its OWN light-DOM children, as authored.\n * - The problem: the element is defined LAZILY (`<ui-root>` imports its family on first use), so by the time its\n * component runs, the `<ui-button>`s inside may be upgraded already. An upgrade adds a shadow root (not in\n * `innerHTML`), and the runtime may touch the light DOM: a roving `tabindex` on items, transition markers,\n * a `<ui-include>`'s fetched content. So the source is read, first match wins:\n * 1. a `<template>` child: its markup, EXACTLY (never parsed into live elements; the element stamps a copy out\n * live). Use it when an example's markup changes as it runs.\n * 2. a SNAPSHOT: the example's `innerHTML` taken by `snapshot()` before any family loaded -- the site bundle's entry\n * (`site/_src/site.ts`) calls it first thing, so every example parsed with the page is read pristine.\n * 3. the example's `innerHTML` NOW, minus `RUNTIME_ATTRIBUTES`: examples added after the entry ran (a\n * `<ui-include>`d part, a test, an app) -- unless `keep()` saw them first (the site's router keeps every\n * page it swaps in).\n * - Then: children of the example's own named slots (`description`) are dropped, and `HtmlFormatter` re-indents.\n * - Limits:\n * - (3) can't tell an author's `tabindex` from a roving one, and keeps anything else a family wrote into its light\n * DOM; use a `<template>` there\n * - `innerHTML` normalizes: attribute quotes become `\"`, entities are re-escaped (`>` stays,\n * `>` in text becomes `>`), boolean attributes lose their `=\"\"` (`HtmlFormatter`); comments survive\n * - Plain DOM, no Solid: the site entry imports it without the element.\n * - Static: the snapshots are page-wide (on `globalThis`, `SNAPSHOTS_KEY`), taken before any element exists.\n ****************/\nexport class ExampleSource {\n /**\n * Keep the markup of every `<ui-example>` under `root` whose family hasn't loaded yet; returns how many.\n * - Call BEFORE any family loads: the site entry does, at the top. Later calls only add new examples.\n * - SIDE EFFECT: fills the page-wide snapshot map.\n */\n static snapshot(root: ParentNode = document): number {\n let count = 0\n for (const example of root.querySelectorAll(`${EXAMPLE_TAG}${E.DOMElement.notAttached}`)) {\n if (ExampleSource.snapshots.has(example)) continue\n ExampleSource.snapshots.set(example, example.innerHTML)\n count++\n }\n return count\n }\n\n /**\n * Keep the markup of every `<ui-example>` in `root` -- a fragment about to go into the page (a\n * `<ui-include>`'s `ui-drawing`) -- defined or not; returns how many.\n * - Its elements may be upgraded already (imported into a document whose families are defined),\n * but not yet connected, so their light DOM is still as authored.\n * - URLs the include rewrote go back to what the page wrote (`data-ui-include-*`): the code shows the source.\n * - SIDE EFFECT: fills the page-wide snapshot map.\n */\n static keep(root: ParentNode): number {\n let count = 0\n for (const example of root.querySelectorAll(EXAMPLE_TAG)) {\n if (ExampleSource.snapshots.has(example)) continue\n ExampleSource.snapshots.set(example, ExampleSource.authored(example))\n count++\n }\n return count\n }\n\n /** The code to show for `example`: its example markup (see the class), cleaned and re-indented. */\n static of(example: Element): string {\n const template = ExampleSource.template(example)\n if (template) return ExampleSource.format(template.innerHTML, \"authored\")\n const snapshot = ExampleSource.snapshots.get(example)\n return ExampleSource.format(snapshot ?? example.innerHTML, snapshot === undefined ? \"live\" : \"authored\")\n }\n\n /** `example`'s top-level `<template>` child, if it has one: the example's markup, kept inert. */\n static template(example: Element): HTMLTemplateElement | undefined {\n for (const child of example.children) if (child.localName === \"template\") return child as HTMLTemplateElement\n return undefined\n }\n\n /**\n * `html` as shown code: the example's own slotted chrome dropped, `live` markup stripped of runtime attributes,\n * re-indented.\n * - Parsed into an inert `<template>`: nothing in it upgrades or loads.\n */\n static format(html: string, origin: MarkupOrigin): string {\n const inert = document.createElement(\"template\")\n inert.innerHTML = html\n for (const child of [...inert.content.children]) if (OWN_SLOTS.includes(child.slot)) child.remove()\n if (origin === \"live\") {\n for (const element of inert.content.querySelectorAll(\"*\")) {\n for (const name of RUNTIME_ATTRIBUTES) element.removeAttribute(name)\n }\n }\n return HtmlFormatter.format(inert.innerHTML)\n }\n\n ////////////////\n // ## Internal\n ////////////////\n\n /** Example => its markup before upgrades, on `globalThis` (see `SNAPSHOTS_KEY`). */\n private static get snapshots(): WeakMap<Element, string> {\n return ((globalThis as SnapshotGlobal)[SNAPSHOTS_KEY] ??= new WeakMap())\n }\n\n /** `example`'s inner markup with every URL an include rewrote put back as written. */\n private static authored(example: Element): string {\n const copy = document.createElement(\"template\")\n copy.innerHTML = example.innerHTML\n for (const element of copy.content.querySelectorAll(\"*\")) {\n for (const attribute of [...element.attributes]) {\n if (!attribute.name.startsWith(E.ORIGINAL_PREFIX)) continue\n element.setAttribute(attribute.name.slice(E.ORIGINAL_PREFIX.length), attribute.value)\n element.removeAttribute(attribute.name)\n }\n }\n return copy.innerHTML\n }\n}\n\n/**\n * Where markup `ExampleSource.format()` gets came from:\n * - `authored`: as written (a `<template>`, a snapshot): shown as is\n * - `live`: read from an upgraded tree: `RUNTIME_ATTRIBUTES` are stripped\n */\nexport type MarkupOrigin = \"authored\" | \"live\"\n\n/** The tag whose markup `ExampleSource.snapshot()` keeps: `exampleVocabulary.tag`, as a value. */\nconst EXAMPLE_TAG = \"ui-example\"\n\n/**\n * `globalThis` key of the page's markup snapshots (`ExampleSource.snapshot()`): example => its `innerHTML` before any\n * family upgraded it.\n * - A registered symbol, so the site entry's copy of `ExampleSource` and the lazily loaded family's agree even if a\n * bundler gave each its own copy of the module.\n */\nconst SNAPSHOTS_KEY = Symbol.for(\"spell-ui:example-sources\")\n\n/** `globalThis` with the snapshots. */\ntype SnapshotGlobal = typeof globalThis & { [SNAPSHOTS_KEY]?: WeakMap<Element, string> }\n\n/**\n * Named slots of the example ITSELF: their children are its chrome, not part of the example's markup.\n * - The default slot (`\"\"`) is the example.\n */\nconst OWN_SLOTS: readonly string[] = [\"description\"]\n\n/**\n * Attributes the RUNTIME puts on light-DOM elements, never written by an author: stripped from the shown markup\n * when it's read from a live (already upgraded) tree.\n * - `RovingTabindex`'s `tabindex` is NOT here: authors write `tabindex` too. A snapshot or a `<template>` avoids\n * the problem (see `ExampleSource`).\n */\nconst RUNTIME_ATTRIBUTES: readonly string[] = [\"data-ui-animation\", \"data-ui-hidden-by-animation\"]\n","/**\n * The English vocabulary of `<ui-example>`: every name the tag uses.\n * - Its tag, attributes, events, slots, parts, states and texts.\n * The shape is `E.ComponentVocabulary` (`spell/ui/vocabulary`).\n * - The docs site's `<ui-docs-example>` until epic `ui-gaps` P14 made it a component (from epic `epic-engine` P14):\n * the old tag is renamed by `spell ui rename` (`OldNames`), and its old `header` is `heading`.\n * - Class words: `bare`, `variation` (`ui bare example`); the open state is `:state(open)`, not a class.\n */\n\nimport type { E } from \"spell/ui/core\"\n\n/****************\n * ### `exampleVocabulary`\n * The names of `<ui-example>`, Fomantic's docs example block: a heading and description,\n * its own children LIVE, and their source in a code pane the code button shows and hides.\n ****************/\nexport const exampleVocabulary = {\n tag: \"ui-example\",\n topics: [\"documentation\", \"data display\"],\n aka: [\"example\", \"demo\", \"live example\", \"code sample\", \"playground\", \"show code\"],\n skeleton: \"header, 2 line paragraph\",\n noun: \"example\",\n description:\n \"An example shows its own markup live, under a heading and description, with the same markup as code a button \" +\n \"shows and hides.\",\n attributes: [\n {\n name: \"heading\",\n replaces: [\"header\"],\n kind: \"string\",\n description: \"Its title, e.g. `Emphasis`: Fomantic's `h4` above the example. Its old name was `header`.\"\n },\n {\n name: \"description\",\n kind: \"string\",\n description:\n \"One sentence under the heading; `` `x` `` becomes code, `[words](link)` a link. Slot `description` \" +\n \"for richer text (a message, several paragraphs): drawn after it.\"\n },\n {\n name: \"level\",\n kind: \"number\",\n default: 4,\n description: \"Heading level of the title, `1` ... `6`: Fomantic's examples are `h4`, under the section's `h2`.\"\n },\n {\n name: \"code\",\n kind: \"boolean\",\n description:\n \"The code pane is open; the code button toggles it, so it's the LIVE state too (reflected, `ui-opened` / `ui-closed`). \" +\n \"Set it in markup to open the code at start.\"\n },\n {\n name: \"language\",\n kind: \"string\",\n default: \"html\",\n description:\n \"Language of the code pane (`<ui-code language>`). The source is the markup, so `html` unless a \" +\n \"`code` child says otherwise.\"\n },\n {\n name: \"bare\",\n kind: \"keyOnly\",\n description: \"No segment frame around the live example and code, even while the code is open.\"\n },\n {\n name: \"variation\",\n kind: \"keyOnly\",\n description:\n \"Fomantic's smaller variation style: a smaller title and less space around it, for a run of \" +\n \"small examples under one heading.\"\n }\n ],\n events: [\n {\n name: \"ui-opened\",\n detail: \"{ open: true, originalEvent?: Event }\",\n description: \"The code button opened the code pane.\"\n },\n {\n name: \"ui-closed\",\n detail: \"{ open: false, originalEvent?: Event }\",\n description: \"The code button closed the code pane.\"\n }\n ],\n slots: [\n {\n name: \"\",\n description:\n \"The example itself, shown live; its markup is the code shown. A `<template>` child instead: stamped out \" +\n \"live, and its markup shown EXACTLY as written.\"\n },\n { name: \"description\", description: \"Rich description, in place of the `description` attribute.\" },\n {\n name: \"source\",\n description:\n \"What the code pane shows in place of the markup, e.g. an editor of the example's code. Shown only while \" +\n \"the code is open, as the markup is.\"\n },\n {\n name: \"tools\",\n description:\n \"Buttons of the page's own, in a row just left of the code button and in its look, e.g. a notebook's Add, \" +\n \"Move and Delete. The page decides when they show.\"\n }\n ],\n parts: [\n { name: \"example\", description: \"The whole block (`<section>`).\" },\n { name: \"header\", description: \"The `<ui-header>` title.\" },\n { name: \"toggle\", description: 'The code button (`<ui-button circular basic icon=\"code\">`).' },\n { name: \"tools\", description: \"The row round the `tools` slot, just left of the code button.\" },\n { name: \"description\", description: \"The description under the title.\" },\n { name: \"demo\", description: \"The `<ui-segment>` around the live example.\" },\n { name: \"code\", description: \"The `<ui-segment>` around the code pane.\" },\n { name: \"source\", description: \"The `<ui-code>` showing the markup.\" }\n ],\n states: [\n { name: \"open\", description: \"The code pane is open.\" },\n { name: \"code-shown\", description: \"The code pane is drawn: open, or still rolling closed.\" },\n {\n name: \"open-at-start\",\n description: \"The code was open from the start: it showed at once, without rolling open.\"\n }\n ],\n texts: [\n { key: \"showCode\", text: \"Show code\", description: \"The code button's label while the code is hidden.\" },\n { key: \"hideCode\", text: \"Hide code\", description: \"The code button's label while the code shows.\" }\n ]\n} as const satisfies E.ComponentVocabulary\n","/*\n * The style sheet of `<ui-example>`: Fomantic's docs `.example` block\n * (`server/files/stylesheets/docs.css` of Fomantic-UI-Docs, \"Examples\" and \"Code Button\"),\n * built of `<ui-*>` widgets: this sheet only LAYS THEM OUT.\n * - It styles the component's shadow DOM:\n * `<section class=\"ui [bare] [variation] example\" part=\"example\">`, holding:\n * - `<div class=\"heading\">`: the `<ui-header part=\"header\">` (only when there is a header)\n * - `<div class=\"description\" part=\"description\">` around the `description` slot (only when there is one)\n * - `<div class=\"frame\">`:\n * - the `<ui-button part=\"toggle\">`, inside its top right corner, just in from its rim (a bare example's: further in)\n * - just left of it, `<div class=\"tools\" part=\"tools\">` round the `tools` slot: the page's own buttons\n * - the `<ui-segment part=\"demo\">`, around the default slot\n * - while open, the `<ui-segment part=\"code\">` holding the `<ui-code part=\"source\">`\n * - the header and description sit on the page, outside the frame:\n * the frame holds only the example and its code\n * - The frame and the code are the widgets' own look:\n * - closed, the demo segment is `basic` and unpadded (Fomantic shows the live markup bare)\n * - open, it's `attached=\"top\"` and the code pane `attached=\"bottom\"`\n * (Fomantic's `.html.segment` + `.instructive.bottom.attached.segment`)\n * - `bare`: never framed\n * - Public tokens (`--ui-example-*`) are never declared: each is read through a private alias\n * (`notes/theming.md` \"Component tokens\").\n * - EXCEPT the three the `tools` row hands down to the buttons slotted in it (`--ui-example-tool-*`):\n * they're for the page to read, never to set.\n */\n\n@layer ui.components.example.types, ui.components.example.content, ui.components.example.variations, ui.components.example.states;\n\n/* Breakpoints (`@custom-media`), inlined at build time: phones. */\n@import \"../../styles/media.css\";\n\n@layer ui.components.example.types {\n :host {\n display: block;\n }\n\n /* Tokens: Fomantic's docs measures. */\n .ui.example {\n /* Space above and below the block. */\n --_ui-example-margin: var(--ui-example-margin, 1.25em 0);\n /* Widest the description runs: Fomantic's 700px. */\n --_ui-example-description-width: var(--ui-example-description-width, 50em);\n /* Colour of the description text. */\n --_ui-example-description-color: var(--ui-example-description-color, var(--ui-text-color));\n /* Opacity of the code button at rest: whole, so it stands out on the frame (Fomantic dimmed it to 0.5) */\n --_ui-example-toggle-opacity: var(--ui-example-toggle-opacity, 1);\n /* The code button's fill: whiter than the frame, so it stands out on it */\n --_ui-example-toggle-background: var(\n --ui-example-toggle-background,\n light-dark(oklch(1 0 0 / 0.95), color-mix(in oklab, var(--ui-surface-strong) 90%, transparent))\n );\n /*\n * Space from the frame's top and right edges to the code button, the same both ways:\n * about what centres it beside one line of text.\n */\n --_ui-example-toggle-inset: var(--ui-example-toggle-inset, 0.8em);\n /* A framed example's code button: in from its frame's top and right edges, just inside its rim. */\n --_ui-example-toggle-corner: var(--ui-example-toggle-corner, 6px);\n /* The code button's width and height: one at every size */\n --_ui-example-toggle-size: var(--ui-example-toggle-size, 28px);\n /* Space between the buttons of the `tools` row, and from it to the code button */\n --_ui-example-tools-gap: var(--ui-example-tools-gap, 4px);\n /* Space between the header, description and example. */\n --_ui-example-gap: var(--ui-example-gap, 0.5em);\n /* The frame round an example: a faint see-through card, so it never runs into the prose round it. */\n --_ui-example-frame-background: var(\n --ui-example-frame-background,\n color-mix(in oklab, var(--ui-surface) 45%, transparent)\n );\n --_ui-example-frame-border: var(\n --ui-example-frame-border,\n var(--ui-border-width, 1px) solid var(--ui-border-color)\n );\n --_ui-example-frame-radius: var(--ui-example-frame-radius, var(--ui-radius-l, 0.75em));\n --_ui-example-frame-padding: var(--ui-example-frame-padding, 0.75em 1em);\n --_ui-example-frame-shadow: var(--ui-example-frame-shadow, var(--ui-shadow-subtle, none));\n /* What the frame does to what's behind it: a theme's glass (`backdrop-filter`) */\n --_ui-example-frame-filter: var(--ui-example-frame-filter, none);\n /* The live demo while the code shows: a very light tint, so its edge reads (pure white read as a missing border) */\n --_ui-example-demo-background: var(\n --ui-example-demo-background,\n color-mix(in oklab, var(--ui-surface) 60%, transparent)\n );\n }\n\n .ui.example {\n display: block;\n position: relative;\n margin: var(--_ui-example-margin);\n }\n :host(:first-child) > .ui.example {\n margin-top: 0;\n }\n :host(:last-child) > .ui.example {\n margin-bottom: 0;\n }\n}\n\n@layer ui.components.example.content {\n /* Header row: the title, on the page above the frame. */\n .heading {\n display: flex;\n align-items: center;\n gap: var(--_ui-example-gap);\n margin-bottom: var(--_ui-example-gap);\n }\n .heading > [part~=\"header\"] {\n flex: 1 1 auto;\n --ui-header-margin-top: 0;\n --ui-header-margin-bottom: 0;\n }\n\n /*\n * The frame's box, and the code button over its top right corner:\n * - the same inset from the top and the right edge in every case\n * - a whiter fill than the frame, so it stands out on it\n * - over the example, so there's no empty space above the example inside the frame\n * (Owen, 2026-10-23: \"overlay show code over the example, so no whitespace above the example inside the frame\")\n */\n /*\n * - a box an example shows inside the frame (an inverted segment, a card, a message) rounds less than the frame:\n * its corner the frame's, less the frame's padding, at least the theme's small radius\n * (Owen: \"rounding of outer rings needs to be greater than rounding of inner bits\");\n * it had the frame's own corner, as round as the ring round it\n */\n .frame {\n /* the code button's corner: following the frame's corner it sits in, less its inset */\n --_example-toggle-radius: max(4px, calc(var(--_ui-example-frame-radius) - var(--_ui-example-toggle-corner)));\n --_example-inner-radius: max(var(--ui-radius-s), calc(var(--_ui-example-frame-radius) - 16px));\n --ui-segment-radius: var(--_example-inner-radius);\n --ui-card-radius: var(--_example-inner-radius);\n --ui-message-radius: var(--_example-inner-radius);\n position: relative;\n }\n .frame > [part~=\"toggle\"] {\n position: absolute;\n /* in a frame too short for that inset, centred top to bottom instead (the button is about 1.35em tall) */\n inset-block-start: min(calc(50% - 0.675em), var(--_ui-example-toggle-inset));\n inset-inline-end: var(--_ui-example-toggle-inset);\n /* over the demo, which is over the code */\n z-index: 2;\n margin: 0;\n opacity: var(--_ui-example-toggle-opacity);\n transition: opacity 0.3s ease-out;\n }\n .frame > [part~=\"toggle\"]::part(button) {\n /* one width at every size, so the code's copy button can sit centred under it */\n box-sizing: border-box;\n width: var(--_ui-example-toggle-size);\n /* round at every size: a theme with short tiny buttons drew it as a pill (the notebook page's, 20px tall) */\n min-height: var(--_ui-example-toggle-size);\n min-width: 0;\n padding-inline: 0;\n justify-content: center;\n margin: 0;\n /* a rounded square following the frame's corner it sits in, less its inset: never rounder than the frame */\n border-radius: var(--_example-toggle-radius);\n background: var(--_ui-example-toggle-background);\n box-shadow:\n 0 0 0 1px var(--ui-border-color),\n var(--ui-shadow-subtle, 0 0 #0000);\n }\n /*\n * a framed example's button sits INSIDE the frame's top right corner, just inside its rim, over the example: the example\n * takes no room for it (Owen, 2026-10-25: \"Move this back into the INSIDE upper-right corner of the box, position\n * absolute. just inside the white border around the panel\"; centred on the corner, before)\n */\n .ui.example:not(.bare) > .frame > [part~=\"toggle\"] {\n inset-block-start: var(--_ui-example-toggle-corner);\n inset-inline-end: var(--_ui-example-toggle-corner);\n }\n .frame > [part~=\"toggle\"]:hover,\n .frame > [part~=\"toggle\"]:focus-within,\n :host(:state(open)) .frame > [part~=\"toggle\"] {\n opacity: 1;\n }\n\n /*\n * The page's own buttons (the `tools` slot): a row just left of the code button, level with it, as far from it as\n * from each other.\n * - Slotted, so this sheet can't reach their boxes: the code button's look is handed to them as tokens,\n * `--ui-example-tool-size`, `-radius`, `-background`, for the page's `::part(button)` rule to read.\n * - When they show is the page's to say.\n */\n .frame > [part~=\"tools\"] {\n --ui-example-tool-size: var(--_ui-example-toggle-size);\n --ui-example-tool-radius: var(--_example-toggle-radius);\n --ui-example-tool-background: var(--_ui-example-toggle-background);\n position: absolute;\n inset-block-start: min(calc(50% - 0.675em), var(--_ui-example-toggle-inset));\n inset-inline-end: calc(\n var(--_ui-example-toggle-inset) + var(--_ui-example-toggle-size) + var(--_ui-example-tools-gap)\n );\n z-index: 2;\n display: flex;\n align-items: center;\n gap: var(--_ui-example-tools-gap);\n }\n .ui.example:not(.bare) > .frame > [part~=\"tools\"] {\n inset-block-start: var(--_ui-example-toggle-corner);\n inset-inline-end: calc(\n var(--_ui-example-toggle-corner) + var(--_ui-example-toggle-size) + var(--_ui-example-tools-gap)\n );\n }\n\n .description {\n max-width: var(--_ui-example-description-width);\n margin: 0 0 var(--_ui-example-gap);\n color: var(--_ui-example-description-color);\n line-height: 1.4285em;\n }\n .description code {\n font-family: var(--ui-font-family-mono, monospace);\n font-size: 0.9em;\n }\n /* A link in the `description` attribute (`[words](link)`): the page's link colour. */\n .description a {\n color: var(--ui-link);\n }\n /* Description markup slotted after the attribute's sentence (a message): a little room between. */\n :host([description]) .description ::slotted(*) {\n margin-block-start: 0.5em;\n }\n\n [part~=\"demo\"],\n [part~=\"code\"] {\n display: block;\n }\n /*\n * Closed (or bare), the demo is unframed and unpadded: the live markup sits on the page as written.\n * On the segment's own box, NOT through `--ui-segment-padding`:\n * that token would inherit into every segment the example shows.\n */\n :host(:not(:state(code-shown))) [part~=\"demo\"]::part(segment),\n .ui.bare.example [part~=\"demo\"]::part(segment) {\n padding: 0;\n }\n /* Floated example content stays inside the frame (Fomantic's `.example` clears its floats too). */\n [part~=\"demo\"]::part(segment) {\n display: flow-root;\n }\n\n /*\n * THE FRAME: every example but a `bare` one sits in a faint card, open or not,\n * so it never bleeds into the text round it (Owen, 2026-10-23: \"Example panes bleed into the text, need some framing\")\n * - a hairline, rounded, a little padding, the theme's glass behind it (fruity's blur)\n * - round the example and its code only: its header and description stay on the page above it\n * - closed, the demo starts at the frame's top padding, the code button over its corner\n * - open: the demo a very light tint, no box of its own; the code under it plain, with no frame of its own\n * (\"Don't need secondary frame around the HTML inside panel ... just visual noise\")\n * - the segments' look is set on their boxes (`::part(segment)`), NOT through `--ui-segment-*` tokens:\n * those would inherit into every segment the example shows\n */\n .ui.example:not(.bare) > .frame {\n padding: var(--_ui-example-frame-padding);\n border: var(--_ui-example-frame-border);\n border-radius: var(--_ui-example-frame-radius);\n background: var(--_ui-example-frame-background);\n box-shadow: var(--_ui-example-frame-shadow);\n backdrop-filter: var(--_ui-example-frame-filter);\n }\n /* the demo flush with the frame's padding, open or closed: as much room above it as below */\n .ui.example:not(.bare) [part~=\"demo\"]::part(segment) {\n margin: 0;\n }\n /*\n * The frame is the glass: the demo and the code inside it blur nothing again.\n * - A theme's segment glass did, a shade off the frame round it\n * (Owen, 2026-10-23: \"Lose whatever is causing background color shift under code\").\n */\n .ui.example:not(.bare) :is([part~=\"demo\"], [part~=\"code\"])::part(segment) {\n backdrop-filter: none;\n }\n /*\n * OPEN: the code is a panel behind the example, rolling open from under it\n * (Owen, 2026-10-23: \"show it like it is a panel behind the example which rolls open from the top\")\n * - ONE card: the demo its top band, out to the frame's edges, as it sits closed; the code under it, edge to edge\n * (NOT the demo boxed inside the frame: tried first, and turned down)\n * - the demo over the code, casting its shadow down onto it\n * - the code a shade deeper, rolling open from under the demo, and closed again\n * (its height from 0 and back; at once where the browser can't ease to `auto`)\n * - the code's long lines scroll sideways, never cut off\n * - closing, the card keeps this look (`:state(code-shown)`) until the code has rolled away\n * - the code button pressed in\n */\n :host(:state(code-shown)) .ui.example:not(.bare) > .frame {\n padding: 0;\n }\n :host(:state(code-shown)) .ui.example:not(.bare) [part~=\"demo\"]::part(segment) {\n position: relative;\n z-index: 1;\n margin: 0;\n padding: var(--_ui-example-frame-padding);\n border: none;\n /* its bottom corners round, the frame's: a card over the code\n (Owen, 2026-10-23: \"The example should keep its rounding on the bottom when opened\") */\n /* its top corners the frame's, inside its hairline: the frame doesn't clip, so the code button can stand over its edge */\n border-radius: calc(var(--_ui-example-frame-radius) - 1px) calc(var(--_ui-example-frame-radius) - 1px)\n var(--_ui-example-frame-radius) var(--_ui-example-frame-radius);\n background: var(--_ui-example-demo-background);\n box-shadow:\n 0 1px 0 var(--ui-border-color),\n 0 6px 12px -8px oklch(0 0 0 / 0.25);\n }\n .ui.example:not(.bare) [part~=\"code\"]::part(segment) {\n box-sizing: border-box;\n height: auto;\n margin: 0;\n /* little below the last line (Owen, 2026-10-23: \"less padding below\") */\n padding: 0.5em var(--_ui-example-code-inline) 0.125em;\n overflow-x: auto;\n overflow-y: hidden;\n border: none;\n /* its bottom corners the frame's, inside its hairline */\n border-radius: 0 0 calc(var(--_ui-example-frame-radius) - 1px) calc(var(--_ui-example-frame-radius) - 1px);\n background: color-mix(in oklab, var(--ui-text-color) 3%, transparent);\n box-shadow: none;\n interpolate-size: allow-keywords;\n transition:\n height 0.26s var(--ui-ease-out, ease-out),\n padding-block 0.26s var(--ui-ease-out, ease-out);\n }\n .ui.example {\n /* the code's side padding: the frame's, so its text starts under the demo's */\n --_ui-example-code-inline: 1em;\n }\n @starting-style {\n .ui.example:not(.bare) [part~=\"code\"]::part(segment) {\n height: 0;\n }\n }\n /* open from the start: shown at once, no roll (a page drawing the example again, its code open) */\n :host(:state(open-at-start)) .ui.example:not(.bare) [part~=\"code\"]::part(segment) {\n transition: none;\n }\n /* rolling closed: still drawn (`:state(code-shown)`) while its height eases back to 0 */\n :host(:not(:state(open))) .ui.example:not(.bare) [part~=\"code\"]::part(segment) {\n height: 0;\n padding-block: 0;\n }\n :host(:state(open)) .frame > [part~=\"toggle\"]::part(button) {\n background: color-mix(in oklab, var(--ui-text-color) 6%, var(--_ui-example-toggle-background));\n box-shadow:\n inset 0 1px 2px oklch(0 0 0 / 0.18),\n 0 0 0 1px var(--ui-border-color);\n }\n .ui.example:not(.bare) [part~=\"source\"] {\n --ui-code-border: none;\n --ui-code-background: transparent;\n /* room on the right for the copy icon, which sits over the first line */\n --ui-code-padding: 0.5em 2.5em 0.5em 0;\n }\n\n /*\n * The code's copy button (`<ui-code>`'s icon): centred under the code button, the same width (28px) and right edge\n * - the code's box ends the frame's padding in from the frame's edge; the button, its inset\n * - so 1px further out (measured)\n */\n [part~=\"source\"]::part(copy) {\n inset-block-start: 0;\n inset-inline-end: -1px;\n width: 28px;\n height: 28px;\n border-radius: 6px;\n color: var(--ui-text-muted);\n /* its icon 15px, whatever the code's size */\n font-size: 15px;\n }\n /* Phones: an example wider than the column scrolls inside its frame, never the page. */\n @media (--ui-mobile) {\n [part~=\"demo\"]::part(segment) {\n overflow-x: auto;\n }\n /*\n * ... but not for a few px: a little padding, out into the frame's own, takes them in.\n * - An example drawn a pixel or two past its box scrolled sideways for nothing\n * (a fluid tabular menu is 2px wider, so its tabs' borders meet).\n */\n :host(:not(:state(code-shown))) .ui.example:not(.bare) [part~=\"demo\"]::part(segment) {\n margin-inline: -8px;\n padding-inline: 8px;\n }\n }\n}\n\n@layer ui.components.example.variations {\n /* Variation: a run of small examples under one heading. */\n .ui.variation.example {\n --_ui-example-margin: var(--ui-example-margin, 1em 0);\n --_ui-example-gap: var(--ui-example-gap, 0.5em);\n }\n /* Bare: the code pane stands apart, below the example. */\n .ui.bare.example [part~=\"code\"] {\n margin-top: var(--_ui-example-gap);\n }\n}\n","import { Show } from \"solid-js\"\nimport { isServer, type JSX } from \"@solidjs/web\"\n\nimport { E, UIT } from \"spell/ui/core\"\nimport { ExampleSource } from \"./ExampleSource\"\nimport { exampleVocabulary } from \"./UIExample.en\"\n\nimport exampleCSS from \"./UIExample.css?inline\"\n\n/****************\n * ### `UIExample`\n * The component behind `<ui-example>`, a live example: Fomantic's docs example block.\n * A heading and description, its own children LIVE, and their source in a code pane the code button shows and hides.\n * - The docs site's `<ui-example>` until epic `ui-gaps` P14 made it a component: any page may show one,\n * the guides too.\n *\n * - Its shadow DOM: `<section class=\"ui [bare] [variation] example\" part=\"example\">` holding\n * - the heading row (`<ui-header>`), when there's a `heading`; then the description\n * - both on the page, outside the frame (Owen, 2026-10-23: \"Text for the example should be OUTSIDE the ring\")\n * - `<div class=\"frame\">`:\n * - the code `<ui-button part=\"toggle\">`, over the frame's top right corner\n * - just left of it, the `tools` slot's buttons, in a row (`part=\"tools\"`): the page's own, in its look\n * - `<ui-segment part=\"demo\">` around the default slot (the live example: the element's own children)\n * - while `code` is on, `<ui-segment part=\"code\">`, with the markup in a `<ui-code>`;\n * or what the `source` slot holds instead (an editor: spell-app's notebook examples)\n * - The markup shown is read ONCE, on first connect (`ExampleSource.of()`):\n * - a `<template>` child\n * - else the page snapshot the site entry took before any family loaded\n * - else the live children minus runtime attributes\n * - see `ExampleSource` for why, and its limits\n * - A `<template>` child is also stamped out live, once, right after it\n * (on a microtask: never inside this render, so the stamped elements upgrade under their own owners).\n * - `code` is the open state (auto-controlled, reflected):\n * the button flips it and fires `ui-opened` / `ui-closed` (`{ open }`); `:state(open)` follows it.\n * - Its shadow DOM is built of other families' widgets, which its barrel imports.\n ****************/\nexport class UIExample extends E.UIComponent<typeof exampleVocabulary> {\n // widened, as `UICode`'s is: a subclass (spell-app's `<spell-example>`) brings its own tag\n @E.proto static vocabulary: E.ComponentVocabulary = exampleVocabulary\n @E.protoMerged static elementSetup = {\n styleSheets: { example: exampleCSS },\n delegatesFocus: false\n } satisfies Partial<E.ElementSetup>\n\n /** The markup to show, read once before anything here touches the light DOM. */\n readonly sourceMarkup: string = isServer ? \"\" : ExampleSource.of(this.domElement)\n\n /** Which slots have content: the description shows only when there is one. */\n readonly slots = new E.SlotContent(this.domElement)\n\n constructor(...args: ConstructorParameters<typeof E.UIComponent>) {\n super(...args)\n // after `sourceMarkup` is read: the fields initialize first\n if (!isServer) this.stamp()\n }\n\n ////////////////\n // ## The code pane\n ////////////////\n\n /** `code`: the code pane is open. */\n @E.cssState(\"open\")\n @E.controlled(\"code\")\n accessor isCodeOpen = false\n\n /**\n * The code pane is drawn: open, or still rolling closed.\n * - The open card's look stays until it has rolled away\n * (Owen, 2026-10-23: \"code examples need to roll closed as well\").\n */\n @E.cssState(\"code-shown\")\n @E.state\n accessor isCodeShown = false\n\n /**\n * The code was open from the start (`code` in markup, or a page drawing the example again, open):\n * it shows at once, without rolling open; the code button rolls it from then on.\n */\n @E.cssState(\"open-at-start\")\n @E.state\n accessor isOpenAtStart = this.isCodeOpen\n\n /** Drawn at once as it opens; as it closes, once its roll (`CLOSE_SECONDS`) is done, unless it opened again. */\n @E.onChange(\"isCodeOpen\")\n protected onCodeOpenChanged(isOpen: boolean) {\n this.closingTimer?.cancel()\n if (isOpen) this.isCodeShown = true\n else if (this.isCodeShown) this.closingTimer = E.after(CLOSE_SECONDS, () => (this.isCodeShown = false))\n }\n\n /** The wait for the code to finish rolling closed (`onCodeOpenChanged()`). */\n private closingTimer?: E.CancelablePromise<unknown>\n\n /**\n * The code pane, open as `code` (`isCodeOpen`): `ui-opened` / `ui-closed` as the code button opens or closes it;\n * the button's `aria-expanded`.\n */\n readonly disclosure = new E.Disclosure({ component: this, member: \"isCodeOpen\" })\n\n /** Open or close the code pane, as the viewer did with `event`: then `ui-opened` / `ui-closed`. */\n toggle(event?: Event): void {\n this.isOpenAtStart = false\n if (this.disclosure.toggle(event)) this.disclosure.sendAfter(this.isCodeOpen, event)\n }\n\n /** The code button's name: what a click does. */\n private get toggleLabel(): string {\n return this.isCodeOpen ? this.translationForKey(\"hideCode\") : this.translationForKey(\"showCode\")\n }\n\n /** The live example sits in a frame: the code is shown (open, or rolling closed) and the example isn't `bare`. */\n private get demoIsFramed(): boolean {\n return this.isCodeShown && !this.bare\n }\n\n ////////////////\n // ## The example\n ////////////////\n\n /**\n * The `description` attribute as text: each backticked span a `<code>`, each `[words](link)` a link\n * (epic `elemental-spell` P26: a page's description paragraph, written as one attribute).\n */\n private get descriptionWithCode(): (string | JSX.Element)[] {\n const text = this.description ?? \"\"\n return text.split(UIT.CODE_SPAN).flatMap((piece, index) => {\n if (index % 2) return [<code>{piece}</code>]\n // text, then each link's words, its address and the text after it\n const parts = piece.split(LINK)\n const drawn: (string | JSX.Element)[] = []\n for (let at = 0; at < parts.length; at += 3) {\n if (parts[at]) drawn.push(parts[at]!)\n if (at + 2 < parts.length) drawn.push(<a href={parts[at + 2]}>{parts[at + 1]}</a>)\n }\n return drawn\n })\n }\n\n /**\n * Stamp a `<template>` child's content out right after it, once, if there is one.\n * - On a microtask: this runs while the element renders, and the new elements must upgrade outside it.\n */\n private stamp() {\n const template = ExampleSource.template(this.domElement)\n if (template) E.afterSolidUpdate(() => template.after(template.content.cloneNode(true)))\n }\n\n ////////////////\n // ## Rendering\n ////////////////\n\n render(): JSX.Element {\n return (\n <section class={this.rootClass} part={this.partForName(\"example\")}>\n <Show when={this.heading}>\n <div class={HEADING_CLASS}>\n <ui-header\n part={this.partForName(\"header\")}\n level={UIT.HeadingLevels.attributeFor(UIT.HeadingLevels.levelFor(this.level, LEVELS))}\n size={this.variation ? \"small\" : undefined}\n >\n {this.heading}\n </ui-header>\n </div>\n </Show>\n <Show when={this.description || this.slots.hasContent(this.slotForName(\"description\"))}>\n <div class={UIT.DESCRIPTION} part={this.partForName(\"description\")}>\n {/* the attribute's sentence, then any richer description markup slotted beside it (a message) */}\n {this.descriptionWithCode}\n <slot name={this.slotForName(\"description\")} />\n </div>\n </Show>\n <div class={FRAME_CLASS}>\n {/* before the code button: the Tab order follows the row, left to right */}\n <div class={TOOLS_CLASS} part={this.partForName(\"tools\")}>\n <slot name={this.slotForName(\"tools\")} />\n </div>\n <ui-button\n part={this.partForName(\"toggle\")}\n icon={CODE_ICON}\n size={this.variation ? \"mini\" : \"tiny\"}\n aria-label={this.toggleLabel}\n title={this.toggleLabel}\n aria-expanded={this.disclosure.ariaExpanded}\n aria-controls={CODE_PANE_ID}\n ref={(button: HTMLElement) => button.addEventListener(\"click\", (event) => this.toggle(event))}\n appearance=\"circular basic\"\n />\n <ui-segment\n part={this.partForName(\"demo\")}\n appearance={this.demoIsFramed ? undefined : \"basic\"}\n attach={this.demoIsFramed ? UIT.TOP : undefined}\n >\n <slot />\n </ui-segment>\n <Show when={this.isCodeShown}>\n <ui-segment\n id={CODE_PANE_ID}\n part={this.partForName(\"code\")}\n attach={this.bare ? undefined : UIT.BOTTOM}\n appearance=\"secondary\"\n >\n <slot name={this.slotForName(\"source\")}>\n <ui-code\n part={this.partForName(\"source\")}\n language={this.language || DEFAULT_LANGUAGE}\n copy=\"\"\n content={this.sourceMarkup}\n />\n </slot>\n </ui-segment>\n </Show>\n </div>\n </section>\n )\n }\n}\n\n/** The vocabulary getters, typed (`UIComponent`'s doc). */\nexport interface UIExample extends E.AttributeValues<typeof exampleVocabulary> {}\n\n/** Class word of the heading row: the title. */\nconst HEADING_CLASS = \"heading\"\n\n/** How long the code takes to roll closed, s: `UIExample.css`'s transition (0.26s), and a little more. */\nconst CLOSE_SECONDS = 0.3\n\n/** Class word of the frame: the live example, the code pane, and the code button over their top right corner. */\nconst FRAME_CLASS = \"frame\"\n\n/** Class word of the row of the page's own buttons (the `tools` slot), just left of the code button. */\nconst TOOLS_CLASS = \"tools\"\n\n/** The icon of the code button: Fomantic's `code` icon. */\nconst CODE_ICON = \"code\"\n\n/** `language` when unset (the vocabulary's default): the source is markup. */\nconst DEFAULT_LANGUAGE = \"html\"\n\n/** A Markdown link in `description`: `[the words](where)`, its words and its address. */\nconst LINK = /\\[([^\\]]+)\\]\\(([^)\\s]+)\\)/\n\n/** Id of the code pane inside the shadow root, for the button's `aria-controls`. */\nconst CODE_PANE_ID = \"code\"\n\n/** `level`: any heading level; unset, `4`: Fomantic's examples are `h4`. */\nconst LEVELS: UIT.HeadingBounds = { min: 1, max: 6, fallback: 4 }\n","/**\n * The example family: defines `<ui-example>` and exports its component, `UIExample`,\n * and its helpers (`ExampleSource`, `HtmlFormatter`).\n * - The docs site's `<ui-example>` until epic `ui-gaps` P14 made it a component:\n * a lib entry, in the component list, loaded by any `<ui-root>`, so the guides show examples too.\n * - SIDE EFFECT: importing it defines the tag, and the widgets its shadow DOM is built of:\n * `<ui-segment>`, `<ui-header>` (`ui-parts`), `<ui-button>`, `<ui-code>`.\n * A `<ui-root>` only loads what's in the page's light DOM, so a family that is built of other widgets\n * imports them itself.\n * - A page that only keeps the examples' markup before they upgrade (the site's first import) imports\n * `ExampleSource` by its file, `spell/ui/components/ui-example/ExampleSource`: this barrel would define the tag too.\n */\n\nimport { UIExample } from \"./UIExample\"\nimport { ExampleSource } from \"./ExampleSource\"\nimport { HtmlFormatter } from \"./HtmlFormatter\"\n\nimport \"spell/ui/components/ui-segment\"\nimport \"spell/ui/components/ui-parts\"\nimport \"spell/ui/components/ui-button\"\nimport \"spell/ui/components/ui-code\"\n\nUIExample.define()\n\nexport { UIExample, ExampleSource, HtmlFormatter }\n"],"mappings":";;;;;;;;;AAgBA,IAAa+D,IAAb,MAAa,cAAc;CAEzB;CAGA;CAEA,YAAY,EAAE,WAAQ,KAAK,YAAS,SAA6B,CAAC,GAAG;EAEnE,AADA,KAAK,QAAQC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,GAAA,IAAO,gBAAtBH,GAHWO,CAAA,GAANtF,EAAAkF,GAAMI,CAAA,GAA0D1F,EAAA0F,GAAA,WAAA,GAE5DxF,EAFEwF,GAEK,cAAoCnF,EAA3C+E,GAAA,IAFEI,GAEyCnB,EAAA,CAAA,GAA3ChE,EAAA+E,GAAA,IAFEI,CAAA,GAGIxF,EAHJwF,GAGW,gBAAenF,EAAtB+E,GAAA,IAHJI,GAG0B;CACnC,aAAa,EAAE,SAASzF,GAAW;CACnC,gBAAgB;AAClB,CAAA,CAAA,GAHeM,EAAA+E,GAAA,IAHJI,CAAA;AAAN,IAAM0E,IAAN1E,GA0LD6C,KAAgB,WAGhB/B,KAAgB,IAGhBkD,KAAc,SAGdC,KAAc,SAGdX,IAAY,QAGZO,KAAmB,QAGnBxC,KAAO,6BAGPkC,IAAe,QAGfT,KAA4B;CAAE,KAAK;CAAG,KAAK;CAAG,UAAU;AAAE;;;AChOhE4B,EAAU,OAAO"}
|
|
1
|
+
{"version":3,"file":"ui-example.js","names":["<Show when={this.heading}>\n <div class={HEADING_CLASS}>\n <ui-header\n part={this.partForName(\"header\")}\n level={UIT.HeadingLevels.attributeFor(UIT.HeadingLevels.levelFor(this.level, LEVELS))}\n size={this.variation ? \"small\" : void 0}\n >\n {this.heading}\n </ui-header>\n </div>\n </Show>","this","part={this.partForName(\"header\")}","level={UIT.HeadingLevels.attributeFor(UIT.HeadingLevels.levelFor(this.level, LEVELS))}","size={this.variation ? \"small\" : void 0}","<div class={HEADING_CLASS}>\n <ui-header\n part={this.partForName(\"header\")}\n level={UIT.HeadingLevels.attributeFor(UIT.HeadingLevels.levelFor(this.level, LEVELS))}\n size={this.variation ? \"small\" : void 0}\n >\n {this.heading}\n </ui-header>\n </div>","<section class={this.rootClass} part={this.partForName(\"example\")}>\n <Show when={this.heading}>\n <div class={HEADING_CLASS}>\n <ui-header\n part={this.partForName(\"header\")}\n level={UIT.HeadingLevels.attributeFor(UIT.HeadingLevels.levelFor(this.level, LEVELS))}\n size={this.variation ? \"small\" : void 0}\n >\n {this.heading}\n </ui-header>\n </div>\n </Show>\n <Show when={this.description || this.slots.hasContent(this.slotForName(\"description\"))}>\n <div class={UIT.DESCRIPTION} part={this.partForName(\"description\")}>\n {\n /* the attribute's sentence, then any richer description markup slotted beside it (a message) */\n }\n {this.descriptionWithCode}\n <slot name={this.slotForName(\"description\")} />\n </div>\n </Show>\n <div class={FRAME_CLASS}>\n {\n /* before the code button: the Tab order follows the row, left to right */\n }\n <div class={TOOLS_CLASS} part={this.partForName(\"tools\")}>\n <slot name={this.slotForName(\"tools\")} />\n </div>\n <ui-button\n part={this.partForName(\"toggle\")}\n icon={CODE_ICON}\n size={this.variation ? \"mini\" : \"tiny\"}\n aria-label={this.toggleLabel}\n title={this.toggleLabel}\n aria-expanded={this.disclosure.ariaExpanded}\n aria-controls={CODE_PANE_ID}\n ref={(button) => button.addEventListener(\"click\", (event) => this.toggle(event))}\n appearance=\"circular basic\"\n />\n <ui-segment\n part={this.partForName(\"demo\")}\n appearance={this.demoIsFramed ? void 0 : \"basic\"}\n attach={this.demoIsFramed ? UIT.TOP : void 0}\n >\n <slot />\n </ui-segment>\n <Show when={this.isCodeShown}>\n <ui-segment\n id={CODE_PANE_ID}\n part={this.partForName(\"code\")}\n attach={this.bare ? void 0 : UIT.BOTTOM}\n appearance=\"secondary\"\n >\n <slot name={this.slotForName(\"source\")}>\n <ui-code\n part={this.partForName(\"source\")}\n language={this.language || DEFAULT_LANGUAGE}\n copy=\"\"\n content={this.sourceMarkup}\n />\n </slot>\n </ui-segment>\n </Show>\n </div>\n </section>","<Show when={this.description || this.slots.hasContent(this.slotForName(\"description\"))}>\n <div class={UIT.DESCRIPTION} part={this.partForName(\"description\")}>\n {\n /* the attribute's sentence, then any richer description markup slotted beside it (a message) */\n }\n {this.descriptionWithCode}\n <slot name={this.slotForName(\"description\")} />\n </div>\n </Show>","<div class={UIT.DESCRIPTION} part={this.partForName(\"description\")}>\n {\n /* the attribute's sentence, then any richer description markup slotted beside it (a message) */\n }\n {this.descriptionWithCode}\n <slot name={this.slotForName(\"description\")} />\n </div>","part={this.partForName(\"description\")}","name={this.slotForName(\"description\")}","ref={(button) => button.addEventListener(\"click\", (event) => this.toggle(event))}","<Show when={this.isCodeShown}>\n <ui-segment\n id={CODE_PANE_ID}\n part={this.partForName(\"code\")}\n attach={this.bare ? void 0 : UIT.BOTTOM}\n appearance=\"secondary\"\n >\n <slot name={this.slotForName(\"source\")}>\n <ui-code\n part={this.partForName(\"source\")}\n language={this.language || DEFAULT_LANGUAGE}\n copy=\"\"\n content={this.sourceMarkup}\n />\n </slot>\n </ui-segment>\n </Show>","attach={this.bare ? void 0 : UIT.BOTTOM}","name={this.slotForName(\"source\")}","part={this.partForName(\"source\")}","language={this.language || DEFAULT_LANGUAGE}","content={this.sourceMarkup}","<ui-segment\n id={CODE_PANE_ID}\n part={this.partForName(\"code\")}\n attach={this.bare ? void 0 : UIT.BOTTOM}\n appearance=\"secondary\"\n >\n <slot name={this.slotForName(\"source\")}>\n <ui-code\n part={this.partForName(\"source\")}\n language={this.language || DEFAULT_LANGUAGE}\n copy=\"\"\n content={this.sourceMarkup}\n />\n </slot>\n </ui-segment>","part={this.partForName(\"example\")}","class={FRAME_CLASS}","class={TOOLS_CLASS}","part={this.partForName(\"tools\")}","name={this.slotForName(\"tools\")}","part={this.partForName(\"toggle\")}","size={this.variation ? \"mini\" : \"tiny\"}","aria-label={this.toggleLabel}","title={this.toggleLabel}","aria-expanded={this.disclosure.ariaExpanded}","part={this.partForName(\"demo\")}","appearance={this.demoIsFramed ? void 0 : \"basic\"}","attach={this.demoIsFramed ? UIT.TOP : void 0}","E.UIComponent","E.proto","E.protoMerged","E.cssState","E.controlled","E.state","E.onChange","E.SlotContent","E.Disclosure","E.after","UIT.CODE_SPAN","_$getOwner","_$createComponent","_$readShallow","_$setAttribute","UIT.DESCRIPTION","UIT.BOTTOM","__name","exampleCSS","__name$1","__publicField","__decorateElement","__decoratorMetadata","__runInitializers","__privateAdd","CODE_SPAN","HeadingLevels","DESCRIPTION","BOTTOM","__decoratorStart","getOwner$1","HtmlFormatter","width","indent","root","html","stack","last","match","TOKEN","parent","token","comment","closing","tagName","depth","open","tag","element","RAW","end","stop","close","VOID","lines","pad","run","node","nodes","text","VERBATIM","raw","child","oneLine","inner","common","line","INLINE","quoted","name","ENUMERATED_TRUE","whole","space","ExampleSource","count","example","EXAMPLE_TAG","DOMElement","template","snapshot","inert","OWN_SLOTS","origin","RUNTIME_ATTRIBUTES","SNAPSHOTS_KEY","copy","attribute","ORIGINAL_PREFIX","exampleVocabulary","UIExample_default","_tmpl$","_tmpl$2","_tmpl$3","_tmpl$4","_tmpl$5","_tmpl$6","_onCodeOpenChanged_dec","_isOpenAtStart_dec","_isCodeShown_dec","_isCodeOpen_dec","_elementSetup_dec","_vocabulary_dec","_a","_init","_isCodeOpen","_isCodeShown","_isOpenAtStart","_UIExample","UIComponent","proto","protoMerged","cssState","controlled","state","onChange","args","isServer","SlotContent","Disclosure","isOpen","after","CLOSE_SECONDS","event","index","_el$","insert","piece","parts","LINK","drawn","at","_el$2","_o$","effect","setAttribute","_v$","claimElement","afterSolidUpdate","_self$","_el$3","_el$6","_el$9","_el$10","_el$11","_el$12","_el$13","_el$14","createComponent","Show","_el$4","_el$5","readShallow","HEADING_CLASS","LEVELS","className","_p$","t","a","o","_el$7","_el$8","CODE_ICON","CODE_PANE_ID","ref","button","_el$15","_el$16","_el$17","DEFAULT_LANGUAGE","i","n","FRAME_CLASS","TOOLS_CLASS","s","h","r","d","l","u","c","w","UIExample"],"sources":["../src/components/ui-example/HtmlFormatter.ts","../src/components/ui-example/ExampleSource.ts","../src/components/ui-example/UIExample.en.ts","../src/components/ui-example/UIExample.css?inline","../src/components/ui-example/UIExample.tsx","../src/components/ui-example/index.ts"],"sourcesContent":["/****************\n * ### `HtmlFormatter`\n * Pretty-prints an HTML fragment for `<ui-example>`'s code pane (`ExampleSource`).\n * - Why re-indent, not show the markup as found: it comes from `innerHTML`, indented however the page around it\n * was (and a `<ui-include>`d part, or a live tree, has no indentation of its own), so it's rebuilt to one style.\n * - From the old Astro site's `HtmlFormatter` (deleted with it, epic `spell-ui-pages` P7), plus:\n * - whitespace inside an opening tag collapses to one space (an author's attributes over several lines)\n * - `<ui-code>` and `<ui-markdown>` keep their content verbatim, like `<pre>`: it's code / markdown text\n * - Deliberately small, not a full HTML parser: examples are hand-written, well-formed fragments.\n * - Rules, prettier-ish:\n * - text-level elements (`<a>`, `<code>`, `<strong>` ...) and text stay together on one line as a \"run\"\n * - every other element, `ui-*` included, starts its own line\n * - an element with no block-level children that fits in `width` stays on one line\n * - `<pre>`, `<textarea>`, `<script>`, `<style>`, `<ui-code>`, `<ui-markdown>` keep their content verbatim\n * - Pure: text in, text out.\n ****************/\nexport class HtmlFormatter {\n /** Max line length before an element is expanded onto several lines. */\n readonly width: number\n\n /** One level of indentation. */\n readonly indent: string\n\n constructor({ width = 100, indent = \" \" }: HtmlFormatterProps = {}) {\n this.width = width\n this.indent = indent\n }\n\n /** Format `html`: parse it into a tree, then print it. */\n format(html: string): string {\n const root = this.parse(html)\n return this.printChildren(root.children, 0).join(\"\\n\").trim()\n }\n\n ////////////////\n // ## Parsing\n ////////////////\n\n /** Parse `html` into a tree of `HtmlNode`s under a synthetic root; unbalanced closers are ignored. */\n private parse(html: string): HtmlElementNode {\n const root: HtmlElementNode = { kind: \"element\", tag: \"#root\", open: \"\", children: [] }\n const stack: HtmlElementNode[] = [root]\n let last = 0\n TOKEN.lastIndex = 0\n for (let match = TOKEN.exec(html); match; match = TOKEN.exec(html)) {\n const parent = stack.at(-1)!\n if (match.index > last) parent.children.push({ kind: \"text\", text: html.slice(last, match.index) })\n last = TOKEN.lastIndex\n const [token, comment, closing, tagName] = match\n if (comment !== undefined) {\n parent.children.push({ kind: \"comment\", text: token })\n } else if (closing) {\n const depth = stack.findLastIndex((open) => open.tag === tagName!.toLowerCase())\n if (depth > 0) stack.length = depth\n } else {\n const tag = tagName!.toLowerCase()\n const element: HtmlElementNode = { kind: \"element\", tag, open: HtmlFormatter.cleanOpenTag(token), children: [] }\n parent.children.push(element)\n if (RAW.has(tag)) {\n // raw text elements: everything up to the matching closer is content, verbatim\n const end = html.toLowerCase().indexOf(`</${tag}`, last)\n const stop = end === -1 ? html.length : end\n element.raw = html.slice(last, stop)\n const close = html.indexOf(\">\", stop)\n last = close === -1 ? html.length : close + 1\n TOKEN.lastIndex = last\n } else if (!VOID.has(tag) && !token.endsWith(\"/>\")) {\n stack.push(element)\n }\n }\n }\n if (last < html.length) stack.at(-1)!.children.push({ kind: \"text\", text: html.slice(last) })\n return root\n }\n\n ////////////////\n // ## Printing\n ////////////////\n\n /** Print `nodes` at `depth`: inline runs joined onto one line, block elements one per line. */\n private printChildren(nodes: HtmlNode[], depth: number): string[] {\n const lines: string[] = []\n const pad = this.indent.repeat(depth)\n let run = \"\"\n for (const node of nodes) {\n if (this.isInline(node)) {\n run += this.inline(node)\n continue\n }\n flushRun()\n if (node.kind === \"comment\") lines.push(pad + node.text.trim())\n else if (node.kind === \"element\") lines.push(...this.printElement(node, depth))\n }\n flushRun()\n return lines\n\n /** Push the pending inline run as one line, whitespace collapsed. */\n function flushRun() {\n const text = run.replace(/\\s+/g, \" \").trim()\n if (text) lines.push(pad + text)\n run = \"\"\n }\n }\n\n /** Print one block-level element: on one line if it fits and has no block children, else expanded. */\n private printElement(element: HtmlElementNode, depth: number): string[] {\n const pad = this.indent.repeat(depth)\n const close = VOID.has(element.tag) ? \"\" : `</${element.tag}>`\n if (element.raw !== undefined) {\n // `<pre>` / `<textarea>` / code text: whitespace is content, never re-indent it\n if (VERBATIM.has(element.tag)) return [pad + element.open + element.raw + close]\n const raw = element.raw.replace(/^\\n+|\\s+$/g, \"\")\n if (!raw.includes(\"\\n\")) return [`${pad}${element.open}${raw}${close}`]\n return [pad + element.open, ...this.reindent(raw, pad + this.indent), pad + close]\n }\n if (!element.children.some((child) => !this.isInline(child))) {\n const oneLine = pad + element.open + this.inlineChildren(element) + close\n if (oneLine.length <= this.width) return [oneLine]\n }\n const inner = this.printChildren(element.children, depth + 1)\n if (!inner.length) return [pad + element.open + close]\n return [pad + element.open, ...inner, pad + close]\n }\n\n /**\n * `raw`'s lines (a `<script>` / `<style>` body) moved to `pad`: their common leading whitespace dropped, so a\n * script indented with the page around it reads like the markup around it. Blank lines stay blank.\n */\n private reindent(raw: string, pad: string): string[] {\n const lines = raw.split(\"\\n\")\n const common = Math.min(...lines.filter((line) => line.trim()).map((line) => line.match(/^\\s*/)![0].length))\n return lines.map((line) => (line.trim() ? pad + line.slice(common) : \"\"))\n }\n\n /** Is `node` part of an inline run (text, or a text-level element with only inline content)? */\n private isInline(node: HtmlNode): boolean {\n if (node.kind === \"text\") return true\n if (node.kind === \"comment\") return false\n return INLINE.has(node.tag) && node.children.every((child) => this.isInline(child))\n }\n\n /** `node` on one line. */\n private inline(node: HtmlNode): string {\n if (node.kind !== \"element\") return node.text\n const close = VOID.has(node.tag) ? \"\" : `</${node.tag}>`\n return node.open + (node.raw ?? this.inlineChildren(node)) + close\n }\n\n /** `element`'s children on one line, whitespace collapsed and trimmed. */\n private inlineChildren(element: HtmlElementNode): string {\n return element.children\n .map((child) => this.inline(child))\n .join(\"\")\n .replace(/\\s+/g, \" \")\n .trim()\n }\n\n ////////////////\n // ## Statics\n ////////////////\n\n /**\n * Format `html` with default options.\n * - Static: the one call `ExampleSource` needs; a formatter with other options is `new HtmlFormatter(props)`.\n */\n static format(html: string): string {\n return new HtmlFormatter().format(html)\n }\n\n /**\n * Undo artefacts in an opening tag, so the shown code reads as authored:\n * - whitespace (newlines between attributes) collapses to one space, outside quoted values\n * - `basic=\"\"` => `basic`: `innerHTML` serializes every boolean attribute with an empty value\n * - `basic=\"true\"` => `basic`: JSX renders a bare attribute as `=\"true\"`; the library reads both alike.\n * NEVER for `aria-*` or enumerated attributes (`draggable` ...), where `\"true\"` is the value.\n * - Static: pure, whatever the options.\n */\n private static cleanOpenTag(tag: string): string {\n return tag\n .replace(/(\"[^\"]*\"|'[^']*')|\\s+/g, (whole, quoted: string | undefined) => quoted ?? \" \")\n .replace(/ (\\/?>)$/, \"$1\")\n .replace(/(\\s)([\\w:-]+)=\"\"/g, \"$1$2\")\n .replace(/(\\s)([\\w:-]+)=\"true\"/g, (whole, space: string, name: string) =>\n name.startsWith(\"aria-\") || ENUMERATED_TRUE.has(name) ? whole : space + name\n )\n }\n}\n\n/** Props of `new HtmlFormatter()`. */\nexport type HtmlFormatterProps = {\n /** max line length before expanding an element, default `100` */\n width?: number\n /** one indentation level, default two spaces */\n indent?: string\n}\n\n/** A parsed node. */\ntype HtmlNode = HtmlElementNode | { kind: \"text\"; text: string } | { kind: \"comment\"; text: string }\n\n/** A parsed element. */\ntype HtmlElementNode = {\n kind: \"element\"\n /** lower-case tag name, `#root` for the synthetic root */\n tag: string\n /** the opening tag as written, whitespace collapsed, minus rendering artefacts (`cleanOpenTag()`) */\n open: string\n /** child nodes, empty for void and raw-text elements */\n children: HtmlNode[]\n /** verbatim content of a raw-text element (`<pre>`, `<script>` ...) */\n raw?: string\n}\n\n/** Attributes whose `\"true\"` is an enumerated VALUE, not a boolean presence. */\nconst ENUMERATED_TRUE = new Set([\"contenteditable\", \"draggable\", \"spellcheck\", \"translate\", \"autocapitalize\"])\n\n/**\n * One token: a comment (group 1), or a tag with an optional `/` (group 2) and its name (group 3).\n * - Attribute values may contain `>`, so quoted values are matched explicitly.\n * - Global: `parse()` walks it with `exec()`, resetting `lastIndex` first.\n */\nconst TOKEN =\n /(<!--[\\s\\S]*?-->)|<(\\/?)([a-zA-Z][\\w:-]*)(?:\\s+[^\\s\"'>/=]+(?:\\s*=\\s*(?:\"[^\"]*\"|'[^']*'|[^\\s\"'=<>`]+))?)*\\s*\\/?>/g\n\n/** Elements with no content or closing tag. */\nconst VOID = new Set([\n \"area\",\n \"base\",\n \"br\",\n \"col\",\n \"embed\",\n \"hr\",\n \"img\",\n \"input\",\n \"link\",\n \"meta\",\n \"source\",\n \"track\",\n \"wbr\"\n])\n\n/** Elements whose content is not parsed: kept as text. */\nconst RAW = new Set([\"pre\", \"textarea\", \"script\", \"style\", \"ui-code\", \"ui-markdown\"])\n\n/** Raw elements whose content is printed exactly as found, never re-indented. */\nconst VERBATIM = new Set([\"pre\", \"textarea\", \"ui-code\", \"ui-markdown\"])\n\n/** Text-level elements that stay on the same line as surrounding text. */\nconst INLINE = new Set([\n \"a\",\n \"abbr\",\n \"b\",\n \"bdi\",\n \"bdo\",\n \"br\",\n \"cite\",\n \"code\",\n \"data\",\n \"dfn\",\n \"em\",\n \"i\",\n \"kbd\",\n \"mark\",\n \"q\",\n \"s\",\n \"samp\",\n \"small\",\n \"span\",\n \"strong\",\n \"sub\",\n \"sup\",\n \"time\",\n \"u\",\n \"var\",\n \"wbr\"\n])\n","import { E } from \"spell/ui/core\"\nimport { HtmlFormatter } from \"./HtmlFormatter\"\n\n/****************\n * ### `ExampleSource`\n * The markup `<ui-example>` shows as its code: its OWN light-DOM children, as authored.\n * - The problem: the element is defined LAZILY (`<ui-root>` imports its family on first use), so by the time its\n * component runs, the `<ui-button>`s inside may be upgraded already. An upgrade adds a shadow root (not in\n * `innerHTML`), and the runtime may touch the light DOM: a roving `tabindex` on items, transition markers,\n * a `<ui-include>`'s fetched content. So the source is read, first match wins:\n * 1. a `<template>` child: its markup, EXACTLY (never parsed into live elements; the element stamps a copy out\n * live). Use it when an example's markup changes as it runs.\n * 2. a SNAPSHOT: the example's `innerHTML` taken by `snapshot()` before any family loaded -- the site bundle's entry\n * (`site/_src/site.ts`) calls it first thing, so every example parsed with the page is read pristine.\n * 3. the example's `innerHTML` NOW, minus `RUNTIME_ATTRIBUTES`: examples added after the entry ran (a\n * `<ui-include>`d part, a test, an app) -- unless `keep()` saw them first (the site's router keeps every\n * page it swaps in).\n * - Then: children of the example's own named slots (`description`) are dropped, and `HtmlFormatter` re-indents.\n * - Limits:\n * - (3) can't tell an author's `tabindex` from a roving one, and keeps anything else a family wrote into its light\n * DOM; use a `<template>` there\n * - `innerHTML` normalizes: attribute quotes become `\"`, entities are re-escaped (`>` stays,\n * `>` in text becomes `>`), boolean attributes lose their `=\"\"` (`HtmlFormatter`); comments survive\n * - Plain DOM, no Solid: the site entry imports it without the element.\n * - Static: the snapshots are page-wide (on `globalThis`, `SNAPSHOTS_KEY`), taken before any element exists.\n ****************/\nexport class ExampleSource {\n /**\n * Keep the markup of every `<ui-example>` under `root` whose family hasn't loaded yet; returns how many.\n * - Call BEFORE any family loads: the site entry does, at the top. Later calls only add new examples.\n * - SIDE EFFECT: fills the page-wide snapshot map.\n */\n static snapshot(root: ParentNode = document): number {\n let count = 0\n for (const example of root.querySelectorAll(`${EXAMPLE_TAG}${E.DOMElement.notAttached}`)) {\n if (ExampleSource.snapshots.has(example)) continue\n ExampleSource.snapshots.set(example, example.innerHTML)\n count++\n }\n return count\n }\n\n /**\n * Keep the markup of every `<ui-example>` in `root` -- a fragment about to go into the page (a\n * `<ui-include>`'s `ui-drawing`) -- defined or not; returns how many.\n * - Its elements may be upgraded already (imported into a document whose families are defined),\n * but not yet connected, so their light DOM is still as authored.\n * - URLs the include rewrote go back to what the page wrote (`data-ui-include-*`): the code shows the source.\n * - SIDE EFFECT: fills the page-wide snapshot map.\n */\n static keep(root: ParentNode): number {\n let count = 0\n for (const example of root.querySelectorAll(EXAMPLE_TAG)) {\n if (ExampleSource.snapshots.has(example)) continue\n ExampleSource.snapshots.set(example, ExampleSource.authored(example))\n count++\n }\n return count\n }\n\n /** The code to show for `example`: its example markup (see the class), cleaned and re-indented. */\n static of(example: Element): string {\n const template = ExampleSource.template(example)\n if (template) return ExampleSource.format(template.innerHTML, \"authored\")\n const snapshot = ExampleSource.snapshots.get(example)\n return ExampleSource.format(snapshot ?? example.innerHTML, snapshot === undefined ? \"live\" : \"authored\")\n }\n\n /** `example`'s top-level `<template>` child, if it has one: the example's markup, kept inert. */\n static template(example: Element): HTMLTemplateElement | undefined {\n for (const child of example.children) if (child.localName === \"template\") return child as HTMLTemplateElement\n return undefined\n }\n\n /**\n * `html` as shown code: the example's own slotted chrome dropped, `live` markup stripped of runtime attributes,\n * re-indented.\n * - Parsed into an inert `<template>`: nothing in it upgrades or loads.\n */\n static format(html: string, origin: MarkupOrigin): string {\n const inert = document.createElement(\"template\")\n inert.innerHTML = html\n for (const child of [...inert.content.children]) if (OWN_SLOTS.includes(child.slot)) child.remove()\n if (origin === \"live\") {\n for (const element of inert.content.querySelectorAll(\"*\")) {\n for (const name of RUNTIME_ATTRIBUTES) element.removeAttribute(name)\n }\n }\n return HtmlFormatter.format(inert.innerHTML)\n }\n\n ////////////////\n // ## Internal\n ////////////////\n\n /** Example => its markup before upgrades, on `globalThis` (see `SNAPSHOTS_KEY`). */\n private static get snapshots(): WeakMap<Element, string> {\n return ((globalThis as SnapshotGlobal)[SNAPSHOTS_KEY] ??= new WeakMap())\n }\n\n /** `example`'s inner markup with every URL an include rewrote put back as written. */\n private static authored(example: Element): string {\n const copy = document.createElement(\"template\")\n copy.innerHTML = example.innerHTML\n for (const element of copy.content.querySelectorAll(\"*\")) {\n for (const attribute of [...element.attributes]) {\n if (!attribute.name.startsWith(E.ORIGINAL_PREFIX)) continue\n element.setAttribute(attribute.name.slice(E.ORIGINAL_PREFIX.length), attribute.value)\n element.removeAttribute(attribute.name)\n }\n }\n return copy.innerHTML\n }\n}\n\n/**\n * Where markup `ExampleSource.format()` gets came from:\n * - `authored`: as written (a `<template>`, a snapshot): shown as is\n * - `live`: read from an upgraded tree: `RUNTIME_ATTRIBUTES` are stripped\n */\nexport type MarkupOrigin = \"authored\" | \"live\"\n\n/** The tag whose markup `ExampleSource.snapshot()` keeps: `exampleVocabulary.tag`, as a value. */\nconst EXAMPLE_TAG = \"ui-example\"\n\n/**\n * `globalThis` key of the page's markup snapshots (`ExampleSource.snapshot()`): example => its `innerHTML` before any\n * family upgraded it.\n * - A registered symbol, so the site entry's copy of `ExampleSource` and the lazily loaded family's agree even if a\n * bundler gave each its own copy of the module.\n */\nconst SNAPSHOTS_KEY = Symbol.for(\"spell-ui:example-sources\")\n\n/** `globalThis` with the snapshots. */\ntype SnapshotGlobal = typeof globalThis & { [SNAPSHOTS_KEY]?: WeakMap<Element, string> }\n\n/**\n * Named slots of the example ITSELF: their children are its chrome, not part of the example's markup.\n * - The default slot (`\"\"`) is the example.\n */\nconst OWN_SLOTS: readonly string[] = [\"description\"]\n\n/**\n * Attributes the RUNTIME puts on light-DOM elements, never written by an author: stripped from the shown markup\n * when it's read from a live (already upgraded) tree.\n * - `RovingTabindex`'s `tabindex` is NOT here: authors write `tabindex` too. A snapshot or a `<template>` avoids\n * the problem (see `ExampleSource`).\n */\nconst RUNTIME_ATTRIBUTES: readonly string[] = [\"data-ui-animation\", \"data-ui-hidden-by-animation\"]\n","/**\n * The English vocabulary of `<ui-example>`: every name the tag uses.\n * - Its tag, attributes, events, slots, parts, states and texts.\n * The shape is `E.ComponentVocabulary` (`spell/ui/vocabulary`).\n * - The docs site's `<ui-docs-example>` until epic `ui-gaps` P14 made it a component (from epic `epic-engine` P14):\n * the old tag is renamed by `spell ui rename` (`OldNames`), and its old `header` is `heading`.\n * - Class words: `bare`, `variation` (`ui bare example`); the open state is `:state(open)`, not a class.\n */\n\nimport type { E } from \"spell/ui/core\"\n\n/****************\n * ### `exampleVocabulary`\n * The names of `<ui-example>`, Fomantic's docs example block:\n * a heading and description, its own children LIVE, and their source in a code pane the code button shows and hides.\n ****************/\nexport const exampleVocabulary = {\n tag: \"ui-example\",\n icon: \"lightbulb outline\",\n snippet: '<ui-example heading=\"An example\">\\n\\t<ui-button>Try me</ui-button>\\n</ui-example>',\n topics: [\"documentation\", \"data display\"],\n aka: [\"example\", \"demo\", \"live example\", \"code sample\", \"playground\", \"show code\"],\n skeleton: \"header, 2 line paragraph\",\n noun: \"example\",\n description:\n \"An example shows its own markup live, under a heading and description, with the same markup as code a button \" +\n \"shows and hides.\",\n attributes: [\n {\n name: \"heading\",\n replaces: [\"header\"],\n kind: \"string\",\n description: \"Its title, e.g. `Emphasis`: Fomantic's `h4` above the example. Its old name was `header`.\"\n },\n {\n name: \"description\",\n kind: \"string\",\n description:\n \"One sentence under the heading; `` `x` `` becomes code, `[words](link)` a link. Slot `description` \" +\n \"for richer text (a message, several paragraphs): drawn after it.\"\n },\n {\n name: \"level\",\n kind: \"number\",\n default: 4,\n description: \"Heading level of the title, `1` ... `6`: Fomantic's examples are `h4`, under the section's `h2`.\"\n },\n {\n name: \"code\",\n kind: \"boolean\",\n description:\n \"The code pane is open; the code button toggles it, so it's the LIVE state too (reflected, `ui-opened` / `ui-closed`). \" +\n \"Set it in markup to open the code at start.\"\n },\n {\n name: \"language\",\n kind: \"string\",\n default: \"html\",\n description:\n \"Language of the code pane (`<ui-code language>`). The source is the markup, so `html` unless a \" +\n \"`code` child says otherwise.\"\n },\n {\n name: \"bare\",\n kind: \"keyOnly\",\n description: \"No segment frame around the live example and code, even while the code is open.\"\n },\n {\n name: \"variation\",\n kind: \"keyOnly\",\n description:\n \"Fomantic's smaller variation style: a smaller title and less space around it, for a run of \" +\n \"small examples under one heading.\"\n }\n ],\n events: [\n {\n name: \"ui-opened\",\n detail: \"{ open: true, originalEvent?: Event }\",\n description: \"The code button opened the code pane.\"\n },\n {\n name: \"ui-closed\",\n detail: \"{ open: false, originalEvent?: Event }\",\n description: \"The code button closed the code pane.\"\n }\n ],\n slots: [\n {\n name: \"\",\n description:\n \"The example itself, shown live; its markup is the code shown. A `<template>` child instead: stamped out \" +\n \"live, and its markup shown EXACTLY as written.\"\n },\n { name: \"description\", description: \"Rich description, in place of the `description` attribute.\" },\n {\n name: \"source\",\n description:\n \"What the code pane shows in place of the markup, e.g. an editor of the example's code. Shown only while \" +\n \"the code is open, as the markup is.\"\n },\n {\n name: \"tools\",\n description:\n \"Buttons of the page's own, in a row just left of the code button and in its look, e.g. a notebook's Add, \" +\n \"Move and Delete. The page decides when they show.\"\n }\n ],\n parts: [\n { name: \"example\", description: \"The whole block (`<section>`).\" },\n { name: \"header\", description: \"The `<ui-header>` title.\" },\n { name: \"toggle\", description: 'The code button (`<ui-button circular basic icon=\"code\">`).' },\n { name: \"tools\", description: \"The row round the `tools` slot, just left of the code button.\" },\n { name: \"description\", description: \"The description under the title.\" },\n { name: \"demo\", description: \"The `<ui-segment>` around the live example.\" },\n { name: \"code\", description: \"The `<ui-segment>` around the code pane.\" },\n { name: \"source\", description: \"The `<ui-code>` showing the markup.\" }\n ],\n states: [\n { name: \"open\", description: \"The code pane is open.\" },\n { name: \"code-shown\", description: \"The code pane is drawn: open, or still rolling closed.\" },\n {\n name: \"open-at-start\",\n description: \"The code was open from the start: it showed at once, without rolling open.\"\n }\n ],\n texts: [\n { key: \"showCode\", text: \"Show code\", description: \"The code button's label while the code is hidden.\" },\n { key: \"hideCode\", text: \"Hide code\", description: \"The code button's label while the code shows.\" }\n ]\n} as const satisfies E.ComponentVocabulary\n","/*\n * The style sheet of `<ui-example>`: Fomantic's docs `.example` block\n * (`server/files/stylesheets/docs.css` of Fomantic-UI-Docs, \"Examples\" and \"Code Button\"),\n * built of `<ui-*>` widgets: this sheet only LAYS THEM OUT.\n * - It styles the component's shadow DOM:\n * `<section class=\"ui [bare] [variation] example\" part=\"example\">`, holding:\n * - `<div class=\"heading\">`: the `<ui-header part=\"header\">` (only when there is a header)\n * - `<div class=\"description\" part=\"description\">` around the `description` slot (only when there is one)\n * - `<div class=\"frame\">`:\n * - the `<ui-button part=\"toggle\">`, inside its top right corner, just in from its rim (a bare example's: further in)\n * - just left of it, `<div class=\"tools\" part=\"tools\">` round the `tools` slot: the page's own buttons\n * - the `<ui-segment part=\"demo\">`, around the default slot\n * - while open, the `<ui-segment part=\"code\">` holding the `<ui-code part=\"source\">`\n * - the header and description sit on the page, outside the frame:\n * the frame holds only the example and its code\n * - The frame and the code are the widgets' own look:\n * - closed, the demo segment is `basic` and unpadded (Fomantic shows the live markup bare)\n * - open, it's `attached=\"top\"` and the code pane `attached=\"bottom\"`\n * (Fomantic's `.html.segment` + `.instructive.bottom.attached.segment`)\n * - `bare`: never framed\n * - Public tokens (`--ui-example-*`) are never declared: each is read through a private alias\n * (`notes/theming.md` \"Component tokens\").\n * - EXCEPT the three the `tools` row hands down to the buttons slotted in it (`--ui-example-tool-*`):\n * they're for the page to read, never to set.\n */\n\n@layer ui.components.example.types, ui.components.example.content, ui.components.example.variations, ui.components.example.states;\n\n/* Breakpoints (`@custom-media`), inlined at build time: phones. */\n@import \"../../styles/media.css\";\n\n@layer ui.components.example.types {\n :host {\n display: block;\n }\n\n /* Tokens: Fomantic's docs measures. */\n .ui.example {\n /* Space above and below the block. */\n --_ui-example-margin: var(--ui-example-margin, 1.25em 0);\n /* Widest the description runs: Fomantic's 700px. */\n --_ui-example-description-width: var(--ui-example-description-width, 50em);\n /* Colour of the description text. */\n --_ui-example-description-color: var(--ui-example-description-color, var(--ui-text-color));\n /* Opacity of the code button at rest: whole, so it stands out on the frame (Fomantic dimmed it to 0.5) */\n --_ui-example-toggle-opacity: var(--ui-example-toggle-opacity, 1);\n /* The code button's fill: whiter than the frame, so it stands out on it */\n --_ui-example-toggle-background: var(\n --ui-example-toggle-background,\n light-dark(oklch(1 0 0 / 0.95), color-mix(in oklab, var(--ui-surface-strong) 90%, transparent))\n );\n /*\n * Space from the frame's top and right edges to the code button, the same both ways:\n * about what centres it beside one line of text.\n */\n --_ui-example-toggle-inset: var(--ui-example-toggle-inset, 0.8em);\n /* A framed example's code button: in from its frame's top and right edges, just inside its rim. */\n --_ui-example-toggle-corner: var(--ui-example-toggle-corner, 6px);\n /* The code button's width and height: one at every size */\n --_ui-example-toggle-size: var(--ui-example-toggle-size, 28px);\n /* Space between the buttons of the `tools` row, and from it to the code button */\n --_ui-example-tools-gap: var(--ui-example-tools-gap, 4px);\n /* Space between the header, description and example. */\n --_ui-example-gap: var(--ui-example-gap, 0.5em);\n /* The frame round an example: a faint see-through card, so it never runs into the prose round it. */\n --_ui-example-frame-background: var(\n --ui-example-frame-background,\n color-mix(in oklab, var(--ui-surface) 45%, transparent)\n );\n --_ui-example-frame-border: var(\n --ui-example-frame-border,\n var(--ui-border-width, 1px) solid var(--ui-border-color)\n );\n --_ui-example-frame-radius: var(--ui-example-frame-radius, var(--ui-radius-l, 0.75em));\n --_ui-example-frame-padding: var(--ui-example-frame-padding, 0.75em 1em);\n --_ui-example-frame-shadow: var(--ui-example-frame-shadow, var(--ui-shadow-subtle, none));\n /* What the frame does to what's behind it: a theme's glass (`backdrop-filter`) */\n --_ui-example-frame-filter: var(--ui-example-frame-filter, none);\n /* The live demo while the code shows: a very light tint, so its edge reads (pure white read as a missing border) */\n --_ui-example-demo-background: var(\n --ui-example-demo-background,\n color-mix(in oklab, var(--ui-surface) 60%, transparent)\n );\n }\n\n .ui.example {\n display: block;\n position: relative;\n margin: var(--_ui-example-margin);\n }\n :host(:first-child) > .ui.example {\n margin-top: 0;\n }\n :host(:last-child) > .ui.example {\n margin-bottom: 0;\n }\n}\n\n@layer ui.components.example.content {\n /* Header row: the title, on the page above the frame. */\n .heading {\n display: flex;\n align-items: center;\n gap: var(--_ui-example-gap);\n margin-bottom: var(--_ui-example-gap);\n }\n .heading > [part~=\"header\"] {\n flex: 1 1 auto;\n --ui-header-margin-top: 0;\n --ui-header-margin-bottom: 0;\n }\n\n /*\n * The frame's box, and the code button over its top right corner:\n * - the same inset from the top and the right edge in every case\n * - a whiter fill than the frame, so it stands out on it\n * - over the example, so there's no empty space above the example inside the frame\n * (Owen, 2026-10-23: \"overlay show code over the example, so no whitespace above the example inside the frame\")\n */\n /*\n * - a box an example shows inside the frame (an inverted segment, a card, a message) rounds less than the frame:\n * its corner the frame's, less the frame's padding, at least the theme's small radius\n * (Owen: \"rounding of outer rings needs to be greater than rounding of inner bits\");\n * it had the frame's own corner, as round as the ring round it\n */\n .frame {\n /* the code button's corner: following the frame's corner it sits in, less its inset */\n --_example-toggle-radius: max(4px, calc(var(--_ui-example-frame-radius) - var(--_ui-example-toggle-corner)));\n --_example-inner-radius: max(var(--ui-radius-s), calc(var(--_ui-example-frame-radius) - 16px));\n --ui-segment-radius: var(--_example-inner-radius);\n --ui-card-radius: var(--_example-inner-radius);\n --ui-message-radius: var(--_example-inner-radius);\n position: relative;\n }\n .frame > [part~=\"toggle\"] {\n position: absolute;\n /* in a frame too short for that inset, centred top to bottom instead (the button is about 1.35em tall) */\n inset-block-start: min(calc(50% - 0.675em), var(--_ui-example-toggle-inset));\n inset-inline-end: var(--_ui-example-toggle-inset);\n /* over the demo, which is over the code */\n z-index: 2;\n margin: 0;\n opacity: var(--_ui-example-toggle-opacity);\n transition: opacity 0.3s ease-out;\n }\n .frame > [part~=\"toggle\"]::part(button) {\n /* one width at every size, so the code's copy button can sit centred under it */\n box-sizing: border-box;\n width: var(--_ui-example-toggle-size);\n /* round at every size: a theme with short tiny buttons drew it as a pill (the notebook page's, 20px tall) */\n min-height: var(--_ui-example-toggle-size);\n min-width: 0;\n padding-inline: 0;\n justify-content: center;\n margin: 0;\n /* a rounded square following the frame's corner it sits in, less its inset: never rounder than the frame */\n border-radius: var(--_example-toggle-radius);\n background: var(--_ui-example-toggle-background);\n box-shadow:\n 0 0 0 1px var(--ui-border-color),\n var(--ui-shadow-subtle, 0 0 #0000);\n }\n /*\n * a framed example's button sits INSIDE the frame's top right corner, just inside its rim, over the example: the example\n * takes no room for it (Owen, 2026-10-25: \"Move this back into the INSIDE upper-right corner of the box, position\n * absolute. just inside the white border around the panel\"; centred on the corner, before)\n */\n .ui.example:not(.bare) > .frame > [part~=\"toggle\"] {\n inset-block-start: var(--_ui-example-toggle-corner);\n inset-inline-end: var(--_ui-example-toggle-corner);\n }\n .frame > [part~=\"toggle\"]:hover,\n .frame > [part~=\"toggle\"]:focus-within,\n :host(:state(open)) .frame > [part~=\"toggle\"] {\n opacity: 1;\n }\n\n /*\n * The page's own buttons (the `tools` slot): a row just left of the code button, level with it, as far from it as\n * from each other.\n * - Slotted, so this sheet can't reach their boxes: the code button's look is handed to them as tokens,\n * `--ui-example-tool-size`, `-radius`, `-background`, for the page's `::part(button)` rule to read.\n * - When they show is the page's to say.\n */\n .frame > [part~=\"tools\"] {\n --ui-example-tool-size: var(--_ui-example-toggle-size);\n --ui-example-tool-radius: var(--_example-toggle-radius);\n --ui-example-tool-background: var(--_ui-example-toggle-background);\n position: absolute;\n inset-block-start: min(calc(50% - 0.675em), var(--_ui-example-toggle-inset));\n inset-inline-end: calc(\n var(--_ui-example-toggle-inset) + var(--_ui-example-toggle-size) + var(--_ui-example-tools-gap)\n );\n z-index: 2;\n display: flex;\n align-items: center;\n gap: var(--_ui-example-tools-gap);\n }\n .ui.example:not(.bare) > .frame > [part~=\"tools\"] {\n inset-block-start: var(--_ui-example-toggle-corner);\n inset-inline-end: calc(\n var(--_ui-example-toggle-corner) + var(--_ui-example-toggle-size) + var(--_ui-example-tools-gap)\n );\n }\n\n .description {\n max-width: var(--_ui-example-description-width);\n margin: 0 0 var(--_ui-example-gap);\n color: var(--_ui-example-description-color);\n line-height: 1.4285em;\n }\n .description code {\n font-family: var(--ui-font-family-mono, monospace);\n font-size: 0.9em;\n }\n /* A link in the `description` attribute (`[words](link)`): the page's link colour. */\n .description a {\n color: var(--ui-link);\n }\n /* Description markup slotted after the attribute's sentence (a message): a little room between. */\n :host([description]) .description ::slotted(*) {\n margin-block-start: 0.5em;\n }\n\n [part~=\"demo\"],\n [part~=\"code\"] {\n display: block;\n }\n /*\n * Closed (or bare), the demo is unframed and unpadded: the live markup sits on the page as written.\n * On the segment's own box, NOT through `--ui-segment-padding`:\n * that token would inherit into every segment the example shows.\n */\n :host(:not(:state(code-shown))) [part~=\"demo\"]::part(segment),\n .ui.bare.example [part~=\"demo\"]::part(segment) {\n padding: 0;\n }\n /* Floated example content stays inside the frame (Fomantic's `.example` clears its floats too). */\n [part~=\"demo\"]::part(segment) {\n display: flow-root;\n }\n\n /*\n * THE FRAME: every example but a `bare` one sits in a faint card, open or not,\n * so it never bleeds into the text round it (Owen, 2026-10-23: \"Example panes bleed into the text, need some framing\")\n * - a hairline, rounded, a little padding, the theme's glass behind it (fruity's blur)\n * - round the example and its code only: its header and description stay on the page above it\n * - closed, the demo starts at the frame's top padding, the code button over its corner\n * - open: the demo a very light tint, no box of its own; the code under it plain, with no frame of its own\n * (\"Don't need secondary frame around the HTML inside panel ... just visual noise\")\n * - the segments' look is set on their boxes (`::part(segment)`), NOT through `--ui-segment-*` tokens:\n * those would inherit into every segment the example shows\n */\n .ui.example:not(.bare) > .frame {\n padding: var(--_ui-example-frame-padding);\n border: var(--_ui-example-frame-border);\n border-radius: var(--_ui-example-frame-radius);\n background: var(--_ui-example-frame-background);\n box-shadow: var(--_ui-example-frame-shadow);\n backdrop-filter: var(--_ui-example-frame-filter);\n }\n /* the demo flush with the frame's padding, open or closed: as much room above it as below */\n .ui.example:not(.bare) [part~=\"demo\"]::part(segment) {\n margin: 0;\n }\n /*\n * The frame is the glass: the demo and the code inside it blur nothing again.\n * - A theme's segment glass did, a shade off the frame round it\n * (Owen, 2026-10-23: \"Lose whatever is causing background color shift under code\").\n */\n .ui.example:not(.bare) :is([part~=\"demo\"], [part~=\"code\"])::part(segment) {\n backdrop-filter: none;\n }\n /*\n * OPEN: the code is a panel behind the example, rolling open from under it\n * (Owen, 2026-10-23: \"show it like it is a panel behind the example which rolls open from the top\")\n * - ONE card: the demo its top band, out to the frame's edges, as it sits closed; the code under it, edge to edge\n * (NOT the demo boxed inside the frame: tried first, and turned down)\n * - the demo over the code, casting its shadow down onto it\n * - the code a shade deeper, rolling open from under the demo, and closed again\n * (its height from 0 and back; at once where the browser can't ease to `auto`)\n * - the code's long lines scroll sideways, never cut off\n * - closing, the card keeps this look (`:state(code-shown)`) until the code has rolled away\n * - the code button pressed in\n */\n :host(:state(code-shown)) .ui.example:not(.bare) > .frame {\n padding: 0;\n }\n :host(:state(code-shown)) .ui.example:not(.bare) [part~=\"demo\"]::part(segment) {\n position: relative;\n z-index: 1;\n margin: 0;\n padding: var(--_ui-example-frame-padding);\n border: none;\n /* its bottom corners round, the frame's: a card over the code\n (Owen, 2026-10-23: \"The example should keep its rounding on the bottom when opened\") */\n /* its top corners the frame's, inside its hairline: the frame doesn't clip, so the code button can stand over its edge */\n border-radius: calc(var(--_ui-example-frame-radius) - 1px) calc(var(--_ui-example-frame-radius) - 1px)\n var(--_ui-example-frame-radius) var(--_ui-example-frame-radius);\n background: var(--_ui-example-demo-background);\n box-shadow:\n 0 1px 0 var(--ui-border-color),\n 0 6px 12px -8px oklch(0 0 0 / 0.25);\n }\n .ui.example:not(.bare) [part~=\"code\"]::part(segment) {\n box-sizing: border-box;\n height: auto;\n margin: 0;\n /* little below the last line (Owen, 2026-10-23: \"less padding below\") */\n padding: 0.5em var(--_ui-example-code-inline) 0.125em;\n overflow-x: auto;\n overflow-y: hidden;\n border: none;\n /* its bottom corners the frame's, inside its hairline */\n border-radius: 0 0 calc(var(--_ui-example-frame-radius) - 1px) calc(var(--_ui-example-frame-radius) - 1px);\n background: color-mix(in oklab, var(--ui-text-color) 3%, transparent);\n box-shadow: none;\n interpolate-size: allow-keywords;\n transition:\n height 0.26s var(--ui-ease-out, ease-out),\n padding-block 0.26s var(--ui-ease-out, ease-out);\n }\n .ui.example {\n /* the code's side padding: the frame's, so its text starts under the demo's */\n --_ui-example-code-inline: 1em;\n }\n @starting-style {\n .ui.example:not(.bare) [part~=\"code\"]::part(segment) {\n height: 0;\n }\n }\n /* open from the start: shown at once, no roll (a page drawing the example again, its code open) */\n :host(:state(open-at-start)) .ui.example:not(.bare) [part~=\"code\"]::part(segment) {\n transition: none;\n }\n /* rolling closed: still drawn (`:state(code-shown)`) while its height eases back to 0 */\n :host(:not(:state(open))) .ui.example:not(.bare) [part~=\"code\"]::part(segment) {\n height: 0;\n padding-block: 0;\n }\n /*\n * the code button while its pane is open: pressed IN, a deeper fill than at rest, on any frame's glass\n * (a 6% tint didn't show on a dark theme's glass; epic `notebook` P9)\n */\n :host(:state(open)) .frame > [part~=\"toggle\"]::part(button) {\n background: color-mix(in oklab, var(--ui-text-color) 18%, var(--_ui-example-toggle-background));\n box-shadow:\n inset 0 1px 2px oklch(0 0 0 / 0.18),\n 0 0 0 1px var(--ui-border-color);\n }\n .ui.example:not(.bare) [part~=\"source\"] {\n --ui-code-border: none;\n --ui-code-background: transparent;\n /* room on the right for the copy icon, which sits over the first line */\n --ui-code-padding: 0.5em 2.5em 0.5em 0;\n }\n\n /*\n * The code's copy button (`<ui-code>`'s icon): centred under the code button, the same width (28px) and right edge\n * - the code's box ends the frame's padding in from the frame's edge; the button, its inset\n * - so 1px further out (measured)\n */\n [part~=\"source\"]::part(copy) {\n inset-block-start: 0;\n inset-inline-end: -1px;\n width: 28px;\n height: 28px;\n border-radius: 6px;\n color: var(--ui-text-muted);\n /* its icon 15px, whatever the code's size */\n font-size: 15px;\n }\n /* Phones: an example wider than the column scrolls inside its frame, never the page. */\n @media (--ui-mobile) {\n [part~=\"demo\"]::part(segment) {\n overflow-x: auto;\n }\n /*\n * ... but not for a few px: a little padding, out into the frame's own, takes them in.\n * - An example drawn a pixel or two past its box scrolled sideways for nothing\n * (a fluid tabular menu is 2px wider, so its tabs' borders meet).\n */\n :host(:not(:state(code-shown))) .ui.example:not(.bare) [part~=\"demo\"]::part(segment) {\n margin-inline: -8px;\n padding-inline: 8px;\n }\n }\n}\n\n@layer ui.components.example.variations {\n /* Variation: a run of small examples under one heading. */\n .ui.variation.example {\n --_ui-example-margin: var(--ui-example-margin, 1em 0);\n --_ui-example-gap: var(--ui-example-gap, 0.5em);\n }\n /* Bare: the code pane stands apart, below the example. */\n .ui.bare.example [part~=\"code\"] {\n margin-top: var(--_ui-example-gap);\n }\n}\n","import { Show } from \"solid-js\"\nimport { isServer, type JSX } from \"@solidjs/web\"\n\nimport { E, UIT } from \"spell/ui/core\"\nimport { ExampleSource } from \"./ExampleSource\"\nimport { exampleVocabulary } from \"./UIExample.en\"\n\nimport exampleCSS from \"./UIExample.css?inline\"\n\n/****************\n * ### `UIExample`\n * The component behind `<ui-example>`, a live example: Fomantic's docs example block.\n * A heading and description, its own children LIVE, and their source in a code pane the code button shows and hides.\n * - The docs site's `<ui-example>` until epic `ui-gaps` P14 made it a component: any page may show one,\n * the guides too.\n *\n * - Its shadow DOM: `<section class=\"ui [bare] [variation] example\" part=\"example\">` holding\n * - the heading row (`<ui-header>`), when there's a `heading`; then the description\n * - both on the page, outside the frame (Owen, 2026-10-23: \"Text for the example should be OUTSIDE the ring\")\n * - `<div class=\"frame\">`:\n * - the code `<ui-button part=\"toggle\">`, over the frame's top right corner\n * - just left of it, the `tools` slot's buttons, in a row (`part=\"tools\"`): the page's own, in its look\n * - `<ui-segment part=\"demo\">` around the default slot (the live example: the element's own children)\n * - while `code` is on, `<ui-segment part=\"code\">`, with the markup in a `<ui-code>`;\n * or what the `source` slot holds instead (an editor: spell-app's notebook examples)\n * - The markup shown is read ONCE, on first connect (`ExampleSource.of()`):\n * - a `<template>` child\n * - else the page snapshot the site entry took before any family loaded\n * - else the live children minus runtime attributes\n * - see `ExampleSource` for why, and its limits\n * - A `<template>` child is also stamped out live, once, right after it\n * (on a microtask: never inside this render, so the stamped elements upgrade under their own owners).\n * - `code` is the open state (auto-controlled, reflected):\n * the button flips it and fires `ui-opened` / `ui-closed` (`{ open }`); `:state(open)` follows it.\n * - Its shadow DOM is built of other families' widgets, which its barrel imports.\n ****************/\nexport class UIExample extends E.UIComponent<typeof exampleVocabulary> {\n // widened, as `UICode`'s is: a subclass (spell-app's `<spell-example>`) brings its own tag\n @E.proto static vocabulary: E.ComponentVocabulary = exampleVocabulary\n @E.protoMerged static elementSetup = {\n styleSheets: { example: exampleCSS },\n delegatesFocus: false\n } satisfies Partial<E.ElementSetup>\n\n /** The markup to show, read once before anything here touches the light DOM. */\n readonly sourceMarkup: string = isServer ? \"\" : ExampleSource.of(this.domElement)\n\n /** Which slots have content: the description shows only when there is one. */\n readonly slots = new E.SlotContent(this.domElement)\n\n constructor(...args: ConstructorParameters<typeof E.UIComponent>) {\n super(...args)\n // after `sourceMarkup` is read: the fields initialize first\n if (!isServer) this.stamp()\n }\n\n ////////////////\n // ## The code pane\n ////////////////\n\n /** `code`: the code pane is open. */\n @E.cssState(\"open\")\n @E.controlled(\"code\")\n accessor isCodeOpen = false\n\n /**\n * The code pane is drawn: open, or still rolling closed.\n * - The open card's look stays until it has rolled away\n * (Owen, 2026-10-23: \"code examples need to roll closed as well\").\n */\n @E.cssState(\"code-shown\")\n @E.state\n accessor isCodeShown = false\n\n /**\n * The code was open from the start (`code` in markup, or a page drawing the example again, open):\n * it shows at once, without rolling open; the code button rolls it from then on.\n */\n @E.cssState(\"open-at-start\")\n @E.state\n accessor isOpenAtStart = this.isCodeOpen\n\n /** Drawn at once as it opens; as it closes, once its roll (`CLOSE_SECONDS`) is done, unless it opened again. */\n @E.onChange(\"isCodeOpen\")\n protected onCodeOpenChanged(isOpen: boolean) {\n this.closingTimer?.cancel()\n if (isOpen) this.isCodeShown = true\n else if (this.isCodeShown) this.closingTimer = E.after(CLOSE_SECONDS, () => (this.isCodeShown = false))\n }\n\n /** The wait for the code to finish rolling closed (`onCodeOpenChanged()`). */\n private closingTimer?: E.CancelablePromise<unknown>\n\n /**\n * The code pane, open as `code` (`isCodeOpen`): `ui-opened` / `ui-closed` as the code button opens or closes it;\n * the button's `aria-expanded`.\n */\n readonly disclosure = new E.Disclosure({ component: this, member: \"isCodeOpen\" })\n\n /** Open or close the code pane, as the viewer did with `event`: then `ui-opened` / `ui-closed`. */\n toggle(event?: Event): void {\n this.isOpenAtStart = false\n if (this.disclosure.toggle(event)) this.disclosure.sendAfter(this.isCodeOpen, event)\n }\n\n /** The code button's name: what a click does. */\n private get toggleLabel(): string {\n return this.isCodeOpen ? this.translationForKey(\"hideCode\") : this.translationForKey(\"showCode\")\n }\n\n /** The live example sits in a frame: the code is shown (open, or rolling closed) and the example isn't `bare`. */\n private get demoIsFramed(): boolean {\n return this.isCodeShown && !this.bare\n }\n\n ////////////////\n // ## The example\n ////////////////\n\n /**\n * The `description` attribute as text: each backticked span a `<code>`, each `[words](link)` a link\n * (epic `elemental-spell` P26: a page's description paragraph, written as one attribute).\n */\n private get descriptionWithCode(): (string | JSX.Element)[] {\n const text = this.description ?? \"\"\n return text.split(UIT.CODE_SPAN).flatMap((piece, index) => {\n if (index % 2) return [<code>{piece}</code>]\n // text, then each link's words, its address and the text after it\n const parts = piece.split(LINK)\n const drawn: (string | JSX.Element)[] = []\n for (let at = 0; at < parts.length; at += 3) {\n if (parts[at]) drawn.push(parts[at]!)\n if (at + 2 < parts.length) drawn.push(<a href={parts[at + 2]}>{parts[at + 1]}</a>)\n }\n return drawn\n })\n }\n\n /**\n * Stamp a `<template>` child's content out right after it, once, if there is one.\n * - On a microtask: this runs while the element renders, and the new elements must upgrade outside it.\n */\n private stamp() {\n const template = ExampleSource.template(this.domElement)\n if (template) E.afterSolidUpdate(() => template.after(template.content.cloneNode(true)))\n }\n\n ////////////////\n // ## Rendering\n ////////////////\n\n render(): JSX.Element {\n return (\n <section class={this.rootClass} part={this.partForName(\"example\")}>\n <Show when={this.heading}>\n <div class={HEADING_CLASS}>\n <ui-header\n part={this.partForName(\"header\")}\n level={UIT.HeadingLevels.attributeFor(UIT.HeadingLevels.levelFor(this.level, LEVELS))}\n size={this.variation ? \"small\" : undefined}\n >\n {this.heading}\n </ui-header>\n </div>\n </Show>\n <Show when={this.description || this.slots.hasContent(this.slotForName(\"description\"))}>\n <div class={UIT.DESCRIPTION} part={this.partForName(\"description\")}>\n {/* the attribute's sentence, then any richer description markup slotted beside it (a message) */}\n {this.descriptionWithCode}\n <slot name={this.slotForName(\"description\")} />\n </div>\n </Show>\n <div class={FRAME_CLASS}>\n {/* before the code button: the Tab order follows the row, left to right */}\n <div class={TOOLS_CLASS} part={this.partForName(\"tools\")}>\n <slot name={this.slotForName(\"tools\")} />\n </div>\n <ui-button\n part={this.partForName(\"toggle\")}\n icon={CODE_ICON}\n size={this.variation ? \"mini\" : \"tiny\"}\n aria-label={this.toggleLabel}\n title={this.toggleLabel}\n aria-expanded={this.disclosure.ariaExpanded}\n aria-controls={CODE_PANE_ID}\n ref={(button: HTMLElement) => button.addEventListener(\"click\", (event) => this.toggle(event))}\n appearance=\"circular basic\"\n />\n <ui-segment\n part={this.partForName(\"demo\")}\n appearance={this.demoIsFramed ? undefined : \"basic\"}\n attach={this.demoIsFramed ? UIT.TOP : undefined}\n >\n <slot />\n </ui-segment>\n <Show when={this.isCodeShown}>\n <ui-segment\n id={CODE_PANE_ID}\n part={this.partForName(\"code\")}\n attach={this.bare ? undefined : UIT.BOTTOM}\n appearance=\"secondary\"\n >\n <slot name={this.slotForName(\"source\")}>\n <ui-code\n part={this.partForName(\"source\")}\n language={this.language || DEFAULT_LANGUAGE}\n copy=\"\"\n content={this.sourceMarkup}\n />\n </slot>\n </ui-segment>\n </Show>\n </div>\n </section>\n )\n }\n}\n\n/** The vocabulary getters, typed (`UIComponent`'s doc). */\nexport interface UIExample extends E.AttributeValues<typeof exampleVocabulary> {}\n\n/** Class word of the heading row: the title. */\nconst HEADING_CLASS = \"heading\"\n\n/** How long the code takes to roll closed, s: `UIExample.css`'s transition (0.26s), and a little more. */\nconst CLOSE_SECONDS = 0.3\n\n/** Class word of the frame: the live example, the code pane, and the code button over their top right corner. */\nconst FRAME_CLASS = \"frame\"\n\n/** Class word of the row of the page's own buttons (the `tools` slot), just left of the code button. */\nconst TOOLS_CLASS = \"tools\"\n\n/** The icon of the code button: Fomantic's `code` icon. */\nconst CODE_ICON = \"code\"\n\n/** `language` when unset (the vocabulary's default): the source is markup. */\nconst DEFAULT_LANGUAGE = \"html\"\n\n/** A Markdown link in `description`: `[the words](where)`, its words and its address. */\nconst LINK = /\\[([^\\]]+)\\]\\(([^)\\s]+)\\)/\n\n/** Id of the code pane inside the shadow root, for the button's `aria-controls`. */\nconst CODE_PANE_ID = \"code\"\n\n/** `level`: any heading level; unset, `4`: Fomantic's examples are `h4`. */\nconst LEVELS: UIT.HeadingBounds = { min: 1, max: 6, fallback: 4 }\n","/**\n * The example family: defines `<ui-example>` and exports its component, `UIExample`,\n * and its helpers (`ExampleSource`, `HtmlFormatter`).\n * - The docs site's `<ui-example>` until epic `ui-gaps` P14 made it a component:\n * a lib entry, in the component list, loaded by any `<ui-root>`, so the guides show examples too.\n * - SIDE EFFECT: importing it defines the tag, and the widgets its shadow DOM is built of:\n * `<ui-segment>`, `<ui-header>` (`ui-parts`), `<ui-button>`, `<ui-code>`.\n * A `<ui-root>` only loads what's in the page's light DOM, so a family that is built of other widgets\n * imports them itself.\n * - A page that only keeps the examples' markup before they upgrade (the site's first import) imports\n * `ExampleSource` by its file, `spell/ui/components/ui-example/ExampleSource`: this barrel would define the tag too.\n */\n\nimport { UIExample } from \"./UIExample\"\nimport { ExampleSource } from \"./ExampleSource\"\nimport { HtmlFormatter } from \"./HtmlFormatter\"\n\nimport \"spell/ui/components/ui-segment\"\nimport \"spell/ui/components/ui-parts\"\nimport \"spell/ui/components/ui-button\"\nimport \"spell/ui/components/ui-code\"\n\nUIExample.define()\n\nexport { UIExample, ExampleSource, HtmlFormatter }\n"],"mappings":";;;;;;;;;AAgBA,IAAa+D,IAAb,MAAa,cAAc;CAEzB;CAGA;CAEA,YAAY,EAAE,WAAQ,KAAK,YAAS,SAA6B,CAAC,GAAG;EAEnE,AADA,KAAK,QAAQC,GACb,KAAK,SAASC;CAChB;CAGA,OAAO,GAAsB;EAC3B,IAAMC,IAAO,KAAK,MAAMC,CAAI;EAC5B,OAAO,KAAK,cAAcD,EAAK,UAAU,CAAC,CAAC,CAAC,KAAK,IAAI,CAAC,CAAC,KAAK;CAC9D;CAOA,MAAc,GAA+B;EAC3C,IAAMA,IAAwB;GAAE,MAAM;GAAW,KAAK;GAAS,MAAM;GAAI,UAAU,CAAC;EAAE,GAChFE,IAA2B,CAACF,CAAI,GAClCG,IAAO;EACX,EAAM,YAAY;EAClB,KAAK,IAAIC,IAAQC,EAAM,KAAKJ,CAAI,GAAGG,GAAO,IAAQC,EAAM,KAAKJ,CAAI,GAAG;GAClE,IAAMK,IAASJ,EAAM,GAAG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AGdC,KAAc,SAGdX,KAAY,QAGZO,IAAmB,QAGnBxC,KAAO,6BAGPkC,IAAe,QAGfT,KAA4B;CAAE,KAAK;CAAG,KAAK;CAAG,UAAU;AAAE;;;AChOhE4B,EAAU,OAAO"}
|
package/dist/ui-feed.js
CHANGED
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
import "./rolldown-runtime-CYGlBXrH.js";
|
|
2
|
-
import { A as e, Bt as t,
|
|
2
|
+
import { A as e, Bt as t, Ht as n, I as r, IconGlyph as i, Lt as a, PartContext as o, Rt as s, SlotContent as c, UIComponent as l, Ut as u, aria as d, proto as f, protoMerged as p, zt as m } from "./core.js";
|
|
3
3
|
import "./ui-parts.js";
|
|
4
4
|
import { Show as h } from "solid-js";
|
|
5
5
|
import { Dynamic as g, className as _, createComponent as v, effect as y, getOwner as b, insert as x, readShallow as S, setAttribute as C, template as w } from "@solidjs/web";
|
|
6
6
|
//#region src/components/ui-feed/UIFeed.en.ts
|
|
7
7
|
var T = {
|
|
8
8
|
tag: "ui-feed",
|
|
9
|
+
icon: "rss",
|
|
9
10
|
topics: [
|
|
10
11
|
"social",
|
|
11
12
|
"lists",
|
|
@@ -97,7 +98,7 @@ var T = {
|
|
|
97
98
|
"extra",
|
|
98
99
|
"author"
|
|
99
100
|
]
|
|
100
|
-
}, E = "@layer ui.components.feed.types{:host{display:contents}.ui.feed,:host(:not(:state(in-feed))){--_ui-feed-margin:var(--ui-feed-margin,1em);--_ui-feed-event-padding:var(--ui-feed-event-padding,.21428em);--_ui-feed-label-width:var(--ui-feed-label-width,2.5em);--_ui-feed-icon-size:var(--ui-feed-icon-size,1.5em);--_ui-feed-icon-padding:var(--ui-feed-icon-padding,.25em);--_ui-feed-icon-color:var(--ui-feed-icon-color,var(--ui-text-muted));--_ui-feed-label-radius:var(--ui-feed-label-radius,var(--ui-radius-circle));--_ui-feed-number-background:var(--ui-feed-number-background,var(--ui-text-light));--_ui-feed-number-color:var(--ui-feed-number-color,var(--ui-ink-on-dark));--_ui-feed-number-border:var(--ui-feed-number-border,2px);--_ui-feed-connected-width:var(--ui-feed-connected-width,2px);--_ui-feed-connected-color:var(--ui-feed-connected-color,var(--ui-border-color));--_ui-feed-divided-border:var(--ui-feed-divided-border,var(--ui-border-width) solid var(--ui-border-color));--_ui-feed-disabled-opacity:var(--ui-feed-disabled-opacity,var(--ui-disabled-opacity))}.ui.feed{--_feed-connected:0;--_feed-ordered:0;--_feed-divided:0;--_feed-basic:0;--ui-inverted:0;box-sizing:border-box;margin:var(--_feed-margin-top,var(--_ui-feed-margin)) 0 var(--_feed-margin-bottom,var(--_ui-feed-margin));color:var(--ui-text-color);font-size:calc(var(--ui-font-size) * var(--ui-scale,1));padding:0;list-style:none;display:block}.ui.feed:first-child{--_feed-margin-top:0}.ui.feed:last-child{--_feed-margin-bottom:0}:host(:not(:first-child))>.ui.feed{--_feed-margin-top:initial}:host(:not(:last-child))>.ui.feed{--_feed-margin-bottom:initial}.ui.feed>slot{--ui-scale:initial}:host>.event,.ui.feed>.event{--_ui-event-label:0;box-sizing:border-box;width:100%;padding:var(--_ui-feed-event-padding) 0;background:0 0;flex-direction:row;margin:0;display:flex;position:relative}:host>.event:has(>.label),.ui.feed>.event:has(>.label){--_ui-event-label:1}:host(:first-child)>.event,.ui.feed>.event:first-child{padding-top:0}:host(:last-child)>.event,.ui.feed>.event:last-child{padding-bottom:0}.event>slot{--ui-color:initial;--ui-color-text:initial;--ui-color-header:initial;--ui-color-border:initial;--ui-color-background:initial;--ui-color-inverted:initial;--ui-color-hover:initial;--ui-color-focus:initial;--ui-color-down:initial;--ui-color-active:initial;--ui-color-on:initial;--ui-color-inverted-on:initial}}@layer ui.components.feed.content{:host>.event>.label,.ui.feed>.event>.label{--_ui-icon-owner-size:var(--_ui-feed-icon-size);--_ui-icon-owner-margin:0;--_ui-icon-owner-display:flex;--_ui-icon-owner-align:middle;width:var(--_ui-feed-label-width);text-align:start;flex:none;align-self:stretch;height:auto;display:block}:host>.event>.label>img,:host>.event>.label>::slotted(img),.ui.feed>.event>.label img{border-radius:var(--_ui-feed-label-radius);width:100%;height:auto;display:block}:host>.event>.label>.icon,.ui.feed>.event>.label .icon{box-sizing:border-box;width:100%;padding:var(--_ui-feed-icon-padding);font-size:var(--_ui-feed-icon-size);color:var(--_ui-feed-icon-color);opacity:1;justify-content:center;display:flex}:host>.event>.label>.icon>svg,.ui.feed>.event>.label .icon>svg{fill:currentColor;width:auto;height:1em}:host>.event>.label>::slotted(:not(img)){color:var(--_ui-feed-icon-color)}:host>.event>.label[data-text]:before,.ui.feed>.event>.label[data-text]:before,.ui.ordered.feed>.event>.label:before{box-sizing:border-box;height:var(--_ui-feed-label-width);border:var(--_ui-feed-number-border) solid var(--_feed-number-outline,transparent);background:var(--_feed-number-fill,var(--ui-color,var(--_ui-feed-number-background)));color:var(--_feed-number-ink,var(--ui-color-on,var(--_ui-feed-number-color)));text-align:center;border-radius:50%;margin-bottom:.3em;padding-top:.6em;line-height:1;display:block;position:relative}.ui.feed>.event>.content a{cursor:pointer}.ui.feed .right.floated{float:right}}@layer ui.components.feed.variations{.ui.connected.feed{--_feed-connected:1}.ui.connected.feed>.event:not(:last-child):before{content:\"\";height:calc(100% - var(--_ui-feed-icon-size));border-left:var(--_ui-feed-connected-width) solid var(--ui-color,var(--_ui-feed-connected-color));position:absolute;top:2.1em;left:1.2em}:host(:not(:last-child))>.event:before{content:var(--_feed-line,none);top:var(--_feed-line-top,2.1em);height:var(--_feed-line-height,calc(100% - var(--_ui-feed-icon-size)));border-left:var(--_ui-feed-connected-width) solid var(--ui-color,var(--_ui-feed-connected-color));position:absolute;left:1.2em}@container style(--_feed-connected:1){:host>.event{--_feed-line:\"\"}:host>.event>.label{position:relative}}.ui.connected.feed>.event>.label{position:relative}.ui.ordered.feed{--_feed-ordered:1;counter-reset:ordered}.ui.ordered.feed>.event>.label:before{content:counter(ordered);counter-increment:ordered}:host>.event>.label:before{box-sizing:border-box;height:var(--_ui-feed-label-width);border:var(--_ui-feed-number-border) solid var(--_feed-number-outline,transparent);background:var(--_feed-number-fill,var(--ui-color,var(--_ui-feed-number-background)));color:var(--_feed-number-ink,var(--ui-color-on,var(--_ui-feed-number-color)));text-align:center;content:var(--_feed-number,none);counter-increment:var(--_feed-number-step,none);border-radius:50%;margin-bottom:.3em;padding-top:.6em;line-height:1;display:block;position:relative}@container style(--_feed-ordered:1){:host>.event>.label{--_feed-number:counter(ordered);--_feed-number-step:ordered}}:host>.event>.label[data-text]:before,.ui.ui.feed>.event>.label[data-text]:before{content:attr(data-text)}.ui.ordered.connected.feed>.event:not(:last-child):before{height:calc(100% - 2.5em);top:2.7em}@container style(--_feed-connected:1) and style(--_feed-ordered:1){:host>.event{--_feed-line-top:2.7em;--_feed-line-height:calc(100% - 2.5em)}}.ui.basic.feed{--_feed-basic:1}.ui.basic.feed>.event>.label:before,.ui.feed>.basic.event>.label:before,:host>.basic.event>.label:before{color:var(--ui-color,inherit);background:0 0;border-color:currentColor}@container style(--_feed-basic:1){:host>.event>.label{--_feed-number-outline:currentColor;--_feed-number-fill:transparent;--_feed-number-ink:var(--ui-color,currentColor)}}.ui.divided.feed{--_feed-divided:1}.ui.divided.feed>.event:not(:first-child){border-top:var(--_ui-feed-divided-border)}@container style(--_feed-divided:1){:host(:not(:first-child))>.event{border-top:var(--_ui-feed-divided-border)}}.ui.inverted.feed{--ui-inverted:1;--ui-scheme:dark;--_ui-feed-number-color:var(--ui-ink-on-light);color-scheme:dark}@container style(--ui-inverted:1){:host(:state(in-feed))>.event{background:var(--ui-surface)}}.ui.inverted.feed>.event{background:var(--ui-surface)}}@layer ui.components.feed.states{.ui.disabled.feed,.ui.feed>.disabled.event,:host>.disabled.event{opacity:var(--_ui-feed-disabled-opacity);pointer-events:none}}", D = /* @__PURE__ */ w("<slot>"), O, k, A, j, M = class _UIFeed extends (A =
|
|
101
|
+
}, E = "@layer ui.components.feed.types{:host{display:contents}.ui.feed,:host(:not(:state(in-feed))){--_ui-feed-margin:var(--ui-feed-margin,1em);--_ui-feed-event-padding:var(--ui-feed-event-padding,.21428em);--_ui-feed-label-width:var(--ui-feed-label-width,2.5em);--_ui-feed-icon-size:var(--ui-feed-icon-size,1.5em);--_ui-feed-icon-padding:var(--ui-feed-icon-padding,.25em);--_ui-feed-icon-color:var(--ui-feed-icon-color,var(--ui-text-muted));--_ui-feed-label-radius:var(--ui-feed-label-radius,var(--ui-radius-circle));--_ui-feed-number-background:var(--ui-feed-number-background,var(--ui-text-light));--_ui-feed-number-color:var(--ui-feed-number-color,var(--ui-ink-on-dark));--_ui-feed-number-border:var(--ui-feed-number-border,2px);--_ui-feed-connected-width:var(--ui-feed-connected-width,2px);--_ui-feed-connected-color:var(--ui-feed-connected-color,var(--ui-border-color));--_ui-feed-divided-border:var(--ui-feed-divided-border,var(--ui-border-width) solid var(--ui-border-color));--_ui-feed-disabled-opacity:var(--ui-feed-disabled-opacity,var(--ui-disabled-opacity))}.ui.feed{--_feed-connected:0;--_feed-ordered:0;--_feed-divided:0;--_feed-basic:0;--ui-inverted:0;box-sizing:border-box;margin:var(--_feed-margin-top,var(--_ui-feed-margin)) 0 var(--_feed-margin-bottom,var(--_ui-feed-margin));color:var(--ui-text-color);font-size:calc(var(--ui-font-size) * var(--ui-scale,1));padding:0;list-style:none;display:block}.ui.feed:first-child{--_feed-margin-top:0}.ui.feed:last-child{--_feed-margin-bottom:0}:host(:not(:first-child))>.ui.feed{--_feed-margin-top:initial}:host(:not(:last-child))>.ui.feed{--_feed-margin-bottom:initial}.ui.feed>slot{--ui-scale:initial}:host>.event,.ui.feed>.event{--_ui-event-label:0;box-sizing:border-box;width:100%;padding:var(--_ui-feed-event-padding) 0;background:0 0;flex-direction:row;margin:0;display:flex;position:relative}:host>.event:has(>.label),.ui.feed>.event:has(>.label){--_ui-event-label:1}:host(:first-child)>.event,.ui.feed>.event:first-child{padding-top:0}:host(:last-child)>.event,.ui.feed>.event:last-child{padding-bottom:0}.event>slot{--ui-color:initial;--ui-color-text:initial;--ui-color-header:initial;--ui-color-border:initial;--ui-color-background:initial;--ui-color-inverted:initial;--ui-color-hover:initial;--ui-color-focus:initial;--ui-color-down:initial;--ui-color-active:initial;--ui-color-on:initial;--ui-color-inverted-on:initial}}@layer ui.components.feed.content{:host>.event>.label,.ui.feed>.event>.label{--_ui-icon-owner-size:var(--_ui-feed-icon-size);--_ui-icon-owner-margin:0;--_ui-icon-owner-display:flex;--_ui-icon-owner-align:middle;width:var(--_ui-feed-label-width);text-align:start;flex:none;align-self:stretch;height:auto;display:block}:host>.event>.label>img,:host>.event>.label>::slotted(img),.ui.feed>.event>.label img{border-radius:var(--_ui-feed-label-radius);width:100%;height:auto;display:block}:host>.event>.label>.icon,.ui.feed>.event>.label .icon{box-sizing:border-box;width:100%;padding:var(--_ui-feed-icon-padding);font-size:var(--_ui-feed-icon-size);color:var(--_ui-feed-icon-color);opacity:1;justify-content:center;display:flex}:host>.event>.label>.icon>svg,.ui.feed>.event>.label .icon>svg{fill:currentColor;width:auto;height:1em}:host>.event>.label>::slotted(:not(img)){color:var(--_ui-feed-icon-color)}:host>.event>.label[data-text]:before,.ui.feed>.event>.label[data-text]:before,.ui.ordered.feed>.event>.label:before{box-sizing:border-box;height:var(--_ui-feed-label-width);border:var(--_ui-feed-number-border) solid var(--_feed-number-outline,transparent);background:var(--_feed-number-fill,var(--ui-color,var(--_ui-feed-number-background)));color:var(--_feed-number-ink,var(--ui-color-on,var(--_ui-feed-number-color)));text-align:center;border-radius:50%;margin-bottom:.3em;padding-top:.6em;line-height:1;display:block;position:relative}.ui.feed>.event>.content a{cursor:pointer}.ui.feed .right.floated{float:right}}@layer ui.components.feed.variations{.ui.connected.feed{--_feed-connected:1}.ui.connected.feed>.event:not(:last-child):before{content:\"\";height:calc(100% - var(--_ui-feed-icon-size));border-left:var(--_ui-feed-connected-width) solid var(--ui-color,var(--_ui-feed-connected-color));position:absolute;top:2.1em;left:1.2em}:host(:not(:last-child))>.event:before{content:var(--_feed-line,none);top:var(--_feed-line-top,2.1em);height:var(--_feed-line-height,calc(100% - var(--_ui-feed-icon-size)));border-left:var(--_ui-feed-connected-width) solid var(--ui-color,var(--_ui-feed-connected-color));position:absolute;left:1.2em}@container style(--_feed-connected:1){:host>.event{--_feed-line:\"\"}:host>.event>.label{position:relative}}.ui.connected.feed>.event>.label{position:relative}.ui.ordered.feed{--_feed-ordered:1;counter-reset:ordered}.ui.ordered.feed>.event>.label:before{content:counter(ordered);counter-increment:ordered}:host>.event>.label:before{box-sizing:border-box;height:var(--_ui-feed-label-width);border:var(--_ui-feed-number-border) solid var(--_feed-number-outline,transparent);background:var(--_feed-number-fill,var(--ui-color,var(--_ui-feed-number-background)));color:var(--_feed-number-ink,var(--ui-color-on,var(--_ui-feed-number-color)));text-align:center;content:var(--_feed-number,none);counter-increment:var(--_feed-number-step,none);border-radius:50%;margin-bottom:.3em;padding-top:.6em;line-height:1;display:block;position:relative}@container style(--_feed-ordered:1){:host>.event>.label{--_feed-number:counter(ordered);--_feed-number-step:ordered}}:host>.event>.label[data-text]:before,.ui.ui.feed>.event>.label[data-text]:before{content:attr(data-text)}.ui.ordered.connected.feed>.event:not(:last-child):before{height:calc(100% - 2.5em);top:2.7em}@container style(--_feed-connected:1) and style(--_feed-ordered:1){:host>.event{--_feed-line-top:2.7em;--_feed-line-height:calc(100% - 2.5em)}}.ui.basic.feed{--_feed-basic:1}.ui.basic.feed>.event>.label:before,.ui.feed>.basic.event>.label:before,:host>.basic.event>.label:before{color:var(--ui-color,inherit);background:0 0;border-color:currentColor}@container style(--_feed-basic:1){:host>.event>.label{--_feed-number-outline:currentColor;--_feed-number-fill:transparent;--_feed-number-ink:var(--ui-color,currentColor)}}.ui.divided.feed{--_feed-divided:1}.ui.divided.feed>.event:not(:first-child){border-top:var(--_ui-feed-divided-border)}@container style(--_feed-divided:1){:host(:not(:first-child))>.event{border-top:var(--_ui-feed-divided-border)}}.ui.inverted.feed{--ui-inverted:1;--ui-scheme:dark;--_ui-feed-number-color:var(--ui-ink-on-light);color-scheme:dark}@container style(--ui-inverted:1){:host(:state(in-feed))>.event{background:var(--ui-surface)}}.ui.inverted.feed>.event{background:var(--ui-surface)}}@layer ui.components.feed.states{.ui.disabled.feed,.ui.feed>.disabled.event,:host>.disabled.event{opacity:var(--_ui-feed-disabled-opacity);pointer-events:none}}", D = /* @__PURE__ */ w("<slot>"), O, k, A, j, M = class _UIFeed extends (A = l, k = [f], O = [p], A) {
|
|
101
102
|
render() {
|
|
102
103
|
let e = this;
|
|
103
104
|
return v(g, {
|
|
@@ -118,12 +119,13 @@ var T = {
|
|
|
118
119
|
});
|
|
119
120
|
}
|
|
120
121
|
};
|
|
121
|
-
j =
|
|
122
|
+
j = m(A), a(j, 13, "vocabulary", k, M), a(j, 13, "elementSetup", O, M), s(j, M), t(M, "UIFeed"), n(M, "vocabulary", u(j, 8, M, T)), u(j, 11, M), n(M, "elementSetup", u(j, 12, M, {
|
|
122
123
|
styleSheets: { feed: E },
|
|
123
124
|
delegatesFocus: !1
|
|
124
|
-
})),
|
|
125
|
+
})), u(j, 15, M);
|
|
125
126
|
var N = M, P = {
|
|
126
127
|
tag: "ui-event",
|
|
128
|
+
icon: "bolt",
|
|
127
129
|
topics: [
|
|
128
130
|
"social",
|
|
129
131
|
"content parts",
|
|
@@ -215,14 +217,14 @@ var N = M, P = {
|
|
|
215
217
|
description: "`disabled`."
|
|
216
218
|
}],
|
|
217
219
|
texts: []
|
|
218
|
-
}, F = /* @__PURE__ */ w("<img alt>"), I = /* @__PURE__ */ w("<span>"), L = /* @__PURE__ */ w("<div><!><slot>"), R = /* @__PURE__ */ w("<div><slot>"), z, B, V, H, U, W = class _UIFeedEvent extends (H =
|
|
220
|
+
}, F = /* @__PURE__ */ w("<img alt>"), I = /* @__PURE__ */ w("<span>"), L = /* @__PURE__ */ w("<div><!><slot>"), R = /* @__PURE__ */ w("<div><slot>"), z, B, V, H, U, W = class _UIFeedEvent extends (H = l, V = [f], B = [p], z = [d("role")], H) {
|
|
219
221
|
constructor() {
|
|
220
|
-
super(...arguments),
|
|
222
|
+
super(...arguments), u(U, 5, this), n(this, "context", new o({
|
|
221
223
|
domElement: this.domElement,
|
|
222
224
|
noun: this.vocabulary.noun
|
|
223
|
-
})),
|
|
225
|
+
})), n(this, "slots", new c(this.domElement)), n(this, "iconGlyph", new i({
|
|
224
226
|
owner: this,
|
|
225
|
-
name: /* @__PURE__ */
|
|
227
|
+
name: /* @__PURE__ */ t(() => this.icon, "name")
|
|
226
228
|
}));
|
|
227
229
|
}
|
|
228
230
|
get feed() {
|
|
@@ -289,11 +291,11 @@ var N = M, P = {
|
|
|
289
291
|
}), n;
|
|
290
292
|
}
|
|
291
293
|
};
|
|
292
|
-
U =
|
|
294
|
+
U = m(H), a(U, 2, "ariaRole", z, W), a(U, 13, "vocabulary", V, W), a(U, 13, "elementSetup", B, W), s(U, W), t(W, "UIFeedEvent"), n(W, "vocabulary", u(U, 8, W, P)), u(U, 11, W), n(W, "elementSetup", u(U, 12, W, {
|
|
293
295
|
styleSheets: { feed: E },
|
|
294
296
|
isAPart: !0,
|
|
295
297
|
delegatesFocus: !1
|
|
296
|
-
})),
|
|
298
|
+
})), u(U, 15, W);
|
|
297
299
|
var G = W;
|
|
298
300
|
N.define(), G.define();
|
|
299
301
|
//#endregion
|