@astryx-vue/core 0.16.5 → 0.18.0

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.
Files changed (165) hide show
  1. package/dist/AppShell/index.d.ts +1 -1
  2. package/dist/AvatarGroup/index.d.ts +1 -1
  3. package/dist/Banner/index.d.ts +1 -1
  4. package/dist/BottomSheet/index.d.ts +1 -1
  5. package/dist/Button/index.d.ts +1 -1
  6. package/dist/ButtonGroup/index.d.ts +1 -1
  7. package/dist/Calendar/index.d.ts +1 -1
  8. package/dist/Carousel/index.d.ts +1 -1
  9. package/dist/Chat/index.d.ts +1 -1
  10. package/dist/Chat/index.js +1 -1
  11. package/dist/CheckboxInput/index.d.ts +1 -1
  12. package/dist/CheckboxList/index.d.ts +1 -1
  13. package/dist/ClickableCard/index.d.ts +1 -1
  14. package/dist/Code/index.d.ts +1 -1
  15. package/dist/Code/index.js +1 -1
  16. package/dist/Collapsible/index.d.ts +1 -1
  17. package/dist/Collapsible/index.js +1 -1
  18. package/dist/{Collapsible-Dk9BQQbT.js → Collapsible-ExzU7vC0.js} +104 -40
  19. package/dist/CommandPalette/index.d.ts +1 -1
  20. package/dist/CommandPalette/index.js +1 -1
  21. package/dist/{CommandPalette-mNR6dV0B.js → CommandPalette-CECjNvGB.js} +1 -1
  22. package/dist/ComplexSelector/index.js +1 -1
  23. package/dist/{ComplexSelector-CR9XbpTa.js → ComplexSelector-Dmaag1wm.js} +5 -1
  24. package/dist/ContextMenu/index.d.ts +1 -1
  25. package/dist/DateInput/index.d.ts +1 -1
  26. package/dist/DateInput/index.js +1 -1
  27. package/dist/DateRangeInput/index.d.ts +1 -1
  28. package/dist/DateRangeInput/index.js +1 -1
  29. package/dist/DateTimeInput/index.d.ts +1 -1
  30. package/dist/DateTimeInput/index.js +1 -1
  31. package/dist/{DateTimeInput-ChGin5zS.js → DateTimeInput-Cfkuec_h.js} +1 -1
  32. package/dist/Dialog/index.d.ts +1 -1
  33. package/dist/Divider/index.d.ts +1 -1
  34. package/dist/Drawer/index.d.ts +1 -1
  35. package/dist/Field/index.d.ts +1 -1
  36. package/dist/FileInput/index.d.ts +1 -1
  37. package/dist/HoverCard/index.d.ts +1 -1
  38. package/dist/Indicator/index.d.ts +2 -2
  39. package/dist/InfoTip/index.d.ts +1 -1
  40. package/dist/InputGroup/index.d.ts +1 -1
  41. package/dist/InternationalizationProvider/index.d.ts +1 -1
  42. package/dist/InternationalizationProvider/index.js +1 -1
  43. package/dist/{InternationalizationProvider-7rA65NO7.js → InternationalizationProvider-Dr5GE6f0.js} +1 -1
  44. package/dist/Link/index.d.ts +1 -1
  45. package/dist/List/index.d.ts +1 -1
  46. package/dist/Markdown/index.js +1 -1
  47. package/dist/{Markdown-BNVd70jg.js → Markdown-DnnWjJGX.js} +1 -1
  48. package/dist/{MediaTheme-Bkj-_DFN.js → MediaTheme-DfcdEWx-.js} +2 -36
  49. package/dist/MoreMenu/index.d.ts +1 -1
  50. package/dist/MultiSelector/index.d.ts +1 -1
  51. package/dist/MultiSelector/index.js +1 -1
  52. package/dist/{MultiSelector-CXX1Hsty.js → MultiSelector-BK6nZweN.js} +26 -14
  53. package/dist/NavItem/index.d.ts +1 -1
  54. package/dist/NumberInput/index.d.ts +1 -1
  55. package/dist/OverflowList/index.d.ts +1 -1
  56. package/dist/Pagination/index.d.ts +1 -1
  57. package/dist/Pagination/index.js +1 -1
  58. package/dist/{Pagination-BvZFvwso.js → Pagination-DFQNX_Mb.js} +1 -1
  59. package/dist/Popover/index.d.ts +1 -1
  60. package/dist/PowerSearch/index.d.ts +1 -1
  61. package/dist/PowerSearch/index.js +1 -1
  62. package/dist/{PowerSearch-BiupstfT.js → PowerSearch-BAOqpQag.js} +10 -10
  63. package/dist/ProgressBar/index.d.ts +1 -1
  64. package/dist/Radio/index.d.ts +1 -1
  65. package/dist/RadioList/index.d.ts +1 -1
  66. package/dist/ScrollableArea/index.d.ts +1 -1
  67. package/dist/SegmentedControl/index.d.ts +1 -1
  68. package/dist/SelectableCard/index.d.ts +1 -1
  69. package/dist/Selector/index.d.ts +1 -1
  70. package/dist/Selector/index.js +1 -1
  71. package/dist/{Selector-DiSLNzl8.js → Selector-Bo7qkt1P.js} +157 -62
  72. package/dist/SideNav/index.d.ts +1 -1
  73. package/dist/Stepper/index.d.ts +1 -1
  74. package/dist/Switch/index.d.ts +1 -1
  75. package/dist/Table/index.d.ts +1 -1
  76. package/dist/Table/index.js +1 -1
  77. package/dist/{Table-BD8MugZo.js → Table-iemur_3E.js} +378 -7
  78. package/dist/TextArea/index.d.ts +1 -1
  79. package/dist/TextInput/index.d.ts +1 -1
  80. package/dist/Theme/index.d.ts +3 -3
  81. package/dist/Theme/index.js +3 -2
  82. package/dist/{Theme-8bDq2nud.js → Theme-1RJVaRgz.js} +329 -40
  83. package/dist/TimeInput/index.d.ts +1 -1
  84. package/dist/Timer/index.d.ts +1 -1
  85. package/dist/Timestamp/index.d.ts +1 -1
  86. package/dist/Toast/index.js +1 -1
  87. package/dist/{Toast-CzbqvHDN.js → Toast-D4Q6wvYu.js} +1 -1
  88. package/dist/ToggleButton/index.d.ts +1 -1
  89. package/dist/Tokenizer/index.d.ts +1 -1
  90. package/dist/Tokenizer/index.js +1 -1
  91. package/dist/{Tokenizer-mu0Sak58.js → Tokenizer-CsFiYUJ_.js} +171 -103
  92. package/dist/Toolbar/index.d.ts +1 -1
  93. package/dist/Tooltip/index.d.ts +1 -1
  94. package/dist/TopNav/index.d.ts +1 -1
  95. package/dist/TreeList/index.d.ts +1 -1
  96. package/dist/TreeList/index.js +1 -1
  97. package/dist/{TreeList-CNj4KnHH.js → TreeList-ugSF9DWj.js} +117 -2
  98. package/dist/Typeahead/index.d.ts +2 -1
  99. package/dist/Typeahead/index.js +2 -2
  100. package/dist/{Typeahead-Db8Tu27Z.js → Typeahead--kEp21ut.js} +159 -71
  101. package/dist/{useKeyboardHighlight-CGCf1O57.js → assertOptions-CK_gJ0d3.js} +12 -1
  102. package/dist/composables/index.d.ts +4 -3
  103. package/dist/composables/index.js +5 -5
  104. package/dist/composables-BgfubKnk.js +5437 -0
  105. package/dist/handle-BPXdHbkr.js +458 -0
  106. package/dist/{index-sXu15K4j.d.ts → index-B-3EGjfQ.d.ts} +2 -2
  107. package/dist/{index-TXcNH86P.d.ts → index-B1eCxBCY.d.ts} +1 -1
  108. package/dist/{index-9eluGe3a.d.ts → index-BBTU-TKb.d.ts} +1 -1
  109. package/dist/{index-CE74Qsbn.d.ts → index-BKpnfdq1.d.ts} +9 -9
  110. package/dist/{index-D_xBhUV5.d.ts → index-B_PKY-Wn.d.ts} +11 -11
  111. package/dist/{index-Bfm6mF-r.d.ts → index-BfoazhEu.d.ts} +1 -1
  112. package/dist/{index-BWzEt0gT.d.ts → index-BhxqUt3y.d.ts} +1 -1
  113. package/dist/{index-CJdOt5Cc.d.ts → index-BtqvPjAf.d.ts} +3 -3
  114. package/dist/{index-ChqMaV6N.d.ts → index-Bzi3A980.d.ts} +1 -1
  115. package/dist/{index-DBwEz4M9.d.ts → index-BzmcDJau.d.ts} +11 -11
  116. package/dist/{index-CQ1bsxLC.d.ts → index-C1qJlC65.d.ts} +1 -1
  117. package/dist/{index-CMLnSg3T.d.ts → index-C4S65SAW.d.ts} +8 -1
  118. package/dist/{index-D05JGsT3.d.ts → index-C8wfe0Mr.d.ts} +1 -1
  119. package/dist/{index-gmY3A_Iw.d.ts → index-C93nwgTW.d.ts} +1 -1
  120. package/dist/{index-BvWBeoa8.d.ts → index-CEjvYAUZ.d.ts} +1 -1
  121. package/dist/{index-B0R5CLPF.d.ts → index-CsYDrQ9R.d.ts} +1 -1
  122. package/dist/{index-C2cH8OLC.d.ts → index-D31bgBoy.d.ts} +1 -1
  123. package/dist/{index-BxWCX2pJ.d.ts → index-DFLPv9io.d.ts} +3 -3
  124. package/dist/index-DGXCnzOL.d.ts +69 -0
  125. package/dist/{index-BPf_jmME.d.ts → index-DMcf0QeR.d.ts} +3 -3
  126. package/dist/{index-SWw-WMTO.d.ts → index-DPhQZXYw.d.ts} +3 -3
  127. package/dist/{index-B-Jla56c.d.ts → index-DmAEpn5E.d.ts} +1 -1
  128. package/dist/{index-B0yaHi__.d.ts → index-DtZUOyCy.d.ts} +12 -5
  129. package/dist/{index-BQ3cm7mP.d.ts → index-FeZXsFO-.d.ts} +1 -1
  130. package/dist/{index-Byan7Dad.d.ts → index-GmoeIuhl.d.ts} +1 -1
  131. package/dist/{index-ygmRS6Np.d.ts → index-KcCNhdAw.d.ts} +1 -1
  132. package/dist/{index-BPHqOCfp.d.ts → index-PffxihMx.d.ts} +4 -4
  133. package/dist/{index-unAZVFGz.d.ts → index-Qdbssopn.d.ts} +2 -2
  134. package/dist/{index-LHvLg1Pv.d.ts → index-Y4H4X6Vy.d.ts} +88 -82
  135. package/dist/{index-Xc3q9f84.d.ts → index-YKCx03zD.d.ts} +2 -2
  136. package/dist/{index-BXDqyk2_.d.ts → index-gu5EvbE0.d.ts} +170 -2
  137. package/dist/{index-BFZxzCYu.d.ts → index-o00Upzjp.d.ts} +3 -3
  138. package/dist/{index-BEZ4ezJk.d.ts → index-ql9ApSTF.d.ts} +7 -0
  139. package/dist/index.d.ts +39 -37
  140. package/dist/index.js +31 -30
  141. package/dist/landing-Bs0aMIsR.js +2049 -0
  142. package/dist/{loadCatalog-DFyDz_4e.d.ts → loadCatalog-BJwcyX8i.d.ts} +2 -0
  143. package/dist/{loadCatalog-C3MSknfx.js → loadCatalog-C1kms5sO.js} +5 -1
  144. package/dist/locale/index.d.ts +2 -2
  145. package/dist/locale/index.js +3 -3
  146. package/dist/{locale-OCGw4bi6.js → locale-CHhsd9Mq.js} +1 -1
  147. package/dist/motionTokenDefaults-EFzpiAF5.js +38 -0
  148. package/dist/tokenName-0U-WEH09.js +36 -0
  149. package/dist/{typeahead-RkZw0Ktn.js → typeahead-BgfLP7vR.js} +2 -0
  150. package/dist/{index-DbFIQDoa.d.ts → types-C1ydeFiu.d.ts} +43 -65
  151. package/dist/{types-uWxXh1Jm.d.ts → types-fRasDCe4.d.ts} +47 -6
  152. package/dist/useAnimatedLayout-C0koWm4a.d.ts +56 -0
  153. package/dist/{useAsyncSource-Gk0VtE7_.js → useAsyncSource-7GTcK8ep.js} +31 -1
  154. package/dist/{useAsyncSource-aGzrvRkI.d.ts → useAsyncSource-DbG2FSuI.d.ts} +19 -2
  155. package/dist/{useCombobox-D374_pT8.js → useCombobox-DIR9yoEu.js} +150 -3
  156. package/dist/{useTypeaheadAnnouncement-CSikDlpK.js → useTypeaheadMenuConfig--4f7jR6G.js} +264 -20
  157. package/package.json +1 -1
  158. package/styles/motion.css +10 -0
  159. package/styles/selector.css +10 -0
  160. package/styles/table.css +19 -0
  161. package/dist/composables-CCsHfpCS.js +0 -1256
  162. package/dist/{Chat-PEkZTrQE.js → Chat-Wq7e98zS.js} +1 -1
  163. package/dist/{CodeBlock-9Lfec8C8.js → CodeBlock-CLVXVlB7.js} +1 -1
  164. package/dist/{DateInput-kXAc_r5m.js → DateInput-BitZfGEY.js} +1 -1
  165. package/dist/{DateRangeInput-DW7IzFQM.js → DateRangeInput-kxXBsUTU.js} +1 -1
