@astryx-vue/core 0.2.3 → 0.2.5

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 (288) hide show
  1. package/README.md +28 -26
  2. package/THIRD_PARTY_NOTICES.md +2 -0
  3. package/dist/AlertDialog/index.js +1 -1
  4. package/dist/{AlertDialog-ovx4cBjM.js → AlertDialog-B6UeBCE7.js} +2 -2
  5. package/dist/AppShell/index.js +1 -1
  6. package/dist/{AppShell-Dd-D4bA2.js → AppShell-CeBmB0Q9.js} +2 -2
  7. package/dist/Avatar/index.d.ts +1 -1
  8. package/dist/Avatar/index.js +1 -1
  9. package/dist/{Avatar-jmHInHwj.js → Avatar-BB4Z4LF1.js} +10 -4
  10. package/dist/AvatarGroup/index.d.ts +1 -1
  11. package/dist/Banner/index.d.ts +1 -1
  12. package/dist/BottomSheet/index.d.ts +2 -2
  13. package/dist/BottomSheet/index.js +3 -2
  14. package/dist/{BottomSheet-Dg95HB1s.js → BottomSheet-BV6vfgGu.js} +82 -22
  15. package/dist/BottomSheet-o7xw-TOi.js +153 -0
  16. package/dist/Breadcrumbs/index.d.ts +2 -2
  17. package/dist/Breadcrumbs/index.js +2 -2
  18. package/dist/{Breadcrumbs-CWGfgLNK.js → Breadcrumbs-D6G7f5WL.js} +1 -1
  19. package/dist/Button/index.d.ts +1 -1
  20. package/dist/ButtonGroup/index.d.ts +1 -1
  21. package/dist/Calendar/index.d.ts +1 -1
  22. package/dist/Calendar/index.js +1 -1
  23. package/dist/{Calendar-CnOsSjMY.js → Calendar-DmTeM7PO.js} +2 -2
  24. package/dist/Carousel/index.js +1 -1
  25. package/dist/{Carousel-JA7ilqI_.js → Carousel-CIKrcA2r.js} +1 -1
  26. package/dist/Chat/index.js +1 -1
  27. package/dist/{Chat-C7WrCOE4.js → Chat-BFox3u9D.js} +1 -1
  28. package/dist/CheckboxInput/index.d.ts +1 -1
  29. package/dist/CheckboxList/index.d.ts +1 -1
  30. package/dist/CheckboxList/index.js +1 -1
  31. package/dist/{CheckboxList-CnCGnkZk.js → CheckboxList-BlPf7vPe.js} +4 -4
  32. package/dist/Citation/index.js +1 -1
  33. package/dist/{Citation-CtwrU33I.js → Citation-BG-vg9ia.js} +1 -1
  34. package/dist/ClickableCard/index.d.ts +1 -1
  35. package/dist/Code/index.d.ts +3 -3
  36. package/dist/Code/index.js +4 -4
  37. package/dist/{Code-BvefYRpx.js → Code-XnPuGxey.js} +1 -1
  38. package/dist/{CodeBlock-BZGzYeoL.js → CodeBlock-B2pnEOJY.js} +145 -15
  39. package/dist/CommandPalette/index.js +1 -1
  40. package/dist/{CommandPalette-BNbM9T9y.js → CommandPalette-DKgHzmJk.js} +10 -10
  41. package/dist/ComplexSelector/index.js +1 -1
  42. package/dist/{ComplexSelector-LtbLlrcj.js → ComplexSelector-Dv44FFhN.js} +1 -1
  43. package/dist/ContextMenu/index.d.ts +2 -2
  44. package/dist/ContextMenu/index.js +2 -2
  45. package/dist/{ContextMenu-DVQl0xL5.js → ContextMenu-BeJO5HYx.js} +4 -369
  46. package/dist/DateInput/index.d.ts +1 -1
  47. package/dist/DateInput/index.js +1 -1
  48. package/dist/{DateInput-zm8sNc0t.js → DateInput-D4XFAEMp.js} +3 -3
  49. package/dist/DateRangeInput/index.d.ts +1 -1
  50. package/dist/DateRangeInput/index.js +1 -1
  51. package/dist/{DateRangeInput-DlVFzrf7.js → DateRangeInput-Cp6AZfew.js} +2 -2
  52. package/dist/DateTimeInput/index.d.ts +1 -1
  53. package/dist/DateTimeInput/index.js +1 -1
  54. package/dist/{DateTimeInput-C7Z-p6Yd.js → DateTimeInput-B6MPPp76.js} +3 -3
  55. package/dist/DropdownMenu/index.d.ts +2 -2
  56. package/dist/DropdownMenu/index.js +3 -3
  57. package/dist/{DropdownMenu-BoZChdev.js → DropdownMenu--lnUeJEG.js} +3 -3
  58. package/dist/{DropdownMenu-u1psFjis.js → DropdownMenu-6E9jFdFe.js} +4 -4
  59. package/dist/{DropdownMenuRadioItem.vue-uVM0FD2f.d.ts → DropdownMenuRadioItem.vue-CXEURBcq.d.ts} +1 -1
  60. package/dist/EmptyState/index.js +1 -1
  61. package/dist/{EmptyState-CUJdTYKV.js → EmptyState-0RWymQUS.js} +2 -2
  62. package/dist/FileInput/index.d.ts +1 -1
  63. package/dist/FileInput/index.js +1 -1
  64. package/dist/{FileInput-QdlZn7qK.js → FileInput-DuNwdbAo.js} +1 -1
  65. package/dist/Grid/index.d.ts +1 -1
  66. package/dist/Heading/index.d.ts +2 -2
  67. package/dist/Heading/index.js +1 -1
  68. package/dist/Heading-B9C3LZlS.js +94 -0
  69. package/dist/Indicator/index.d.ts +2 -2
  70. package/dist/InputGroup/index.d.ts +1 -1
  71. package/dist/Item-DrYJL1TG.js +590 -0
  72. package/dist/Lightbox/index.js +1 -1
  73. package/dist/{Lightbox-BSzfqZ-u.js → Lightbox-Br3o0SyQ.js} +1 -1
  74. package/dist/Link/index.d.ts +3 -2
  75. package/dist/Link/index.js +1 -1
  76. package/dist/Link-DCZ6922-.js +196 -0
  77. package/dist/List/index.d.ts +3 -3
  78. package/dist/List/index.js +2 -2
  79. package/dist/{ListItem-pGxvn6QJ.js → ListItem-CcRHWuEm.js} +8 -2
  80. package/dist/Markdown/index.d.ts +2 -2
  81. package/dist/Markdown/index.js +2 -2
  82. package/dist/{Markdown-B6tSqenv.js → Markdown-Bz0R3kNj.js} +274 -30
  83. package/dist/MetadataList/index.js +1 -1
  84. package/dist/{MetadataList-aN1tRn6W.js → MetadataList-CFaocx6j.js} +1 -1
  85. package/dist/MobileNav/index.js +1 -1
  86. package/dist/{MobileNavToggle-fqcSafkc.js → MobileNavToggle-Dh3uLivq.js} +1 -1
  87. package/dist/MoreMenu/index.d.ts +1 -1
  88. package/dist/MoreMenu/index.js +1 -1
  89. package/dist/{MoreMenu-B3brqdK_.js → MoreMenu-B95nRSe8.js} +2 -2
  90. package/dist/MultiSelector/index.d.ts +1 -1
  91. package/dist/MultiSelector/index.js +1 -1
  92. package/dist/{MultiSelector-BD5PMgez.js → MultiSelector-DuF5TECE.js} +4 -4
  93. package/dist/{NavDisclosure-DbYLDXK0.js → NavDisclosure-C6sPZ89n.js} +4 -1
  94. package/dist/NavHeadingSurface-Cb3x9iDx.js +287 -0
  95. package/dist/NavItem/index.d.ts +1 -1
  96. package/dist/NavMenu/index.d.ts +2 -2
  97. package/dist/NavMenu/index.js +4 -3
  98. package/dist/NavMenu-ClIgMaxE.js +176 -0
  99. package/dist/{NavMenuItem-DrwIMHKO.js → NavMenuItem-E7S8gBh-.js} +1 -1
  100. package/dist/NumberInput/index.d.ts +1 -1
  101. package/dist/NumberInput/index.js +1 -1
  102. package/dist/{NumberInput-CBeU4lEl.js → NumberInput-B4IL3s_8.js} +1 -1
  103. package/dist/Outline/index.js +1 -1
  104. package/dist/{Outline--HVMSB6i.js → Outline-DBUuchi9.js} +1 -1
  105. package/dist/OverflowList/index.d.ts +1 -1
  106. package/dist/OverflowList/index.js +1 -1
  107. package/dist/{OverflowList-FMh7r-r_.js → OverflowList-aDd_oem0.js} +3 -3
  108. package/dist/Pagination/index.d.ts +1 -1
  109. package/dist/Pagination/index.js +1 -1
  110. package/dist/{Pagination-DlIvESjx.js → Pagination-CNe9F6Fl.js} +181 -45
  111. package/dist/Popover/index.d.ts +1 -1
  112. package/dist/PowerSearch/index.d.ts +1 -1
  113. package/dist/PowerSearch/index.js +1 -1
  114. package/dist/{PowerSearch-CMG7Rb69.js → PowerSearch-C6U8Sq1Y.js} +13 -13
  115. package/dist/ProgressBar/index.d.ts +2 -2
  116. package/dist/ProgressBar/index.js +1 -1
  117. package/dist/{ProgressBar-DO9Chic6.js → ProgressBar-DF6WZNCI.js} +45 -6
  118. package/dist/Radio/index.d.ts +1 -1
  119. package/dist/RadioList/index.d.ts +1 -1
  120. package/dist/Resizable/index.d.ts +1 -1
  121. package/dist/Resizable/index.js +1 -1
  122. package/dist/{Resizable-CXpvj1TZ.js → ResizeHandle-DYy0e3v9.js} +1 -1
  123. package/dist/ScrollableArea/index.d.ts +1 -1
  124. package/dist/SelectableCard/index.d.ts +1 -1
  125. package/dist/Selector/index.d.ts +1 -1
  126. package/dist/Selector/index.js +1 -1
  127. package/dist/{Selector-BpPnuWH3.js → Selector-5N-hq2nF.js} +3 -3
  128. package/dist/SideNav/index.d.ts +2 -2
  129. package/dist/SideNav/index.js +1 -1
  130. package/dist/{SideNav-D4TupqgE.js → SideNav-CT9lfspi.js} +225 -229
  131. package/dist/Stack/index.d.ts +1 -1
  132. package/dist/Stepper/index.js +1 -1
  133. package/dist/{Stepper-H-6-T5Ps.js → Stepper-BqhVCgC-.js} +1 -1
  134. package/dist/Switch/index.d.ts +1 -1
  135. package/dist/Table/index.js +1 -1
  136. package/dist/{Table-nqA_njNz.js → Table-CsdH8fCB.js} +4 -4
  137. package/dist/Text/index.d.ts +3 -3
  138. package/dist/Text/index.js +1 -1
  139. package/dist/Text-DIzZw6FA.js +86 -0
  140. package/dist/TextArea/index.d.ts +1 -1
  141. package/dist/TextInput/index.d.ts +1 -1
  142. package/dist/Theme/index.d.ts +3 -3
  143. package/dist/Theme/index.js +2 -2
  144. package/dist/Theme-CtaUWo4g.js +1246 -0
  145. package/dist/Thumbnail/index.js +1 -1
  146. package/dist/{Thumbnail-CXb3m_Hv.js → Thumbnail-BnQwX1cQ.js} +2 -2
  147. package/dist/{TimeField-B3cndWb0.js → TimeField-Biiuv0hB.js} +1 -1
  148. package/dist/TimeInput/index.d.ts +1 -1
  149. package/dist/TimeInput/index.js +1 -1
  150. package/dist/{TimeInput-BHQ_LKGm.js → TimeInput-C9gptCOK.js} +1 -1
  151. package/dist/Timer/index.d.ts +1 -1
  152. package/dist/Timer/index.js +1 -1
  153. package/dist/{Timer-B7GV6hqd.js → Timer-kxzQx3tp.js} +1 -1
  154. package/dist/Timestamp/index.d.ts +1 -1
  155. package/dist/Timestamp/index.js +1 -1
  156. package/dist/{Timestamp-Cfuxbb3i.js → Timestamp-D7bd_nF3.js} +2 -2
  157. package/dist/ToggleButton/index.d.ts +1 -1
  158. package/dist/Token/index.d.ts +1 -1
  159. package/dist/Token/index.js +1 -1
  160. package/dist/{Token-CdVLH0_H.js → Token-D2GsI_Ei.js} +1 -1
  161. package/dist/Tokenizer/index.js +1 -1
  162. package/dist/{Tokenizer-DlD-S_8-.js → Tokenizer-rwzamZg4.js} +3 -3
  163. package/dist/Toolbar/index.d.ts +1 -1
  164. package/dist/Tooltip/index.d.ts +1 -1
  165. package/dist/Tooltip/index.js +1 -1
  166. package/dist/{Tooltip-mp0NMh_Y.js → Tooltip-C2fh9anJ.js} +23 -8
  167. package/dist/TopNav/index.d.ts +1 -1
  168. package/dist/TopNav/index.js +1 -1
  169. package/dist/{TopNav-DzV874G7.js → TopNav-arWFLTBM.js} +112 -42
  170. package/dist/TreeList/index.js +1 -1
  171. package/dist/{TreeList-DEwvlZRV.js → TreeList-C9xvMpJZ.js} +1 -1
  172. package/dist/Typeahead/index.d.ts +2 -2
  173. package/dist/Typeahead/index.js +3 -2
  174. package/dist/Typeahead-_V11btpv.js +499 -0
  175. package/dist/{TypeaheadMenu-CGvo0Tud.js → TypeaheadMenu-BEObzonz.js} +46 -10
  176. package/dist/composables/index.d.ts +2 -2
  177. package/dist/composables/index.js +4 -4
  178. package/dist/composables-CWw6t-RJ.js +520 -0
  179. package/dist/{context-DmOLCubj.js → context-CPh7kE-a.js} +58 -10
  180. package/dist/{index-BRfR0lhb.d.ts → index-12QYAbiz.d.ts} +1 -1
  181. package/dist/{index-D1Twv_fL.d.ts → index-4TRnFGxv.d.ts} +6 -6
  182. package/dist/{index-BTAgQRP0.d.ts → index-B9rqmYxh.d.ts} +150 -62
  183. package/dist/index-BBtJt5_A.d.ts +26 -0
  184. package/dist/{index-Ch6BbxCP.d.ts → index-BH9PzQ1F.d.ts} +13 -8
  185. package/dist/{index-C2sfHfBw.d.ts → index-BK9T1TPZ.d.ts} +4 -4
  186. package/dist/{index-D_UEJIU5.d.ts → index-BPwD6aBv.d.ts} +1 -1
  187. package/dist/{index-B1x05arQ.d.ts → index-BlOIC_AM.d.ts} +1 -1
  188. package/dist/{index-C5p2NeCr.d.ts → index-Blm197N_.d.ts} +11 -2
  189. package/dist/{index-Bu3oXIIS.d.ts → index-BmmdzwT9.d.ts} +6 -0
  190. package/dist/{index-MPcg1Pm4.d.ts → index-BpH4wvsg.d.ts} +2 -2
  191. package/dist/{index-BMn9ghAX.d.ts → index-C1HIqW_H.d.ts} +2 -2
  192. package/dist/{index-LIyvJTW3.d.ts → index-C3GaPqvJ.d.ts} +84 -8
  193. package/dist/{index-DkVEBdWa.d.ts → index-CB9Srua5.d.ts} +1 -1
  194. package/dist/{index-C8wDPDcP.d.ts → index-CLmKfnqf.d.ts} +49 -7
  195. package/dist/{index-DMQG6kdM.d.ts → index-CPwzSbQQ.d.ts} +2 -2
  196. package/dist/{index-DAiGhkNZ.d.ts → index-D4I_obqR.d.ts} +1 -1
  197. package/dist/{index-foQMNKZO.d.ts → index-D5N9ikrS.d.ts} +48 -2
  198. package/dist/{index-D8o50qOE.d.ts → index-DFbvnBlf.d.ts} +31 -2
  199. package/dist/{index-Cm_TiLXU.d.ts → index-Dgg0bHVM.d.ts} +7 -3
  200. package/dist/{index-ViSV0RBx.d.ts → index-DjMwF8ET.d.ts} +11 -1
  201. package/dist/{index-nCEmW6wa.d.ts → index-DtePJ_w_.d.ts} +1 -1
  202. package/dist/index-DxR1FChm.d.ts +158 -0
  203. package/dist/{index-f4NGT-e2.d.ts → index-EFqQF2Bx.d.ts} +1 -1
  204. package/dist/{index-BB5yVIN-.d.ts → index-JL4auphT.d.ts} +2 -2
  205. package/dist/{index-B9f1rUEv.d.ts → index-XuAAcYiP.d.ts} +1 -1
  206. package/dist/{index-D0TlUOtG.d.ts → index-YmSe1ujk.d.ts} +76 -3
  207. package/dist/{index-BMrggCw-.d.ts → index-bvr3WHvs.d.ts} +1 -1
  208. package/dist/{index-CDDMDHJM.d.ts → index-c67ca7eJ.d.ts} +1 -1
  209. package/dist/{index-CGZ2xi3r.d.ts → index-eshFLli0.d.ts} +40 -3
  210. package/dist/{index-DxsKyAxq.d.ts → index-vizlhXVs.d.ts} +131 -2
  211. package/dist/{index-DfgHJE7H.d.ts → index-z3uLM1O6.d.ts} +153 -24
  212. package/dist/index.d.ts +80 -79
  213. package/dist/index.js +118 -115
  214. package/dist/locale/index.d.ts +2 -2
  215. package/dist/locale/index.js +3 -3
  216. package/dist/locale-sLw5Caia.js +917 -0
  217. package/dist/{searchResultMessage-DN0HeRRB.js → searchResultMessage-CCnq-_ce.js} +1 -1
  218. package/dist/syntaxTheme-CwVEcVDk.d.ts +57 -0
  219. package/dist/{syntaxTheme-ClpWALZX.js → syntaxTheme-R7xnu5x5.js} +24 -3
  220. package/dist/{types-Bt-lSgYX.d.ts → types-D9nP_X-c.d.ts} +14 -1
  221. package/dist/{types-CAZY4Xua.d.ts → types-DGYHIu4I.d.ts} +30 -1
  222. package/dist/types-D_J66aPN.d.ts +85 -0
  223. package/dist/types-gKsEkk2g.d.ts +320 -0
  224. package/dist/{useMenuDrillIn-OaEwjK44.js → useMenuDrillIn-BgjJcY3K.js} +1 -1
  225. package/dist/useMenuPress-DUmEy4TB.js +425 -0
  226. package/dist/{composables-DDI08XFF.js → useResizable-B3ahKLoZ.js} +73 -248
  227. package/dist/useTruncation-B5qXQzAP.js +53 -0
  228. package/locales/SOURCE.json +37 -0
  229. package/locales/af-ZA.json +1482 -0
  230. package/locales/ar-SA.json +1482 -0
  231. package/locales/ca-ES.json +1482 -0
  232. package/locales/cs-CZ.json +1482 -0
  233. package/locales/da-DK.json +1482 -0
  234. package/locales/de-DE.json +1482 -0
  235. package/locales/el-GR.json +1482 -0
  236. package/locales/en.json +1646 -0
  237. package/locales/es-ES.json +1482 -0
  238. package/locales/fi-FI.json +1482 -0
  239. package/locales/fr-FR.json +1482 -0
  240. package/locales/he-IL.json +1482 -0
  241. package/locales/hu-HU.json +1482 -0
  242. package/locales/it-IT.json +1482 -0
  243. package/locales/ja-JP.json +1482 -0
  244. package/locales/ko-KR.json +1482 -0
  245. package/locales/nl-NL.json +1482 -0
  246. package/locales/no-NO.json +1482 -0
  247. package/locales/pl-PL.json +1482 -0
  248. package/locales/pt-BR.json +1482 -0
  249. package/locales/pt-PT.json +1482 -0
  250. package/locales/ro-RO.json +1482 -0
  251. package/locales/ru-RU.json +1482 -0
  252. package/locales/sr-SP.json +1482 -0
  253. package/locales/sv-SE.json +1482 -0
  254. package/locales/tr-TR.json +1482 -0
  255. package/locales/uk-UA.json +1482 -0
  256. package/locales/vi-VN.json +1482 -0
  257. package/locales/zh-CN.json +1482 -0
  258. package/locales/zh-TW.json +1482 -0
  259. package/package.json +4 -2
  260. package/styles/bottom-sheet.css +27 -0
  261. package/styles/code.css +62 -0
  262. package/styles/container-reveal.css +104 -0
  263. package/styles/heading.css +47 -0
  264. package/styles/keyboard-hint.css +28 -0
  265. package/styles/link.css +34 -0
  266. package/styles/list.css +88 -1
  267. package/styles/markdown.css +12 -0
  268. package/styles/pagination.css +30 -0
  269. package/styles/progress-bar.css +49 -0
  270. package/styles/side-nav.css +36 -1
  271. package/styles/text.css +18 -0
  272. package/styles/top-nav.css +145 -6
  273. package/styles/typeahead.css +24 -0
  274. package/styles.css +2 -0
  275. package/dist/Heading-Dugosn6j.js +0 -43
  276. package/dist/Item-C1z6gXn8.js +0 -289
  277. package/dist/Link-DqdQZ37C.js +0 -141
  278. package/dist/Text-BHVghsWo.js +0 -53
  279. package/dist/Theme-CejS9MHm.js +0 -447
  280. package/dist/Typeahead-DQ3tmqYe.js +0 -375
  281. package/dist/index-Bqb_Fyju.d.ts +0 -80
  282. package/dist/index-Dg3ZmwEg.d.ts +0 -75
  283. package/dist/locale-CCwVnyMZ.js +0 -42
  284. package/dist/syntaxTheme-Bcs1YMF7.d.ts +0 -38
  285. package/dist/types-jmqqnkKA.d.ts +0 -163
  286. package/dist/useHotkeys-dABSK1o9.js +0 -80
  287. package/dist/useLongPress-Cyxwa73s.js +0 -60
  288. package/dist/{index-BXkNZF3q.d.ts → index-CpiWVbRZ.d.ts} +1 -1
