spell-ui 0.8.15 → 0.8.17
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 +4 -2
- package/README-runtime.md +26 -1
- package/README.md +2 -1
- package/dist/SliderScale-DunjyaDW.js +67 -0
- package/dist/SliderScale-DunjyaDW.js.map +1 -0
- package/dist/{ThemeDraft-CyX3YA_L.js → ThemeDraft-spaNC2dD.js} +2 -2
- package/dist/{ThemeDraft-CyX3YA_L.js.map → ThemeDraft-spaNC2dD.js.map} +1 -1
- package/dist/{UIInput-B3K0w4ow.js → UIInput-8s1aiaw1.js} +2 -2
- package/dist/UIInput-8s1aiaw1.js.map +1 -0
- package/dist/{UIRuntime-DCv4sy30.js → UIRuntime-BaokNnwk.js} +900 -158
- package/dist/UIRuntime-BaokNnwk.js.map +1 -0
- package/dist/_spell-element/UIComponent.d.ts +7 -0
- package/dist/_spell-element/elements.types.d.ts +6 -0
- package/dist/_spell-element/vocabulary.types.d.ts +27 -0
- package/dist/_util/dom.d.ts +7 -0
- package/dist/components/components.es.d.ts +1 -0
- package/dist/components/ui-dial/DialArc.d.ts +43 -0
- package/dist/components/ui-dial/UIDial.d.ts +263 -0
- package/dist/components/ui-dial/UIDial.en.d.ts +149 -0
- package/dist/components/ui-dial/UIDial.es.d.ts +25 -0
- package/dist/components/ui-dial/UIDial.fallback.d.ts +167 -0
- package/dist/components/ui-dial/UIDial.types.d.ts +11 -0
- package/dist/components/ui-dial/index.d.ts +3 -0
- package/dist/components/ui-graph/UIGraph.d.ts +17 -0
- package/dist/components/ui-graph/UIGraph.en.d.ts +17 -0
- package/dist/components/ui-graph/UIGraph.es.d.ts +6 -0
- package/dist/components/ui-input/UIInput.d.ts +46 -3
- package/dist/components/ui-input/UIInput.en.d.ts +6 -1
- package/dist/components/ui-input/UIInput.es.d.ts +1 -0
- package/dist/components/ui-input/UIInput.fallback.d.ts +6 -1
- package/dist/components/ui-json/UIJson.d.ts +5 -4
- package/dist/components/ui-modal/ChoiceRows.d.ts +61 -0
- package/dist/components/ui-modal/ModalDialogs.d.ts +15 -1
- package/dist/components/ui-modal/UIModal.d.ts +6 -2
- package/dist/components/ui-modal/UIModal.en.d.ts +6 -2
- package/dist/components/ui-modal/UIModal.es.d.ts +1 -0
- package/dist/components/ui-page-layout/UIPageLayout.d.ts +141 -8
- package/dist/components/ui-page-layout/UIPageLayout.en.d.ts +51 -2
- package/dist/components/ui-page-layout/UIPageLayout.es.d.ts +3 -0
- package/dist/components/ui-property-editor/UIProperty.d.ts +2 -2
- package/dist/components/ui-site-links/UISiteLinks.d.ts +124 -0
- package/dist/components/ui-site-links/UISiteLinks.en.d.ts +60 -0
- package/dist/components/ui-site-links/UISiteLinks.es.d.ts +26 -0
- package/dist/components/ui-site-links/index.d.ts +1 -0
- package/dist/components/ui-site-nav-button/UISiteNavButton.d.ts +12 -5
- package/dist/components/ui-site-nav-button/UISiteNavButton.en.d.ts +32 -12
- package/dist/components/ui-site-nav-button/UISiteNavButton.es.d.ts +3 -0
- package/dist/components/ui-site-tabs/UISiteTabs.d.ts +13 -0
- package/dist/components/ui-site-tabs/UISiteTabs.en.d.ts +9 -0
- package/dist/components/ui-slider/SliderScale.d.ts +26 -2
- package/dist/components/ui-slider/UISlider.d.ts +0 -2
- 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-toc/TocIndex.d.ts +16 -1
- package/dist/components/ui-toc/UIToc.d.ts +27 -3
- package/dist/components/ui-toc/UIToc.en.d.ts +1 -1
- package/dist/components/ui-toc/UIToc.types.d.ts +5 -0
- package/dist/components/ui-tree/UITree.d.ts +38 -2
- package/dist/components/ui-tree/UITree.en.d.ts +9 -0
- package/dist/components/ui-tree/UITree.es.d.ts +4 -0
- package/dist/components/ui-uploader/UIUploader.d.ts +721 -0
- package/dist/components/ui-uploader/UIUploader.en.d.ts +394 -0
- package/dist/components/ui-uploader/UIUploader.es.d.ts +112 -0
- package/dist/components/ui-uploader/index.d.ts +1 -0
- package/dist/{components.es-DilRG1VO.js → components.es-jY2nBwuP.js} +249 -65
- package/dist/components.es-jY2nBwuP.js.map +1 -0
- package/dist/core.js +605 -571
- package/dist/core.js.map +1 -1
- package/dist/docs-components/docs-components.types.d.ts +2 -0
- package/dist/index.d.ts +3 -0
- package/dist/index.js +101 -97
- package/dist/jsx.d.ts +1138 -21
- package/dist/runtime/DataTooltips.d.ts +10 -0
- package/dist/runtime/Modals.d.ts +7 -2
- package/dist/runtime/Styles.d.ts +7 -1
- package/dist/runtime/UIRuntime.d.ts +6 -0
- package/dist/runtime/runtime.types.d.ts +26 -1
- package/dist/sound-library/back.ogg +0 -0
- package/dist/sound-library/beep.ogg +0 -0
- package/dist/sound-library/bell.ogg +0 -0
- package/dist/sound-library/big-punch.ogg +0 -0
- package/dist/sound-library/bong.ogg +0 -0
- package/dist/sound-library/book-close.ogg +0 -0
- package/dist/sound-library/book-down.ogg +0 -0
- package/dist/sound-library/book-open.ogg +0 -0
- package/dist/sound-library/card-fan-2.ogg +0 -0
- package/dist/sound-library/card-fan.ogg +0 -0
- package/dist/sound-library/card-place-2.ogg +0 -0
- package/dist/sound-library/card-place-3.ogg +0 -0
- package/dist/sound-library/card-place.ogg +0 -0
- package/dist/sound-library/card-shove-2.ogg +0 -0
- package/dist/sound-library/card-shove.ogg +0 -0
- package/dist/sound-library/card-slide-2.ogg +0 -0
- package/dist/sound-library/card-slide-3.ogg +0 -0
- package/dist/sound-library/card-slide-4.ogg +0 -0
- package/dist/sound-library/card-slide.ogg +0 -0
- package/dist/sound-library/chip-down-2.ogg +0 -0
- package/dist/sound-library/chip-down.ogg +0 -0
- package/dist/sound-library/chips-collide.ogg +0 -0
- package/dist/sound-library/chips-handle.ogg +0 -0
- package/dist/sound-library/chips-stack-2.ogg +0 -0
- package/dist/sound-library/chips-stack.ogg +0 -0
- package/dist/sound-library/chop.ogg +0 -0
- package/dist/sound-library/click-2.ogg +0 -0
- package/dist/sound-library/click-3.ogg +0 -0
- package/dist/sound-library/click.ogg +0 -0
- package/dist/sound-library/close.ogg +0 -0
- package/dist/sound-library/cloth.ogg +0 -0
- package/dist/sound-library/coins-2.ogg +0 -0
- package/dist/sound-library/coins.ogg +0 -0
- package/dist/sound-library/confirm-2.ogg +0 -0
- package/dist/sound-library/confirm.ogg +0 -0
- package/dist/sound-library/creak.ogg +0 -0
- package/dist/sound-library/deck-open.ogg +0 -0
- package/dist/sound-library/deck-take-out.ogg +0 -0
- package/dist/sound-library/dice-grab.ogg +0 -0
- package/dist/sound-library/dice-shake-2.ogg +0 -0
- package/dist/sound-library/dice-shake.ogg +0 -0
- package/dist/sound-library/dice-throw-2.ogg +0 -0
- package/dist/sound-library/dice-throw.ogg +0 -0
- package/dist/sound-library/die-throw-2.ogg +0 -0
- package/dist/sound-library/die-throw.ogg +0 -0
- package/dist/sound-library/door-close.ogg +0 -0
- package/dist/sound-library/door-open.ogg +0 -0
- package/dist/sound-library/drop.ogg +0 -0
- package/dist/sound-library/error-2.ogg +0 -0
- package/dist/sound-library/error.ogg +0 -0
- package/dist/sound-library/fail.ogg +0 -0
- package/dist/sound-library/fall.ogg +0 -0
- package/dist/sound-library/glass-break.ogg +0 -0
- package/dist/sound-library/glass-clink.ogg +0 -0
- package/dist/sound-library/glass-tap.ogg +0 -0
- package/dist/sound-library/glass.ogg +0 -0
- package/dist/sound-library/glitch.ogg +0 -0
- package/dist/sound-library/grow.ogg +0 -0
- package/dist/sound-library/high-up.ogg +0 -0
- package/dist/sound-library/hover-2.ogg +0 -0
- package/dist/sound-library/hover.ogg +0 -0
- package/dist/sound-library/jingle-2.ogg +0 -0
- package/dist/sound-library/jingle-3.ogg +0 -0
- package/dist/sound-library/jingle-4.ogg +0 -0
- package/dist/sound-library/jingle.ogg +0 -0
- package/dist/sound-library/jump.ogg +0 -0
- package/dist/sound-library/knife-draw.ogg +0 -0
- package/dist/sound-library/knife-slice.ogg +0 -0
- package/dist/sound-library/laser-2.ogg +0 -0
- package/dist/sound-library/laser.ogg +0 -0
- package/dist/sound-library/latch.ogg +0 -0
- package/dist/sound-library/level-up.ogg +0 -0
- package/dist/sound-library/lose-2.ogg +0 -0
- package/dist/sound-library/lose-3.ogg +0 -0
- package/dist/sound-library/lose-4.ogg +0 -0
- package/dist/sound-library/lose.ogg +0 -0
- package/dist/sound-library/low-down.ogg +0 -0
- package/dist/sound-library/metal-clang.ogg +0 -0
- package/dist/sound-library/metal-click.ogg +0 -0
- package/dist/sound-library/metal-crash.ogg +0 -0
- package/dist/sound-library/metal-tap.ogg +0 -0
- package/dist/sound-library/mouse-click.ogg +0 -0
- package/dist/sound-library/mouse-release.ogg +0 -0
- package/dist/sound-library/open.ogg +0 -0
- package/dist/sound-library/orchestra-hit-2.ogg +0 -0
- package/dist/sound-library/orchestra-hit.ogg +0 -0
- package/dist/sound-library/page-turn-2.ogg +0 -0
- package/dist/sound-library/page-turn.ogg +0 -0
- package/dist/sound-library/pickaxe.ogg +0 -0
- package/dist/sound-library/piece-down-2.ogg +0 -0
- package/dist/sound-library/piece-down-3.ogg +0 -0
- package/dist/sound-library/piece-down.ogg +0 -0
- package/dist/sound-library/piece-take-2.ogg +0 -0
- package/dist/sound-library/piece-take.ogg +0 -0
- package/dist/sound-library/piece-tap-2.ogg +0 -0
- package/dist/sound-library/piece-tap.ogg +0 -0
- package/dist/sound-library/plank.ogg +0 -0
- package/dist/sound-library/plate.ogg +0 -0
- package/dist/sound-library/pluck.ogg +0 -0
- package/dist/sound-library/pot.ogg +0 -0
- package/dist/sound-library/power-up-2.ogg +0 -0
- package/dist/sound-library/power-up-3.ogg +0 -0
- package/dist/sound-library/power-up.ogg +0 -0
- package/dist/sound-library/punch.ogg +0 -0
- package/dist/sound-library/question.ogg +0 -0
- package/dist/sound-library/rise.ogg +0 -0
- package/dist/sound-library/scratch.ogg +0 -0
- package/dist/sound-library/scroll.ogg +0 -0
- package/dist/sound-library/select-2.ogg +0 -0
- package/dist/sound-library/select.ogg +0 -0
- package/dist/sound-library/shrink.ogg +0 -0
- package/dist/sound-library/shuffle.ogg +0 -0
- package/dist/sound-library/soft-thud-2.ogg +0 -0
- package/dist/sound-library/soft-thud.ogg +0 -0
- package/dist/sound-library/space-junk.ogg +0 -0
- package/dist/sound-library/step-2.ogg +0 -0
- package/dist/sound-library/step-on-carpet.ogg +0 -0
- package/dist/sound-library/step-on-grass.ogg +0 -0
- package/dist/sound-library/step-on-snow.ogg +0 -0
- package/dist/sound-library/step-on-stone.ogg +0 -0
- package/dist/sound-library/step-on-wood.ogg +0 -0
- package/dist/sound-library/step.ogg +0 -0
- package/dist/sound-library/switch-2.ogg +0 -0
- package/dist/sound-library/switch.ogg +0 -0
- package/dist/sound-library/tap-2.ogg +0 -0
- package/dist/sound-library/tap.ogg +0 -0
- package/dist/sound-library/three-tones.ogg +0 -0
- package/dist/sound-library/tick-2.ogg +0 -0
- package/dist/sound-library/tick.ogg +0 -0
- package/dist/sound-library/tin.ogg +0 -0
- package/dist/sound-library/toggle-2.ogg +0 -0
- package/dist/sound-library/toggle.ogg +0 -0
- package/dist/sound-library/two-tones.ogg +0 -0
- package/dist/sound-library/win-2.ogg +0 -0
- package/dist/sound-library/win-3.ogg +0 -0
- package/dist/sound-library/win-4.ogg +0 -0
- package/dist/sound-library/win.ogg +0 -0
- package/dist/sound-library/wood-thud.ogg +0 -0
- package/dist/sound-library/zap.ogg +0 -0
- package/dist/sounds/BuiltInSounds.d.ts +41 -0
- package/dist/sounds/index.d.ts +9 -0
- package/dist/sounds/sounds.types.d.ts +22 -0
- package/dist/ui-calendar.js +1 -1
- package/dist/ui-dial.editor-CjjdKi5L.js +5 -0
- package/dist/ui-dial.editor-CjjdKi5L.js.map +1 -0
- package/dist/ui-dial.js +467 -0
- package/dist/ui-dial.js.map +1 -0
- package/dist/ui-graph.js +22 -0
- package/dist/ui-graph.js.map +1 -1
- package/dist/{ui-input.editor-budoNoB0.js → ui-input.editor-D11iRgXR.js} +2 -2
- package/dist/ui-input.editor-D11iRgXR.js.map +1 -0
- package/dist/ui-input.js +84 -54
- package/dist/ui-input.js.map +1 -1
- package/dist/ui-json.js +8 -8
- package/dist/ui-json.js.map +1 -1
- package/dist/ui-modal.js +183 -97
- package/dist/ui-modal.js.map +1 -1
- package/dist/ui-page-layout.editor-IgDEveUY.js +5 -0
- package/dist/ui-page-layout.editor-IgDEveUY.js.map +1 -0
- package/dist/ui-page-layout.js +217 -72
- package/dist/ui-page-layout.js.map +1 -1
- package/dist/ui-popup.js +34 -34
- package/dist/ui-popup.js.map +1 -1
- package/dist/ui-property-editor.js +7 -4
- package/dist/ui-property-editor.js.map +1 -1
- package/dist/ui-root.js +71 -5
- package/dist/ui-root.js.map +1 -1
- package/dist/ui-search.js +1 -1
- package/dist/ui-section.js +97 -96
- package/dist/ui-section.js.map +1 -1
- package/dist/ui-site-links.editor-BME3sw5H.js +5 -0
- package/dist/ui-site-links.editor-BME3sw5H.js.map +1 -0
- package/dist/ui-site-links.js +150 -0
- package/dist/ui-site-links.js.map +1 -0
- package/dist/ui-site-nav-button.editor-ChY4xe1U.js +5 -0
- package/dist/ui-site-nav-button.editor-ChY4xe1U.js.map +1 -0
- package/dist/ui-site-nav-button.js +57 -18
- package/dist/ui-site-nav-button.js.map +1 -1
- package/dist/{ui-site-tabs.editor-DDvQfH6S.js → ui-site-tabs.editor-CdMIw4jw.js} +2 -2
- package/dist/ui-site-tabs.editor-CdMIw4jw.js.map +1 -0
- package/dist/ui-site-tabs.js +30 -14
- package/dist/ui-site-tabs.js.map +1 -1
- package/dist/ui-slider.js +75 -124
- package/dist/ui-slider.js.map +1 -1
- package/dist/ui-statistic.js +1 -0
- package/dist/ui-statistic.js.map +1 -1
- package/dist/ui-theme-editor.js +2 -2
- package/dist/{ui-theme-menu-BZYUMrHe.js → ui-theme-menu-BEBu6dyq.js} +3 -3
- package/dist/{ui-theme-menu-BZYUMrHe.js.map → ui-theme-menu-BEBu6dyq.js.map} +1 -1
- package/dist/ui-toc.js +159 -122
- package/dist/ui-toc.js.map +1 -1
- package/dist/ui-tree.js +142 -87
- package/dist/ui-tree.js.map +1 -1
- package/dist/ui-uploader.editor-DrE80KjL.js +5 -0
- package/dist/ui-uploader.editor-DrE80KjL.js.map +1 -0
- package/dist/ui-uploader.js +1442 -0
- package/dist/ui-uploader.js.map +1 -0
- package/dist/vocabulary/hooks.generated.d.ts +7 -0
- package/package.json +1 -1
- package/dist/UIInput-B3K0w4ow.js.map +0 -1
- package/dist/UIRuntime-DCv4sy30.js.map +0 -1
- package/dist/components.es-DilRG1VO.js.map +0 -1
- package/dist/ui-input.editor-budoNoB0.js.map +0 -1
- package/dist/ui-page-layout.editor-xtQW0FZk.js +0 -5
- package/dist/ui-page-layout.editor-xtQW0FZk.js.map +0 -1
- package/dist/ui-site-nav-button.editor-6J-zJLtZ.js +0 -5
- package/dist/ui-site-nav-button.editor-6J-zJLtZ.js.map +0 -1
- package/dist/ui-site-tabs.editor-DDvQfH6S.js.map +0 -1
package/dist/ui-popup.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ui-popup.js","names":["UIT.PopupTriggers","ref={(element) => this.box = element}","<Show when={this.heading}>\n <div class={UIT.HEADER} part={this.partForName(\"header\")}>\n {this.heading}\n </div>\n </Show>","this","part={this.partForName(\"header\")}","<div class={UIT.HEADER} part={this.partForName(\"header\")}>\n {this.heading}\n </div>","<div ref={(element) => this.box = element} class={this.rootClass} part={this.partForName(\"popup\")}>\n <Show when={this.heading}>\n <div class={UIT.HEADER} part={this.partForName(\"header\")}>\n {this.heading}\n </div>\n </Show>\n <Show when={this.label}>\n <div class={UIT.CONTENT} part={this.partForName(\"content\")}>\n {this.label}\n </div>\n </Show>\n <slot />\n </div>","<Show when={this.label}>\n <div class={UIT.CONTENT} part={this.partForName(\"content\")}>\n {this.label}\n </div>\n </Show>","part={this.partForName(\"content\")}","<div class={UIT.CONTENT} part={this.partForName(\"content\")}>\n {this.label}\n </div>","part={this.partForName(\"popup\")}","<Show when={this.heading}>\n <span class={UIT.HEADER} part={this.partForName(\"header\")}>\n {this.heading}\n </span>\n </Show>","<span class={UIT.HEADER} part={this.partForName(\"header\")}>\n {this.heading}\n </span>","<span class={this.rootClass} part={this.partForName(\"popup\")} popover={this.serverPopover}>\n <Show when={this.heading}>\n <span class={UIT.HEADER} part={this.partForName(\"header\")}>\n {this.heading}\n </span>\n </Show>\n <Show when={this.label}>\n <span class={UIT.CONTENT} part={this.partForName(\"content\")}>\n {this.label}\n </span>\n </Show>\n <slot />\n </span>","<Show when={this.label}>\n <span class={UIT.CONTENT} part={this.partForName(\"content\")}>\n {this.label}\n </span>\n </Show>","<span class={UIT.CONTENT} part={this.partForName(\"content\")}>\n {this.label}\n </span>","popover={this.serverPopover}","E.UIComponent","E.proto","E.protoMerged","E.whileConnected","E.untracked","E.state","E.onChange","E.on","E.derived","E.aria","E.Disclosure","E.after","_$readShallow","UIT.HEADER","_$setAttribute","UIT.CONTENT","_$getOwner","UIT.WHITESPACE","__name","popupCSS","anchoredCSS","HEADER","__decoratorStart","__publicField","PopupTrigger","__name$1","WHITESPACE","ToggleCommands","__decorateElement","__decoratorMetadata","__runInitializers","AnimationLookup","CONTENT","PopupTriggers","__privateAdd","getOwner$1","popupVocabulary","UIPopup_default","UIPopup_anchored_default","_tmpl$","_tmpl$2","_tmpl$3","_tmpl$4","_onPopoverModeChanged_dec","_onPositionChanged_dec","_accessibleName_dec","_ariaRole_dec","_onPopupFocusOut_dec","_onPopupLeave_dec","_onPopupEnter_dec","_onTargetClick_dec","_onExpandedChanged_dec","_onTargetChanged_dec","_ariaElement_dec","_targetElement_dec","_onCommand_dec","_onToggle_dec","_onPointChanged_dec","_pointBox_dec","_show_dec","_watchPlacement_dec","_elementSetup_dec","_vocabulary_dec","_a","_init","_pointBox","_ariaElement","_UIPopup","UIComponent","proto","protoMerged","whileConnected","untracked","state","onChange","on","derived","aria","Disclosure","event","UI","visible","originalEvent","delay","after","box","keyframes","animation","beforeNextPaint","QUIET_FOCUS","animations","each","target","anchor","domElement","at","point","root","ID_PREFIX","DISTANCE_TOKEN","CLOSED","action","property","id","DEFAULT_TRIGGER","isReady","trigger","listeners","options","isClick","events","element","unrelate","CONTROLS","DESCRIBED_BY","isInteractive","isVisible","token","HOVER_DELAY_TOKEN","match","DURATION","next","area","AT_POINT_POSITION","position","DEFAULT_POSITION","POSITION_AREAS","shifted","AT_POINT_FALLBACKS","SHIFTED_FALLBACKS","style","mode","BASIC_CLASS","SHOWN_CLASS","isServer","_self$","_el$","_el$3","_el$5","ref","insert","createComponent","Show","_el$2","effect","readShallow","className","_p$","setAttribute","_el$4","e","t","_self$2","_el$6","_el$8","_el$10","_el$7","_el$9","a","value","NodeType","CONTENTS","names","name","reflected","ids","relation","rest","elements","attribute","UIPopup"],"sources":["../src/components/ui-popup/UIPopup.en.ts","../src/components/ui-popup/UIPopup.tsx","../src/components/ui-popup/index.ts"],"sourcesContent":["/**\n * Every name `<ui-popup>` uses: tag, attributes (kind + allowed values), events, slots, parts, states, texts.\n * Schema: `E.ComponentVocabulary` (`spell/ui/vocabulary`).\n * - Pure data: node imports it (`yarn site:data`, `yarn gen:root`), so `spell/ui/core` for types only,\n * `UIT` by value straight from `components.types`.\n * - Class words come out through `ClassBuilder`, in Fomantic's grammar:\n * `<ui-popup size=\"small\" inverted wide=\"very\">` => `ui small inverted very wide popup`.\n * The element adds the `position` words before the noun (`ui inverted bottom left popup`),\n * the words Fomantic's script added.\n * - `visible`, Fomantic's shown-popup class, is the element's own while it shows (the shared `visible` / `hidden`),\n * so static markup and the element share one sheet.\n * - A popup OWNS the `header` and `content` parts:\n * slotted `<ui-header>` / `<ui-content>` get `:state(in-popup)` and style themselves from `UIParts.css`.\n * - `target` is a PROPERTY (an element); first paint never needs it --\n * `for` or the previous sibling carry what markup must say.\n */\n\nimport type { E } from \"spell/ui/core\"\nimport * as UIT from \"spell/ui/components/components.types\"\n\n/****************\n * ### `<ui-popup>`\n * A popup: a popover DOM element anchored to its target, holding `<div class=\"ui ... popup\" part=\"popup\">`.\n ****************/\nexport const popupVocabulary = {\n tag: \"ui-popup\",\n icon: \"comment outline\",\n topics: [\"popups\", \"overlays\", \"feedback\", \"modules\"],\n aka: [\"tooltip\", \"popover\", \"hint\", \"hover card\", \"info bubble\"],\n noun: \"popup\",\n partOfSpeech: \"structure\",\n description: \"A popup displays additional information on top of a page.\",\n attributes: [\n {\n name: \"size\",\n group: \"appearance\",\n kind: \"size\",\n description: \"Text size, `mini` ... `massive`; `medium` is the default.\"\n },\n {\n name: \"color\",\n group: \"appearance\",\n kind: \"color\",\n description: \"Hue: fills the popup (and its arrow), with a readable text colour.\"\n },\n {\n name: \"appearance\",\n group: \"appearance\",\n kind: \"multiple\",\n values: [\"basic\"],\n // each word draws itself: no key after it\n classes: {},\n replaces: [{ from: \"basic\", value: \"basic\" }],\n description: \"The look: `basic`, no pointing arrow. Old name: `basic`.\"\n },\n {\n name: \"fixed\",\n group: \"layout\",\n kind: \"keyOnly\",\n description: \"Always its maximum width (`wide` / `very wide` widen it).\"\n },\n {\n name: \"flowing\",\n group: \"appearance\",\n kind: \"keyOnly\",\n description: \"No maximum width: as wide as its content, e.g. a grid.\"\n },\n { name: \"fluid\", group: \"layout\", kind: \"keyOnly\", description: \"As wide as its target.\" },\n {\n name: \"inverted\",\n group: \"appearance\",\n kind: \"keyOnly\",\n description: \"The opposite scheme: dark on a light page.\"\n },\n { name: \"loading\", group: \"states\", kind: \"keyOnly\", description: \"Busy: a spinner over faded content.\" },\n {\n name: \"wide\",\n group: \"layout\",\n kind: \"keyOrValueAndKey\",\n values: [\"very\"],\n description: 'A wider maximum width; `wide=\"very\"` wider still (`very wide`).'\n },\n {\n name: \"position\",\n group: \"layout\",\n kind: \"enum\",\n values: \"positions\",\n default: \"top left\",\n description:\n \"Where it sits against its target: `top left` (default) ... `right center`, `left top` ... `right bottom` \" +\n \"(beside, lined up with its top / bottom edge). It flips to the other \" +\n \"side when there's no room.\"\n },\n {\n name: \"open-on\",\n group: \"appearance\",\n kind: \"enum\",\n values: UIT.PopupTriggers,\n default: UIT.PopupTrigger.hover,\n description:\n \"What opens it: `hover` (also keyboard focus), `focus`, `click` (toggles; a non-modal dialog), or \" +\n \"`manual` (only `visible`).\"\n },\n {\n name: \"for\",\n group: \"appearance\",\n kind: \"string\",\n property: \"htmlFor\",\n description: \"Id of the target, in the popup's own tree; without it, the previous element sibling.\"\n },\n {\n name: \"heading\",\n replaces: [\"header\"],\n group: \"name\",\n kind: \"string\",\n description:\n \"Shorthand for a header line (Fomantic's `title`); a slotted `<ui-header>` is the rich version. Its old name was `header`.\"\n },\n {\n name: \"label\",\n group: \"content\",\n kind: \"string\",\n replaces: [\"content\"],\n description:\n \"Shorthand for the text (Fomantic's `content`); slotted content is the rich version. Old name: `content`.\"\n },\n {\n name: \"hoverable\",\n group: \"behaviour\",\n kind: \"boolean\",\n default: true,\n description:\n \"`hover`: the popup stays open while the pointer is over it, so it can be reached and its text read or \" +\n \"selected -- on by default, as WCAG 1.4.13 (Content on Hover or Focus) asks for. \" +\n '`hoverable=\"false\"` is Fomantic\\'s `hoverable: false` (its default): it closes as the pointer leaves ' +\n \"the target, after `hide-delay`.\"\n },\n {\n name: \"show-delay\",\n group: \"behaviour\",\n kind: \"number\",\n default: 50,\n description: \"`hover`: ms before it shows; not written, the page's `--ui-hover-delay` (800ms by default).\"\n },\n {\n name: \"hide-delay\",\n group: \"appearance\",\n kind: \"number\",\n default: 70,\n description: \"`hover`: ms before it hides.\"\n },\n {\n name: \"target\",\n group: \"behaviour\",\n kind: \"json\",\n reflect: false,\n description: \"The target as a PROPERTY (an `Element`); wins over `for`.\"\n },\n {\n name: \"at\",\n group: \"behaviour\",\n kind: \"json\",\n reflect: false,\n description:\n 'A point in the window, `{ x, y }`, to open at instead of a target: a right click\\'s menu. With `open-on=\"manual\"` and `visible`; it stays inside the window, takes focus and gives it back.'\n }\n ],\n events: [\n {\n name: \"ui-opening\",\n detail: \"{ visible: true, originalEvent?: Event }\",\n cancelable: true,\n description:\n \"About to show for a person's action (the trigger, an invoker command); `preventDefault()` keeps it hidden.\"\n },\n {\n name: \"ui-closing\",\n detail: \"{ visible: false, originalEvent?: Event }\",\n cancelable: true,\n description:\n \"About to hide; `preventDefault()` keeps it shown. NOT cancelable in effect when the browser already \" +\n \"dismissed a `hint` popover (Escape, a click elsewhere).\"\n }\n ],\n slots: [{ name: \"\", description: \"Content: text, `<ui-header>` / `<ui-content>` parts, a grid, controls.\" }],\n parts: [\n { name: \"popup\", description: \"The popup box (its arrow is `::before`).\" },\n { name: \"header\", description: \"The `header` shorthand.\" },\n { name: \"content\", description: \"The `content` shorthand.\" }\n ],\n states: [{ name: \"fluid\", description: \"As wide as its target (`fluid`).\" }],\n texts: [],\n ownsParts: [\"header\", \"content\"]\n} as const satisfies E.ComponentVocabulary\n","import { Show } from \"solid-js\"\nimport { isServer, type JSX } from \"@solidjs/web\"\n\nimport { E, UI, UIT } from \"spell/ui/core\"\nimport { popupVocabulary } from \"./UIPopup.en\"\n\nimport popupCSS from \"./UIPopup.css?inline\"\nimport anchoredCSS from \"./UIPopup.anchored.css?raw\"\n\n/****************\n * ### `UIPopup`\n * The component behind `<ui-popup>`: a popup anchored to a TARGET.\n * The DOM element is a popover in the top layer, placed by CSS anchor positioning only (`UIPopup.css`),\n * holding `<div class=\"ui … popup [position]\" part=\"popup\">`.\n *\n * - Its target: the `target` property, else the element `for` names (in the popup's own tree),\n * else the previous element sibling (Fomantic's `inline` markup: a popup right after what opens it).\n *\n * - `open-on`:\n * - `hover` (with `show-delay` / `hide-delay`, and on keyboard focus too)\n * - `focus`\n * - `click` (toggles)\n * - `manual` (only `visible`)\n * - A hovered popup stays open while the pointer is over it (WCAG 1.4.13),\n * unlike Fomantic's default `hoverable: false`.\n * `hoverable=\"false\"` gives Fomantic's behaviour back:\n * it hides as the pointer leaves the target, after `hide-delay`.\n *\n * - Where it shows: `position`; one that doesn't fit flips to the other side.\n * A centred one (`bottom center`) slides along its side first, to stay inside the window (`SHIFTED_FALLBACKS`).\n *\n * - `at`, a point in the window (`{ x, y }`), in place of a target: a right click's menu.\n * - It opens with its corner there, staying inside the window (`AT_POINT_FALLBACKS`).\n * - It takes focus, which goes back when it closes: its `autofocus` element's, else its first tabbable's.\n * - The point is a box the popup puts on the page while it's open (`placeAtPoint()`): anchor positioning needs one.\n * - Written with `open-on=\"manual\"`, and with `visible` to open: it has no target to listen to.\n *\n * - Invoker commands (`<button commandfor=\"id\" command=\"--toggle\">`, `UIT.ToggleCommands`)\n * are a person's actions too: the popup opens at ITS target, whichever button sent the command.\n *\n * - Shown by the shared `visible` / `hidden` (`UIComponent`, \"Shown or hidden\"), starting hidden.\n * - Controlled: a person's cancelable `ui-opening` / `ui-closing` come first.\n * - Escape and outside clicks come from `UI.overlays` (kind `popover`; the target counts as inside).\n *\n * - Its popover mode: `hint` for hover / focus popups when `UI.browser.supports.popoverHint`\n * (they don't close an open dropdown's menu), else `manual`.\n * - Click and manual popups are always `manual`: `auto`'s light dismiss would skip the cancelable `ui-closing`.\n * - When the browser dismisses a `hint` popover itself,\n * the component follows (with a `ui-closing` that can no longer veto).\n *\n * - Accessibility, by `open-on`:\n * - `hover` / `focus` / `manual`: the DOM element is `role=tooltip`; the target is `aria-describedby` it;\n * `at` is interactive, as `click`\n * - `click`: the DOM element is `role=dialog` (non-modal, named by `header` or its `aria-label`);\n * the target gets `aria-haspopup=dialog`, `aria-expanded`, `aria-controls`\n * - the ARIA goes on the element that takes focus: a `delegatesFocus` target's (`<ui-button>`'s) first focusable,\n * through element reflection (`ariaDescribedByElements`) when that is in another tree.\n *\n * - SIDE EFFECTS on light DOM the popup doesn't own, undone when it unbinds:\n * - the target's inline `anchor-name` (a per-instance name ADDED to its list) and its ARIA attributes\n * - the DOM element's `popover`, `id`, and inline `position-anchor` / `position-area` / `position-try-fallbacks`.\n ****************/\nexport class UIPopup extends E.UIComponent<Vocabulary> {\n @E.proto static vocabulary = popupVocabulary\n @E.protoMerged static elementSetup = {\n styleSheets: { popup: popupCSS, \"popup-anchored\": anchoredCSS },\n cssStates: [\"fluid\"],\n // nothing inside needs focus delegated: a click on a tooltip's text must not jump to a link in it\n delegatesFocus: false,\n // `loading`: Fomantic's loader inside the popup\n loading: \"its own\",\n visible: \"hidden\",\n // the sheet's own transition is Fomantic's `scale`: faded in from 80%\n animation: \"scale\"\n } satisfies Partial<E.ElementSetup>\n\n ////////////////\n // ## Shown or hidden\n ////////////////\n\n /** Pending delayed show / hide. */\n private delayTimer?: E.CancelablePromise<unknown>\n\n /** This element's `UI.overlays` entry; `anchor` follows the target. */\n private readonly overlay: E.OverlayEntry = {\n element: this.domElement,\n kind: \"popover\",\n onDismiss: () => void this.requestVisible(false)\n }\n\n /** Shown or hidden, as `visible` (`isVisible`): `ui-opening` / `ui-closing` first. */\n readonly disclosure = new E.Disclosure({\n component: this,\n member: \"isVisible\",\n detail: (visible, originalEvent): UIT.PopupOpenDetail => ({ visible, originalEvent })\n })\n\n /** Show or hide, dispatching the cancelable `ui-opening` / `ui-closing` first; true when applied. */\n requestVisible(visible: boolean, originalEvent?: Event): boolean {\n this.delayTimer?.cancel()\n return this.disclosure.request(visible, originalEvent)\n }\n\n /** `requestVisible()` after `delay` ms (at once for `0`); a newer call replaces a pending one. */\n private schedule(visible: boolean, delay: number, originalEvent?: Event) {\n this.delayTimer?.cancel()\n if (delay <= 0) return void this.requestVisible(visible, originalEvent)\n this.delayTimer = E.after(delay / 1000, () => this.requestVisible(visible, originalEvent))\n }\n\n /**\n * `visible` changed (`UIComponent`'s hook): show or hide the popover; resolves once its transition has ended.\n * - Showing waits for a `ui-*` target to be ready:\n * it renders async, so its box (or `display: contents`) is only known then.\n * - `animation`:\n * - the family's own (`elementSetup.animation`): the sheet's transition (`UIPopup.css`)\n * - another one (the element's own `animation`): run on the popup box through `UI.transitions`\n * - `none`: at once\n */\n protected async onVisibleChange(visible: boolean, animation: UIT.Animation): Promise<void> {\n const box = this.box\n const keyframes = UIT.AnimationLookup.keyframesBeside(animation, this.elementSetup.animation)\n if (visible) {\n const target = this.targetElement as { ready?: Promise<void> } | undefined\n await target?.ready\n if (!this.isVisible || !this.isConnected) return\n this.show()\n // no ring for a mouse's right click: the arrow keys show it\n if (this.point) E.beforeNextPaint(() => this.firstFocus?.focus(QUIET_FOCUS))\n if (keyframes && box) await UI.transitions.animate({ element: box, name: keyframes, direction: UIT.IN })\n return\n }\n if (keyframes && box) await UI.transitions.animate({ element: box, name: keyframes, direction: UIT.OUT })\n // shown again while the keyframes ran\n if (this.isVisible) return\n this.hide()\n const animations = [...this.domElement.getAnimations(), ...(box?.getAnimations() ?? [])]\n await Promise.allSettled(animations.map((each) => each.finished))\n }\n /**\n * What takes the focus as it opens at a point: an `autofocus` element inside it, else its first tabbable,\n * as a dialog's focusing steps do (`UI.focus.enter()`).\n * - So a close button before a field doesn't take it from the field (Change This, epic `editor` I133).\n */\n private get firstFocus(): HTMLElement | undefined {\n return this.domElement.querySelector<HTMLElement>(\"[autofocus]\") ?? UI.focus.first(this.domElement)\n }\n\n /**\n * Shown again when it comes back into the page while `visible`; hidden, quietly, when it leaves.\n * - Not on the first connect: `onVisibleChange()` runs once the popup first draws.\n */\n @E.whileConnected\n protected watchPlacement() {\n if (this.isVisible && this.isReady) this.show()\n return () => this.hide()\n }\n\n /** The popup box in the shadow root (`part=\"popup\"`). */\n private box?: HTMLElement\n\n /**\n * Show the popover against the target and register with `UI.overlays`.\n * - Anchor: the target's `anchor-name` when it has a box,\n * else the implicit anchor of `source` (see `UIPopup.css`).\n * - `source` also makes the target the popover's invoker, so Tab from it continues inside.\n * - A box other keyframes animated out (`hidden` on it) shows again first.\n */\n @E.untracked\n private show() {\n const { domElement } = this\n if (this.box) UI.transitions.reveal(this.box)\n this.placeAtPoint()\n const target = this.targetElement\n // the box at a point is our own block: nothing to look up, so no style to work out mid-click\n const anchor = target && (target === this.pointBox ? target : UIPopup.anchorBoxFor(target))\n domElement.popover ||= this.popoverMode\n domElement.style.setProperty(\"position-anchor\", anchor === target ? this.anchorName : anchor ? \"auto\" : \"none\")\n if (!domElement.matches(\":popover-open\")) {\n domElement.showPopover(anchor ? ({ source: anchor } as ShowPopoverOptions) : undefined)\n }\n this.overlay.anchor = target\n this.overlay.restoreFocus = this.isInteractive\n UI.overlays.open(this.overlay)\n }\n\n /** Hide the popover and leave `UI.overlays`. */\n private hide() {\n this.delayTimer?.cancel()\n if (this.domElement.matches(\":popover-open\")) this.domElement.hidePopover()\n UI.overlays.close(this.overlay)\n this.removePointBox()\n }\n\n ////////////////\n // ## A point\n ////////////////\n\n /** `at`, when it's a point. */\n get point(): UIT.PopupPoint | undefined {\n const at = this.at as UIT.PopupPoint | undefined\n return typeof at?.x === \"number\" && typeof at.y === \"number\" ? at : undefined\n }\n\n /** The box at `point`, while it's open: what it's anchored to. */\n @E.state accessor pointBox: HTMLElement | undefined = undefined\n\n /**\n * Put the box at `point`, and make it the target, its anchor name on it already: `bind()` comes a moment later.\n * - In the popup's own tree: an anchor name reaches only there.\n * - SIDE EFFECT: no pointing arrow and no gap; `removePointBox()` undoes it.\n */\n private placeAtPoint() {\n const { point, domElement } = this\n if (!point) return this.removePointBox()\n const root = domElement.getRootNode() as Document | ShadowRoot\n const box = this.pointBox ?? (domElement.ownerDocument.createElement(\"div\") as HTMLElement)\n box.style.cssText = `position:fixed;left:${point.x}px;top:${point.y}px;width:0;height:0`\n box.setAttribute(\"aria-hidden\", \"true\")\n if (!box.isConnected) (\"body\" in root ? root.body : root).append(box)\n this.anchorName ||= `--${UI.ids.next(ID_PREFIX)}`\n UIPopup.addAnchorName(box, this.anchorName)\n domElement.style.setProperty(DISTANCE_TOKEN, \"0px\")\n this.pointBox = box\n }\n\n /** Take the box away. */\n private removePointBox() {\n if (!this.pointBox) return\n this.pointBox.remove()\n this.pointBox = undefined\n this.domElement.style.removeProperty(DISTANCE_TOKEN)\n }\n\n /** Told of a new point while it's open: it moves there. */\n @E.onChange(\"at\", { defer: true })\n protected onPointChanged() {\n if (this.isVisible && this.isConnected) this.placeAtPoint()\n }\n\n /**\n * The popover's `toggle`: the browser closed it (a `hint` popover's light dismiss)\n * while the element thinks it's open -- follow, announcing a `ui-closing` that can't veto any more.\n */\n @E.on(\"toggle\")\n protected onToggle(event: Event) {\n if ((event as ToggleEvent).newState !== CLOSED || !this.domElement.isConnected) return\n this.disclosure.adopt(false, event)\n }\n\n /** An invoker command aimed at the DOM element (`ToggleCommands`). */\n @E.on(\"command\")\n protected onCommand(event: Event) {\n const action = UIT.ToggleCommands.action(event, this.isVisible)\n if (action) this.requestVisible(action === \"show\", event)\n }\n\n ////////////////\n // ## The target\n ////////////////\n\n /**\n * The target: `target` property, else `for`, else the previous element sibling; `undefined` when unbound.\n * - Not `target`: that's the attribute's getter, the property this reads first.\n */\n @E.derived\n get targetElement(): Element | undefined {\n if (!this.isConnected) return undefined\n if (this.pointBox) return this.pointBox\n const property = this.target\n if (UIPopup.isElement(property)) return property\n const id = this.for\n if (id) return (this.domElement.getRootNode() as Document | ShadowRoot).getElementById?.(id) ?? undefined\n return this.domElement.previousElementSibling ?? undefined\n }\n\n /** What opens it. */\n get trigger(): UIT.PopupTrigger {\n return this.openOn ?? DEFAULT_TRIGGER\n }\n\n /** A click popup, or one at a point: a non-modal dialog with interactive content, not a tooltip. */\n get isInteractive(): boolean {\n return this.trigger === UIT.PopupTrigger.click || !!this.point\n }\n\n /** Element carrying the target's ARIA (see class docs), while bound. */\n @E.state accessor ariaElement: Element | undefined = undefined\n\n /** Per-instance anchor name, from `UI.ids` on first bind. */\n private anchorName = \"\"\n\n /** Ready with a target: bind it for the trigger; the cleanup is `bind()`'s undo. */\n @E.onChange(\"isReady\", \"targetElement\", \"trigger\")\n protected onTargetChanged(isReady: boolean, target: Element | undefined, trigger: UIT.PopupTrigger) {\n return isReady && target ? this.bind(target, trigger) : undefined\n }\n\n /**\n * Listen to `target` for `trigger`, add the anchor name and the ARIA; returns the undo.\n * - SIDE EFFECTS: see class docs.\n */\n private bind(target: Element, trigger: UIT.PopupTrigger): () => void {\n const { domElement } = this\n this.anchorName ||= `--${UI.ids.next(ID_PREFIX)}`\n const listeners = new AbortController()\n const options = { signal: listeners.signal }\n const isClick = trigger === UIT.PopupTrigger.click\n // `HTMLElement`'s event map: an SVG target fires the same pointer / focus events\n const events = target as HTMLElement\n if (trigger === UIT.PopupTrigger.hover) {\n events.addEventListener(\"pointerenter\", this.onTargetEnter, options)\n events.addEventListener(\"pointerleave\", this.onTargetLeave, options)\n }\n if (trigger === UIT.PopupTrigger.hover || trigger === UIT.PopupTrigger.focus) {\n events.addEventListener(\"focusin\", this.onTargetFocus, options)\n events.addEventListener(\"focusout\", this.onTargetBlur, options)\n }\n if (isClick) events.addEventListener(\"click\", this.onTargetClick, options)\n UIPopup.addAnchorName(target, this.anchorName)\n UI.ids.ensure(domElement, ID_PREFIX)\n const element = UIPopup.ariaTargetFor(target)\n const unrelate = UIPopup.addAriaRelation({ element, relation: isClick ? CONTROLS : DESCRIBED_BY, domElement })\n if (isClick) element.setAttribute(\"aria-haspopup\", \"dialog\")\n this.ariaElement = element\n return () => {\n listeners.abort()\n this.delayTimer?.cancel()\n UIPopup.removeAnchorName(target, this.anchorName)\n unrelate()\n if (isClick) {\n element.removeAttribute(\"aria-haspopup\")\n element.removeAttribute(\"aria-expanded\")\n }\n this.ariaElement = undefined\n }\n }\n\n /**\n * A server render's binding: the target's ARIA, as `bind()` adds it, without listeners.\n * - SIDE EFFECTS: gives the DOM element (the render's parsed copy) an id, which its root keeps,\n * and sets the target's `aria-describedby` / `aria-controls` and `aria-haspopup`.\n * - No `aria-expanded`: a native invoker reports its popover's state itself.\n */\n private serverBind() {\n const target = this.targetElement\n if (!target) return\n const isInteractive = this.isInteractive\n UI.ids.ensure(this.domElement, ID_PREFIX)\n const element = UIPopup.ariaTargetFor(target)\n UIPopup.addAriaRelation({ element, relation: isInteractive ? CONTROLS : DESCRIBED_BY, domElement: this.domElement })\n if (isInteractive) element.setAttribute(\"aria-haspopup\", \"dialog\")\n }\n\n /** A click popup's target says whether it's shown (`aria-expanded`). */\n @E.onChange(\"ariaElement\", \"isInteractive\", \"isVisible\")\n protected onExpandedChanged(element: Element | undefined, isInteractive: boolean, isVisible: boolean) {\n if (element && isInteractive) element.setAttribute(\"aria-expanded\", String(isVisible))\n }\n\n /** Pointer onto the target (`hover`): show after `show-delay`, else the page's `--ui-hover-delay`. */\n private readonly onTargetEnter = (event: PointerEvent) => {\n this.schedule(true, this.hoverDelay, event)\n }\n\n /**\n * How long the pointer rests before it shows: its own `show-delay` when written, else the page's preference,\n * the `--ui-hover-delay` token (`styles.en.ts`'s `hoverDelay`), in `ms` or `s`; else `show-delay`'s default.\n */\n private get hoverDelay(): number {\n if (this.attributes[\"show-delay\"] !== null) return this.showDelay ?? 0\n const token = getComputedStyle(this.domElement).getPropertyValue(HOVER_DELAY_TOKEN).trim()\n const match = DURATION.exec(token)\n if (!match) return this.showDelay ?? 0\n return Number(match[1]) * (match[2] === \"s\" ? 1000 : 1)\n }\n\n /** Pointer off the target (`hover`): hide after `hide-delay`, unless it reaches the popup first. */\n private readonly onTargetLeave = (event: PointerEvent) => {\n this.schedule(false, this.hideDelay ?? 0, event)\n }\n\n /** Focus onto the target (`hover`, `focus`): show at once. */\n private readonly onTargetFocus = (event: FocusEvent) => {\n this.schedule(true, 0, event)\n }\n\n /** Focus off the target (`hover`, `focus`): hide, unless focus moved into the popup. */\n private readonly onTargetBlur = (event: FocusEvent) => {\n if (UI.focus.containsDeep(this.domElement, event.relatedTarget as Node | null)) return\n this.schedule(false, 0, event)\n }\n\n /** Click on the target (`click`): toggle. */\n @E.untracked\n private readonly onTargetClick = (event: MouseEvent) => {\n this.requestVisible(!this.isVisible, event)\n }\n\n ////////////////\n // ## The popup itself\n ////////////////\n\n /** Pointer onto the popup: keep a hovered popup open, unless `hoverable` is off (Fomantic's default). */\n @E.on(\"pointerenter\")\n protected onPopupEnter() {\n if (this.trigger !== UIT.PopupTrigger.hover) return\n if (this.hoverable !== false) this.delayTimer?.cancel()\n }\n\n /** Pointer off the popup: hide a hovered popup after `hide-delay`. */\n @E.on(\"pointerleave\")\n protected onPopupLeave(event: PointerEvent) {\n if (this.trigger === UIT.PopupTrigger.hover) this.schedule(false, this.hideDelay ?? 0, event)\n }\n\n /** Focus off the popup (`focus`): hide, unless it went back to the target. */\n @E.on(\"focusout\")\n protected onPopupFocusOut(event: FocusEvent) {\n if (this.trigger !== UIT.PopupTrigger.focus) return\n const next = event.relatedTarget as Node | null\n const target = this.targetElement\n if (UI.focus.containsDeep(this.domElement, next) || (target && next && UI.focus.containsDeep(target, next))) return\n this.schedule(false, 0, event)\n }\n\n ////////////////\n // ## The DOM element's role, name, position and popover\n ////////////////\n\n /** The DOM element is a dialog for a click popup, else a tooltip. */\n @E.aria(\"role\")\n protected get ariaRole(): string {\n return this.isInteractive ? \"dialog\" : \"tooltip\"\n }\n\n /** A click popup's dialog is named by `header`. */\n @E.aria(\"label\")\n protected get accessibleName(): string | undefined {\n return this.isInteractive ? this.heading : undefined\n }\n\n /**\n * SIDE EFFECT: the DOM element's `position-area` follows `position`, and so do the places it tries\n * when that doesn't fit (`position-try-fallbacks`).\n * - A centred one (`bottom center`) slides along its side to stay in the window, its arrow still at the target:\n * `SHIFTED_FALLBACKS`, and `UIPopup.anchored.css` for the arrow.\n * - Every other position flips, by the sheet's own fallbacks.\n * - One at a point flips, then slides in from the window's edge: `AT_POINT_FALLBACKS`.\n */\n @E.onChange(\"position\", \"point\", { writesDOMElement: true })\n protected onPositionChanged(position: string | undefined, point: UIT.PopupPoint | undefined) {\n const area = point ? AT_POINT_POSITION : (position ?? DEFAULT_POSITION)\n const { style } = this.domElement\n style.setProperty(\"position-area\", POSITION_AREAS[area])\n const shifted = point ? AT_POINT_FALLBACKS : SHIFTED_FALLBACKS[area]\n if (shifted) style.setProperty(\"position-try-fallbacks\", shifted)\n else style.removeProperty(\"position-try-fallbacks\")\n }\n\n /**\n * `popover` mode for the current trigger, see class docs.\n * - `manual` popups too stay `manual`:\n * the page decides, so several may be open at once (a `hint` closes the other hints).\n */\n private get popoverMode(): PopoverMode {\n const trigger = this.trigger\n const isHintable = trigger === UIT.PopupTrigger.hover || trigger === UIT.PopupTrigger.focus\n return isHintable && UI.browser.supports.popoverHint ? \"hint\" : \"manual\"\n }\n\n /**\n * Once ready, the DOM element's `popover` follows the trigger (`popoverMode`).\n * - Reads `popoverMode` HERE, not as a member of the effect: it reads `UI.browser`, which exists only once ready.\n */\n @E.onChange(\"isReady\", \"trigger\")\n protected onPopoverModeChanged(isReady: boolean) {\n if (!isReady) return\n const mode = this.popoverMode\n if (this.domElement.popover !== mode) this.domElement.popover = mode\n }\n\n /**\n * `popover` of the ROOT in a server render (`spell/ui/static`), where the root replaces the DOM element:\n * hidden until opened, in the HTML.\n * - `auto` for a click popup: light dismiss and Escape without JS, once something opens it (`popovertarget`).\n * - `manual` for the rest (`hint` isn't everywhere, and an unknown value means `manual`).\n */\n private get serverPopover(): PopoverMode {\n return this.isInteractive ? \"auto\" : \"manual\"\n }\n\n ////////////////\n // ## Classes and states\n ////////////////\n\n /**\n * The position words before the noun, then Fomantic's `visible` while shown: `ui top left visible popup`.\n * - After the position: a phrase rule (`[class*=\"left top\"]`) needs its words side by side.\n */\n protected get extraClass(): string | undefined {\n const position = this.point ? `${BASIC_CLASS} ${AT_POINT_POSITION}` : (this.position ?? DEFAULT_POSITION)\n return this.isVisible ? `${position} ${SHOWN_CLASS}` : position\n }\n\n ////////////////\n // ## Rendering\n ////////////////\n\n /**\n * Adds the server render's target binding (`serverBind()`) to `UIComponent.onMount()`;\n * the role and name (`@aria`) and the position effect (`writesDOMElement`) write the DOM element there too.\n */\n onMount(): JSX.Element {\n if (isServer) this.serverBind()\n return super.onMount()\n }\n\n render(): JSX.Element {\n if (isServer) return this.serverMarkup()\n return (\n <div ref={(element) => (this.box = element)} class={this.rootClass} part={this.partForName(\"popup\")}>\n <Show when={this.heading}>\n <div class={UIT.HEADER} part={this.partForName(\"header\")}>\n {this.heading}\n </div>\n </Show>\n <Show when={this.label}>\n <div class={UIT.CONTENT} part={this.partForName(\"content\")}>\n {this.label}\n </div>\n </Show>\n <slot />\n </div>\n )\n }\n\n /**\n * The static markup of a server render (`spell/ui/static`), where the root replaces the DOM element:\n * - a popover itself (`serverPopover`): hidden until opened, in the HTML\n * - PHRASING content (`<span>`s): a popup often sits in running text, after a `<dfn>` or a button in a `<p>`,\n * where its DOM element was valid; a `<div>` would close the `<p>` when a browser parses the page\n */\n private serverMarkup(): JSX.Element {\n return (\n <span class={this.rootClass} part={this.partForName(\"popup\")} popover={this.serverPopover}>\n <Show when={this.heading}>\n <span class={UIT.HEADER} part={this.partForName(\"header\")}>\n {this.heading}\n </span>\n </Show>\n <Show when={this.label}>\n <span class={UIT.CONTENT} part={this.partForName(\"content\")}>\n {this.label}\n </span>\n </Show>\n <slot />\n </span>\n )\n }\n\n ////////////////\n // ## Targets\n ////////////////\n\n /**\n * `value` is an element: by node type, since a server render (`spell/ui/static`) has no `Element` global.\n * - STATIC: pure.\n */\n private static isElement(value: unknown): value is Element {\n return typeof value === \"object\" && value !== null && (value as Node).nodeType === E.NodeType.element\n }\n\n /**\n * The box to anchor to: `target`, or -- when it has none (`display: contents`) --\n * the first element of its shadow root, else its first child element.\n * - STATIC: needs no instance, only the target.\n */\n private static anchorBoxFor(target: Element): Element {\n if (getComputedStyle(target).display !== CONTENTS) return target\n return target.shadowRoot?.firstElementChild ?? target.firstElementChild ?? target\n }\n\n /**\n * The element that takes focus for `target`: a `delegatesFocus` DOM element's first focusable, else `target`.\n * - STATIC: needs no instance, only the target.\n */\n private static ariaTargetFor(target: Element): Element {\n const root = target.shadowRoot\n return (root?.delegatesFocus && UI.focus.first(root)) || target\n }\n\n ////////////////\n // ## Target markup: light DOM the popup doesn't own\n ////////////////\n\n /**\n * Add `name` to `element`'s inline `anchor-name` LIST:\n * several popups can share one target, and the page may name it too.\n * - STATIC: needs no instance; every popup bound to one target writes the same list.\n */\n private static addAnchorName(element: Element, name: string) {\n const style = (element as HTMLElement).style\n if (!style) return\n const names = UIPopup.anchorNamesIn(style)\n if (!names.includes(name)) style.setProperty(\"anchor-name\", [...names, name].join(\", \"))\n }\n\n /**\n * Remove `name` from `element`'s inline `anchor-name`; drops the property when none are left.\n * - STATIC: as `addAnchorName()`.\n */\n private static removeAnchorName(element: Element, name: string) {\n const style = (element as HTMLElement).style\n if (!style) return\n const names = UIPopup.anchorNamesIn(style).filter((each) => each !== name)\n if (names.length) style.setProperty(\"anchor-name\", names.join(\", \"))\n else style.removeProperty(\"anchor-name\")\n }\n\n /**\n * Names in `style`'s `anchor-name`.\n * - STATIC: pure.\n */\n private static anchorNamesIn(style: CSSStyleDeclaration): string[] {\n const value = style.getPropertyValue(\"anchor-name\").trim()\n return value && value !== \"none\" ? value.split(\",\").map((name) => name.trim()) : []\n }\n\n /**\n * Point `element`'s idref `relation` (`aria-describedby`, `aria-controls`) at `domElement` too,\n * ADDED to what's there; returns the undo.\n * - The attribute's token list when both share a tree,\n * else element reflection (`ariaDescribedByElements`), since an idref can't cross a shadow boundary.\n * - The undo keeps the way it was added:\n * by the time it runs the DOM element may be detached (its root is then itself),\n * which must not switch an attribute token list over to reflection.\n * - STATIC: needs no instance; a server render (`serverBind()`) and a live binding (`bind()`) share it.\n */\n private static addAriaRelation({ element, relation, domElement }: AriaRelationProps): () => void {\n const reflected = element as unknown as Record<string, Element[] | null>\n if (element.getRootNode() === domElement.getRootNode()) {\n const id = domElement.id\n const ids = UIPopup.idsIn(element, relation.attribute)\n if (!ids.includes(id)) element.setAttribute(relation.attribute, [...ids, id].join(\" \"))\n return () => {\n const rest = UIPopup.idsIn(element, relation.attribute).filter((each) => each !== id)\n if (rest.length) element.setAttribute(relation.attribute, rest.join(\" \"))\n else element.removeAttribute(relation.attribute)\n }\n }\n const elements = reflected[relation.property] ?? []\n if (!elements.includes(domElement)) reflected[relation.property] = [...elements, domElement]\n return () => {\n const rest = (reflected[relation.property] ?? []).filter((each) => each !== domElement)\n // `null`, not `undefined`: element reflection is a platform property, cleared by `null`\n reflected[relation.property] = rest.length ? rest : null\n }\n }\n\n /**\n * Ids in `element`'s `attribute`.\n * - STATIC: pure.\n */\n private static idsIn(element: Element, attribute: string): string[] {\n return (element.getAttribute(attribute) ?? \"\").split(UIT.WHITESPACE).filter(Boolean)\n }\n}\n\n/** The vocabulary's attribute getters, typed (see \"Attributes\" in `UIComponent`). */\nexport interface UIPopup extends E.AttributeValues<Vocabulary> {}\n\n/** The vocabulary type, for brevity. */\ntype Vocabulary = typeof popupVocabulary\n\n/** An idref ARIA relation: its attribute and its element-reflection property. */\ntype AriaRelation = {\n /** the idref attribute, e.g. `aria-describedby` */\n attribute: string\n /** its element-reflection property, e.g. `ariaDescribedByElements` (an idref can't cross a shadow boundary) */\n property: string\n}\n\n/** `showPopover()` options with `source` (not in every DOM lib yet). */\ntype ShowPopoverOptions = {\n /** the invoker: the implicit anchor, and where Tab continues from */\n source?: HTMLElement\n}\n\n/**\n * A `popover` value the component sets on its DOM element (or, in a server render, on its root):\n * - `auto`: light dismiss; only a server render's click popup\n * - `manual`: the page (or the component) decides; click and manual popups\n * - `hint`: hover / focus popups, where the browser has it (`UI.browser.supports.popoverHint`)\n */\ntype PopoverMode = \"auto\" | \"manual\" | \"hint\"\n\n/** What `UIPopup.addAriaRelation()` takes. */\ntype AriaRelationProps = {\n /** the element that takes focus for the target */\n element: Element\n /** which idref relation */\n relation: AriaRelation\n /** the popup's DOM element it points at */\n domElement: Element\n}\n\n////////////////\n// ## Constants\n////////////////\n\n/** Fomantic's default position: the popup's class words before its noun, `ui top left popup`. */\nconst DEFAULT_POSITION = \"top left\"\n\n/** Focus with no ring and no scrolling. */\nconst QUIET_FOCUS = { preventScroll: true, focusVisible: false } as FocusOptions\n\n/** Where a popup at a point opens: below it and to its right, until the window's edge flips it. */\nconst AT_POINT_POSITION = \"bottom left\"\n\n/**\n * Where a popup at a point goes when it doesn't fit below it and to its right, in turn:\n * flipped to its left, above, or both; else centred on the point, below it then above, and slid in from the\n * window's edge to stay inside it.\n * - Why: at phone width a press near the middle had room on NEITHER side for a right-click menu\n * (a 390px window, a 230px menu, a press at 195px), so the browser took the first place, off the right edge\n * (epic `language` I161).\n * - `span-all` makes the whole width the room it may use; its centring (`anchor-center`) slides the popup in.\n */\nconst AT_POINT_FALLBACKS = \"flip-inline, flip-block, flip-block flip-inline, bottom span-all, top span-all\"\n\n/** The class word for no pointing arrow. */\nconst BASIC_CLASS = \"basic\"\n\n/** The token for the gap between a popup and its target. */\nconst DISTANCE_TOKEN = \"--ui-popup-distance\"\n\n/** Fomantic's class word of a shown popup. */\nconst SHOWN_CLASS = \"visible\"\n\n/** Fomantic's default trigger. */\nconst DEFAULT_TRIGGER: UIT.PopupTrigger = UIT.PopupTrigger.hover\n\n/** `UI.ids` prefix. */\nconst ID_PREFIX = \"ui-popup\"\n\n/** Tooltips describe their target. */\nconst DESCRIBED_BY: AriaRelation = { attribute: \"aria-describedby\", property: \"ariaDescribedByElements\" }\n\n/** Click popups are controlled by their target. */\nconst CONTROLS: AriaRelation = { attribute: \"aria-controls\", property: \"ariaControlsElements\" }\n\n/** `ToggleEvent.newState` of a popover the browser closed. */\nconst CLOSED = \"closed\"\n\n/** `display` of a target with no box of its own. */\nconst CONTENTS = \"contents\"\n\n/**\n * `position` => `position-area`: the popup on that side,\n * its edge lined up with the target's (`span-*` grows away from the named corner), or centred on it.\n */\nconst POSITION_AREAS: Readonly<Record<string, string>> = {\n \"top left\": \"top span-right\",\n \"top center\": \"top center\",\n \"top right\": \"top span-left\",\n \"bottom left\": \"bottom span-right\",\n \"bottom center\": \"bottom center\",\n \"bottom right\": \"bottom span-left\",\n \"left center\": \"left center\",\n \"right center\": \"right center\",\n \"left top\": \"left span-bottom\",\n \"left bottom\": \"left span-top\",\n \"right top\": \"right span-bottom\",\n \"right bottom\": \"right span-top\"\n}\n\n/**\n * Where a centred popup goes when it doesn't fit as it is, in turn:\n * slid along its side to end at the target's right edge, then at its left, then the other side the same three ways.\n * - Why: a centred popup's flip across is its own position again, so near the window's edge it ran off it\n * (the editor's theme button, epic `editor` I217).\n * - The arrow stays at the target for each: `UIPopup.anchored.css`.\n */\nconst SHIFTED_FALLBACKS: Readonly<Record<string, string>> = {\n \"top center\": \"top span-left, top span-right, bottom center, bottom span-left, bottom span-right\",\n \"bottom center\": \"bottom span-left, bottom span-right, top center, top span-left, top span-right\"\n}\n\n/** The page's hover-delay preference, a token (`styles.en.ts`'s `hoverDelay`). */\nconst HOVER_DELAY_TOKEN = \"--ui-hover-delay\"\n\n/** A CSS time: `800ms`, `2s`, `1.5s`. */\nconst DURATION = /^(\\d+(?:\\.\\d+)?)(ms|s)$/\n","/**\n * The popup family: defines `<ui-popup>` and exports its component, `UIPopup`.\n * - SIDE EFFECT: importing it defines `<ui-popup>`, the owner of the `header` and `content` parts.\n * - NOTE: the tooltip (`data-tooltip`) needs no family: the runtime's `DataTooltips` shows it; with no script it's `native.css`'s, a page sheet.\n * - Also the library's `spell/ui/ui-popup` entry (its size is in `notes/report.md`).\n */\n\nimport { UIPopup } from \"./UIPopup\"\n\nUIPopup.define()\n\nexport { UIPopup }\n"],"mappings":";;;;;AAwBA,IAAaqD,KAAkB;CAC7B,KAAK;CACL,MAAM;CACN,QAAQ;EAAC;EAAU;EAAY;EAAY;CAAS;CACpD,KAAK;EAAC;EAAW;EAAW;EAAQ;EAAc;CAAa;CAC/D,MAAM;CACN,cAAc;CACd,aAAa;CACb,YAAY;EACV;GACE,MAAM;GACN,OAAO;GACP,MAAM;GACN,aAAa;EACf;EACA;GACE,MAAM;GACN,OAAO;GACP,MAAM;GACN,aAAa;EACf;EACA;GACE,MAAM;GACN,OAAO;GACP,MAAM;GACN,QAAQ,CAAC,OAAO;GAEhB,SAAS,CAAC;GACV,UAAU,CAAC;IAAE,MAAM;IAAS,OAAO;GAAQ,CAAC;GAC5C,aAAa;EACf;EACA;GACE,MAAM;GACN,OAAO;GACP,MAAM;GACN,aAAa;EACf;EACA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Ac;CACd,iBAAiB;AACnB,GAGMX,KAAoB,oBAGpBE,KAAW;;AChxBjBkD,GAAQ,OAAO"}
|
|
1
|
+
{"version":3,"file":"ui-popup.js","names":["UIT.PopupTriggers","ref={(element) => this.box = element}","<Show when={this.heading}>\n <div class={UIT.HEADER} part={this.partForName(\"header\")}>\n {this.heading}\n </div>\n </Show>","this","part={this.partForName(\"header\")}","<div class={UIT.HEADER} part={this.partForName(\"header\")}>\n {this.heading}\n </div>","<div ref={(element) => this.box = element} class={this.rootClass} part={this.partForName(\"popup\")}>\n <Show when={this.heading}>\n <div class={UIT.HEADER} part={this.partForName(\"header\")}>\n {this.heading}\n </div>\n </Show>\n <Show when={this.label}>\n <div class={UIT.CONTENT} part={this.partForName(\"content\")}>\n {this.label}\n </div>\n </Show>\n <slot />\n </div>","<Show when={this.label}>\n <div class={UIT.CONTENT} part={this.partForName(\"content\")}>\n {this.label}\n </div>\n </Show>","part={this.partForName(\"content\")}","<div class={UIT.CONTENT} part={this.partForName(\"content\")}>\n {this.label}\n </div>","part={this.partForName(\"popup\")}","<Show when={this.heading}>\n <span class={UIT.HEADER} part={this.partForName(\"header\")}>\n {this.heading}\n </span>\n </Show>","<span class={UIT.HEADER} part={this.partForName(\"header\")}>\n {this.heading}\n </span>","<span class={this.rootClass} part={this.partForName(\"popup\")} popover={this.serverPopover}>\n <Show when={this.heading}>\n <span class={UIT.HEADER} part={this.partForName(\"header\")}>\n {this.heading}\n </span>\n </Show>\n <Show when={this.label}>\n <span class={UIT.CONTENT} part={this.partForName(\"content\")}>\n {this.label}\n </span>\n </Show>\n <slot />\n </span>","<Show when={this.label}>\n <span class={UIT.CONTENT} part={this.partForName(\"content\")}>\n {this.label}\n </span>\n </Show>","<span class={UIT.CONTENT} part={this.partForName(\"content\")}>\n {this.label}\n </span>","popover={this.serverPopover}","E.UIComponent","E.proto","E.protoMerged","E.whileConnected","E.untracked","E.state","E.onChange","E.on","E.derived","E.aria","E.Disclosure","E.after","E.cssSecondsFor","_$readShallow","UIT.HEADER","_$setAttribute","UIT.CONTENT","_$getOwner","UIT.WHITESPACE","__name","popupCSS","anchoredCSS","HEADER","__decoratorStart","__publicField","PopupTrigger","__name$1","WHITESPACE","ToggleCommands","__decorateElement","__decoratorMetadata","__runInitializers","AnimationLookup","CONTENT","PopupTriggers","__privateAdd","getOwner$1","popupVocabulary","UIPopup_default","UIPopup_anchored_default","_tmpl$","_tmpl$2","_tmpl$3","_tmpl$4","_onPopoverModeChanged_dec","_onPositionChanged_dec","_accessibleName_dec","_ariaRole_dec","_onPopupFocusOut_dec","_onPopupLeave_dec","_onPopupEnter_dec","_onTargetClick_dec","_onExpandedChanged_dec","_onTargetChanged_dec","_ariaElement_dec","_targetElement_dec","_onCommand_dec","_onToggle_dec","_onPointChanged_dec","_pointBox_dec","_show_dec","_watchPlacement_dec","_elementSetup_dec","_vocabulary_dec","_a","_init","_pointBox","_ariaElement","_UIPopup","UIComponent","proto","protoMerged","whileConnected","untracked","state","onChange","on","derived","aria","Disclosure","event","UI","visible","originalEvent","delay","after","box","keyframes","animation","beforeNextPaint","QUIET_FOCUS","animations","each","target","anchor","domElement","at","point","root","ID_PREFIX","DISTANCE_TOKEN","CLOSED","action","property","id","DEFAULT_TRIGGER","isReady","trigger","listeners","options","isClick","events","element","unrelate","CONTROLS","DESCRIBED_BY","isInteractive","isVisible","seconds","cssSecondsFor","HOVER_DELAY_TOKEN","next","area","AT_POINT_POSITION","position","DEFAULT_POSITION","POSITION_AREAS","shifted","AT_POINT_FALLBACKS","SHIFTED_FALLBACKS","style","mode","BASIC_CLASS","SHOWN_CLASS","isServer","_self$","_el$","_el$3","_el$5","ref","insert","createComponent","Show","_el$2","effect","readShallow","className","_p$","setAttribute","_el$4","e","t","_self$2","_el$6","_el$8","_el$10","_el$7","_el$9","a","value","NodeType","CONTENTS","names","name","reflected","ids","relation","rest","elements","attribute","UIPopup"],"sources":["../src/components/ui-popup/UIPopup.en.ts","../src/components/ui-popup/UIPopup.tsx","../src/components/ui-popup/index.ts"],"sourcesContent":["/**\n * Every name `<ui-popup>` uses: tag, attributes (kind + allowed values), events, slots, parts, states, texts.\n * Schema: `E.ComponentVocabulary` (`spell/ui/vocabulary`).\n * - Pure data: node imports it (`yarn site:data`, `yarn gen:root`), so `spell/ui/core` for types only,\n * `UIT` by value straight from `components.types`.\n * - Class words come out through `ClassBuilder`, in Fomantic's grammar:\n * `<ui-popup size=\"small\" inverted wide=\"very\">` => `ui small inverted very wide popup`.\n * The element adds the `position` words before the noun (`ui inverted bottom left popup`),\n * the words Fomantic's script added.\n * - `visible`, Fomantic's shown-popup class, is the element's own while it shows (the shared `visible` / `hidden`),\n * so static markup and the element share one sheet.\n * - A popup OWNS the `header` and `content` parts:\n * slotted `<ui-header>` / `<ui-content>` get `:state(in-popup)` and style themselves from `UIParts.css`.\n * - `target` is a PROPERTY (an element); first paint never needs it --\n * `for` or the previous sibling carry what markup must say.\n */\n\nimport type { E } from \"spell/ui/core\"\nimport * as UIT from \"spell/ui/components/components.types\"\n\n/****************\n * ### `<ui-popup>`\n * A popup: a popover DOM element anchored to its target, holding `<div class=\"ui ... popup\" part=\"popup\">`.\n ****************/\nexport const popupVocabulary = {\n tag: \"ui-popup\",\n icon: \"comment outline\",\n topics: [\"popups\", \"overlays\", \"feedback\", \"modules\"],\n aka: [\"tooltip\", \"popover\", \"hint\", \"hover card\", \"info bubble\"],\n noun: \"popup\",\n partOfSpeech: \"structure\",\n description: \"A popup displays additional information on top of a page.\",\n attributes: [\n {\n name: \"size\",\n group: \"appearance\",\n kind: \"size\",\n description: \"Text size, `mini` ... `massive`; `medium` is the default.\"\n },\n {\n name: \"color\",\n group: \"appearance\",\n kind: \"color\",\n description: \"Hue: fills the popup (and its arrow), with a readable text colour.\"\n },\n {\n name: \"appearance\",\n group: \"appearance\",\n kind: \"multiple\",\n values: [\"basic\"],\n // each word draws itself: no key after it\n classes: {},\n replaces: [{ from: \"basic\", value: \"basic\" }],\n description: \"The look: `basic`, no pointing arrow. Old name: `basic`.\"\n },\n {\n name: \"fixed\",\n group: \"layout\",\n kind: \"keyOnly\",\n description: \"Always its maximum width (`wide` / `very wide` widen it).\"\n },\n {\n name: \"flowing\",\n group: \"appearance\",\n kind: \"keyOnly\",\n description: \"No maximum width: as wide as its content, e.g. a grid.\"\n },\n { name: \"fluid\", group: \"layout\", kind: \"keyOnly\", description: \"As wide as its target.\" },\n {\n name: \"inverted\",\n group: \"appearance\",\n kind: \"keyOnly\",\n description: \"The opposite scheme: dark on a light page.\"\n },\n { name: \"loading\", group: \"states\", kind: \"keyOnly\", description: \"Busy: a spinner over faded content.\" },\n {\n name: \"wide\",\n group: \"layout\",\n kind: \"keyOrValueAndKey\",\n values: [\"very\"],\n description: 'A wider maximum width; `wide=\"very\"` wider still (`very wide`).'\n },\n {\n name: \"position\",\n group: \"layout\",\n kind: \"enum\",\n values: \"positions\",\n default: \"top left\",\n description:\n \"Where it sits against its target: `top left` (default) ... `right center`, `left top` ... `right bottom` \" +\n \"(beside, lined up with its top / bottom edge). It flips to the other \" +\n \"side when there's no room.\"\n },\n {\n name: \"open-on\",\n group: \"appearance\",\n kind: \"enum\",\n values: UIT.PopupTriggers,\n default: UIT.PopupTrigger.hover,\n description:\n \"What opens it: `hover` (also keyboard focus), `focus`, `click` (toggles; a non-modal dialog), or \" +\n \"`manual` (only `visible`).\"\n },\n {\n name: \"for\",\n group: \"appearance\",\n kind: \"string\",\n property: \"htmlFor\",\n description: \"Id of the target, in the popup's own tree; without it, the previous element sibling.\"\n },\n {\n name: \"heading\",\n replaces: [\"header\"],\n group: \"name\",\n kind: \"string\",\n description:\n \"Shorthand for a header line (Fomantic's `title`); a slotted `<ui-header>` is the rich version. Its old name was `header`.\"\n },\n {\n name: \"label\",\n group: \"content\",\n kind: \"string\",\n replaces: [\"content\"],\n description:\n \"Shorthand for the text (Fomantic's `content`); slotted content is the rich version. Old name: `content`.\"\n },\n {\n name: \"hoverable\",\n group: \"behaviour\",\n kind: \"boolean\",\n default: true,\n description:\n \"`hover`: the popup stays open while the pointer is over it, so it can be reached and its text read or \" +\n \"selected -- on by default, as WCAG 1.4.13 (Content on Hover or Focus) asks for. \" +\n '`hoverable=\"false\"` is Fomantic\\'s `hoverable: false` (its default): it closes as the pointer leaves ' +\n \"the target, after `hide-delay`.\"\n },\n {\n name: \"show-delay\",\n group: \"behaviour\",\n kind: \"number\",\n default: 50,\n description: \"`hover`: ms before it shows; not written, the page's `--ui-hover-delay` (800ms by default).\"\n },\n {\n name: \"hide-delay\",\n group: \"appearance\",\n kind: \"number\",\n default: 70,\n description: \"`hover`: ms before it hides.\"\n },\n {\n name: \"target\",\n group: \"behaviour\",\n kind: \"json\",\n reflect: false,\n description: \"The target as a PROPERTY (an `Element`); wins over `for`.\"\n },\n {\n name: \"at\",\n group: \"behaviour\",\n kind: \"json\",\n reflect: false,\n description:\n 'A point in the window, `{ x, y }`, to open at instead of a target: a right click\\'s menu. With `open-on=\"manual\"` and `visible`; it stays inside the window, takes focus and gives it back.'\n }\n ],\n events: [\n {\n name: \"ui-opening\",\n detail: \"{ visible: true, originalEvent?: Event }\",\n cancelable: true,\n description:\n \"About to show for a person's action (the trigger, an invoker command); `preventDefault()` keeps it hidden.\"\n },\n {\n name: \"ui-closing\",\n detail: \"{ visible: false, originalEvent?: Event }\",\n cancelable: true,\n description:\n \"About to hide; `preventDefault()` keeps it shown. NOT cancelable in effect when the browser already \" +\n \"dismissed a `hint` popover (Escape, a click elsewhere).\"\n }\n ],\n slots: [{ name: \"\", description: \"Content: text, `<ui-header>` / `<ui-content>` parts, a grid, controls.\" }],\n parts: [\n { name: \"popup\", description: \"The popup box (its arrow is `::before`).\" },\n { name: \"header\", description: \"The `header` shorthand.\" },\n { name: \"content\", description: \"The `content` shorthand.\" }\n ],\n states: [{ name: \"fluid\", description: \"As wide as its target (`fluid`).\" }],\n texts: [],\n ownsParts: [\"header\", \"content\"]\n} as const satisfies E.ComponentVocabulary\n","import { Show } from \"solid-js\"\nimport { isServer, type JSX } from \"@solidjs/web\"\n\nimport { E, UI, UIT } from \"spell/ui/core\"\nimport { popupVocabulary } from \"./UIPopup.en\"\n\nimport popupCSS from \"./UIPopup.css?inline\"\nimport anchoredCSS from \"./UIPopup.anchored.css?raw\"\n\n/****************\n * ### `UIPopup`\n * The component behind `<ui-popup>`: a popup anchored to a TARGET.\n * The DOM element is a popover in the top layer, placed by CSS anchor positioning only (`UIPopup.css`),\n * holding `<div class=\"ui … popup [position]\" part=\"popup\">`.\n *\n * - Its target: the `target` property, else the element `for` names (in the popup's own tree),\n * else the previous element sibling (Fomantic's `inline` markup: a popup right after what opens it).\n *\n * - `open-on`:\n * - `hover` (with `show-delay` / `hide-delay`, and on keyboard focus too)\n * - `focus`\n * - `click` (toggles)\n * - `manual` (only `visible`)\n * - A hovered popup stays open while the pointer is over it (WCAG 1.4.13),\n * unlike Fomantic's default `hoverable: false`.\n * `hoverable=\"false\"` gives Fomantic's behaviour back:\n * it hides as the pointer leaves the target, after `hide-delay`.\n *\n * - Where it shows: `position`; one that doesn't fit flips to the other side.\n * A centred one (`bottom center`) slides along its side first, to stay inside the window (`SHIFTED_FALLBACKS`).\n *\n * - `at`, a point in the window (`{ x, y }`), in place of a target: a right click's menu.\n * - It opens with its corner there, staying inside the window (`AT_POINT_FALLBACKS`).\n * - It takes focus, which goes back when it closes: its `autofocus` element's, else its first tabbable's.\n * - The point is a box the popup puts on the page while it's open (`placeAtPoint()`): anchor positioning needs one.\n * - Written with `open-on=\"manual\"`, and with `visible` to open: it has no target to listen to.\n *\n * - Invoker commands (`<button commandfor=\"id\" command=\"--toggle\">`, `UIT.ToggleCommands`)\n * are a person's actions too: the popup opens at ITS target, whichever button sent the command.\n *\n * - Shown by the shared `visible` / `hidden` (`UIComponent`, \"Shown or hidden\"), starting hidden.\n * - Controlled: a person's cancelable `ui-opening` / `ui-closing` come first.\n * - Escape and outside clicks come from `UI.overlays` (kind `popover`; the target counts as inside).\n *\n * - Its popover mode: `hint` for hover / focus popups when `UI.browser.supports.popoverHint`\n * (they don't close an open dropdown's menu), else `manual`.\n * - Click and manual popups are always `manual`: `auto`'s light dismiss would skip the cancelable `ui-closing`.\n * - When the browser dismisses a `hint` popover itself,\n * the component follows (with a `ui-closing` that can no longer veto).\n *\n * - Accessibility, by `open-on`:\n * - `hover` / `focus` / `manual`: the DOM element is `role=tooltip`; the target is `aria-describedby` it;\n * `at` is interactive, as `click`\n * - `click`: the DOM element is `role=dialog` (non-modal, named by `header` or its `aria-label`);\n * the target gets `aria-haspopup=dialog`, `aria-expanded`, `aria-controls`\n * - the ARIA goes on the element that takes focus: a `delegatesFocus` target's (`<ui-button>`'s) first focusable,\n * through element reflection (`ariaDescribedByElements`) when that is in another tree.\n *\n * - SIDE EFFECTS on light DOM the popup doesn't own, undone when it unbinds:\n * - the target's inline `anchor-name` (a per-instance name ADDED to its list) and its ARIA attributes\n * - the DOM element's `popover`, `id`, and inline `position-anchor` / `position-area` / `position-try-fallbacks`.\n ****************/\nexport class UIPopup extends E.UIComponent<Vocabulary> {\n @E.proto static vocabulary = popupVocabulary\n @E.protoMerged static elementSetup = {\n styleSheets: { popup: popupCSS, \"popup-anchored\": anchoredCSS },\n cssStates: [\"fluid\"],\n // nothing inside needs focus delegated: a click on a tooltip's text must not jump to a link in it\n delegatesFocus: false,\n // `loading`: Fomantic's loader inside the popup\n loading: \"its own\",\n visible: \"hidden\",\n // the sheet's own transition is Fomantic's `scale`: faded in from 80%\n animation: \"scale\"\n } satisfies Partial<E.ElementSetup>\n\n ////////////////\n // ## Shown or hidden\n ////////////////\n\n /** Pending delayed show / hide. */\n private delayTimer?: E.CancelablePromise<unknown>\n\n /** This element's `UI.overlays` entry; `anchor` follows the target. */\n private readonly overlay: E.OverlayEntry = {\n element: this.domElement,\n kind: \"popover\",\n onDismiss: () => void this.requestVisible(false)\n }\n\n /** Shown or hidden, as `visible` (`isVisible`): `ui-opening` / `ui-closing` first. */\n readonly disclosure = new E.Disclosure({\n component: this,\n member: \"isVisible\",\n detail: (visible, originalEvent): UIT.PopupOpenDetail => ({ visible, originalEvent })\n })\n\n /** Show or hide, dispatching the cancelable `ui-opening` / `ui-closing` first; true when applied. */\n requestVisible(visible: boolean, originalEvent?: Event): boolean {\n this.delayTimer?.cancel()\n return this.disclosure.request(visible, originalEvent)\n }\n\n /** `requestVisible()` after `delay` ms (at once for `0`); a newer call replaces a pending one. */\n private schedule(visible: boolean, delay: number, originalEvent?: Event) {\n this.delayTimer?.cancel()\n if (delay <= 0) return void this.requestVisible(visible, originalEvent)\n this.delayTimer = E.after(delay / 1000, () => this.requestVisible(visible, originalEvent))\n }\n\n /**\n * `visible` changed (`UIComponent`'s hook): show or hide the popover; resolves once its transition has ended.\n * - Showing waits for a `ui-*` target to be ready:\n * it renders async, so its box (or `display: contents`) is only known then.\n * - `animation`:\n * - the family's own (`elementSetup.animation`): the sheet's transition (`UIPopup.css`)\n * - another one (the element's own `animation`): run on the popup box through `UI.transitions`\n * - `none`: at once\n */\n protected async onVisibleChange(visible: boolean, animation: UIT.Animation): Promise<void> {\n const box = this.box\n const keyframes = UIT.AnimationLookup.keyframesBeside(animation, this.elementSetup.animation)\n if (visible) {\n const target = this.targetElement as { ready?: Promise<void> } | undefined\n await target?.ready\n if (!this.isVisible || !this.isConnected) return\n this.show()\n // no ring for a mouse's right click: the arrow keys show it\n if (this.point) E.beforeNextPaint(() => this.firstFocus?.focus(QUIET_FOCUS))\n if (keyframes && box) await UI.transitions.animate({ element: box, name: keyframes, direction: UIT.IN })\n return\n }\n if (keyframes && box) await UI.transitions.animate({ element: box, name: keyframes, direction: UIT.OUT })\n // shown again while the keyframes ran\n if (this.isVisible) return\n this.hide()\n const animations = [...this.domElement.getAnimations(), ...(box?.getAnimations() ?? [])]\n await Promise.allSettled(animations.map((each) => each.finished))\n }\n /**\n * What takes the focus as it opens at a point: an `autofocus` element inside it, else its first tabbable,\n * as a dialog's focusing steps do (`UI.focus.enter()`).\n * - So a close button before a field doesn't take it from the field (Change This, epic `editor` I133).\n */\n private get firstFocus(): HTMLElement | undefined {\n return this.domElement.querySelector<HTMLElement>(\"[autofocus]\") ?? UI.focus.first(this.domElement)\n }\n\n /**\n * Shown again when it comes back into the page while `visible`; hidden, quietly, when it leaves.\n * - Not on the first connect: `onVisibleChange()` runs once the popup first draws.\n */\n @E.whileConnected\n protected watchPlacement() {\n if (this.isVisible && this.isReady) this.show()\n return () => this.hide()\n }\n\n /** The popup box in the shadow root (`part=\"popup\"`). */\n private box?: HTMLElement\n\n /**\n * Show the popover against the target and register with `UI.overlays`.\n * - Anchor: the target's `anchor-name` when it has a box,\n * else the implicit anchor of `source` (see `UIPopup.css`).\n * - `source` also makes the target the popover's invoker, so Tab from it continues inside.\n * - A box other keyframes animated out (`hidden` on it) shows again first.\n */\n @E.untracked\n private show() {\n const { domElement } = this\n if (this.box) UI.transitions.reveal(this.box)\n this.placeAtPoint()\n const target = this.targetElement\n // the box at a point is our own block: nothing to look up, so no style to work out mid-click\n const anchor = target && (target === this.pointBox ? target : UIPopup.anchorBoxFor(target))\n domElement.popover ||= this.popoverMode\n domElement.style.setProperty(\"position-anchor\", anchor === target ? this.anchorName : anchor ? \"auto\" : \"none\")\n if (!domElement.matches(\":popover-open\")) {\n domElement.showPopover(anchor ? ({ source: anchor } as ShowPopoverOptions) : undefined)\n }\n this.overlay.anchor = target\n this.overlay.restoreFocus = this.isInteractive\n UI.overlays.open(this.overlay)\n }\n\n /** Hide the popover and leave `UI.overlays`. */\n private hide() {\n this.delayTimer?.cancel()\n if (this.domElement.matches(\":popover-open\")) this.domElement.hidePopover()\n UI.overlays.close(this.overlay)\n this.removePointBox()\n }\n\n ////////////////\n // ## A point\n ////////////////\n\n /** `at`, when it's a point. */\n get point(): UIT.PopupPoint | undefined {\n const at = this.at as UIT.PopupPoint | undefined\n return typeof at?.x === \"number\" && typeof at.y === \"number\" ? at : undefined\n }\n\n /** The box at `point`, while it's open: what it's anchored to. */\n @E.state accessor pointBox: HTMLElement | undefined = undefined\n\n /**\n * Put the box at `point`, and make it the target, its anchor name on it already: `bind()` comes a moment later.\n * - In the popup's own tree: an anchor name reaches only there.\n * - SIDE EFFECT: no pointing arrow and no gap; `removePointBox()` undoes it.\n */\n private placeAtPoint() {\n const { point, domElement } = this\n if (!point) return this.removePointBox()\n const root = domElement.getRootNode() as Document | ShadowRoot\n const box = this.pointBox ?? (domElement.ownerDocument.createElement(\"div\") as HTMLElement)\n box.style.cssText = `position:fixed;left:${point.x}px;top:${point.y}px;width:0;height:0`\n box.setAttribute(\"aria-hidden\", \"true\")\n if (!box.isConnected) (\"body\" in root ? root.body : root).append(box)\n this.anchorName ||= `--${UI.ids.next(ID_PREFIX)}`\n UIPopup.addAnchorName(box, this.anchorName)\n domElement.style.setProperty(DISTANCE_TOKEN, \"0px\")\n this.pointBox = box\n }\n\n /** Take the box away. */\n private removePointBox() {\n if (!this.pointBox) return\n this.pointBox.remove()\n this.pointBox = undefined\n this.domElement.style.removeProperty(DISTANCE_TOKEN)\n }\n\n /** Told of a new point while it's open: it moves there. */\n @E.onChange(\"at\", { defer: true })\n protected onPointChanged() {\n if (this.isVisible && this.isConnected) this.placeAtPoint()\n }\n\n /**\n * The popover's `toggle`: the browser closed it (a `hint` popover's light dismiss)\n * while the element thinks it's open -- follow, announcing a `ui-closing` that can't veto any more.\n */\n @E.on(\"toggle\")\n protected onToggle(event: Event) {\n if ((event as ToggleEvent).newState !== CLOSED || !this.domElement.isConnected) return\n this.disclosure.adopt(false, event)\n }\n\n /** An invoker command aimed at the DOM element (`ToggleCommands`). */\n @E.on(\"command\")\n protected onCommand(event: Event) {\n const action = UIT.ToggleCommands.action(event, this.isVisible)\n if (action) this.requestVisible(action === \"show\", event)\n }\n\n ////////////////\n // ## The target\n ////////////////\n\n /**\n * The target: `target` property, else `for`, else the previous element sibling; `undefined` when unbound.\n * - Not `target`: that's the attribute's getter, the property this reads first.\n */\n @E.derived\n get targetElement(): Element | undefined {\n if (!this.isConnected) return undefined\n if (this.pointBox) return this.pointBox\n const property = this.target\n if (UIPopup.isElement(property)) return property\n const id = this.for\n if (id) return (this.domElement.getRootNode() as Document | ShadowRoot).getElementById?.(id) ?? undefined\n return this.domElement.previousElementSibling ?? undefined\n }\n\n /** What opens it. */\n get trigger(): UIT.PopupTrigger {\n return this.openOn ?? DEFAULT_TRIGGER\n }\n\n /** A click popup, or one at a point: a non-modal dialog with interactive content, not a tooltip. */\n get isInteractive(): boolean {\n return this.trigger === UIT.PopupTrigger.click || !!this.point\n }\n\n /** Element carrying the target's ARIA (see class docs), while bound. */\n @E.state accessor ariaElement: Element | undefined = undefined\n\n /** Per-instance anchor name, from `UI.ids` on first bind. */\n private anchorName = \"\"\n\n /** Ready with a target: bind it for the trigger; the cleanup is `bind()`'s undo. */\n @E.onChange(\"isReady\", \"targetElement\", \"trigger\")\n protected onTargetChanged(isReady: boolean, target: Element | undefined, trigger: UIT.PopupTrigger) {\n return isReady && target ? this.bind(target, trigger) : undefined\n }\n\n /**\n * Listen to `target` for `trigger`, add the anchor name and the ARIA; returns the undo.\n * - SIDE EFFECTS: see class docs.\n */\n private bind(target: Element, trigger: UIT.PopupTrigger): () => void {\n const { domElement } = this\n this.anchorName ||= `--${UI.ids.next(ID_PREFIX)}`\n const listeners = new AbortController()\n const options = { signal: listeners.signal }\n const isClick = trigger === UIT.PopupTrigger.click\n // `HTMLElement`'s event map: an SVG target fires the same pointer / focus events\n const events = target as HTMLElement\n if (trigger === UIT.PopupTrigger.hover) {\n events.addEventListener(\"pointerenter\", this.onTargetEnter, options)\n events.addEventListener(\"pointerleave\", this.onTargetLeave, options)\n }\n if (trigger === UIT.PopupTrigger.hover || trigger === UIT.PopupTrigger.focus) {\n events.addEventListener(\"focusin\", this.onTargetFocus, options)\n events.addEventListener(\"focusout\", this.onTargetBlur, options)\n }\n if (isClick) events.addEventListener(\"click\", this.onTargetClick, options)\n UIPopup.addAnchorName(target, this.anchorName)\n UI.ids.ensure(domElement, ID_PREFIX)\n const element = UIPopup.ariaTargetFor(target)\n const unrelate = UIPopup.addAriaRelation({ element, relation: isClick ? CONTROLS : DESCRIBED_BY, domElement })\n if (isClick) element.setAttribute(\"aria-haspopup\", \"dialog\")\n this.ariaElement = element\n return () => {\n listeners.abort()\n this.delayTimer?.cancel()\n UIPopup.removeAnchorName(target, this.anchorName)\n unrelate()\n if (isClick) {\n element.removeAttribute(\"aria-haspopup\")\n element.removeAttribute(\"aria-expanded\")\n }\n this.ariaElement = undefined\n }\n }\n\n /**\n * A server render's binding: the target's ARIA, as `bind()` adds it, without listeners.\n * - SIDE EFFECTS: gives the DOM element (the render's parsed copy) an id, which its root keeps,\n * and sets the target's `aria-describedby` / `aria-controls` and `aria-haspopup`.\n * - No `aria-expanded`: a native invoker reports its popover's state itself.\n */\n private serverBind() {\n const target = this.targetElement\n if (!target) return\n const isInteractive = this.isInteractive\n UI.ids.ensure(this.domElement, ID_PREFIX)\n const element = UIPopup.ariaTargetFor(target)\n UIPopup.addAriaRelation({ element, relation: isInteractive ? CONTROLS : DESCRIBED_BY, domElement: this.domElement })\n if (isInteractive) element.setAttribute(\"aria-haspopup\", \"dialog\")\n }\n\n /** A click popup's target says whether it's shown (`aria-expanded`). */\n @E.onChange(\"ariaElement\", \"isInteractive\", \"isVisible\")\n protected onExpandedChanged(element: Element | undefined, isInteractive: boolean, isVisible: boolean) {\n if (element && isInteractive) element.setAttribute(\"aria-expanded\", String(isVisible))\n }\n\n /** Pointer onto the target (`hover`): show after `show-delay`, else the page's `--ui-hover-delay`. */\n private readonly onTargetEnter = (event: PointerEvent) => {\n this.schedule(true, this.hoverDelay, event)\n }\n\n /**\n * How long the pointer rests before it shows: its own `show-delay` when written, else the page's preference,\n * the `--ui-hover-delay` token (`styles.en.ts`'s `hoverDelay`), in `ms` or `s`; else `show-delay`'s default.\n */\n private get hoverDelay(): number {\n if (this.attributes[\"show-delay\"] !== null) return this.showDelay ?? 0\n const seconds = E.cssSecondsFor(this.domElement, HOVER_DELAY_TOKEN)\n return seconds === undefined ? (this.showDelay ?? 0) : seconds * 1000\n }\n\n /** Pointer off the target (`hover`): hide after `hide-delay`, unless it reaches the popup first. */\n private readonly onTargetLeave = (event: PointerEvent) => {\n this.schedule(false, this.hideDelay ?? 0, event)\n }\n\n /** Focus onto the target (`hover`, `focus`): show at once. */\n private readonly onTargetFocus = (event: FocusEvent) => {\n this.schedule(true, 0, event)\n }\n\n /** Focus off the target (`hover`, `focus`): hide, unless focus moved into the popup. */\n private readonly onTargetBlur = (event: FocusEvent) => {\n if (UI.focus.containsDeep(this.domElement, event.relatedTarget as Node | null)) return\n this.schedule(false, 0, event)\n }\n\n /** Click on the target (`click`): toggle. */\n @E.untracked\n private readonly onTargetClick = (event: MouseEvent) => {\n this.requestVisible(!this.isVisible, event)\n }\n\n ////////////////\n // ## The popup itself\n ////////////////\n\n /** Pointer onto the popup: keep a hovered popup open, unless `hoverable` is off (Fomantic's default). */\n @E.on(\"pointerenter\")\n protected onPopupEnter() {\n if (this.trigger !== UIT.PopupTrigger.hover) return\n if (this.hoverable !== false) this.delayTimer?.cancel()\n }\n\n /** Pointer off the popup: hide a hovered popup after `hide-delay`. */\n @E.on(\"pointerleave\")\n protected onPopupLeave(event: PointerEvent) {\n if (this.trigger === UIT.PopupTrigger.hover) this.schedule(false, this.hideDelay ?? 0, event)\n }\n\n /** Focus off the popup (`focus`): hide, unless it went back to the target. */\n @E.on(\"focusout\")\n protected onPopupFocusOut(event: FocusEvent) {\n if (this.trigger !== UIT.PopupTrigger.focus) return\n const next = event.relatedTarget as Node | null\n const target = this.targetElement\n if (UI.focus.containsDeep(this.domElement, next) || (target && next && UI.focus.containsDeep(target, next))) return\n this.schedule(false, 0, event)\n }\n\n ////////////////\n // ## The DOM element's role, name, position and popover\n ////////////////\n\n /** The DOM element is a dialog for a click popup, else a tooltip. */\n @E.aria(\"role\")\n protected get ariaRole(): string {\n return this.isInteractive ? \"dialog\" : \"tooltip\"\n }\n\n /** A click popup's dialog is named by `header`. */\n @E.aria(\"label\")\n protected get accessibleName(): string | undefined {\n return this.isInteractive ? this.heading : undefined\n }\n\n /**\n * SIDE EFFECT: the DOM element's `position-area` follows `position`, and so do the places it tries\n * when that doesn't fit (`position-try-fallbacks`).\n * - A centred one (`bottom center`) slides along its side to stay in the window, its arrow still at the target:\n * `SHIFTED_FALLBACKS`, and `UIPopup.anchored.css` for the arrow.\n * - Every other position flips, by the sheet's own fallbacks.\n * - One at a point flips, then slides in from the window's edge: `AT_POINT_FALLBACKS`.\n */\n @E.onChange(\"position\", \"point\", { writesDOMElement: true })\n protected onPositionChanged(position: string | undefined, point: UIT.PopupPoint | undefined) {\n const area = point ? AT_POINT_POSITION : (position ?? DEFAULT_POSITION)\n const { style } = this.domElement\n style.setProperty(\"position-area\", POSITION_AREAS[area])\n const shifted = point ? AT_POINT_FALLBACKS : SHIFTED_FALLBACKS[area]\n if (shifted) style.setProperty(\"position-try-fallbacks\", shifted)\n else style.removeProperty(\"position-try-fallbacks\")\n }\n\n /**\n * `popover` mode for the current trigger, see class docs.\n * - `manual` popups too stay `manual`:\n * the page decides, so several may be open at once (a `hint` closes the other hints).\n */\n private get popoverMode(): PopoverMode {\n const trigger = this.trigger\n const isHintable = trigger === UIT.PopupTrigger.hover || trigger === UIT.PopupTrigger.focus\n return isHintable && UI.browser.supports.popoverHint ? \"hint\" : \"manual\"\n }\n\n /**\n * Once ready, the DOM element's `popover` follows the trigger (`popoverMode`).\n * - Reads `popoverMode` HERE, not as a member of the effect: it reads `UI.browser`, which exists only once ready.\n */\n @E.onChange(\"isReady\", \"trigger\")\n protected onPopoverModeChanged(isReady: boolean) {\n if (!isReady) return\n const mode = this.popoverMode\n if (this.domElement.popover !== mode) this.domElement.popover = mode\n }\n\n /**\n * `popover` of the ROOT in a server render (`spell/ui/static`), where the root replaces the DOM element:\n * hidden until opened, in the HTML.\n * - `auto` for a click popup: light dismiss and Escape without JS, once something opens it (`popovertarget`).\n * - `manual` for the rest (`hint` isn't everywhere, and an unknown value means `manual`).\n */\n private get serverPopover(): PopoverMode {\n return this.isInteractive ? \"auto\" : \"manual\"\n }\n\n ////////////////\n // ## Classes and states\n ////////////////\n\n /**\n * The position words before the noun, then Fomantic's `visible` while shown: `ui top left visible popup`.\n * - After the position: a phrase rule (`[class*=\"left top\"]`) needs its words side by side.\n */\n protected get extraClass(): string | undefined {\n const position = this.point ? `${BASIC_CLASS} ${AT_POINT_POSITION}` : (this.position ?? DEFAULT_POSITION)\n return this.isVisible ? `${position} ${SHOWN_CLASS}` : position\n }\n\n ////////////////\n // ## Rendering\n ////////////////\n\n /**\n * Adds the server render's target binding (`serverBind()`) to `UIComponent.onMount()`;\n * the role and name (`@aria`) and the position effect (`writesDOMElement`) write the DOM element there too.\n */\n onMount(): JSX.Element {\n if (isServer) this.serverBind()\n return super.onMount()\n }\n\n render(): JSX.Element {\n if (isServer) return this.serverMarkup()\n return (\n <div ref={(element) => (this.box = element)} class={this.rootClass} part={this.partForName(\"popup\")}>\n <Show when={this.heading}>\n <div class={UIT.HEADER} part={this.partForName(\"header\")}>\n {this.heading}\n </div>\n </Show>\n <Show when={this.label}>\n <div class={UIT.CONTENT} part={this.partForName(\"content\")}>\n {this.label}\n </div>\n </Show>\n <slot />\n </div>\n )\n }\n\n /**\n * The static markup of a server render (`spell/ui/static`), where the root replaces the DOM element:\n * - a popover itself (`serverPopover`): hidden until opened, in the HTML\n * - PHRASING content (`<span>`s): a popup often sits in running text, after a `<dfn>` or a button in a `<p>`,\n * where its DOM element was valid; a `<div>` would close the `<p>` when a browser parses the page\n */\n private serverMarkup(): JSX.Element {\n return (\n <span class={this.rootClass} part={this.partForName(\"popup\")} popover={this.serverPopover}>\n <Show when={this.heading}>\n <span class={UIT.HEADER} part={this.partForName(\"header\")}>\n {this.heading}\n </span>\n </Show>\n <Show when={this.label}>\n <span class={UIT.CONTENT} part={this.partForName(\"content\")}>\n {this.label}\n </span>\n </Show>\n <slot />\n </span>\n )\n }\n\n ////////////////\n // ## Targets\n ////////////////\n\n /**\n * `value` is an element: by node type, since a server render (`spell/ui/static`) has no `Element` global.\n * - STATIC: pure.\n */\n private static isElement(value: unknown): value is Element {\n return typeof value === \"object\" && value !== null && (value as Node).nodeType === E.NodeType.element\n }\n\n /**\n * The box to anchor to: `target`, or -- when it has none (`display: contents`) --\n * the first element of its shadow root, else its first child element.\n * - STATIC: needs no instance, only the target.\n */\n private static anchorBoxFor(target: Element): Element {\n if (getComputedStyle(target).display !== CONTENTS) return target\n return target.shadowRoot?.firstElementChild ?? target.firstElementChild ?? target\n }\n\n /**\n * The element that takes focus for `target`: a `delegatesFocus` DOM element's first focusable, else `target`.\n * - STATIC: needs no instance, only the target.\n */\n private static ariaTargetFor(target: Element): Element {\n const root = target.shadowRoot\n return (root?.delegatesFocus && UI.focus.first(root)) || target\n }\n\n ////////////////\n // ## Target markup: light DOM the popup doesn't own\n ////////////////\n\n /**\n * Add `name` to `element`'s inline `anchor-name` LIST:\n * several popups can share one target, and the page may name it too.\n * - STATIC: needs no instance; every popup bound to one target writes the same list.\n */\n private static addAnchorName(element: Element, name: string) {\n const style = (element as HTMLElement).style\n if (!style) return\n const names = UIPopup.anchorNamesIn(style)\n if (!names.includes(name)) style.setProperty(\"anchor-name\", [...names, name].join(\", \"))\n }\n\n /**\n * Remove `name` from `element`'s inline `anchor-name`; drops the property when none are left.\n * - STATIC: as `addAnchorName()`.\n */\n private static removeAnchorName(element: Element, name: string) {\n const style = (element as HTMLElement).style\n if (!style) return\n const names = UIPopup.anchorNamesIn(style).filter((each) => each !== name)\n if (names.length) style.setProperty(\"anchor-name\", names.join(\", \"))\n else style.removeProperty(\"anchor-name\")\n }\n\n /**\n * Names in `style`'s `anchor-name`.\n * - STATIC: pure.\n */\n private static anchorNamesIn(style: CSSStyleDeclaration): string[] {\n const value = style.getPropertyValue(\"anchor-name\").trim()\n return value && value !== \"none\" ? value.split(\",\").map((name) => name.trim()) : []\n }\n\n /**\n * Point `element`'s idref `relation` (`aria-describedby`, `aria-controls`) at `domElement` too,\n * ADDED to what's there; returns the undo.\n * - The attribute's token list when both share a tree,\n * else element reflection (`ariaDescribedByElements`), since an idref can't cross a shadow boundary.\n * - The undo keeps the way it was added:\n * by the time it runs the DOM element may be detached (its root is then itself),\n * which must not switch an attribute token list over to reflection.\n * - STATIC: needs no instance; a server render (`serverBind()`) and a live binding (`bind()`) share it.\n */\n private static addAriaRelation({ element, relation, domElement }: AriaRelationProps): () => void {\n const reflected = element as unknown as Record<string, Element[] | null>\n if (element.getRootNode() === domElement.getRootNode()) {\n const id = domElement.id\n const ids = UIPopup.idsIn(element, relation.attribute)\n if (!ids.includes(id)) element.setAttribute(relation.attribute, [...ids, id].join(\" \"))\n return () => {\n const rest = UIPopup.idsIn(element, relation.attribute).filter((each) => each !== id)\n if (rest.length) element.setAttribute(relation.attribute, rest.join(\" \"))\n else element.removeAttribute(relation.attribute)\n }\n }\n const elements = reflected[relation.property] ?? []\n if (!elements.includes(domElement)) reflected[relation.property] = [...elements, domElement]\n return () => {\n const rest = (reflected[relation.property] ?? []).filter((each) => each !== domElement)\n // `null`, not `undefined`: element reflection is a platform property, cleared by `null`\n reflected[relation.property] = rest.length ? rest : null\n }\n }\n\n /**\n * Ids in `element`'s `attribute`.\n * - STATIC: pure.\n */\n private static idsIn(element: Element, attribute: string): string[] {\n return (element.getAttribute(attribute) ?? \"\").split(UIT.WHITESPACE).filter(Boolean)\n }\n}\n\n/** The vocabulary's attribute getters, typed (see \"Attributes\" in `UIComponent`). */\nexport interface UIPopup extends E.AttributeValues<Vocabulary> {}\n\n/** The vocabulary type, for brevity. */\ntype Vocabulary = typeof popupVocabulary\n\n/** An idref ARIA relation: its attribute and its element-reflection property. */\ntype AriaRelation = {\n /** the idref attribute, e.g. `aria-describedby` */\n attribute: string\n /** its element-reflection property, e.g. `ariaDescribedByElements` (an idref can't cross a shadow boundary) */\n property: string\n}\n\n/** `showPopover()` options with `source` (not in every DOM lib yet). */\ntype ShowPopoverOptions = {\n /** the invoker: the implicit anchor, and where Tab continues from */\n source?: HTMLElement\n}\n\n/**\n * A `popover` value the component sets on its DOM element (or, in a server render, on its root):\n * - `auto`: light dismiss; only a server render's click popup\n * - `manual`: the page (or the component) decides; click and manual popups\n * - `hint`: hover / focus popups, where the browser has it (`UI.browser.supports.popoverHint`)\n */\ntype PopoverMode = \"auto\" | \"manual\" | \"hint\"\n\n/** What `UIPopup.addAriaRelation()` takes. */\ntype AriaRelationProps = {\n /** the element that takes focus for the target */\n element: Element\n /** which idref relation */\n relation: AriaRelation\n /** the popup's DOM element it points at */\n domElement: Element\n}\n\n////////////////\n// ## Constants\n////////////////\n\n/** Fomantic's default position: the popup's class words before its noun, `ui top left popup`. */\nconst DEFAULT_POSITION = \"top left\"\n\n/** Focus with no ring and no scrolling. */\nconst QUIET_FOCUS = { preventScroll: true, focusVisible: false } as FocusOptions\n\n/** Where a popup at a point opens: below it and to its right, until the window's edge flips it. */\nconst AT_POINT_POSITION = \"bottom left\"\n\n/**\n * Where a popup at a point goes when it doesn't fit below it and to its right, in turn:\n * flipped to its left, above, or both; else centred on the point, below it then above, and slid in from the\n * window's edge to stay inside it.\n * - Why: at phone width a press near the middle had room on NEITHER side for a right-click menu\n * (a 390px window, a 230px menu, a press at 195px), so the browser took the first place, off the right edge\n * (epic `language` I161).\n * - `span-all` makes the whole width the room it may use; its centring (`anchor-center`) slides the popup in.\n */\nconst AT_POINT_FALLBACKS = \"flip-inline, flip-block, flip-block flip-inline, bottom span-all, top span-all\"\n\n/** The class word for no pointing arrow. */\nconst BASIC_CLASS = \"basic\"\n\n/** The token for the gap between a popup and its target. */\nconst DISTANCE_TOKEN = \"--ui-popup-distance\"\n\n/** Fomantic's class word of a shown popup. */\nconst SHOWN_CLASS = \"visible\"\n\n/** Fomantic's default trigger. */\nconst DEFAULT_TRIGGER: UIT.PopupTrigger = UIT.PopupTrigger.hover\n\n/** `UI.ids` prefix. */\nconst ID_PREFIX = \"ui-popup\"\n\n/** Tooltips describe their target. */\nconst DESCRIBED_BY: AriaRelation = { attribute: \"aria-describedby\", property: \"ariaDescribedByElements\" }\n\n/** Click popups are controlled by their target. */\nconst CONTROLS: AriaRelation = { attribute: \"aria-controls\", property: \"ariaControlsElements\" }\n\n/** `ToggleEvent.newState` of a popover the browser closed. */\nconst CLOSED = \"closed\"\n\n/** `display` of a target with no box of its own. */\nconst CONTENTS = \"contents\"\n\n/**\n * `position` => `position-area`: the popup on that side,\n * its edge lined up with the target's (`span-*` grows away from the named corner), or centred on it.\n */\nconst POSITION_AREAS: Readonly<Record<string, string>> = {\n \"top left\": \"top span-right\",\n \"top center\": \"top center\",\n \"top right\": \"top span-left\",\n \"bottom left\": \"bottom span-right\",\n \"bottom center\": \"bottom center\",\n \"bottom right\": \"bottom span-left\",\n \"left center\": \"left center\",\n \"right center\": \"right center\",\n \"left top\": \"left span-bottom\",\n \"left bottom\": \"left span-top\",\n \"right top\": \"right span-bottom\",\n \"right bottom\": \"right span-top\"\n}\n\n/**\n * Where a centred popup goes when it doesn't fit as it is, in turn:\n * slid along its side to end at the target's right edge, then at its left, then the other side the same three ways.\n * - Why: a centred popup's flip across is its own position again, so near the window's edge it ran off it\n * (the editor's theme button, epic `editor` I217).\n * - The arrow stays at the target for each: `UIPopup.anchored.css`.\n */\nconst SHIFTED_FALLBACKS: Readonly<Record<string, string>> = {\n \"top center\": \"top span-left, top span-right, bottom center, bottom span-left, bottom span-right\",\n \"bottom center\": \"bottom span-left, bottom span-right, top center, top span-left, top span-right\"\n}\n\n/** The page's hover-delay preference, a token (`styles.en.ts`'s `hoverDelay`). */\nconst HOVER_DELAY_TOKEN = \"--ui-hover-delay\"\n","/**\n * The popup family: defines `<ui-popup>` and exports its component, `UIPopup`.\n * - SIDE EFFECT: importing it defines `<ui-popup>`, the owner of the `header` and `content` parts.\n * - NOTE: the tooltip (`data-tooltip`) needs no family: the runtime's `DataTooltips` shows it; with no script it's `native.css`'s, a page sheet.\n * - Also the library's `spell/ui/ui-popup` entry (its size is in `notes/report.md`).\n */\n\nimport { UIPopup } from \"./UIPopup\"\n\nUIPopup.define()\n\nexport { UIPopup }\n"],"mappings":";;;;;AAwBA,IAAasD,KAAkB;CAC7B,KAAK;CACL,MAAM;CACN,QAAQ;EAAC;EAAU;EAAY;EAAY;CAAS;CACpD,KAAK;EAAC;EAAW;EAAW;EAAQ;EAAc;CAAa;CAC/D,MAAM;CACN,cAAc;CACd,aAAa;CACb,YAAY;EACV;GACE,MAAM;GACN,OAAO;GACP,MAAM;GACN,aAAa;EACf;EACA;GACE,MAAM;GACN,OAAO;GACP,MAAM;GACN,aAAa;EACf;EACA;GACE,MAAM;GACN,OAAO;GACP,MAAM;GACN,QAAQ,CAAC,OAAO;GAEhB,SAAS,CAAC;GACV,UAAU,CAAC;IAAE,MAAM;IAAS,OAAO;GAAQ,CAAC;GAC5C,aAAa;EACf;EACA;GACE,MAAM;GACN,OAAO;GACP,MAAM;GACN,aAAa;EACf;EACA;GACE,MAAM;GACN,OAAO;GACP,MAAM;GACN,aAAa;EACf;EACA;GAAE,MAAM;GAAS,OAAO;GAAU,MAAM;GAAW,aAAa;EAAyB;EACzF;GACE,MAAM;GACN,OAAO;GACP,MAAM;GACN,aAAa;EACf;EACA;GAAE,MAAM;GAAW,OAAO;GAAU,MAAM;GAAW,aAAa;EAAuC;EACzG;GACE,MAAM;GACN,OAAO;GACP,MAAM;GACN,QAAQ,CAAC,MAAM;GACf,aAAa;EACf;EACA;GACE,MAAM;GACN,OAAO;GACP,MAAM;GACN,QAAQ;GACR,SAAS;GACT,aACE;EAGJ;EACA;GACE,MAAM;GACN,OAAO;GACP,MAAM;GACN,QAAQtD;GACR,SAAA0C,EAA0B;GAC1B,aACE;EAEJ;EACA;GACE,MAAM;GACN,OAAO;GACP,MAAM;GACN,UAAU;GACV,aAAa;EACf;EACA;GACE,MAAM;GACN,UAAU,CAAC,QAAQ;GACnB,OAAO;GACP,MAAM;GACN,aACE;EACJ;EACA;GACE,MAAM;GACN,OAAO;GACP,MAAM;GACN,UAAU,CAAC,SAAS;GACpB,aACE;EACJ;EACA;GACE,M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zDiC,KAAoB,eAWpBK,KAAqB,kFAGrBI,KAAc,SAGdhC,KAAiB,uBAGjBiC,KAAc,WAGd5B,KAAAhF,EAAqD,OAGrD0E,IAAY,YAGZgB,KAA6B;CAAE,WAAW;CAAoB,UAAU;AAA0B,GAGlGD,IAAyB;CAAE,WAAW;CAAiB,UAAU;AAAuB,GAGxFb,KAAS,UAGT4D,KAAW,YAMXnC,KAAmD;CACvD,YAAY;CACZ,cAAc;CACd,aAAa;CACb,eAAe;CACf,iBAAiB;CACjB,gBAAgB;CAChB,eAAe;CACf,gBAAgB;CAChB,YAAY;CACZ,eAAe;CACf,aAAa;CACb,gBAAgB;AAClB,GASMG,KAAsD;CAC1D,cAAc;CACd,iBAAiB;AACnB,GAGMT,KAAoB;;AC3wB1BkD,GAAQ,OAAO"}
|
|
@@ -433,6 +433,7 @@ var we = class PropertyEditorPages {
|
|
|
433
433
|
"../components/ui-device/ui-device.editor.html": () => import("./ui-device.editor-kl48NVma.js").then((e) => e.default),
|
|
434
434
|
"../components/ui-diagram/ui-diagram-node.editor.html": () => import("./ui-diagram-node.editor-6FyjT7oj.js").then((e) => e.default),
|
|
435
435
|
"../components/ui-diagram/ui-diagram.editor.html": () => import("./ui-diagram.editor-Dn3ef-J9.js").then((e) => e.default),
|
|
436
|
+
"../components/ui-dial/ui-dial.editor.html": () => import("./ui-dial.editor-CjjdKi5L.js").then((e) => e.default),
|
|
436
437
|
"../components/ui-dimension/ui-dimension.editor.html": () => import("./ui-dimension.editor-BEXGKcCB.js").then((e) => e.default),
|
|
437
438
|
"../components/ui-dimmer/ui-dimmer.editor.html": () => import("./ui-dimmer.editor-D14xzXIe.js").then((e) => e.default),
|
|
438
439
|
"../components/ui-divider/ui-divider.editor.html": () => import("./ui-divider.editor-D6ozEXjx.js").then((e) => e.default),
|
|
@@ -458,7 +459,7 @@ var we = class PropertyEditorPages {
|
|
|
458
459
|
"../components/ui-image/ui-image.editor.html": () => import("./ui-image.editor-D4ZUC_Ka.js").then((e) => e.default),
|
|
459
460
|
"../components/ui-image/ui-images.editor.html": () => import("./ui-images.editor-Cb0D3vnI.js").then((e) => e.default),
|
|
460
461
|
"../components/ui-include/ui-include.editor.html": () => import("./ui-include.editor-CZcsVJbH.js").then((e) => e.default),
|
|
461
|
-
"../components/ui-input/ui-input.editor.html": () => import("./ui-input.editor-
|
|
462
|
+
"../components/ui-input/ui-input.editor.html": () => import("./ui-input.editor-D11iRgXR.js").then((e) => e.default),
|
|
462
463
|
"../components/ui-input/ui-textarea.editor.html": () => import("./ui-textarea.editor-C25lVwrF.js").then((e) => e.default),
|
|
463
464
|
"../components/ui-item/ui-item.editor.html": () => import("./ui-item.editor-BlWp1HXu.js").then((e) => e.default),
|
|
464
465
|
"../components/ui-items/ui-items.editor.html": () => import("./ui-items.editor-GOul3Xss.js").then((e) => e.default),
|
|
@@ -475,7 +476,7 @@ var we = class PropertyEditorPages {
|
|
|
475
476
|
"../components/ui-modal/ui-modal.editor.html": () => import("./ui-modal.editor-B6gmmGsR.js").then((e) => e.default),
|
|
476
477
|
"../components/ui-nag/ui-nag.editor.html": () => import("./ui-nag.editor-BJ3Ia2Bi.js").then((e) => e.default),
|
|
477
478
|
"../components/ui-page/ui-page.editor.html": () => import("./ui-page.editor-Bd5mzlj7.js").then((e) => e.default),
|
|
478
|
-
"../components/ui-page-layout/ui-page-layout.editor.html": () => import("./ui-page-layout.editor-
|
|
479
|
+
"../components/ui-page-layout/ui-page-layout.editor.html": () => import("./ui-page-layout.editor-IgDEveUY.js").then((e) => e.default),
|
|
479
480
|
"../components/ui-panel/ui-panel.editor.html": () => import("./ui-panel.editor-BCUkdr4S.js").then((e) => e.default),
|
|
480
481
|
"../components/ui-parts/ui-actions.editor.html": () => import("./ui-actions.editor-Buc3N2ik.js").then((e) => e.default),
|
|
481
482
|
"../components/ui-parts/ui-author.editor.html": () => import("./ui-author.editor-Bmf-rEXY.js").then((e) => e.default),
|
|
@@ -518,9 +519,10 @@ var we = class PropertyEditorPages {
|
|
|
518
519
|
"../components/ui-sidebar/ui-sidebar.editor.html": () => import("./ui-sidebar.editor-DWFPQcXv.js").then((e) => e.default),
|
|
519
520
|
"../components/ui-sides/ui-sides.editor.html": () => import("./ui-sides.editor-CONIJ1r3.js").then((e) => e.default),
|
|
520
521
|
"../components/ui-site-breadcrumbs/ui-site-breadcrumbs.editor.html": () => import("./ui-site-breadcrumbs.editor-Dmc4qziE.js").then((e) => e.default),
|
|
522
|
+
"../components/ui-site-links/ui-site-links.editor.html": () => import("./ui-site-links.editor-BME3sw5H.js").then((e) => e.default),
|
|
521
523
|
"../components/ui-site-nav/ui-site-nav.editor.html": () => import("./ui-site-nav.editor-CKEsOGCX.js").then((e) => e.default),
|
|
522
|
-
"../components/ui-site-nav-button/ui-site-nav-button.editor.html": () => import("./ui-site-nav-button.editor-
|
|
523
|
-
"../components/ui-site-tabs/ui-site-tabs.editor.html": () => import("./ui-site-tabs.editor-
|
|
524
|
+
"../components/ui-site-nav-button/ui-site-nav-button.editor.html": () => import("./ui-site-nav-button.editor-ChY4xe1U.js").then((e) => e.default),
|
|
525
|
+
"../components/ui-site-tabs/ui-site-tabs.editor.html": () => import("./ui-site-tabs.editor-CdMIw4jw.js").then((e) => e.default),
|
|
524
526
|
"../components/ui-slider/ui-slider.editor.html": () => import("./ui-slider.editor-BEaasx5Q.js").then((e) => e.default),
|
|
525
527
|
"../components/ui-space/ui-space.editor.html": () => import("./ui-space.editor-s-XVWFBN.js").then((e) => e.default),
|
|
526
528
|
"../components/ui-split-panel/ui-split-panel.editor.html": () => import("./ui-split-panel.editor-Cvy5W7nk.js").then((e) => e.default),
|
|
@@ -550,6 +552,7 @@ var we = class PropertyEditorPages {
|
|
|
550
552
|
"../components/ui-tree/ui-tree.editor.html": () => import("./ui-tree.editor-Bqsa0dYQ.js").then((e) => e.default),
|
|
551
553
|
"../components/ui-tree-diagram/ui-tree-diagram.editor.html": () => import("./ui-tree-diagram.editor-DkEK8i7J.js").then((e) => e.default),
|
|
552
554
|
"../components/ui-tree-diagram/ui-tree-node.editor.html": () => import("./ui-tree-node.editor-CB1z_w9F.js").then((e) => e.default),
|
|
555
|
+
"../components/ui-uploader/ui-uploader.editor.html": () => import("./ui-uploader.editor-DrE80KjL.js").then((e) => e.default),
|
|
553
556
|
"../components/ui-video/ui-audio.editor.html": () => import("./ui-audio.editor-Y6WeqLRh.js").then((e) => e.default),
|
|
554
557
|
"../components/ui-video/ui-video.editor.html": () => import("./ui-video.editor-CuWtFVjR.js").then((e) => e.default),
|
|
555
558
|
"../components/ui-visibility/ui-visibility.editor.html": () => import("./ui-visibility.editor-Crx0DTlv.js").then((e) => e.default),
|