@@ -1,9 +1,11 @@
1
1
  import { c as themeNestingKey, n as resolveIconEntryVariants, o as mediaThemeKey, s as themeContextKey, t as readThemeIconIds } from "./themeIcons-CqGF0fwW.js";
2
+ import { n as easeDefaults, t as durationDefaults } from "./motionTokenDefaults-EFzpiAF5.js";
3
+ import { n as normalizeTokenName, r as prefixTokenReferences, t as isPortableTokenName } from "./tokenName-0U-WEH09.js";
2
4
  import { n as observeResize } from "./sharedResizeObserver-BekhnB3E.js";
3
5
  import { r as staticComponentIcons, t as mergeComponentIcons } from "./componentIcons-CFr2L6o3.js";
4
6
  import { a as syntaxThemeStyle } from "./syntaxTheme-R7xnu5x5.js";
5
7
  import { t as syntaxThemeKey } from "./syntaxContext-DmIfNNtb.js";
6
- import { a as normalizeTokenName, c as contrastRatio, i as isPortableTokenName, l as parseColor, o as prefixTokenReferences, r as bridgeComponentTokens, s as compositeOver, u as relativeLuminance } from "./MediaTheme-Bkj-_DFN.js";
8
+ import { a as contrastRatio, i as compositeOver, o as parseColor, r as bridgeComponentTokens, s as relativeLuminance } from "./MediaTheme-DfcdEWx-.js";
7
9
  import { computed, createBlock, createCommentVNode, createElementBlock, defineComponent, h, inject, markRaw, normalizeClass, normalizeStyle, onBeforeUnmount, onMounted, openBlock, provide, renderSlot, unref, useAttrs, useTemplateRef, watch } from "vue";