@@ -1,163 +0,0 @@
1
- import { n as SyntaxThemeDefinition } from "./syntaxTheme-Bcs1YMF7.js";
2
- import { t as SemanticIconMap } from "./semantic-CKH9XVqa.js";
3
- import { Component } from "vue";
4
- //#region src/Indicator/types.d.ts
5
- /**
6
- * Each family owns its own states.
7
- *
8
- * A radio is only chosen or not. A checkbox can also be partial. Keeping the
9
- * families apart means a radio graphic is never asked to draw a mixed state.
10
- */
11
- interface IndicatorFamilyMap {
12
- singleSelection: 'unchecked' | 'checked';
13
- multiSelection: 'unchecked' | 'checked' | 'indeterminate';
14
- }
15
- type IndicatorFamily = keyof IndicatorFamilyMap & string;
16
- type IndicatorState<F extends IndicatorFamily = IndicatorFamily> = IndicatorFamilyMap[F];
17
- /** Matches the control sizes of the inputs that draw these graphics. */
18
- type IndicatorSize = 'sm' | 'md';
19
- /**
20
- * Which edge of a row the mark sits on.
21
- *
22
- * Logical, not physical: start is the left edge in left-to-right text.
23
- * The row decides this. The graphic itself has no position.
24
- */
25
- type IndicatorPosition = 'start' | 'end';
26
- /**
27
- * Props every indicator accepts.
28
- *
29
- * The graphic is decorative. The control that draws it keeps the input, the
30
- * role, the accessible name, and the keyboard. Hover and focus reach the
31
- * graphic through the `astryx-indicator-scope` class on that control, not
32
- * through a prop.
33
- */
34
- interface IndicatorProps<F extends IndicatorFamily = IndicatorFamily> {
35
- /** Which state to draw. The family decides which states exist. */
36
- state: IndicatorState<F>;
37
- /**
38
- * Control size. `sm` is 20px and `md` is 24px.
39
- * @default 'md'
40
- */
41
- size?: IndicatorSize;
42
- /**
43
- * Whether the owning control is disabled. Visual only.
44
- * @default false
45
- */
46
- isDisabled?: boolean;
47
- }
48
- /** A component that can stand in for one indicator name. */
49
- type IndicatorComponent<F extends IndicatorFamily = IndicatorFamily> = Component<IndicatorProps<F>>;
50
- /**
51
- * Names a theme can replace.
52
- *
53
- * Packages can add names by augmenting this interface. Core has no default
54
- * for a name it does not know, so `getIndicator` returns undefined for those
55
- * and the caller supplies the fallback.
56
- */
57
- interface IndicatorMap {
58
- /** The mark on a chosen option. A check by default, and nothing when unchosen. */
59
- check: 'singleSelection';
60
- /** The circle of a radio. */
61
- radio: 'singleSelection';
62
- /** The box of a checkbox, including the partial state. */
63
- checkbox: 'multiSelection';
64
- }
65
- type IndicatorName = keyof IndicatorMap & string;
66
- type CoreIndicatorName = 'check' | 'checkbox' | 'radio';
67
- /**
68
- * Theme overrides, keyed by indicator name.
69
- *
70
- * One entry replaces that graphic everywhere it is drawn. Mapping `check` to
71
- * the radio graphic turns every single-selection mark into a radio.
72
- */
73
- interface IndicatorRegistry {
74
- check?: IndicatorComponent<'singleSelection'>;
75
- radio?: IndicatorComponent<'singleSelection'>;
76
- checkbox?: IndicatorComponent<'multiSelection'>;
77
- [name: string]: Component | undefined;
78
- }
79
- //#endregion
80
- //#region src/Theme/types.d.ts
81
- /** Color mode for a theme subtree. `system` follows the page and the OS. */
82
- type ThemeMode = 'light' | 'dark' | 'system';
83
- /**
84
- * A token value.
85
- *
86
- * A string is used as written. A two-item tuple is the light stop, then the
87
- * dark stop, and becomes `light-dark()`.
88
- */
89
- type ThemeTokenValue = string | readonly [string, string];
90
- /** CSS custom properties for a theme. Keys may omit the `--astryx-` prefix. */
91
- type ThemeTokens = Record<string, ThemeTokenValue>;
92
- /** Token overrides for one inverted surface. */
93
- interface ThemeSurfaceInput {
94
- tokens?: ThemeTokens;
95
- }
96
- interface DefineThemeInput {
97
- /** Theme name. Used as `data-astryx-theme`. */
98
- name: string;
99
- /** Semantic token overrides for this theme. */
100
- tokens?: ThemeTokens;
101
- /** Another theme to start from. This theme's own values win. */
102
- extends?: ThemeDefinition;
103
- /** Syntax colors for code in this subtree, unless a SyntaxTheme is closer. */
104
- syntax?: SyntaxThemeDefinition;
105
- /** Extra tokens for content on a dark surface. */
106
- onDark?: ThemeSurfaceInput;
107
- /** Extra tokens for content on a light surface. */
108
- onLight?: ThemeSurfaceInput;
109
- /**
110
- * Semantic icon name to Iconify id.
111
- *
112
- * Entries replace the built-in map by name and merge with the theme this
113
- * one extends. A name that is not listed keeps the built-in id.
114
- */
115
- icons?: SemanticIconMap;
116
- /**
117
- * Indicator graphics, replaced by name.
118
- *
119
- * One entry reaches every control that draws that indicator. Entries merge
120
- * with the theme this one extends.
121
- */
122
- indicators?: IndicatorRegistry;
123
- }
124
- interface ThemeDefinition {
125
- name: string;
126
- /** Token values already written as CSS. */
127
- tokens: Readonly<Record<string, string>>;
128
- /** Extra tokens applied by MediaTheme when the surface is dark. */
129
- onDark: Readonly<Record<string, string>>;
130
- /** Extra tokens applied by MediaTheme when the surface is light. */
131
- onLight: Readonly<Record<string, string>>;
132
- syntax?: SyntaxThemeDefinition;
133
- /** Semantic icon overrides. Absent when this theme does not set any. */
134
- icons?: SemanticIconMap;
135
- /** Indicator overrides. Absent when this theme does not set any. */
136
- indicators?: IndicatorRegistry;
137
- readonly __astryxTheme: true;
138
- }
139
- interface ThemeProps {
140
- /** Theme from `defineTheme()`. */
141
- theme: ThemeDefinition;
142
- /**
143
- * Color mode for this subtree.
144
- * @default 'system'
145
- */
146
- mode?: ThemeMode;
147
- }
148
- /** Surface luminance, `auto` to measure it, or `off` to leave the page theme. */
149
- type MediaThemeMode = 'dark' | 'light' | 'auto' | 'off';
150
- interface MediaThemeProps {
151
- /**
152
- * Which surface the children sit on.
153
- * `auto` measures the parent. `off` keeps the surrounding theme.
154
- */
155
- mode: MediaThemeMode;
156
- /**
157
- * Side used by `auto` before the surface can be measured, and when it cannot.
158
- * @default 'dark'
159
- */
160
- fallback?: 'dark' | 'light';
161
- }
162
- //#endregion
163
- export { IndicatorProps as _, ThemeMode as a, IndicatorState as b, ThemeTokenValue as c, IndicatorComponent as d, IndicatorFamily as f, IndicatorPosition as g, IndicatorName as h, ThemeDefinition as i, ThemeTokens as l, IndicatorMap as m, MediaThemeMode as n, ThemeProps as o, IndicatorFamilyMap as p, MediaThemeProps as r, ThemeSurfaceInput as s, DefineThemeInput as t, CoreIndicatorName as u, IndicatorRegistry as v, IndicatorSize as y };
@@ -1,80 +0,0 @@
1
- import { t as isApplePlatform } from "./platform-B_9W_aHW.js";
2
- import { onMounted, onScopeDispose, toValue } from "vue";
3
- //#region src/composables/useHotkeys.ts
4
- const KEY_ALIASES = {
5
- esc: "escape",
6
- space: " ",
7
- up: "arrowup",
8
- down: "arrowdown",
9
- left: "arrowleft",
10
- right: "arrowright",
11
- return: "enter",
12
- plus: "+"
13
- };
14
- function isTypingTarget(target) {
15
- if (!(target instanceof HTMLElement)) return false;
16
- if (target.isContentEditable) return true;
17
- const tag = target.tagName;
18
- return tag === "INPUT" || tag === "TEXTAREA" || tag === "SELECT";
19
- }
20
- function isImeKeyEvent(event) {
21
- return event.isComposing === true || event.key === "Process" || event.keyCode === 229;
22
- }
23
- function matchesCombo(keys, event, isApple) {
24
- const parts = keys.toLowerCase().split("+").map((part) => part.trim()).filter(Boolean);
25
- if (parts.length === 0) return false;
26
- const key = parts[parts.length - 1] ?? "";
27
- const mods = new Set(parts.slice(0, -1));
28
- const wantsMod = mods.has("mod");
29
- const wantsCtrl = mods.has("ctrl") || wantsMod && !isApple;
30
- const wantsMeta = mods.has("meta") || wantsMod && isApple;
31
- const wantsAlt = mods.has("alt");
32
- const wantsShift = mods.has("shift");
33
- if (event.ctrlKey !== wantsCtrl) return false;
34
- if (event.metaKey !== wantsMeta) return false;
35
- if (event.altKey !== wantsAlt) return false;
36
- if (wantsShift && !event.shiftKey) return false;
37
- const expected = KEY_ALIASES[key] ?? key;
38
- return event.key.toLowerCase() === expected;
39
- }
40
- /**
41
- * 对应原版 Astryx 的 `hooks/useHotkeys`。
42
- *
43
- * 一个实例只在 window 上挂一个 keydown。快捷键列表放在调用方,
44
- * 重新渲染不会反复订阅。已经 preventDefault 的事件、输入法组合中的事件会跳过。
45
- * 焦点在输入控件里时默认不触发,除非那一条写了 `allowInInputs`。
46
- *
47
- * 单个没有修饰键的字符(例如 `c`、`/`)很容易被语音输入误触。
48
- * 如果注册这种快捷键,调用方需要提供关闭、改键,或只在组件有焦点时生效。
49
- */
50
- function useHotkeys(hotkeys) {
51
- let stop = null;
52
- function start() {
53
- if (typeof window === "undefined" || stop != null) return;
54
- const isApple = isApplePlatform();
55
- function handleKeyDown(event) {
56
- if (event.defaultPrevented || isImeKeyEvent(event)) return;
57
- const isTyping = isTypingTarget(event.target);
58
- for (const hotkey of toValue(hotkeys)) {
59
- if (hotkey.isDisabled) continue;
60
- if (isTyping && hotkey.allowInInputs !== true) continue;
61
- if (matchesCombo(hotkey.keys, event, isApple)) {
62
- event.preventDefault();
63
- hotkey.onPress(event);
64
- return;
65
- }
66
- }
67
- }
68
- window.addEventListener("keydown", handleKeyDown);
69
- stop = () => {
70
- window.removeEventListener("keydown", handleKeyDown);
71
- stop = null;
72
- };
73
- }
74
- onMounted(start);
75
- onScopeDispose(() => {
76
- stop?.();
77
- });
78
- }
79
- //#endregion
80
- export { useHotkeys as t };
@@ -1,60 +0,0 @@
1
- import { onBeforeUnmount, toValue } from "vue";
2
- //#region src/composables/useLongPress.ts
3
- const DEFAULT_DELAY_MS = 500;
4
- const DEFAULT_MOVE_CANCEL_PX = 10;
5
- /**
6
- * 对应原版 Astryx 的 `hooks/useLongPress`。
7
- *
8
- * Detect a single-finger long press.
9
- *
10
- * iOS Safari never synthesizes a `contextmenu` event for a held finger, so a
11
- * long press is the only touch affordance that can open a cursor-positioned
12
- * surface. The press is cancelled when the finger travels past the tolerance,
13
- * lifts, or the touch is cancelled.
14
- */
15
- function useLongPress(options) {
16
- const delayMs = options.delayMs ?? DEFAULT_DELAY_MS;
17
- const moveCancelPx = options.moveCancelPx ?? DEFAULT_MOVE_CANCEL_PX;
18
- let timer = null;
19
- let origin = null;
20
- function cancel() {
21
- if (timer != null) {
22
- clearTimeout(timer);
23
- timer = null;
24
- }
25
- origin = null;
26
- }
27
- function start(point) {
28
- if (toValue(options.isDisabled)) return;
29
- cancel();
30
- origin = {
31
- x: point.x,
32
- y: point.y
33
- };
34
- timer = setTimeout(() => {
35
- const from = origin;
36
- timer = null;
37
- if (from == null) return;
38
- options.onLongPress({
39
- x: from.x,
40
- y: from.y
41
- });
42
- }, delayMs);
43
- }
44
- function moveTo(point) {
45
- if (origin == null) return false;
46
- if (Math.abs(point.x - origin.x) > moveCancelPx || Math.abs(point.y - origin.y) > moveCancelPx) {
47
- cancel();
48
- return false;
49
- }
50
- return true;
51
- }
52
- onBeforeUnmount(cancel);
53
- return {
54
- cancel,
55
- moveTo,
56
- start
57
- };
58
- }
59
- //#endregion
60
- export { useLongPress as t };
@@ -39,9 +39,9 @@ declare const __VLS_base: import("vue").DefineComponent<TokenProps, {}, {}, {},
39
39
  onRemove?: ((event: Event) => any) | undefined;
40
40
  }>, {
41
41
  size: TokenSize;
42
- color: "default" | "blue" | "cyan" | "gray" | "green" | "orange" | "pink" | "purple" | "red" | "teal" | "yellow";
43
42
  disabled: boolean;
44
43
  labelHidden: boolean;
44
+ color: "default" | "blue" | "cyan" | "gray" | "green" | "orange" | "pink" | "purple" | "red" | "teal" | "yellow";
45
45
  removable: boolean;
46
46
  }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
47
47
  declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;