spell-ui 0.8.6 → 0.8.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README-components.md +14 -6
- package/README-frameworks.md +22 -12
- package/README-migrating.md +7 -6
- package/README-runtime.md +14 -13
- package/README-site.md +11 -11
- package/README-themes.md +38 -11
- package/README.md +61 -73
- package/dist/Dragging-CMZoLEWQ.js +169 -0
- package/dist/Dragging-CMZoLEWQ.js.map +1 -0
- package/dist/{MarkdownEngine-CbuT9Mjc.js → MarkdownEngine-CW1WGqNp.js} +122 -100
- package/dist/MarkdownEngine-CW1WGqNp.js.map +1 -0
- package/dist/{PrefStore-CeaTtjTz.js → PrefStore-Qv0e5y04.js} +22 -22
- package/dist/PrefStore-Qv0e5y04.js.map +1 -0
- package/dist/ScrollingRow-7n7Z-HIE.js +88 -0
- package/dist/ScrollingRow-7n7Z-HIE.js.map +1 -0
- package/dist/SitePages-CciwREek.js +51 -0
- package/dist/SitePages-CciwREek.js.map +1 -0
- package/dist/{SlottedItems-Ch0tzzlL.js → SlottedItems-Du3aJwG1.js} +22 -22
- package/dist/{SlottedItems-Ch0tzzlL.js.map → SlottedItems-Du3aJwG1.js.map} +1 -1
- package/dist/ThemeDraft-B7NPif4d.js +805 -0
- package/dist/ThemeDraft-B7NPif4d.js.map +1 -0
- package/dist/TreeMeasure-BVJeGb1L.js +42 -0
- package/dist/TreeMeasure-BVJeGb1L.js.map +1 -0
- package/dist/UIButton-DFEds67r.js +6 -0
- package/dist/UIButton-DFEds67r.js.map +1 -0
- package/dist/UIInput-BodVbUoQ.js +6 -0
- package/dist/UIInput-BodVbUoQ.js.map +1 -0
- package/dist/{UIKeys-DJF2TIKE.js → UIKeys-Rh_gUZjP.js} +10 -9
- package/dist/UIKeys-Rh_gUZjP.js.map +1 -0
- package/dist/UILabel-DgJUBzB_.js +6 -0
- package/dist/UILabel-DgJUBzB_.js.map +1 -0
- package/dist/UIMenu-zdcAtwTa.js +42 -0
- package/dist/UIMenu-zdcAtwTa.js.map +1 -0
- package/dist/{UIRuntime-BBuehGly.js → UIRuntime-KH309p5B.js} +398 -207
- package/dist/UIRuntime-KH309p5B.js.map +1 -0
- package/dist/_spell-element/DOMElement.d.ts +62 -5
- package/dist/_spell-element/MoveAndResize.d.ts +75 -0
- package/dist/_spell-element/UIComponent.d.ts +42 -0
- package/dist/_spell-element/elements.types.d.ts +47 -0
- package/dist/_spell-element/index.d.ts +1 -0
- package/dist/_spell-element/vocabulary.types.d.ts +34 -2
- package/dist/{runtime → _util}/Api.d.ts +14 -4
- package/dist/_util/Dragging.d.ts +148 -0
- package/dist/_util/ListSelection.d.ts +46 -0
- package/dist/{util → _util}/LoadOnce.d.ts +9 -1
- package/dist/_util/ReconnectingSocket.d.ts +51 -0
- package/dist/_util/diagram/DiagramColumns.d.ts +14 -0
- package/dist/_util/diagram/DiagramLayout.d.ts +119 -0
- package/dist/_util/diagram/DiagramSVG.d.ts +17 -0
- package/dist/_util/dom.d.ts +10 -0
- package/dist/_util/fetching.d.ts +92 -0
- package/dist/_util/measures/Dimension.d.ts +63 -0
- package/dist/_util/measures/MeasureSystem.d.ts +66 -0
- package/dist/_util/measures/dimensions.generated.d.ts +16 -0
- package/dist/_util/persist/ColorScheme.d.ts +6 -0
- package/dist/_util/persist/ServerPlace.d.ts +42 -0
- package/dist/_util/persist/WaitedOnPlace.d.ts +27 -0
- package/dist/_util/persist/persist.types.d.ts +21 -2
- package/dist/_util/timing.d.ts +10 -1
- package/dist/api.js +8 -7
- package/dist/api.js.map +1 -1
- package/dist/components/ComponentDefinitions.d.ts +29 -0
- package/dist/components/components.es.d.ts +13 -0
- package/dist/components/components.types.d.ts +113 -8
- package/dist/components/ui-accordion/UIAccordion.d.ts +1 -0
- package/dist/components/ui-accordion/UIAccordion.en.d.ts +1 -0
- package/dist/components/ui-action/UIAction.en.d.ts +5 -1
- package/dist/components/ui-ad/UIAd.d.ts +1 -0
- package/dist/components/ui-ad/UIAd.en.d.ts +1 -0
- package/dist/components/ui-breadcrumbs/UIBreadcrumb.d.ts +1 -0
- package/dist/components/ui-breadcrumbs/UIBreadcrumb.en.d.ts +1 -0
- package/dist/components/ui-breadcrumbs/UIBreadcrumbs.d.ts +1 -0
- package/dist/components/ui-breadcrumbs/UIBreadcrumbs.en.d.ts +1 -0
- package/dist/components/ui-button/UIButton.d.ts +8 -3
- package/dist/components/ui-button/UIButton.en.d.ts +9 -4
- package/dist/components/ui-button/UIButton.es.d.ts +6 -0
- package/dist/components/ui-button/UIButton.fallback.d.ts +8 -3
- package/dist/components/ui-button/UIButtons.d.ts +1 -0
- package/dist/components/ui-button/UIButtons.en.d.ts +1 -0
- package/dist/components/ui-button/UIOr.d.ts +1 -0
- package/dist/components/ui-button/UIOr.en.d.ts +1 -0
- package/dist/components/ui-calendar/UICalendar.d.ts +6 -0
- package/dist/components/ui-calendar/UICalendar.en.d.ts +6 -0
- package/dist/components/ui-calendar/UICalendar.fallback.d.ts +6 -0
- package/dist/components/ui-card/CardClicks.d.ts +40 -0
- package/dist/components/ui-card/UICard.d.ts +41 -0
- package/dist/components/ui-card/UICard.en.d.ts +49 -0
- package/dist/components/ui-card/UICard.es.d.ts +1 -0
- package/dist/components/ui-card/UICards.d.ts +31 -0
- package/dist/components/ui-card/UICards.en.d.ts +31 -0
- package/dist/components/ui-card/UICards.es.d.ts +8 -0
- package/dist/components/ui-checkbox/CheckControl.d.ts +7 -0
- package/dist/components/ui-checkbox/UICheckbox.d.ts +7 -0
- package/dist/components/ui-checkbox/UICheckbox.en.d.ts +7 -0
- package/dist/components/ui-checkbox/UICheckbox.es.d.ts +1 -0
- package/dist/components/ui-checkbox/UICheckbox.fallback.d.ts +7 -0
- package/dist/components/ui-checkbox/UICheckbox.types.d.ts +5 -0
- package/dist/components/ui-checkbox/UIRadio.d.ts +8 -0
- package/dist/components/ui-checkbox/UIRadio.en.d.ts +6 -0
- package/dist/components/ui-code/UICode.en.d.ts +1 -0
- package/dist/components/ui-comment/UIComment.d.ts +1 -0
- package/dist/components/ui-comment/UIComment.en.d.ts +1 -0
- package/dist/components/ui-comment/UIComments.d.ts +1 -0
- package/dist/components/ui-comment/UIComments.en.d.ts +1 -0
- package/dist/components/ui-components/PackHotSwap.d.ts +13 -3
- package/dist/components/ui-components/UIComponents.d.ts +1 -0
- package/dist/components/ui-components/UIComponents.en.d.ts +1 -0
- package/dist/components/ui-container/UIContainer.d.ts +11 -0
- package/dist/components/ui-container/UIContainer.en.d.ts +7 -0
- package/dist/components/ui-container/UIContainer.es.d.ts +1 -0
- package/dist/components/ui-diagram/UIDiagram.d.ts +268 -0
- package/dist/components/ui-diagram/UIDiagram.en.d.ts +106 -0
- package/dist/components/ui-diagram/UIDiagram.es.d.ts +37 -0
- package/dist/components/ui-diagram/UIDiagramNode.d.ts +98 -0
- package/dist/components/ui-diagram/UIDiagramNode.en.d.ts +38 -0
- package/dist/components/ui-diagram/UIDiagramNode.es.d.ts +16 -0
- package/dist/components/ui-diagram/index.d.ts +8 -0
- package/dist/components/ui-dimension/UIDimension.d.ts +81 -0
- package/dist/components/ui-dimension/UIDimension.en.d.ts +54 -0
- package/dist/components/ui-dimension/UIDimension.es.d.ts +22 -0
- package/dist/components/ui-dimension/index.d.ts +2 -0
- package/dist/components/ui-dimmer/UIDimmer.d.ts +6 -1
- package/dist/components/ui-dimmer/UIDimmer.en.d.ts +1 -0
- package/dist/components/ui-dimmer/UIDimmer.es.d.ts +1 -1
- package/dist/components/ui-divider/UIDivider.d.ts +2 -0
- package/dist/components/ui-divider/UIDivider.en.d.ts +2 -0
- package/dist/components/ui-divider/UIDivider.es.d.ts +1 -0
- package/dist/components/ui-dropdown/UIDropdown.d.ts +6 -0
- package/dist/components/ui-dropdown/UIDropdown.en.d.ts +6 -0
- package/dist/components/ui-dropdown/UIDropdown.fallback.d.ts +6 -0
- package/dist/components/ui-embed/UIEmbed.d.ts +1 -0
- package/dist/components/ui-embed/UIEmbed.en.d.ts +1 -0
- package/dist/components/ui-emoji/UIEmoji.d.ts +1 -0
- package/dist/components/ui-emoji/UIEmoji.en.d.ts +1 -0
- package/dist/components/ui-example/UIExample.en.d.ts +4 -2
- package/dist/components/ui-example/UIExample.es.d.ts +3 -2
- package/dist/components/ui-feed/UIFeed.d.ts +1 -0
- package/dist/components/ui-feed/UIFeed.en.d.ts +1 -0
- package/dist/components/ui-feed/UIFeedEvent.d.ts +1 -0
- package/dist/components/ui-feed/UIFeedEvent.en.d.ts +1 -0
- package/dist/components/ui-flag/UIFlag.d.ts +1 -0
- package/dist/components/ui-flag/UIFlag.en.d.ts +1 -0
- package/dist/components/ui-flyout/UIFlyout.d.ts +1 -0
- package/dist/components/ui-flyout/UIFlyout.en.d.ts +1 -0
- package/dist/components/ui-form/FormBinding.d.ts +13 -1
- package/dist/components/ui-form/FormFields.d.ts +4 -4
- package/dist/components/ui-form/UIField.d.ts +30 -3
- package/dist/components/ui-form/UIField.en.d.ts +9 -0
- package/dist/components/ui-form/UIField.es.d.ts +6 -0
- package/dist/components/ui-form/UIFields.d.ts +1 -0
- package/dist/components/ui-form/UIFields.en.d.ts +1 -0
- package/dist/components/ui-form/UIForm.d.ts +15 -0
- package/dist/components/ui-form/UIForm.en.d.ts +6 -0
- package/dist/components/ui-form/UIRepeat.d.ts +1 -0
- package/dist/components/ui-form/UIRepeat.en.d.ts +1 -0
- package/dist/components/ui-form/index.d.ts +2 -1
- package/dist/components/ui-grid/UIColumn.d.ts +1 -0
- package/dist/components/ui-grid/UIColumn.en.d.ts +1 -0
- package/dist/components/ui-grid/UIGrid.d.ts +1 -0
- package/dist/components/ui-grid/UIGrid.en.d.ts +1 -0
- package/dist/components/ui-grid/UIRow.d.ts +1 -0
- package/dist/components/ui-grid/UIRow.en.d.ts +1 -0
- package/dist/components/ui-icon/UIIcon.d.ts +3 -2
- package/dist/components/ui-icon/UIIcon.en.d.ts +3 -2
- package/dist/components/ui-icon/UIIcons.d.ts +1 -0
- package/dist/components/ui-icon/UIIcons.en.d.ts +1 -0
- package/dist/components/ui-icon-picker/UIIconPicker.d.ts +6 -0
- package/dist/components/ui-icon-picker/UIIconPicker.en.d.ts +6 -0
- package/dist/components/ui-icon-picker/UIIconPicker.fallback.d.ts +6 -0
- package/dist/components/ui-image/UIImage.d.ts +34 -0
- package/dist/components/ui-image/UIImage.en.d.ts +23 -0
- package/dist/components/ui-image/UIImage.es.d.ts +2 -0
- package/dist/components/ui-image/UIImages.d.ts +1 -0
- package/dist/components/ui-image/UIImages.en.d.ts +1 -0
- package/dist/components/ui-include/UIInclude.d.ts +1 -0
- package/dist/components/ui-include/UIInclude.en.d.ts +1 -0
- package/dist/components/ui-input/TextControl.d.ts +7 -0
- package/dist/components/ui-input/UIInput.d.ts +22 -3
- package/dist/components/ui-input/UIInput.en.d.ts +9 -2
- package/dist/components/ui-input/UIInput.es.d.ts +2 -0
- package/dist/components/ui-input/UIInput.fallback.d.ts +9 -2
- package/dist/components/ui-input/UITextarea.d.ts +20 -0
- package/dist/components/ui-input/UITextarea.en.d.ts +15 -0
- package/dist/components/ui-input/UITextarea.es.d.ts +4 -0
- package/dist/components/ui-item/UIItem.d.ts +27 -4
- package/dist/components/ui-item/UIItem.en.d.ts +5 -1
- package/dist/components/ui-items/UIItems.d.ts +1 -0
- package/dist/components/ui-items/UIItems.en.d.ts +1 -0
- package/dist/components/ui-json/JsonChild.d.ts +30 -0
- package/dist/components/ui-json/UIJson.d.ts +128 -0
- package/dist/components/ui-json/UIJson.en.d.ts +71 -0
- package/dist/components/ui-json/UIJson.es.d.ts +12 -0
- package/dist/components/ui-json/index.d.ts +3 -0
- package/dist/components/ui-keys/UIKeys.d.ts +1 -0
- package/dist/components/ui-keys/UIKeys.en.d.ts +1 -0
- package/dist/components/ui-label/UILabel.d.ts +2 -0
- package/dist/components/ui-label/UILabel.en.d.ts +2 -0
- package/dist/components/ui-label/UILabel.es.d.ts +1 -0
- package/dist/components/ui-label/UILabels.d.ts +1 -0
- package/dist/components/ui-label/UILabels.en.d.ts +1 -0
- package/dist/components/ui-list/UIList.d.ts +2 -0
- package/dist/components/ui-list/UIList.en.d.ts +2 -0
- package/dist/components/ui-list/UIList.es.d.ts +1 -0
- package/dist/components/ui-loader/UILoader.d.ts +1 -0
- package/dist/components/ui-loader/UILoader.en.d.ts +1 -0
- package/dist/components/ui-markdown/MarkdownBox.d.ts +143 -0
- package/dist/components/ui-markdown/MarkdownEngine.d.ts +14 -2
- package/dist/components/ui-markdown/MarkdownFormats.d.ts +95 -0
- package/dist/components/ui-markdown/MarkdownSource.d.ts +57 -0
- package/dist/components/ui-markdown/UIMarkdown.d.ts +126 -6
- package/dist/components/ui-markdown/UIMarkdown.en.d.ts +111 -8
- package/dist/components/ui-markdown/UIMarkdown.es.d.ts +29 -1
- package/dist/components/ui-markdown/UIMarkdown.types.d.ts +26 -0
- package/dist/components/ui-menu/ScrollingRow.d.ts +79 -0
- package/dist/components/ui-menu/TitleFit.d.ts +3 -0
- package/dist/components/ui-menu/UIMenu.d.ts +97 -4
- package/dist/components/ui-menu/UIMenu.en.d.ts +50 -1
- package/dist/components/ui-menu/UIMenu.es.d.ts +4 -0
- package/dist/components/ui-message/UIMessage.d.ts +2 -0
- package/dist/components/ui-message/UIMessage.en.d.ts +2 -0
- package/dist/components/ui-message/UIMessage.es.d.ts +1 -0
- package/dist/components/ui-modal/UIModal.d.ts +1 -0
- package/dist/components/ui-modal/UIModal.en.d.ts +1 -0
- package/dist/components/ui-nag/UINag.d.ts +1 -0
- package/dist/components/ui-nag/UINag.en.d.ts +1 -0
- package/dist/components/ui-page/UIPage.d.ts +15 -0
- package/dist/components/ui-page/UIPage.en.d.ts +15 -0
- package/dist/components/ui-page/UIPage.es.d.ts +1 -0
- package/dist/components/ui-panel/UIPanel.d.ts +6 -0
- package/dist/components/ui-panel/UIPanel.en.d.ts +33 -20
- package/dist/components/ui-parts/UIActions.d.ts +1 -0
- package/dist/components/ui-parts/UIActions.en.d.ts +1 -0
- package/dist/components/ui-parts/UIAuthor.d.ts +1 -0
- package/dist/components/ui-parts/UIAuthor.en.d.ts +1 -0
- package/dist/components/ui-parts/UIAvatar.d.ts +1 -0
- package/dist/components/ui-parts/UIAvatar.en.d.ts +1 -0
- package/dist/components/ui-parts/UIContent.d.ts +1 -0
- package/dist/components/ui-parts/UIContent.en.d.ts +1 -0
- package/dist/components/ui-parts/UIDate.d.ts +1 -0
- package/dist/components/ui-parts/UIDate.en.d.ts +1 -0
- package/dist/components/ui-parts/UIDescription.d.ts +1 -0
- package/dist/components/ui-parts/UIDescription.en.d.ts +1 -0
- package/dist/components/ui-parts/UIDetail.d.ts +1 -0
- package/dist/components/ui-parts/UIDetail.en.d.ts +1 -0
- package/dist/components/ui-parts/UIExtra.d.ts +1 -0
- package/dist/components/ui-parts/UIExtra.en.d.ts +1 -0
- package/dist/components/ui-parts/UIHeader.d.ts +3 -1
- package/dist/components/ui-parts/UIHeader.en.d.ts +3 -1
- package/dist/components/ui-parts/UIMeta.d.ts +1 -0
- package/dist/components/ui-parts/UIMeta.en.d.ts +1 -0
- package/dist/components/ui-parts/UIParts.types.d.ts +15 -1
- package/dist/components/ui-parts/UISummary.d.ts +1 -0
- package/dist/components/ui-parts/UISummary.en.d.ts +1 -0
- package/dist/components/ui-parts/UITitle.d.ts +1 -0
- package/dist/components/ui-parts/UITitle.en.d.ts +1 -0
- package/dist/components/ui-parts/UIValue.d.ts +1 -0
- package/dist/components/ui-parts/UIValue.en.d.ts +1 -0
- package/dist/components/ui-placeholder/UIPlaceholder.d.ts +1 -0
- package/dist/components/ui-placeholder/UIPlaceholder.en.d.ts +1 -0
- package/dist/components/ui-placeholder/UIPlaceholderHeader.d.ts +1 -0
- package/dist/components/ui-placeholder/UIPlaceholderHeader.en.d.ts +1 -0
- package/dist/components/ui-placeholder/UIPlaceholderImage.d.ts +1 -0
- package/dist/components/ui-placeholder/UIPlaceholderImage.en.d.ts +1 -0
- package/dist/components/ui-placeholder/UIPlaceholderLine.d.ts +1 -0
- package/dist/components/ui-placeholder/UIPlaceholderLine.en.d.ts +1 -0
- package/dist/components/ui-placeholder/UIPlaceholderParagraph.d.ts +1 -0
- package/dist/components/ui-placeholder/UIPlaceholderParagraph.en.d.ts +1 -0
- package/dist/components/ui-popup/UIPopup.d.ts +30 -3
- package/dist/components/ui-popup/UIPopup.en.d.ts +7 -0
- package/dist/components/ui-popup/UIPopup.es.d.ts +1 -0
- package/dist/components/ui-progress/UIProgress.d.ts +2 -0
- package/dist/components/ui-progress/UIProgress.en.d.ts +2 -0
- package/dist/components/ui-progress/UIProgress.es.d.ts +1 -0
- package/dist/components/ui-property-editor/UIProperty.d.ts +132 -5
- package/dist/components/ui-property-editor/UIProperty.en.d.ts +11 -44
- package/dist/components/ui-property-editor/UIProperty.es.d.ts +4 -0
- package/dist/components/ui-property-editor/UIPropertyEditor.d.ts +38 -0
- package/dist/components/ui-property-editor/UIPropertyEditor.en.d.ts +1 -0
- package/dist/components/ui-property-editor/UIPropertyEditor.es.d.ts +4 -0
- package/dist/components/ui-property-editor/UIPropertyEditor.types.d.ts +33 -0
- package/dist/components/ui-property-editor/UIPropertyGroup.d.ts +12 -0
- package/dist/components/ui-property-editor/UIPropertyGroup.en.d.ts +2 -0
- package/dist/components/ui-property-editor/UIPropertyGroup.es.d.ts +9 -0
- package/dist/components/ui-property-editor/index.d.ts +1 -0
- package/dist/components/ui-quote/UIQuote.d.ts +1 -0
- package/dist/components/ui-quote/UIQuote.en.d.ts +1 -0
- package/dist/components/ui-rail/UIRail.d.ts +1 -0
- package/dist/components/ui-rail/UIRail.en.d.ts +1 -0
- package/dist/components/ui-rating/UIRating.d.ts +6 -0
- package/dist/components/ui-rating/UIRating.en.d.ts +6 -0
- package/dist/components/ui-rating/UIRating.fallback.d.ts +6 -0
- package/dist/components/ui-reveal/UIReveal.d.ts +1 -0
- package/dist/components/ui-reveal/UIReveal.en.d.ts +1 -0
- package/dist/components/ui-root/UIRoot.d.ts +18 -3
- package/dist/components/ui-root/UIRoot.en.d.ts +15 -0
- package/dist/components/ui-root/UIRoot.es.d.ts +1 -0
- package/dist/components/ui-search/UISearch.d.ts +48 -7
- package/dist/components/ui-search/UISearch.en.d.ts +13 -1
- package/dist/components/ui-search/UISearch.es.d.ts +1 -0
- package/dist/components/ui-search/UISearch.fallback.d.ts +13 -1
- package/dist/components/ui-section/UISection.d.ts +22 -1
- package/dist/components/ui-section/UISection.en.d.ts +10 -0
- package/dist/components/ui-section/UISection.es.d.ts +1 -0
- package/dist/components/ui-section/UISections.d.ts +1 -0
- package/dist/components/ui-section/UISections.en.d.ts +1 -0
- package/dist/components/ui-segment/UISegment.d.ts +2 -0
- package/dist/components/ui-segment/UISegment.en.d.ts +2 -0
- package/dist/components/ui-segment/UISegment.es.d.ts +1 -0
- package/dist/components/ui-segment/UISegments.d.ts +1 -0
- package/dist/components/ui-segment/UISegments.en.d.ts +1 -0
- package/dist/components/ui-select/UISelect.d.ts +6 -0
- package/dist/components/ui-select/UISelect.en.d.ts +6 -0
- package/dist/components/ui-select/UISelect.fallback.d.ts +6 -0
- package/dist/components/ui-shape/UIShape.d.ts +23 -2
- package/dist/components/ui-shape/UIShape.en.d.ts +8 -0
- package/dist/components/ui-shape/UIShape.es.d.ts +1 -0
- package/dist/components/ui-shape/UISide.d.ts +4 -0
- package/dist/components/ui-shape/UISide.en.d.ts +4 -0
- package/dist/components/ui-sidebar/UIPushable.d.ts +1 -0
- package/dist/components/ui-sidebar/UIPushable.en.d.ts +1 -0
- package/dist/components/ui-sidebar/UIPusher.d.ts +1 -0
- package/dist/components/ui-sidebar/UIPusher.en.d.ts +1 -0
- package/dist/components/ui-sidebar/UISidebar.d.ts +1 -0
- package/dist/components/ui-sidebar/UISidebar.en.d.ts +1 -0
- package/dist/components/ui-sides/UISides.d.ts +209 -0
- package/dist/components/ui-sides/UISides.en.d.ts +122 -0
- package/dist/components/ui-sides/UISides.es.d.ts +30 -0
- package/dist/components/ui-sides/UISides.fallback.d.ts +134 -0
- package/dist/components/ui-sides/index.d.ts +2 -0
- package/dist/components/ui-site-nav/SitePages.d.ts +53 -0
- package/dist/components/ui-site-nav/UISiteNav.d.ts +207 -0
- package/dist/components/ui-site-nav/UISiteNav.en.d.ts +87 -0
- package/dist/components/ui-site-nav/UISiteNav.es.d.ts +29 -0
- package/dist/components/ui-site-nav/index.d.ts +1 -0
- package/dist/components/ui-site-tabs/UISiteTabs.d.ts +126 -0
- package/dist/components/ui-site-tabs/UISiteTabs.en.d.ts +49 -0
- package/dist/components/ui-site-tabs/UISiteTabs.es.d.ts +18 -0
- package/dist/components/ui-site-tabs/index.d.ts +1 -0
- package/dist/components/ui-slider/UISlider.d.ts +7 -0
- package/dist/components/ui-slider/UISlider.en.d.ts +7 -0
- package/dist/components/ui-slider/UISlider.es.d.ts +1 -0
- package/dist/components/ui-slider/UISlider.fallback.d.ts +7 -0
- package/dist/components/ui-space/UISpace.d.ts +1 -0
- package/dist/components/ui-space/UISpace.en.d.ts +1 -0
- package/dist/components/ui-split-panel/UISplitPanel.d.ts +175 -0
- package/dist/components/ui-split-panel/UISplitPanel.en.d.ts +74 -0
- package/dist/components/ui-split-panel/UISplitPanel.es.d.ts +25 -0
- package/dist/components/ui-split-panel/index.d.ts +2 -0
- package/dist/components/ui-stack/UIStack.d.ts +31 -5
- package/dist/components/ui-stack/UIStack.en.d.ts +15 -3
- package/dist/components/ui-statistic/UIStatistic.d.ts +1 -0
- package/dist/components/ui-statistic/UIStatistic.en.d.ts +1 -0
- package/dist/components/ui-statistic/UIStatistics.d.ts +1 -0
- package/dist/components/ui-statistic/UIStatistics.en.d.ts +1 -0
- package/dist/components/ui-step/UIStep.d.ts +1 -0
- package/dist/components/ui-step/UIStep.en.d.ts +1 -0
- package/dist/components/ui-step/UISteps.d.ts +1 -0
- package/dist/components/ui-step/UISteps.en.d.ts +1 -0
- package/dist/components/ui-sticky/UISticky.d.ts +4 -0
- package/dist/components/ui-sticky/UISticky.en.d.ts +1 -0
- package/dist/components/ui-tab/UITab.d.ts +8 -0
- package/dist/components/ui-tab/UITab.en.d.ts +1 -0
- package/dist/components/ui-tab/UITabs.d.ts +107 -16
- package/dist/components/ui-tab/UITabs.en.d.ts +40 -1
- package/dist/components/ui-tab/UITabs.es.d.ts +4 -0
- package/dist/components/ui-table/TableEditing.d.ts +77 -0
- package/dist/components/ui-table/UICell.d.ts +1 -0
- package/dist/components/ui-table/UICell.en.d.ts +1 -0
- package/dist/components/ui-table/UITable.d.ts +145 -5
- package/dist/components/ui-table/UITable.en.d.ts +19 -0
- package/dist/components/ui-table/UITable.es.d.ts +3 -0
- package/dist/components/ui-terms/UITerm.d.ts +1 -0
- package/dist/components/ui-terms/UITerm.en.d.ts +1 -0
- package/dist/components/ui-terms/UITerms.d.ts +1 -0
- package/dist/components/ui-terms/UITerms.en.d.ts +1 -0
- package/dist/components/ui-text/UILink.d.ts +11 -0
- package/dist/components/ui-text/UILink.en.d.ts +4 -0
- package/dist/components/ui-text/UIText.d.ts +7 -0
- package/dist/components/ui-text/UIText.en.d.ts +7 -0
- package/dist/components/ui-text/UIText.es.d.ts +2 -0
- package/dist/components/ui-theme-editor/SavedTheme.d.ts +55 -43
- package/dist/components/ui-theme-editor/ThemeDraft.d.ts +15 -0
- package/dist/components/ui-theme-editor/UIColorChip.d.ts +1 -0
- package/dist/components/ui-theme-editor/UIColorChip.en.d.ts +1 -0
- package/dist/components/ui-theme-editor/UIThemeEditor.d.ts +157 -26
- package/dist/components/ui-theme-editor/UIThemeEditor.en.d.ts +79 -6
- package/dist/components/ui-theme-editor/UIThemeEditor.es.d.ts +20 -2
- package/dist/components/ui-theme-editor/UIThemeEditor.types.d.ts +0 -2
- package/dist/components/ui-theme-editor/UIThemeToken.d.ts +1 -0
- package/dist/components/ui-theme-editor/UIThemeToken.en.d.ts +1 -0
- package/dist/components/ui-theme-menu/HueDropdown.d.ts +47 -0
- package/dist/components/ui-theme-menu/ThemeMenu.d.ts +18 -7
- package/dist/components/ui-theme-menu/ThemePreference.d.ts +145 -36
- package/dist/components/ui-theme-menu/UIThemeMenu.d.ts +118 -7
- package/dist/components/ui-theme-menu/UIThemeMenu.en.d.ts +82 -2
- package/dist/components/ui-theme-menu/UIThemeMenu.es.d.ts +21 -1
- package/dist/components/ui-theme-menu/UIThemeMenu.types.d.ts +36 -8
- package/dist/components/ui-theme-menu/index.d.ts +2 -1
- package/dist/components/ui-toast/UIToast.d.ts +1 -0
- package/dist/components/ui-toast/UIToast.en.d.ts +1 -0
- package/dist/components/ui-toc/UIToc.d.ts +1 -0
- package/dist/components/ui-toc/UIToc.en.d.ts +1 -0
- package/dist/components/ui-toolbar/UIToolbar.d.ts +13 -10
- package/dist/components/ui-toolbar/UIToolbar.en.d.ts +138 -84
- package/dist/components/ui-toolbar/UIToolbar.es.d.ts +2 -0
- package/dist/components/ui-transition/UITransition.d.ts +1 -0
- package/dist/components/ui-transition/UITransition.en.d.ts +1 -0
- package/dist/components/ui-tree/UITree.d.ts +162 -0
- package/dist/components/ui-tree/UITree.en.d.ts +88 -0
- package/dist/components/ui-tree/UITree.es.d.ts +35 -0
- package/dist/components/ui-tree/UITreeItem.d.ts +204 -0
- package/dist/components/ui-tree/UITreeItem.en.d.ts +142 -0
- package/dist/components/ui-tree/UITreeItem.es.d.ts +32 -0
- package/dist/components/ui-tree/index.d.ts +3 -0
- package/dist/components/ui-tree-diagram/TreeData.d.ts +3 -12
- package/dist/components/ui-tree-diagram/TreeLayout.d.ts +54 -21
- package/dist/components/ui-tree-diagram/TreeMeasure.d.ts +36 -0
- package/dist/components/ui-tree-diagram/UITreeDiagram.d.ts +152 -27
- package/dist/components/ui-tree-diagram/UITreeDiagram.en.d.ts +47 -7
- package/dist/components/ui-tree-diagram/UITreeDiagram.es.d.ts +12 -1
- package/dist/components/ui-tree-diagram/UITreeDiagram.types.d.ts +66 -21
- package/dist/components/ui-tree-diagram/UITreeNode.d.ts +148 -0
- package/dist/components/ui-tree-diagram/UITreeNode.en.d.ts +69 -0
- package/dist/components/ui-tree-diagram/UITreeNode.es.d.ts +21 -0
- package/dist/components/ui-tree-diagram/index.d.ts +4 -2
- package/dist/components/ui-video/UIAudio.d.ts +1 -0
- package/dist/components/ui-video/UIAudio.en.d.ts +1 -0
- package/dist/components/ui-video/UIVideo.d.ts +1 -0
- package/dist/components/ui-video/UIVideo.en.d.ts +1 -0
- package/dist/components/ui-visibility/UIVisibility.d.ts +1 -0
- package/dist/components/ui-visibility/UIVisibility.en.d.ts +1 -0
- package/dist/components/ui-zoom/UIZoom.d.ts +1 -0
- package/dist/components/ui-zoom/UIZoom.en.d.ts +1 -0
- package/dist/{components.es-DmLzT-Bq.js → components.es-BOa_7gFF.js} +498 -109
- package/dist/components.es-BOa_7gFF.js.map +1 -0
- package/dist/core.d.ts +3 -1
- package/dist/core.js +1082 -511
- package/dist/core.js.map +1 -1
- package/dist/crisp-VfYZlTph.js +6 -0
- package/dist/{crisp-CoZRRDuQ.js.map → crisp-VfYZlTph.js.map} +1 -1
- package/dist/docs-components/index.d.ts +1 -0
- package/dist/docs-components/ui-docs-index/UIDocsIndex.d.ts +89 -0
- package/dist/docs-components/ui-docs-index/UIDocsIndex.en.d.ts +43 -0
- package/dist/docs-components/ui-docs-index/index.d.ts +2 -0
- package/dist/docs-components/ui-docs-nav/UIDocsNav.d.ts +54 -87
- package/dist/docs-components/ui-docs-nav/UIDocsNav.types.d.ts +2 -29
- package/dist/docs-components/ui-docs-search/SearchIndex.d.ts +8 -2
- package/dist/docs-components/ui-docs-search/UIDocsSearch.d.ts +10 -0
- package/dist/docs-components/ui-docs-search/UIDocsSearch.en.d.ts +5 -0
- package/dist/elements/AddressParameter.d.ts +87 -0
- package/dist/elements/DOMFormControl.d.ts +5 -0
- package/dist/elements/FormComponent.d.ts +32 -0
- package/dist/elements/LoadableBody.d.ts +6 -1
- package/dist/elements/LoadableComponent.d.ts +10 -1
- package/dist/elements/RootSettings.d.ts +43 -6
- package/dist/elements/SpellUISettings.d.ts +1 -0
- package/dist/elements/StickyWatch.d.ts +20 -0
- package/dist/elements/elements.types.d.ts +15 -0
- package/dist/elements/index.d.ts +2 -0
- package/dist/forms.js +93 -63
- package/dist/forms.js.map +1 -1
- package/dist/fruity-BRVlgJZd.js +6 -0
- package/dist/fruity-BRVlgJZd.js.map +1 -0
- package/dist/{fruity.theme-BJcMiPl1.js → fruity.theme-CbC7Jyvk.js} +2 -2
- package/dist/fruity.theme-CbC7Jyvk.js.map +1 -0
- package/dist/glass-x9tbbwVq.js +6 -0
- package/dist/glass-x9tbbwVq.js.map +1 -0
- package/dist/glass.theme-24wY2wH9.js +6 -0
- package/dist/glass.theme-24wY2wH9.js.map +1 -0
- package/dist/hot.js +530 -24
- package/dist/hot.js.map +1 -1
- package/dist/index.d.ts +8 -0
- package/dist/index.js +91 -81
- package/dist/jsx.d.ts +21149 -10377
- package/dist/matrix-QY2gWbJ0.js +6 -0
- package/dist/{matrix-CqA59hiF.js.map → matrix-QY2gWbJ0.js.map} +1 -1
- package/dist/{matrix.theme-jqQZjcq3.js → matrix.theme-_8xtwhDq.js} +2 -2
- package/dist/matrix.theme-_8xtwhDq.js.map +1 -0
- package/dist/midnight-BxlTQSfw.js +6 -0
- package/dist/{midnight-BnoVOrhC.js.map → midnight-BxlTQSfw.js.map} +1 -1
- package/dist/mockup-83ELBuVr.js +6 -0
- package/dist/mockup-83ELBuVr.js.map +1 -0
- package/dist/mockup.theme-DmpBgGBl.js +6 -0
- package/dist/mockup.theme-DmpBgGBl.js.map +1 -0
- package/dist/paper-M61nUilz.js +6 -0
- package/dist/{paper-CynH8ZuT.js.map → paper-M61nUilz.js.map} +1 -1
- package/dist/persist.types-D2m6wD-S.js +9 -0
- package/dist/persist.types-D2m6wD-S.js.map +1 -0
- package/dist/pop-CxXfytjk.js +6 -0
- package/dist/{pop-D2i9V_rG.js.map → pop-CxXfytjk.js.map} +1 -1
- package/dist/runtime/DataTooltips.d.ts +75 -0
- package/dist/runtime/PropertyControls.d.ts +15 -1
- package/dist/runtime/Sources.d.ts +16 -4
- package/dist/runtime/Styles.d.ts +11 -0
- package/dist/runtime/Themes.d.ts +10 -4
- package/dist/runtime/UIRuntime.d.ts +4 -1
- package/dist/runtime/index.d.ts +1 -1
- package/dist/runtime/runtime.types.d.ts +18 -85
- package/dist/spell-By5Y3jKP.js +6 -0
- package/dist/{spell-BFtLICm7.js.map → spell-By5Y3jKP.js.map} +1 -1
- package/dist/{spell.theme-B7AU7SQX.js → spell.theme-DxGj7qHx.js} +2 -2
- package/dist/spell.theme-DxGj7qHx.js.map +1 -0
- package/dist/styles/CodeThemeFile.d.ts +73 -0
- package/dist/styles/StyleGenerator.d.ts +6 -0
- package/dist/styles/styles.en.d.ts +141 -3
- package/dist/styles/styles.types.d.ts +2 -0
- package/dist/{styles.en-RLpYiO5_.js → styles.en-CUUxNwHo.js} +71 -14
- package/dist/styles.en-CUUxNwHo.js.map +1 -0
- package/dist/styles.js +13 -13
- package/dist/styles.js.map +1 -1
- package/dist/ui-accordion.js +54 -53
- package/dist/ui-accordion.js.map +1 -1
- package/dist/ui-action.js +20 -19
- package/dist/ui-action.js.map +1 -1
- package/dist/ui-ad.js +5 -4
- package/dist/ui-ad.js.map +1 -1
- package/dist/ui-breadcrumbs.js +15 -13
- package/dist/ui-breadcrumbs.js.map +1 -1
- package/dist/ui-button.js +132 -125
- package/dist/ui-button.js.map +1 -1
- package/dist/ui-calendar.js +208 -206
- package/dist/ui-calendar.js.map +1 -1
- package/dist/ui-card.js +260 -98
- package/dist/ui-card.js.map +1 -1
- package/dist/ui-checkbox.js +95 -81
- package/dist/ui-checkbox.js.map +1 -1
- package/dist/ui-code.js +25 -24
- package/dist/ui-code.js.map +1 -1
- package/dist/ui-comment.js +14 -12
- package/dist/ui-comment.js.map +1 -1
- package/dist/ui-components.js +7 -6
- package/dist/ui-components.js.map +1 -1
- package/dist/ui-container.js +24 -12
- package/dist/ui-container.js.map +1 -1
- package/dist/ui-diagram.js +1328 -0
- package/dist/ui-diagram.js.map +1 -0
- package/dist/ui-dimension.js +779 -0
- package/dist/ui-dimension.js.map +1 -0
- package/dist/ui-dimmer.js +36 -34
- package/dist/ui-dimmer.js.map +1 -1
- package/dist/ui-divider.js +7 -5
- package/dist/ui-divider.js.map +1 -1
- package/dist/ui-dropdown.js +107 -105
- package/dist/ui-dropdown.js.map +1 -1
- package/dist/ui-embed.js +36 -35
- package/dist/ui-embed.js.map +1 -1
- package/dist/ui-emoji.js +10 -9
- package/dist/ui-emoji.js.map +1 -1
- package/dist/ui-example.js +63 -61
- package/dist/ui-example.js.map +1 -1
- package/dist/ui-feed.js +12 -10
- package/dist/ui-feed.js.map +1 -1
- package/dist/ui-flag.js +10 -9
- package/dist/ui-flag.js.map +1 -1
- package/dist/ui-flyout.js +7 -6
- package/dist/ui-flyout.js.map +1 -1
- package/dist/ui-form.js +244 -162
- package/dist/ui-form.js.map +1 -1
- package/dist/ui-grid.js +21 -18
- package/dist/ui-grid.js.map +1 -1
- package/dist/ui-icon-picker.js +46 -44
- package/dist/ui-icon-picker.js.map +1 -1
- package/dist/ui-icon.js +17 -14
- package/dist/ui-icon.js.map +1 -1
- package/dist/ui-image.js +93 -55
- package/dist/ui-image.js.map +1 -1
- package/dist/ui-include.js +18 -17
- package/dist/ui-include.js.map +1 -1
- package/dist/ui-input.js +154 -112
- package/dist/ui-input.js.map +1 -1
- package/dist/ui-item.js +152 -102
- package/dist/ui-item.js.map +1 -1
- package/dist/ui-items.js +9 -8
- package/dist/ui-items.js.map +1 -1
- package/dist/ui-json.js +115 -0
- package/dist/ui-json.js.map +1 -0
- package/dist/ui-keys.js +1 -1
- package/dist/ui-label.js +18 -15
- package/dist/ui-label.js.map +1 -1
- package/dist/ui-list.js +7 -5
- package/dist/ui-list.js.map +1 -1
- package/dist/ui-loader.js +7 -6
- package/dist/ui-loader.js.map +1 -1
- package/dist/ui-markdown.js +975 -83
- package/dist/ui-markdown.js.map +1 -1
- package/dist/ui-menu.js +329 -196
- package/dist/ui-menu.js.map +1 -1
- package/dist/ui-message.js +20 -18
- package/dist/ui-message.js.map +1 -1
- package/dist/ui-modal.js +46 -45
- package/dist/ui-modal.js.map +1 -1
- package/dist/ui-nag.js +19 -18
- package/dist/ui-nag.js.map +1 -1
- package/dist/ui-page.js +8 -7
- package/dist/ui-page.js.map +1 -1
- package/dist/ui-panel.js +28 -17
- package/dist/ui-panel.js.map +1 -1
- package/dist/ui-parts.js +66 -52
- package/dist/ui-parts.js.map +1 -1
- package/dist/ui-placeholder.js +21 -16
- package/dist/ui-placeholder.js.map +1 -1
- package/dist/ui-popup.js +113 -84
- package/dist/ui-popup.js.map +1 -1
- package/dist/ui-progress.js +9 -7
- package/dist/ui-progress.js.map +1 -1
- package/dist/ui-property-editor.js +706 -203
- package/dist/ui-property-editor.js.map +1 -1
- package/dist/ui-quote.js +5 -4
- package/dist/ui-quote.js.map +1 -1
- package/dist/ui-rail.js +5 -4
- package/dist/ui-rail.js.map +1 -1
- package/dist/ui-rating.js +31 -29
- package/dist/ui-rating.js.map +1 -1
- package/dist/ui-reveal.js +7 -6
- package/dist/ui-reveal.js.map +1 -1
- package/dist/ui-root.js +324 -158
- package/dist/ui-root.js.map +1 -1
- package/dist/ui-search.js +210 -168
- package/dist/ui-search.js.map +1 -1
- package/dist/ui-section.js +124 -92
- package/dist/ui-section.js.map +1 -1
- package/dist/ui-segment.js +15 -12
- package/dist/ui-segment.js.map +1 -1
- package/dist/ui-select.js +83 -81
- package/dist/ui-select.js.map +1 -1
- package/dist/ui-shape.js +86 -58
- package/dist/ui-shape.js.map +1 -1
- package/dist/ui-sidebar.js +59 -56
- package/dist/ui-sidebar.js.map +1 -1
- package/dist/ui-sides.js +325 -0
- package/dist/ui-sides.js.map +1 -0
- package/dist/ui-site-nav.js +329 -0
- package/dist/ui-site-nav.js.map +1 -0
- package/dist/ui-site-tabs.js +177 -0
- package/dist/ui-site-tabs.js.map +1 -0
- package/dist/ui-slider.js +84 -81
- package/dist/ui-slider.js.map +1 -1
- package/dist/ui-space.js +7 -6
- package/dist/ui-space.js.map +1 -1
- package/dist/ui-split-panel.js +298 -0
- package/dist/ui-split-panel.js.map +1 -0
- package/dist/ui-stack.js +47 -23
- package/dist/ui-stack.js.map +1 -1
- package/dist/ui-statistic.js +15 -13
- package/dist/ui-statistic.js.map +1 -1
- package/dist/ui-step.js +31 -29
- package/dist/ui-step.js.map +1 -1
- package/dist/ui-sticky.js +7 -6
- package/dist/ui-sticky.js.map +1 -1
- package/dist/ui-tab.js +230 -138
- package/dist/ui-tab.js.map +1 -1
- package/dist/ui-table.js +724 -162
- package/dist/ui-table.js.map +1 -1
- package/dist/ui-terms.js +12 -10
- package/dist/ui-terms.js.map +1 -1
- package/dist/ui-text.js +53 -28
- package/dist/ui-text.js.map +1 -1
- package/dist/ui-theme-editor.js +1018 -1545
- package/dist/ui-theme-editor.js.map +1 -1
- package/dist/ui-theme-menu-CuIjr8Ou.js +1493 -0
- package/dist/ui-theme-menu-CuIjr8Ou.js.map +1 -0
- package/dist/ui-toast.js +45 -44
- package/dist/ui-toast.js.map +1 -1
- package/dist/ui-toc.js +75 -74
- package/dist/ui-toc.js.map +1 -1
- package/dist/ui-toolbar.js +51 -73
- package/dist/ui-toolbar.js.map +1 -1
- package/dist/ui-transition.js +12 -11
- package/dist/ui-transition.js.map +1 -1
- package/dist/ui-tree-diagram.js +676 -197
- package/dist/ui-tree-diagram.js.map +1 -1
- package/dist/ui-tree.js +625 -0
- package/dist/ui-tree.js.map +1 -0
- package/dist/ui-video.js +13 -11
- package/dist/ui-video.js.map +1 -1
- package/dist/ui-visibility.js +26 -25
- package/dist/ui-visibility.js.map +1 -1
- package/dist/ui-zoom.js +79 -78
- package/dist/ui-zoom.js.map +1 -1
- package/dist/util/TopLayerTip.d.ts +28 -0
- package/dist/util/index.d.ts +5 -2
- package/dist/vocabulary/DefaultValues.d.ts +34 -0
- package/dist/vocabulary/SharedVocabulary.d.ts +4 -0
- package/dist/vocabulary/SharedVocabulary.es.d.ts +7 -0
- package/dist/vocabulary/ValueSets.d.ts +18 -0
- package/dist/vocabulary/Vocabulary.d.ts +1 -0
- package/dist/vocabulary/defaults.generated.d.ts +6 -0
- package/dist/vocabulary/index.d.ts +1 -0
- package/package.json +1 -1
- package/dist/MarkdownEngine-CbuT9Mjc.js.map +0 -1
- package/dist/PrefStore-CeaTtjTz.js.map +0 -1
- package/dist/UIButton-XkfGqgh6.js +0 -6
- package/dist/UIButton-XkfGqgh6.js.map +0 -1
- package/dist/UIInput-BUudZstW.js +0 -6
- package/dist/UIInput-BUudZstW.js.map +0 -1
- package/dist/UIKeys-DJF2TIKE.js.map +0 -1
- package/dist/UILabel-C1jy3Yl8.js +0 -6
- package/dist/UILabel-C1jy3Yl8.js.map +0 -1
- package/dist/UIMenu-Btd-8V3A.js +0 -42
- package/dist/UIMenu-Btd-8V3A.js.map +0 -1
- package/dist/UIRuntime-BBuehGly.js.map +0 -1
- package/dist/components.es-DmLzT-Bq.js.map +0 -1
- package/dist/crisp-CoZRRDuQ.js +0 -6
- package/dist/fruity-CQFYeRlh.js +0 -6
- package/dist/fruity-CQFYeRlh.js.map +0 -1
- package/dist/fruity.theme-BJcMiPl1.js.map +0 -1
- package/dist/glass-CAfW11kL.js +0 -6
- package/dist/glass-CAfW11kL.js.map +0 -1
- package/dist/glass.theme-DQcBbtCW.js +0 -6
- package/dist/glass.theme-DQcBbtCW.js.map +0 -1
- package/dist/matrix-CqA59hiF.js +0 -6
- package/dist/matrix.theme-jqQZjcq3.js.map +0 -1
- package/dist/midnight-BnoVOrhC.js +0 -6
- package/dist/paper-CynH8ZuT.js +0 -6
- package/dist/persist.types-CsZxS8TG.js +0 -9
- package/dist/persist.types-CsZxS8TG.js.map +0 -1
- package/dist/pop-D2i9V_rG.js +0 -6
- package/dist/spell-BFtLICm7.js +0 -6
- package/dist/spell.theme-B7AU7SQX.js.map +0 -1
- package/dist/styles.en-RLpYiO5_.js.map +0 -1
- package/dist/ui-theme-menu-DyKZygpV.js +0 -921
- package/dist/ui-theme-menu-DyKZygpV.js.map +0 -1
package/dist/ui-zoom.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ui-zoom.js","names":["<Show when={!this.src}>\n <div\n ref={(element) => this.view = element}\n class={VIEW}\n part={this.partForName(\"view\")}\n style={this.viewStyle}\n >\n <Show when={!this.isOpen}>\n <div class={SHRUNK} inert={true} style={{ zoom: String(this.shrinkRatio) }}>\n <slot />\n </div>\n </Show>\n <button\n type=\"button\"\n class={SHOW}\n part={this.partForName(\"button\")}\n aria-label={this.translationForKey(\"show\")}\n aria-haspopup=\"dialog\"\n aria-expanded={this.disclosure.ariaExpanded}\n title={this.translationForKey(\"show\")}\n onClick={() => this.showFullSize()}\n />\n </div>\n </Show>","this","ref={(element) => this.view = element}","<Show when={!this.isOpen}>\n <div class={SHRUNK} inert={true} style={{ zoom: String(this.shrinkRatio) }}>\n <slot />\n </div>\n </Show>","zoom: String(this.shrinkRatio)","<div class={SHRUNK} inert={true} style={{ zoom: String(this.shrinkRatio) }}>\n <slot />\n </div>","<div\n ref={(element) => this.view = element}\n class={VIEW}\n part={this.partForName(\"view\")}\n style={this.viewStyle}\n >\n <Show when={!this.isOpen}>\n <div class={SHRUNK} inert={true} style={{ zoom: String(this.shrinkRatio) }}>\n <slot />\n </div>\n </Show>\n <button\n type=\"button\"\n class={SHOW}\n part={this.partForName(\"button\")}\n aria-label={this.translationForKey(\"show\")}\n aria-haspopup=\"dialog\"\n aria-expanded={this.disclosure.ariaExpanded}\n title={this.translationForKey(\"show\")}\n onClick={() => this.showFullSize()}\n />\n </div>","part={this.partForName(\"view\")}","style={this.viewStyle}","class={SHOW}","part={this.partForName(\"button\")}","aria-label={this.translationForKey(\"show\")}","aria-expanded={this.disclosure.ariaExpanded}","title={this.translationForKey(\"show\")}","ref={(element) => this.modal = element}","<Show when={this.src} fallback={this.fullContent()}>\n {(src) => <figure class={FIGURE}>\n <img\n class={IMAGE}\n part={this.partForName(\"image\")}\n src={src()}\n alt={this.alt ? this.translationForKey(\"zoomed\", { alt: this.alt }) : this.translationForKey(\"untitled\")}\n />\n <Show when={this.alt}>\n <figcaption class={CAPTION} part={this.partForName(\"caption\")}>\n {this.alt}\n </figcaption>\n </Show>\n </figure>}\n </Show>","<Show when={this.alt}>\n <figcaption class={CAPTION} part={this.partForName(\"caption\")}>\n {this.alt}\n </figcaption>\n </Show>","part={this.partForName(\"caption\")}","<figcaption class={CAPTION} part={this.partForName(\"caption\")}>\n {this.alt}\n </figcaption>","class={IMAGE}","part={this.partForName(\"image\")}","src={src()}","alt={this.alt ? this.translationForKey(\"zoomed\", { alt: this.alt }) : this.translationForKey(\"untitled\")}","part={this.partForName(\"base\")}","visible={this.isShowing ? \"\" : void 0}","<Show when={this.isOpen}>\n <div class={CONTENT} part={this.partForName(\"content\")}>\n <div style={this.fullWidth ? { \"inline-size\": `${this.fullWidth}px` } : void 0}>\n <slot />\n </div>\n </div>\n </Show>","part={this.partForName(\"content\")}","style={this.fullWidth ? { \"inline-size\": `${this.fullWidth}px` } : void 0}","<div class={CONTENT} part={this.partForName(\"content\")}>\n <div style={this.fullWidth ? { \"inline-size\": `${this.fullWidth}px` } : void 0}>\n <slot />\n </div>\n </div>","E.UIComponent","E.proto","E.protoMerged","E.cssState","E.controlled","E.state","E.untracked","E.on","E.onChange","E.Disclosure","E.beforeNextPaint","_$createComponent","_$getOwner","_$readShallow","_$setStyleProperty","_$setAttribute","__name","zoomCSS","_$delegateEvents","__publicField","__decorateElement","__decoratorMetadata","__decoratorStart","__name$1","__runInitializers","__privateAdd","getOwner$1","ImageZoom","event","target","image","NO_ZOOM","link","shown","MIN_SHOWN","ZOOM_MARK","zoom","ZOOM_TAG","ADDED","root","ZoomMotion","away","direction","figure","update","box","copy","from","beforeNextPaint","resolve","timing","ZOOMABLES","element","list","at","shut","href","IMAGE_ADDRESS","zoomVocabulary","UIZoom_default","_tmpl$","_tmpl$2","_tmpl$3","_tmpl$4","_tmpl$5","_tmpl$6","_shut_dec","_onKeyDown_dec","_dismiss_dec","_onShowingChanged_dec","_onClick_dec","_onClosing_dec","_onClosed_dec","_showFullSize_dec","_fullWidth_dec","_heldSize_dec","_isOpen_dec","_elementSetup_dec","_vocabulary_dec","_a","_init","_isOpen","_heldSize","_fullWidth","_UIZoom","UIComponent","proto","protoMerged","cssState","controlled","state","untracked","on","onChange","Disclosure","percent","DEFAULT_RATIO","style","held","view","shrunk","SHRUNK","FIGURE","showing","IMAGE","CONTENT","place","zoomed","frame","DRAW_FRAMES","frames","step","ARROW_STEPS","typing","TEXT_FIELDS","_self$","createComponent","Show","_el$","_el$4","ref","insert","_el$2","_el$3","effect","readShallow","className","_p$","t","setStyleProperty","VIEW","SHOW","setAttribute","a","o","i","n","s","h","_el$5","_el$6","_el$7","_el$8","CAPTION","src","_self$2","_el$9","_el$10","_el$11","UIZoom","delegateEvents"],"sources":["../src/components/ui-zoom/ImageZoom.ts","../src/components/ui-zoom/UIZoom.en.ts","../src/components/ui-zoom/UIZoom.css?inline","../src/components/ui-zoom/UIZoom.tsx","../src/components/ui-zoom/index.ts"],"sourcesContent":["import { beforeNextPaint } from \"spell/util/timing\"\n\n/****************\n * ### `ImageZoom`\n * Which images on a page open full size when clicked, and showing one in the page's ONE `<ui-zoom>`.\n * - Every docs page's (epic `epic-engine` I129; Owen, 2026-10-25: \"Can't click on images in the page to expand so I\n * can't tell\" ... \"bring it up in a full-screen modal so I can `escape` to close it\"): the docs runtime listens\n * on the whole page (`onClick()`, `onPointerOver()`); a request's thumbnails in `<epic-field>` call `onClick()`\n * themselves, for a page without the runtime (Epic UI's); `<ui-image zoom>` calls `show()`\n * - So every plain `<img>` screenshot opens full size, with nothing rewritten:\n * epic pages, guides, details pages, Markdown\n * - A ZOOMABLE image (`isZoomable()`), in the page's own markup (never inside a shadow root):\n * - shown at least `MIN_SHOWN` (64px) on its longer side: never an icon or a tiny image\n * - and one of:\n * - shown smaller than its natural size (a screenshot scaled into the column, a thumbnail)\n * - in a `<figure>`\n * - in a link to an image (its own file, or a stopgap `<a href=\"shot.png\" target=\"_blank\">` round it)\n * - NOT inside any other link (it goes where its link goes), a button, a `<ui-zoom>`, or anything marked\n * `data-no-zoom`\n * - A plain click on one (main button, no modifier key): its link is never followed (`preventDefault()`);\n * it shows in `<ui-zoom>` at full size, or as large as fits, its alt text the caption\n * - with a modifier key: the link's, as usual (a new tab)\n * - Plain DOM, no Solid and no Spell UI's core: the docs runtime imports this leaf alone, so the element isn't\n * bundled there. It makes the `<ui-zoom>` by its tag, which `<ui-root>` loads like any other.\n * - Stepping (`step()`): while a zoom shows, the arrow keys go to the next / previous ZOOMABLE on the page\n * (`zoomables()`: every `<ui-zoom>` of content, every `<ui-image zoom>` and every zoomable `<img>`, in document\n * order; past either end the shown one bounces, it doesn't wrap)\n * - Motion (all skipped for `prefers-reduced-motion`):\n * - paging slides the shown picture out and the next in, like scrolling (`slide()`); a picture's zoom stays open\n * - the bounce at either end nudges the whole figure, picture and caption (`bounce()`)\n * - growing out of the page's picture and shrinking back into it are `<ui-zoom>`'s own (`ZoomMotion`)\n * - Moved from the epics pack, with `<epic-zoom>` (epic `ui-gaps` P14): any page can open its screenshots full size.\n ****************/\nexport class ImageZoom {\n /** The image a plain click on the page hit, when it's zoomable: the image itself, or the one alone in a link. */\n static imageFor(event: MouseEvent): HTMLImageElement | undefined {\n if (event.defaultPrevented || event.button !== 0) return undefined\n if (event.metaKey || event.ctrlKey || event.shiftKey || event.altKey) return undefined\n const target = event.target instanceof Element ? event.target : null\n const image = target?.closest(\"img\") ?? target?.closest(\"a\")?.querySelector(\"img\")\n return image && ImageZoom.isZoomable(image) ? image : undefined\n }\n\n /** Is `image` one to open full size? See the class's rule. */\n static isZoomable(image: HTMLImageElement): boolean {\n if (image.closest(NO_ZOOM)) return false\n const link = image.closest(\"a\")\n if (link && !ImageZoom.linksImage(link, image)) return false\n const shown = image.getBoundingClientRect()\n if (Math.max(shown.width, shown.height) < MIN_SHOWN) return false\n const shrunk = image.naturalWidth > shown.width + 1 || image.naturalHeight > shown.height + 1\n return shrunk || !!image.closest(\"figure\") || !!link\n }\n\n /**\n * A plain click on a zoomable image: shown full size, its link not followed.\n * - an arrow, so it's handed to `addEventListener()` as it is\n * - true when it took the click\n */\n static onClick = (event: MouseEvent): boolean => {\n const image = ImageZoom.imageFor(event)\n if (!image) return false\n event.preventDefault()\n ImageZoom.show(image)\n return true\n }\n\n /**\n * The pointer over a zoomable image: it's marked `data-ui-zoom`, which draws the zoom-in cursor\n * (the docs' sheet, `spell-doc.css`, draws it for a page's images).\n * - SIDE EFFECT: writes the attribute on the image (light DOM), once; the live patch keeps it\n */\n static onPointerOver = (event: PointerEvent) => {\n const image = event.target instanceof HTMLImageElement ? event.target : null\n if (!image || image.hasAttribute(ZOOM_MARK) || !ImageZoom.isZoomable(image)) return\n image.setAttribute(ZOOM_MARK, \"\")\n }\n\n /**\n * Show `image` full size, in the page's ONE `<ui-zoom>`.\n * - `image` may be in a shadow root: `<ui-image zoom>` hands its own\n * - SIDE EFFECT: makes it at the end of `<body>` the first time (`data-spell-added`: the live patch steps around it)\n */\n static show(image: HTMLImageElement) {\n let zoom = document.querySelector(`body > ${ZOOM_TAG}[${ADDED}]`)\n if (!zoom) {\n zoom = document.createElement(ZOOM_TAG)\n zoom.setAttribute(ADDED, \"\")\n document.body.append(zoom)\n }\n const root = image.getRootNode()\n ImageZoom.shown = root instanceof ShadowRoot ? root.host : image\n zoom.setAttribute(\"alt\", image.alt)\n zoom.setAttribute(\"src\", image.currentSrc || image.src)\n }\n\n /** A short nudge of `shown` in `direction`'s way and back, to say there's no more; skipped for reduced motion. */\n private static bounce(shown: Element | null | undefined, direction: 1 | -1) {\n if (!shown || ZoomMotion.isStill()) return\n const away = `translateY(${direction > 0 ? -ZoomMotion.bouncePx : ZoomMotion.bouncePx}px)`\n shown.animate([{ transform: \"none\" }, { transform: away }, { transform: \"none\" }], {\n duration: ZoomMotion.bounceMs,\n easing: \"ease-out\"\n })\n }\n\n /**\n * Paging a picture in the page's zoom, like scrolling: the shown one slides out (up for next, down for previous)\n * as the next slides in from the other side.\n * - `update()` makes the zoom show the next picture; a copy of the shown one slides out meanwhile, so for a\n * moment there are two\n * - SIDE EFFECT: the copy is added beside the figure (fixed where it was), and removed when it has gone\n * - reduced motion, or nothing drawn yet: just `update()`\n */\n private static async slide(zoom: Element, direction: 1 | -1, update: () => void) {\n const figure = zoom.shadowRoot?.querySelector<HTMLElement>(\".figure\")\n if (!figure || ZoomMotion.isStill()) return update()\n const box = figure.getBoundingClientRect()\n const copy = figure.cloneNode(true) as HTMLElement\n Object.assign(copy.style, {\n position: \"fixed\",\n left: `${box.left}px`,\n top: `${box.top}px`,\n width: `${box.width}px`,\n margin: \"0\",\n pointerEvents: \"none\"\n })\n figure.after(copy)\n const away = direction > 0 ? \"-100vh\" : \"100vh\"\n const from = direction > 0 ? \"100vh\" : \"-100vh\"\n // held below (or above) the window until its picture is ready\n figure.style.transform = `translateY(${from})`\n update()\n await new Promise((resolve) => beforeNextPaint(() => resolve(undefined)))\n await figure\n .querySelector(\"img\")\n ?.decode()\n .catch(() => undefined)\n const timing = { duration: ZoomMotion.slideMs, easing: ZoomMotion.ease }\n copy.animate([{ transform: \"none\" }, { transform: `translateY(${away})` }], timing).finished.then(\n () => copy.remove(),\n () => copy.remove()\n )\n const entering = figure.animate([{ transform: `translateY(${from})` }, { transform: \"none\" }], timing)\n entering.finished.then(\n () => (figure.style.transform = \"\"),\n () => (figure.style.transform = \"\")\n )\n }\n\n /** What the page's zoom was last handed: the image, or the `<ui-image>` whose shadow root holds it. */\n static shown: Element | undefined\n\n /** Everything on the page that zooms, in document order: the ONE list the arrow keys step through. */\n static zoomables(): Element[] {\n return [...document.querySelectorAll(ZOOMABLES)].filter((element) =>\n element instanceof HTMLImageElement ? ImageZoom.isZoomable(element) : !element.hasAttribute(ADDED)\n )\n }\n\n /**\n * Show the zoomable `direction` (1 next, -1 previous) after `from`; `from` is shut by `shut()`\n * - at either end it doesn't wrap: the shown one bounces (`bounce()`)\n * - `from`: a content `<ui-zoom>`, or `undefined` for the page's own zoom (showing `ImageZoom.shown`)\n * - an image replaces the page zoom's picture in place: its modal stays open\n */\n static step(direction: 1 | -1, from: Element | undefined, shut: () => void) {\n const list = ImageZoom.zoomables()\n if (list.length < 2) return\n const at = list.indexOf(from ?? ImageZoom.shown!)\n const target = list[(at < 0 ? (direction > 0 ? -1 : list.length) : at) + direction]\n if (!target) {\n const zoom = from ?? document.querySelector(`body > ${ZOOM_TAG}[${ADDED}]`)\n ImageZoom.bounce(zoom?.shadowRoot?.querySelector(from ? \".content\" : \".figure\"), direction)\n return\n }\n if (target.localName === ZOOM_TAG) {\n shut()\n target.shadowRoot?.querySelector<HTMLButtonElement>(\"button.show\")?.click()\n return\n }\n const image = target instanceof HTMLImageElement ? target : target.shadowRoot?.querySelector(\"img\")\n if (!image) return\n if (from) {\n ImageZoom.show(image)\n shut()\n return\n }\n const zoom = document.querySelector(`body > ${ZOOM_TAG}[${ADDED}]`)\n if (zoom) void ImageZoom.slide(zoom, direction, () => ImageZoom.show(image))\n else ImageZoom.show(image)\n }\n\n /** Does `link` lead to an image: `image`'s own file, a `data:image/` address, or a file with an image's extension? */\n private static linksImage(link: HTMLAnchorElement, image: HTMLImageElement): boolean {\n const href = link.href\n if (!href) return true\n if (href === image.src || href === image.currentSrc) return true\n return IMAGE_ADDRESS.test(href)\n }\n}\n\n/** The page's zoom. */\nconst ZOOM_TAG = \"ui-zoom\"\n\n/**\n * The zoom's motion, for `<ui-zoom>` and `ImageZoom`.\n * - growing out of the page's picture, shrinking back, paging, the bounce at either end\n * - none of it for `prefers-reduced-motion`: `isStill()`\n */\nexport const ZoomMotion = {\n /** the easing of every move but the bounce */\n ease: \"cubic-bezier(.2, .8, .2, 1)\",\n /** growing out of the page's picture (ms) */\n growMs: 320,\n /** shrinking back into it (ms) */\n shrinkMs: 240,\n /** paging, in and out (ms) */\n slideMs: 380,\n /** the bounce at either end: how far (px) and how long (ms) */\n bouncePx: 40,\n bounceMs: 320,\n /** The person asked for less motion. */\n isStill: () => matchMedia(\"(prefers-reduced-motion: reduce)\").matches\n}\n\n/** What zooms: content zooms, `<ui-image zoom>`s and plain images (`isZoomable()` picks those). */\nconst ZOOMABLES = \"ui-zoom, ui-image[zoom], img\"\n\n/** The attribute that marks a zoomable image under the pointer: the page's sheet draws its cursor. */\nconst ZOOM_MARK = \"data-ui-zoom\"\n\n/** The mark on the zoom `show()` made: the docs' live patch steps around it, and `show()` finds it again. */\nconst ADDED = \"data-spell-added\"\n\n/** What an image is never zoomed inside: a button, a `<ui-zoom>` of its own, or a block marked so. */\nconst NO_ZOOM = \"[data-no-zoom], button, ui-button, ui-zoom\"\n\n/** The least an image is shown at, on its longer side, to zoom: smaller ones are icons and badges. */\nconst MIN_SHOWN = 64\n\n/** An address of an image: a `data:image/` one, or a file by its extension (before any `?` or `#`). */\nconst IMAGE_ADDRESS = /^data:image\\/|\\.(png|jpe?g|gif|webp|avif|svg)([?#]|$)/i\n","/**\n * The English vocabulary of `<ui-zoom>`: every name the tag uses.\n * - Its tag, attributes (each with its kind and allowed values), slots, parts, states and texts.\n * The shape is `E.ComponentVocabulary` (`spell/ui/vocabulary`).\n * - Moved from the epics pack's `<epic-zoom>` (epic `ui-gaps` P14, from epic `epic-engine` P14 and its Q22):\n * it zooms an image, as `<epic-zoom>` did, AND anything it wraps.\n * - No class words: every attribute is property-only.\n */\n\nimport type { E } from \"spell/ui/core\"\n\n/****************\n * ### `zoomVocabulary`\n * The names of `<ui-zoom>`: something shown small, or not at all, and full size over the page on a click.\n ****************/\nexport const zoomVocabulary = {\n tag: \"ui-zoom\",\n topics: [\"images\", \"media\", \"overlays\"],\n aka: [\"lightbox\", \"zoom\", \"full size\", \"image viewer\", \"magnifier\", \"expand\", \"screenshot\", \"thumbnail\"],\n noun: \"zoom\",\n description:\n \"A zoom shows something full size, over the page. Round any content it shows it shrunk, within a width and \" +\n \"height, and full size on a click; with `src` it shows that image full size. Escape, a click outside it or \" +\n \"its close button close it.\",\n attributes: [\n {\n name: \"max-width\",\n group: \"layout\",\n kind: \"string\",\n description:\n \"The widest the shrunk view gets, a CSS length (`320px`, `50%`); none: its container's width. \" +\n \"Content past it is cut off, until it's shown full size.\"\n },\n {\n name: \"max-height\",\n group: \"layout\",\n kind: \"string\",\n description:\n \"The tallest the shrunk view gets, a CSS length (`200px`, `20em`); none: as tall as its content. \" +\n \"Content past it is cut off, until it's shown full size.\"\n },\n {\n name: \"shrink\",\n group: \"layout\",\n kind: \"string\",\n default: \"50%\",\n description:\n \"How big its content is in the shrunk view, a percentage of its full size: `50%` by default; `100%` \" +\n \"keeps it full size, cut off by `max-width` / `max-height`.\"\n },\n {\n name: \"open\",\n group: \"states\",\n kind: \"boolean\",\n description: \"Shown full size, over the page. Set to open it from script; closing it clears it.\"\n },\n {\n name: \"src\",\n group: \"link\",\n kind: \"string\",\n description:\n \"An image to show full size, in place of its content: open while it's set, and cleared as it closes. \" +\n \"The page's zoom for its screenshots (`ImageZoom`) is one of these.\"\n },\n {\n name: \"alt\",\n group: \"content\",\n kind: \"string\",\n description: \"With `src`: the image's alt text, its caption, and the zoomed image's own name.\"\n }\n ],\n events: [],\n slots: [{ name: \"\", description: \"What it zooms: any content, shown shrunk, then full size on a click.\" }],\n parts: [\n { name: \"view\", description: \"The shrunk view of its content, in the page.\" },\n { name: \"button\", description: \"The button over the shrunk view that shows it full size.\" },\n { name: \"base\", description: \"The `<ui-modal>`, over the whole window.\" },\n { name: \"content\", description: \"Its content, full size, in the modal.\" },\n { name: \"image\", description: \"With `src`: the image, as large as fits.\" },\n { name: \"caption\", description: \"With `src`: its alt text, under it.\" }\n ],\n states: [{ name: \"open\", description: \"Shown full size, over the page.\" }],\n texts: [\n { key: \"show\", text: \"Show full size\", description: \"The name of the button over the shrunk view.\" },\n { key: \"zoomed\", text: \"{alt}, full size\", description: \"The zoomed image's alt text (its own `alt`).\" },\n { key: \"untitled\", text: \"Image, full size\", description: \"The zoomed image's alt text, when it had none.\" }\n ]\n} as const satisfies E.ComponentVocabulary\n","/*\n * `<ui-zoom>` (`UIZoom.tsx`): something shown shrunk in the page, and full size over the whole window.\n * - The shadow markup:\n *\n * <div class=\"view\" part=\"view\"> (round content; none with `src`)\n * <div class=\"shrunk\" inert><slot></slot></div> (while it's shut)\n * <button class=\"show\" part=\"button\"> (over the whole view)\n * </div>\n * <ui-modal class=\"ui zoom [image]\" part=\"base\" appearance=\"basic\" closable>\n * <figure class=\"figure\"> (with `src`)\n * <img class=\"image\" part=\"image\"><figcaption class=\"caption\" part=\"caption\">\n * </figure>\n * <div class=\"content\" part=\"content\"><slot></slot></div> (round content, while it's open)\n * </ui-modal>\n *\n * - The view: its content laid out at full size, then drawn smaller (CSS `zoom`, the shrink),\n * within `max-width` / `max-height` (cut off past them). A zoom-in cursor, and a focus ring on its button.\n * - The modal is `basic`: no box of its own, on a dark backdrop whatever the page's theme.\n * - an image straight on the backdrop: as large as fits the window, less a margin and the caption's line;\n * never cropped, never enlarged past its natural size (`max-*` only, `object-fit: contain`)\n * - content on the page's ground, at the width it had in the page, scrolling when it's taller than the window\n * - The close button: the window's top right corner, out of the way.\n * - Public tokens (`--ui-zoom-*`) are never declared here: read through private aliases.\n */\n\n@layer ui.components.zoom.types;\n\n@layer ui.components.zoom.types {\n :host {\n --_ui-zoom-margin: var(--ui-zoom-margin, 24px);\n --_ui-zoom-caption: var(--ui-zoom-caption, 2.5em);\n --_ui-zoom-radius: var(--ui-zoom-radius, var(--ui-radius, 4px));\n /* as wide as what it shows, so a click beside it is the page's */\n display: block;\n inline-size: fit-content;\n max-inline-size: 100%;\n }\n /* the page's zoom for its screenshots holds nothing in the page */\n :host([src]) {\n display: contents;\n }\n\n /* the shrunk view */\n .view {\n position: relative;\n box-sizing: border-box;\n inline-size: fit-content;\n max-inline-size: 100%;\n overflow: hidden;\n border-radius: var(--_ui-zoom-radius);\n }\n .shrunk {\n /* the slotted content can't be reached in here: the button over it shows it full size */\n pointer-events: none;\n }\n .show {\n position: absolute;\n inset: 0;\n margin: 0;\n padding: 0;\n border: 0;\n border-radius: inherit;\n background: transparent;\n cursor: zoom-in;\n }\n .show:focus-visible {\n outline: 2px solid var(--ui-focus-color, Highlight);\n outline-offset: -2px;\n }\n\n ui-modal {\n /* dark whatever the page's theme: a screenshot is judged on black, not on the page's dimmer */\n --ui-modal-dimmer-background: var(--ui-zoom-backdrop, oklch(0 0 0 / 0.9));\n }\n ui-modal::part(modal) {\n width: auto;\n max-width: none;\n max-height: none;\n margin: auto;\n padding: 0;\n overflow: visible;\n background: transparent;\n box-shadow: none;\n /* the modal's own scale-in would shrink the picture while it measures where to grow from: it only fades */\n transform: none;\n }\n ui-modal::part(close) {\n position: fixed;\n top: 12px;\n right: 12px;\n color: #fff;\n }\n\n /* an image, full size */\n .figure {\n display: flex;\n flex-direction: column;\n align-items: center;\n gap: 8px;\n margin: 0;\n cursor: zoom-out;\n }\n .image {\n display: block;\n max-width: calc(100vw - 2 * var(--_ui-zoom-margin));\n max-height: calc(100vh - 2 * var(--_ui-zoom-margin) - var(--_ui-zoom-caption));\n object-fit: contain;\n border-radius: var(--_ui-zoom-radius);\n }\n .caption {\n max-width: calc(100vw - 2 * var(--_ui-zoom-margin));\n color: #fff;\n text-align: center;\n line-height: 1.4;\n }\n\n /* content, full size */\n .content {\n box-sizing: border-box;\n /* its content's width in the page (the component's), so the modal is no wider than it */\n inline-size: fit-content;\n max-width: calc(100vw - 2 * var(--_ui-zoom-margin));\n margin-inline: auto;\n max-height: calc(100vh - 2 * var(--_ui-zoom-margin));\n overflow: auto;\n padding: var(--ui-zoom-padding, 16px);\n border-radius: var(--_ui-zoom-radius);\n background: var(--ui-zoom-background, var(--ui-surface, Canvas));\n color: var(--ui-text-color, CanvasText);\n }\n}\n","import { Show } from \"solid-js\"\nimport type { JSX } from \"@solidjs/web\"\n\nimport { E } from \"spell/ui/core\"\nimport { ImageZoom, ZoomMotion } from \"./ImageZoom\"\nimport { zoomVocabulary } from \"./UIZoom.en\"\n\nimport zoomCSS from \"./UIZoom.css?inline\"\n\n/****************\n * ### `<ui-zoom>`\n * The component behind `<ui-zoom>`: something shown full size over the page (epic `ui-gaps` P14, from the epics\n * pack's `<epic-zoom>`; Owen, epic `epic-engine` Q22: \"both. `<ui-zoom>` can surround anything to zoom it\").\n *\n * - Round any content: the content is shown SHRUNK in the page, and full size on a click.\n * - shrunk: laid out at full size, then drawn at `shrink` of it (50% by default; CSS `zoom`),\n * within `max-width` / `max-height`, cut off past them\n * - a button over the whole view opens it; the content under it can't be reached until then (`inert`)\n * - full size: in a `<ui-modal appearance=\"basic\">`, on the page's ground, at the width it had in the page;\n * the view keeps its room meanwhile, so the page doesn't jump\n * - `open` says it's open (and opens it from script); Escape, the backdrop or the close button shut it\n * - With `src`: that image full size, as `<epic-zoom>` did, in place of any content.\n * - as large as fits the window (never cropped, never enlarged past its own size), its alt text under it\n * - open while `src` is set; Escape, a click anywhere or the close button close it, and it removes its own `src`\n * - the page's ONE zoom for its screenshots is one of these, made by `ImageZoom.show()`; `<ui-image zoom>` uses it\n * - Motion (none under `prefers-reduced-motion`):\n * - it GROWS out of its place on the page (the content's view, or the picture clicked) and SHRINKS back into it\n * before the modal closes, however it's closed (Escape, a click, the close button)\n * - paging with the arrow keys slides the next picture in, like scrolling (`ImageZoom`)\n * - Arrow keys while showing: the next / previous zoomable on the page; past either end the picture bounces (`ImageZoom.step()`)\n * - The modal's own events (`ui-opened`, `ui-closed` ...) come out of it, as from any `<ui-modal>`.\n ****************/\nexport class UIZoom extends E.UIComponent<typeof zoomVocabulary> {\n @E.proto static vocabulary = zoomVocabulary\n @E.protoMerged static elementSetup = {\n styleSheets: { zoom: zoomCSS }\n } satisfies Partial<E.ElementSetup>\n\n /** Its content shown full size: `open`. */\n @E.cssState(\"open\")\n @E.controlled(\"open\")\n accessor isOpen = false\n\n /**\n * Opening and shutting it as a person does: through `requestChange()`, so the page's own `open` wins;\n * no events of its own (its modal's come out), and its button's `aria-expanded`.\n */\n readonly disclosure = new E.Disclosure({ component: this, member: \"isOpen\" })\n\n /** The room the view took in the page, kept while its content is in the modal. */\n @E.state accessor heldSize: { width: number; height: number } | undefined = undefined\n\n /** The width its content was laid out at in the page, in px: the modal shows it at that width. */\n @E.state accessor fullWidth: number | undefined = undefined\n\n /** The modal is up: an image (`src`), or the content. */\n get isShowing(): boolean {\n return !!this.src || this.isOpen\n }\n\n /** `shrink` as a ratio: `\"50%\"` => 0.5; anything it can't read, the default. */\n get shrinkRatio(): number {\n const percent = Number.parseFloat(this.shrink ?? \"\")\n if (!Number.isFinite(percent) || percent <= 0) return DEFAULT_RATIO\n return Math.min(percent, 100) / 100\n }\n\n /** The view's box: its caps, or the room it holds while open. */\n get viewStyle(): JSX.CSSProperties {\n const style: JSX.CSSProperties = {}\n if (this.maxWidth) style[\"max-inline-size\"] = `min(100%, ${this.maxWidth})`\n if (this.maxHeight) style[\"max-block-size\"] = this.maxHeight\n const held = this.isOpen ? this.heldSize : undefined\n if (held) Object.assign(style, { \"inline-size\": `${held.width}px`, \"block-size\": `${held.height}px` })\n return style\n }\n\n /** The shrunk view's box, once drawn. */\n private view?: HTMLElement\n /** The modal, once drawn. */\n private modal?: HTMLElement\n\n /** The button over the view: its room kept, then shown full size. */\n @E.untracked\n protected showFullSize() {\n const view = this.view\n if (view) {\n const box = view.getBoundingClientRect()\n this.heldSize = { width: box.width, height: box.height }\n const shrunk = view.querySelector<HTMLElement>(`.${SHRUNK}`)\n if (shrunk) this.fullWidth = Math.round(shrunk.getBoundingClientRect().width / this.shrinkRatio)\n }\n this.disclosure.open()\n }\n\n /** Shut (Escape, its close button, the backdrop): an image's `src` goes, ready for the next; content goes back. */\n @E.on(\"ui-closed\", { target: \"renderRoot\" })\n protected onClosed(event: Event) {\n // a modal in the content, closing, says so through this shadow root too: only its own counts\n if (event.target !== this.modal) return\n this.shut()\n }\n\n /**\n * About to close (Escape, the backdrop, its close button): shrink back into place first, then close.\n * - `ui-closing` is vetoed while it shrinks, then `shut()` closes the modal without asking again\n */\n @E.on(\"ui-closing\", { target: \"renderRoot\" })\n protected onClosing(event: Event) {\n if (event.target !== this.modal) return\n if (!this.isShrinking && !this.canMove()) return\n event.preventDefault()\n void this.dismiss()\n }\n\n /** A click on the zoomed image: shut too, as a lightbox does. */\n @E.on(\"click\", { target: \"renderRoot\" })\n protected onClick(event: MouseEvent) {\n if (event.target instanceof Element && event.target.closest(`.${FIGURE}`)) void this.dismiss()\n }\n\n ////////////////\n // ## Growing and shrinking\n ////////////////\n\n /** Shown now, for `onShowingChanged()`. */\n private wasShowing = false\n\n /** It shrinks back into the page: shutting waits for it. */\n private isShrinking = false\n\n /** It came up (a picture's `src`, or `open`): grow out of its place. */\n @E.onChange(\"src\", \"isOpen\")\n protected onShowingChanged() {\n const showing = this.isShowing\n if (showing && !this.wasShowing) void this.grow()\n this.wasShowing = showing\n }\n\n /** What's drawn full size: the picture, or the content's box. */\n private get zoomed(): HTMLElement | null {\n return this.modal?.querySelector<HTMLElement>(`.${IMAGE}, .${CONTENT}`) ?? null\n }\n\n /** Where it sits on the page: the picture clicked (still the one `src` shows), or the content's view. */\n private get placeOnPage(): DOMRect | undefined {\n let box: DOMRect | undefined\n if (this.src) {\n const shown = ImageZoom.shown\n const image = shown instanceof HTMLImageElement ? shown : shown?.shadowRoot?.querySelector(\"img\")\n if (image?.isConnected && (image.currentSrc || image.src) === this.src) box = image.getBoundingClientRect()\n } else box = this.view?.getBoundingClientRect()\n return box?.width ? box : undefined\n }\n\n /** Can it grow or shrink: motion allowed, something drawn, and its place on the page known? */\n private canMove(): boolean {\n return !ZoomMotion.isStill() && !!this.zoomed && !!this.placeOnPage\n }\n\n /** The transform that draws `zoomed` over `place`: centred on it, scaled to its width. */\n private static over(place: DOMRect, zoomed: DOMRect): string {\n const dx = place.left + place.width / 2 - (zoomed.left + zoomed.width / 2)\n const dy = place.top + place.height / 2 - (zoomed.top + zoomed.height / 2)\n return `translate(${dx}px, ${dy}px) scale(${place.width / zoomed.width})`\n }\n\n /** Grow out of its place on the page. */\n private async grow() {\n if (ZoomMotion.isStill()) return\n // once it's drawn into the modal: the first time, that takes the element's own set-up too\n let zoomed = this.zoomed\n for (let frame = 0; !zoomed && frame < DRAW_FRAMES; frame++) {\n await new Promise((resolve) => E.beforeNextPaint(() => resolve(undefined)))\n zoomed = this.zoomed\n }\n const place = this.placeOnPage\n if (!zoomed || !place) return\n if (zoomed instanceof HTMLImageElement) await zoomed.decode().catch(() => undefined)\n const frames = [\n { transform: UIZoom.over(place, zoomed.getBoundingClientRect()), opacity: 0.6 },\n { transform: \"none\", opacity: 1 }\n ]\n zoomed.animate(frames, { duration: ZoomMotion.growMs, easing: ZoomMotion.ease })\n }\n\n /** Shrink back into its place on the page, then `shut()`; at once when it can't move. */\n @E.untracked\n private async dismiss() {\n if (this.isShrinking) return\n const zoomed = this.zoomed\n const place = this.placeOnPage\n if (!zoomed || !place || ZoomMotion.isStill()) return this.shut()\n this.isShrinking = true\n const frames = [\n { transform: \"none\", opacity: 1 },\n { transform: UIZoom.over(place, zoomed.getBoundingClientRect()), opacity: 0.4 }\n ]\n // held at the end while the modal fades\n const shrinking = zoomed.animate(frames, {\n duration: ZoomMotion.shrinkMs,\n easing: ZoomMotion.ease,\n fill: \"forwards\"\n })\n await shrinking.finished.catch(() => undefined)\n this.isShrinking = false\n this.shut()\n }\n\n /**\n * Arrow keys while showing: the next / previous zoomable on the page (`ImageZoom.step()`).\n * Not from a text field in the zoomed content, which keeps its arrows.\n */\n @E.on(\"keydown\", { target: \"renderRoot\" })\n protected onKeyDown(event: KeyboardEvent) {\n const step = ARROW_STEPS[event.key]\n if (!step || event.defaultPrevented || event.metaKey || event.ctrlKey || event.altKey || !this.isShowing) return\n const typing = event.composedPath()[0]\n if (typing instanceof HTMLElement && typing.matches(TEXT_FIELDS)) return\n event.preventDefault()\n ImageZoom.step(step, this.src ? undefined : this.domElement, () => this.shut())\n }\n\n /** Shut: no `src`, not open. */\n @E.untracked\n private shut() {\n if (this.src) this.domElement.removeAttribute(\"src\")\n this.disclosure.close()\n }\n\n render(): JSX.Element {\n return (\n <>\n <Show when={!this.src}>\n <div\n ref={(element) => (this.view = element)}\n class={VIEW}\n part={this.partForName(\"view\")}\n style={this.viewStyle}\n >\n <Show when={!this.isOpen}>\n <div class={SHRUNK} inert={true} style={{ zoom: String(this.shrinkRatio) }}>\n <slot />\n </div>\n </Show>\n <button\n type=\"button\"\n class={SHOW}\n part={this.partForName(\"button\")}\n aria-label={this.translationForKey(\"show\")}\n aria-haspopup=\"dialog\"\n aria-expanded={this.disclosure.ariaExpanded}\n title={this.translationForKey(\"show\")}\n onClick={() => this.showFullSize()}\n />\n </div>\n </Show>\n <ui-modal\n ref={(element: HTMLElement) => (this.modal = element)}\n class={this.rootClass}\n part={this.partForName(\"base\")}\n appearance=\"basic\"\n closable=\"\"\n visible={this.isShowing ? \"\" : undefined}\n >\n <Show when={this.src} fallback={this.fullContent()}>\n {(src) => (\n <figure class={FIGURE}>\n <img\n class={IMAGE}\n part={this.partForName(\"image\")}\n src={src()}\n alt={\n this.alt ? this.translationForKey(\"zoomed\", { alt: this.alt }) : this.translationForKey(\"untitled\")\n }\n />\n <Show when={this.alt}>\n <figcaption class={CAPTION} part={this.partForName(\"caption\")}>\n {this.alt}\n </figcaption>\n </Show>\n </figure>\n )}\n </Show>\n </ui-modal>\n </>\n )\n }\n\n /** Its content, full size, while open: at the width it had in the page. */\n private fullContent(): JSX.Element {\n return (\n <Show when={this.isOpen}>\n <div class={CONTENT} part={this.partForName(\"content\")}>\n <div style={this.fullWidth ? { \"inline-size\": `${this.fullWidth}px` } : undefined}>\n <slot />\n </div>\n </div>\n </Show>\n )\n }\n}\n\n/** The vocabulary's attribute getters, typed (see \"Attributes\" in `UIComponent`). */\nexport interface UIZoom extends E.AttributeValues<typeof zoomVocabulary> {}\n\n/** Arrow keys that step to the next (1) or previous (-1) zoomable. */\nconst ARROW_STEPS: Record<string, 1 | -1 | undefined> = { ArrowRight: 1, ArrowDown: 1, ArrowLeft: -1, ArrowUp: -1 }\n\n/** What keeps its own arrow keys. */\nconst TEXT_FIELDS = \"input:not([type=checkbox], [type=radio], [type=button]), textarea, select, [contenteditable]\"\n\n/** How many frames it waits for its picture or content to be drawn, before it gives up growing. */\nconst DRAW_FRAMES = 30\n\n/** `shrink`'s default: half size. */\nconst DEFAULT_RATIO = 0.5\n\n/** Classes of its shadow markup: the view, its shrunk content, its button; the image, its figure and caption; the content full size. */\nconst VIEW = \"view\"\nconst SHRUNK = \"shrunk\"\nconst SHOW = \"show\"\nconst FIGURE = \"figure\"\nconst IMAGE = \"image\"\nconst CAPTION = \"caption\"\nconst CONTENT = \"content\"\n","/**\n * The zoom family: defines `<ui-zoom>` and exports its component, `UIZoom`, and `ImageZoom`, which opens a page's\n * screenshots in it.\n * - SIDE EFFECT: importing it defines the tag, and `<ui-modal>` (what it shows things full size in).\n * - Also the library's `spell/ui/ui-zoom` entry (its size is in `notes/report.md`).\n * - `ImageZoom` alone, with no element: `spell/ui/components/ui-zoom/ImageZoom` (the docs runtime's import).\n */\n\nimport { UIZoom } from \"./UIZoom\"\nimport { ImageZoom } from \"./ImageZoom\"\n\nimport \"spell/ui/components/ui-modal\"\n\nUIZoom.define()\n\nexport { UIZoom, ImageZoom }\n"],"mappings":";;;;;;AAiCA,IAAawD,IAAb,MAAa,UAAU;CAErB,OAAO,SAAS,GAAiD;EAE/D,IADIC,EAAM,oBAAoBA,EAAM,WAAW,KAC3CA,EAAM,WAAWA,EAAM,WAAWA,EAAM,YAAYA,EAAM,QAAQ;EACtE,IAAMC,IAASD,EAAM,kBAAkB,UAAUA,EAAM,SAAS,MAC1DE,IAAQD,GAAQ,QAAQ,KAAK,KAAKA,GAAQ,QAAQ,GAAG,CAAC,EAAE,cAAc,KAAK;EACjF,OAAOC,KAAS,UAAU,WAAWA,CAAK,IAAIA,IAAQ,KAAA;CACxD;CAGA,OAAO,WAAW,GAAkC;EAClD,IAAIA,EAAM,QAAQC,EAAO,GAAG,OAAO;EACnC,IAAMC,IAAOF,EAAM,QAAQ,GAAG;EAC9B,IAAIE,KAAQ,CAAC,UA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MAAMnE,GAAQ,EAC/B,CAAA,CAAA,GAFeO,EAAAwD,GAAA,IAFJI,CAAA;AAAN,IAAMiE,IAANjE,GAmRD4B,KAAkD;CAAE,YAAY;CAAG,WAAW;CAAG,WAAW;CAAI,SAAS;AAAG,GAG5GE,KAAc,gGAGdL,KAAc,IAGdb,KAAgB,IAGhBkC,KAAO,QACP7B,IAAS,UACT8B,KAAO,QACP7B,IAAS,UACTE,IAAQ,SACRuC,KAAU,WACVtC,KAAU;;;eCxThB4C,EAAO,OAAO"}
|
|
1
|
+
{"version":3,"file":"ui-zoom.js","names":["<Show when={!this.src}>\n <div\n ref={(element) => this.view = element}\n class={VIEW}\n part={this.partForName(\"view\")}\n style={this.viewStyle}\n >\n <Show when={!this.isOpen}>\n <div class={SHRUNK} inert={true} style={{ zoom: String(this.shrinkRatio) }}>\n <slot />\n </div>\n </Show>\n <button\n type=\"button\"\n class={SHOW}\n part={this.partForName(\"button\")}\n aria-label={this.translationForKey(\"show\")}\n aria-haspopup=\"dialog\"\n aria-expanded={this.disclosure.ariaExpanded}\n title={this.translationForKey(\"show\")}\n onClick={() => this.showFullSize()}\n />\n </div>\n </Show>","this","ref={(element) => this.view = element}","<Show when={!this.isOpen}>\n <div class={SHRUNK} inert={true} style={{ zoom: String(this.shrinkRatio) }}>\n <slot />\n </div>\n </Show>","zoom: String(this.shrinkRatio)","<div class={SHRUNK} inert={true} style={{ zoom: String(this.shrinkRatio) }}>\n <slot />\n </div>","<div\n ref={(element) => this.view = element}\n class={VIEW}\n part={this.partForName(\"view\")}\n style={this.viewStyle}\n >\n <Show when={!this.isOpen}>\n <div class={SHRUNK} inert={true} style={{ zoom: String(this.shrinkRatio) }}>\n <slot />\n </div>\n </Show>\n <button\n type=\"button\"\n class={SHOW}\n part={this.partForName(\"button\")}\n aria-label={this.translationForKey(\"show\")}\n aria-haspopup=\"dialog\"\n aria-expanded={this.disclosure.ariaExpanded}\n title={this.translationForKey(\"show\")}\n onClick={() => this.showFullSize()}\n />\n </div>","part={this.partForName(\"view\")}","style={this.viewStyle}","class={SHOW}","part={this.partForName(\"button\")}","aria-label={this.translationForKey(\"show\")}","aria-expanded={this.disclosure.ariaExpanded}","title={this.translationForKey(\"show\")}","ref={(element) => this.modal = element}","<Show when={this.src} fallback={this.fullContent()}>\n {(src) => <figure class={FIGURE}>\n <img\n class={IMAGE}\n part={this.partForName(\"image\")}\n src={src()}\n alt={this.alt ? this.translationForKey(\"zoomed\", { alt: this.alt }) : this.translationForKey(\"untitled\")}\n />\n <Show when={this.alt}>\n <figcaption class={CAPTION} part={this.partForName(\"caption\")}>\n {this.alt}\n </figcaption>\n </Show>\n </figure>}\n </Show>","<Show when={this.alt}>\n <figcaption class={CAPTION} part={this.partForName(\"caption\")}>\n {this.alt}\n </figcaption>\n </Show>","part={this.partForName(\"caption\")}","<figcaption class={CAPTION} part={this.partForName(\"caption\")}>\n {this.alt}\n </figcaption>","class={IMAGE}","part={this.partForName(\"image\")}","src={src()}","alt={this.alt ? this.translationForKey(\"zoomed\", { alt: this.alt }) : this.translationForKey(\"untitled\")}","part={this.partForName(\"base\")}","visible={this.isShowing ? \"\" : void 0}","<Show when={this.isOpen}>\n <div class={CONTENT} part={this.partForName(\"content\")}>\n <div style={this.fullWidth ? { \"inline-size\": `${this.fullWidth}px` } : void 0}>\n <slot />\n </div>\n </div>\n </Show>","part={this.partForName(\"content\")}","style={this.fullWidth ? { \"inline-size\": `${this.fullWidth}px` } : void 0}","<div class={CONTENT} part={this.partForName(\"content\")}>\n <div style={this.fullWidth ? { \"inline-size\": `${this.fullWidth}px` } : void 0}>\n <slot />\n </div>\n </div>","E.UIComponent","E.proto","E.protoMerged","E.cssState","E.controlled","E.state","E.untracked","E.on","E.onChange","E.Disclosure","E.beforeNextPaint","_$createComponent","_$getOwner","_$readShallow","_$setStyleProperty","_$setAttribute","__name","zoomCSS","_$delegateEvents","__name$1","__publicField","__decorateElement","__decoratorMetadata","__runInitializers","__privateAdd","__decoratorStart","getOwner$1","ImageZoom","event","target","image","NO_ZOOM","link","shown","MIN_SHOWN","ZOOM_MARK","zoom","ZOOM_TAG","ADDED","root","ZoomMotion","away","direction","figure","update","box","copy","from","beforeNextPaint","resolve","timing","ZOOMABLES","element","list","at","shut","href","IMAGE_ADDRESS","zoomVocabulary","UIZoom_default","_tmpl$","_tmpl$2","_tmpl$3","_tmpl$4","_tmpl$5","_tmpl$6","_shut_dec","_onKeyDown_dec","_dismiss_dec","_onShowingChanged_dec","_onClick_dec","_onClosing_dec","_onClosed_dec","_showFullSize_dec","_fullWidth_dec","_heldSize_dec","_isOpen_dec","_elementSetup_dec","_vocabulary_dec","_a","_init","_isOpen","_heldSize","_fullWidth","_UIZoom","UIComponent","proto","protoMerged","cssState","controlled","state","untracked","on","onChange","Disclosure","percent","DEFAULT_RATIO","style","held","view","shrunk","SHRUNK","FIGURE","showing","IMAGE","CONTENT","place","zoomed","frame","DRAW_FRAMES","frames","step","ARROW_STEPS","typing","TEXT_FIELDS","_self$","createComponent","Show","_el$","_el$4","ref","insert","_el$2","_el$3","effect","readShallow","className","_p$","t","setStyleProperty","VIEW","SHOW","setAttribute","a","o","i","n","s","h","_el$5","_el$6","_el$7","_el$8","CAPTION","src","_self$2","_el$9","_el$10","_el$11","UIZoom","delegateEvents"],"sources":["../src/components/ui-zoom/ImageZoom.ts","../src/components/ui-zoom/UIZoom.en.ts","../src/components/ui-zoom/UIZoom.css?inline","../src/components/ui-zoom/UIZoom.tsx","../src/components/ui-zoom/index.ts"],"sourcesContent":["import { beforeNextPaint } from \"spell/util/timing\"\n\n/****************\n * ### `ImageZoom`\n * Which images on a page open full size when clicked, and showing one in the page's ONE `<ui-zoom>`.\n * - Every docs page's (epic `epic-engine` I129; Owen, 2026-10-25: \"Can't click on images in the page to expand so I\n * can't tell\" ... \"bring it up in a full-screen modal so I can `escape` to close it\"): the docs runtime listens\n * on the whole page (`onClick()`, `onPointerOver()`); a request's thumbnails in `<epic-field>` call `onClick()`\n * themselves, for a page without the runtime (Epic UI's); `<ui-image zoom>` calls `show()`\n * - So every plain `<img>` screenshot opens full size, with nothing rewritten:\n * epic pages, guides, details pages, Markdown\n * - A ZOOMABLE image (`isZoomable()`), in the page's own markup (never inside a shadow root):\n * - shown at least `MIN_SHOWN` (64px) on its longer side: never an icon or a tiny image\n * - and one of:\n * - shown smaller than its natural size (a screenshot scaled into the column, a thumbnail)\n * - in a `<figure>`\n * - in a link to an image (its own file, or a stopgap `<a href=\"shot.png\" target=\"_blank\">` round it)\n * - NOT inside any other link (it goes where its link goes), a button, a `<ui-zoom>`, or anything marked\n * `data-no-zoom`\n * - A plain click on one (main button, no modifier key): its link is never followed (`preventDefault()`);\n * it shows in `<ui-zoom>` at full size, or as large as fits, its alt text the caption\n * - with a modifier key: the link's, as usual (a new tab)\n * - Plain DOM, no Solid and no Spell UI's core: the docs runtime imports this leaf alone, so the element isn't\n * bundled there. It makes the `<ui-zoom>` by its tag, which `<ui-root>` loads like any other.\n * - Stepping (`step()`): while a zoom shows, the arrow keys go to the next / previous ZOOMABLE on the page\n * (`zoomables()`: every `<ui-zoom>` of content, every `<ui-image zoom>` and every zoomable `<img>`, in document\n * order; past either end the shown one bounces, it doesn't wrap)\n * - Motion (all skipped for `prefers-reduced-motion`):\n * - paging slides the shown picture out and the next in, like scrolling (`slide()`); a picture's zoom stays open\n * - the bounce at either end nudges the whole figure, picture and caption (`bounce()`)\n * - growing out of the page's picture and shrinking back into it are `<ui-zoom>`'s own (`ZoomMotion`)\n * - Moved from the epics pack, with `<epic-zoom>` (epic `ui-gaps` P14): any page can open its screenshots full size.\n ****************/\nexport class ImageZoom {\n /** The image a plain click on the page hit, when it's zoomable: the image itself, or the one alone in a link. */\n static imageFor(event: MouseEvent): HTMLImageElement | undefined {\n if (event.defaultPrevented || event.button !== 0) return undefined\n if (event.metaKey || event.ctrlKey || event.shiftKey || event.altKey) return undefined\n const target = event.target instanceof Element ? event.target : null\n const image = target?.closest(\"img\") ?? target?.closest(\"a\")?.querySelector(\"img\")\n return image && ImageZoom.isZoomable(image) ? image : undefined\n }\n\n /** Is `image` one to open full size? See the class's rule. */\n static isZoomable(image: HTMLImageElement): boolean {\n if (image.closest(NO_ZOOM)) return false\n const link = image.closest(\"a\")\n if (link && !ImageZoom.linksImage(link, image)) return false\n const shown = image.getBoundingClientRect()\n if (Math.max(shown.width, shown.height) < MIN_SHOWN) return false\n const shrunk = image.naturalWidth > shown.width + 1 || image.naturalHeight > shown.height + 1\n return shrunk || !!image.closest(\"figure\") || !!link\n }\n\n /**\n * A plain click on a zoomable image: shown full size, its link not followed.\n * - an arrow, so it's handed to `addEventListener()` as it is\n * - true when it took the click\n */\n static onClick = (event: MouseEvent): boolean => {\n const image = ImageZoom.imageFor(event)\n if (!image) return false\n event.preventDefault()\n ImageZoom.show(image)\n return true\n }\n\n /**\n * The pointer over a zoomable image: it's marked `data-ui-zoom`, which draws the zoom-in cursor\n * (the docs' sheet, `spell-doc.css`, draws it for a page's images).\n * - SIDE EFFECT: writes the attribute on the image (light DOM), once; the live patch keeps it\n */\n static onPointerOver = (event: PointerEvent) => {\n const image = event.target instanceof HTMLImageElement ? event.target : null\n if (!image || image.hasAttribute(ZOOM_MARK) || !ImageZoom.isZoomable(image)) return\n image.setAttribute(ZOOM_MARK, \"\")\n }\n\n /**\n * Show `image` full size, in the page's ONE `<ui-zoom>`.\n * - `image` may be in a shadow root: `<ui-image zoom>` hands its own\n * - SIDE EFFECT: makes it at the end of `<body>` the first time (`data-spell-added`: the live patch steps around it)\n */\n static show(image: HTMLImageElement) {\n let zoom = document.querySelector(`body > ${ZOOM_TAG}[${ADDED}]`)\n if (!zoom) {\n zoom = document.createElement(ZOOM_TAG)\n zoom.setAttribute(ADDED, \"\")\n document.body.append(zoom)\n }\n const root = image.getRootNode()\n ImageZoom.shown = root instanceof ShadowRoot ? root.host : image\n zoom.setAttribute(\"alt\", image.alt)\n zoom.setAttribute(\"src\", image.currentSrc || image.src)\n }\n\n /** A short nudge of `shown` in `direction`'s way and back, to say there's no more; skipped for reduced motion. */\n private static bounce(shown: Element | null | undefined, direction: 1 | -1) {\n if (!shown || ZoomMotion.isStill()) return\n const away = `translateY(${direction > 0 ? -ZoomMotion.bouncePx : ZoomMotion.bouncePx}px)`\n shown.animate([{ transform: \"none\" }, { transform: away }, { transform: \"none\" }], {\n duration: ZoomMotion.bounceMs,\n easing: \"ease-out\"\n })\n }\n\n /**\n * Paging a picture in the page's zoom, like scrolling: the shown one slides out (up for next, down for previous)\n * as the next slides in from the other side.\n * - `update()` makes the zoom show the next picture; a copy of the shown one slides out meanwhile, so for a\n * moment there are two\n * - SIDE EFFECT: the copy is added beside the figure (fixed where it was), and removed when it has gone\n * - reduced motion, or nothing drawn yet: just `update()`\n */\n private static async slide(zoom: Element, direction: 1 | -1, update: () => void) {\n const figure = zoom.shadowRoot?.querySelector<HTMLElement>(\".figure\")\n if (!figure || ZoomMotion.isStill()) return update()\n const box = figure.getBoundingClientRect()\n const copy = figure.cloneNode(true) as HTMLElement\n Object.assign(copy.style, {\n position: \"fixed\",\n left: `${box.left}px`,\n top: `${box.top}px`,\n width: `${box.width}px`,\n margin: \"0\",\n pointerEvents: \"none\"\n })\n figure.after(copy)\n const away = direction > 0 ? \"-100vh\" : \"100vh\"\n const from = direction > 0 ? \"100vh\" : \"-100vh\"\n // held below (or above) the window until its picture is ready\n figure.style.transform = `translateY(${from})`\n update()\n await new Promise((resolve) => beforeNextPaint(() => resolve(undefined)))\n await figure\n .querySelector(\"img\")\n ?.decode()\n .catch(() => undefined)\n const timing = { duration: ZoomMotion.slideMs, easing: ZoomMotion.ease }\n copy.animate([{ transform: \"none\" }, { transform: `translateY(${away})` }], timing).finished.then(\n () => copy.remove(),\n () => copy.remove()\n )\n const entering = figure.animate([{ transform: `translateY(${from})` }, { transform: \"none\" }], timing)\n entering.finished.then(\n () => (figure.style.transform = \"\"),\n () => (figure.style.transform = \"\")\n )\n }\n\n /** What the page's zoom was last handed: the image, or the `<ui-image>` whose shadow root holds it. */\n static shown: Element | undefined\n\n /** Everything on the page that zooms, in document order: the ONE list the arrow keys step through. */\n static zoomables(): Element[] {\n return [...document.querySelectorAll(ZOOMABLES)].filter((element) =>\n element instanceof HTMLImageElement ? ImageZoom.isZoomable(element) : !element.hasAttribute(ADDED)\n )\n }\n\n /**\n * Show the zoomable `direction` (1 next, -1 previous) after `from`; `from` is shut by `shut()`\n * - at either end it doesn't wrap: the shown one bounces (`bounce()`)\n * - `from`: a content `<ui-zoom>`, or `undefined` for the page's own zoom (showing `ImageZoom.shown`)\n * - an image replaces the page zoom's picture in place: its modal stays open\n */\n static step(direction: 1 | -1, from: Element | undefined, shut: () => void) {\n const list = ImageZoom.zoomables()\n if (list.length < 2) return\n const at = list.indexOf(from ?? ImageZoom.shown!)\n const target = list[(at < 0 ? (direction > 0 ? -1 : list.length) : at) + direction]\n if (!target) {\n const zoom = from ?? document.querySelector(`body > ${ZOOM_TAG}[${ADDED}]`)\n ImageZoom.bounce(zoom?.shadowRoot?.querySelector(from ? \".content\" : \".figure\"), direction)\n return\n }\n if (target.localName === ZOOM_TAG) {\n shut()\n target.shadowRoot?.querySelector<HTMLButtonElement>(\"button.show\")?.click()\n return\n }\n const image = target instanceof HTMLImageElement ? target : target.shadowRoot?.querySelector(\"img\")\n if (!image) return\n if (from) {\n ImageZoom.show(image)\n shut()\n return\n }\n const zoom = document.querySelector(`body > ${ZOOM_TAG}[${ADDED}]`)\n if (zoom) void ImageZoom.slide(zoom, direction, () => ImageZoom.show(image))\n else ImageZoom.show(image)\n }\n\n /** Does `link` lead to an image: `image`'s own file, a `data:image/` address, or a file with an image's extension? */\n private static linksImage(link: HTMLAnchorElement, image: HTMLImageElement): boolean {\n const href = link.href\n if (!href) return true\n if (href === image.src || href === image.currentSrc) return true\n return IMAGE_ADDRESS.test(href)\n }\n}\n\n/** The page's zoom. */\nconst ZOOM_TAG = \"ui-zoom\"\n\n/**\n * The zoom's motion, for `<ui-zoom>` and `ImageZoom`.\n * - growing out of the page's picture, shrinking back, paging, the bounce at either end\n * - none of it for `prefers-reduced-motion`: `isStill()`\n */\nexport const ZoomMotion = {\n /** the easing of every move but the bounce */\n ease: \"cubic-bezier(.2, .8, .2, 1)\",\n /** growing out of the page's picture (ms) */\n growMs: 320,\n /** shrinking back into it (ms) */\n shrinkMs: 240,\n /** paging, in and out (ms) */\n slideMs: 380,\n /** the bounce at either end: how far (px) and how long (ms) */\n bouncePx: 40,\n bounceMs: 320,\n /** The person asked for less motion. */\n isStill: () => matchMedia(\"(prefers-reduced-motion: reduce)\").matches\n}\n\n/** What zooms: content zooms, `<ui-image zoom>`s and plain images (`isZoomable()` picks those). */\nconst ZOOMABLES = \"ui-zoom, ui-image[zoom], img\"\n\n/** The attribute that marks a zoomable image under the pointer: the page's sheet draws its cursor. */\nconst ZOOM_MARK = \"data-ui-zoom\"\n\n/** The mark on the zoom `show()` made: the docs' live patch steps around it, and `show()` finds it again. */\nconst ADDED = \"data-spell-added\"\n\n/** What an image is never zoomed inside: a button, a `<ui-zoom>` of its own, or a block marked so. */\nconst NO_ZOOM = \"[data-no-zoom], button, ui-button, ui-zoom\"\n\n/** The least an image is shown at, on its longer side, to zoom: smaller ones are icons and badges. */\nconst MIN_SHOWN = 64\n\n/** An address of an image: a `data:image/` one, or a file by its extension (before any `?` or `#`). */\nconst IMAGE_ADDRESS = /^data:image\\/|\\.(png|jpe?g|gif|webp|avif|svg)([?#]|$)/i\n","/**\n * The English vocabulary of `<ui-zoom>`: every name the tag uses.\n * - Its tag, attributes (each with its kind and allowed values), slots, parts, states and texts.\n * The shape is `E.ComponentVocabulary` (`spell/ui/vocabulary`).\n * - Moved from the epics pack's `<epic-zoom>` (epic `ui-gaps` P14, from epic `epic-engine` P14 and its Q22):\n * it zooms an image, as `<epic-zoom>` did, AND anything it wraps.\n * - No class words: every attribute is property-only.\n */\n\nimport type { E } from \"spell/ui/core\"\n\n/****************\n * ### `zoomVocabulary`\n * The names of `<ui-zoom>`: something shown small, or not at all, and full size over the page on a click.\n ****************/\nexport const zoomVocabulary = {\n tag: \"ui-zoom\",\n icon: \"search plus\",\n topics: [\"images\", \"media\", \"overlays\"],\n aka: [\"lightbox\", \"zoom\", \"full size\", \"image viewer\", \"magnifier\", \"expand\", \"screenshot\", \"thumbnail\"],\n noun: \"zoom\",\n description:\n \"A zoom shows something full size, over the page. Round any content it shows it shrunk, within a width and \" +\n \"height, and full size on a click; with `src` it shows that image full size. Escape, a click outside it or \" +\n \"its close button close it.\",\n attributes: [\n {\n name: \"max-width\",\n group: \"layout\",\n kind: \"string\",\n description:\n \"The widest the shrunk view gets, a CSS length (`320px`, `50%`); none: its container's width. \" +\n \"Content past it is cut off, until it's shown full size.\"\n },\n {\n name: \"max-height\",\n group: \"layout\",\n kind: \"string\",\n description:\n \"The tallest the shrunk view gets, a CSS length (`200px`, `20em`); none: as tall as its content. \" +\n \"Content past it is cut off, until it's shown full size.\"\n },\n {\n name: \"shrink\",\n group: \"layout\",\n kind: \"string\",\n default: \"50%\",\n description:\n \"How big its content is in the shrunk view, a percentage of its full size: `50%` by default; `100%` \" +\n \"keeps it full size, cut off by `max-width` / `max-height`.\"\n },\n {\n name: \"open\",\n group: \"states\",\n kind: \"boolean\",\n description: \"Shown full size, over the page. Set to open it from script; closing it clears it.\"\n },\n {\n name: \"src\",\n group: \"link\",\n kind: \"string\",\n description:\n \"An image to show full size, in place of its content: open while it's set, and cleared as it closes. \" +\n \"The page's zoom for its screenshots (`ImageZoom`) is one of these.\"\n },\n {\n name: \"alt\",\n group: \"content\",\n kind: \"string\",\n description: \"With `src`: the image's alt text, its caption, and the zoomed image's own name.\"\n }\n ],\n events: [],\n slots: [{ name: \"\", description: \"What it zooms: any content, shown shrunk, then full size on a click.\" }],\n parts: [\n { name: \"view\", description: \"The shrunk view of its content, in the page.\" },\n { name: \"button\", description: \"The button over the shrunk view that shows it full size.\" },\n { name: \"base\", description: \"The `<ui-modal>`, over the whole window.\" },\n { name: \"content\", description: \"Its content, full size, in the modal.\" },\n { name: \"image\", description: \"With `src`: the image, as large as fits.\" },\n { name: \"caption\", description: \"With `src`: its alt text, under it.\" }\n ],\n states: [{ name: \"open\", description: \"Shown full size, over the page.\" }],\n texts: [\n { key: \"show\", text: \"Show full size\", description: \"The name of the button over the shrunk view.\" },\n { key: \"zoomed\", text: \"{alt}, full size\", description: \"The zoomed image's alt text (its own `alt`).\" },\n { key: \"untitled\", text: \"Image, full size\", description: \"The zoomed image's alt text, when it had none.\" }\n ]\n} as const satisfies E.ComponentVocabulary\n","/*\n * `<ui-zoom>` (`UIZoom.tsx`): something shown shrunk in the page, and full size over the whole window.\n * - The shadow markup:\n *\n * <div class=\"view\" part=\"view\"> (round content; none with `src`)\n * <div class=\"shrunk\" inert><slot></slot></div> (while it's shut)\n * <button class=\"show\" part=\"button\"> (over the whole view)\n * </div>\n * <ui-modal class=\"ui zoom [image]\" part=\"base\" appearance=\"basic\" closable>\n * <figure class=\"figure\"> (with `src`)\n * <img class=\"image\" part=\"image\"><figcaption class=\"caption\" part=\"caption\">\n * </figure>\n * <div class=\"content\" part=\"content\"><slot></slot></div> (round content, while it's open)\n * </ui-modal>\n *\n * - The view: its content laid out at full size, then drawn smaller (CSS `zoom`, the shrink),\n * within `max-width` / `max-height` (cut off past them). A zoom-in cursor, and a focus ring on its button.\n * - The modal is `basic`: no box of its own, on a dark backdrop whatever the page's theme.\n * - an image straight on the backdrop: as large as fits the window, less a margin and the caption's line;\n * never cropped, never enlarged past its natural size (`max-*` only, `object-fit: contain`)\n * - content on the page's ground, at the width it had in the page, scrolling when it's taller than the window\n * - The close button: the window's top right corner, out of the way.\n * - Public tokens (`--ui-zoom-*`) are never declared here: read through private aliases.\n */\n\n@layer ui.components.zoom.types;\n\n@layer ui.components.zoom.types {\n :host {\n --_ui-zoom-margin: var(--ui-zoom-margin, 24px);\n --_ui-zoom-caption: var(--ui-zoom-caption, 2.5em);\n --_ui-zoom-radius: var(--ui-zoom-radius, var(--ui-radius, 4px));\n /* as wide as what it shows, so a click beside it is the page's */\n display: block;\n inline-size: fit-content;\n max-inline-size: 100%;\n }\n /* the page's zoom for its screenshots holds nothing in the page */\n :host([src]) {\n display: contents;\n }\n\n /* the shrunk view */\n .view {\n position: relative;\n box-sizing: border-box;\n inline-size: fit-content;\n max-inline-size: 100%;\n overflow: hidden;\n border-radius: var(--_ui-zoom-radius);\n }\n .shrunk {\n /* the slotted content can't be reached in here: the button over it shows it full size */\n pointer-events: none;\n }\n .show {\n position: absolute;\n inset: 0;\n margin: 0;\n padding: 0;\n border: 0;\n border-radius: inherit;\n background: transparent;\n cursor: zoom-in;\n }\n .show:focus-visible {\n outline: 2px solid var(--ui-focus-color, Highlight);\n outline-offset: -2px;\n }\n\n ui-modal {\n /* dark whatever the page's theme: a screenshot is judged on black, not on the page's dimmer */\n --ui-modal-dimmer-background: var(--ui-zoom-backdrop, oklch(0 0 0 / 0.9));\n }\n ui-modal::part(modal) {\n width: auto;\n max-width: none;\n max-height: none;\n margin: auto;\n padding: 0;\n overflow: visible;\n background: transparent;\n box-shadow: none;\n /* the modal's own scale-in would shrink the picture while it measures where to grow from: it only fades */\n transform: none;\n }\n ui-modal::part(close) {\n position: fixed;\n top: 12px;\n right: 12px;\n color: #fff;\n }\n\n /* an image, full size */\n .figure {\n display: flex;\n flex-direction: column;\n align-items: center;\n gap: 8px;\n margin: 0;\n cursor: zoom-out;\n }\n .image {\n display: block;\n max-width: calc(100vw - 2 * var(--_ui-zoom-margin));\n max-height: calc(100vh - 2 * var(--_ui-zoom-margin) - var(--_ui-zoom-caption));\n object-fit: contain;\n border-radius: var(--_ui-zoom-radius);\n }\n .caption {\n max-width: calc(100vw - 2 * var(--_ui-zoom-margin));\n color: #fff;\n text-align: center;\n line-height: 1.4;\n }\n\n /* content, full size */\n .content {\n box-sizing: border-box;\n /* its content's width in the page (the component's), so the modal is no wider than it */\n inline-size: fit-content;\n max-width: calc(100vw - 2 * var(--_ui-zoom-margin));\n margin-inline: auto;\n max-height: calc(100vh - 2 * var(--_ui-zoom-margin));\n overflow: auto;\n padding: var(--ui-zoom-padding, 16px);\n border-radius: var(--_ui-zoom-radius);\n background: var(--ui-zoom-background, var(--ui-surface, Canvas));\n color: var(--ui-text-color, CanvasText);\n }\n}\n","import { Show } from \"solid-js\"\nimport type { JSX } from \"@solidjs/web\"\n\nimport { E } from \"spell/ui/core\"\nimport { ImageZoom, ZoomMotion } from \"./ImageZoom\"\nimport { zoomVocabulary } from \"./UIZoom.en\"\n\nimport zoomCSS from \"./UIZoom.css?inline\"\n\n/****************\n * ### `<ui-zoom>`\n * The component behind `<ui-zoom>`: something shown full size over the page (epic `ui-gaps` P14, from the epics\n * pack's `<epic-zoom>`; Owen, epic `epic-engine` Q22: \"both. `<ui-zoom>` can surround anything to zoom it\").\n *\n * - Round any content: the content is shown SHRUNK in the page, and full size on a click.\n * - shrunk: laid out at full size, then drawn at `shrink` of it (50% by default; CSS `zoom`),\n * within `max-width` / `max-height`, cut off past them\n * - a button over the whole view opens it; the content under it can't be reached until then (`inert`)\n * - full size: in a `<ui-modal appearance=\"basic\">`, on the page's ground, at the width it had in the page;\n * the view keeps its room meanwhile, so the page doesn't jump\n * - `open` says it's open (and opens it from script); Escape, the backdrop or the close button shut it\n * - With `src`: that image full size, as `<epic-zoom>` did, in place of any content.\n * - as large as fits the window (never cropped, never enlarged past its own size), its alt text under it\n * - open while `src` is set; Escape, a click anywhere or the close button close it, and it removes its own `src`\n * - the page's ONE zoom for its screenshots is one of these, made by `ImageZoom.show()`; `<ui-image zoom>` uses it\n * - Motion (none under `prefers-reduced-motion`):\n * - it GROWS out of its place on the page (the content's view, or the picture clicked) and SHRINKS back into it\n * before the modal closes, however it's closed (Escape, a click, the close button)\n * - paging with the arrow keys slides the next picture in, like scrolling (`ImageZoom`)\n * - Arrow keys while showing: the next / previous zoomable on the page; past either end the picture bounces (`ImageZoom.step()`)\n * - The modal's own events (`ui-opened`, `ui-closed` ...) come out of it, as from any `<ui-modal>`.\n ****************/\nexport class UIZoom extends E.UIComponent<typeof zoomVocabulary> {\n @E.proto static vocabulary = zoomVocabulary\n @E.protoMerged static elementSetup = {\n styleSheets: { zoom: zoomCSS }\n } satisfies Partial<E.ElementSetup>\n\n /** Its content shown full size: `open`. */\n @E.cssState(\"open\")\n @E.controlled(\"open\")\n accessor isOpen = false\n\n /**\n * Opening and shutting it as a person does: through `requestChange()`, so the page's own `open` wins;\n * no events of its own (its modal's come out), and its button's `aria-expanded`.\n */\n readonly disclosure = new E.Disclosure({ component: this, member: \"isOpen\" })\n\n /** The room the view took in the page, kept while its content is in the modal. */\n @E.state accessor heldSize: { width: number; height: number } | undefined = undefined\n\n /** The width its content was laid out at in the page, in px: the modal shows it at that width. */\n @E.state accessor fullWidth: number | undefined = undefined\n\n /** The modal is up: an image (`src`), or the content. */\n get isShowing(): boolean {\n return !!this.src || this.isOpen\n }\n\n /** `shrink` as a ratio: `\"50%\"` => 0.5; anything it can't read, the default. */\n get shrinkRatio(): number {\n const percent = Number.parseFloat(this.shrink ?? \"\")\n if (!Number.isFinite(percent) || percent <= 0) return DEFAULT_RATIO\n return Math.min(percent, 100) / 100\n }\n\n /** The view's box: its caps, or the room it holds while open. */\n get viewStyle(): JSX.CSSProperties {\n const style: JSX.CSSProperties = {}\n if (this.maxWidth) style[\"max-inline-size\"] = `min(100%, ${this.maxWidth})`\n if (this.maxHeight) style[\"max-block-size\"] = this.maxHeight\n const held = this.isOpen ? this.heldSize : undefined\n if (held) Object.assign(style, { \"inline-size\": `${held.width}px`, \"block-size\": `${held.height}px` })\n return style\n }\n\n /** The shrunk view's box, once drawn. */\n private view?: HTMLElement\n /** The modal, once drawn. */\n private modal?: HTMLElement\n\n /** The button over the view: its room kept, then shown full size. */\n @E.untracked\n protected showFullSize() {\n const view = this.view\n if (view) {\n const box = view.getBoundingClientRect()\n this.heldSize = { width: box.width, height: box.height }\n const shrunk = view.querySelector<HTMLElement>(`.${SHRUNK}`)\n if (shrunk) this.fullWidth = Math.round(shrunk.getBoundingClientRect().width / this.shrinkRatio)\n }\n this.disclosure.open()\n }\n\n /** Shut (Escape, its close button, the backdrop): an image's `src` goes, ready for the next; content goes back. */\n @E.on(\"ui-closed\", { target: \"renderRoot\" })\n protected onClosed(event: Event) {\n // a modal in the content, closing, says so through this shadow root too: only its own counts\n if (event.target !== this.modal) return\n this.shut()\n }\n\n /**\n * About to close (Escape, the backdrop, its close button): shrink back into place first, then close.\n * - `ui-closing` is vetoed while it shrinks, then `shut()` closes the modal without asking again\n */\n @E.on(\"ui-closing\", { target: \"renderRoot\" })\n protected onClosing(event: Event) {\n if (event.target !== this.modal) return\n if (!this.isShrinking && !this.canMove()) return\n event.preventDefault()\n void this.dismiss()\n }\n\n /** A click on the zoomed image: shut too, as a lightbox does. */\n @E.on(\"click\", { target: \"renderRoot\" })\n protected onClick(event: MouseEvent) {\n if (event.target instanceof Element && event.target.closest(`.${FIGURE}`)) void this.dismiss()\n }\n\n ////////////////\n // ## Growing and shrinking\n ////////////////\n\n /** Shown now, for `onShowingChanged()`. */\n private wasShowing = false\n\n /** It shrinks back into the page: shutting waits for it. */\n private isShrinking = false\n\n /** It came up (a picture's `src`, or `open`): grow out of its place. */\n @E.onChange(\"src\", \"isOpen\")\n protected onShowingChanged() {\n const showing = this.isShowing\n if (showing && !this.wasShowing) void this.grow()\n this.wasShowing = showing\n }\n\n /** What's drawn full size: the picture, or the content's box. */\n private get zoomed(): HTMLElement | null {\n return this.modal?.querySelector<HTMLElement>(`.${IMAGE}, .${CONTENT}`) ?? null\n }\n\n /** Where it sits on the page: the picture clicked (still the one `src` shows), or the content's view. */\n private get placeOnPage(): DOMRect | undefined {\n let box: DOMRect | undefined\n if (this.src) {\n const shown = ImageZoom.shown\n const image = shown instanceof HTMLImageElement ? shown : shown?.shadowRoot?.querySelector(\"img\")\n if (image?.isConnected && (image.currentSrc || image.src) === this.src) box = image.getBoundingClientRect()\n } else box = this.view?.getBoundingClientRect()\n return box?.width ? box : undefined\n }\n\n /** Can it grow or shrink: motion allowed, something drawn, and its place on the page known? */\n private canMove(): boolean {\n return !ZoomMotion.isStill() && !!this.zoomed && !!this.placeOnPage\n }\n\n /** The transform that draws `zoomed` over `place`: centred on it, scaled to its width. */\n private static over(place: DOMRect, zoomed: DOMRect): string {\n const dx = place.left + place.width / 2 - (zoomed.left + zoomed.width / 2)\n const dy = place.top + place.height / 2 - (zoomed.top + zoomed.height / 2)\n return `translate(${dx}px, ${dy}px) scale(${place.width / zoomed.width})`\n }\n\n /** Grow out of its place on the page. */\n private async grow() {\n if (ZoomMotion.isStill()) return\n // once it's drawn into the modal: the first time, that takes the element's own set-up too\n let zoomed = this.zoomed\n for (let frame = 0; !zoomed && frame < DRAW_FRAMES; frame++) {\n await new Promise((resolve) => E.beforeNextPaint(() => resolve(undefined)))\n zoomed = this.zoomed\n }\n const place = this.placeOnPage\n if (!zoomed || !place) return\n if (zoomed instanceof HTMLImageElement) await zoomed.decode().catch(() => undefined)\n const frames = [\n { transform: UIZoom.over(place, zoomed.getBoundingClientRect()), opacity: 0.6 },\n { transform: \"none\", opacity: 1 }\n ]\n zoomed.animate(frames, { duration: ZoomMotion.growMs, easing: ZoomMotion.ease })\n }\n\n /** Shrink back into its place on the page, then `shut()`; at once when it can't move. */\n @E.untracked\n private async dismiss() {\n if (this.isShrinking) return\n const zoomed = this.zoomed\n const place = this.placeOnPage\n if (!zoomed || !place || ZoomMotion.isStill()) return this.shut()\n this.isShrinking = true\n const frames = [\n { transform: \"none\", opacity: 1 },\n { transform: UIZoom.over(place, zoomed.getBoundingClientRect()), opacity: 0.4 }\n ]\n // held at the end while the modal fades\n const shrinking = zoomed.animate(frames, {\n duration: ZoomMotion.shrinkMs,\n easing: ZoomMotion.ease,\n fill: \"forwards\"\n })\n await shrinking.finished.catch(() => undefined)\n this.isShrinking = false\n this.shut()\n }\n\n /**\n * Arrow keys while showing: the next / previous zoomable on the page (`ImageZoom.step()`).\n * Not from a text field in the zoomed content, which keeps its arrows.\n */\n @E.on(\"keydown\", { target: \"renderRoot\" })\n protected onKeyDown(event: KeyboardEvent) {\n const step = ARROW_STEPS[event.key]\n if (!step || event.defaultPrevented || event.metaKey || event.ctrlKey || event.altKey || !this.isShowing) return\n const typing = event.composedPath()[0]\n if (typing instanceof HTMLElement && typing.matches(TEXT_FIELDS)) return\n event.preventDefault()\n ImageZoom.step(step, this.src ? undefined : this.domElement, () => this.shut())\n }\n\n /** Shut: no `src`, not open. */\n @E.untracked\n private shut() {\n if (this.src) this.domElement.removeAttribute(\"src\")\n this.disclosure.close()\n }\n\n render(): JSX.Element {\n return (\n <>\n <Show when={!this.src}>\n <div\n ref={(element) => (this.view = element)}\n class={VIEW}\n part={this.partForName(\"view\")}\n style={this.viewStyle}\n >\n <Show when={!this.isOpen}>\n <div class={SHRUNK} inert={true} style={{ zoom: String(this.shrinkRatio) }}>\n <slot />\n </div>\n </Show>\n <button\n type=\"button\"\n class={SHOW}\n part={this.partForName(\"button\")}\n aria-label={this.translationForKey(\"show\")}\n aria-haspopup=\"dialog\"\n aria-expanded={this.disclosure.ariaExpanded}\n title={this.translationForKey(\"show\")}\n onClick={() => this.showFullSize()}\n />\n </div>\n </Show>\n <ui-modal\n ref={(element: HTMLElement) => (this.modal = element)}\n class={this.rootClass}\n part={this.partForName(\"base\")}\n appearance=\"basic\"\n closable=\"\"\n visible={this.isShowing ? \"\" : undefined}\n >\n <Show when={this.src} fallback={this.fullContent()}>\n {(src) => (\n <figure class={FIGURE}>\n <img\n class={IMAGE}\n part={this.partForName(\"image\")}\n src={src()}\n alt={\n this.alt ? this.translationForKey(\"zoomed\", { alt: this.alt }) : this.translationForKey(\"untitled\")\n }\n />\n <Show when={this.alt}>\n <figcaption class={CAPTION} part={this.partForName(\"caption\")}>\n {this.alt}\n </figcaption>\n </Show>\n </figure>\n )}\n </Show>\n </ui-modal>\n </>\n )\n }\n\n /** Its content, full size, while open: at the width it had in the page. */\n private fullContent(): JSX.Element {\n return (\n <Show when={this.isOpen}>\n <div class={CONTENT} part={this.partForName(\"content\")}>\n <div style={this.fullWidth ? { \"inline-size\": `${this.fullWidth}px` } : undefined}>\n <slot />\n </div>\n </div>\n </Show>\n )\n }\n}\n\n/** The vocabulary's attribute getters, typed (see \"Attributes\" in `UIComponent`). */\nexport interface UIZoom extends E.AttributeValues<typeof zoomVocabulary> {}\n\n/** Arrow keys that step to the next (1) or previous (-1) zoomable. */\nconst ARROW_STEPS: Record<string, 1 | -1 | undefined> = { ArrowRight: 1, ArrowDown: 1, ArrowLeft: -1, ArrowUp: -1 }\n\n/** What keeps its own arrow keys. */\nconst TEXT_FIELDS = \"input:not([type=checkbox], [type=radio], [type=button]), textarea, select, [contenteditable]\"\n\n/** How many frames it waits for its picture or content to be drawn, before it gives up growing. */\nconst DRAW_FRAMES = 30\n\n/** `shrink`'s default: half size. */\nconst DEFAULT_RATIO = 0.5\n\n/** Classes of its shadow markup: the view, its shrunk content, its button; the image, its figure and caption; the content full size. */\nconst VIEW = \"view\"\nconst SHRUNK = \"shrunk\"\nconst SHOW = \"show\"\nconst FIGURE = \"figure\"\nconst IMAGE = \"image\"\nconst CAPTION = \"caption\"\nconst CONTENT = \"content\"\n","/**\n * The zoom family: defines `<ui-zoom>` and exports its component, `UIZoom`, and `ImageZoom`, which opens a page's\n * screenshots in it.\n * - SIDE EFFECT: importing it defines the tag, and `<ui-modal>` (what it shows things full size in).\n * - Also the library's `spell/ui/ui-zoom` entry (its size is in `notes/report.md`).\n * - `ImageZoom` alone, with no element: `spell/ui/components/ui-zoom/ImageZoom` (the docs runtime's import).\n */\n\nimport { UIZoom } from \"./UIZoom\"\nimport { ImageZoom } from \"./ImageZoom\"\n\nimport \"spell/ui/components/ui-modal\"\n\nUIZoom.define()\n\nexport { UIZoom, ImageZoom }\n"],"mappings":";;;;;;AAiCA,IAAawD,IAAb,MAAa,UAAU;CAErB,OAAO,SAAS,GAAiD;EAE/D,IADIC,EAAM,oBAAoBA,EAAM,WAAW,KAC3CA,EAAM,WAAWA,EAAM,WAAWA,EAAM,YAAYA,EAAM,QAAQ;EACtE,I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A,GACF/D,EAAA2D,GAAA,IAAO,cAAhBF,GADWM,CAAA,GAEI/D,EAAA2D,GAAA,IAAO,gBAAtBH,GAFWO,CAAA,GAAN9D,EAAA0D,GAAMI,CAAA,GAAoDpE,EAAAoE,GAAA,QAAA,GACtDhE,EADEgE,GACK,cAAa7D,EAApByD,GAAA,IADEI,GACkB1B,EAAA,CAAA,GAApBnC,EAAAyD,GAAA,IADEI,CAAA,GAEIhE,EAFJgE,GAEW,gBAAe7D,EAAtByD,GAAA,IAFJI,GAE0B,EACnC,aAAa,EAAE,MAAMnE,GAAQ,EAC/B,CAAA,CAAA,GAFeM,EAAAyD,GAAA,IAFJI,CAAA;AAAN,IAAMiE,IAANjE,GAmRD4B,KAAkD;CAAE,YAAY;CAAG,WAAW;CAAG,WAAW;CAAI,SAAS;AAAG,GAG5GE,KAAc,gGAGdL,KAAc,IAGdb,KAAgB,IAGhBkC,KAAO,QACP7B,IAAS,UACT8B,KAAO,QACP7B,IAAS,UACTE,IAAQ,SACRuC,KAAU,WACVtC,IAAU;;;eCxThB4C,EAAO,OAAO"}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
/****************
|
|
2
|
+
* ### `TopLayerTip`
|
|
3
|
+
* Puts a component's CSS tooltip in the browser's top layer while it shows, so no parent frame can cut it off.
|
|
4
|
+
* - A tip is a `role="tooltip"` element in the component's shadow root:
|
|
5
|
+
* `<ui-field>`'s under its info icon, `<ui-section>`'s under its title bar.
|
|
6
|
+
* - Each sheet still decides how it looks and when it fades in, on `:hover` and `:focus-visible`.
|
|
7
|
+
* This only makes it a `popover` for as long as it shows, which the sheet places with CSS anchor positioning.
|
|
8
|
+
* - So a tip with no script behind it, in plain markup, still shows: in its frame, as it always did.
|
|
9
|
+
* - Plain DOM: no Solid, no runtime, a few listeners on an element they die with.
|
|
10
|
+
* - In `spell/ui/util`, so `core` carries it: `E.TopLayerTip`, for every family's tip.
|
|
11
|
+
* - STATIC and instance-free on purpose: a tip has nothing to remember between showings.
|
|
12
|
+
****************/
|
|
13
|
+
export declare class TopLayerTip {
|
|
14
|
+
/**
|
|
15
|
+
* Show the tip inside `container` while the pointer's on a `trigger`, or one has keyboard focus.
|
|
16
|
+
* - `container`: an element holding the tip and every trigger; a tip that comes and goes is found each time.
|
|
17
|
+
* - `trigger`: a selector inside the same shadow root.
|
|
18
|
+
* - `showOnClick`: a click on a trigger shows it at once, for as long as it keeps focus: an info icon's, whose click does nothing else.
|
|
19
|
+
* Not for a trigger whose click does something, e.g. a section's title: there, only keyboard focus shows it.
|
|
20
|
+
* - Escape hides it, until the pointer or the focus comes back.
|
|
21
|
+
* - NEVER throws.
|
|
22
|
+
*/
|
|
23
|
+
static showIn(container: HTMLElement, trigger: string, { showOnClick }?: {
|
|
24
|
+
showOnClick?: boolean;
|
|
25
|
+
}): void;
|
|
26
|
+
/** Put `tip` in the top layer, or take it out. NEVER throws: one the browser can't show stays in its frame. */
|
|
27
|
+
static setShown(tip: HTMLElement, isShown: boolean): void;
|
|
28
|
+
}
|
package/dist/util/index.d.ts
CHANGED
|
@@ -23,7 +23,8 @@
|
|
|
23
23
|
* - the kit's timing helpers (`spell/util/timing`), to run a function later:
|
|
24
24
|
* `afterSolidUpdate()`, `beforeNextPaint()`, `soon()`, `after()`, `every()`; and to wait: `waitUntil()`, `within()`
|
|
25
25
|
* - `Warnings` -- `ui`'s console warnings, its own
|
|
26
|
-
* - `
|
|
26
|
+
* - `TopLayerTip` -- a tooltip in the top layer, so no frame cuts it off
|
|
27
|
+
* - `LoadOnce` (`spell/util/LoadOnce`) -- a load per key, once per page, with a choice of what a failure does
|
|
27
28
|
*/
|
|
28
29
|
export * from '../_util/class';
|
|
29
30
|
export * from '../_util/decorators';
|
|
@@ -32,5 +33,7 @@ export * from '../_util/number';
|
|
|
32
33
|
export * from '../_util/string';
|
|
33
34
|
export * from '../_util/util.types';
|
|
34
35
|
export * from '../_util/timing';
|
|
36
|
+
export * from './TopLayerTip';
|
|
35
37
|
export * from './Warnings';
|
|
36
|
-
export * from '
|
|
38
|
+
export * from '../_util/LoadOnce';
|
|
39
|
+
export * from '../_util/ListSelection';
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { AttributeSpec } from '../_spell-element/vocabulary.types';
|
|
2
|
+
import { ValueSets } from './ValueSets';
|
|
3
|
+
/****************
|
|
4
|
+
* ### `DefaultValues`
|
|
5
|
+
* Which attributes may have a default, and whether a value is one an attribute takes (epic `language` P28, P29):
|
|
6
|
+
* the ONE check, which a root makes as the page draws (`RootSettings.defaultsFor()`) and the spell compiler makes as
|
|
7
|
+
* it reads an app's `<ui-defaults>` (the app's Spell UI pack).
|
|
8
|
+
* - Pure: a spec and a value, no element, no DOM, so node loads it too.
|
|
9
|
+
* - STATIC and instance-free on purpose.
|
|
10
|
+
****************/
|
|
11
|
+
export declare class DefaultValues {
|
|
12
|
+
/** Is `spec` what an element shows (its text, its value, its rich data), rather than how it looks or acts? */
|
|
13
|
+
static isContent(spec: Pick<AttributeSpec, "name" | "group" | "kind">): boolean;
|
|
14
|
+
/**
|
|
15
|
+
* What's wrong with `value` as `spec`'s default, as its vocabulary checks it; `undefined` when nothing is.
|
|
16
|
+
* - `value`: canonical (English) text, a number, or `true` / `false`.
|
|
17
|
+
*/
|
|
18
|
+
static problemWith(spec: AttributeSpec, value: unknown): DefaultValueProblem | undefined;
|
|
19
|
+
/** Is `spec` on or off, `fluid`? */
|
|
20
|
+
static isOnOrOff(spec: Pick<AttributeSpec, "kind">): boolean;
|
|
21
|
+
/** The values `spec`'s default is checked against, by its kind; `undefined` for free text. */
|
|
22
|
+
static setOf(spec: AttributeSpec): ReturnType<typeof ValueSets.setFor>;
|
|
23
|
+
/** `problem` in English, for a page's warning: `isn't one of its values; did you mean "pill"?`. */
|
|
24
|
+
static textOf(problem: DefaultValueProblem): string;
|
|
25
|
+
}
|
|
26
|
+
/** What's wrong with a default's value (`DefaultValues.problemWith()`): what the attribute takes instead. */
|
|
27
|
+
export type DefaultValueProblem = {
|
|
28
|
+
/** what it takes: one of `values`, true or false, none of those, a number, or text */
|
|
29
|
+
takes: "values" | "boolean" | "no-boolean" | "number" | "text";
|
|
30
|
+
/** its values, canonical, when `takes` is `values` */
|
|
31
|
+
values?: readonly string[];
|
|
32
|
+
/** the closest of them, when one is close */
|
|
33
|
+
guess?: string;
|
|
34
|
+
};
|
|
@@ -5,6 +5,10 @@ import { AttributeSpec, ComponentVocabulary, StateSpec } from '../_spell-element
|
|
|
5
5
|
* - `disabled`, `loading`, `visible` and `animation` (epic `spell-element`, P8 and P12)
|
|
6
6
|
* - `link` and `target`, `font`, `tooltip` and `label` (epic `ui-gaps` P3, Owen's request r1):
|
|
7
7
|
* where a click goes, how its letters look, the browser's tooltip, its accessible name
|
|
8
|
+
* - `shadow`, and `width`, `min-width` and `max-width` (epic `language` P35, I63):
|
|
9
|
+
* a hard shadow behind its letters, and how wide its box is where it sits
|
|
10
|
+
* - `movable` and `resizable` (epic `mockup` P14, J35): people drag it to a new place, or its corner to resize it
|
|
11
|
+
* (`MoveAndResize`, in `spell/element`)
|
|
8
12
|
* - `UIComponent` reads them ("Shared states", "Shown or hidden"):
|
|
9
13
|
* so `<ui-menu disabled>`, `<ui-table loading>`, `<ui-message visible="false">`
|
|
10
14
|
* and `<ui-modal animation="fly down">` work, though those vocabularies never name them.
|
|
@@ -14,12 +14,19 @@ export declare const sharedEs: {
|
|
|
14
14
|
readonly link: "enlace";
|
|
15
15
|
readonly target: "destino";
|
|
16
16
|
readonly font: "letra";
|
|
17
|
+
readonly shadow: "sombra";
|
|
18
|
+
readonly width: "ancho";
|
|
19
|
+
readonly "min-width": "ancho-min";
|
|
20
|
+
readonly "max-width": "ancho-max";
|
|
17
21
|
readonly tooltip: "ayuda";
|
|
18
22
|
readonly label: "etiqueta";
|
|
23
|
+
readonly movable: "movible";
|
|
24
|
+
readonly resizable: "redimensionable";
|
|
19
25
|
};
|
|
20
26
|
readonly values: {
|
|
21
27
|
readonly font: {
|
|
22
28
|
readonly bold: "negrita";
|
|
29
|
+
readonly heavy: "extranegrita";
|
|
23
30
|
readonly italic: "cursiva";
|
|
24
31
|
readonly underline: "subrayado";
|
|
25
32
|
readonly strikethrough: "tachado";
|
|
@@ -77,6 +77,13 @@ export declare class ValueSets {
|
|
|
77
77
|
* leaves out; no component uses it.
|
|
78
78
|
*/
|
|
79
79
|
static topics: readonly ["basic", "layout", "containers", "navigation", "menus", "forms", "inputs", "controls", "buttons", "selection", "date & time", "text", "typography", "media", "images", "icons", "data display", "lists", "tables", "cards", "feedback", "messages", "notifications", "overlays", "dialogs", "popups", "loading", "progress", "status", "animation", "social", "content parts", "documentation", "elements", "collections", "views", "modules"];
|
|
80
|
+
/**
|
|
81
|
+
* An icon for each value of a set that has them, by set name: what a select or segmented control draws beside
|
|
82
|
+
* (or instead of) each value's name (epic `debut` P31).
|
|
83
|
+
* - Not a set itself: a plain static, so it isn't a `ValueSetName`.
|
|
84
|
+
* - An attribute's own `icons` win (`AttributeSpec.icons`).
|
|
85
|
+
*/
|
|
86
|
+
static iconsBySet: Readonly<Partial<Record<string, Readonly<Record<string, string>>>>>;
|
|
80
87
|
/**
|
|
81
88
|
* Values of `set`: a shared set by name, or an inline list passed straight through.
|
|
82
89
|
* - Reads the PROTOTYPE, so `ValueSets.add()` and subclass overrides are seen.
|
|
@@ -106,6 +113,17 @@ export declare class ValueSets {
|
|
|
106
113
|
* - `undefined` for free-form kinds (`string`, `number`, `json`, `width`, `keyOnly`).
|
|
107
114
|
*/
|
|
108
115
|
static setFor(spec: AttributeSpec): ValueSetName | readonly string[] | undefined;
|
|
116
|
+
/**
|
|
117
|
+
* The value set its kind stands for (`size` => `sizes`), whatever values the attribute lists itself:
|
|
118
|
+
* so an attribute with a list of its own (`PosterSizes`) still has that set's translations.
|
|
119
|
+
* - `undefined` for a kind with no set of its own.
|
|
120
|
+
*/
|
|
121
|
+
static kindSetFor(spec: AttributeSpec): ValueSetName | undefined;
|
|
122
|
+
/**
|
|
123
|
+
* The icons of an attribute's values, by value: its own `icons`, else its value set's (`iconsBySet`).
|
|
124
|
+
* - `undefined` when neither has any.
|
|
125
|
+
*/
|
|
126
|
+
static iconsFor(spec: AttributeSpec): Readonly<Record<string, string>> | undefined;
|
|
109
127
|
/**
|
|
110
128
|
* Parse a width into a column count out of `GRID_COLUMNS` (16), WITHOUT rounding, so callers can warn on inexact
|
|
111
129
|
* values.
|
|
@@ -139,6 +139,7 @@ export declare class Vocabulary {
|
|
|
139
139
|
/**
|
|
140
140
|
* Localized value maps for one attribute, or `undefined` if it has no value set.
|
|
141
141
|
* - Per value: the tag's own (`components[tag].values`) > the shared set's map > `words` > itself.
|
|
142
|
+
* - A list of its own reads its kind's set's map (`size`'s `sizes`): `PosterSizes` is the sizes, and `poster`.
|
|
142
143
|
* - `words` only for an attribute's own values: never a shared attribute's (`animation` keeps Fomantic's names).
|
|
143
144
|
* - A shared attribute's own map, where its language words its values (`font="negrita"`):
|
|
144
145
|
* `SharedVocabulary.translatedValues()`.
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { AttributeSpec } from '../_spell-element/vocabulary.types';
|
|
2
|
+
/**
|
|
3
|
+
* Every component tag's own attributes, cut down to what checks a widget default (epic `language` P29):
|
|
4
|
+
* the app's Spell UI pack reads it to check and translate an app's `<ui-defaults>`.
|
|
5
|
+
*/
|
|
6
|
+
export declare const DEFAULTS_TABLE: Readonly<Record<string, readonly Pick<AttributeSpec, "name" | "kind" | "group" | "values" | "aliases">[]>>;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "spell-ui",
|
|
3
|
-
"version": "0.8.
|
|
3
|
+
"version": "0.8.8",
|
|
4
4
|
"description": "Beautiful, themeable, accessible components that load themselves on demand, for use in plain HTML or any framework",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"repository": "https://github.com/spell-app/spell",
|