8
10
  import "../styles/theme.css";
9
11
  //#region src/Theme/adaptationTypes.ts
@@ -523,6 +525,27 @@ function expandColorScale(config = {}) {
523
525
  };
524
526
  }
525
527
  //#endregion
528
+ //#region src/Theme/expandRadiusScale.ts
529
+ function assertRadius(config) {
530
+ if (!Number.isFinite(config.base) || config.base < 0) throw new Error("Theme radius base must be a non-negative number of pixels.");
531
+ if (!Number.isFinite(config.multiplier) || config.multiplier < 0) throw new Error("Theme radius multiplier must be a non-negative number.");
532
+ }
533
+ /** `--radius-*` tokens. Names are unprefixed; `defineTheme()` adds `--astryx-`. */
534
+ function expandRadiusScale(config) {
535
+ assertRadius(config);
536
+ const { base, multiplier } = config;
537
+ const step = (factor) => `${Math.round(base * factor * multiplier)}px`;
538
+ return {
539
+ "--radius-none": "0px",
540
+ "--radius-inner": step(1),
541
+ "--radius-element": step(2),
542
+ "--radius-container": step(3),
543
+ "--radius-page": step(7),
544
+ "--radius-chat": step(7),
545
+ "--radius-full": "9999px"
546
+ };
547
+ }
548
+ //#endregion
526
549
  //#region src/Theme/expandMotionScale.ts
