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/hot.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"hot.js","names":["E.ElementDefinition","E.ERRORED_STATE","HotDefinitions","UIComponent","tag","dictionary","domElement","sources","key","source","original","SpellSolid","Class","resolved","ElementDefinition","known","defined","Previous","Next","before","after","definition","TagClass","next","reason","Base","DOMElement","previous","added","name","removed","refused","swapped","message","hot","css","stem","id","refs","found","ref","ERRORED_STATE","values","kept","attribute","runtime","task","previousTexts","text","changed","PackHotSwap","SCRIPTS_EVENT","keeps","paths","event","ComponentPacks","path","results","error","server"],"sources":["../../src/element/HotDefinitions.ts","../src/components/ui-components/PackHotSwap.ts"],"sourcesContent":["/*! Derived from `@solidjs/element` and `component-register`: MIT licence, (c) Ryan Carniato. */\nimport { E } from \"spell/element\"\n\n/****************\n * ### `HotDefinitions`\n * Hot replacement of a set's elements: an edited component re-renders every live element in place,\n * keeping the element objects, their attributes and their property values.\n * - Two users:\n * - `yarn dev`: loaded into every component barrel, before its `define()` calls run,\n * by the kit's Vite plugin (`src/element-tools/HotElements.ts`), which Spell UI's `vite.config.ts` adds\n * - a page that swaps in a REBUILT COMPONENT PACK instead of reloading (epic `epic-engine` I116):\n * Spell UI's `PackHotSwap` installs it as the page's bundle loads, before any pack defines;\n * the pack's `define()` runs again, and only the families whose sources changed are swapped (`keeps`)\n * - Not in the `spell/element` barrel: only the pages and builds that swap pay for it.\n * - SIDE EFFECT:\n * `install()` wraps `UIComponent.define`, and hooks into every DOM element made (`DOMElement.hotReloadHooks`).\n * - Why: `define()` is idempotent per tag, so a barrel re-run by HMR would return the OLD element class.\n * - The wrapper records every tag's class and dictionary.\n * - When a DIFFERENT class of the SAME name defines a known tag (its module was re-evaluated),\n * that class takes over EVERY tag the old one had, the translated aliases (`es-boton`) included.\n * - The platform can't define a tag twice, so each tag's DOM element class STAYS,\n * and what it reads is swapped in place (`redefine()`):\n * its definition, its properties, how it builds its component.\n * - Only when nothing the platform read once at definition changed\n * (observed attributes, DOM API `formAssociated`, the base class, shadow root options);\n * else `update()` reloads the page.\n * - Then the barrel's `import.meta.hot.accept()` calls `update()`,\n * which re-renders every live element of the swapped classes.\n * - Their component-internal state (a query, an open menu) resets; their attributes and properties don't.\n * - Also:\n * - English texts the edit changed reach the page's runtime, Spell UI's `UI.i18n`\n * (`define()` never overwrites a registered text)\n * - `updateStyle()` re-registers a component sheet whose `?inline` CSS changed\n * - NOTE: a vocabulary whose tag was renamed defines the NEW tag; instances of the old one keep the old class.\n * - A changed vocabulary is swapped into the runtime, which re-resolves its translated names from it\n * (Spell UI's `UI.vocabulary.replace()`).\n * - Imports the package through `spell/element`, as a component file does: it's loaded into component barrels,\n * and NOTHING in the package imports it (it's not in the `spell/element` barrel).\n * - STATIC and instance-free on purpose: ONE record of definitions per page, as `customElements` is.\n * - Began as the old `solid-element` package's hot reload, merged into its one user (epic `spell-element`, Q11).\n ****************/\nexport class HotDefinitions {\n /** Wrap `UIComponent.define`, and hook into every DOM element made; idempotent. */\n static install() {\n if (HotDefinitions.original) return\n HotDefinitions.original = E.UIComponent.define\n E.UIComponent.define = function (this: E.UIComponentClass, tag?: string, dictionary?: E.Dictionary) {\n return HotDefinitions.define(this, tag, dictionary)\n }\n E.DOMElement.hotReloadHooks = {\n created: (domElement) => HotDefinitions.track(domElement),\n valueSet: (domElement, key, source) => {\n let sources = HotDefinitions.sources.get(domElement)\n if (!sources) HotDefinitions.sources.set(domElement, (sources = {}))\n sources[key] = source\n }\n }\n }\n\n /** The wrapped `define()`: record, re-define on a new version of a class, else as declared. */\n static define(\n Class: E.UIComponentClass,\n tag?: string,\n dictionary?: E.Dictionary\n ): CustomElementConstructor | undefined {\n const original = HotDefinitions.original!\n // no settings yet: the original waits for them, and runs this again then (`SpellSolid.whenInstalled()`)\n if (!E.SpellSolid.isInstalled) return original.call(Class, tag, dictionary)\n const resolved = new E.ElementDefinition(Class.prototype.vocabulary, { tag, dictionary }).tag\n const known = HotDefinitions.tags.get(resolved)\n if (!known) {\n HotDefinitions.tags.set(resolved, { Class, tag, dictionary })\n return original.call(Class, tag, dictionary)\n }\n const defined = customElements.get(resolved)\n if (!defined || known.Class === Class || known.Class.name !== Class.name)\n return original.call(Class, tag, dictionary)\n // a pack swap keeping this tag's family as it was (its sources didn't change): the live class stays\n if (HotDefinitions.keeps?.(resolved)) return defined\n HotDefinitions.replace(known.Class, Class)\n return defined\n }\n\n /**\n * While a pack is swapped in (`PackHotSwap`): whether a re-run `define()` of tag `tag` KEEPS its live class.\n * - `true`: its family's sources didn't change, so its elements aren't re-rendered\n * - `undefined` (the default, and in `yarn dev`): every new version of a class is swapped in\n */\n static keeps?: (tag: string) => boolean\n\n /** `Next` is a new version of `Previous`: re-define every tag `Previous` had with it (`redefine()`). */\n static replace(Previous: E.UIComponentClass, Next: E.UIComponentClass) {\n HotDefinitions.updateSheets(Previous, Next)\n const before = Previous.prototype.vocabulary\n const after = Next.prototype.vocabulary\n if (before !== after) {\n HotDefinitions.whenRuntime(() => {\n // `register()` refuses a second vocabulary object for a tag:\n // swap the new version in, so the registration below is a no-op and localized names re-resolve\n E.SpellSolid.settings.words.registerVocabulary(after, \"replace\")\n HotDefinitions.updateTexts(before, after)\n })\n }\n for (const known of HotDefinitions.tags.values()) {\n if (known.Class !== Previous) continue\n known.Class = Next\n const definition = new E.ElementDefinition(Next.prototype.vocabulary, known)\n const TagClass = customElements.get(definition.tag) as E.DOMElementClass | undefined\n if (TagClass) HotDefinitions.redefine(TagClass, Next, definition)\n }\n }\n\n /**\n * Swap `TagClass`'s definition, properties and component (`Next`) in place,\n * or record why the platform can't take the change (`update()` then reloads the page).\n * - Each live element's values are carried over (`migrate()`).\n * - NEVER re-renders: `update()` does, once the whole barrel has re-run.\n * - Throws, changing nothing, when a new attribute property would hide a member of the element\n * (as a first definition would).\n */\n static redefine(TagClass: E.DOMElementClass, Next: E.UIComponentClass, definition: E.ElementDefinition) {\n E.UIComponent.register.call(Next, definition)\n const next = E.UIComponent.tagSetupFor(Next, definition)\n const reason = HotDefinitions.changeOf(TagClass, Next.prototype.elementSetup.DOMElement, next)\n if (reason) {\n HotDefinitions.pending.refused.push({ tag: definition.tag, reason })\n return\n }\n // dry run on a stand-in with the same chain: a clash throws BEFORE anything changed\n const Base = Object.getPrototypeOf(TagClass) as E.AnyDOMElementClass\n const Probe = class extends Base {} as unknown as E.DOMElementClass\n Probe.tagSetup = next\n E.DOMElement.defineProperties(Probe)\n const previous = TagClass.tagSetup.elementDefinition\n E.DOMElement.removeProperties(TagClass)\n TagClass.tagSetup = next\n E.DOMElement.defineProperties(TagClass)\n for (const domElement of HotDefinitions.liveElements(TagClass)) {\n HotDefinitions.migrate(domElement, previous, definition)\n }\n HotDefinitions.pending.swapped.add(TagClass)\n }\n\n /**\n * Why `TagClass` can't take `next`, or `undefined` if it can.\n * - All of these are read ONCE,\n * by DOM API `customElements.define()` or by the constructor of elements that already exist.\n */\n static changeOf(TagClass: E.DOMElementClass, Base: E.AnyDOMElementClass, next: E.TagSetup): string | undefined {\n const before = TagClass.observedAttributes\n const after = E.DOMElement.observedAttributesFor(next.elementDefinition)\n const added = after.filter((name) => !before.includes(name))\n const removed = before.filter((name) => !after.includes(name))\n if (added.length || removed.length) {\n const diff = [...added.map((name) => `+${name}`), ...removed.map((name) => `-${name}`)].join(\" \")\n return `observed attributes changed (${diff})`\n }\n if (Object.getPrototypeOf(TagClass) !== Base) return \"DOM element class changed\"\n const formAssociated = !!(TagClass as unknown as { formAssociated?: boolean }).formAssociated\n if (formAssociated !== next.isAFormControl) return \"formAssociated changed\"\n if (JSON.stringify(TagClass.tagSetup.shadowRootInit) !== JSON.stringify(next.shadowRootInit)) {\n return \"shadow root options changed\"\n }\n return undefined\n }\n\n /**\n * Finish a hot update: re-render the live elements of every class swapped since the last call;\n * or, if a re-definition was refused, log it and `hot.invalidate()` (Vite then reloads the page).\n * - The Vite plugin calls it from each barrel's `import.meta.hot.accept()`.\n * - A pack swap calls it with no `hot`: it reloads the page itself on a refusal (`PackHotSwap`).\n */\n static update(hot?: HotContext): HotUpdateResult {\n const refused = HotDefinitions.pending.refused.splice(0)\n const swapped = [...HotDefinitions.pending.swapped]\n HotDefinitions.pending.swapped.clear()\n if (refused.length) {\n const message = refused.map(({ tag, reason }) => `<${tag}>: ${reason}, full reload`).join(\"\\n\")\n E.SpellSolid.settings.warn(\"HotDefinitions\", message)\n hot?.invalidate(message)\n return { reloaded: [], refused }\n }\n for (const TagClass of swapped) {\n for (const domElement of HotDefinitions.liveElements(TagClass)) HotDefinitions.reload(domElement)\n }\n return { reloaded: swapped.map((TagClass) => TagClass.tagSetup.elementDefinition.tag), refused }\n }\n\n /**\n * The style sheets `Next` changed from `Previous`'s, re-registered by name: the elements' shadow roots already\n * adopted them, and the runtime replaces their rules in place (`styles.register()`).\n * - Why: a sheet registers once per name, so a new class's changed text never reached the page (a pack swap)\n */\n private static updateSheets(Previous: E.UIComponentClass, Next: E.UIComponentClass) {\n const before = Previous.prototype.elementSetup.styleSheets ?? {}\n for (const [name, css] of Object.entries(Next.prototype.elementSetup.styleSheets ?? {})) {\n if (before[name] !== css) HotDefinitions.whenRuntime(() => E.SpellSolid.settings.styles.register(name, css))\n }\n }\n\n /**\n * A component sheet's `?inline` CSS changed: re-register it by name (`UIButton.css` => `button`).\n * - The name is the file's, without `UI`, in kebab-case (`UITreeDiagram.css` => `tree-diagram`):\n * elements register their sheets by that bare name (`elementSetup = { styleSheets: { button: buttonCSS } }`).\n * - A second sheet (`UIDimmer.page.css`) or a sheet registered under another name isn't matched:\n * an edit to it shows after a page reload.\n * - The runtime's `styles.register()` replaces the rules of the sheet every shadow root already adopted:\n * no re-render (Spell UI's `Styles.register()`).\n * - Registered even if no element used it yet, so a later `adoptStyleSheets()` finds the new text\n * (Spell UI's `UI.styles.registerOnce()` only registers names that are missing).\n */\n static updateStyle(this: void, id: string, css: string) {\n const stem = /(?:^|\\/)UI([A-Za-z0-9]+)\\.css(?:\\?|$)/.exec(id)?.[1]\n if (!stem) return\n const name = stem.replace(/(?<=.)([A-Z])/g, \"-$1\").toLowerCase()\n HotDefinitions.whenRuntime(() => E.SpellSolid.settings.styles.register(name, css))\n }\n\n ////////////////\n // ## Live elements\n ////////////////\n\n /** Remember `domElement` as a live element of its class; weak, so tracking never keeps an element alive. */\n static track(domElement: E.DOMElement) {\n const TagClass = domElement.constructor as E.DOMElementClass\n let refs = HotDefinitions.live.get(TagClass)\n if (!refs) HotDefinitions.live.set(TagClass, (refs = new Set()))\n refs.add(new WeakRef(domElement))\n }\n\n /** Every element of `TagClass` still in memory, connected or not. */\n static liveElements(TagClass: E.DOMElementClass): E.DOMElement[] {\n const refs = HotDefinitions.live.get(TagClass)\n const found: E.DOMElement[] = []\n for (const ref of refs ?? []) {\n const domElement = ref.deref()\n if (domElement) found.push(domElement)\n else refs!.delete(ref)\n }\n return found\n }\n\n /**\n * Dispose `domElement`'s component and, if connected, build and render its class's CURRENT component.\n * - Kept: the element, its attributes, its property values (`attributeValues`), its shadow root and adopted sheets.\n * - Lost: state inside the component.\n * - Clears DOM API `:state(errored)`, so an element whose render failed recovers with the next good component.\n * - A detached element is only disposed: it renders the current component on its next connect.\n */\n static reload(domElement: E.DOMElement) {\n domElement.dispose()\n domElement.renderRoot.textContent = \"\"\n domElement.setState(E.ERRORED_STATE, false)\n if (domElement.isConnected) domElement.connectedCallback()\n }\n\n /**\n * Carry `domElement`'s values over to the `next` definition.\n * - Last written as a PROPERTY: kept as is (a framework's rich data, a controlled value).\n * - Last written by its ATTRIBUTE: converted again (a vocabulary that learned a value).\n * - Never written: the new starting value.\n * - Attributes the new definition dropped are dropped.\n */\n private static migrate(domElement: E.DOMElement, previous: E.ElementDefinition, next: E.ElementDefinition) {\n const sources = HotDefinitions.sources.get(domElement) ?? {}\n const values = domElement.attributeValues\n const kept: Record<string, unknown> = {}\n for (const attribute of next.attributes) {\n const isKnown = previous.attributes.some(({ key }) => key === attribute.key)\n const source = isKnown ? sources[attribute.key] : undefined\n // shown or hidden: the `hidden` attribute holds it (`DOMElement`, \"Shown or hidden\")\n if (attribute.key === \"visible\" && next.takesShared(\"visible\")) {\n kept[attribute.key] = !domElement.hasAttribute(\"hidden\")\n } else if (source === \"property\") kept[attribute.key] = values[attribute.key]\n else if (source === \"attribute\") {\n kept[attribute.key] = next.convert(attribute, domElement.getAttribute(attribute.attribute))\n } else kept[attribute.key] = next.startingValue(attribute)\n }\n for (const key of Object.keys(values)) delete values[key]\n Object.assign(values, kept)\n }\n\n ////////////////\n // ## Helpers\n ////////////////\n\n /**\n * Run `task` now if the runtime is loaded, else once it is.\n * - Queued behind registrations `define()` already queued, ahead of the ones it queues next (same promise).\n */\n private static whenRuntime(task: () => void) {\n const { runtime } = E.SpellSolid.settings\n if (runtime.isLoaded) task()\n else void runtime.load().then(task)\n }\n\n /**\n * English texts the `next` version of a vocabulary changed, as its new defaults.\n * - Defaults sit below every registered string (Spell UI's `I18n.registerDefaults()`), so a translation still wins.\n */\n private static updateTexts(previous: E.ComponentVocabulary, next: E.ComponentVocabulary) {\n const previousTexts = new Map(previous.texts.map(({ key, text }) => [key, text]))\n const changed: Record<string, string> = {}\n for (const { key, text } of next.texts) if (previousTexts.get(key) !== text) changed[key] = text\n if (Object.keys(changed).length) E.SpellSolid.settings.words.registerTexts(changed, next.tag)\n }\n\n ////////////////\n // ## Page-wide registry\n ////////////////\n\n /** Every tag defined so far, with what defined it; by resolved tag. */\n private static readonly tags = new Map<string, HotTag>()\n\n /** Live elements per tag class. */\n private static readonly live = new WeakMap<E.DOMElementClass, Set<WeakRef<E.DOMElement>>>()\n\n /** Where each element's attribute values last came from, by key: `migrate()` reads it. */\n private static readonly sources = new WeakMap<E.DOMElement, Record<string, E.ValueSource>>()\n\n /** Swaps and refusals since the last `update()`. */\n private static readonly pending = {\n swapped: new Set<E.DOMElementClass>(),\n refused: [] as HotRefusal[]\n }\n\n /** `UIComponent.define` as declared, once `install()` has run. */\n private static original?: typeof E.UIComponent.define\n}\n\n/** What defined one tag: enough to define it again with a new version of the class. */\ntype HotTag = {\n /** Current class. */\n Class: E.UIComponentClass\n /** `define()`'s `tag` argument, as passed. */\n tag?: string\n /** `define()`'s `dictionary` argument. */\n dictionary?: E.Dictionary\n}\n\n/** A re-definition the platform can't take: the tag, and why. */\nexport type HotRefusal = { tag: string; reason: string }\n\n/** `update()`'s result: the tags re-rendered, or the refusals that reloaded the page. */\nexport type HotUpdateResult = { reloaded: string[]; refused: HotRefusal[] }\n\n/** The part of Vite's `import.meta.hot` `update()` uses. */\nexport type HotContext = { invalidate(message?: string): void }\n\nHotDefinitions.install()\n","import { HotDefinitions } from \"spell/element/HotDefinitions\"\n\n// Through the family's barrel, its lib entry: so `hot.js` shares `ComponentPacks` with `ui-components.js`\nimport { ComponentPacks } from \"spell/ui/components/ui-components\"\nimport type { PackSwap } from \"./UIComponents.types\"\n\n/****************\n * ### `PackHotSwap`\n * A page that swaps in a REBUILT component pack instead of reloading (epic `epic-engine` I116; Owen, 2026-10-25,\n * on every epic page reloading at each merge: \"YUCK. Can you do something about that?\").\n * - The page server's live client says which scripts changed, and offers them (`spell-server:scripts-reloading`) before it\n * reloads. When every one is a pack on the page, this takes them: no reload.\n * - Each pack's script runs again (`ComponentPacks.reload()`), and only the families whose sources changed are\n * swapped into the live elements, which re-render in place (the kit's `HotDefinitions`);\n * the rest keep their elements as they are.\n * - A change the platform can't take in place (a new tag, observed attributes ...): ONE page reload, as before.\n * - What a re-rendered element keeps: itself, its attributes and properties, its light DOM;\n * what it loses: state inside its component (an open popover).\n * - `install()` it as the page's bundle loads, BEFORE any pack defines its tags: `HotDefinitions` records each\n * definition as it happens. The docs bundle (spell-epic's `spell-ui.entry.js`) and the site's (`SitePacks.ts`) do.\n * - Its own lib entry, `spell/ui/hot`: only the pages that swap carry `HotDefinitions`.\n * - STATIC: one per page.\n ****************/\nexport class PackHotSwap {\n /** Install it on this page: `HotDefinitions`, and the live client's offer; idempotent. */\n static install() {\n if (PackHotSwap.isInstalled) return\n PackHotSwap.isInstalled = true\n HotDefinitions.install()\n addEventListener(SCRIPTS_EVENT, PackHotSwap.onScripts as EventListener)\n }\n\n /** How `ComponentPacks.reload()` swaps a pack in: `HotDefinitions`' keep predicate, then its update. */\n static readonly swap: PackSwap = {\n keep(keeps) {\n HotDefinitions.keeps = keeps\n },\n finish() {\n return !HotDefinitions.update().refused.length\n }\n }\n\n /**\n * The live client offers the scripts that changed (`spell-server:scripts-reloading`): take them when every one is a pack on\n * the page, and swap each in; else leave them, and the page reloads.\n */\n private static onScripts(event: CustomEvent<{ paths: string[] }>) {\n const paths = event.detail?.paths ?? []\n const sources = paths.map((path) => ComponentPacks.sourceOf(path))\n if (!paths.length || sources.some((source) => !source)) return\n event.preventDefault()\n Promise.all(sources.map((source) => ComponentPacks.reload(source!, PackHotSwap.swap))).then(\n (results) => {\n if (results.includes(\"reload\")) PackHotSwap.reload()\n },\n (error: unknown) => {\n console.error(\"PackHotSwap: couldn't swap the rebuilt pack in; reloading\", error)\n PackHotSwap.reload()\n }\n )\n }\n\n /**\n * Reload the page: through the live client when it's there (`SPELL_SERVER.reload()`), which keeps the scroll and\n * holds the new page behind the old one until it's ready (epic `epic-engine` I164); else a plain reload.\n * - measured before: `location.reload()` here lost the scroll and the item open, through ~150ms of bare background\n */\n private static reload() {\n const server = (globalThis as { SPELL_SERVER?: { reload?: () => void } }).SPELL_SERVER\n if (server?.reload) server.reload()\n else location.reload()\n }\n\n /** `install()` ran. */\n private static isInstalled = false\n}\n\n/** The live client's offer of the scripts that changed, before it reloads (the kit's `liveClient()`). */\nconst SCRIPTS_EVENT = \"spell-server:scripts-reloading\"\n"],"mappings":";;;;AAyCA,IAAaE,IAAb,MAAa,eAAe;CAE1B,OAAO,UAAU;EACf,AAAI,eAAe,aACnB,eAAe,WAAAC,EAAyB,QACxC,EAAc,SAAS,SAAoC,GAAc,GAA2B;GAClG,OAAO,eAAe,OAAO,MAAMC,GAAKC,CAAU;EACpD,GACA,EAAa,iBAAiB;GAC5B,UAAU,MAAe,eAAe,MAAMC,CAAU;GACxD,WAAW,GAAY,GAAK,MAAW;IACrC,IAAIC,I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AAQ,SAAS,CAAC,GAChC/C,IAAU8C,EAAM,KAAK,MAASE,EAAe,SAASC,CAAI,CAAC;EACjE,AAAKH,EAAM,UAAU,GAAQ,MAAM,MAAW,CAAC5C,CAAM,MACrD6C,EAAM,eAAe,GACrB,QAAQ,IAAI/C,EAAQ,KAAK,MAAWgD,EAAe,OAAO9C,GAAS,YAAY,IAAI,CAAC,CAAC,CAAC,CAAC,MACpF,MAAY;GACX,AAAIgD,EAAQ,SAAS,QAAQ,KAAG,YAAY,OAAO;EACrD,IACC,MAAmB;GAElB,AADA,QAAQ,MAAM,+DAA+DC,CAAK,GAClF,YAAY,OAAO;EACrB,CACF;CACF;CAOA,OAAe,SAAS;EACtB,IAAMC,IAAU,WAA0D;EAC1E,AAAIA,GAAQ,SAAQA,EAAO,OAAO,IAC7B,SAAS,OAAO;CACvB;CAGA,OAAe,cAAc;AAC/B,GAGMR,IAAgB"}
|
|
1
|
+
{"version":3,"file":"hot.js","names":["E.ElementDefinition","E.DOMElement","E.ERRORED_STATE","HotDefinitions","UIComponent","tag","dictionary","domElement","sources","key","source","original","SpellSolid","Class","resolved","ElementDefinition","known","defined","Previous","Next","before","after","definition","TagClass","next","Base","reason","DOMElement","previous","nextPrototype","previousPrototype","LIFECYCLE_CALLBACKS","name","refused","swapped","message","hot","css","stem","id","refs","found","ref","ERRORED_STATE","values","kept","attribute","isKnown","runtime","task","previousTexts","text","changed","PagePatch","rules","tree","signatures","node","at","TEXT_NODE","a","b","value","was","now","address","root","step","steps","editors","typing","editor","result","placements","detach","list","parent","intoEditor","movesInto","takesAway","element","copy","index","edit","plan","mainOf","ROOT","weight","sum","live","anchor","top","run","error","doc","onScreen","change","transition","animation","effect","FADE_MS","box","moved","x","y","TEXT_KIND","newKeys","kind","old","kids","lineup","byKey","kid","match","kinds","olds","news","o","n","pairs","anchors","ALIGN_LIMIT","lengths","i","j","ai","aj","k","joined","gone","last","from","counts","attributes","count","ELEMENT_NODE","slots","parts","first","part","selection","range","keep","offset","active","deepest","panels","accordion","open","word","field","owner","selector","html","link","script","src","type","body","PackHotSwap","SCRIPTS_EVENT","keeps","paths","event","ComponentPacks","path","results","SETTLE_MS","server"],"sources":["../../src/element/HotDefinitions.ts","../../src/server/site/PagePatch.ts","../src/components/ui-components/PackHotSwap.ts"],"sourcesContent":["/*! Derived from `@solidjs/element` and `component-register`: MIT licence, (c) Ryan Carniato. */\nimport { E } from \"spell/element\"\n\n/****************\n * ### `HotDefinitions`\n * Hot replacement of a set's elements: an edited component re-renders every live element in place,\n * keeping the element objects, their attributes and their property values.\n * - Two users:\n * - `yarn dev`: loaded into every component barrel, before its `define()` calls run,\n * by the kit's Vite plugin (`src/element-tools/HotElements.ts`), which Spell UI's `vite.config.ts` adds\n * - a page that swaps in a REBUILT COMPONENT PACK instead of reloading (epic `epic-engine` I116):\n * Spell UI's `PackHotSwap` installs it as the page's bundle loads, before any pack defines;\n * the pack's `define()` runs again, and only the families whose sources changed are swapped (`keeps`)\n * - Not in the `spell/element` barrel: only the pages and builds that swap pay for it.\n * - SIDE EFFECT:\n * `install()` wraps `UIComponent.define`, and hooks into every DOM element made (`DOMElement.hotReloadHooks`).\n * - Why: `define()` is idempotent per tag, so a barrel re-run by HMR would return the OLD element class.\n * - The wrapper records every tag's class and dictionary.\n * - When a DIFFERENT class of the SAME name defines a known tag (its module was re-evaluated),\n * that class takes over EVERY tag the old one had, the translated aliases (`es-boton`) included.\n * - The platform can't define a tag twice, so each tag's DOM element class STAYS,\n * and what it reads is swapped in place (`redefine()`):\n * its definition, its properties, how it builds its component.\n * - What the platform read once at definition, and how a new version gets round it\n * (epic `epic-engine` I171: every epic page reloaded at a merge that added attributes):\n * - observed attributes: one it doesn't observe is watched on each element instead (`DOMElement.watchAttributes()`);\n * one dropped is still reported, and ignored\n * - a new version of the family's DOM element class (its pack ran again): laid under the tag's class in place\n * of the old one, when the platform's lifecycle callbacks stay the same\n * - Anything else it read (DOM API `formAssociated`, another base class, a lifecycle callback, shadow root\n * options): `update()` reloads the page.\n * - Then the barrel's `import.meta.hot.accept()` calls `update()`,\n * which re-renders every live element of the swapped classes.\n * - Their component-internal state (a query, an open menu) resets; their attributes and properties don't.\n * - Also:\n * - English texts the edit changed reach the page's runtime, Spell UI's `UI.i18n`\n * (`define()` never overwrites a registered text)\n * - `updateStyle()` re-registers a component sheet whose `?inline` CSS changed\n * - NOTE: a vocabulary whose tag was renamed defines the NEW tag; instances of the old one keep the old class.\n * - A changed vocabulary is swapped into the runtime, which re-resolves its translated names from it\n * (Spell UI's `UI.vocabulary.replace()`).\n * - Imports the package through `spell/element`, as a component file does: it's loaded into component barrels,\n * and NOTHING in the package imports it (it's not in the `spell/element` barrel).\n * - STATIC and instance-free on purpose: ONE record of definitions per page, as `customElements` is.\n * - Began as the old `solid-element` package's hot reload, merged into its one user (epic `spell-element`, Q11).\n ****************/\nexport class HotDefinitions {\n /** Wrap `UIComponent.define`, and hook into every DOM element made; idempotent. */\n static install() {\n if (HotDefinitions.original) return\n HotDefinitions.original = E.UIComponent.define\n E.UIComponent.define = function (this: E.UIComponentClass, tag?: string, dictionary?: E.Dictionary) {\n return HotDefinitions.define(this, tag, dictionary)\n }\n E.DOMElement.hotReloadHooks = {\n created: (domElement) => HotDefinitions.track(domElement),\n valueSet: (domElement, key, source) => {\n let sources = HotDefinitions.sources.get(domElement)\n if (!sources) HotDefinitions.sources.set(domElement, (sources = {}))\n sources[key] = source\n }\n }\n }\n\n /** The wrapped `define()`: record, re-define on a new version of a class, else as declared. */\n static define(\n Class: E.UIComponentClass,\n tag?: string,\n dictionary?: E.Dictionary\n ): CustomElementConstructor | undefined {\n const original = HotDefinitions.original!\n // no settings yet: the original waits for them, and runs this again then (`SpellSolid.whenInstalled()`)\n if (!E.SpellSolid.isInstalled) return original.call(Class, tag, dictionary)\n const resolved = new E.ElementDefinition(Class.prototype.vocabulary, { tag, dictionary }).tag\n const known = HotDefinitions.tags.get(resolved)\n if (!known) {\n HotDefinitions.tags.set(resolved, { Class, tag, dictionary })\n return original.call(Class, tag, dictionary)\n }\n const defined = customElements.get(resolved)\n if (!defined || known.Class === Class || known.Class.name !== Class.name)\n return original.call(Class, tag, dictionary)\n // a pack swap keeping this tag's family as it was (its sources didn't change): the live class stays\n if (HotDefinitions.keeps?.(resolved)) return defined\n HotDefinitions.replace(known.Class, Class)\n return defined\n }\n\n /**\n * While a pack is swapped in (`PackHotSwap`): whether a re-run `define()` of tag `tag` KEEPS its live class.\n * - `true`: its family's sources didn't change, so its elements aren't re-rendered\n * - `undefined` (the default, and in `yarn dev`): every new version of a class is swapped in\n */\n static keeps?: (tag: string) => boolean\n\n /** `Next` is a new version of `Previous`: re-define every tag `Previous` had with it (`redefine()`). */\n static replace(Previous: E.UIComponentClass, Next: E.UIComponentClass) {\n HotDefinitions.updateSheets(Previous, Next)\n const before = Previous.prototype.vocabulary\n const after = Next.prototype.vocabulary\n if (before !== after) {\n HotDefinitions.whenRuntime(() => {\n // `register()` refuses a second vocabulary object for a tag:\n // swap the new version in, so the registration below is a no-op and localized names re-resolve\n E.SpellSolid.settings.words.registerVocabulary(after, \"replace\")\n HotDefinitions.updateTexts(before, after)\n })\n }\n for (const known of HotDefinitions.tags.values()) {\n if (known.Class !== Previous) continue\n known.Class = Next\n const definition = new E.ElementDefinition(Next.prototype.vocabulary, known)\n const TagClass = customElements.get(definition.tag) as E.DOMElementClass | undefined\n if (TagClass) HotDefinitions.redefine(TagClass, Next, definition)\n }\n }\n\n /**\n * Swap `TagClass`'s definition, properties and component (`Next`) in place,\n * or record why the platform can't take the change (`update()` then reloads the page).\n * - Each live element's values are carried over (`migrate()`).\n * - NEVER re-renders: `update()` does, once the whole barrel has re-run.\n * - Throws, changing nothing, when a new attribute property would hide a member of the element\n * (as a first definition would).\n */\n static redefine(TagClass: E.DOMElementClass, Next: E.UIComponentClass, definition: E.ElementDefinition) {\n E.UIComponent.register.call(Next, definition)\n const next = E.UIComponent.tagSetupFor(Next, definition)\n const Base = Next.prototype.elementSetup.DOMElement\n const reason = HotDefinitions.changeOf(TagClass, Base, next)\n if (reason) {\n HotDefinitions.pending.refused.push({ tag: definition.tag, reason })\n return\n }\n // dry run on a stand-in with the new chain: a clash throws BEFORE anything changed\n const Probe = class extends Base {} as unknown as E.DOMElementClass\n Probe.tagSetup = next\n E.DOMElement.defineProperties(Probe)\n const previous = TagClass.tagSetup.elementDefinition\n E.DOMElement.removeProperties(TagClass)\n // a new version of the family's DOM class: the tag's class (and so every live element) inherits from it now\n if (Object.getPrototypeOf(TagClass) !== Base) {\n Object.setPrototypeOf(TagClass, Base)\n Object.setPrototypeOf(TagClass.prototype, Base.prototype)\n }\n TagClass.tagSetup = next\n E.DOMElement.defineProperties(TagClass)\n for (const domElement of HotDefinitions.liveElements(TagClass)) {\n HotDefinitions.migrate(domElement, previous, definition)\n E.DOMElement.watchAttributes(domElement)\n }\n HotDefinitions.pending.swapped.add(TagClass)\n }\n\n /**\n * Why `TagClass` can't take `next`, or `undefined` if it can.\n * - The platform read these ONCE, by DOM API `customElements.define()` or by the constructor of elements that\n * already exist.\n * - Observed attributes changing is fine: `DOMElement.watchAttributes()` hears the new ones.\n * - `Base`, the DOM element class `next` names: the tag's own base, or a NEW VERSION of it (`isNewVersionOf()`)\n */\n static changeOf(TagClass: E.DOMElementClass, Base: E.AnyDOMElementClass, next: E.TagSetup): string | undefined {\n E.DOMElement.observedByPlatform(TagClass)\n const Previous = Object.getPrototypeOf(TagClass) as E.AnyDOMElementClass\n if (Previous !== Base && !HotDefinitions.isNewVersionOf(Base, Previous)) return \"DOM element class changed\"\n const formAssociated = !!(TagClass as unknown as { formAssociated?: boolean }).formAssociated\n if (formAssociated !== next.isAFormControl) return \"formAssociated changed\"\n if (JSON.stringify(TagClass.tagSetup.shadowRootInit) !== JSON.stringify(next.shadowRootInit)) {\n return \"shadow root options changed\"\n }\n return undefined\n }\n\n /**\n * Is `Next` a new version of DOM element class `Previous`, which a tag's class can inherit from instead?\n * - the same names, class by class, down to a class both share (`E.DOMElement`): their module ran again\n * (a component pack swapped in)\n * - and every DOM API lifecycle callback the same function: the platform kept the ones it found at definition,\n * so a new one would never run\n */\n static isNewVersionOf(Next: E.AnyDOMElementClass, Previous: E.AnyDOMElementClass): boolean {\n let next: Function | null = Next\n let previous: Function | null = Previous\n while (next !== previous) {\n if (!next || !previous || next === E.DOMElement || next.name !== previous.name) return false\n next = Object.getPrototypeOf(next) as Function | null\n previous = Object.getPrototypeOf(previous) as Function | null\n }\n const nextPrototype = Next.prototype as unknown as Record<string, unknown>\n const previousPrototype = Previous.prototype as unknown as Record<string, unknown>\n return LIFECYCLE_CALLBACKS.every((name) => nextPrototype[name] === previousPrototype[name])\n }\n\n /**\n * Finish a hot update: re-render the live elements of every class swapped since the last call;\n * or, if a re-definition was refused, log it and `hot.invalidate()` (Vite then reloads the page).\n * - The Vite plugin calls it from each barrel's `import.meta.hot.accept()`.\n * - A pack swap calls it with no `hot`: it reloads the page itself on a refusal (`PackHotSwap`).\n */\n static update(hot?: HotContext): HotUpdateResult {\n const refused = HotDefinitions.pending.refused.splice(0)\n const swapped = [...HotDefinitions.pending.swapped]\n HotDefinitions.pending.swapped.clear()\n if (refused.length) {\n const message = refused.map(({ tag, reason }) => `<${tag}>: ${reason}, full reload`).join(\"\\n\")\n E.SpellSolid.settings.warn(\"HotDefinitions\", message)\n hot?.invalidate(message)\n return { reloaded: [], refused }\n }\n for (const TagClass of swapped) {\n for (const domElement of HotDefinitions.liveElements(TagClass)) HotDefinitions.reload(domElement)\n }\n return { reloaded: swapped.map((TagClass) => TagClass.tagSetup.elementDefinition.tag), refused }\n }\n\n /**\n * The style sheets `Next` changed from `Previous`'s, re-registered by name: the elements' shadow roots already\n * adopted them, and the runtime replaces their rules in place (`styles.register()`).\n * - Why: a sheet registers once per name, so a new class's changed text never reached the page (a pack swap)\n */\n private static updateSheets(Previous: E.UIComponentClass, Next: E.UIComponentClass) {\n const before = Previous.prototype.elementSetup.styleSheets ?? {}\n for (const [name, css] of Object.entries(Next.prototype.elementSetup.styleSheets ?? {})) {\n if (before[name] !== css) HotDefinitions.whenRuntime(() => E.SpellSolid.settings.styles.register(name, css))\n }\n }\n\n /**\n * A component sheet's `?inline` CSS changed: re-register it by name (`UIButton.css` => `button`).\n * - The name is the file's, without `UI`, in kebab-case (`UITreeDiagram.css` => `tree-diagram`):\n * elements register their sheets by that bare name (`elementSetup = { styleSheets: { button: buttonCSS } }`).\n * - A second sheet (`UIDimmer.page.css`) or a sheet registered under another name isn't matched:\n * an edit to it shows after a page reload.\n * - The runtime's `styles.register()` replaces the rules of the sheet every shadow root already adopted:\n * no re-render (Spell UI's `Styles.register()`).\n * - Registered even if no element used it yet, so a later `adoptStyleSheets()` finds the new text\n * (Spell UI's `UI.styles.registerOnce()` only registers names that are missing).\n */\n static updateStyle(this: void, id: string, css: string) {\n const stem = /(?:^|\\/)UI([A-Za-z0-9]+)\\.css(?:\\?|$)/.exec(id)?.[1]\n if (!stem) return\n const name = stem.replace(/(?<=.)([A-Z])/g, \"-$1\").toLowerCase()\n HotDefinitions.whenRuntime(() => E.SpellSolid.settings.styles.register(name, css))\n }\n\n ////////////////\n // ## Live elements\n ////////////////\n\n /**\n * Remember `domElement` as a live element of its class; weak, so tracking never keeps an element alive.\n * - An element made after its tag took a new attribute the platform doesn't observe hears it too:\n * its constructor watches it (`DOMElement.watchAttributes()`).\n */\n static track(domElement: E.DOMElement) {\n const TagClass = domElement.constructor as E.DOMElementClass\n let refs = HotDefinitions.live.get(TagClass)\n if (!refs) HotDefinitions.live.set(TagClass, (refs = new Set()))\n refs.add(new WeakRef(domElement))\n }\n\n /** Every element of `TagClass` still in memory, connected or not. */\n static liveElements(TagClass: E.DOMElementClass): E.DOMElement[] {\n const refs = HotDefinitions.live.get(TagClass)\n const found: E.DOMElement[] = []\n for (const ref of refs ?? []) {\n const domElement = ref.deref()\n if (domElement) found.push(domElement)\n else refs!.delete(ref)\n }\n return found\n }\n\n /**\n * Dispose `domElement`'s component and, if connected, build and render its class's CURRENT component.\n * - Kept: the element, its attributes, its property values (`attributeValues`), its shadow root and adopted sheets.\n * - Lost: state inside the component.\n * - Clears DOM API `:state(errored)`, so an element whose render failed recovers with the next good component.\n * - A detached element is only disposed: it renders the current component on its next connect.\n */\n static reload(domElement: E.DOMElement) {\n domElement.dispose()\n domElement.renderRoot.textContent = \"\"\n domElement.setState(E.ERRORED_STATE, false)\n if (domElement.isConnected) domElement.connectedCallback()\n }\n\n /**\n * Carry `domElement`'s values over to the `next` definition.\n * - Last written as a PROPERTY: kept as is (a framework's rich data, a controlled value).\n * - Last written by its ATTRIBUTE: converted again (a vocabulary that learned a value).\n * - New, and the element has its attribute: converted from it.\n * - Never written: the new starting value.\n * - Attributes the new definition dropped are dropped.\n */\n private static migrate(domElement: E.DOMElement, previous: E.ElementDefinition, next: E.ElementDefinition) {\n const sources = HotDefinitions.sources.get(domElement) ?? {}\n const values = domElement.attributeValues\n const kept: Record<string, unknown> = {}\n for (const attribute of next.attributes) {\n const isKnown = previous.attributes.some(({ key }) => key === attribute.key)\n const source = isKnown ? sources[attribute.key] : undefined\n // shown or hidden: the `hidden` attribute holds it (`DOMElement`, \"Shown or hidden\")\n if (attribute.key === \"visible\" && next.takesShared(\"visible\")) {\n kept[attribute.key] = !domElement.hasAttribute(\"hidden\")\n } else if (source === \"property\") kept[attribute.key] = values[attribute.key]\n else if (source === \"attribute\" || (!isKnown && domElement.hasAttribute(attribute.attribute))) {\n kept[attribute.key] = next.convert(attribute, domElement.getAttribute(attribute.attribute))\n } else kept[attribute.key] = next.startingValue(attribute)\n }\n for (const key of Object.keys(values)) delete values[key]\n Object.assign(values, kept)\n }\n\n ////////////////\n // ## Helpers\n ////////////////\n\n /**\n * Run `task` now if the runtime is loaded, else once it is.\n * - Queued behind registrations `define()` already queued, ahead of the ones it queues next (same promise).\n */\n private static whenRuntime(task: () => void) {\n const { runtime } = E.SpellSolid.settings\n if (runtime.isLoaded) task()\n else void runtime.load().then(task)\n }\n\n /**\n * English texts the `next` version of a vocabulary changed, as its new defaults.\n * - Defaults sit below every registered string (Spell UI's `I18n.registerDefaults()`), so a translation still wins.\n */\n private static updateTexts(previous: E.ComponentVocabulary, next: E.ComponentVocabulary) {\n const previousTexts = new Map(previous.texts.map(({ key, text }) => [key, text]))\n const changed: Record<string, string> = {}\n for (const { key, text } of next.texts) if (previousTexts.get(key) !== text) changed[key] = text\n if (Object.keys(changed).length) E.SpellSolid.settings.words.registerTexts(changed, next.tag)\n }\n\n ////////////////\n // ## Page-wide registry\n ////////////////\n\n /** Every tag defined so far, with what defined it; by resolved tag. */\n private static readonly tags = new Map<string, HotTag>()\n\n /** Live elements per tag class. */\n private static readonly live = new WeakMap<E.DOMElementClass, Set<WeakRef<E.DOMElement>>>()\n\n /** Where each element's attribute values last came from, by key: `migrate()` reads it. */\n private static readonly sources = new WeakMap<E.DOMElement, Record<string, E.ValueSource>>()\n\n /** Swaps and refusals since the last `update()`. */\n private static readonly pending = {\n swapped: new Set<E.DOMElementClass>(),\n refused: [] as HotRefusal[]\n }\n\n /** `UIComponent.define` as declared, once `install()` has run. */\n private static original?: typeof E.UIComponent.define\n}\n\n/** DOM API: the lifecycle callbacks the platform reads once, as it defines a tag (`isNewVersionOf()`). */\nconst LIFECYCLE_CALLBACKS = [\n \"connectedCallback\",\n \"disconnectedCallback\",\n \"adoptedCallback\",\n \"connectedMoveCallback\",\n \"attributeChangedCallback\",\n \"formAssociatedCallback\",\n \"formResetCallback\",\n \"formDisabledCallback\",\n \"formStateRestoreCallback\"\n]\n\n/** What defined one tag: enough to define it again with a new version of the class. */\ntype HotTag = {\n /** Current class. */\n Class: E.UIComponentClass\n /** `define()`'s `tag` argument, as passed. */\n tag?: string\n /** `define()`'s `dictionary` argument. */\n dictionary?: E.Dictionary\n}\n\n/** A re-definition the platform can't take: the tag, and why. */\nexport type HotRefusal = { tag: string; reason: string }\n\n/** `update()`'s result: the tags re-rendered, or the refusals that reloaded the page. */\nexport type HotUpdateResult = { reloaded: string[]; refused: HotRefusal[] }\n\n/** The part of Vite's `import.meta.hot` `update()` uses. */\nexport type HotContext = { invalidate(message?: string): void }\n\nHotDefinitions.install()\n","/****************\n * ### `PagePatch`\n * ONE page patcher for every page runtime (epic `epic-engine` P40): an edit to a page's file shows in the open page\n * without a reload, and only what changed redraws.\n * - It compares the page's source as it LOADED with the new source, and works out a list of small STEPS\n * (`PatchStep`): set an attribute, set a text, replace, remove, insert, move.\n * A separate runner applies them to the live page (`run()`).\n * - The planner (`PagePatch.plan()`) works over ANY keyed tree, through a small adapter (`PatchTree`):\n * each node's key, kind, attributes, text and children.\n * - the DOM is one adapter (`PagePatch.domTree()`); a Spell notebook's chunk tree was another (elemental-spell P16),\n * until epic `notebook` P3 had the running program draw the notebook's page\n * - so the server could work the same list out later, for multiplayer Spell, with no change to the page\n * - Each runtime hands it its rules (`PatchRules`), laid over ONE shared set (`PagePatch.SHARED`):\n * - what's never replaced: an open editor (Monaco in a cell), the field being typed in\n * - what reader state is kept: folds, open panels, typed text, the scroll, the selection\n * - spell-epic's docs runtime adds the epic pages' (`spell-doc-runtime.js`), Spell UI's site its own (`SitePatch`)\n * - A runtime shows a patch with `redraw()`: one short cross-fade when it changes what's on screen, never a half-drawn\n * frame (`crossFade()`, a view transition; epic `epic-engine` I164); a part's body swapped in uses `crossFade()` too\n * - Plain DOM, NO imports: any page's bundle can take it.\n *\n * How a node is matched (Owen, comment M1 on P40):\n * - a node with a KEY (an element's `id`) matches the node with that key, wherever it moved\n * - a node with none is matched by its PLACE: its kind and its index among its same-kind siblings\n * - same-kind siblings that didn't change are lined up first (the longest run in common), then the rest by place:\n * so a paragraph added at the top of a section is one insert, not every paragraph's text moving down\n * - every step names its node by an ADDRESS from the OLD tree, xpath-ish, from its nearest keyed ancestor:\n * `#p-x/ui-section[2]/p[3]/text()[1]`; `/` is the root itself (`/p[1]`, under it)\n * - indexes count every same-kind sibling (keyed or not), from 1; a text node's kind is `text()`\n * - keys are URI-encoded in addresses, so a `/` in one can't split it\n ****************/\nexport class PagePatch {\n /** this runtime's rules, laid over the shared ones (`PagePatch.SHARED`) */\n readonly rules: PatchRules\n\n constructor(rules: PatchRules = {}) {\n this.rules = PagePatch.merge(PagePatch.SHARED, rules)\n }\n\n ////////////////\n // ## The planner: any keyed tree\n ////////////////\n\n /**\n * The steps that turn tree `before` into tree `after`, as `tree` reads them.\n * - pure: reads the trees, changes nothing\n * - `before` itself changed past patching (another kind, a node replaced whole): ONE step, replacing `/`\n * - NEVER throws for trees `tree` can read\n */\n static plan<N extends object>(before: N, after: N, tree: PatchTree<N>, rules: PlanRules<N> = {}): PatchStep<N>[] {\n return new Planner(tree, rules).plan(before, after)\n }\n\n /**\n * The DOM as a `PatchTree`: an element's key is its `id`, its kind its tag; its children its elements and text\n * nodes, but never a comment, a text of only white space, or a live extra (`rules.skip`).\n * - text is compared with its white space squashed: a reformat that re-wraps lines changes nothing\n * - `rules.slotsOnly`: an element whose other children aren't the page's (a body loaded from a file):\n * only its slotted children count\n */\n static domTree(rules: PatchRules = {}): PatchTree<Node> {\n const signatures = new WeakMap<Node, string>()\n return {\n key: (node) => (isElement(node) && node.id ? node.id : undefined),\n kind: kindOf,\n attributes: (node) => (isElement(node) ? Array.from(node.attributes, (at) => [at.name, at.value]) : []),\n text: (node) => (node.nodeType === TEXT_NODE ? (node as Text).data : \"\"),\n children: (node) => sourceChildren(node, rules),\n same: (a, b) => signatureOf(a) === signatureOf(b)\n }\n\n /** `node`'s markup, white space squashed, cached */\n function signatureOf(node: Node): string {\n let value = signatures.get(node)\n if (value === undefined) {\n const markup = isElement(node) ? node.outerHTML : (node.textContent ?? \"\")\n value = squash(markup)\n signatures.set(node, value)\n }\n return value\n }\n }\n\n ////////////////\n // ## The DOM: plan, run, a whole page\n ////////////////\n\n /** The steps that turn source element `before` into source element `after` (parsed, not live), by these rules. */\n plan(before: Element, after: Element): PatchStep<Node>[] {\n const rules = this.rules\n const kept = new Set(rules.keptAttributes)\n return PagePatch.plan<Node>(before, after, PagePatch.domTree(rules), {\n keptAttributes: kept,\n replacedWhole: (node) => isElement(node) && !!rules.replacedWhole && node.matches(rules.replacedWhole),\n mustReplace: (was, now) => isElement(was) && isElement(now) && !!rules.mustReplace?.(was, now)\n })\n }\n\n /**\n * Apply `steps` (from `plan()`) to `root`, the live element the old tree stands for.\n * - every address is found FIRST, in the live tree as it is, so the steps' order doesn't matter;\n * one that isn't there (or a text that isn't what the old tree had) throws a `PatchError`, before anything changes\n * - never touched (`PatchRun.skipped` counts them):\n * - inside an open editor (`rules.fixed`), nor the editor replaced, moved or removed\n * - the field being typed in, or anything holding it, replaced, moved or removed\n * - a new or replacing node is a COPY of the source's, given its reader state (`rules.prepare()`) BEFORE it goes\n * in the page, so it draws that way first: nothing animates\n * - a text set in place keeps the selection on it, its offsets clamped\n * - returns what changed (`PatchRun`)\n */\n run(steps: readonly PatchStep<Node>[], root: Element): PatchRun {\n const rules = this.rules\n const found = new Map<string, Node>()\n const at = (address: string): Node => {\n let node = found.get(address)\n if (!node) {\n node = resolveAddress(root, address, rules)\n found.set(address, node)\n }\n return node\n }\n for (const step of steps) {\n const node = at(\"target\" in step ? step.target : step.parent)\n if (step.op === \"text\" && (node.nodeType !== TEXT_NODE || squash((node as Text).data) !== squash(step.from)))\n throw new PatchError(`PagePatch.run(): the text at ${step.target} isn't the page's as loaded; reload it`)\n if (step.op === \"move\" && !isElement(at(step.parent)))\n throw new PatchError(`PagePatch.run(): ${step.parent} isn't an element; reload the page`)\n }\n const editors = rules.fixed ? Array.from(root.querySelectorAll(rules.fixed)) : []\n const typing = typingIn(root)\n const inEditor = (node: Node) => editors.some((editor) => editor !== node && editor.contains(node))\n const holds = (node: Node) => editors.some((editor) => node.contains(editor)) || (!!typing && node.contains(typing))\n const result: PatchRun = { changed: [], skipped: 0 }\n const changed = new Set<Element>()\n const placements = new Map<Element, { index: number; node: Node }[]>()\n const detach: Node[] = []\n const place = (parent: Element, index: number, node: Node) => {\n const list = placements.get(parent) ?? []\n list.push({ index, node })\n placements.set(parent, list)\n }\n for (const step of steps) {\n const node = at(\"target\" in step ? step.target : step.parent)\n // an insert's node is its parent: never into an editor either\n const intoEditor = step.op === \"insert\" && editors.some((editor) => editor.contains(node))\n const movesInto = step.op === \"move\" && editors.some((editor) => editor.contains(at(step.parent)))\n const takesAway = (step.op === \"replace\" || step.op === \"remove\" || step.op === \"move\") && holds(node)\n if (inEditor(node) || intoEditor || movesInto || takesAway) {\n result.skipped++\n continue\n }\n if (step.op === \"attribute\") {\n const element = node as Element\n if (step.value === null) element.removeAttribute(step.name)\n else element.setAttribute(step.name, step.value)\n changed.add(element)\n } else if (step.op === \"text\") {\n setText(node as Text, step.text)\n if (node.parentElement) changed.add(node.parentElement)\n } else if (step.op === \"replace\") {\n const copy = this.copyOf(step.node, isElement(node) ? node : null)\n ;(node as ChildNode).replaceWith(copy)\n if (isElement(copy)) changed.add(copy)\n else if (copy.parentElement) changed.add(copy.parentElement)\n } else if (step.op === \"remove\") detach.push(node)\n else if (step.op === \"move\") {\n detach.push(node)\n place(at(step.parent) as Element, step.index, node)\n } else {\n const copy = this.copyOf(step.node, null)\n place(node as Element, step.index, copy)\n if (isElement(copy)) changed.add(copy)\n else changed.add(node as Element)\n }\n }\n for (const node of detach) (node as ChildNode).remove()\n for (const [parent, list] of placements) {\n list.sort((a, b) => a.index - b.index)\n for (const { index, node } of list) placeChild(parent, index, node, rules)\n }\n result.changed = Array.from(changed).filter((element) => element.isConnected)\n return result\n }\n\n /**\n * Patch the live page from source document `before` to source document `after` (parsed, e.g. `DOMParser`):\n * the page's `main` (`mainOf()`), `<body>`'s attributes and the `<title>`; null when it can't be done safely.\n * - null when:\n * - what the page loads changed: its stylesheets or scripts (not what the page server injects, nor inert data\n * blocks), or anything in `<body>` outside `main`\n * - either has no `main`, or `main` itself would be replaced\n * - more than half of `main` would be replaced or added (`PageEdit.weight`): a reload is as quick\n * - the live page doesn't line up with the old source (`PatchError`)\n * - plans everything first, so nothing changes when it's refused\n * - keeps the line being read where it is (`readingAnchor()`), whatever changed above it;\n * `top()`: how far down the window the stuck titles end, ABOVE which nothing counts as read\n * - `<body>`'s attributes are patched too, but never its `class` (runtimes add their own)\n */\n page(edit: PageEdit): PageRun | null {\n return this.pagePlan(edit)?.run() ?? null\n }\n\n /**\n * `page()`, drawn as ONE short cross-fade (`crossFade()`) when it changes what's on screen\n * (epic `epic-engine` I164; Owen, 2026-10-29: \"use a page transition to redraw without visual flash\").\n * - the same refusals as `page()`: null, nothing changed\n * - straight in, no fade: everything it changes is off screen, motion is reduced, the field being typed in has the\n * focus, or the browser has no view transitions (`crossFade()` says which)\n * - resolves once the page has the change; the fade finishes by itself\n */\n async redraw(edit: PageEdit): Promise<PageRun | null> {\n const plan = this.pagePlan(edit)\n if (!plan) return null\n return PagePatch.crossFade(() => plan.run(), plan.isOnScreen())\n }\n\n /**\n * The checks and plan behind `page()` and `redraw()`: null when it's refused, else its steps, whether any of them\n * changes what's on screen, and the run (null when the live page doesn't line up after all).\n */\n private pagePlan({ before, after, live, mainOf, top = () => 0 }: PageEdit): PagePlan | null {\n const was = mainOf(before)\n const now = mainOf(after)\n if (!was || !now || headKey(before) !== headKey(after) || shellKey(before, mainOf) !== shellKey(after, mainOf))\n return null\n const steps = this.plan(was, now)\n if (steps.some((step) => \"target\" in step && step.target === ROOT && step.op !== \"attribute\")) return null\n const weight = steps.reduce(\n (sum, step) => sum + (step.op === \"replace\" || step.op === \"insert\" ? sizeOf(step.node) : 0),\n 0\n )\n if (weight > now.outerHTML.length / 2) return null\n const rules = this.rules\n return {\n isOnScreen: () =>\n steps.some((step) => {\n try {\n return PagePatch.isOnScreen(resolveAddress(live, \"target\" in step ? step.target : step.parent, rules))\n } catch {\n return true\n }\n }),\n run: () => {\n const anchor = PagePatch.readingAnchor(live, top())\n let run: PatchRun\n try {\n run = this.run(steps, live)\n } catch (error) {\n if (error instanceof PatchError) return null\n throw error\n }\n patchBodyAttributes(before.body, after.body, live.ownerDocument.body)\n if (after.title !== before.title) live.ownerDocument.title = after.title\n PagePatch.keepAnchor(anchor)\n return { ...run, steps, weight }\n }\n }\n }\n\n ////////////////\n // ## Redrawing without a flash\n ////////////////\n\n /**\n * Run `change`, a change to the page, as ONE short cross-fade from the page as it was to the page as it is after\n * (a same-document view transition, `document.startViewTransition()`; epic `epic-engine` I164).\n * - the old frame stays up until `change` resolves, so nothing half drawn ever shows: a part's body loading, an\n * element drawing its new state; then old and new cross-fade, `FADE_MS`, no slide\n * - just `change()`, no transition, when:\n * - `onScreen` is false: nothing the reader sees moves\n * - the reader asked for less motion (`prefers-reduced-motion`)\n * - the page is out of sight, or the browser has no view transitions\n * - a field has the focus: what's typed would freeze for the fade\n * - resolves with what `change` returns; rejects as it does\n */\n static async crossFade<T>(change: () => T | Promise<T>, onScreen = true): Promise<T> {\n const doc = document as Document & { startViewTransition?: (update: () => Promise<void>) => ViewTransition }\n if (\n !onScreen ||\n typeof doc.startViewTransition !== \"function\" ||\n doc.visibilityState !== \"visible\" ||\n matchMedia(\"(prefers-reduced-motion: reduce)\").matches ||\n typingIn(doc.documentElement)\n )\n return change()\n let result: T\n const transition = doc.startViewTransition(async () => {\n result = await change()\n })\n transition.ready.then(\n () => {\n for (const animation of doc.getAnimations()) {\n const effect = animation.effect as KeyframeEffect | null\n if (effect?.pseudoElement?.startsWith(\"::view-transition\")) effect.updateTiming({ duration: FADE_MS })\n }\n },\n // skipped (another transition started, or the page went out of sight): the change still ran\n () => undefined\n )\n await transition.updateCallbackDone\n return result!\n }\n\n /**\n * Does `node` show in the window now? Its box, else its nearest ancestor's that has one (an element drawn as\n * `display: contents`, like `<epic-item>`, has none of its own), crosses the window's height.\n */\n static isOnScreen(node: Node): boolean {\n let element: Element | null = isElement(node) ? node : node.parentElement\n while (element) {\n const box = element.getBoundingClientRect()\n if (box.width || box.height) return box.bottom > 0 && box.top < innerHeight\n element = element.parentElement ?? ((element.getRootNode() as ShadowRoot).host as Element | undefined) ?? null\n }\n return false\n }\n\n ////////////////\n // ## The reading position\n ////////////////\n\n /**\n * What the reader is looking at in `root`: the element mid-column, just below `top` (px from the window's top),\n * and its top; null when none is.\n */\n static readingAnchor(root: Element, top = 0): ReadingAnchor | null {\n const box = root.getBoundingClientRect()\n const element = document.elementFromPoint(box.left + box.width / 2, Math.min(innerHeight - 1, top + 8))\n return element && root.contains(element) ? { element, top: element.getBoundingClientRect().top } : null\n }\n\n /** Scroll so `anchor` (`readingAnchor()`) is where it was, if it's still in the page. */\n static keepAnchor(anchor: ReadingAnchor | null): void {\n if (!anchor?.element.isConnected) return\n const moved = anchor.element.getBoundingClientRect().top - anchor.top\n if (Math.abs(moved) >= 1) scrollBy({ top: moved, behavior: \"instant\" })\n }\n\n ////////////////\n // ## Rules\n ////////////////\n\n /**\n * The rules every runtime shares, laid under its own (`new PagePatch(rules)`):\n * - kept: `open`, the folds and open panels the reader set (a folded section is `open=\"false\"`)\n * - replaced whole when they change: what draws its children itself, or holds text that isn't plain\n * (code, a highlighted `<pre>`, an include, a script)\n * - never touched: an open editor (Monaco's, or anything marked `data-spell-editor`)\n * - a copy brought in keeps the reader's typed text (fields with an `id`) and open accordion panels\n * (`keepReaderState()`)\n */\n static readonly SHARED: PatchRules = {\n keptAttributes: [\"open\"],\n replacedWhole: \"pre, ui-code, ui-markdown, ui-include, script, style, template, svg\",\n fixed: \".monaco-editor, [data-spell-editor]\",\n prepare: (copy, live) => {\n if (live) keepReaderState(live, copy)\n }\n }\n\n /** Rules `a` with `b` laid over them: lists joined, selectors and predicates OR'd, `prepare()`s in turn. */\n static merge(a: PatchRules, b: PatchRules): PatchRules {\n const either = (x?: string, y?: string) => (x && y ? `${x}, ${y}` : x || y)\n return {\n skip: either(a.skip, b.skip),\n keptAttributes: [...(a.keptAttributes ?? []), ...(b.keptAttributes ?? [])],\n replacedWhole: either(a.replacedWhole, b.replacedWhole),\n fixed: either(a.fixed, b.fixed),\n slotsOnly:\n a.slotsOnly || b.slotsOnly ? (element) => !!a.slotsOnly?.(element) || !!b.slotsOnly?.(element) : undefined,\n mustReplace:\n a.mustReplace || b.mustReplace\n ? (was, now) => !!a.mustReplace?.(was, now) || !!b.mustReplace?.(was, now)\n : undefined,\n prepare:\n a.prepare || b.prepare\n ? (copy, live) => {\n a.prepare?.(copy, live)\n b.prepare?.(copy, live)\n }\n : undefined\n }\n }\n\n ////////////////\n // ## Helpers runtimes share\n ////////////////\n\n /** Carry the reader's typed text and open accordion panels from `live` to `copy`, its replacement. */\n static readonly keepReaderState = keepReaderState\n\n /** `root` (when it matches `selector`) and every element under it that does, in document order. */\n static readonly withSelf = withSelf\n\n /** Is `script` a data block the browser never runs (`type=\"text/plain\"`, JSON ...)? */\n static readonly isInert = isInert\n\n /** Markup with every run of white space one space, and none between tags. */\n static readonly squash = squash\n\n /**\n * A copy of source node `source`, brought into this document, then given its reader state (`rules.prepare()`)\n * before it's put in the page: so it draws that way first, and a runtime keyed by the copy itself (Spell UI's\n * examples) finds the node that goes in\n */\n private copyOf(source: Node, live: Element | null): Node {\n const copy = document.importNode(source, true)\n if (isElement(copy)) this.rules.prepare?.(copy, live)\n return copy\n }\n}\n\n/** Thrown by `PagePatch.run()` when the live page doesn't line up with the old source: the page should reload. */\nexport class PatchError extends Error {}\nPatchError.prototype.name = \"PatchError\"\n\n////////////////\n// ## Types\n////////////////\n\n/**\n * A tree the planner reads (`PagePatch.plan()`): how to see one node.\n * - `key()`: its key, when it has one (an element's `id`, a chunk's path): matched wherever it moved\n * - a key twice in a tree is no key there\n * - `kind()`: what it is: a tag (`p`), or `TEXT_KIND` for text; only nodes of one kind match\n * - `attributes()`: its attributes, `[name, value]`\n * - `text()`: a text node's text\n * - `children()`: its children, in order: only those that count (no comments, no white space between tags)\n * - `same()`: are two nodes the same, children and all? Default: by kind, attributes, text and children\n */\nexport type PatchTree<N> = {\n key(node: N): string | undefined\n kind(node: N): string\n attributes(node: N): Iterable<readonly [string, string]>\n text(node: N): string\n children(node: N): readonly N[]\n same?(a: N, b: N): boolean\n}\n\n/** The kind of a text node, in `PatchTree.kind()` and addresses (`text()[1]`). */\nexport const TEXT_KIND = \"text()\"\n\n/**\n * One step of a patch, its nodes named by addresses in the OLD tree (see the class).\n * - `attribute`: set `name` to `value`; `null` removes it\n * - `text`: a text node's text, in place; `from`, the text it had, so a runner can check it's the one\n * - `replace`: the node, by a copy of new node `node`\n * - `remove`: the node\n * - `insert`: a copy of new node `node`, as child number `index` (from 0, counting what `children()` counts) of\n * `parent` once the patch is done\n * - `move`: the node (kept, as it is) to child number `index` of `parent`\n */\nexport type PatchStep<N> =\n | { op: \"attribute\"; target: string; name: string; value: string | null }\n | { op: \"text\"; target: string; text: string; from: string }\n | { op: \"replace\"; target: string; node: N }\n | { op: \"remove\"; target: string }\n | { op: \"insert\"; parent: string; index: number; node: N }\n | { op: \"move\"; target: string; parent: string; index: number }\n\n/**\n * What the planner is told about a tree's nodes (`PagePatch.plan()`).\n * - `keptAttributes`: the reader's: never set or removed\n * - `replacedWhole()`: a node replaced whole when it changes, never patched inside\n * - `mustReplace()`: a node to replace though its kind stayed (a body from another file)\n */\nexport type PlanRules<N> = {\n keptAttributes?: ReadonlySet<string>\n replacedWhole?(node: N): boolean\n mustReplace?(before: N, after: N): boolean\n}\n\n/**\n * A page runtime's rules for the DOM patcher (`new PagePatch(rules)`), laid over `PagePatch.SHARED`.\n * - `skip`: live elements the page's source doesn't have, which the runtime added: stepped around, never touched\n * - `keptAttributes`: attributes the reader's state lives in: never set or removed by a patch\n * - `replacedWhole`: elements that manage their children (tabs, accordions, selects ...):\n * replaced whole when they change, their reader state carried over by `prepare()`\n * - `fixed`: live elements never replaced, moved or removed, and never patched inside: an open editor\n * - `slotsOnly()`: an element whose only children from the page are its slotted ones (a body loaded from a file)\n * - `mustReplace()`: a source element to replace though its tag stayed (another body file)\n * - `prepare()`: give `copy` (in this document, not yet in the page) the reader's state:\n * from `live`, the element it replaces, or null for a new one\n */\nexport type PatchRules = {\n skip?: string\n keptAttributes?: readonly string[]\n replacedWhole?: string\n fixed?: string\n slotsOnly?(element: Element): boolean\n mustReplace?(before: Element, after: Element): boolean\n prepare?(copy: Element, live: Element | null): void\n}\n\n/** What `PagePatch.run()` did: the elements added, replaced or changed, and how many steps it left alone. */\nexport type PatchRun = { changed: Element[]; skipped: number }\n\n/** What `PagePatch.page()` did: the run, its steps, and how much it replaced or added (`outerHTML` length). */\nexport type PageRun = PatchRun & { steps: PatchStep<Node>[]; weight: number }\n\n/**\n * `PagePatch.page()`'s input.\n * - `before` / `after`: the page's source as it loaded, and the new one, parsed\n * - `live`: the live page's `main`\n * - `mainOf()`: a document's `main`, as the runtime finds it\n * - `top()`: px from the window's top where the stuck titles end\n */\nexport type PageEdit = {\n before: Document\n after: Document\n live: Element\n mainOf(root: ParentNode): Element | null\n top?(): number\n}\n\n/**\n * A page's patch, planned but not run (`PagePatch.pagePlan()`):\n * - `isOnScreen()`: does any step change what the window shows now?\n * - `run()`: apply it; null when the live page doesn't line up with the old source\n */\ntype PagePlan = { isOnScreen(): boolean; run(): PageRun | null }\n\n/** What the reader is looking at: an element and its top, px from the window's (`PagePatch.readingAnchor()`). */\nexport type ReadingAnchor = { element: Element; top: number }\n\n////////////////\n// ## The planner\n////////////////\n\n/** The address of the root of a tree. */\nconst ROOT = \"/\"\n\n/** How long a redraw's cross-fade takes, in ms (`PagePatch.crossFade()`): short, so it reads as a swap, not motion. */\nconst FADE_MS = 150\n\n/**\n * One matched pair's children, as the planner lines them up: `match[i]`, the old child new child `i` is (an index\n * into `was`), else -1 (new); `from[i]`, the address of an old node from ANOTHER parent it moved from.\n */\ntype Lineup<N> = {\n parent: string\n was: readonly N[]\n now: readonly N[]\n addresses: string[]\n match: number[]\n from: (string | undefined)[]\n taken: Set<number>\n}\n\n/** Works out one patch (`PagePatch.plan()`): first every match, then the steps. */\nclass Planner<N extends object> {\n private readonly tree: PatchTree<N>\n private readonly rules: PlanRules<N>\n private readonly steps: PatchStep<N>[] = []\n private readonly lineups: Lineup<N>[] = []\n /** the keys found once in each tree: only those match by key */\n private keys = new Set<string>()\n /** the old tree's keys found once: their nodes are addressed by key */\n private oldKeys = new Set<string>()\n private readonly signatures = new WeakMap<N, string>()\n\n constructor(tree: PatchTree<N>, rules: PlanRules<N>) {\n this.tree = tree\n this.rules = rules\n }\n\n plan(before: N, after: N): PatchStep<N>[] {\n this.oldKeys = onceKeys(before, this.tree)\n const newKeys = onceKeys(after, this.tree)\n this.keys = new Set([...this.oldKeys].filter((key) => newKeys.has(key)))\n this.morph(before, after, ROOT)\n this.joinMoves()\n this.placeSteps()\n return this.steps\n }\n\n /** Plan old `was` (at `address`) becoming new `now`: nothing, replaced, its text, or its attributes and children. */\n private morph(was: N, now: N, address: string): void {\n const { tree, rules } = this\n if (this.same(was, now)) return\n const kind = tree.kind(now)\n if (\n kind !== tree.kind(was) ||\n rules.replacedWhole?.(was) ||\n rules.replacedWhole?.(now) ||\n rules.mustReplace?.(was, now)\n ) {\n this.steps.push({ op: \"replace\", target: address, node: now })\n return\n }\n if (kind === TEXT_KIND) {\n this.steps.push({ op: \"text\", target: address, text: tree.text(now), from: tree.text(was) })\n return\n }\n this.attributes(was, now, address)\n this.lineUp(was, now, address)\n }\n\n /** Plan the attributes that changed from `was` to `now`, but the kept ones. */\n private attributes(was: N, now: N, address: string): void {\n const before = new Map(this.tree.attributes(was))\n const after = new Map(this.tree.attributes(now))\n for (const name of new Set([...before.keys(), ...after.keys()])) {\n if (this.rules.keptAttributes?.has(name)) continue\n const value = after.get(name) ?? null\n if (value !== (before.get(name) ?? null)) this.steps.push({ op: \"attribute\", target: address, name, value })\n }\n }\n\n /**\n * Match `now`'s children to `was`'s, and morph each pair:\n * keyed ones by key, then the rest of each kind by place (`alignByPlace()`).\n * - What's left over is placed later (`placeSteps()`), maybe moved in from elsewhere first (`joinMoves()`).\n */\n private lineUp(was: N, now: N, address: string): void {\n const { tree } = this\n const old = tree.children(was)\n const kids = tree.children(now)\n const lineup: Lineup<N> = {\n parent: address,\n was: old,\n now: kids,\n addresses: this.addresses(old, address),\n match: kids.map(() => -1),\n from: kids.map(() => undefined),\n taken: new Set()\n }\n const byKey = new Map<string, number>()\n old.forEach((kid, at) => {\n const key = this.keyOf(kid)\n if (key !== undefined) byKey.set(key, at)\n })\n kids.forEach((kid, at) => {\n const key = this.keyOf(kid)\n const match = key === undefined ? undefined : byKey.get(key)\n // by key whatever its kind: one that changed its tag is REPLACED where it is (never a remove and an insert,\n // which would leave a copy beside one the reader is typing in)\n if (match === undefined) return\n lineup.match[at] = match\n lineup.taken.add(match)\n })\n const kinds = new Set(kids.map((kid) => tree.kind(kid)))\n for (const kind of kinds) {\n const olds = old.flatMap((kid, at) =>\n !lineup.taken.has(at) && this.keyOf(kid) === undefined && tree.kind(kid) === kind ? [at] : []\n )\n const news = kids.flatMap((kid, at) =>\n lineup.match[at] === -1 && this.keyOf(kid) === undefined && tree.kind(kid) === kind ? [at] : []\n )\n for (const [o, n] of this.alignByPlace(olds, news, old, kids)) {\n lineup.match[n] = o\n lineup.taken.add(o)\n }\n }\n this.lineups.push(lineup)\n kids.forEach((kid, at) => {\n const match = lineup.match[at]!\n if (match >= 0) this.morph(old[match]!, kid, lineup.addresses[match]!)\n })\n }\n\n /**\n * Pair old children `olds` with new children `news` (indexes, one kind, no keys): the longest run of unchanged\n * ones first, then the rest between them by place. Returns `[old, new]` pairs.\n * - very long lists (over `ALIGN_LIMIT` pairs to compare): by place alone\n */\n private alignByPlace(olds: number[], news: number[], old: readonly N[], kids: readonly N[]): [number, number][] {\n const pairs: [number, number][] = []\n const anchors: [number, number][] = []\n if (olds.length * news.length <= ALIGN_LIMIT) {\n const lengths = olds.map(() => Array.from({ length: news.length + 1 }, () => 0))\n lengths.push(Array.from({ length: news.length + 1 }, () => 0))\n for (let i = olds.length - 1; i >= 0; i--)\n for (let j = news.length - 1; j >= 0; j--)\n lengths[i]![j] = this.same(old[olds[i]!]!, kids[news[j]!]!)\n ? lengths[i + 1]![j + 1]! + 1\n : Math.max(lengths[i + 1]![j]!, lengths[i]![j + 1]!)\n let i = 0\n let j = 0\n while (i < olds.length && j < news.length) {\n if (this.same(old[olds[i]!]!, kids[news[j]!]!)) anchors.push([i++, j++])\n else if (lengths[i + 1]![j]! >= lengths[i]![j + 1]!) i++\n else j++\n }\n }\n // between two unchanged ones (and before the first, after the last): the rest, by place\n let i = 0\n let j = 0\n for (const [ai, aj] of [...anchors, [olds.length, news.length] as const]) {\n for (let k = 0; i + k < ai && j + k < aj; k++) pairs.push([olds[i + k]!, news[j + k]!])\n if (ai < olds.length) pairs.push([olds[ai]!, news[aj]!])\n i = ai + 1\n j = aj + 1\n }\n return pairs\n }\n\n /**\n * A keyed node gone from one parent and new under another is the same node, MOVED: morphed in place of the\n * remove and the insert. Repeats until no more are found (a moved node's own children may hold more).\n */\n private joinMoves(): void {\n for (let joined = true; joined;) {\n joined = false\n const gone = new Map<string, { lineup: Lineup<N>; at: number }>()\n for (const lineup of this.lineups)\n lineup.was.forEach((kid, at) => {\n const key = this.keyOf(kid)\n if (key !== undefined && !lineup.taken.has(at)) gone.set(key, { lineup, at })\n })\n for (const lineup of [...this.lineups])\n lineup.now.forEach((kid, at) => {\n const key = this.keyOf(kid)\n const old = key === undefined || lineup.match[at] !== -1 || lineup.from[at] ? undefined : gone.get(key)\n if (!old || this.tree.kind(old.lineup.was[old.at]!) !== this.tree.kind(kid)) return\n old.lineup.taken.add(old.at)\n gone.delete(key!)\n const address = old.lineup.addresses[old.at]!\n lineup.from[at] = address\n this.morph(old.lineup.was[old.at]!, kid, address)\n joined = true\n })\n }\n }\n\n /**\n * The steps that put each parent's children in their new order: removes for old children nothing took, then\n * inserts for new ones, moves for ones from elsewhere, and moves for kept ones now out of order.\n * - out of order: a kept child whose old place comes before the one kept before it\n */\n private placeSteps(): void {\n for (const lineup of this.lineups)\n lineup.was.forEach((_kid, at) => {\n if (!lineup.taken.has(at)) this.steps.push({ op: \"remove\", target: lineup.addresses[at]! })\n })\n for (const lineup of this.lineups) {\n let last = -1\n lineup.now.forEach((kid, index) => {\n const match = lineup.match[index]!\n const from = lineup.from[index]\n if (from) this.steps.push({ op: \"move\", target: from, parent: lineup.parent, index })\n else if (match < 0) this.steps.push({ op: \"insert\", parent: lineup.parent, index, node: kid })\n else if (match < last)\n this.steps.push({ op: \"move\", target: lineup.addresses[match]!, parent: lineup.parent, index })\n else last = match\n })\n }\n }\n\n /** Each of `kids`' address: `#key` for one keyed in the old tree, else `parent`'s plus `kind[n]`. */\n private addresses(kids: readonly N[], parent: string): string[] {\n const counts = new Map<string, number>()\n return kids.map((kid) => {\n const kind = this.tree.kind(kid)\n const n = (counts.get(kind) ?? 0) + 1\n counts.set(kind, n)\n const key = this.tree.key(kid)\n if (key !== undefined && this.oldKeys.has(key)) return `#${encodeURIComponent(key)}`\n return `${parent === ROOT ? \"\" : parent}/${kind}[${n}]`\n })\n }\n\n /** `node`'s key, when it matches by it: once in each tree. */\n private keyOf(node: N): string | undefined {\n const key = this.tree.key(node)\n return key !== undefined && this.keys.has(key) ? key : undefined\n }\n\n /** Are `a` and `b` the same, children and all? */\n private same(a: N, b: N): boolean {\n return this.tree.same ? this.tree.same(a, b) : this.signature(a) === this.signature(b)\n }\n\n /** `node` as one string: its kind, attributes, text and children's, cached. */\n private signature(node: N): string {\n let value = this.signatures.get(node)\n if (value === undefined) {\n const { tree } = this\n const attributes = Array.from(tree.attributes(node), ([name, at]) => `${name}=${JSON.stringify(at)}`).sort()\n const kids = tree.children(node).map((kid) => this.signature(kid))\n value = `${tree.kind(node)}[${attributes.join(\" \")}]${JSON.stringify(tree.text(node))}(${kids.join(\",\")})`\n this.signatures.set(node, value)\n }\n return value\n }\n}\n\n/** The most old-by-new same-kind pairs one parent's children are compared in, to line up unchanged ones. */\nconst ALIGN_LIMIT = 250_000\n\n/** The keys found exactly once in `root`'s tree. */\nfunction onceKeys<N>(root: N, tree: PatchTree<N>): Set<string> {\n const counts = new Map<string, number>()\n const walk = (node: N) => {\n const key = tree.key(node)\n if (key !== undefined) counts.set(key, (counts.get(key) ?? 0) + 1)\n for (const kid of tree.children(node)) walk(kid)\n }\n walk(root)\n return new Set([...counts].filter(([, count]) => count === 1).map(([key]) => key))\n}\n\n////////////////\n// ## The DOM\n////////////////\n\n/** `Node.TEXT_NODE` and `Node.ELEMENT_NODE`, spelled out: read where `Node` may not be a global (node's tests). */\nconst TEXT_NODE = 3\nconst ELEMENT_NODE = 1\n\n/** Is `node` an element? By its type, not `instanceof`: linkedom's nodes (node's tests) are no `Element`. */\nfunction isElement(node: Node): node is Element {\n return node.nodeType === ELEMENT_NODE\n}\n\n/** A DOM node's kind: its tag, or `TEXT_KIND`. */\nfunction kindOf(node: Node): string {\n return node.nodeType === TEXT_NODE ? TEXT_KIND : (node as Element).localName\n}\n\n/**\n * The children of `node` that count, in order: elements but the runtime's extras (`rules.skip`), and text nodes\n * with more than white space; only slotted ones under a `rules.slotsOnly()` element.\n */\nfunction sourceChildren(node: Node, rules: PatchRules): Node[] {\n const slots = node.nodeType === ELEMENT_NODE && !!rules.slotsOnly?.(node as Element)\n return Array.from(node.childNodes).filter((kid) => {\n if (kid.nodeType === TEXT_NODE) return !slots && (kid as Text).data.trim() !== \"\"\n if (kid.nodeType !== ELEMENT_NODE) return false\n const element = kid as Element\n if (rules.skip && element.matches(rules.skip)) return false\n return !slots || element.hasAttribute(\"slot\")\n })\n}\n\n/** The live node at `address` under `root`; throws a `PatchError` when there's none. */\nfunction resolveAddress(root: Element, address: string, rules: PatchRules): Node {\n const parts = address.split(\"/\")\n let node: Node | null = root\n const first = parts.shift()!\n if (first.startsWith(\"#\")) {\n const key = decodeURIComponent(first.slice(1))\n node = root.id === key ? root : root.querySelector(`[id=\"${CSS.escape(key)}\"]`)\n } else if (first !== \"\") node = null\n for (const part of parts) {\n if (!node || part === \"\") continue\n const step = /^(.+)\\[(\\d+)\\]$/.exec(part)\n if (!step) {\n node = null\n break\n }\n const [, kind, n] = step\n node = sourceChildren(node, rules).filter((kid) => kindOf(kid) === kind)[Number(n) - 1] ?? null\n }\n if (!node) throw new PatchError(`PagePatch.run(): nothing at ${address} in the live page; reload it`)\n return node\n}\n\n/**\n * Put `node` as child number `index` (counting what `sourceChildren()` counts) of `parent`:\n * right after the child before that place, else before the first, else at the end.\n */\nfunction placeChild(parent: Element, index: number, node: Node, rules: PatchRules): void {\n const kids = sourceChildren(parent, rules).filter((kid) => kid !== node)\n if (index > 0 && kids[index - 1]) (kids[index - 1] as ChildNode).after(node)\n else if (kids[0]) (kids[0] as ChildNode).before(node)\n else parent.append(node)\n}\n\n/** Set `text`'s text in place, keeping a selection on it where it was (clamped to the new length). */\nfunction setText(text: Text, value: string): void {\n const selection = getSelection()\n const range = selection?.rangeCount ? selection.getRangeAt(0) : undefined\n const keep =\n range && (range.startContainer === text || range.endContainer === text)\n ? {\n start: range.startContainer === text ? range.startOffset : undefined,\n end: range.endContainer === text ? range.endOffset : undefined,\n range: range.cloneRange()\n }\n : undefined\n text.data = value\n if (!keep || !selection) return\n const clamp = (offset: number) => Math.min(offset, value.length)\n try {\n const { range: was } = keep\n selection.setBaseAndExtent(\n keep.start === undefined ? was.startContainer : text,\n keep.start === undefined ? was.startOffset : clamp(keep.start),\n keep.end === undefined ? was.endContainer : text,\n keep.end === undefined ? was.endOffset : clamp(keep.end)\n )\n } catch {\n // the other end left the page: the selection goes, as the browser left it\n }\n}\n\n/**\n * The element in `root` that holds the field being typed in (a text field, a `<select>`, editable text), through\n * shadow roots: the field itself, or the host whose shadow root holds it; null when none is.\n */\nfunction typingIn(root: Element): Element | null {\n const active: Element | null = document.activeElement\n let deepest = active\n while (deepest?.shadowRoot?.activeElement) deepest = deepest.shadowRoot.activeElement\n if (!deepest || !isField(deepest)) return null\n return active && root.contains(active) ? active : null\n}\n\n/** Is `element` a field the reader types or picks in? */\nfunction isField(element: Element): boolean {\n return (\n element.matches(\n \"input:not([type=button], [type=submit], [type=reset], [type=checkbox], [type=radio]), textarea, select\"\n ) || (element as HTMLElement).isContentEditable\n )\n}\n\n/**\n * Carry the reader's state from `live` to `copy`, its replacement (not yet in the page):\n * - typed text: fields with an `id`\n * - open panels: each accordion's, matched by its nearest ancestor with an `id` and its order under it\n */\nfunction keepReaderState(live: Element, copy: Element): void {\n const panels = accordionsOf(live)\n for (const [key, accordion] of accordionsOf(copy)) {\n const old = panels.get(key)\n if (!old) continue\n // its `open` PROPERTY (the panels open now), or its attribute before it upgraded\n const open = String((old as Element & { open?: string | number }).open ?? old.getAttribute(\"open\") ?? \"\")\n .split(/[\\s,]+/)\n .filter((word) => /^\\d+$/.test(word))\n .join(\" \")\n if (open) accordion.setAttribute(\"open\", open)\n else accordion.removeAttribute(\"open\")\n }\n for (const field of withSelf(copy, \"textarea[id], input[id]\")) {\n const old = live.ownerDocument.getElementById(field.id) as HTMLInputElement | null\n if (!old || !live.contains(old) || old.value === undefined) continue\n if (field.localName === \"textarea\") field.textContent = old.value\n else field.setAttribute(\"value\", old.value)\n }\n}\n\n/** `root`'s accordions (itself included), by `<owner id>:<n>`: the nearest ancestor with an `id` inside `root`. */\nfunction accordionsOf(root: Element): Map<string, Element> {\n const byKey = new Map<string, Element>()\n const counts = new Map<string, number>()\n for (const accordion of withSelf(root, \"ui-accordion\")) {\n let owner = accordion === root ? null : accordion.parentElement\n while (owner && owner !== root && !owner.id) owner = owner.parentElement\n const name = accordion === root ? \"\" : (owner?.id ?? \"\")\n const n = counts.get(name) ?? 0\n counts.set(name, n + 1)\n byKey.set(`${name}:${n}`, accordion)\n }\n return byKey\n}\n\n/** `root` (when it matches `selector`) and every element under it that does, in document order. */\nfunction withSelf(root: Element, selector: string): Element[] {\n return [...(root.matches(selector) ? [root] : []), ...root.querySelectorAll(selector)]\n}\n\n/** How much a step brings in: its node's markup length. */\nfunction sizeOf(node: Node): number {\n return isElement(node) ? node.outerHTML.length : (node.textContent ?? \"\").length\n}\n\n/** Markup with every run of white space one space, and none between tags. */\nfunction squash(html: string): string {\n return html.replace(/\\s+/g, \" \").replace(/> </g, \"><\").trim()\n}\n\n/**\n * What a page loads: its stylesheets and scripts, one line each; not what the page server injects\n * (`/api/server/...`, the inline `SPELL_SERVER`), nor inert data blocks (`isInert()`).\n */\nfunction headKey(doc: Document): string {\n const parts = Array.from(\n doc.querySelectorAll('link[rel~=\"stylesheet\"]'),\n (link) => `css ${link.getAttribute(\"href\")}`\n )\n for (const script of doc.querySelectorAll(\"script\")) {\n const src = script.getAttribute(\"src\")\n if (src?.startsWith(\"/api/server/\") || (!src && script.textContent.includes(\"SPELL_SERVER\"))) continue\n if (!src && isInert(script)) continue\n // one the page server adds to every page (`PageServer.withPageScripts()`): not the page's own, and the copy sent\n // with a change may lack it; counted, every epic page reloaded on every edit (2026-10-25)\n if (script.hasAttribute(\"data-spell-page-script\")) continue\n parts.push(src ? `js ${src}` : `inline ${squash(script.textContent)}`)\n }\n return parts.join(\"\\n\")\n}\n\n/**\n * Is `script` INERT: a data block the browser never runs (`type=\"text/plain\"`, JSON ...),\n * not JavaScript or a module?\n */\nfunction isInert(script: Element): boolean {\n const type = (script.getAttribute(\"type\") ?? \"\").trim().toLowerCase()\n return type !== \"\" && type !== \"module\" && !/^(text|application)\\/(x-)?(java|ecma)script$/.test(type)\n}\n\n/**\n * Everything in a page's `<body>` but `main`'s content, the scripts and `<body>`'s attributes (but its `class`:\n * runtimes add their own), white space squashed.\n */\nfunction shellKey(doc: Document, mainOf: (root: ParentNode) => Element | null): string {\n const body = doc.body.cloneNode(true) as HTMLElement\n mainOf(body)?.replaceChildren()\n for (const script of body.querySelectorAll(\"script\")) script.remove()\n for (const name of body.getAttributeNames()) if (name !== \"class\") body.removeAttribute(name)\n return squash(body.outerHTML)\n}\n\n/** Set the `<body>` attributes whose source changed from `before` to `after` on `live`; never `class`. */\nfunction patchBodyAttributes(before: HTMLElement, after: HTMLElement, live: HTMLElement): void {\n for (const name of new Set([...before.getAttributeNames(), ...after.getAttributeNames()])) {\n const value = after.getAttribute(name)\n if (name === \"class\" || value === before.getAttribute(name)) continue\n if (value === null) live.removeAttribute(name)\n else live.setAttribute(name, value)\n }\n}\n","import { after } from \"spell/util/timing\"\nimport { HotDefinitions } from \"spell/element/HotDefinitions\"\n// Import directly: the site barrel would bring the site header into every page that swaps\nimport { PagePatch } from \"spell/server/site/PagePatch\"\n\n// Through the family's barrel, its lib entry: so `hot.js` shares `ComponentPacks` with `ui-components.js`\nimport { ComponentPacks } from \"spell/ui/components/ui-components\"\nimport type { PackSwap, PackSwapResult } from \"./UIComponents.types\"\n\n/****************\n * ### `PackHotSwap`\n * A page that swaps in a REBUILT component pack instead of reloading (epic `epic-engine` I116; Owen, 2026-10-25,\n * on every epic page reloading at each merge: \"YUCK. Can you do something about that?\").\n * - The page server's live client says which scripts changed, and offers them (`spell-server:scripts-reloading`) before it\n * reloads. When every one is a pack on the page, this takes them: no reload.\n * - Each pack's script runs again (`ComponentPacks.reload()`), and only the families whose sources changed are\n * swapped into the live elements, which re-render in place (the kit's `HotDefinitions`);\n * the rest keep their elements as they are.\n * - A change the platform can't take in place (a new tag, a new lifecycle callback ...): ONE page reload, once the page\n * is out of sight (the live client's `reload()`, epic `epic-engine` I171).\n * - new observed attributes and a new version of a family's DOM class swap in (`HotDefinitions`)\n * - What a re-rendered element keeps: itself, its attributes and properties, its light DOM;\n * what it loses: state inside its component (an open popover).\n * - Drawn as ONE short cross-fade (the kit's `PagePatch.crossFade()`, epic `epic-engine` I171): the old frame stays\n * up while the pack loads and its elements re-render, and what they load as they draw (a saga's name, a See Also\n * list) comes in, `SETTLE_MS`\n * - measured before: one frame with those missing, the page's top jumping up a block and back\n * - `install()` it as the page's bundle loads, BEFORE any pack defines its tags: `HotDefinitions` records each\n * definition as it happens. The docs bundle (spell-epic's `spell-ui.entry.js`) and the site's (`SitePacks.ts`) do.\n * - Its own lib entry, `spell/ui/hot`: only the pages that swap carry `HotDefinitions`.\n * - STATIC: one per page.\n ****************/\nexport class PackHotSwap {\n /** Install it on this page: `HotDefinitions`, and the live client's offer; idempotent. */\n static install() {\n if (PackHotSwap.isInstalled) return\n PackHotSwap.isInstalled = true\n HotDefinitions.install()\n addEventListener(SCRIPTS_EVENT, PackHotSwap.onScripts as EventListener)\n }\n\n /** How `ComponentPacks.reload()` swaps a pack in: `HotDefinitions`' keep predicate, then its update. */\n static readonly swap: PackSwap = {\n keep(keeps) {\n HotDefinitions.keeps = keeps\n },\n finish() {\n return !HotDefinitions.update().refused.length\n }\n }\n\n /**\n * The live client offers the scripts that changed (`spell-server:scripts-reloading`): take them when every one is a pack on\n * the page, and swap each in; else leave them, and the page reloads.\n */\n private static onScripts(event: CustomEvent<{ paths: string[] }>) {\n const paths = event.detail?.paths ?? []\n const sources = paths.map((path) => ComponentPacks.sourceOf(path))\n if (!paths.length || sources.some((source) => !source)) return\n event.preventDefault()\n PagePatch.crossFade(() => PackHotSwap.swapIn(sources as string[])).then(\n (results) => {\n if (results.includes(\"reload\")) PackHotSwap.reload()\n },\n (error: unknown) => {\n console.error(\"PackHotSwap: couldn't swap the rebuilt pack in; reloading\", error)\n PackHotSwap.reload()\n }\n )\n }\n\n /** Swap each pack in; once all swapped, wait `SETTLE_MS` for the re-rendered elements to draw what they load. */\n private static async swapIn(sources: string[]): Promise<PackSwapResult[]> {\n const results = await Promise.all(sources.map((source) => ComponentPacks.reload(source, PackHotSwap.swap)))\n if (!results.includes(\"reload\")) await after(SETTLE_MS / 1000)\n return results\n }\n\n /**\n * Reload the page: through the live client when it's there (`SPELL_SERVER.reload()`), else a plain reload.\n * - the live client's reloads quietly (epic `epic-engine` I172): it keeps the scroll, holds the new page behind\n * the old one until it's ready, then cross-fades it in (I164); while the reader types in a field, it waits for\n * the field to lose the focus\n * - measured before: `location.reload()` here lost the scroll and the item open, through ~150ms of bare background\n */\n private static reload() {\n const server = (globalThis as { SPELL_SERVER?: { reload?: () => void } }).SPELL_SERVER\n if (server?.reload) server.reload()\n else location.reload()\n }\n\n /** `install()` ran. */\n private static isInstalled = false\n}\n\n/** How long the old frame stays up after a swap, in ms, for the re-rendered elements to draw what they load. */\nconst SETTLE_MS = 150\n\n/** The live client's offer of the scripts that changed, before it reloads (the kit's `liveCl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MAAMjJ,EAAMkJ,IAAY,GAAI,GACtDD;CACT;CASA,OAAe,SAAS;EACtB,IAAME,IAAU,WAA0D;EAC1E,AAAIA,GAAQ,SAAQA,EAAO,OAAO,IAC7B,SAAS,OAAO;CACvB;CAGA,OAAe,cAAc;AAC/B,GAGMD,IAAY,KAGZP,IAAgB"}
|
package/dist/index.d.ts
CHANGED
|
@@ -15,6 +15,7 @@ export * from 'spell/ui/components/ui-grid';
|
|
|
15
15
|
export * from 'spell/ui/components/ui-image';
|
|
16
16
|
export * from 'spell/ui/components/ui-text';
|
|
17
17
|
export * from 'spell/ui/components/ui-flag';
|
|
18
|
+
export * from 'spell/ui/components/ui-dimension';
|
|
18
19
|
export * from 'spell/ui/components/ui-loader';
|
|
19
20
|
export * from 'spell/ui/components/ui-placeholder';
|
|
20
21
|
export * from 'spell/ui/components/ui-message';
|
|
@@ -57,6 +58,7 @@ export * from 'spell/ui/components/ui-select';
|
|
|
57
58
|
export * from 'spell/ui/components/ui-search';
|
|
58
59
|
export * from 'spell/ui/components/ui-progress';
|
|
59
60
|
export * from 'spell/ui/components/ui-rating';
|
|
61
|
+
export * from 'spell/ui/components/ui-sides';
|
|
60
62
|
export * from 'spell/ui/components/ui-icon-picker';
|
|
61
63
|
export * from 'spell/ui/components/ui-slider';
|
|
62
64
|
export * from 'spell/ui/components/ui-accordion';
|
|
@@ -69,6 +71,8 @@ export * from 'spell/ui/components/ui-embed';
|
|
|
69
71
|
export * from 'spell/ui/components/ui-calendar';
|
|
70
72
|
export * from 'spell/ui/components/ui-section';
|
|
71
73
|
export * from 'spell/ui/components/ui-panel';
|
|
74
|
+
export * from 'spell/ui/components/ui-split-panel';
|
|
75
|
+
export * from 'spell/ui/components/ui-tree';
|
|
72
76
|
export * from 'spell/ui/components/ui-toolbar';
|
|
73
77
|
export * from 'spell/ui/components/ui-action';
|
|
74
78
|
export * from 'spell/ui/components/ui-property-editor';
|
|
@@ -77,6 +81,10 @@ export * from 'spell/ui/components/ui-code';
|
|
|
77
81
|
export * from 'spell/ui/components/ui-example';
|
|
78
82
|
export * from 'spell/ui/components/ui-toc';
|
|
79
83
|
export * from 'spell/ui/components/ui-include';
|
|
84
|
+
export * from 'spell/ui/components/ui-json';
|
|
80
85
|
export * from 'spell/ui/components/ui-tree-diagram';
|
|
86
|
+
export * from 'spell/ui/components/ui-diagram';
|
|
87
|
+
export * from 'spell/ui/components/ui-site-nav';
|
|
88
|
+
export * from 'spell/ui/components/ui-site-tabs';
|
|
81
89
|
export * from 'spell/ui/components/ui-theme-editor';
|
|
82
90
|
export * from 'spell/ui/components/ui-theme-menu';
|
package/dist/index.js
CHANGED
|
@@ -1,82 +1,92 @@
|
|
|
1
|
-
import { APP_STYLESHEET_ID as e, AnimationNames as t, ApiError as n, BuiltInIconPacks as r, BuiltInPacks as i, CODE_LANGUAGES_EVENT as a, CssDisplay as o, DEFAULT_ICON_PACK as s, EN_STRINGS as c, ICON_PACK_INDEX as l, ICON_PREFIX_SEPARATOR as u, IconName as d, LAYER_ORDER as f,
|
|
2
|
-
import { UIButton as
|
|
3
|
-
import { UIItem as
|
|
4
|
-
import { UIDropdown as
|
|
5
|
-
import { UIIcon as
|
|
6
|
-
import { UILabel as
|
|
7
|
-
import { UIActions as
|
|
8
|
-
import { UIDivider as
|
|
9
|
-
import { UISegment as
|
|
10
|
-
import { UIContainer as
|
|
11
|
-
import { UIColumn as
|
|
12
|
-
import { UIImage as
|
|
13
|
-
import { UILink as
|
|
14
|
-
import { FlagCountry as
|
|
15
|
-
import {
|
|
16
|
-
import {
|
|
17
|
-
import {
|
|
18
|
-
import {
|
|
19
|
-
import {
|
|
20
|
-
import {
|
|
21
|
-
import {
|
|
22
|
-
import {
|
|
23
|
-
import {
|
|
24
|
-
import {
|
|
25
|
-
import {
|
|
26
|
-
import {
|
|
27
|
-
import {
|
|
28
|
-
import {
|
|
29
|
-
import {
|
|
30
|
-
import {
|
|
31
|
-
import {
|
|
32
|
-
import {
|
|
33
|
-
import {
|
|
34
|
-
import {
|
|
35
|
-
import {
|
|
36
|
-
import {
|
|
37
|
-
import {
|
|
38
|
-
import {
|
|
39
|
-
import {
|
|
40
|
-
import {
|
|
1
|
+
import { APP_STYLESHEET_ID as e, AnimationNames as t, ApiError as n, BuiltInIconPacks as r, BuiltInPacks as i, CODE_LANGUAGES_EVENT as a, CssDisplay as o, DEFAULT_ICON_PACK as s, EN_STRINGS as c, ICON_PACK_INDEX as l, ICON_PREFIX_SEPARATOR as u, IconName as d, LAYER_ORDER as f, ListSelection as p, LoadOnce as m, NodeType as h, PAGE_SCOPE as g, Queued as _, RUNTIME_KEY as v, RUNTIME_VERSION as y, SCROLL_LOCK_CLASS as b, SourceError as x, SourceErrorKinds as S, TEMPORAL_POLYFILL as C, TopLayerTip as w, UI as T, UIT as E, UTILITIES_SHEET as D, VisibilityDirection as O, Warnings as k, after as A, afterSolidUpdate as j, answerOf as M, beforeNextPaint as N, byDocumentOrder as P, camelCase as F, clamp as I, closestAcrossShadow as L, copyText as R, dedent as z, escapeHTML as B, escapeRegExp as V, every as H, fetchOk as U, fetchText as W, flatParentFor as G, forget as K, getSuperHierarchy as q, hasDescriptor as J, hasOwnProp as Y, indented as X, isBrowser as Z, kb as Q, kebabCase as $, lazy as ee, letNodeEnd as te, levenshtein as ne, loadUI as re, nextFrame as ie, numberToWord as ae, once as oe, proto as se, protoMerged as ce, resets as le, scrollByRow as ue, scrollEnds as de, scrollIntoSight as fe, scrollingBoxFor as pe, slug as me, soon as he, suggest as ge, waitUntil as _e, whenDefined as ve, within as ye, withoutAccents as be } from "./core.js";
|
|
2
|
+
import { UIButton as xe, UIButtons as Se, UIOr as Ce } from "./ui-button.js";
|
|
3
|
+
import { UIItem as we, itemVocabulary as Te } from "./ui-item.js";
|
|
4
|
+
import { UIDropdown as Ee } from "./ui-dropdown.js";
|
|
5
|
+
import { UIIcon as De, UIIcons as Oe } from "./ui-icon.js";
|
|
6
|
+
import { UILabel as ke, UILabels as Ae } from "./ui-label.js";
|
|
7
|
+
import { UIActions as je, UIAuthor as Me, UIAvatar as Ne, UIContent as Pe, UIDate as Fe, UIDescription as Ie, UIDetail as Le, UIExtra as Re, UIHeader as ze, UIMeta as Be, UISummary as Ve, UITitle as He, UIValue as Ue } from "./ui-parts.js";
|
|
8
|
+
import { UIDivider as We } from "./ui-divider.js";
|
|
9
|
+
import { UISegment as Ge, UISegments as Ke } from "./ui-segment.js";
|
|
10
|
+
import { UIContainer as qe } from "./ui-container.js";
|
|
11
|
+
import { UIColumn as Je, UIGrid as Ye, UIRow as Xe } from "./ui-grid.js";
|
|
12
|
+
import { UIImage as Ze, UIImages as Qe } from "./ui-image.js";
|
|
13
|
+
import { UILink as $e, UIText as et } from "./ui-text.js";
|
|
14
|
+
import { FlagCountry as tt, UIFlag as nt } from "./ui-flag.js";
|
|
15
|
+
import { UIDimension as rt } from "./ui-dimension.js";
|
|
16
|
+
import { UILoader as it } from "./ui-loader.js";
|
|
17
|
+
import { UIPlaceholder as at, UIPlaceholderHeader as ot, UIPlaceholderImage as st, UIPlaceholderLine as ct, UIPlaceholderParagraph as lt } from "./ui-placeholder.js";
|
|
18
|
+
import { UIMessage as ut } from "./ui-message.js";
|
|
19
|
+
import { UIBreadcrumb as dt, UIBreadcrumbs as ft } from "./ui-breadcrumbs.js";
|
|
20
|
+
import { UIInput as pt, UITextarea as mt } from "./ui-input.js";
|
|
21
|
+
import { DOMCheckElement as ht, UICheckbox as gt, UIRadio as _t } from "./ui-checkbox.js";
|
|
22
|
+
import { DOMFieldElement as vt, DOMFormElement as yt, FormBinding as bt, FormFields as xt, UIField as St, UIFields as Ct, UIForm as wt, UIRepeat as Tt } from "./ui-form.js";
|
|
23
|
+
import { UIList as Et } from "./ui-list.js";
|
|
24
|
+
import { UIMenu as Dt } from "./ui-menu.js";
|
|
25
|
+
import { UICell as Ot, UITable as kt } from "./ui-table.js";
|
|
26
|
+
import { UIPopup as At } from "./ui-popup.js";
|
|
27
|
+
import { DialogComponent as jt, ModalDialogs as Mt, UIModal as Nt } from "./ui-modal.js";
|
|
28
|
+
import { ImageZoom as Pt, UIZoom as Ft } from "./ui-zoom.js";
|
|
29
|
+
import { DOMTransitionElement as It, UITransition as Lt } from "./ui-transition.js";
|
|
30
|
+
import { UIDimmer as Rt } from "./ui-dimmer.js";
|
|
31
|
+
import { UIFlyout as zt } from "./ui-flyout.js";
|
|
32
|
+
import { UIPushable as Bt, UIPusher as Vt, UISidebar as Ht } from "./ui-sidebar.js";
|
|
33
|
+
import { DOMShapeElement as Ut, UIShape as Wt, UISide as Gt } from "./ui-shape.js";
|
|
34
|
+
import { UICard as Kt, UICards as qt } from "./ui-card.js";
|
|
35
|
+
import { UIItems as Jt } from "./ui-items.js";
|
|
36
|
+
import { UIFeed as Yt, UIFeedEvent as Xt } from "./ui-feed.js";
|
|
37
|
+
import { UIComment as Zt, UIComments as Qt } from "./ui-comment.js";
|
|
38
|
+
import { UISpace as $t } from "./ui-space.js";
|
|
39
|
+
import { UIStack as en } from "./ui-stack.js";
|
|
40
|
+
import { UIQuote as tn } from "./ui-quote.js";
|
|
41
|
+
import { t as nn } from "./UIKeys-Rh_gUZjP.js";
|
|
41
42
|
import "./ui-keys.js";
|
|
42
|
-
import { ComponentPacks as
|
|
43
|
-
import { LoaderMessage as
|
|
44
|
-
import { UIPage as
|
|
45
|
-
import { DOMMediaElement as
|
|
46
|
-
import { UITerm as
|
|
47
|
-
import { UIStatistic as
|
|
48
|
-
import { UIStep as
|
|
49
|
-
import { UIRail as
|
|
50
|
-
import { UIReveal as
|
|
51
|
-
import { UIAd as
|
|
52
|
-
import { EmojiData as
|
|
53
|
-
import { UISelect as
|
|
54
|
-
import { SearchMatcher as
|
|
55
|
-
import { ProgressValues as
|
|
56
|
-
import { DOMRatingElement as
|
|
57
|
-
import {
|
|
58
|
-
import {
|
|
59
|
-
import {
|
|
60
|
-
import {
|
|
61
|
-
import {
|
|
62
|
-
import {
|
|
63
|
-
import {
|
|
64
|
-
import {
|
|
65
|
-
import {
|
|
66
|
-
import {
|
|
67
|
-
import {
|
|
68
|
-
import {
|
|
69
|
-
import {
|
|
70
|
-
import {
|
|
71
|
-
import {
|
|
72
|
-
import {
|
|
73
|
-
import {
|
|
74
|
-
import {
|
|
75
|
-
import {
|
|
76
|
-
import {
|
|
77
|
-
import {
|
|
78
|
-
import {
|
|
79
|
-
import {
|
|
80
|
-
import {
|
|
81
|
-
import {
|
|
82
|
-
|
|
43
|
+
import { ComponentPacks as rn, UIComponents as an, registerPack as on } from "./ui-components.js";
|
|
44
|
+
import { LoaderMessage as sn, RootLoader as cn, UIRoot as ln } from "./ui-root.js";
|
|
45
|
+
import { UIPage as un } from "./ui-page.js";
|
|
46
|
+
import { DOMMediaElement as dn, UIAudio as fn, UIVideo as pn } from "./ui-video.js";
|
|
47
|
+
import { UITerm as mn, UITerms as hn } from "./ui-terms.js";
|
|
48
|
+
import { UIStatistic as gn, UIStatistics as _n } from "./ui-statistic.js";
|
|
49
|
+
import { UIStep as vn, UISteps as yn } from "./ui-step.js";
|
|
50
|
+
import { UIRail as bn } from "./ui-rail.js";
|
|
51
|
+
import { UIReveal as xn } from "./ui-reveal.js";
|
|
52
|
+
import { UIAd as Sn } from "./ui-ad.js";
|
|
53
|
+
import { EmojiData as Cn, UIEmoji as wn } from "./ui-emoji.js";
|
|
54
|
+
import { UISelect as Tn } from "./ui-select.js";
|
|
55
|
+
import { SearchMatcher as En, UISearch as Dn } from "./ui-search.js";
|
|
56
|
+
import { ProgressValues as On, UIProgress as kn } from "./ui-progress.js";
|
|
57
|
+
import { DOMRatingElement as An, UIRating as jn } from "./ui-rating.js";
|
|
58
|
+
import { DOMSidesElement as Mn, UISides as Nn } from "./ui-sides.js";
|
|
59
|
+
import { IconCatalog as Pn, UIIconPicker as Fn } from "./ui-icon-picker.js";
|
|
60
|
+
import { SliderScale as In, UISlider as Ln } from "./ui-slider.js";
|
|
61
|
+
import { UIAccordion as Rn } from "./ui-accordion.js";
|
|
62
|
+
import { UITab as zn, UITabs as Bn } from "./ui-tab.js";
|
|
63
|
+
import { DOMToastElement as Vn, ToastStack as Hn, UIToast as Un } from "./ui-toast.js";
|
|
64
|
+
import { DOMNagElement as Wn, DismissalStore as Gn, UINag as Kn } from "./ui-nag.js";
|
|
65
|
+
import { UISticky as qn } from "./ui-sticky.js";
|
|
66
|
+
import { UIVisibility as Jn } from "./ui-visibility.js";
|
|
67
|
+
import { DOMEmbedElement as Yn, EmbedSources as Xn, UIEmbed as Zn } from "./ui-embed.js";
|
|
68
|
+
import { UICalendar as Qn } from "./ui-calendar.js";
|
|
69
|
+
import { UISection as $n, UISections as er } from "./ui-section.js";
|
|
70
|
+
import { UIPanel as tr } from "./ui-panel.js";
|
|
71
|
+
import { UISplitPanel as nr } from "./ui-split-panel.js";
|
|
72
|
+
import { UITree as rr, UITreeItem as ir } from "./ui-tree.js";
|
|
73
|
+
import { UISiteNav as ar } from "./ui-site-nav.js";
|
|
74
|
+
import { UIToolbar as or } from "./ui-toolbar.js";
|
|
75
|
+
import { UISiteTabs as sr } from "./ui-site-tabs.js";
|
|
76
|
+
import { UIAction as cr } from "./ui-action.js";
|
|
77
|
+
import { DOMPropertyEditorElement as lr, DOMPropertyElement as ur, DOMPropertyGroupElement as dr, UIProperty as fr, UIPropertyEditor as pr, UIPropertyGroup as mr } from "./ui-property-editor.js";
|
|
78
|
+
import { DOMIncludeElement as hr, UIInclude as gr } from "./ui-include.js";
|
|
79
|
+
import { DOMJsonElement as _r, JsonChild as vr, UIJson as yr } from "./ui-json.js";
|
|
80
|
+
import { CodeHighlighter as br, CodeLines as xr, DOMCodeElement as Sr, UICode as Cr } from "./ui-code.js";
|
|
81
|
+
import { ExampleSource as wr, HtmlFormatter as Tr, UIExample as Er } from "./ui-example.js";
|
|
82
|
+
import { HashLanding as Dr, PageOutline as Or, TocIndex as kr, UIToc as Ar } from "./ui-toc.js";
|
|
83
|
+
import { DOMMarkdownElement as jr, MarkdownRenderer as Mr, UIMarkdown as Nr } from "./ui-markdown.js";
|
|
84
|
+
import { t as Pr } from "./TreeMeasure-BVJeGb1L.js";
|
|
85
|
+
import { TreeData as Fr, TreeLayout as Ir, UITreeDiagram as Lr, UITreeNode as Rr } from "./ui-tree-diagram.js";
|
|
86
|
+
import { DiagramColumns as zr, DiagramLayout as Br, DiagramSVG as Vr, UIDiagram as Hr, UIDiagramNode as Ur } from "./ui-diagram.js";
|
|
87
|
+
import { A as Wr, C as Gr, D as Kr, E as qr, F as Jr, M as Yr, N as Xr, O as Zr, P as Qr, S as $r, T as ei, _ as ti, a as ni, b as ri, c as ii, d as ai, f as oi, g as si, h as ci, i as li, j as ui, k as di, l as fi, m as pi, n as mi, o as hi, p as gi, r as _i, s as vi, t as yi, u as bi, v as xi, w as Si, x as Ci, y as wi } from "./styles.en-CUUxNwHo.js";
|
|
88
|
+
import { r as Ti, t as Ei } from "./ThemeDraft-B7NPif4d.js";
|
|
89
|
+
import { a as Di, n as Oi, o as ki, r as Ai, s as ji } from "./ui-theme-menu-CuIjr8Ou.js";
|
|
90
|
+
import { DOMThemeEditorElement as Mi, PageBridge as Ni, TokenColor as Pi, TokenTree as Fi, UIThemeEditor as Ii } from "./ui-theme-editor.js";
|
|
91
|
+
import { animationsCSS as Li, colorsCSS as Ri, foundationCSS as zi, layersCSS as Bi, nativeCSS as Vi, pageCSS as Hi, resetCSS as Ui, sizesCSS as Wi, tokensCSS as Gi, typographyCSS as Ki, utilitiesCSS as qi } from "./styles.js";
|
|
92
|
+
export { e as APP_STYLESHEET_ID, t as AnimationNames, n as ApiError, r as BuiltInIconPacks, i as BuiltInPacks, a as CODE_LANGUAGES_EVENT, br as CodeHighlighter, xr as CodeLines, rn as ComponentPacks, o as CssDisplay, s as DEFAULT_ICON_PACK, ht as DOMCheckElement, Sr as DOMCodeElement, Yn as DOMEmbedElement, vt as DOMFieldElement, yt as DOMFormElement, hr as DOMIncludeElement, _r as DOMJsonElement, jr as DOMMarkdownElement, dn as DOMMediaElement, Wn as DOMNagElement, lr as DOMPropertyEditorElement, ur as DOMPropertyElement, dr as DOMPropertyGroupElement, An as DOMRatingElement, Ut as DOMShapeElement, Mn as DOMSidesElement, Mi as DOMThemeEditorElement, Vn as DOMToastElement, It as DOMTransitionElement, zr as DiagramColumns, Br as DiagramLayout, Vr as DiagramSVG, jt as DialogComponent, Gn as DismissalStore, c as EN_STRINGS, Xn as EmbedSources, Cn as EmojiData, wr as ExampleSource, tt as FlagCountry, bt as FormBinding, xt as FormFields, Dr as HashLanding, Tr as HtmlFormatter, Di as HueDropdown, l as ICON_PACK_INDEX, u as ICON_PREFIX_SEPARATOR, Pn as IconCatalog, d as IconName, Pt as ImageZoom, vr as JsonChild, f as LAYER_ORDER, p as ListSelection, m as LoadOnce, sn as LoaderMessage, Mr as MarkdownRenderer, Mt as ModalDialogs, h as NodeType, g as PAGE_SCOPE, Ni as PageBridge, Or as PageOutline, On as ProgressValues, _ as Queued, v as RUNTIME_KEY, y as RUNTIME_VERSION, cn as RootLoader, b as SCROLL_LOCK_CLASS, ji as SavedTheme, En as SearchMatcher, In as SliderScale, x as SourceError, S as SourceErrorKinds, C as TEMPORAL_POLYFILL, Ei as ThemeDraft, Ai as ThemeMenu, ki as ThemePreference, Ti as ThemeTokens, Hn as ToastStack, kr as TocIndex, Pi as TokenColor, Fi as TokenTree, w as TopLayerTip, Fr as TreeData, Ir as TreeLayout, Pr as TreeMeasure, T as UI, Rn as UIAccordion, cr as UIAction, je as UIActions, Sn as UIAd, fn as UIAudio, Me as UIAuthor, Ne as UIAvatar, dt as UIBreadcrumb, ft as UIBreadcrumbs, xe as UIButton, Se as UIButtons, Qn as UICalendar, Kt as UICard, qt as UICards, Ot as UICell, gt as UICheckbox, Cr as UICode, Je as UIColumn, Zt as UIComment, Qt as UIComments, an as UIComponents, qe as UIContainer, Pe as UIContent, Fe as UIDate, Ie as UIDescription, Le as UIDetail, Hr as UIDiagram, Ur as UIDiagramNode, rt as UIDimension, Rt as UIDimmer, We as UIDivider, Ee as UIDropdown, Zn as UIEmbed, wn as UIEmoji, Er as UIExample, Re as UIExtra, Yt as UIFeed, Xt as UIFeedEvent, St as UIField, Ct as UIFields, nt as UIFlag, zt as UIFlyout, wt as UIForm, Ye as UIGrid, ze as UIHeader, De as UIIcon, Fn as UIIconPicker, Oe as UIIcons, Ze as UIImage, Qe as UIImages, gr as UIInclude, pt as UIInput, we as UIItem, Jt as UIItems, yr as UIJson, nn as UIKeys, ke as UILabel, Ae as UILabels, $e as UILink, Et as UIList, it as UILoader, Nr as UIMarkdown, Dt as UIMenu, ut as UIMessage, Be as UIMeta, Nt as UIModal, Kn as UINag, Ce as UIOr, un as UIPage, tr as UIPanel, at as UIPlaceholder, ot as UIPlaceholderHeader, st as UIPlaceholderImage, ct as UIPlaceholderLine, lt as UIPlaceholderParagraph, At as UIPopup, kn as UIProgress, fr as UIProperty, pr as UIPropertyEditor, mr as UIPropertyGroup, Bt as UIPushable, Vt as UIPusher, tn as UIQuote, _t as UIRadio, bn as UIRail, jn as UIRating, Tt as UIRepeat, xn as UIReveal, ln as UIRoot, Xe as UIRow, Dn as UISearch, $n as UISection, er as UISections, Ge as UISegment, Ke as UISegments, Tn as UISelect, Wt as UIShape, Gt as UISide, Ht as UISidebar, Nn as UISides, ar as UISiteNav, sr as UISiteTabs, Ln as UISlider, $t as UISpace, nr as UISplitPanel, en as UIStack, gn as UIStatistic, _n as UIStatistics, vn as UIStep, yn as UISteps, qn as UISticky, Ve as UISummary, E as UIT, zn as UITab, kt as UITable, Bn as UITabs, mn as UITerm, hn as UITerms, et as UIText, mt as UITextarea, Ii as UIThemeEditor, Oi as UIThemeMenu, He as UITitle, Un as UIToast, Ar as UIToc, or as UIToolbar, Lt as UITransition, rr as UITree, Lr as UITreeDiagram, ir as UITreeItem, Rr as UITreeNode, Ue as UIValue, pn as UIVideo, Jn as UIVisibility, Ft as UIZoom, D as UTILITIES_SHEET, O as VisibilityDirection, k as Warnings, A as after, j as afterSolidUpdate, Li as animationsCSS, M as answerOf, N as beforeNextPaint, yi as borderAlphas, mi as borderWidth, _i as breakpoints, P as byDocumentOrder, F as camelCase, li as captionRatio, I as clamp, L as closestAcrossShadow, ni as codeEditorColors, hi as codeLightness, vi as codeRoles, Ri as colorsCSS, ii as controlCursor, fi as controlHeight, R as copyText, z as dedent, bi as disabledOpacity, ai as durations, oi as easings, B as escapeHTML, V as escapeRegExp, H as every, U as fetchOk, W as fetchText, G as flatParentFor, gi as focusRing, pi as fontSize, ci as fontWeights, si as fonts, K as forget, zi as foundationCSS, q as getSuperHierarchy, J as hasDescriptor, Y as hasOwnProp, ti as headingRatio, xi as hoverDelay, wi as hueAliases, ri as hueRoles, Ci as hueStates, $r as hues, X as indented, Z as isBrowser, Te as itemVocabulary, Q as kb, $ as kebabCase, Bi as layersCSS, ee as lazy, te as letNodeEnd, ne as levenshtein, Gr as lineHeights, re as loadUI, Vi as nativeCSS, Si as neutrals, ie as nextFrame, ae as numberToWord, ei as onColors, oe as once, Hi as pageCSS, se as proto, ce as protoMerged, qr as radii, on as registerPack, Ui as resetCSS, le as resets, ue as scrollByRow, de as scrollEnds, fe as scrollIntoSight, pe as scrollingBoxFor, Kr as semanticAliases, Zr as semanticColors, di as semanticRoles, Wr as shadows, ui as sizes, Wi as sizesCSS, me as slug, he as soon, Yr as spacing, ge as suggest, Xr as textAlphas, Qr as themeTree, Gi as tokensCSS, Ki as typographyCSS, qi as utilitiesCSS, _e as waitUntil, ve as whenDefined, ye as within, be as withoutAccents, Jr as zIndices };
|