527
550
  function assertMotion(config) {
528
551
  for (const [label, value] of [
@@ -560,26 +583,207 @@ function expandMotionScale(config) {
560
583
  return tokens;
561
584
  }
562
585
  //#endregion
563
- //#region src/Theme/expandRadiusScale.ts
564
- function assertRadius(config) {
565
- if (!Number.isFinite(config.base) || config.base < 0) throw new Error("Theme radius base must be a non-negative number of pixels.");
566
- if (!Number.isFinite(config.multiplier) || config.multiplier < 0) throw new Error("Theme radius multiplier must be a non-negative number.");
586
+ //#region src/Theme/motionKnobs.ts
587
+ /** The range `tempo` is clamped to. */
588
+ const TEMPO_RANGE = {
589
+ min: .75,
590
+ max: 1.5
591
+ };
592
+ const CHARACTERS = [
593
+ "crisp",
594
+ "standard",
595
+ "expressive"
596
+ ];
597
+ /** The knobs of `config`, defaults filled in, `tempo` clamped. */
598
+ function resolveKnobs(config) {
599
+ const given = config?.tempo;
600
+ const tempoIsSet = typeof given === "number" && Number.isFinite(given);
601
+ return {
602
+ tempo: tempoIsSet ? Math.min(TEMPO_RANGE.max, Math.max(TEMPO_RANGE.min, given)) : 1,
603
+ character: config?.character != null && CHARACTERS.includes(config.character) ? config.character : "standard",
604
+ reducedMotion: "system",
605
+ tempoIsSet
606
+ };
567
607
  }
568
- /** `--radius-*` tokens. Names are unprefixed; `defineTheme()` adds `--astryx-`. */
569
- function expandRadiusScale(config) {
570
- assertRadius(config);
571
- const { base, multiplier } = config;
572
- const step = (factor) => `${Math.round(base * factor * multiplier)}px`;
608
+ //#endregion
609
+ //#region src/Theme/themeMotion.ts
610
+ /**
611
+ * The entrance and move curve at each character. `'standard'` is the theme's
612
+ * `--ease-standard`, so a theme that overrides that easing keeps its entrances
613
+ * on it.
614
+ */
615
+ const CHARACTER_EASE = {
616
+ crisp: "cubic-bezier(0, 0, 0.2, 1)",
617
+ standard: null,
618
+ expressive: "cubic-bezier(0.3, 1.2, 0.5, 1)"
619
+ };
620
+ /** The knobs of `config`, defaults filled in, `tempo` clamped. */
621
+ function resolveMotionKnobs(config) {
622
+ return resolveKnobs(config);
623
+ }
624
+ function isScaleConfig(config) {
625
+ return "fast" in config && "medium" in config && "ratio" in config;
626
+ }
627
+ /**
628
+ * The private custom property a theme with a `tempo` writes beside its
629
+ * duration tokens. A layer whose durations come from a duration scale alone
630
+ * writes 1. The animator's springs read it (motion/themeTempo.ts), and so can
631
+ * a style that scales a clock of its own.
632
+ */
633
+ const MOTION_TEMPO_PROPERTY = "--_astryx-motion-tempo";
634
+ /**
635
+ * A reference such as `--duration-exit` follows the token it names, so tempo
636
+ * writes no value for it.
637
+ */
638
+ const TIMED_DURATION_DEFAULTS = Object.entries(durationDefaults).filter(([, value]) => !value.startsWith("var("));
639
+ /** The duration tokens at `tempo`: the declared values times it, to the ms. */
640
+ function durationTokensAt(tempo) {
641
+ const tokens = {};
642
+ for (const [name, value] of TIMED_DURATION_DEFAULTS) tokens[name] = `${Math.round(Number.parseFloat(value) * tempo)}ms`;
643
+ return tokens;
644
+ }
645
+ /**
646
+ * The private custom property holding a duration token's value before
647
+ * `tempo` scaled it (`--duration-slow` → `--_astryx-pre-tempo-duration-slow`).
648
+ * Busy loops read it, falling back to the token, so their timing follows a
649
+ * duration scale or an explicit token but never `tempo`. A name that is not a
650
+ * duration token comes back unchanged.
651
+ */
652
+ function preTempoName(token) {
653
+ return token.replace(/^--(?:astryx-)?duration-/, "--_astryx-pre-tempo-duration-");
654
+ }
655
+ /**
656
+ * The motion tokens `config` generates: `--duration-*` times `tempo`, with a
657
+ * `MotionScaleConfig`'s own durations winning, and the job-named
658
+ * `--ease-entrance` and `--ease-move` at the theme's character. A knob the
659
+ * config leaves out writes nothing, so a theme extending another keeps the
660
+ * base's value for it; a knob it sets is written even at its default, so a
661
+ * child can set a base's tempo back to 1.
662
+ */
663
+ function expandThemeMotion(config) {
664
+ const knobs = resolveMotionKnobs(config);
665
+ const tokens = {};
666
+ if (knobs.tempoIsSet) {
667
+ Object.assign(tokens, durationTokensAt(knobs.tempo));
668
+ for (const [name, value] of TIMED_DURATION_DEFAULTS) tokens[preTempoName(name)] = value;
669
+ tokens[MOTION_TEMPO_PROPERTY] = String(knobs.tempo);
670
+ }
671
+ const scaleEasing = isScaleConfig(config) && config.easing != null ? config.easing : null;
672
+ if (isScaleConfig(config)) {
673
+ const scale = expandMotionScale(config);
674
+ Object.assign(tokens, scale);
675
+ if (knobs.tempoIsSet) {
676
+ for (const [name, value] of Object.entries(scale)) if (name.startsWith("--duration-")) tokens[preTempoName(name)] = value;
677
+ }
678
+ }
679
+ const ease = CHARACTER_EASE[knobs.character] ?? (config.character != null ? scaleEasing ?? easeDefaults["--ease-standard"] : scaleEasing);
680
+ if (ease != null) {
681
+ tokens["--ease-entrance"] = ease;
682
+ tokens["--ease-move"] = ease;
683
+ }
684
+ return tokens;
685
+ }
686
+ //#endregion
687
+ //#region src/Theme/motionLayerTokens.ts
688
+ function assertFinite(value, path) {
689
+ if (!Number.isFinite(value)) throw new Error(`${path} must be a finite number.`);
690
+ }
691
+ /**
692
+ * An adaptation rule's motion, completed from the theme's: the knobs it
693
+ * leaves out are the theme's, and a rule that writes a duration scale, or
694
+ * whose theme has one, completes `fast`, `medium` and `ratio` from it. A
695
+ * rule with knobs only, over a theme with no scale, keeps knobs only.
696
+ */
697
+ function completeMotion(root, rule, path) {
698
+ if (rule.reducedMotion !== void 0) throw new Error(`${path}.reducedMotion is a theme-wide setting: set it on the theme's own motion, not in an adaptation rule.`);
699
+ const tempo = rule.tempo ?? root?.tempo;
700
+ const character = rule.character ?? root?.character;
701
+ const knobs = {
702
+ ...tempo !== void 0 ? { tempo } : {},
703
+ ...character !== void 0 ? { character } : {}
704
+ };
705
+ if (knobs.tempo !== void 0) assertFinite(knobs.tempo, `${path}.tempo`);
706
+ const rootScale = root != null && "fast" in root ? root : {};
707
+ if (!(rule.fast !== void 0 || rule.medium !== void 0 || rule.ratio !== void 0 || rule.slow !== void 0 || rule.easing !== void 0) && rootScale.fast === void 0) return knobs;
708
+ const fast = rule.fast ?? rootScale.fast;
709
+ const medium = rule.medium ?? rootScale.medium;
710
+ const ratio = rule.ratio ?? rootScale.ratio;
711
+ if (fast === void 0 || medium === void 0 || ratio === void 0) throw new Error(`${path} must supply \`fast\`, \`medium\`, and \`ratio\` unless each missing field exists on the root theme's motion.`);
712
+ assertFinite(fast, `${path}.fast`);
713
+ assertFinite(medium, `${path}.medium`);
714
+ assertFinite(ratio, `${path}.ratio`);
715
+ const slow = rule.slow ?? rootScale.slow;
716
+ if (slow !== void 0) assertFinite(slow, `${path}.slow`);
717
+ const easing = rule.easing ?? rootScale.easing;
573
718
  return {
574
- "--radius-none": "0px",
575
- "--radius-inner": step(1),
576
- "--radius-element": step(2),
577
- "--radius-container": step(3),
578
- "--radius-page": step(7),
579
- "--radius-chat": step(7),
580
- "--radius-full": "9999px"
719
+ fast,
720
+ medium,
721
+ ratio,
722
+ ...slow !== void 0 ? { slow } : {},
723
+ ...easing !== void 0 ? { easing } : {},
724
+ ...knobs
725
+ };
726
+ }
727
+ const isPrivate = (name) => name.startsWith("--_");
728
+ /**
729
+ * The motion tokens one layer generates. Shared names are unprefixed
730
+ * (`--duration-fast`), for the token map to prefix; private properties
731
+ * (`--_astryx-*`) are written as named. A layer that writes durations also
732
+ * writes the pre-tempo copies busy loops read, so an enclosing theme's tempo
733
+ * copies never stand in for its own: without a tempo of its own, they are its
734
+ * durations. Such a layer also writes a tempo of 1, so its springs keep the
735
+ * pace of its durations inside a theme with a tempo.
736
+ */
737
+ function motionLayerTokens(config) {
738
+ const shared = {};
739
+ const own = {};
740
+ if (config == null) return {
741
+ shared,
742
+ private: own
743
+ };
744
+ const motion = expandThemeMotion(config);
745
+ let writesDurations = false;
746
+ for (const [name, value] of Object.entries(motion)) {
747
+ if (isPrivate(name)) {
748
+ own[name] = value;
749
+ continue;
750
+ }
751
+ shared[name] = value;
752
+ const preTempo = preTempoName(name);
753
+ if (preTempo !== name) {
754
+ writesDurations = true;
755
+ if (!(preTempo in motion)) own[preTempo] = value;
756
+ }
757
+ }
758
+ if (writesDurations && !("--_astryx-motion-tempo" in motion)) own[MOTION_TEMPO_PROPERTY] = "1";
759
+ return {
760
+ shared,
761
+ private: own
581
762
  };
582
763
  }
764
+ /**
765
+ * The motion writes that follow a layer's explicit tokens, made on `tokens`
766
+ * (the layer's prefixed token map). An explicit duration beats tempo, so a
767
+ * busy loop reading the pre-tempo value reads it too. At `'standard'`,
768
+ * `--ease-entrance` and `--ease-move` equal the resolved `--ease-standard`:
769
+ * the layer's own, else the one beneath it. A layer that sets them itself, or
770
+ * whose character, its own or the one it inherits, picks its own curve,
771
+ * keeps them.
772
+ */
773
+ function settleMotionTokens(tokens, input, context = {}) {
774
+ const explicit = new Set(Object.keys(input.tokens ?? {}).filter((name) => input.tokens?.[name] != null).map(normalizeTokenName));
775
+ for (const name of explicit) {
776
+ const preTempo = preTempoName(name);
777
+ if (preTempo !== name && tokens[name] !== void 0) tokens[preTempo] = tokens[name];
778
+ }
779
+ const ownCharacter = input.motion != null && "character" in input.motion ? input.motion.character : void 0;
780
+ const character = ownCharacter ?? context.inheritedCharacter;
781
+ const standardName = normalizeTokenName("--ease-standard");
782
+ if (ownCharacter === "standard" || explicit.has(standardName) && (character === void 0 || character === "standard")) {
783
+ const standard = tokens[standardName] ?? context.standardBeneath ?? easeDefaults["--ease-standard"];
784
+ for (const name of ["--ease-entrance", "--ease-move"].map(normalizeTokenName)) if (!explicit.has(name)) tokens[name] = standard;
785
+ }
786
+ }
583
787
  //#endregion
584
788
  //#region src/Theme/expandTypeScale.ts
585
789
  const STEP_TO_SIZE_TOKEN = {
@@ -926,20 +1130,25 @@ function mergeComponentMaps(base, next) {
926
1130
  /**
927
1131
  * Expand the generator axes, then lay explicit `tokens` over the result.
928
1132
  * Explicit tokens win token by token. Authored component styles win over
929
- * the generated type-scale rules property by property.
1133
+ * the generated type-scale rules property by property. `motion` reads what
1134
+ * lies beneath the layer from `context` (motionLayerTokens.ts).
930
1135
  */
931
- function resolveThemeValues(input, location) {
1136
+ function resolveThemeValues(input, location, context) {
932
1137
  const typography = resolveTypography(input.typography);
1138
+ const motion = motionLayerTokens(input.motion);
1139
+ const tokens = {
1140
+ ...resolveTokenMap({
1141
+ ...input.color ? expandColorScale(input.color) : {},
1142
+ ...typography.tokens,
1143
+ ...input.radius ? expandRadiusScale(input.radius) : {},
1144
+ ...motion.shared
1145
+ }, `${location}generated`),
1146
+ ...motion.private,
1147
+ ...resolveTokenMap(input.tokens, `${location}tokens`)
1148
+ };
1149
+ settleMotionTokens(tokens, input, context);
933
1150
  return {
934
- tokens: {
935
- ...resolveTokenMap({
936
- ...input.color ? expandColorScale(input.color) : {},
937
- ...typography.tokens,
938
- ...input.radius ? expandRadiusScale(input.radius) : {},
939
- ...input.motion ? expandMotionScale(input.motion) : {}
940
- }, `${location}generated`),
941
- ...resolveTokenMap(input.tokens, `${location}tokens`)
942
- },
1151
+ tokens,
943
1152
  components: mergeComponentMaps(typography.components, input.components)
944
1153
  };
945
1154
  }
@@ -1230,11 +1439,7 @@ function ruleInput(value, axes, path) {
1230
1439
  ...value.color
1231
1440
  } : void 0,
1232
1441
  radius: value.radius ? completeNumbers(axes.radius, value.radius, ["base", "multiplier"], `${path}.radius`) : void 0,
1233
- motion: value.motion ? completeNumbers(axes.motion, value.motion, [
1234
- "fast",
1235
- "medium",
1236
- "ratio"
1237
- ], `${path}.motion`) : void 0,
1442
+ motion: value.motion ? completeMotion(axes.motion, value.motion, `${path}.motion`) : void 0,
1238
1443
  tokens: value.tokens,
1239
1444
  components: value.components
1240
1445
  };
@@ -1313,7 +1518,10 @@ function resolveThemeAdaptationRules(themeName, adaptations, axes, root) {
1313
1518
  const resolved = adaptations.rules.map((rule, index) => {
1314
1519
  const path = `defineTheme("${themeName}").adaptations.rules[${index}]`;
1315
1520
  const input = ruleInput(rule.value, axes, `${path}.value`);
1316
- const values = resolveThemeValues(input, `${path}.value.`);
1521
+ const values = resolveThemeValues(input, `${path}.value.`, {
1522
+ inheritedCharacter: axes.motion?.character,
1523
+ standardBeneath: root.tokens["--astryx-ease-standard"]
1524
+ });
1317
1525
  for (const name of Object.keys(rule.value.tokens ?? {})) if (root.localTokens && Object.hasOwn(root.localTokens, name)) throw new Error(`${path}.value.tokens["${name}"] is a theme-local token; write it through value.localTokens.`);
1318
1526
  const localTokens = resolveAdaptationLocalTokens(`${path}.value.localTokens`, rule.value.localTokens, root.localTokens);
1319
1527
  return {
@@ -1645,6 +1853,56 @@ function tokenRule(selector, tokens, location) {
1645
1853
  return body ? [`${selector} {\n${body}\n}`] : [];
1646
1854
  }
1647
1855
  //#endregion
1856
+ //#region src/Theme/rootMotion.ts
1857
+ /** The slow band's duration tokens. */
1858
+ const SLOW_BAND = [
1859
+ "--duration-slow-min",
1860
+ "--duration-slow",
1861
+ "--duration-slow-max"
1862
+ ];
1863
+ /**
1864
+ * The base's tokens for the duration-scale fields a child leaves unset: a
1865
+ * child that sets no `slow` of its own regenerates only the fast and medium
1866
+ * bands, so an inherited slow band stays as the base's tokens hold it, at the
1867
+ * ratio it was made with; and a child that sets no `easing` keeps the base's
1868
+ * `--ease-standard`, an explicit one included.
1869
+ */
1870
+ function inheritedScaleTokens(base, baseMotion, own) {
1871
+ const names = [..."slow" in baseMotion && !("slow" in own) ? SLOW_BAND : [], ..."easing" in baseMotion && !("easing" in own) ? ["--ease-standard"] : []];
1872
+ const tokens = {};
1873
+ for (const name of names) {
1874
+ const value = base.tokens[normalizeTokenName(name)];
1875
+ if (value !== void 0) tokens[name] = value;
1876
+ }
1877
+ return Object.keys(tokens).length > 0 ? tokens : void 0;
1878
+ }
1879
+ /**
1880
+ * Refuses a duration scale that is missing `fast`, `medium` or `ratio` after
1881
+ * inheritance. The scale applies only when all three are present, so a partial
1882
+ * one beside a knob (`{ fast: 100, tempo: 1.2 }`) would otherwise be dropped
1883
+ * silently, though its fields win over `tempo`. Adaptation rules refuse the
1884
+ * same in `completeMotion`.
1885
+ */
1886
+ function assertCompleteMotionScale(motion, themeName) {
1887
+ const scale = motion;
1888
+ if ((scale.fast !== void 0 || scale.medium !== void 0 || scale.ratio !== void 0 || scale.slow !== void 0 || scale.easing !== void 0) && (scale.fast === void 0 || scale.medium === void 0 || scale.ratio === void 0)) throw new Error(`defineTheme("${themeName}"): \`motion\` sets a duration scale field, so it must supply \`fast\`, \`medium\`, and \`ratio\` unless each missing field is inherited from \`extends\`.`);
1889
+ }
1890
+ /** The motion a theme generates from, and the base tokens its inherited scale fields keep. */
1891
+ function resolveRootMotion(themeName, own, base) {
1892
+ if (own == null) return {};
1893
+ const baseMotion = base?.axes?.motion;
1894
+ const motion = baseMotion != null ? {
1895
+ ...baseMotion,
1896
+ ...own
1897
+ } : own;
1898
+ assertCompleteMotionScale(motion, themeName);
1899
+ const inheritedTokens = base != null && baseMotion != null ? inheritedScaleTokens(base, baseMotion, own) : void 0;
1900
+ return {
1901
+ motion,
1902
+ ...inheritedTokens ? { inheritedTokens } : {}
1903
+ };
1904
+ }
1905
+ //#endregion
1648
1906
  //#region src/Theme/statusColor.ts
1649
1907
  const WHITE$1 = {
1650
1908
  r: 255,
@@ -2617,19 +2875,36 @@ function scoped(themeName, rules) {
2617
2875
  * `Theme` that wraps one part of a page does not recolor the rest of it.
2618
2876
  */
2619
2877
  const TOKEN_SCOPE = ":scope.astryx-theme";
2878
+ const DURATION_FAST = "--astryx-duration-fast";
2879
+ const DURATION_EXIT = "--astryx-duration-exit";
2880
+ /**
2881
+ * `--astryx-duration-exit` is a reference to `--astryx-duration-fast`, and a
2882
+ * custom property's reference resolves where it is declared. A scope that
2883
+ * sets its own fast duration (a `tempo`, a duration scale, or an explicit
2884
+ * token) declares the reference again, so its dismissals follow that
2885
+ * duration. A theme that sets the exit duration itself keeps its value, in
2886
+ * its adaptation rules too.
2887
+ */
2888
+ function withExitReference(tokens, theme = tokens) {
2889
+ if (tokens[DURATION_FAST] === void 0 || tokens[DURATION_EXIT] !== void 0 || theme[DURATION_EXIT] !== void 0) return { ...tokens };
2890
+ return {
2891
+ ...tokens,
2892
+ [DURATION_EXIT]: `var(${DURATION_FAST})`
2893
+ };
2894
+ }
2620
2895
  /** Root token values: semantic tokens with their aliases, locals, syntax. */
2621
2896
  function rootTokens(source) {
2622
2897
  const tokens = {
2623
- ...bridgeComponentTokens(source.tokens),
2898
+ ...bridgeComponentTokens(withExitReference(source.tokens)),
2624
2899
  ...source.localTokens
2625
2900
  };
2626
2901
  if (source.syntax) Object.assign(tokens, syntaxThemeStyle(source.syntax));
2627
2902
  return readerTextSizeTokens(tokens);
2628
2903
  }
2629
2904
  /** Token values one adaptation rule rewrites. */
2630
- function adaptedTokens(rule) {
2905
+ function adaptedTokens(rule, source) {
2631
2906
  return readerTextSizeTokens({
2632
- ...bridgeComponentTokens(rule.tokens),
2907
+ ...bridgeComponentTokens(withExitReference(rule.tokens, source.tokens)),
2633
2908
  ...rule.localTokens
2634
2909
  });
2635
2910
  }
@@ -2645,7 +2920,7 @@ function adaptationBlocks(source) {
2645
2920
  const blocks = [];
2646
2921
  for (const [index, rule] of rules.entries()) {
2647
2922
  const location = `adaptations[${index}].`;
2648
- const inner = [...tokenRule(TOKEN_SCOPE, adaptedTokens(rule), `${location}tokens`), ...compileComponentRules(rule.components, location)];
2923
+ const inner = [...tokenRule(TOKEN_SCOPE, adaptedTokens(rule, source), `${location}tokens`), ...compileComponentRules(rule.components, location)];
2649
2924
  if (inner.length > 0) blocks.push(`@media ${rule.query} {\n${scoped(source.name, inner)}\n}`);
2650
2925
  }
2651
2926
  if (!rules.some((rule) => touchesGuardedTargets(rule.components))) return blocks;
@@ -2746,7 +3021,21 @@ function defineTheme(input) {
2746
3021
  assertTargets(input.onDark?.components);
2747
3022
  assertTargets(input.onLight?.components);
2748
3023
  const base = input.extends;
2749
- const own = resolveThemeValues(input, "");
3024
+ const { motion, inheritedTokens } = resolveRootMotion(input.name, input.motion, base);
3025
+ const own = resolveThemeValues(inheritedTokens ? {
3026
+ ...input,
3027
+ motion,
3028
+ tokens: {
3029
+ ...inheritedTokens,
3030
+ ...input.tokens
3031
+ }
3032
+ } : {
3033
+ ...input,
3034
+ motion
3035
+ }, "", {
3036
+ inheritedCharacter: base?.axes?.motion?.character,
3037
+ standardBeneath: base?.tokens["--astryx-ease-standard"]
3038
+ });
2750
3039
  const authoredTokens = {
2751
3040
  ...authoredBaseTokens(base),
2752
3041
  ...own.tokens
@@ -3051,4 +3340,4 @@ function useMediaTheme() {
3051
3340
  return { mode: inject(mediaThemeKey, null) ?? computed(() => "off") };
3052
3341
  }
3053
3342
  //#endregion
3054
- export { neutralTheme as a, expandRadiusScale as c, DEFAULT_WIDTH_BREAKPOINTS as d, WIDTH_BREAKPOINT_NAMES as f, isDefinedTheme as i, expandMotionScale as l, _sfc_main as n, STATUS_COLOR_DEFAULTS as o, defineTheme as r, expandTypeScale as s, useMediaTheme as t, expandColorScale as u };
3343
+ export { neutralTheme as a, expandMotionScale as c, DEFAULT_WIDTH_BREAKPOINTS as d, WIDTH_BREAKPOINT_NAMES as f, isDefinedTheme as i, expandRadiusScale as l, _sfc_main as n, STATUS_COLOR_DEFAULTS as o, defineTheme as r, expandTypeScale as s, useMediaTheme as t, expandColorScale as u };
@@ -1,2 +1,2 @@
1
- import { at as TimeInputSize, it as TimeInputProps, nt as _default, rt as TimeInputEmits } from "../index-LHvLg1Pv.js";
1
+ import { at as TimeInputSize, it as TimeInputProps, nt as _default, rt as TimeInputEmits } from "../index-Y4H4X6Vy.js";
2
2
  export { _default as TimeInput, type TimeInputEmits, type TimeInputProps, type TimeInputSize };
@@ -1,2 +1,2 @@
1
- import { a as TimerFormat, i as TimerType, n as TimerColor, o as TimerPresentation, r as TimerProps, s as getPresentation, t as _default } from "../index-9eluGe3a.js";
1
+ import { a as TimerFormat, i as TimerType, n as TimerColor, o as TimerPresentation, r as TimerProps, s as getPresentation, t as _default } from "../index-BBTU-TKb.js";
2
2
  export { _default as Timer, type TimerColor, type TimerFormat, type TimerPresentation, type TimerProps, type TimerType, getPresentation };
@@ -1,2 +1,2 @@
1
- import { $ as FormatInstantOptions, G as TimestampColor, J as TimestampTooltipEntry, K as TimestampFormat, Q as formatRelativeTime, W as _default, X as TimestampTooltipLine, Y as TimestampTooltipFormat, Z as formatTooltipLines, et as InstantFormat, q as TimestampProps, tt as formatInstant } from "../index-LHvLg1Pv.js";
1
+ import { $ as FormatInstantOptions, G as TimestampColor, J as TimestampTooltipEntry, K as TimestampFormat, Q as formatRelativeTime, W as _default, X as TimestampTooltipLine, Y as TimestampTooltipFormat, Z as formatTooltipLines, et as InstantFormat, q as TimestampProps, tt as formatInstant } from "../index-Y4H4X6Vy.js";
2
2
  export { type FormatInstantOptions, type InstantFormat, _default as Timestamp, type TimestampColor, type TimestampFormat, type TimestampProps, type TimestampTooltipEntry, type TimestampTooltipFormat, type TimestampTooltipLine, formatInstant, formatRelativeTime, formatTooltipLines };
@@ -1,2 +1,2 @@
1
- import { n as _sfc_main$1, r as _sfc_main, t as useToast } from "../Toast-CzbqvHDN.js";
1
+ import { n as _sfc_main$1, r as _sfc_main, t as useToast } from "../Toast-D4Q6wvYu.js";
2
2
  export { _sfc_main as Toast, _sfc_main$1 as ToastViewport, useToast };
@@ -7,7 +7,7 @@ import { t as _sfc_main$3 } from "./IconButton-Du2XBBAX.js";
7
7
  import { o as useComponentMessages } from "./context-B8IEFCDR.js";
8
8
  import { n as useActiveModalOutlet, r as whenModalSettled } from "./modalOutlet-Drr9a16b.js";
9
9
  import { t as toastMessages } from "./toast-BvAnX6Vc.js";
10
- import { n as useTheme, t as _sfc_main$4 } from "./MediaTheme-Bkj-_DFN.js";
10
+ import { n as useTheme, t as _sfc_main$4 } from "./MediaTheme-DfcdEWx-.js";
11
11
  import { Fragment, Teleport, computed, createBlock, createCommentVNode, createElementBlock, createElementVNode, createTextVNode, createVNode, defineComponent, guardReactiveProps, inject, markRaw, normalizeClass, normalizeProps, normalizeStyle, onMounted, onScopeDispose, onUnmounted, openBlock, provide, reactive, ref, renderList, renderSlot, resolveDynamicComponent, shallowRef, toDisplayString, unref, watch, withCtx } from "vue";
12
12
  import "../styles/toast.css";
13
13
  //#region src/Toast/context.ts
@@ -1,2 +1,2 @@
1
- import { A as ToggleButtonEmits, B as ToggleButtonPressedChangeHandler, D as _default, E as _default$1, F as ToggleButtonGroupProps, H as ToggleButtonSize, I as ToggleButtonGroupSingleProps, L as ToggleButtonGroupSlots, M as ToggleButtonGroupEmits, N as ToggleButtonGroupMultipleProps, O as ToggleButtonChangeAction, P as ToggleButtonGroupOrientation, R as ToggleButtonGroupType, U as ToggleButtonSlots, V as ToggleButtonProps, j as ToggleButtonGroupBaseProps, k as ToggleButtonElevation, z as ToggleButtonGroupValue } from "../index-LHvLg1Pv.js";
1
+ import { A as ToggleButtonEmits, B as ToggleButtonPressedChangeHandler, D as _default, E as _default$1, F as ToggleButtonGroupProps, H as ToggleButtonSize, I as ToggleButtonGroupSingleProps, L as ToggleButtonGroupSlots, M as ToggleButtonGroupEmits, N as ToggleButtonGroupMultipleProps, O as ToggleButtonChangeAction, P as ToggleButtonGroupOrientation, R as ToggleButtonGroupType, U as ToggleButtonSlots, V as ToggleButtonProps, j as ToggleButtonGroupBaseProps, k as ToggleButtonElevation, z as ToggleButtonGroupValue } from "../index-Y4H4X6Vy.js";
2
2
  export { _default as ToggleButton, _default as default, type ToggleButtonChangeAction, type ToggleButtonElevation, type ToggleButtonEmits, _default$1 as ToggleButtonGroup, type ToggleButtonGroupBaseProps, type ToggleButtonGroupEmits, type ToggleButtonGroupMultipleProps, type ToggleButtonGroupOrientation, type ToggleButtonGroupProps, type ToggleButtonGroupSingleProps, type ToggleButtonGroupSlots, type ToggleButtonGroupType, type ToggleButtonGroupValue, type ToggleButtonPressedChangeHandler, type ToggleButtonProps, type ToggleButtonSize, type ToggleButtonSlots };
@@ -1,2 +1,2 @@
1
- import { a as TokenizerProps, c as TokenizerStatus, i as TokenizerOverflow, n as TokenizerChange, o as TokenizerSize, r as TokenizerEmits, s as TokenizerSlots, t as _default } from "../index-B0yaHi__.js";
1
+ import { a as TokenizerProps, c as TokenizerStatus, i as TokenizerOverflow, n as TokenizerChange, o as TokenizerSize, r as TokenizerEmits, s as TokenizerSlots, t as _default } from "../index-DtZUOyCy.js";
2
2
  export { _default as Tokenizer, type TokenizerChange, type TokenizerEmits, type TokenizerOverflow, type TokenizerProps, type TokenizerSize, type TokenizerSlots, type TokenizerStatus };
@@ -1,2 +1,2 @@
1
- import { t as _sfc_main } from "../Tokenizer-mu0Sak58.js";
1
+ import { t as _sfc_main } from "../Tokenizer-CsFiYUJ_.js";
2
2
  export { _sfc_main as Tokenizer };