@ecoma-io/loom 0.1.1 → 0.2.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 (495) hide show
  1. package/README.md +54 -57
  2. package/dist/blocks/AppHeader/AppHeader.js.map +1 -1
  3. package/dist/blocks/AppHeader/AppHeader.vue.d.ts +5 -6
  4. package/dist/blocks/AppHeader/AppHeader.vue.d.ts.map +1 -1
  5. package/dist/blocks/AppHeader/AppHeader.vue_vue_type_script_setup_true_lang.js +6 -7
  6. package/dist/blocks/AppHeader/AppHeader.vue_vue_type_script_setup_true_lang.js.map +1 -1
  7. package/dist/blocks/DashboardGrid/DashboardGrid.vue.d.ts +1 -1
  8. package/dist/blocks/DashboardGrid/DashboardGrid.vue.d.ts.map +1 -1
  9. package/dist/blocks/DesktopAppShell/DesktopAppShell.js +7 -0
  10. package/dist/blocks/DesktopAppShell/DesktopAppShell.js.map +1 -0
  11. package/dist/blocks/DesktopAppShell/DesktopAppShell.vue.d.ts +102 -0
  12. package/dist/blocks/DesktopAppShell/DesktopAppShell.vue.d.ts.map +1 -0
  13. package/dist/blocks/DesktopAppShell/DesktopAppShell.vue_vue_type_script_setup_true_lang.js +74 -0
  14. package/dist/blocks/DesktopAppShell/DesktopAppShell.vue_vue_type_script_setup_true_lang.js.map +1 -0
  15. package/dist/blocks/ErrorState/ErrorState.js +7 -0
  16. package/dist/blocks/ErrorState/ErrorState.js.map +1 -0
  17. package/dist/blocks/ErrorState/ErrorState.vue.d.ts +44 -0
  18. package/dist/blocks/ErrorState/ErrorState.vue.d.ts.map +1 -0
  19. package/dist/blocks/ErrorState/ErrorState.vue_vue_type_script_setup_true_lang.js +60 -0
  20. package/dist/blocks/ErrorState/ErrorState.vue_vue_type_script_setup_true_lang.js.map +1 -0
  21. package/dist/blocks/FormActions/FormActions.js +7 -0
  22. package/dist/blocks/FormActions/FormActions.js.map +1 -0
  23. package/dist/blocks/FormActions/FormActions.vue.d.ts +51 -0
  24. package/dist/blocks/FormActions/FormActions.vue.d.ts.map +1 -0
  25. package/dist/blocks/FormActions/FormActions.vue_vue_type_script_setup_true_lang.js +21 -0
  26. package/dist/blocks/FormActions/FormActions.vue_vue_type_script_setup_true_lang.js.map +1 -0
  27. package/dist/blocks/FormSection/FormSection.js +7 -0
  28. package/dist/blocks/FormSection/FormSection.js.map +1 -0
  29. package/dist/blocks/FormSection/FormSection.vue.d.ts +85 -0
  30. package/dist/blocks/FormSection/FormSection.vue.d.ts.map +1 -0
  31. package/dist/blocks/FormSection/FormSection.vue_vue_type_script_setup_true_lang.js +62 -0
  32. package/dist/blocks/FormSection/FormSection.vue_vue_type_script_setup_true_lang.js.map +1 -0
  33. package/dist/blocks/LoadingState/LoadingState.js +7 -0
  34. package/dist/blocks/LoadingState/LoadingState.js.map +1 -0
  35. package/dist/blocks/LoadingState/LoadingState.vue.d.ts +22 -0
  36. package/dist/blocks/LoadingState/LoadingState.vue.d.ts.map +1 -0
  37. package/dist/blocks/LoadingState/LoadingState.vue_vue_type_script_setup_true_lang.js +57 -0
  38. package/dist/blocks/LoadingState/LoadingState.vue_vue_type_script_setup_true_lang.js.map +1 -0
  39. package/dist/blocks/MetricCard/MetricCard.js +7 -0
  40. package/dist/blocks/MetricCard/MetricCard.js.map +1 -0
  41. package/dist/blocks/MetricCard/MetricCard.vue.d.ts +59 -0
  42. package/dist/blocks/MetricCard/MetricCard.vue.d.ts.map +1 -0
  43. package/dist/blocks/MetricCard/MetricCard.vue_vue_type_script_setup_true_lang.js +63 -0
  44. package/dist/blocks/MetricCard/MetricCard.vue_vue_type_script_setup_true_lang.js.map +1 -0
  45. package/dist/blocks/SidebarNav/SidebarNav.js.map +1 -1
  46. package/dist/blocks/SidebarNav/SidebarNav.vue_vue_type_script_setup_true_lang.js.map +1 -1
  47. package/dist/blocks/TitleBar/TitleBar.js.map +1 -1
  48. package/dist/blocks/TitleBar/TitleBar.vue.d.ts +37 -3
  49. package/dist/blocks/TitleBar/TitleBar.vue.d.ts.map +1 -1
  50. package/dist/blocks/TitleBar/TitleBar.vue_vue_type_script_setup_true_lang.js +14 -14
  51. package/dist/blocks/TitleBar/TitleBar.vue_vue_type_script_setup_true_lang.js.map +1 -1
  52. package/dist/blocks/ToastStack/ToastStack.js.map +1 -1
  53. package/dist/blocks/ToastStack/ToastStack.vue.d.ts +20 -0
  54. package/dist/blocks/ToastStack/ToastStack.vue.d.ts.map +1 -1
  55. package/dist/blocks/ToastStack/ToastStack.vue_vue_type_script_setup_true_lang.js +16 -5
  56. package/dist/blocks/ToastStack/ToastStack.vue_vue_type_script_setup_true_lang.js.map +1 -1
  57. package/dist/composition/Center/Center.js +7 -0
  58. package/dist/composition/Center/Center.js.map +1 -0
  59. package/dist/composition/Center/Center.vue.d.ts +40 -0
  60. package/dist/composition/Center/Center.vue.d.ts.map +1 -0
  61. package/dist/composition/Center/Center.vue_vue_type_script_setup_true_lang.js +29 -0
  62. package/dist/composition/Center/Center.vue_vue_type_script_setup_true_lang.js.map +1 -0
  63. package/dist/composition/Frame/Frame.js +7 -0
  64. package/dist/composition/Frame/Frame.js.map +1 -0
  65. package/dist/composition/Frame/Frame.vue.d.ts +35 -0
  66. package/dist/composition/Frame/Frame.vue.d.ts.map +1 -0
  67. package/dist/composition/Frame/Frame.vue_vue_type_script_setup_true_lang.js +29 -0
  68. package/dist/composition/Frame/Frame.vue_vue_type_script_setup_true_lang.js.map +1 -0
  69. package/dist/composition/Grid/Grid.js +7 -0
  70. package/dist/composition/Grid/Grid.js.map +1 -0
  71. package/dist/composition/Grid/Grid.vue.d.ts +41 -0
  72. package/dist/composition/Grid/Grid.vue.d.ts.map +1 -0
  73. package/dist/composition/Grid/Grid.vue_vue_type_script_setup_true_lang.js +27 -0
  74. package/dist/composition/Grid/Grid.vue_vue_type_script_setup_true_lang.js.map +1 -0
  75. package/dist/composition/Inline/Inline.js +7 -0
  76. package/dist/composition/Inline/Inline.js.map +1 -0
  77. package/dist/composition/Inline/Inline.vue.d.ts +46 -0
  78. package/dist/composition/Inline/Inline.vue.d.ts.map +1 -0
  79. package/dist/composition/Inline/Inline.vue_vue_type_script_setup_true_lang.js +35 -0
  80. package/dist/composition/Inline/Inline.vue_vue_type_script_setup_true_lang.js.map +1 -0
  81. package/dist/composition/ScrollReel/ScrollReel.js +7 -0
  82. package/dist/composition/ScrollReel/ScrollReel.js.map +1 -0
  83. package/dist/composition/ScrollReel/ScrollReel.vue.d.ts +42 -0
  84. package/dist/composition/ScrollReel/ScrollReel.vue.d.ts.map +1 -0
  85. package/dist/composition/ScrollReel/ScrollReel.vue_vue_type_script_setup_true_lang.js +79 -0
  86. package/dist/composition/ScrollReel/ScrollReel.vue_vue_type_script_setup_true_lang.js.map +1 -0
  87. package/dist/composition/Sidebar/Sidebar.js +7 -0
  88. package/dist/composition/Sidebar/Sidebar.js.map +1 -0
  89. package/dist/composition/Sidebar/Sidebar.vue.d.ts +52 -0
  90. package/dist/composition/Sidebar/Sidebar.vue.d.ts.map +1 -0
  91. package/dist/composition/Sidebar/Sidebar.vue_vue_type_script_setup_true_lang.js +36 -0
  92. package/dist/composition/Sidebar/Sidebar.vue_vue_type_script_setup_true_lang.js.map +1 -0
  93. package/dist/composition/Split/Split.js +7 -0
  94. package/dist/composition/Split/Split.js.map +1 -0
  95. package/dist/composition/Split/Split.vue.d.ts +58 -0
  96. package/dist/composition/Split/Split.vue.d.ts.map +1 -0
  97. package/dist/composition/Split/Split.vue_vue_type_script_setup_true_lang.js +40 -0
  98. package/dist/composition/Split/Split.vue_vue_type_script_setup_true_lang.js.map +1 -0
  99. package/dist/composition/Stack/Stack.js +7 -0
  100. package/dist/composition/Stack/Stack.js.map +1 -0
  101. package/dist/composition/Stack/Stack.vue.d.ts +43 -0
  102. package/dist/composition/Stack/Stack.vue.d.ts.map +1 -0
  103. package/dist/composition/Stack/Stack.vue_vue_type_script_setup_true_lang.js +30 -0
  104. package/dist/composition/Stack/Stack.vue_vue_type_script_setup_true_lang.js.map +1 -0
  105. package/dist/index.d.ts +119 -11
  106. package/dist/index.d.ts.map +1 -1
  107. package/dist/index.js +83 -5
  108. package/dist/layouts/AppShell/AppShell.js +7 -0
  109. package/dist/layouts/AppShell/AppShell.js.map +1 -0
  110. package/dist/layouts/AppShell/AppShell.vue.d.ts +51 -0
  111. package/dist/layouts/AppShell/AppShell.vue.d.ts.map +1 -0
  112. package/dist/layouts/AppShell/AppShell.vue_vue_type_script_setup_true_lang.js +47 -0
  113. package/dist/layouts/AppShell/AppShell.vue_vue_type_script_setup_true_lang.js.map +1 -0
  114. package/dist/layouts/Centered/Centered.js +7 -0
  115. package/dist/layouts/Centered/Centered.js.map +1 -0
  116. package/dist/layouts/Centered/Centered.vue.d.ts +48 -0
  117. package/dist/layouts/Centered/Centered.vue.d.ts.map +1 -0
  118. package/dist/layouts/Centered/Centered.vue_vue_type_script_setup_true_lang.js +35 -0
  119. package/dist/layouts/Centered/Centered.vue_vue_type_script_setup_true_lang.js.map +1 -0
  120. package/dist/layouts/Dashboard/Dashboard.js +7 -0
  121. package/dist/layouts/Dashboard/Dashboard.js.map +1 -0
  122. package/dist/layouts/Dashboard/Dashboard.vue.d.ts +60 -0
  123. package/dist/layouts/Dashboard/Dashboard.vue.d.ts.map +1 -0
  124. package/dist/layouts/Dashboard/Dashboard.vue_vue_type_script_setup_true_lang.js +64 -0
  125. package/dist/layouts/Dashboard/Dashboard.vue_vue_type_script_setup_true_lang.js.map +1 -0
  126. package/dist/layouts/FormLayout/FormLayout.js +7 -0
  127. package/dist/layouts/FormLayout/FormLayout.js.map +1 -0
  128. package/dist/layouts/FormLayout/FormLayout.vue.d.ts +46 -0
  129. package/dist/layouts/FormLayout/FormLayout.vue.d.ts.map +1 -0
  130. package/dist/layouts/FormLayout/FormLayout.vue_vue_type_script_setup_true_lang.js +28 -0
  131. package/dist/layouts/FormLayout/FormLayout.vue_vue_type_script_setup_true_lang.js.map +1 -0
  132. package/dist/layouts/MasterDetail/MasterDetail.js +7 -0
  133. package/dist/layouts/MasterDetail/MasterDetail.js.map +1 -0
  134. package/dist/layouts/MasterDetail/MasterDetail.vue.d.ts +49 -0
  135. package/dist/layouts/MasterDetail/MasterDetail.vue.d.ts.map +1 -0
  136. package/dist/layouts/MasterDetail/MasterDetail.vue_vue_type_script_setup_true_lang.js +42 -0
  137. package/dist/layouts/MasterDetail/MasterDetail.vue_vue_type_script_setup_true_lang.js.map +1 -0
  138. package/dist/layouts/Reading/Reading.js +7 -0
  139. package/dist/layouts/Reading/Reading.js.map +1 -0
  140. package/dist/layouts/Reading/Reading.vue.d.ts +24 -0
  141. package/dist/layouts/Reading/Reading.vue.d.ts.map +1 -0
  142. package/dist/layouts/Reading/Reading.vue_vue_type_script_setup_true_lang.js +29 -0
  143. package/dist/layouts/Reading/Reading.vue_vue_type_script_setup_true_lang.js.map +1 -0
  144. package/dist/layouts/Settings/Settings.js +7 -0
  145. package/dist/layouts/Settings/Settings.js.map +1 -0
  146. package/dist/layouts/Settings/Settings.vue.d.ts +39 -0
  147. package/dist/layouts/Settings/Settings.vue.d.ts.map +1 -0
  148. package/dist/layouts/Settings/Settings.vue_vue_type_script_setup_true_lang.js +35 -0
  149. package/dist/layouts/Settings/Settings.vue_vue_type_script_setup_true_lang.js.map +1 -0
  150. package/dist/layouts/SplitLayout/SplitLayout.js +7 -0
  151. package/dist/layouts/SplitLayout/SplitLayout.js.map +1 -0
  152. package/dist/layouts/SplitLayout/SplitLayout.vue.d.ts +63 -0
  153. package/dist/layouts/SplitLayout/SplitLayout.vue.d.ts.map +1 -0
  154. package/dist/layouts/SplitLayout/SplitLayout.vue_vue_type_script_setup_true_lang.js +46 -0
  155. package/dist/layouts/SplitLayout/SplitLayout.vue_vue_type_script_setup_true_lang.js.map +1 -0
  156. package/dist/lib/ancestor-disabled.d.ts +35 -0
  157. package/dist/lib/ancestor-disabled.d.ts.map +1 -0
  158. package/dist/lib/ancestor-disabled.js +86 -0
  159. package/dist/lib/ancestor-disabled.js.map +1 -0
  160. package/dist/lib/cn.d.ts.map +1 -1
  161. package/dist/lib/cn.js +46 -1
  162. package/dist/lib/cn.js.map +1 -1
  163. package/dist/lib/count-labels.d.ts +78 -0
  164. package/dist/lib/count-labels.d.ts.map +1 -0
  165. package/dist/lib/count-labels.js +29 -0
  166. package/dist/lib/count-labels.js.map +1 -0
  167. package/dist/lib/date-labels.d.ts +278 -0
  168. package/dist/lib/date-labels.d.ts.map +1 -0
  169. package/dist/lib/date-labels.js +157 -0
  170. package/dist/lib/date-labels.js.map +1 -0
  171. package/dist/lib/field-context.d.ts +178 -0
  172. package/dist/lib/field-context.d.ts.map +1 -0
  173. package/dist/lib/field-context.js +106 -0
  174. package/dist/lib/field-context.js.map +1 -0
  175. package/dist/lib/label-registry.d.ts +75 -0
  176. package/dist/lib/label-registry.d.ts.map +1 -0
  177. package/dist/lib/labels.d.ts +116 -0
  178. package/dist/lib/labels.d.ts.map +1 -0
  179. package/dist/lib/labels.js +84 -0
  180. package/dist/lib/labels.js.map +1 -0
  181. package/dist/lib/theme.d.ts +68 -0
  182. package/dist/lib/theme.d.ts.map +1 -0
  183. package/dist/node_modules/.pnpm/@internationalized_date@3.12.3/node_modules/@internationalized/date/dist/private/CalendarDate.js +236 -0
  184. package/dist/node_modules/.pnpm/@internationalized_date@3.12.3/node_modules/@internationalized/date/dist/private/CalendarDate.js.map +1 -0
  185. package/dist/node_modules/.pnpm/@internationalized_date@3.12.3/node_modules/@internationalized/date/dist/private/calendars/GregorianCalendar.js +117 -0
  186. package/dist/node_modules/.pnpm/@internationalized_date@3.12.3/node_modules/@internationalized/date/dist/private/calendars/GregorianCalendar.js.map +1 -0
  187. package/dist/node_modules/.pnpm/@internationalized_date@3.12.3/node_modules/@internationalized/date/dist/private/conversion.js +142 -0
  188. package/dist/node_modules/.pnpm/@internationalized_date@3.12.3/node_modules/@internationalized/date/dist/private/conversion.js.map +1 -0
  189. package/dist/node_modules/.pnpm/@internationalized_date@3.12.3/node_modules/@internationalized/date/dist/private/manipulation.js +280 -0
  190. package/dist/node_modules/.pnpm/@internationalized_date@3.12.3/node_modules/@internationalized/date/dist/private/manipulation.js.map +1 -0
  191. package/dist/node_modules/.pnpm/@internationalized_date@3.12.3/node_modules/@internationalized/date/dist/private/queries.js +40 -0
  192. package/dist/node_modules/.pnpm/@internationalized_date@3.12.3/node_modules/@internationalized/date/dist/private/queries.js.map +1 -0
  193. package/dist/node_modules/.pnpm/@internationalized_date@3.12.3/node_modules/@internationalized/date/dist/private/string.js +69 -0
  194. package/dist/node_modules/.pnpm/@internationalized_date@3.12.3/node_modules/@internationalized/date/dist/private/string.js.map +1 -0
  195. package/dist/node_modules/.pnpm/@internationalized_date@3.12.3/node_modules/@internationalized/date/dist/private/utils.js +8 -0
  196. package/dist/node_modules/.pnpm/@internationalized_date@3.12.3/node_modules/@internationalized/date/dist/private/utils.js.map +1 -0
  197. package/dist/primitives/Accordion/Accordion.js +7 -0
  198. package/dist/primitives/Accordion/Accordion.js.map +1 -0
  199. package/dist/primitives/Accordion/Accordion.vue.d.ts +68 -0
  200. package/dist/primitives/Accordion/Accordion.vue.d.ts.map +1 -0
  201. package/dist/primitives/Accordion/Accordion.vue_vue_type_script_setup_true_lang.js +67 -0
  202. package/dist/primitives/Accordion/Accordion.vue_vue_type_script_setup_true_lang.js.map +1 -0
  203. package/dist/primitives/AlertDialog/AlertDialog.js +7 -0
  204. package/dist/primitives/AlertDialog/AlertDialog.js.map +1 -0
  205. package/dist/primitives/AlertDialog/AlertDialog.vue.d.ts +94 -0
  206. package/dist/primitives/AlertDialog/AlertDialog.vue.d.ts.map +1 -0
  207. package/dist/primitives/AlertDialog/AlertDialog.vue_vue_type_script_setup_true_lang.js +99 -0
  208. package/dist/primitives/AlertDialog/AlertDialog.vue_vue_type_script_setup_true_lang.js.map +1 -0
  209. package/dist/primitives/Avatar/Avatar.js +2 -2
  210. package/dist/primitives/Avatar/Avatar.js.map +1 -1
  211. package/dist/primitives/Avatar/Avatar.vue.d.ts +30 -3
  212. package/dist/primitives/Avatar/Avatar.vue.d.ts.map +1 -1
  213. package/dist/primitives/Avatar/Avatar.vue_vue_type_script_setup_true_lang.js +95 -14
  214. package/dist/primitives/Avatar/Avatar.vue_vue_type_script_setup_true_lang.js.map +1 -1
  215. package/dist/primitives/AvatarGroup/AvatarGroup.js +7 -0
  216. package/dist/primitives/AvatarGroup/AvatarGroup.js.map +1 -0
  217. package/dist/primitives/AvatarGroup/AvatarGroup.vue.d.ts +104 -0
  218. package/dist/primitives/AvatarGroup/AvatarGroup.vue.d.ts.map +1 -0
  219. package/dist/primitives/AvatarGroup/AvatarGroup.vue_vue_type_script_setup_true_lang.js +139 -0
  220. package/dist/primitives/AvatarGroup/AvatarGroup.vue_vue_type_script_setup_true_lang.js.map +1 -0
  221. package/dist/primitives/Badge/Badge.js.map +1 -1
  222. package/dist/primitives/Badge/Badge.vue.d.ts +6 -6
  223. package/dist/primitives/Badge/Badge.vue.d.ts.map +1 -1
  224. package/dist/primitives/Badge/Badge.vue_vue_type_script_setup_true_lang.js +1 -1
  225. package/dist/primitives/Badge/Badge.vue_vue_type_script_setup_true_lang.js.map +1 -1
  226. package/dist/primitives/Breadcrumb/Breadcrumb.js +7 -0
  227. package/dist/primitives/Breadcrumb/Breadcrumb.js.map +1 -0
  228. package/dist/primitives/Breadcrumb/Breadcrumb.vue.d.ts +25 -0
  229. package/dist/primitives/Breadcrumb/Breadcrumb.vue.d.ts.map +1 -0
  230. package/dist/primitives/Breadcrumb/Breadcrumb.vue_vue_type_script_setup_true_lang.js +48 -0
  231. package/dist/primitives/Breadcrumb/Breadcrumb.vue_vue_type_script_setup_true_lang.js.map +1 -0
  232. package/dist/primitives/Button/Button.js +2 -2
  233. package/dist/primitives/Button/Button.js.map +1 -1
  234. package/dist/primitives/Button/Button.vue.d.ts +31 -8
  235. package/dist/primitives/Button/Button.vue.d.ts.map +1 -1
  236. package/dist/primitives/Button/Button.vue_vue_type_script_setup_true_lang.js +32 -16
  237. package/dist/primitives/Button/Button.vue_vue_type_script_setup_true_lang.js.map +1 -1
  238. package/dist/primitives/Checkbox/Checkbox.js.map +1 -1
  239. package/dist/primitives/Checkbox/Checkbox.vue.d.ts +18 -3
  240. package/dist/primitives/Checkbox/Checkbox.vue.d.ts.map +1 -1
  241. package/dist/primitives/Checkbox/Checkbox.vue_vue_type_script_setup_true_lang.js +46 -7
  242. package/dist/primitives/Checkbox/Checkbox.vue_vue_type_script_setup_true_lang.js.map +1 -1
  243. package/dist/primitives/Chip/Chip.js +7 -0
  244. package/dist/primitives/Chip/Chip.js.map +1 -0
  245. package/dist/primitives/Chip/Chip.vue.d.ts +79 -0
  246. package/dist/primitives/Chip/Chip.vue.d.ts.map +1 -0
  247. package/dist/primitives/Chip/Chip.vue_vue_type_script_setup_true_lang.js +139 -0
  248. package/dist/primitives/Chip/Chip.vue_vue_type_script_setup_true_lang.js.map +1 -0
  249. package/dist/primitives/ColorPicker/ColorPicker.js +7 -0
  250. package/dist/primitives/ColorPicker/ColorPicker.js.map +1 -0
  251. package/dist/primitives/ColorPicker/ColorPicker.vue.d.ts +125 -0
  252. package/dist/primitives/ColorPicker/ColorPicker.vue.d.ts.map +1 -0
  253. package/dist/primitives/ColorPicker/ColorPicker.vue_vue_type_script_setup_true_lang.js +301 -0
  254. package/dist/primitives/ColorPicker/ColorPicker.vue_vue_type_script_setup_true_lang.js.map +1 -0
  255. package/dist/primitives/Combobox/Combobox.js +7 -0
  256. package/dist/primitives/Combobox/Combobox.js.map +1 -0
  257. package/dist/primitives/Combobox/Combobox.vue.d.ts +205 -0
  258. package/dist/primitives/Combobox/Combobox.vue.d.ts.map +1 -0
  259. package/dist/primitives/Combobox/Combobox.vue_vue_type_script_setup_true_lang.js +345 -0
  260. package/dist/primitives/Combobox/Combobox.vue_vue_type_script_setup_true_lang.js.map +1 -0
  261. package/dist/primitives/ContextMenu/ContextMenu.js +7 -0
  262. package/dist/primitives/ContextMenu/ContextMenu.js.map +1 -0
  263. package/dist/primitives/ContextMenu/ContextMenu.vue.d.ts +55 -0
  264. package/dist/primitives/ContextMenu/ContextMenu.vue.d.ts.map +1 -0
  265. package/dist/primitives/ContextMenu/ContextMenu.vue_vue_type_script_setup_true_lang.js +82 -0
  266. package/dist/primitives/ContextMenu/ContextMenu.vue_vue_type_script_setup_true_lang.js.map +1 -0
  267. package/dist/primitives/DatePicker/DatePicker.js +7 -0
  268. package/dist/primitives/DatePicker/DatePicker.js.map +1 -0
  269. package/dist/primitives/DatePicker/DatePicker.vue.d.ts +102 -0
  270. package/dist/primitives/DatePicker/DatePicker.vue.d.ts.map +1 -0
  271. package/dist/primitives/DatePicker/DatePicker.vue_vue_type_script_setup_true_lang.js +292 -0
  272. package/dist/primitives/DatePicker/DatePicker.vue_vue_type_script_setup_true_lang.js.map +1 -0
  273. package/dist/primitives/DateRangePicker/DateRangePicker.js +7 -0
  274. package/dist/primitives/DateRangePicker/DateRangePicker.js.map +1 -0
  275. package/dist/primitives/DateRangePicker/DateRangePicker.vue.d.ts +173 -0
  276. package/dist/primitives/DateRangePicker/DateRangePicker.vue.d.ts.map +1 -0
  277. package/dist/primitives/DateRangePicker/DateRangePicker.vue_vue_type_script_setup_true_lang.js +412 -0
  278. package/dist/primitives/DateRangePicker/DateRangePicker.vue_vue_type_script_setup_true_lang.js.map +1 -0
  279. package/dist/primitives/DateTimePicker/DateTimePicker.js +7 -0
  280. package/dist/primitives/DateTimePicker/DateTimePicker.js.map +1 -0
  281. package/dist/primitives/DateTimePicker/DateTimePicker.vue.d.ts +113 -0
  282. package/dist/primitives/DateTimePicker/DateTimePicker.vue.d.ts.map +1 -0
  283. package/dist/primitives/DateTimePicker/DateTimePicker.vue_vue_type_script_setup_true_lang.js +358 -0
  284. package/dist/primitives/DateTimePicker/DateTimePicker.vue_vue_type_script_setup_true_lang.js.map +1 -0
  285. package/dist/primitives/DateTimeRangePicker/DateTimeRangePicker.js +7 -0
  286. package/dist/primitives/DateTimeRangePicker/DateTimeRangePicker.js.map +1 -0
  287. package/dist/primitives/DateTimeRangePicker/DateTimeRangePicker.vue.d.ts +181 -0
  288. package/dist/primitives/DateTimeRangePicker/DateTimeRangePicker.vue.d.ts.map +1 -0
  289. package/dist/primitives/DateTimeRangePicker/DateTimeRangePicker.vue_vue_type_script_setup_true_lang.js +562 -0
  290. package/dist/primitives/DateTimeRangePicker/DateTimeRangePicker.vue_vue_type_script_setup_true_lang.js.map +1 -0
  291. package/dist/primitives/Dialog/Dialog.js +2 -2
  292. package/dist/primitives/Dialog/Dialog.js.map +1 -1
  293. package/dist/primitives/Dialog/Dialog.vue.d.ts +39 -0
  294. package/dist/primitives/Dialog/Dialog.vue.d.ts.map +1 -1
  295. package/dist/primitives/Dialog/Dialog.vue_vue_type_script_setup_true_lang.js +14 -5
  296. package/dist/primitives/Dialog/Dialog.vue_vue_type_script_setup_true_lang.js.map +1 -1
  297. package/dist/primitives/Drawer/Drawer.js +7 -0
  298. package/dist/primitives/Drawer/Drawer.js.map +1 -0
  299. package/dist/primitives/Drawer/Drawer.vue.d.ts +110 -0
  300. package/dist/primitives/Drawer/Drawer.vue.d.ts.map +1 -0
  301. package/dist/primitives/Drawer/Drawer.vue_vue_type_script_setup_true_lang.js +223 -0
  302. package/dist/primitives/Drawer/Drawer.vue_vue_type_script_setup_true_lang.js.map +1 -0
  303. package/dist/primitives/DropdownMenu/DropdownMenu.js.map +1 -1
  304. package/dist/primitives/DropdownMenu/DropdownMenu.vue.d.ts.map +1 -1
  305. package/dist/primitives/DropdownMenu/DropdownMenu.vue_vue_type_script_setup_true_lang.js +2 -2
  306. package/dist/primitives/DropdownMenu/DropdownMenu.vue_vue_type_script_setup_true_lang.js.map +1 -1
  307. package/dist/primitives/Editable/Editable.js +7 -0
  308. package/dist/primitives/Editable/Editable.js.map +1 -0
  309. package/dist/primitives/Editable/Editable.vue.d.ts +200 -0
  310. package/dist/primitives/Editable/Editable.vue.d.ts.map +1 -0
  311. package/dist/primitives/Editable/Editable.vue_vue_type_script_setup_true_lang.js +275 -0
  312. package/dist/primitives/Editable/Editable.vue_vue_type_script_setup_true_lang.js.map +1 -0
  313. package/dist/primitives/Field/Field.js.map +1 -1
  314. package/dist/primitives/Field/Field.vue.d.ts +32 -17
  315. package/dist/primitives/Field/Field.vue.d.ts.map +1 -1
  316. package/dist/primitives/Field/Field.vue_vue_type_script_setup_true_lang.js +51 -18
  317. package/dist/primitives/Field/Field.vue_vue_type_script_setup_true_lang.js.map +1 -1
  318. package/dist/primitives/Fieldset/Fieldset.js +7 -0
  319. package/dist/primitives/Fieldset/Fieldset.js.map +1 -0
  320. package/dist/primitives/Fieldset/Fieldset.vue.d.ts +91 -0
  321. package/dist/primitives/Fieldset/Fieldset.vue.d.ts.map +1 -0
  322. package/dist/primitives/Fieldset/Fieldset.vue_vue_type_script_setup_true_lang.js +138 -0
  323. package/dist/primitives/Fieldset/Fieldset.vue_vue_type_script_setup_true_lang.js.map +1 -0
  324. package/dist/primitives/FileUpload/FileUpload.js +7 -0
  325. package/dist/primitives/FileUpload/FileUpload.js.map +1 -0
  326. package/dist/primitives/FileUpload/FileUpload.vue.d.ts +132 -0
  327. package/dist/primitives/FileUpload/FileUpload.vue.d.ts.map +1 -0
  328. package/dist/primitives/FileUpload/FileUpload.vue_vue_type_script_setup_true_lang.js +359 -0
  329. package/dist/primitives/FileUpload/FileUpload.vue_vue_type_script_setup_true_lang.js.map +1 -0
  330. package/dist/primitives/HoverCard/HoverCard.js +7 -0
  331. package/dist/primitives/HoverCard/HoverCard.js.map +1 -0
  332. package/dist/primitives/HoverCard/HoverCard.vue.d.ts +68 -0
  333. package/dist/primitives/HoverCard/HoverCard.vue.d.ts.map +1 -0
  334. package/dist/primitives/HoverCard/HoverCard.vue_vue_type_script_setup_true_lang.js +62 -0
  335. package/dist/primitives/HoverCard/HoverCard.vue_vue_type_script_setup_true_lang.js.map +1 -0
  336. package/dist/primitives/IconButton/IconButton.js +7 -0
  337. package/dist/primitives/IconButton/IconButton.js.map +1 -0
  338. package/dist/primitives/IconButton/IconButton.vue.d.ts +45 -0
  339. package/dist/primitives/IconButton/IconButton.vue.d.ts.map +1 -0
  340. package/dist/primitives/IconButton/IconButton.vue_vue_type_script_setup_true_lang.js +58 -0
  341. package/dist/primitives/IconButton/IconButton.vue_vue_type_script_setup_true_lang.js.map +1 -0
  342. package/dist/primitives/Indicator/Indicator.js +7 -0
  343. package/dist/primitives/Indicator/Indicator.js.map +1 -0
  344. package/dist/primitives/Indicator/Indicator.vue.d.ts +144 -0
  345. package/dist/primitives/Indicator/Indicator.vue.d.ts.map +1 -0
  346. package/dist/primitives/Indicator/Indicator.vue_vue_type_script_setup_true_lang.js +198 -0
  347. package/dist/primitives/Indicator/Indicator.vue_vue_type_script_setup_true_lang.js.map +1 -0
  348. package/dist/primitives/Link/Link.js +7 -0
  349. package/dist/primitives/Link/Link.js.map +1 -0
  350. package/dist/primitives/Link/Link.vue.d.ts +46 -0
  351. package/dist/primitives/Link/Link.vue.d.ts.map +1 -0
  352. package/dist/primitives/Link/Link.vue_vue_type_script_setup_true_lang.js +85 -0
  353. package/dist/primitives/Link/Link.vue_vue_type_script_setup_true_lang.js.map +1 -0
  354. package/dist/primitives/Menubar/Menubar.js.map +1 -1
  355. package/dist/primitives/Menubar/Menubar.vue.d.ts.map +1 -1
  356. package/dist/primitives/Menubar/Menubar.vue_vue_type_script_setup_true_lang.js +1 -1
  357. package/dist/primitives/Menubar/Menubar.vue_vue_type_script_setup_true_lang.js.map +1 -1
  358. package/dist/primitives/NumberField/NumberField.js +2 -2
  359. package/dist/primitives/NumberField/NumberField.js.map +1 -1
  360. package/dist/primitives/NumberField/NumberField.vue.d.ts +86 -25
  361. package/dist/primitives/NumberField/NumberField.vue.d.ts.map +1 -1
  362. package/dist/primitives/NumberField/NumberField.vue_vue_type_script_setup_true_lang.js +83 -39
  363. package/dist/primitives/NumberField/NumberField.vue_vue_type_script_setup_true_lang.js.map +1 -1
  364. package/dist/primitives/OtpInput/OtpInput.js +7 -0
  365. package/dist/primitives/OtpInput/OtpInput.js.map +1 -0
  366. package/dist/primitives/OtpInput/OtpInput.vue.d.ts +110 -0
  367. package/dist/primitives/OtpInput/OtpInput.vue.d.ts.map +1 -0
  368. package/dist/primitives/OtpInput/OtpInput.vue_vue_type_script_setup_true_lang.js +130 -0
  369. package/dist/primitives/OtpInput/OtpInput.vue_vue_type_script_setup_true_lang.js.map +1 -0
  370. package/dist/primitives/Pagination/Pagination.js +7 -0
  371. package/dist/primitives/Pagination/Pagination.js.map +1 -0
  372. package/dist/primitives/Pagination/Pagination.vue.d.ts +143 -0
  373. package/dist/primitives/Pagination/Pagination.vue.d.ts.map +1 -0
  374. package/dist/primitives/Pagination/Pagination.vue_vue_type_script_setup_true_lang.js +231 -0
  375. package/dist/primitives/Pagination/Pagination.vue_vue_type_script_setup_true_lang.js.map +1 -0
  376. package/dist/primitives/Progress/Progress.js +2 -2
  377. package/dist/primitives/Progress/Progress.js.map +1 -1
  378. package/dist/primitives/Progress/Progress.vue.d.ts +81 -15
  379. package/dist/primitives/Progress/Progress.vue.d.ts.map +1 -1
  380. package/dist/primitives/Progress/Progress.vue_vue_type_script_setup_true_lang.js +88 -22
  381. package/dist/primitives/Progress/Progress.vue_vue_type_script_setup_true_lang.js.map +1 -1
  382. package/dist/primitives/RadialProgress/RadialProgress.js +7 -0
  383. package/dist/primitives/RadialProgress/RadialProgress.js.map +1 -0
  384. package/dist/primitives/RadialProgress/RadialProgress.vue.d.ts +96 -0
  385. package/dist/primitives/RadialProgress/RadialProgress.vue.d.ts.map +1 -0
  386. package/dist/primitives/RadialProgress/RadialProgress.vue_vue_type_script_setup_true_lang.js +189 -0
  387. package/dist/primitives/RadialProgress/RadialProgress.vue_vue_type_script_setup_true_lang.js.map +1 -0
  388. package/dist/primitives/RadioGroup/RadioGroup.js.map +1 -1
  389. package/dist/primitives/RadioGroup/RadioGroup.vue.d.ts +7 -7
  390. package/dist/primitives/RadioGroup/RadioGroup.vue.d.ts.map +1 -1
  391. package/dist/primitives/RadioGroup/RadioGroup.vue_vue_type_script_setup_true_lang.js +26 -9
  392. package/dist/primitives/RadioGroup/RadioGroup.vue_vue_type_script_setup_true_lang.js.map +1 -1
  393. package/dist/primitives/Rating/Rating.js +7 -0
  394. package/dist/primitives/Rating/Rating.js.map +1 -0
  395. package/dist/primitives/Rating/Rating.vue.d.ts +113 -0
  396. package/dist/primitives/Rating/Rating.vue.d.ts.map +1 -0
  397. package/dist/primitives/Rating/Rating.vue_vue_type_script_setup_true_lang.js +282 -0
  398. package/dist/primitives/Rating/Rating.vue_vue_type_script_setup_true_lang.js.map +1 -0
  399. package/dist/primitives/ScrollArea/ScrollArea.js +7 -0
  400. package/dist/primitives/ScrollArea/ScrollArea.js.map +1 -0
  401. package/dist/primitives/ScrollArea/ScrollArea.vue.d.ts +25 -0
  402. package/dist/primitives/ScrollArea/ScrollArea.vue.d.ts.map +1 -0
  403. package/dist/primitives/ScrollArea/ScrollArea.vue_vue_type_script_setup_true_lang.js +45 -0
  404. package/dist/primitives/ScrollArea/ScrollArea.vue_vue_type_script_setup_true_lang.js.map +1 -0
  405. package/dist/primitives/SegmentedControl/SegmentedControl.js.map +1 -1
  406. package/dist/primitives/SegmentedControl/SegmentedControl.vue.d.ts +5 -5
  407. package/dist/primitives/SegmentedControl/SegmentedControl.vue.d.ts.map +1 -1
  408. package/dist/primitives/SegmentedControl/SegmentedControl.vue_vue_type_script_setup_true_lang.js +51 -8
  409. package/dist/primitives/SegmentedControl/SegmentedControl.vue_vue_type_script_setup_true_lang.js.map +1 -1
  410. package/dist/primitives/Select/Select.js.map +1 -1
  411. package/dist/primitives/Select/Select.vue.d.ts +10 -10
  412. package/dist/primitives/Select/Select.vue.d.ts.map +1 -1
  413. package/dist/primitives/Select/Select.vue_vue_type_script_setup_true_lang.js +105 -52
  414. package/dist/primitives/Select/Select.vue_vue_type_script_setup_true_lang.js.map +1 -1
  415. package/dist/primitives/Skeleton/Skeleton.vue.d.ts +1 -1
  416. package/dist/primitives/Slider/Slider.js.map +1 -1
  417. package/dist/primitives/Slider/Slider.vue.d.ts +24 -4
  418. package/dist/primitives/Slider/Slider.vue.d.ts.map +1 -1
  419. package/dist/primitives/Slider/Slider.vue_vue_type_script_setup_true_lang.js +79 -9
  420. package/dist/primitives/Slider/Slider.vue_vue_type_script_setup_true_lang.js.map +1 -1
  421. package/dist/primitives/SpeedDial/SpeedDial.js +7 -0
  422. package/dist/primitives/SpeedDial/SpeedDial.js.map +1 -0
  423. package/dist/primitives/SpeedDial/SpeedDial.vue.d.ts +58 -0
  424. package/dist/primitives/SpeedDial/SpeedDial.vue.d.ts.map +1 -0
  425. package/dist/primitives/SpeedDial/SpeedDial.vue_vue_type_script_setup_true_lang.js +175 -0
  426. package/dist/primitives/SpeedDial/SpeedDial.vue_vue_type_script_setup_true_lang.js.map +1 -0
  427. package/dist/primitives/Stepper/Stepper.js +7 -0
  428. package/dist/primitives/Stepper/Stepper.js.map +1 -0
  429. package/dist/primitives/Stepper/Stepper.vue.d.ts +119 -0
  430. package/dist/primitives/Stepper/Stepper.vue.d.ts.map +1 -0
  431. package/dist/primitives/Stepper/Stepper.vue_vue_type_script_setup_true_lang.js +202 -0
  432. package/dist/primitives/Stepper/Stepper.vue_vue_type_script_setup_true_lang.js.map +1 -0
  433. package/dist/primitives/Switch/Switch.js.map +1 -1
  434. package/dist/primitives/Switch/Switch.vue.d.ts +13 -3
  435. package/dist/primitives/Switch/Switch.vue.d.ts.map +1 -1
  436. package/dist/primitives/Switch/Switch.vue_vue_type_script_setup_true_lang.js +34 -5
  437. package/dist/primitives/Switch/Switch.vue_vue_type_script_setup_true_lang.js.map +1 -1
  438. package/dist/primitives/Tabs/Tabs.js.map +1 -1
  439. package/dist/primitives/Tabs/Tabs.vue.d.ts.map +1 -1
  440. package/dist/primitives/Tabs/Tabs.vue_vue_type_script_setup_true_lang.js +1 -1
  441. package/dist/primitives/Tabs/Tabs.vue_vue_type_script_setup_true_lang.js.map +1 -1
  442. package/dist/primitives/TagsInput/TagsInput.js +7 -0
  443. package/dist/primitives/TagsInput/TagsInput.js.map +1 -0
  444. package/dist/primitives/TagsInput/TagsInput.vue.d.ts +156 -0
  445. package/dist/primitives/TagsInput/TagsInput.vue.d.ts.map +1 -0
  446. package/dist/primitives/TagsInput/TagsInput.vue_vue_type_script_setup_true_lang.js +387 -0
  447. package/dist/primitives/TagsInput/TagsInput.vue_vue_type_script_setup_true_lang.js.map +1 -0
  448. package/dist/primitives/TextField/TextField.js +2 -2
  449. package/dist/primitives/TextField/TextField.js.map +1 -1
  450. package/dist/primitives/TextField/TextField.vue.d.ts +119 -10
  451. package/dist/primitives/TextField/TextField.vue.d.ts.map +1 -1
  452. package/dist/primitives/TextField/TextField.vue_vue_type_script_setup_true_lang.js +270 -21
  453. package/dist/primitives/TextField/TextField.vue_vue_type_script_setup_true_lang.js.map +1 -1
  454. package/dist/primitives/Textarea/Textarea.js +2 -2
  455. package/dist/primitives/Textarea/Textarea.js.map +1 -1
  456. package/dist/primitives/Textarea/Textarea.vue.d.ts +114 -14
  457. package/dist/primitives/Textarea/Textarea.vue.d.ts.map +1 -1
  458. package/dist/primitives/Textarea/Textarea.vue_vue_type_script_setup_true_lang.js +216 -20
  459. package/dist/primitives/Textarea/Textarea.vue_vue_type_script_setup_true_lang.js.map +1 -1
  460. package/dist/primitives/TimePicker/TimePicker.js +7 -0
  461. package/dist/primitives/TimePicker/TimePicker.js.map +1 -0
  462. package/dist/primitives/TimePicker/TimePicker.vue.d.ts +111 -0
  463. package/dist/primitives/TimePicker/TimePicker.vue.d.ts.map +1 -0
  464. package/dist/primitives/TimePicker/TimePicker.vue_vue_type_script_setup_true_lang.js +185 -0
  465. package/dist/primitives/TimePicker/TimePicker.vue_vue_type_script_setup_true_lang.js.map +1 -0
  466. package/dist/primitives/Toast/Toast.js +2 -1
  467. package/dist/primitives/Toast/Toast.js.map +1 -1
  468. package/dist/primitives/Toast/Toast.vue.d.ts +29 -3
  469. package/dist/primitives/Toast/Toast.vue.d.ts.map +1 -1
  470. package/dist/primitives/Toast/Toast.vue_vue_type_script_setup_true_lang.js +17 -7
  471. package/dist/primitives/Toast/Toast.vue_vue_type_script_setup_true_lang.js.map +1 -1
  472. package/dist/primitives/Toast/ToastItem.js +2 -2
  473. package/dist/primitives/Toast/ToastItem.js.map +1 -1
  474. package/dist/primitives/Toast/ToastItem.vue.d.ts +69 -12
  475. package/dist/primitives/Toast/ToastItem.vue.d.ts.map +1 -1
  476. package/dist/primitives/Toast/ToastItem.vue_vue_type_script_setup_true_lang.js +23 -23
  477. package/dist/primitives/Toast/ToastItem.vue_vue_type_script_setup_true_lang.js.map +1 -1
  478. package/dist/primitives/Tooltip/Tooltip.vue.d.ts +1 -1
  479. package/dist/primitives/Tooltip/Tooltip.vue.d.ts.map +1 -1
  480. package/dist/primitives/WindowControls/WindowControls.js +2 -2
  481. package/dist/primitives/WindowControls/WindowControls.js.map +1 -1
  482. package/dist/primitives/WindowControls/WindowControls.vue.d.ts +66 -10
  483. package/dist/primitives/WindowControls/WindowControls.vue.d.ts.map +1 -1
  484. package/dist/primitives/WindowControls/WindowControls.vue_vue_type_script_setup_true_lang.js +23 -13
  485. package/dist/primitives/WindowControls/WindowControls.vue_vue_type_script_setup_true_lang.js.map +1 -1
  486. package/dist/styles/global.css +116 -17
  487. package/dist/styles/theme.contrast.test.ts +460 -0
  488. package/dist/styles/theme.css +239 -41
  489. package/dist/theme.js +171 -0
  490. package/dist/theme.js.map +1 -0
  491. package/package.json +14 -4
  492. package/dist/icons/BrandMark.d.ts +0 -18
  493. package/dist/icons/BrandMark.d.ts.map +0 -1
  494. package/dist/icons/BrandMark.js +0 -47
  495. package/dist/icons/BrandMark.js.map +0 -1
@@ -1 +1 @@
1
- {"version":3,"file":"ToastItem.js","names":[],"sources":["../../../src/primitives/Toast/ToastItem.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport { computed } from \"vue\";\nimport { ToastRoot, ToastTitle, ToastDescription, ToastAction, ToastClose } from \"reka-ui\";\nimport { Info, CircleCheck, TriangleAlert, CircleX, Sparkles, X } from \"@lucide/vue\";\nimport { cn } from \"../../lib/cn\";\nimport { optional } from \"../../lib/props\";\nimport type { ToastVariant } from \"./Toast.vue\";\n\n/**\n * ToastItem — one toast card (ToastRoot + Loom treatment), INTERNAL to\n * the design system. It must live inside a `ToastProvider` whose\n * `ToastViewport` it teleports into: `Toast` bundles that pair for the\n * standalone case. Not exported from the barrel — hosts use `Toast`.\n */\nconst props = withDefaults(\n defineProps<{\n /** Controls visibility; pair with `v-model:open`. Omit to let the toast own its own open state. */\n open?: boolean | undefined;\n /** The toast's headline — always shown. */\n title: string;\n /** An optional second line of detail below the title. */\n description?: string;\n /** Selects the accent icon and colour. */\n variant?: ToastVariant;\n /** ms before auto-dismiss; the Reka default pauses on hover/focus. */\n duration?: number;\n /** Shows the ✕ close button. */\n closable?: boolean;\n /** Renders a single inline action button; emits `action` when pressed. */\n actionLabel?: string;\n }>(),\n {\n // See Toast.vue: `undefined` is the uncontrolled state, and only an\n // explicit default keeps it reachable past Vue's Boolean casting.\n open: undefined,\n variant: \"info\",\n duration: 5000,\n closable: true,\n },\n);\n\ndefineEmits<{ \"update:open\": [value: boolean]; action: [] }>();\n\n// `satisfies` binds this map to ToastVariant so a variant added to the type\n// without a matching entry here fails at compile time (Button's own idiom).\nconst toastAccents = {\n info: { icon: Info, color: \"text-info\" },\n success: { icon: CircleCheck, color: \"text-success\" },\n warning: { icon: TriangleAlert, color: \"text-warning\" },\n destructive: { icon: CircleX, color: \"text-destructive\" },\n ai: { icon: Sparkles, color: \"text-primary\" },\n} satisfies Record<ToastVariant, { icon: typeof Info; color: string }>;\n\nconst accent = computed(() => toastAccents[props.variant]);\n</script>\n\n<template>\n <!-- The slide-in animation rides this inner card, never ToastRoot: Reka\n drives ToastRoot's own transform for the swipe-to-dismiss gesture, so a\n filled entrance transform there would freeze the swipe. ToastRoot itself\n carries no animation, so Reka Presence unmounts it immediately on close. -->\n <ToastRoot\n v-bind=\"optional({ open })\"\n :duration=\"duration\"\n class=\"outline-none\"\n @update:open=\"$emit('update:open', $event)\"\n >\n <div\n :class=\"\n cn(\n 'relative flex animate-toast-in items-start gap-3 rounded-md border border-border bg-popover p-3 pr-8 text-popover-foreground shadow-lg',\n // Agent emission (Signature law): an AI-authored toast breathes a\n // Conduct pulse the one variant driven by an agent, made visible.\n variant === 'ai' && 'border-primary/40',\n )\n \"\n >\n <span\n v-if=\"variant === 'ai'\"\n aria-hidden=\"true\"\n class=\"pointer-events-none absolute inset-0 rounded-md animate-conduct\"\n />\n <component\n :is=\"accent.icon\"\n :class=\"cn('mt-0.5 h-4 w-4 shrink-0', accent.color)\"\n aria-hidden=\"true\"\n />\n <div class=\"min-w-0 flex-1\">\n <ToastTitle class=\"text-sm font-medium\">{{ title }}</ToastTitle>\n <ToastDescription v-if=\"description\" class=\"mt-0.5 text-xs text-muted-foreground\">\n {{ description }}\n </ToastDescription>\n </div>\n\n <ToastAction v-if=\"actionLabel\" :alt-text=\"actionLabel\" as-child @click=\"$emit('action')\">\n <button\n type=\"button\"\n class=\"shrink-0 rounded-sm px-2 py-1 text-xs font-medium text-primary transition-colors duration-fast ease-out hover:bg-subtle focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-ring\"\n >\n {{ actionLabel }}\n </button>\n </ToastAction>\n\n <ToastClose\n v-if=\"closable\"\n aria-label=\"Close\"\n class=\"absolute right-2 top-2 inline-flex h-6 w-6 items-center justify-center rounded-sm text-muted-foreground transition-colors duration-fast ease-out hover:bg-subtle hover:text-foreground focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-ring\"\n >\n <X class=\"h-3.5 w-3.5\" />\n </ToastClose>\n </div>\n </ToastRoot>\n</template>\n"],"mappings":""}
1
+ {"version":3,"file":"ToastItem.js","names":[],"sources":["../../../src/primitives/Toast/ToastItem.vue"],"sourcesContent":["<script lang=\"ts\">\nimport type { LabelOf } from \"../../lib/labels\";\n\n/**\n * Everything a toast publishes that is not the host's own copy — including the\n * two strings Reka UI would otherwise supply in English of its own accord.\n *\n * Declared here rather than in `Toast.vue`, which is where a reader would look\n * for it, and the reason is a module cycle rather than a preference.\n * `Toast.vue` imports this file; this file needs the defaults for the close\n * control it renders. Declaring them in `Toast.vue` and importing them back\n * would make that a real runtime cycle where today it is a type-only one, and\n * it would cost the block that reuses this card — `ToastStack` mounts\n * `ToastItem` directly through its own provider — the whole seam. Owning them\n * here means every card resolves its own names wherever it is mounted.\n *\n * `announce` and `region` are not decoration. Reka's `ToastProvider` defaults\n * its `label` to \"Notification\" and reads it out ahead of every toast's own\n * text in a hidden live region; its `ToastViewport` names the list\n * \"Notifications ({hotkey})\". Both are real props rather than hard-coded\n * vnode attributes, so these are set rather than overridden — but leaving\n * either unset falls back to English, not to nothing.\n */\nexport interface ToastLabels {\n /** The ✕ control on the card. */\n readonly close: string;\n /**\n * Spoken before each toast's own title, in a hidden live region, to say what\n * kind of thing has just arrived. Keep it to one word — it is a prefix on\n * every announcement, not a sentence.\n */\n readonly announce: string;\n /**\n * The name of the list the toasts stack in. `hotkey` is the key that focuses\n * it, as the environment reports it (\"F8\"), handed over raw so a language\n * can put it wherever it belongs in the phrase.\n */\n readonly region: LabelOf<{ hotkey: string }>;\n}\n\n/**\n * Loom's English, co-located with the component so it tree-shakes with it, and\n * exported so a host can build a partial vocabulary against the real thing.\n */\nexport const TOAST_LABELS: ToastLabels = {\n close: \"Close\",\n announce: \"Notification\",\n region: ({ hotkey }) => `Notifications (${hotkey})`,\n};\n</script>\n\n<script setup lang=\"ts\">\nimport { computed } from \"vue\";\nimport { ToastRoot, ToastTitle, ToastDescription, ToastAction, ToastClose } from \"reka-ui\";\nimport { useLabels, type LabelOverrides } from \"../../lib/labels\";\nimport { Info, CircleCheck, TriangleAlert, CircleX, Sparkles, X } from \"@lucide/vue\";\nimport { cn } from \"../../lib/cn\";\nimport { optional } from \"../../lib/props\";\nimport type { ToastVariant } from \"./Toast.vue\";\n\n/**\n * ToastItem — one toast card (ToastRoot + Loom treatment), INTERNAL to\n * the design system. It must live inside a `ToastProvider` whose\n * `ToastViewport` it teleports into: `Toast` bundles that pair for the\n * standalone case. Not exported from the barrel — hosts use `Toast`.\n */\nconst props = withDefaults(\n defineProps<{\n /** Controls visibility; pair with `v-model:open`. Omit to let the toast own its own open state. */\n open?: boolean | undefined;\n /** The toast's headline — always shown. */\n title: string;\n /** An optional second line of detail below the title. */\n description?: string;\n /** Selects the accent icon and colour. */\n variant?: ToastVariant;\n /** ms before auto-dismiss; the Reka default pauses on hover/focus. */\n duration?: number;\n /** Shows the ✕ close button. */\n closable?: boolean;\n /** Renders a single inline action button; emits `action` when pressed. */\n actionLabel?: string;\n /** Names for what the card says on its own account, as any subset of `ToastLabels`. */\n labels?: LabelOverrides<ToastLabels>;\n }>(),\n {\n // See Toast.vue: `undefined` is the uncontrolled state, and only an\n // explicit default keeps it reachable past Vue's Boolean casting.\n open: undefined,\n variant: \"info\",\n duration: 5000,\n closable: true,\n },\n);\n\ndefineEmits<{ \"update:open\": [value: boolean]; action: [] }>();\n\n// `text`, not `labels`: the prop of that name is one of the three sources this\n// resolves, and a template reading the raw prop would be reading the overrides\n// rather than the answer.\nconst text = useLabels(\"toast\", TOAST_LABELS, () => props.labels);\n\n// `satisfies` binds this map to ToastVariant so a variant added to the type\n// without a matching entry here fails at compile time (Button's own idiom).\nconst toastAccents = {\n info: { icon: Info, color: \"text-info\" },\n success: { icon: CircleCheck, color: \"text-success\" },\n warning: { icon: TriangleAlert, color: \"text-warning\" },\n destructive: { icon: CircleX, color: \"text-destructive\" },\n accent: { icon: Sparkles, color: \"text-primary\" },\n} satisfies Record<ToastVariant, { icon: typeof Info; color: string }>;\n\nconst accent = computed(() => toastAccents[props.variant]);\n</script>\n\n<template>\n <!-- The slide-in animation rides this inner card, never ToastRoot: Reka\n drives ToastRoot's own transform for the swipe-to-dismiss gesture, so a\n filled entrance transform there would freeze the swipe. ToastRoot itself\n carries no animation, so Reka Presence unmounts it immediately on close. -->\n <ToastRoot\n v-bind=\"optional({ open })\"\n :duration=\"duration\"\n class=\"outline-none\"\n @update:open=\"$emit('update:open', $event)\"\n >\n <div\n :class=\"\n cn(\n 'relative flex animate-toast-in items-start gap-3 rounded-md border border-border bg-popover p-3 pr-8 text-popover-foreground shadow-lg',\n // Accent variant: a highlighted border to draw attention to the\n // toast's distinctiveness from the standard variants.\n variant === 'accent' && 'border-primary/40',\n )\n \"\n >\n <component\n :is=\"accent.icon\"\n :class=\"cn('mt-0.5 h-4 w-4 shrink-0', accent.color)\"\n aria-hidden=\"true\"\n />\n <div class=\"min-w-0 flex-1\">\n <ToastTitle class=\"text-sm font-medium\">{{ title }}</ToastTitle>\n <ToastDescription v-if=\"description\" class=\"mt-0.5 text-xs text-muted-foreground\">\n {{ description }}\n </ToastDescription>\n </div>\n\n <ToastAction v-if=\"actionLabel\" :alt-text=\"actionLabel\" as-child @click=\"$emit('action')\">\n <button\n type=\"button\"\n class=\"shrink-0 rounded-sm px-2 py-1 text-xs font-medium text-primary transition-colors duration-fast ease-out hover:bg-subtle focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-ring\"\n >\n {{ actionLabel }}\n </button>\n </ToastAction>\n\n <ToastClose\n v-if=\"closable\"\n :aria-label=\"text.close\"\n class=\"absolute right-2 top-2 inline-flex h-6 w-6 items-center justify-center rounded-sm text-muted-foreground transition-colors duration-fast ease-out hover:bg-subtle hover:text-foreground focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-ring\"\n >\n <X class=\"h-3.5 w-3.5\" />\n </ToastClose>\n </div>\n </ToastRoot>\n</template>\n"],"mappings":""}
@@ -1,11 +1,52 @@
1
+ import { type LabelOverrides } from "../../lib/labels";
1
2
  import type { ToastVariant } from "./Toast.vue";
3
+ import type { LabelOf } from "../../lib/labels";
2
4
  /**
3
- * ToastItem one toast card (ToastRoot + Loom treatment), INTERNAL to
4
- * the design system. It must live inside a `ToastProvider` whose
5
- * `ToastViewport` it teleports into: `Toast` bundles that pair for the
6
- * standalone case. Not exported from the barrel hosts use `Toast`.
5
+ * Everything a toast publishes that is not the host's own copy — including the
6
+ * two strings Reka UI would otherwise supply in English of its own accord.
7
+ *
8
+ * Declared here rather than in `Toast.vue`, which is where a reader would look
9
+ * for it, and the reason is a module cycle rather than a preference.
10
+ * `Toast.vue` imports this file; this file needs the defaults for the close
11
+ * control it renders. Declaring them in `Toast.vue` and importing them back
12
+ * would make that a real runtime cycle where today it is a type-only one, and
13
+ * it would cost the block that reuses this card — `ToastStack` mounts
14
+ * `ToastItem` directly through its own provider — the whole seam. Owning them
15
+ * here means every card resolves its own names wherever it is mounted.
16
+ *
17
+ * `announce` and `region` are not decoration. Reka's `ToastProvider` defaults
18
+ * its `label` to "Notification" and reads it out ahead of every toast's own
19
+ * text in a hidden live region; its `ToastViewport` names the list
20
+ * "Notifications ({hotkey})". Both are real props rather than hard-coded
21
+ * vnode attributes, so these are set rather than overridden — but leaving
22
+ * either unset falls back to English, not to nothing.
7
23
  */
8
- type __VLS_Props = {
24
+ export interface ToastLabels {
25
+ /** The ✕ control on the card. */
26
+ readonly close: string;
27
+ /**
28
+ * Spoken before each toast's own title, in a hidden live region, to say what
29
+ * kind of thing has just arrived. Keep it to one word — it is a prefix on
30
+ * every announcement, not a sentence.
31
+ */
32
+ readonly announce: string;
33
+ /**
34
+ * The name of the list the toasts stack in. `hotkey` is the key that focuses
35
+ * it, as the environment reports it ("F8"), handed over raw so a language
36
+ * can put it wherever it belongs in the phrase.
37
+ */
38
+ readonly region: LabelOf<{
39
+ hotkey: string;
40
+ }>;
41
+ }
42
+ /**
43
+ * Loom's English, co-located with the component so it tree-shakes with it, and
44
+ * exported so a host can build a partial vocabulary against the real thing.
45
+ */
46
+ export declare const TOAST_LABELS: ToastLabels;
47
+ declare const _default: typeof __VLS_export;
48
+ export default _default;
49
+ declare const __VLS_export: import("vue").DefineComponent<{
9
50
  /** Controls visibility; pair with `v-model:open`. Omit to let the toast own its own open state. */
10
51
  open?: boolean | undefined;
11
52
  /** The toast's headline — always shown. */
@@ -20,19 +61,35 @@ type __VLS_Props = {
20
61
  closable?: boolean;
21
62
  /** Renders a single inline action button; emits `action` when pressed. */
22
63
  actionLabel?: string;
23
- };
24
- declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
64
+ /** Names for what the card says on its own account, as any subset of `ToastLabels`. */
65
+ labels?: LabelOverrides<ToastLabels>;
66
+ }, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
25
67
  "update:open": (value: boolean) => any;
26
68
  action: () => any;
27
- }, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
69
+ }, string, import("vue").PublicProps, Readonly<{
70
+ /** Controls visibility; pair with `v-model:open`. Omit to let the toast own its own open state. */
71
+ open?: boolean | undefined;
72
+ /** The toast's headline — always shown. */
73
+ title: string;
74
+ /** An optional second line of detail below the title. */
75
+ description?: string;
76
+ /** Selects the accent icon and colour. */
77
+ variant?: ToastVariant;
78
+ /** ms before auto-dismiss; the Reka default pauses on hover/focus. */
79
+ duration?: number;
80
+ /** Shows the ✕ close button. */
81
+ closable?: boolean;
82
+ /** Renders a single inline action button; emits `action` when pressed. */
83
+ actionLabel?: string;
84
+ /** Names for what the card says on its own account, as any subset of `ToastLabels`. */
85
+ labels?: LabelOverrides<ToastLabels>;
86
+ }> & Readonly<{
28
87
  "onUpdate:open"?: (value: boolean) => any;
29
88
  onAction?: () => any;
30
89
  }>, {
31
- variant: ToastVariant;
90
+ duration: number;
32
91
  open: boolean | undefined;
92
+ variant: ToastVariant;
33
93
  closable: boolean;
34
- duration: number;
35
94
  }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
36
- declare const _default: typeof __VLS_export;
37
- export default _default;
38
95
  //# sourceMappingURL=ToastItem.vue.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"ToastItem.vue.d.ts","sourceRoot":"","sources":["../../../src/primitives/Toast/ToastItem.vue"],"names":[],"mappings":"AAyHA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAEhD;;;;;GAKG;AACH,KAAK,WAAW,GAAG;IACf,mGAAmG;IACnG,IAAI,CAAC,EAAE,OAAO,GAAG,SAAS,CAAC;IAC3B,2CAA2C;IAC3C,KAAK,EAAE,MAAM,CAAC;IACd,yDAAyD;IACzD,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,0CAA0C;IAC1C,OAAO,CAAC,EAAE,YAAY,CAAC;IACvB,sEAAsE;IACtE,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,gCAAgC;IAChC,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,0EAA0E;IAC1E,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB,CAAC;AA8QJ,QAAA,MAAM,YAAY;;;;;;;aArRJ,YAAY;UANf,OAAO,GAAG,SAAS;cAUf,OAAO;cAFP,MAAM;6EAuRnB,CAAC;wBACkB,OAAO,YAAY;AAAxC,wBAAyC"}
1
+ {"version":3,"file":"ToastItem.vue.d.ts","sourceRoot":"","sources":["../../../src/primitives/Toast/ToastItem.vue"],"names":[],"mappings":"AA4KA,OAAO,EAAa,KAAK,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAIlE,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAGhD,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,kBAAkB,CAAC;AAEhD;;;;;;;;;;;;;;;;;;;GAmBG;AACH,MAAM,WAAW,WAAW;IAC1B,iCAAiC;IACjC,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACvB;;;;OAIG;IACH,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;IAC1B;;;;OAIG;IACH,QAAQ,CAAC,MAAM,EAAE,OAAO,CAAC;QAAE,MAAM,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC;CAC9C;AAED;;;GAGG;AACH,eAAO,MAAM,YAAY,EAAE,WAI1B,CAAC;wBACmB,OAAO,YAAY;AAAxC,wBAAyC;AACzC,QAAA,MAAM,YAAY;IAQd,mGAAmG;WAC5F,OAAO,GAAG,SAAS;IAC1B,2CAA2C;WACpC,MAAM;IACb,yDAAyD;kBAC3C,MAAM;IACpB,0CAA0C;cAChC,YAAY;IACtB,sEAAsE;eAC3D,MAAM;IACjB,gCAAgC;eACrB,OAAO;IAClB,0EAA0E;kBAC5D,MAAM;IACpB,uFAAuF;aAC9E,cAAc,CAAC,WAAW,CAAC;;;;;IAfpC,mGAAmG;WAC5F,OAAO,GAAG,SAAS;IAC1B,2CAA2C;WACpC,MAAM;IACb,yDAAyD;kBAC3C,MAAM;IACpB,0CAA0C;cAChC,YAAY;IACtB,sEAAsE;eAC3D,MAAM;IACjB,gCAAgC;eACrB,OAAO;IAClB,0EAA0E;kBAC5D,MAAM;IACpB,uFAAuF;aAC9E,cAAc,CAAC,WAAW,CAAC;;;;;cANzB,MAAM;UARV,OAAO,GAAG,SAAS;aAMhB,YAAY;cAIX,OAAO;6EAmRlB,CAAC"}
@@ -1,25 +1,24 @@
1
1
  import { cn } from "../../lib/cn.js";
2
2
  import { optional } from "../../lib/props.js";
3
+ import { useLabels } from "../../lib/labels.js";
3
4
  import { CircleCheck, CircleX, Info, Sparkles, TriangleAlert, X } from "@lucide/vue";
4
- import { computed, createBlock, createCommentVNode, createElementBlock, createElementVNode, createTextVNode, createVNode, defineComponent, mergeProps, normalizeClass, openBlock, resolveDynamicComponent, toDisplayString, unref, withCtx } from "vue";
5
+ import { computed, createBlock, createCommentVNode, createElementVNode, createTextVNode, createVNode, defineComponent, mergeProps, normalizeClass, openBlock, resolveDynamicComponent, toDisplayString, unref, withCtx } from "vue";
5
6
  import { ToastAction, ToastClose, ToastDescription, ToastRoot, ToastTitle } from "reka-ui";
6
7
  //#region src/primitives/Toast/ToastItem.vue?vue&type=script&setup=true&lang.ts
7
- var _hoisted_1 = {
8
- key: 0,
9
- "aria-hidden": "true",
10
- class: "pointer-events-none absolute inset-0 rounded-md animate-conduct"
11
- };
12
- var _hoisted_2 = { class: "min-w-0 flex-1" };
13
- var _hoisted_3 = {
8
+ var _hoisted_1 = { class: "min-w-0 flex-1" };
9
+ var _hoisted_2 = {
14
10
  type: "button",
15
11
  class: "shrink-0 rounded-sm px-2 py-1 text-xs font-medium text-primary transition-colors duration-fast ease-out hover:bg-subtle focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-ring"
16
12
  };
17
13
  /**
18
- * ToastItem one toast card (ToastRoot + Loom treatment), INTERNAL to
19
- * the design system. It must live inside a `ToastProvider` whose
20
- * `ToastViewport` it teleports into: `Toast` bundles that pair for the
21
- * standalone case. Not exported from the barrel — hosts use `Toast`.
14
+ * Loom's English, co-located with the component so it tree-shakes with it, and
15
+ * exported so a host can build a partial vocabulary against the real thing.
22
16
  */
17
+ var TOAST_LABELS = {
18
+ close: "Close",
19
+ announce: "Notification",
20
+ region: ({ hotkey }) => `Notifications (${hotkey})`
21
+ };
23
22
  var ToastItem_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ defineComponent({
24
23
  __name: "ToastItem",
25
24
  props: {
@@ -35,11 +34,13 @@ var ToastItem_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ define
35
34
  type: Boolean,
36
35
  default: true
37
36
  },
38
- actionLabel: {}
37
+ actionLabel: {},
38
+ labels: {}
39
39
  },
40
40
  emits: ["update:open", "action"],
41
41
  setup(__props) {
42
42
  const props = __props;
43
+ const text = useLabels("toast", TOAST_LABELS, () => props.labels);
43
44
  const toastAccents = {
44
45
  info: {
45
46
  icon: Info,
@@ -57,7 +58,7 @@ var ToastItem_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ define
57
58
  icon: CircleX,
58
59
  color: "text-destructive"
59
60
  },
60
- ai: {
61
+ accent: {
61
62
  icon: Sparkles,
62
63
  color: "text-primary"
63
64
  }
@@ -69,13 +70,12 @@ var ToastItem_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ define
69
70
  class: "outline-none",
70
71
  "onUpdate:open": _cache[1] || (_cache[1] = ($event) => _ctx.$emit("update:open", $event))
71
72
  }), {
72
- default: withCtx(() => [createElementVNode("div", { class: normalizeClass(unref(cn)("relative flex animate-toast-in items-start gap-3 rounded-md border border-border bg-popover p-3 pr-8 text-popover-foreground shadow-lg", __props.variant === "ai" && "border-primary/40")) }, [
73
- __props.variant === "ai" ? (openBlock(), createElementBlock("span", _hoisted_1)) : createCommentVNode("", true),
73
+ default: withCtx(() => [createElementVNode("div", { class: normalizeClass(unref(cn)("relative flex animate-toast-in items-start gap-3 rounded-md border border-border bg-popover p-3 pr-8 text-popover-foreground shadow-lg", __props.variant === "accent" && "border-primary/40")) }, [
74
74
  (openBlock(), createBlock(resolveDynamicComponent(accent.value.icon), {
75
75
  class: normalizeClass(unref(cn)("mt-0.5 h-4 w-4 shrink-0", accent.value.color)),
76
76
  "aria-hidden": "true"
77
77
  }, null, 8, ["class"])),
78
- createElementVNode("div", _hoisted_2, [createVNode(unref(ToastTitle), { class: "text-sm font-medium" }, {
78
+ createElementVNode("div", _hoisted_1, [createVNode(unref(ToastTitle), { class: "text-sm font-medium" }, {
79
79
  default: withCtx(() => [createTextVNode(toDisplayString(__props.title), 1)]),
80
80
  _: 1
81
81
  }), __props.description ? (openBlock(), createBlock(unref(ToastDescription), {
@@ -86,22 +86,22 @@ var ToastItem_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ define
86
86
  _: 1
87
87
  })) : createCommentVNode("", true)]),
88
88
  __props.actionLabel ? (openBlock(), createBlock(unref(ToastAction), {
89
- key: 1,
89
+ key: 0,
90
90
  "alt-text": __props.actionLabel,
91
91
  "as-child": "",
92
92
  onClick: _cache[0] || (_cache[0] = ($event) => _ctx.$emit("action"))
93
93
  }, {
94
- default: withCtx(() => [createElementVNode("button", _hoisted_3, toDisplayString(__props.actionLabel), 1)]),
94
+ default: withCtx(() => [createElementVNode("button", _hoisted_2, toDisplayString(__props.actionLabel), 1)]),
95
95
  _: 1
96
96
  }, 8, ["alt-text"])) : createCommentVNode("", true),
97
97
  __props.closable ? (openBlock(), createBlock(unref(ToastClose), {
98
- key: 2,
99
- "aria-label": "Close",
98
+ key: 1,
99
+ "aria-label": unref(text).close,
100
100
  class: "absolute right-2 top-2 inline-flex h-6 w-6 items-center justify-center rounded-sm text-muted-foreground transition-colors duration-fast ease-out hover:bg-subtle hover:text-foreground focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-ring"
101
101
  }, {
102
102
  default: withCtx(() => [createVNode(unref(X), { class: "h-3.5 w-3.5" })]),
103
103
  _: 1
104
- })) : createCommentVNode("", true)
104
+ }, 8, ["aria-label"])) : createCommentVNode("", true)
105
105
  ], 2)]),
106
106
  _: 1
107
107
  }, 16, ["duration"]);
@@ -109,6 +109,6 @@ var ToastItem_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ define
109
109
  }
110
110
  });
111
111
  //#endregion
112
- export { ToastItem_vue_vue_type_script_setup_true_lang_default as default };
112
+ export { TOAST_LABELS, ToastItem_vue_vue_type_script_setup_true_lang_default as default };
113
113
 
114
114
  //# sourceMappingURL=ToastItem.vue_vue_type_script_setup_true_lang.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"ToastItem.vue_vue_type_script_setup_true_lang.js","names":["$emit"],"sources":["../../../src/primitives/Toast/ToastItem.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport { computed } from \"vue\";\nimport { ToastRoot, ToastTitle, ToastDescription, ToastAction, ToastClose } from \"reka-ui\";\nimport { Info, CircleCheck, TriangleAlert, CircleX, Sparkles, X } from \"@lucide/vue\";\nimport { cn } from \"../../lib/cn\";\nimport { optional } from \"../../lib/props\";\nimport type { ToastVariant } from \"./Toast.vue\";\n\n/**\n * ToastItem — one toast card (ToastRoot + Loom treatment), INTERNAL to\n * the design system. It must live inside a `ToastProvider` whose\n * `ToastViewport` it teleports into: `Toast` bundles that pair for the\n * standalone case. Not exported from the barrel — hosts use `Toast`.\n */\nconst props = withDefaults(\n defineProps<{\n /** Controls visibility; pair with `v-model:open`. Omit to let the toast own its own open state. */\n open?: boolean | undefined;\n /** The toast's headline — always shown. */\n title: string;\n /** An optional second line of detail below the title. */\n description?: string;\n /** Selects the accent icon and colour. */\n variant?: ToastVariant;\n /** ms before auto-dismiss; the Reka default pauses on hover/focus. */\n duration?: number;\n /** Shows the ✕ close button. */\n closable?: boolean;\n /** Renders a single inline action button; emits `action` when pressed. */\n actionLabel?: string;\n }>(),\n {\n // See Toast.vue: `undefined` is the uncontrolled state, and only an\n // explicit default keeps it reachable past Vue's Boolean casting.\n open: undefined,\n variant: \"info\",\n duration: 5000,\n closable: true,\n },\n);\n\ndefineEmits<{ \"update:open\": [value: boolean]; action: [] }>();\n\n// `satisfies` binds this map to ToastVariant so a variant added to the type\n// without a matching entry here fails at compile time (Button's own idiom).\nconst toastAccents = {\n info: { icon: Info, color: \"text-info\" },\n success: { icon: CircleCheck, color: \"text-success\" },\n warning: { icon: TriangleAlert, color: \"text-warning\" },\n destructive: { icon: CircleX, color: \"text-destructive\" },\n ai: { icon: Sparkles, color: \"text-primary\" },\n} satisfies Record<ToastVariant, { icon: typeof Info; color: string }>;\n\nconst accent = computed(() => toastAccents[props.variant]);\n</script>\n\n<template>\n <!-- The slide-in animation rides this inner card, never ToastRoot: Reka\n drives ToastRoot's own transform for the swipe-to-dismiss gesture, so a\n filled entrance transform there would freeze the swipe. ToastRoot itself\n carries no animation, so Reka Presence unmounts it immediately on close. -->\n <ToastRoot\n v-bind=\"optional({ open })\"\n :duration=\"duration\"\n class=\"outline-none\"\n @update:open=\"$emit('update:open', $event)\"\n >\n <div\n :class=\"\n cn(\n 'relative flex animate-toast-in items-start gap-3 rounded-md border border-border bg-popover p-3 pr-8 text-popover-foreground shadow-lg',\n // Agent emission (Signature law): an AI-authored toast breathes a\n // Conduct pulse the one variant driven by an agent, made visible.\n variant === 'ai' && 'border-primary/40',\n )\n \"\n >\n <span\n v-if=\"variant === 'ai'\"\n aria-hidden=\"true\"\n class=\"pointer-events-none absolute inset-0 rounded-md animate-conduct\"\n />\n <component\n :is=\"accent.icon\"\n :class=\"cn('mt-0.5 h-4 w-4 shrink-0', accent.color)\"\n aria-hidden=\"true\"\n />\n <div class=\"min-w-0 flex-1\">\n <ToastTitle class=\"text-sm font-medium\">{{ title }}</ToastTitle>\n <ToastDescription v-if=\"description\" class=\"mt-0.5 text-xs text-muted-foreground\">\n {{ description }}\n </ToastDescription>\n </div>\n\n <ToastAction v-if=\"actionLabel\" :alt-text=\"actionLabel\" as-child @click=\"$emit('action')\">\n <button\n type=\"button\"\n class=\"shrink-0 rounded-sm px-2 py-1 text-xs font-medium text-primary transition-colors duration-fast ease-out hover:bg-subtle focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-ring\"\n >\n {{ actionLabel }}\n </button>\n </ToastAction>\n\n <ToastClose\n v-if=\"closable\"\n aria-label=\"Close\"\n class=\"absolute right-2 top-2 inline-flex h-6 w-6 items-center justify-center rounded-sm text-muted-foreground transition-colors duration-fast ease-out hover:bg-subtle hover:text-foreground focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-ring\"\n >\n <X class=\"h-3.5 w-3.5\" />\n </ToastClose>\n </div>\n </ToastRoot>\n</template>\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAcA,MAAM,QAAQ;EA+Bd,MAAM,eAAe;GACnB,MAAM;IAAE,MAAM;IAAM,OAAO;GAAY;GACvC,SAAS;IAAE,MAAM;IAAa,OAAO;GAAe;GACpD,SAAS;IAAE,MAAM;IAAe,OAAO;GAAe;GACtD,aAAa;IAAE,MAAM;IAAS,OAAO;GAAmB;GACxD,IAAI;IAAE,MAAM;IAAU,OAAO;GAAe;EAC9C;EAEA,MAAM,SAAS,eAAe,aAAa,MAAM,QAAQ;;GAQvD,OAAA,UAAA,GAAA,YAkDY,MAAA,SAAA,GAlDZ,WACU,MAiDE,QAAA,CAjDM,CAAA,EAAA,MAAG,QAAA,KAAI,CAAA,GAAA;IACtB,UAAU,QAAA;IACX,OAAM;IACL,iBAAW,OAAA,OAAA,OAAA,MAAA,WAAEA,KAAAA,MAAK,eAAgB,MAAM;;IAEzC,SAAA,cA2CM,CA3CN,mBA2CM,OAAA,EA1CH,OAAK,eAAW,MAAA,EAAA,CAAE,CAAA,0IAA4T,QAAA,YAAO,QAAA,mBAAA,CAAA,EAAA,GAAA;KAU9U,QAAA,YAAO,QADf,UAAA,GAAA,mBAIE,QAJF,UAIE,KAAA,mBAAA,IAAA,IAAA;MACF,UAAA,GAAA,YAIE,wBAHK,OAAA,MAAO,IAAI,GAAA;MACf,OAAK,eAAE,MAAA,EAAA,CAAE,CAAA,2BAA4B,OAAA,MAAO,KAAK,CAAA;MAClD,eAAY;;KAEd,mBAKM,OALN,YAKM,CAJJ,YAAgE,MAAA,UAAA,GAAA,EAApD,OAAM,sBAAqB,GAAA;MAAC,SAAA,cAAW,CAAR,gBAAA,gBAAA,QAAA,KAAK,GAAA,CAAA,CAAA,CAAA;;KACxB,CAAA,GAAA,QAAA,eAAxB,UAAA,GAAA,YAEmB,MAAA,gBAAA,GAAA;;MAFkB,OAAM;;MACzC,SAAA,cAAiB,CAAd,gBAAA,gBAAA,QAAA,WAAW,GAAA,CAAA,CAAA,CAAA;;;KAIC,QAAA,eAAnB,UAAA,GAAA,YAOc,MAAA,WAAA,GAAA;;MAPmB,YAAU,QAAA;MAAa,YAAA;MAAU,SAAK,OAAA,OAAA,OAAA,MAAA,WAAEA,KAAAA,MAAK,QAAA;;MAC5E,SAAA,cAKS,CALT,mBAKS,UALT,YAKS,gBADJ,QAAA,WAAW,GAAA,CAAA,CAAA,CAAA;;;KAKV,QAAA,YADR,UAAA,GAAA,YAMa,MAAA,UAAA,GAAA;;MAJX,cAAW;MACX,OAAM;;MAEN,SAAA,cAAyB,CAAzB,YAAyB,MAAA,CAAA,GAAA,EAAtB,OAAM,cAAa,CAAA,CAAA,CAAA"}
1
+ {"version":3,"file":"ToastItem.vue_vue_type_script_setup_true_lang.js","names":["$emit"],"sources":["../../../src/primitives/Toast/ToastItem.vue"],"sourcesContent":["<script lang=\"ts\">\nimport type { LabelOf } from \"../../lib/labels\";\n\n/**\n * Everything a toast publishes that is not the host's own copy — including the\n * two strings Reka UI would otherwise supply in English of its own accord.\n *\n * Declared here rather than in `Toast.vue`, which is where a reader would look\n * for it, and the reason is a module cycle rather than a preference.\n * `Toast.vue` imports this file; this file needs the defaults for the close\n * control it renders. Declaring them in `Toast.vue` and importing them back\n * would make that a real runtime cycle where today it is a type-only one, and\n * it would cost the block that reuses this card — `ToastStack` mounts\n * `ToastItem` directly through its own provider — the whole seam. Owning them\n * here means every card resolves its own names wherever it is mounted.\n *\n * `announce` and `region` are not decoration. Reka's `ToastProvider` defaults\n * its `label` to \"Notification\" and reads it out ahead of every toast's own\n * text in a hidden live region; its `ToastViewport` names the list\n * \"Notifications ({hotkey})\". Both are real props rather than hard-coded\n * vnode attributes, so these are set rather than overridden — but leaving\n * either unset falls back to English, not to nothing.\n */\nexport interface ToastLabels {\n /** The ✕ control on the card. */\n readonly close: string;\n /**\n * Spoken before each toast's own title, in a hidden live region, to say what\n * kind of thing has just arrived. Keep it to one word — it is a prefix on\n * every announcement, not a sentence.\n */\n readonly announce: string;\n /**\n * The name of the list the toasts stack in. `hotkey` is the key that focuses\n * it, as the environment reports it (\"F8\"), handed over raw so a language\n * can put it wherever it belongs in the phrase.\n */\n readonly region: LabelOf<{ hotkey: string }>;\n}\n\n/**\n * Loom's English, co-located with the component so it tree-shakes with it, and\n * exported so a host can build a partial vocabulary against the real thing.\n */\nexport const TOAST_LABELS: ToastLabels = {\n close: \"Close\",\n announce: \"Notification\",\n region: ({ hotkey }) => `Notifications (${hotkey})`,\n};\n</script>\n\n<script setup lang=\"ts\">\nimport { computed } from \"vue\";\nimport { ToastRoot, ToastTitle, ToastDescription, ToastAction, ToastClose } from \"reka-ui\";\nimport { useLabels, type LabelOverrides } from \"../../lib/labels\";\nimport { Info, CircleCheck, TriangleAlert, CircleX, Sparkles, X } from \"@lucide/vue\";\nimport { cn } from \"../../lib/cn\";\nimport { optional } from \"../../lib/props\";\nimport type { ToastVariant } from \"./Toast.vue\";\n\n/**\n * ToastItem — one toast card (ToastRoot + Loom treatment), INTERNAL to\n * the design system. It must live inside a `ToastProvider` whose\n * `ToastViewport` it teleports into: `Toast` bundles that pair for the\n * standalone case. Not exported from the barrel — hosts use `Toast`.\n */\nconst props = withDefaults(\n defineProps<{\n /** Controls visibility; pair with `v-model:open`. Omit to let the toast own its own open state. */\n open?: boolean | undefined;\n /** The toast's headline — always shown. */\n title: string;\n /** An optional second line of detail below the title. */\n description?: string;\n /** Selects the accent icon and colour. */\n variant?: ToastVariant;\n /** ms before auto-dismiss; the Reka default pauses on hover/focus. */\n duration?: number;\n /** Shows the ✕ close button. */\n closable?: boolean;\n /** Renders a single inline action button; emits `action` when pressed. */\n actionLabel?: string;\n /** Names for what the card says on its own account, as any subset of `ToastLabels`. */\n labels?: LabelOverrides<ToastLabels>;\n }>(),\n {\n // See Toast.vue: `undefined` is the uncontrolled state, and only an\n // explicit default keeps it reachable past Vue's Boolean casting.\n open: undefined,\n variant: \"info\",\n duration: 5000,\n closable: true,\n },\n);\n\ndefineEmits<{ \"update:open\": [value: boolean]; action: [] }>();\n\n// `text`, not `labels`: the prop of that name is one of the three sources this\n// resolves, and a template reading the raw prop would be reading the overrides\n// rather than the answer.\nconst text = useLabels(\"toast\", TOAST_LABELS, () => props.labels);\n\n// `satisfies` binds this map to ToastVariant so a variant added to the type\n// without a matching entry here fails at compile time (Button's own idiom).\nconst toastAccents = {\n info: { icon: Info, color: \"text-info\" },\n success: { icon: CircleCheck, color: \"text-success\" },\n warning: { icon: TriangleAlert, color: \"text-warning\" },\n destructive: { icon: CircleX, color: \"text-destructive\" },\n accent: { icon: Sparkles, color: \"text-primary\" },\n} satisfies Record<ToastVariant, { icon: typeof Info; color: string }>;\n\nconst accent = computed(() => toastAccents[props.variant]);\n</script>\n\n<template>\n <!-- The slide-in animation rides this inner card, never ToastRoot: Reka\n drives ToastRoot's own transform for the swipe-to-dismiss gesture, so a\n filled entrance transform there would freeze the swipe. ToastRoot itself\n carries no animation, so Reka Presence unmounts it immediately on close. -->\n <ToastRoot\n v-bind=\"optional({ open })\"\n :duration=\"duration\"\n class=\"outline-none\"\n @update:open=\"$emit('update:open', $event)\"\n >\n <div\n :class=\"\n cn(\n 'relative flex animate-toast-in items-start gap-3 rounded-md border border-border bg-popover p-3 pr-8 text-popover-foreground shadow-lg',\n // Accent variant: a highlighted border to draw attention to the\n // toast's distinctiveness from the standard variants.\n variant === 'accent' && 'border-primary/40',\n )\n \"\n >\n <component\n :is=\"accent.icon\"\n :class=\"cn('mt-0.5 h-4 w-4 shrink-0', accent.color)\"\n aria-hidden=\"true\"\n />\n <div class=\"min-w-0 flex-1\">\n <ToastTitle class=\"text-sm font-medium\">{{ title }}</ToastTitle>\n <ToastDescription v-if=\"description\" class=\"mt-0.5 text-xs text-muted-foreground\">\n {{ description }}\n </ToastDescription>\n </div>\n\n <ToastAction v-if=\"actionLabel\" :alt-text=\"actionLabel\" as-child @click=\"$emit('action')\">\n <button\n type=\"button\"\n class=\"shrink-0 rounded-sm px-2 py-1 text-xs font-medium text-primary transition-colors duration-fast ease-out hover:bg-subtle focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-ring\"\n >\n {{ actionLabel }}\n </button>\n </ToastAction>\n\n <ToastClose\n v-if=\"closable\"\n :aria-label=\"text.close\"\n class=\"absolute right-2 top-2 inline-flex h-6 w-6 items-center justify-center rounded-sm text-muted-foreground transition-colors duration-fast ease-out hover:bg-subtle hover:text-foreground focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-ring\"\n >\n <X class=\"h-3.5 w-3.5\" />\n </ToastClose>\n </div>\n </ToastRoot>\n</template>\n"],"mappings":";;;;;;;;;;;;;;;;AA4CA,IAAa,eAA4B;CACvC,OAAO;CACP,UAAU;CACV,SAAS,EAAE,aAAa,kBAAkB,OAAO;AACnD;;;;;;;;;;;;;;;;;;;;;EAkBA,MAAM,QAAQ;EAkCd,MAAM,OAAO,UAAU,SAAS,oBAAoB,MAAM,MAAM;EAIhE,MAAM,eAAe;GACnB,MAAM;IAAE,MAAM;IAAM,OAAO;GAAY;GACvC,SAAS;IAAE,MAAM;IAAa,OAAO;GAAe;GACpD,SAAS;IAAE,MAAM;IAAe,OAAO;GAAe;GACtD,aAAa;IAAE,MAAM;IAAS,OAAO;GAAmB;GACxD,QAAQ;IAAE,MAAM;IAAU,OAAO;GAAe;EAClD;EAEA,MAAM,SAAS,eAAe,aAAa,MAAM,QAAQ;;GAQvD,OAAA,UAAA,GAAA,YA6CY,MAAA,SAAA,GA7CZ,WACU,MA4CE,QAAA,CA5CM,CAAA,EAAA,MAAG,QAAA,KAAI,CAAA,GAAA;IACtB,UAAU,QAAA;IACX,OAAM;IACL,iBAAW,OAAA,OAAA,OAAA,MAAA,WAAEA,KAAAA,MAAK,eAAgB,MAAM;;IAEzC,SAAA,cAsCM,CAtCN,mBAsCM,OAAA,EArCH,OAAK,eAAW,MAAA,EAAA,CAAE,CAAA,0IAA4S,QAAA,YAAO,YAAA,mBAAA,CAAA,EAAA,GAAA;MAStU,UAAA,GAAA,YAIE,wBAHK,OAAA,MAAO,IAAI,GAAA;MACf,OAAK,eAAE,MAAA,EAAA,CAAE,CAAA,2BAA4B,OAAA,MAAO,KAAK,CAAA;MAClD,eAAY;;KAEd,mBAKM,OALN,YAKM,CAJJ,YAAgE,MAAA,UAAA,GAAA,EAApD,OAAM,sBAAqB,GAAA;MAAC,SAAA,cAAW,CAAR,gBAAA,gBAAA,QAAA,KAAK,GAAA,CAAA,CAAA,CAAA;;KACxB,CAAA,GAAA,QAAA,eAAxB,UAAA,GAAA,YAEmB,MAAA,gBAAA,GAAA;;MAFkB,OAAM;;MACzC,SAAA,cAAiB,CAAd,gBAAA,gBAAA,QAAA,WAAW,GAAA,CAAA,CAAA,CAAA;;;KAIC,QAAA,eAAnB,UAAA,GAAA,YAOc,MAAA,WAAA,GAAA;;MAPmB,YAAU,QAAA;MAAa,YAAA;MAAU,SAAK,OAAA,OAAA,OAAA,MAAA,WAAEA,KAAAA,MAAK,QAAA;;MAC5E,SAAA,cAKS,CALT,mBAKS,UALT,YAKS,gBADJ,QAAA,WAAW,GAAA,CAAA,CAAA,CAAA;;;KAKV,QAAA,YADR,UAAA,GAAA,YAMa,MAAA,UAAA,GAAA;;MAJV,cAAY,MAAA,IAAA,CAAI,CAAC;MAClB,OAAM;;MAEN,SAAA,cAAyB,CAAzB,YAAyB,MAAA,CAAA,GAAA,EAAtB,OAAM,cAAa,CAAA,CAAA,CAAA"}
@@ -35,10 +35,10 @@ declare const __VLS_export: __VLS_WithSlots<import("vue").DefineComponent<{
35
35
  }> & Readonly<{
36
36
  "onUpdate:open"?: (value: boolean) => any;
37
37
  }>, {
38
+ delay: number;
38
39
  open: boolean | undefined;
39
40
  side: TooltipSide;
40
41
  sideOffset: number;
41
- delay: number;
42
42
  }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>, {
43
43
  trigger?: (props: {}) => any;
44
44
  } & {
@@ -1 +1 @@
1
- {"version":3,"file":"Tooltip.vue.d.ts","sourceRoot":"","sources":["../../../src/primitives/Tooltip/Tooltip.vue"],"names":[],"mappings":"AA8HA;;;;;;GAMG;AACH,MAAM,MAAM,WAAW,GAAG,KAAK,GAAG,OAAO,GAAG,QAAQ,GAAG,MAAM,CAAC;wBACzC,OAAO,YAAY;AAAxC,wBAAyC;AACzC,QAAA,MAAM,YAAY;IAuBd,gFAAgF;cACtE,MAAM;IAChB,4EAA4E;WACrE,WAAW;IAClB,qDAAqD;iBACxC,MAAM;IACnB,wFAAwF;YAChF,MAAM;IACd,oHAAoH;WAC7G,OAAO,GAAG,SAAS;;;;IAT1B,gFAAgF;cACtE,MAAM;IAChB,4EAA4E;WACrE,WAAW;IAClB,qDAAqD;iBACxC,MAAM;IACnB,wFAAwF;YAChF,MAAM;IACd,oHAAoH;WAC7G,OAAO,GAAG,SAAS;;;;UAAnB,OAAO,GAAG,SAAS;UANnB,WAAW;gBAEL,MAAM;WAEX,MAAM;;cA0LJ,CAAC,KAAK,IAAiB,KAAK,GAAG;;cAC/B,CAAC,KAAK,IAAiB,KAAK,GAAG;EAWzC,CAAC;AAWL,KAAK,eAAe,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IAChC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KACV,CAAA;CACD,CAAC"}
1
+ {"version":3,"file":"Tooltip.vue.d.ts","sourceRoot":"","sources":["../../../src/primitives/Tooltip/Tooltip.vue"],"names":[],"mappings":"AA8HA;;;;;;GAMG;AACH,MAAM,MAAM,WAAW,GAAG,KAAK,GAAG,OAAO,GAAG,QAAQ,GAAG,MAAM,CAAC;wBACzC,OAAO,YAAY;AAAxC,wBAAyC;AACzC,QAAA,MAAM,YAAY;IAuBd,gFAAgF;cACtE,MAAM;IAChB,4EAA4E;WACrE,WAAW;IAClB,qDAAqD;iBACxC,MAAM;IACnB,wFAAwF;YAChF,MAAM;IACd,oHAAoH;WAC7G,OAAO,GAAG,SAAS;;;;IAT1B,gFAAgF;cACtE,MAAM;IAChB,4EAA4E;WACrE,WAAW;IAClB,qDAAqD;iBACxC,MAAM;IACnB,wFAAwF;YAChF,MAAM;IACd,oHAAoH;WAC7G,OAAO,GAAG,SAAS;;;;WAFlB,MAAM;UAEP,OAAO,GAAG,SAAS;UANnB,WAAW;gBAEL,MAAM;;cA4LT,CAAC,KAAK,IAAiB,KAAK,GAAG;;cAC/B,CAAC,KAAK,IAAiB,KAAK,GAAG;EAWzC,CAAC;AAWL,KAAK,eAAe,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IAChC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KACV,CAAA;CACD,CAAC"}
@@ -1,7 +1,7 @@
1
- import WindowControls_vue_vue_type_script_setup_true_lang_default from "./WindowControls.vue_vue_type_script_setup_true_lang.js";
1
+ import WindowControls_vue_vue_type_script_setup_true_lang_default, { WINDOW_CONTROLS_LABELS } from "./WindowControls.vue_vue_type_script_setup_true_lang.js";
2
2
  //#region src/primitives/WindowControls/WindowControls.vue
3
3
  var WindowControls_default = WindowControls_vue_vue_type_script_setup_true_lang_default;
4
4
  //#endregion
5
- export { WindowControls_default as default };
5
+ export { WINDOW_CONTROLS_LABELS, WindowControls_default as default };
6
6
 
7
7
  //# sourceMappingURL=WindowControls.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"WindowControls.js","names":[],"sources":["../../../src/primitives/WindowControls/WindowControls.vue"],"sourcesContent":["<script lang=\"ts\">\n/**\n * WindowControls — the minimize / maximize / close cluster for a frameless\n * (custom-chrome) window. Presentational only: it emits intents; the host wires\n * them to the platform (the desktop shell's window bridge). Windows-style layout —\n * on macOS the OS draws native traffic-lights, so hide this there.\n *\n * The close button is the one place `destructive` is allowed without a confirm:\n * OS window-close is an expected, reversible-by-reopen affordance.\n */\n\n/** Accessible names for the three buttons overridable by the host for i18n. */\nexport interface WindowControlsLabels {\n minimize: string;\n maximize: string;\n restore: string;\n close: string;\n}\n</script>\n\n<script setup lang=\"ts\">\nwithDefaults(\n defineProps<{\n /** Swaps the middle button between its Maximize and Restore glyph and label. */\n isMaximized?: boolean;\n /** Accessible names for the three buttons, for a host localising the chrome. */\n labels?: WindowControlsLabels;\n }>(),\n {\n isMaximized: false,\n labels: () => ({\n minimize: \"Minimize\",\n maximize: \"Maximize\",\n restore: \"Restore\",\n close: \"Close\",\n }),\n },\n);\n\nconst emit = defineEmits<{\n (e: \"minimize\"): void;\n (e: \"maximize\"): void;\n (e: \"close\"): void;\n}>();\n</script>\n\n<template>\n <div class=\"flex h-full items-stretch\" style=\"-webkit-app-region: no-drag\">\n <button\n type=\"button\"\n class=\"flex w-11 items-center justify-center text-muted-foreground transition-colors duration-fast ease-out hover:bg-subtle hover:text-foreground active:brightness-90 focus-visible:outline-2 focus-visible:-outline-offset-2 focus-visible:outline-ring\"\n :aria-label=\"labels.minimize\"\n data-testid=\"win-minimize\"\n @click=\"emit('minimize')\"\n >\n <svg width=\"10\" height=\"10\" viewBox=\"0 0 10 10\" aria-hidden=\"true\">\n <rect y=\"4.5\" width=\"10\" height=\"1\" fill=\"currentColor\" />\n </svg>\n </button>\n\n <button\n type=\"button\"\n class=\"flex w-11 items-center justify-center text-muted-foreground transition-colors duration-fast ease-out hover:bg-subtle hover:text-foreground active:brightness-90 focus-visible:outline-2 focus-visible:-outline-offset-2 focus-visible:outline-ring\"\n :aria-label=\"isMaximized ? labels.restore : labels.maximize\"\n data-testid=\"win-maximize\"\n @click=\"emit('maximize')\"\n >\n <svg v-if=\"!isMaximized\" width=\"10\" height=\"10\" viewBox=\"0 0 10 10\" aria-hidden=\"true\">\n <rect x=\"0.5\" y=\"0.5\" width=\"9\" height=\"9\" fill=\"none\" stroke=\"currentColor\" />\n </svg>\n <svg v-else width=\"10\" height=\"10\" viewBox=\"0 0 10 10\" aria-hidden=\"true\">\n <rect x=\"0.5\" y=\"2.5\" width=\"7\" height=\"7\" fill=\"none\" stroke=\"currentColor\" />\n <path d=\"M2.5 2.5 V0.5 H9.5 V7.5 H7.5\" fill=\"none\" stroke=\"currentColor\" />\n </svg>\n </button>\n\n <button\n type=\"button\"\n class=\"flex w-11 items-center justify-center text-muted-foreground transition-colors duration-fast ease-out hover:bg-destructive hover:text-destructive-foreground active:brightness-90 focus-visible:outline-2 focus-visible:-outline-offset-2 focus-visible:outline-ring\"\n :aria-label=\"labels.close\"\n data-testid=\"win-close\"\n @click=\"emit('close')\"\n >\n <svg width=\"10\" height=\"10\" viewBox=\"0 0 10 10\" aria-hidden=\"true\">\n <path d=\"M0 0 L10 10 M10 0 L0 10\" stroke=\"currentColor\" />\n </svg>\n </button>\n </div>\n</template>\n"],"mappings":""}
1
+ {"version":3,"file":"WindowControls.js","names":[],"sources":["../../../src/primitives/WindowControls/WindowControls.vue"],"sourcesContent":["<script lang=\"ts\">\n/**\n * WindowControls — the minimize / maximize / close cluster for a frameless\n * (custom-chrome) window. Presentational only: it emits intents; the host wires\n * them to the platform (the desktop shell's window bridge). Windows-style layout —\n * on macOS the OS draws native traffic-lights, so hide this there.\n *\n * `platform` tells the cluster whether to render at all: on macOS the operating\n * system owns the traffic-light buttons, so a second set drawn by Loom would be\n * redundant and confusing. The host decides which platform it is on — Loom never\n * sniffs the OS at runtime, because a Tauri or Electron host already knows its\n * platform and a PWA has no native window controls to compete with.\n *\n * The close button is the one place `destructive` is allowed without a confirm:\n * OS window-close is an expected, reversible-by-reopen affordance.\n */\n\n/** The desktop platform that owns the window chrome. */\nexport type WindowPlatform = \"windows\" | \"macos\" | \"linux\";\n\n/**\n * The three buttons' accessible names. There are four, because the middle\n * button is one control in two states and a language may well name them with\n * unrelated words.\n *\n * Every glyph here is an inline SVG marked `aria-hidden`, so these names are\n * the only thing a screen reader has to go on — a missing one is not a degraded\n * label but an unnamed button.\n */\nexport interface WindowControlsLabels {\n /** Send the window to the taskbar. */\n readonly minimize: string;\n /** Fill the screen. The middle button's name while the window is restored. */\n readonly maximize: string;\n /** Return to the previous size. The same button's name while maximized. */\n readonly restore: string;\n /** Close the window. */\n readonly close: string;\n}\n\n/**\n * Loom's English, co-located with the component so it tree-shakes with it, and\n * exported so a host can build a partial vocabulary against the real thing.\n */\nexport const WINDOW_CONTROLS_LABELS: WindowControlsLabels = {\n minimize: \"Minimize\",\n maximize: \"Maximize\",\n restore: \"Restore\",\n close: \"Close\",\n};\n</script>\n\n<script setup lang=\"ts\">\nimport { useLabels, type LabelOverrides } from \"../../lib/labels\";\n\nconst props = withDefaults(\n defineProps<{\n /**\n * The desktop platform the window is running on. On macOS the OS draws its\n * own traffic-light buttons, so this cluster renders nothing there. The host\n * decides — Loom does not sniff the OS, because the host already knows its\n * platform and a PWA has no native controls to avoid.\n */\n platform?: WindowPlatform;\n /** Swaps the middle button between its Maximize and Restore glyph and label. */\n isMaximized?: boolean;\n /**\n * Names for the three buttons, as any subset of `WindowControlsLabels` —\n * the rest stay as the host's `provideLoomLabels` vocabulary left them, and\n * then as Loom's English.\n *\n * This took a whole object before the seam existed, which meant a host that\n * wanted one word in their own language had to restate the other three in\n * English and keep them in step by hand.\n */\n labels?: LabelOverrides<WindowControlsLabels>;\n }>(),\n { platform: \"windows\", isMaximized: false },\n);\n\nconst emit = defineEmits<{\n (e: \"minimize\"): void;\n (e: \"maximize\"): void;\n (e: \"close\"): void;\n}>();\n\n// `text`, not `labels`: the prop of that name is one of the three sources this\n// resolves, and a template reading the raw prop would be reading the overrides\n// rather than the answer.\nconst text = useLabels(\"windowControls\", WINDOW_CONTROLS_LABELS, () => props.labels);\n</script>\n\n<template>\n <!-- On macOS the OS owns the traffic-light buttons; rendering a second set\n would be redundant. The host can also choose \"linux\" if their desktop\n environment handles window buttons natively. -->\n <div\n v-if=\"platform !== 'macos'\"\n class=\"flex h-full items-stretch\"\n style=\"-webkit-app-region: no-drag\"\n >\n <button\n type=\"button\"\n class=\"flex w-11 items-center justify-center text-muted-foreground transition-colors duration-fast ease-out hover:bg-subtle hover:text-foreground active:brightness-90 focus-visible:outline-2 focus-visible:-outline-offset-2 focus-visible:outline-ring\"\n :aria-label=\"text.minimize\"\n data-testid=\"win-minimize\"\n @click=\"emit('minimize')\"\n >\n <svg width=\"10\" height=\"10\" viewBox=\"0 0 10 10\" aria-hidden=\"true\">\n <rect y=\"4.5\" width=\"10\" height=\"1\" fill=\"currentColor\" />\n </svg>\n </button>\n\n <button\n type=\"button\"\n class=\"flex w-11 items-center justify-center text-muted-foreground transition-colors duration-fast ease-out hover:bg-subtle hover:text-foreground active:brightness-90 focus-visible:outline-2 focus-visible:-outline-offset-2 focus-visible:outline-ring\"\n :aria-label=\"isMaximized ? text.restore : text.maximize\"\n data-testid=\"win-maximize\"\n @click=\"emit('maximize')\"\n >\n <svg v-if=\"!isMaximized\" width=\"10\" height=\"10\" viewBox=\"0 0 10 10\" aria-hidden=\"true\">\n <rect x=\"0.5\" y=\"0.5\" width=\"9\" height=\"9\" fill=\"none\" stroke=\"currentColor\" />\n </svg>\n <svg v-else width=\"10\" height=\"10\" viewBox=\"0 0 10 10\" aria-hidden=\"true\">\n <rect x=\"0.5\" y=\"2.5\" width=\"7\" height=\"7\" fill=\"none\" stroke=\"currentColor\" />\n <path d=\"M2.5 2.5 V0.5 H9.5 V7.5 H7.5\" fill=\"none\" stroke=\"currentColor\" />\n </svg>\n </button>\n\n <button\n type=\"button\"\n class=\"flex w-11 items-center justify-center text-muted-foreground transition-colors duration-fast ease-out hover:bg-destructive hover:text-destructive-foreground active:brightness-90 focus-visible:outline-2 focus-visible:-outline-offset-2 focus-visible:outline-ring\"\n :aria-label=\"text.close\"\n data-testid=\"win-close\"\n @click=\"emit('close')\"\n >\n <svg width=\"10\" height=\"10\" viewBox=\"0 0 10 10\" aria-hidden=\"true\">\n <path d=\"M0 0 L10 10 M10 0 L0 10\" stroke=\"currentColor\" />\n </svg>\n </button>\n </div>\n</template>\n"],"mappings":""}
@@ -1,41 +1,97 @@
1
+ import { type LabelOverrides } from "../../lib/labels";
1
2
  /**
2
3
  * WindowControls — the minimize / maximize / close cluster for a frameless
3
4
  * (custom-chrome) window. Presentational only: it emits intents; the host wires
4
5
  * them to the platform (the desktop shell's window bridge). Windows-style layout —
5
6
  * on macOS the OS draws native traffic-lights, so hide this there.
6
7
  *
8
+ * `platform` tells the cluster whether to render at all: on macOS the operating
9
+ * system owns the traffic-light buttons, so a second set drawn by Loom would be
10
+ * redundant and confusing. The host decides which platform it is on — Loom never
11
+ * sniffs the OS at runtime, because a Tauri or Electron host already knows its
12
+ * platform and a PWA has no native window controls to compete with.
13
+ *
7
14
  * The close button is the one place `destructive` is allowed without a confirm:
8
15
  * OS window-close is an expected, reversible-by-reopen affordance.
9
16
  */
10
- /** Accessible names for the three buttons — overridable by the host for i18n. */
17
+ /** The desktop platform that owns the window chrome. */
18
+ export type WindowPlatform = "windows" | "macos" | "linux";
19
+ /**
20
+ * The three buttons' accessible names. There are four, because the middle
21
+ * button is one control in two states and a language may well name them with
22
+ * unrelated words.
23
+ *
24
+ * Every glyph here is an inline SVG marked `aria-hidden`, so these names are
25
+ * the only thing a screen reader has to go on — a missing one is not a degraded
26
+ * label but an unnamed button.
27
+ */
11
28
  export interface WindowControlsLabels {
12
- minimize: string;
13
- maximize: string;
14
- restore: string;
15
- close: string;
29
+ /** Send the window to the taskbar. */
30
+ readonly minimize: string;
31
+ /** Fill the screen. The middle button's name while the window is restored. */
32
+ readonly maximize: string;
33
+ /** Return to the previous size. The same button's name while maximized. */
34
+ readonly restore: string;
35
+ /** Close the window. */
36
+ readonly close: string;
16
37
  }
38
+ /**
39
+ * Loom's English, co-located with the component so it tree-shakes with it, and
40
+ * exported so a host can build a partial vocabulary against the real thing.
41
+ */
42
+ export declare const WINDOW_CONTROLS_LABELS: WindowControlsLabels;
17
43
  declare const _default: typeof __VLS_export;
18
44
  export default _default;
19
45
  declare const __VLS_export: import("vue").DefineComponent<{
46
+ /**
47
+ * The desktop platform the window is running on. On macOS the OS draws its
48
+ * own traffic-light buttons, so this cluster renders nothing there. The host
49
+ * decides — Loom does not sniff the OS, because the host already knows its
50
+ * platform and a PWA has no native controls to avoid.
51
+ */
52
+ platform?: WindowPlatform;
20
53
  /** Swaps the middle button between its Maximize and Restore glyph and label. */
21
54
  isMaximized?: boolean;
22
- /** Accessible names for the three buttons, for a host localising the chrome. */
23
- labels?: WindowControlsLabels;
55
+ /**
56
+ * Names for the three buttons, as any subset of `WindowControlsLabels` —
57
+ * the rest stay as the host's `provideLoomLabels` vocabulary left them, and
58
+ * then as Loom's English.
59
+ *
60
+ * This took a whole object before the seam existed, which meant a host that
61
+ * wanted one word in their own language had to restate the other three in
62
+ * English and keep them in step by hand.
63
+ */
64
+ labels?: LabelOverrides<WindowControlsLabels>;
24
65
  }, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
25
66
  close: () => any;
26
67
  minimize: () => any;
27
68
  maximize: () => any;
28
69
  }, string, import("vue").PublicProps, Readonly<{
70
+ /**
71
+ * The desktop platform the window is running on. On macOS the OS draws its
72
+ * own traffic-light buttons, so this cluster renders nothing there. The host
73
+ * decides — Loom does not sniff the OS, because the host already knows its
74
+ * platform and a PWA has no native controls to avoid.
75
+ */
76
+ platform?: WindowPlatform;
29
77
  /** Swaps the middle button between its Maximize and Restore glyph and label. */
30
78
  isMaximized?: boolean;
31
- /** Accessible names for the three buttons, for a host localising the chrome. */
32
- labels?: WindowControlsLabels;
79
+ /**
80
+ * Names for the three buttons, as any subset of `WindowControlsLabels` —
81
+ * the rest stay as the host's `provideLoomLabels` vocabulary left them, and
82
+ * then as Loom's English.
83
+ *
84
+ * This took a whole object before the seam existed, which meant a host that
85
+ * wanted one word in their own language had to restate the other three in
86
+ * English and keep them in step by hand.
87
+ */
88
+ labels?: LabelOverrides<WindowControlsLabels>;
33
89
  }> & Readonly<{
34
90
  onClose?: () => any;
35
91
  onMinimize?: () => any;
36
92
  onMaximize?: () => any;
37
93
  }>, {
94
+ platform: WindowPlatform;
38
95
  isMaximized: boolean;
39
- labels: WindowControlsLabels;
40
96
  }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
41
97
  //# sourceMappingURL=WindowControls.vue.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"WindowControls.vue.d.ts","sourceRoot":"","sources":["../../../src/primitives/WindowControls/WindowControls.vue"],"names":[],"mappings":"AA6FA;;;;;;;;GAQG;AAEH,iFAAiF;AACjF,MAAM,WAAW,oBAAoB;IACnC,QAAQ,EAAE,MAAM,CAAC;IACjB,QAAQ,EAAE,MAAM,CAAC;IACjB,OAAO,EAAE,MAAM,CAAC;IAChB,KAAK,EAAE,MAAM,CAAC;CACf;wBACoB,OAAO,YAAY;AAAxC,wBAAyC;AACzC,QAAA,MAAM,YAAY;IAEd,gFAAgF;kBAClE,OAAO;IACrB,gFAAgF;aACvE,oBAAoB;;;;;;IAH7B,gFAAgF;kBAClE,OAAO;IACrB,gFAAgF;aACvE,oBAAoB;;;;;;iBAFf,OAAO;YAEZ,oBAAoB;6EAwM7B,CAAC"}
1
+ {"version":3,"file":"WindowControls.vue.d.ts","sourceRoot":"","sources":["../../../src/primitives/WindowControls/WindowControls.vue"],"names":[],"mappings":"AAiJA,OAAO,EAAa,KAAK,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAGlE;;;;;;;;;;;;;;GAcG;AAEH,wDAAwD;AACxD,MAAM,MAAM,cAAc,GAAG,SAAS,GAAG,OAAO,GAAG,OAAO,CAAC;AAE3D;;;;;;;;GAQG;AACH,MAAM,WAAW,oBAAoB;IACnC,sCAAsC;IACtC,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;IAC1B,8EAA8E;IAC9E,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;IAC1B,2EAA2E;IAC3E,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IACzB,wBAAwB;IACxB,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;CACxB;AAED;;;GAGG;AACH,eAAO,MAAM,sBAAsB,EAAE,oBAKpC,CAAC;wBACmB,OAAO,YAAY;AAAxC,wBAAyC;AACzC,QAAA,MAAM,YAAY;IAEd;;;;;OAKG;eACQ,cAAc;IACzB,gFAAgF;kBAClE,OAAO;IACrB;;;;;;;;OAQG;aACM,cAAc,CAAC,oBAAoB,CAAC;;;;;;IAlB7C;;;;;OAKG;eACQ,cAAc;IACzB,gFAAgF;kBAClE,OAAO;IACrB;;;;;;;;OAQG;aACM,cAAc,CAAC,oBAAoB,CAAC;;;;;;cAZlC,cAAc;iBAEX,OAAO;6EA6MrB,CAAC"}
@@ -1,6 +1,8 @@
1
- import { createElementBlock, createElementVNode, defineComponent, openBlock } from "vue";
1
+ import { useLabels } from "../../lib/labels.js";
2
+ import { createCommentVNode, createElementBlock, createElementVNode, defineComponent, openBlock, unref } from "vue";
2
3
  //#region src/primitives/WindowControls/WindowControls.vue?vue&type=script&setup=true&lang.ts
3
4
  var _hoisted_1 = {
5
+ key: 0,
4
6
  class: "flex h-full items-stretch",
5
7
  style: { "-webkit-app-region": "no-drag" }
6
8
  };
@@ -21,19 +23,25 @@ var _hoisted_5 = {
21
23
  "aria-hidden": "true"
22
24
  };
23
25
  var _hoisted_6 = ["aria-label"];
26
+ /**
27
+ * Loom's English, co-located with the component so it tree-shakes with it, and
28
+ * exported so a host can build a partial vocabulary against the real thing.
29
+ */
30
+ var WINDOW_CONTROLS_LABELS = {
31
+ minimize: "Minimize",
32
+ maximize: "Maximize",
33
+ restore: "Restore",
34
+ close: "Close"
35
+ };
24
36
  var WindowControls_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ defineComponent({
25
37
  __name: "WindowControls",
26
38
  props: {
39
+ platform: { default: "windows" },
27
40
  isMaximized: {
28
41
  type: Boolean,
29
42
  default: false
30
43
  },
31
- labels: { default: () => ({
32
- minimize: "Minimize",
33
- maximize: "Maximize",
34
- restore: "Restore",
35
- close: "Close"
36
- }) }
44
+ labels: {}
37
45
  },
38
46
  emits: [
39
47
  "minimize",
@@ -41,13 +49,15 @@ var WindowControls_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ d
41
49
  "close"
42
50
  ],
43
51
  setup(__props, { emit: __emit }) {
52
+ const props = __props;
44
53
  const emit = __emit;
54
+ const text = useLabels("windowControls", WINDOW_CONTROLS_LABELS, () => props.labels);
45
55
  return (_ctx, _cache) => {
46
- return openBlock(), createElementBlock("div", _hoisted_1, [
56
+ return __props.platform !== "macos" ? (openBlock(), createElementBlock("div", _hoisted_1, [
47
57
  createElementVNode("button", {
48
58
  type: "button",
49
59
  class: "flex w-11 items-center justify-center text-muted-foreground transition-colors duration-fast ease-out hover:bg-subtle hover:text-foreground active:brightness-90 focus-visible:outline-2 focus-visible:-outline-offset-2 focus-visible:outline-ring",
50
- "aria-label": __props.labels.minimize,
60
+ "aria-label": unref(text).minimize,
51
61
  "data-testid": "win-minimize",
52
62
  onClick: _cache[0] || (_cache[0] = ($event) => emit("minimize"))
53
63
  }, [..._cache[3] || (_cache[3] = [createElementVNode("svg", {
@@ -64,7 +74,7 @@ var WindowControls_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ d
64
74
  createElementVNode("button", {
65
75
  type: "button",
66
76
  class: "flex w-11 items-center justify-center text-muted-foreground transition-colors duration-fast ease-out hover:bg-subtle hover:text-foreground active:brightness-90 focus-visible:outline-2 focus-visible:-outline-offset-2 focus-visible:outline-ring",
67
- "aria-label": __props.isMaximized ? __props.labels.restore : __props.labels.maximize,
77
+ "aria-label": __props.isMaximized ? unref(text).restore : unref(text).maximize,
68
78
  "data-testid": "win-maximize",
69
79
  onClick: _cache[1] || (_cache[1] = ($event) => emit("maximize"))
70
80
  }, [!__props.isMaximized ? (openBlock(), createElementBlock("svg", _hoisted_4, [..._cache[4] || (_cache[4] = [createElementVNode("rect", {
@@ -89,7 +99,7 @@ var WindowControls_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ d
89
99
  createElementVNode("button", {
90
100
  type: "button",
91
101
  class: "flex w-11 items-center justify-center text-muted-foreground transition-colors duration-fast ease-out hover:bg-destructive hover:text-destructive-foreground active:brightness-90 focus-visible:outline-2 focus-visible:-outline-offset-2 focus-visible:outline-ring",
92
- "aria-label": __props.labels.close,
102
+ "aria-label": unref(text).close,
93
103
  "data-testid": "win-close",
94
104
  onClick: _cache[2] || (_cache[2] = ($event) => emit("close"))
95
105
  }, [..._cache[6] || (_cache[6] = [createElementVNode("svg", {
@@ -101,11 +111,11 @@ var WindowControls_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ d
101
111
  d: "M0 0 L10 10 M10 0 L0 10",
102
112
  stroke: "currentColor"
103
113
  })], -1)])], 8, _hoisted_6)
104
- ]);
114
+ ])) : createCommentVNode("", true);
105
115
  };
106
116
  }
107
117
  });
108
118
  //#endregion
109
- export { WindowControls_vue_vue_type_script_setup_true_lang_default as default };
119
+ export { WINDOW_CONTROLS_LABELS, WindowControls_vue_vue_type_script_setup_true_lang_default as default };
110
120
 
111
121
  //# sourceMappingURL=WindowControls.vue_vue_type_script_setup_true_lang.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"WindowControls.vue_vue_type_script_setup_true_lang.js","names":[],"sources":["../../../src/primitives/WindowControls/WindowControls.vue"],"sourcesContent":["<script lang=\"ts\">\n/**\n * WindowControls — the minimize / maximize / close cluster for a frameless\n * (custom-chrome) window. Presentational only: it emits intents; the host wires\n * them to the platform (the desktop shell's window bridge). Windows-style layout —\n * on macOS the OS draws native traffic-lights, so hide this there.\n *\n * The close button is the one place `destructive` is allowed without a confirm:\n * OS window-close is an expected, reversible-by-reopen affordance.\n */\n\n/** Accessible names for the three buttons overridable by the host for i18n. */\nexport interface WindowControlsLabels {\n minimize: string;\n maximize: string;\n restore: string;\n close: string;\n}\n</script>\n\n<script setup lang=\"ts\">\nwithDefaults(\n defineProps<{\n /** Swaps the middle button between its Maximize and Restore glyph and label. */\n isMaximized?: boolean;\n /** Accessible names for the three buttons, for a host localising the chrome. */\n labels?: WindowControlsLabels;\n }>(),\n {\n isMaximized: false,\n labels: () => ({\n minimize: \"Minimize\",\n maximize: \"Maximize\",\n restore: \"Restore\",\n close: \"Close\",\n }),\n },\n);\n\nconst emit = defineEmits<{\n (e: \"minimize\"): void;\n (e: \"maximize\"): void;\n (e: \"close\"): void;\n}>();\n</script>\n\n<template>\n <div class=\"flex h-full items-stretch\" style=\"-webkit-app-region: no-drag\">\n <button\n type=\"button\"\n class=\"flex w-11 items-center justify-center text-muted-foreground transition-colors duration-fast ease-out hover:bg-subtle hover:text-foreground active:brightness-90 focus-visible:outline-2 focus-visible:-outline-offset-2 focus-visible:outline-ring\"\n :aria-label=\"labels.minimize\"\n data-testid=\"win-minimize\"\n @click=\"emit('minimize')\"\n >\n <svg width=\"10\" height=\"10\" viewBox=\"0 0 10 10\" aria-hidden=\"true\">\n <rect y=\"4.5\" width=\"10\" height=\"1\" fill=\"currentColor\" />\n </svg>\n </button>\n\n <button\n type=\"button\"\n class=\"flex w-11 items-center justify-center text-muted-foreground transition-colors duration-fast ease-out hover:bg-subtle hover:text-foreground active:brightness-90 focus-visible:outline-2 focus-visible:-outline-offset-2 focus-visible:outline-ring\"\n :aria-label=\"isMaximized ? labels.restore : labels.maximize\"\n data-testid=\"win-maximize\"\n @click=\"emit('maximize')\"\n >\n <svg v-if=\"!isMaximized\" width=\"10\" height=\"10\" viewBox=\"0 0 10 10\" aria-hidden=\"true\">\n <rect x=\"0.5\" y=\"0.5\" width=\"9\" height=\"9\" fill=\"none\" stroke=\"currentColor\" />\n </svg>\n <svg v-else width=\"10\" height=\"10\" viewBox=\"0 0 10 10\" aria-hidden=\"true\">\n <rect x=\"0.5\" y=\"2.5\" width=\"7\" height=\"7\" fill=\"none\" stroke=\"currentColor\" />\n <path d=\"M2.5 2.5 V0.5 H9.5 V7.5 H7.5\" fill=\"none\" stroke=\"currentColor\" />\n </svg>\n </button>\n\n <button\n type=\"button\"\n class=\"flex w-11 items-center justify-center text-muted-foreground transition-colors duration-fast ease-out hover:bg-destructive hover:text-destructive-foreground active:brightness-90 focus-visible:outline-2 focus-visible:-outline-offset-2 focus-visible:outline-ring\"\n :aria-label=\"labels.close\"\n data-testid=\"win-close\"\n @click=\"emit('close')\"\n >\n <svg width=\"10\" height=\"10\" viewBox=\"0 0 10 10\" aria-hidden=\"true\">\n <path d=\"M0 0 L10 10 M10 0 L0 10\" stroke=\"currentColor\" />\n </svg>\n </button>\n </div>\n</template>\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAuCA,MAAM,OAAO;;GAQX,OAAA,UAAA,GAAA,mBAwCM,OAxCN,YAwCM;IAvCJ,mBAUS,UAAA;KATP,MAAK;KACL,OAAM;KACL,cAAY,QAAA,OAAO;KACpB,eAAY;KACX,SAAK,OAAA,OAAA,OAAA,MAAA,WAAE,KAAI,UAAA;IAEZ,GAAA,CAAA,GAAA,OAAA,OAAA,OAAA,KAAA,CAAA,mBAEM,OAAA;KAFD,OAAM;KAAK,QAAO;KAAK,SAAQ;KAAY,eAAY;IAC1D,GAAA,CAAA,mBAA0D,QAAA;KAApD,GAAE;KAAM,OAAM;KAAK,QAAO;KAAI,MAAK;;IAI7C,mBAcS,UAAA;KAbP,MAAK;KACL,OAAM;KACL,cAAY,QAAA,cAAc,QAAA,OAAO,UAAU,QAAA,OAAO;KACnD,eAAY;KACX,SAAK,OAAA,OAAA,OAAA,MAAA,WAAE,KAAI,UAAA;IAEA,GAAA,CAAA,CAAA,QAAA,eAAZ,UAAA,GAAA,mBAEM,OAFN,YAEM,CAAA,GAAA,OAAA,OAAA,OAAA,KAAA,CADJ,mBAA+E,QAAA;KAAzE,GAAE;KAAM,GAAE;KAAM,OAAM;KAAI,QAAO;KAAI,MAAK;KAAO,QAAO;IAEhE,GAAA,MAAA,EAAA,CAAA,EAAA,CAAA,MAAA,UAAA,GAAA,mBAGM,OAHN,YAGM,CAAA,GAAA,OAAA,OAAA,OAAA,KAAA,CAFJ,mBAA+E,QAAA;KAAzE,GAAE;KAAM,GAAE;KAAM,OAAM;KAAI,QAAO;KAAI,MAAK;KAAO,QAAO;IAC9D,GAAA,MAAA,EAAA,GAAA,mBAA2E,QAAA;KAArE,GAAE;KAA+B,MAAK;KAAO,QAAO;;IAI9D,mBAUS,UAAA;KATP,MAAK;KACL,OAAM;KACL,cAAY,QAAA,OAAO;KACpB,eAAY;KACX,SAAK,OAAA,OAAA,OAAA,MAAA,WAAE,KAAI,OAAA;IAEZ,GAAA,CAAA,GAAA,OAAA,OAAA,OAAA,KAAA,CAAA,mBAEM,OAAA;KAFD,OAAM;KAAK,QAAO;KAAK,SAAQ;KAAY,eAAY;IAC1D,GAAA,CAAA,mBAA0D,QAAA;KAApD,GAAE;KAA0B,QAAO"}
1
+ {"version":3,"file":"WindowControls.vue_vue_type_script_setup_true_lang.js","names":[],"sources":["../../../src/primitives/WindowControls/WindowControls.vue"],"sourcesContent":["<script lang=\"ts\">\n/**\n * WindowControls — the minimize / maximize / close cluster for a frameless\n * (custom-chrome) window. Presentational only: it emits intents; the host wires\n * them to the platform (the desktop shell's window bridge). Windows-style layout —\n * on macOS the OS draws native traffic-lights, so hide this there.\n *\n * `platform` tells the cluster whether to render at all: on macOS the operating\n * system owns the traffic-light buttons, so a second set drawn by Loom would be\n * redundant and confusing. The host decides which platform it is on — Loom never\n * sniffs the OS at runtime, because a Tauri or Electron host already knows its\n * platform and a PWA has no native window controls to compete with.\n *\n * The close button is the one place `destructive` is allowed without a confirm:\n * OS window-close is an expected, reversible-by-reopen affordance.\n */\n\n/** The desktop platform that owns the window chrome. */\nexport type WindowPlatform = \"windows\" | \"macos\" | \"linux\";\n\n/**\n * The three buttons' accessible names. There are four, because the middle\n * button is one control in two states and a language may well name them with\n * unrelated words.\n *\n * Every glyph here is an inline SVG marked `aria-hidden`, so these names are\n * the only thing a screen reader has to go on — a missing one is not a degraded\n * label but an unnamed button.\n */\nexport interface WindowControlsLabels {\n /** Send the window to the taskbar. */\n readonly minimize: string;\n /** Fill the screen. The middle button's name while the window is restored. */\n readonly maximize: string;\n /** Return to the previous size. The same button's name while maximized. */\n readonly restore: string;\n /** Close the window. */\n readonly close: string;\n}\n\n/**\n * Loom's English, co-located with the component so it tree-shakes with it, and\n * exported so a host can build a partial vocabulary against the real thing.\n */\nexport const WINDOW_CONTROLS_LABELS: WindowControlsLabels = {\n minimize: \"Minimize\",\n maximize: \"Maximize\",\n restore: \"Restore\",\n close: \"Close\",\n};\n</script>\n\n<script setup lang=\"ts\">\nimport { useLabels, type LabelOverrides } from \"../../lib/labels\";\n\nconst props = withDefaults(\n defineProps<{\n /**\n * The desktop platform the window is running on. On macOS the OS draws its\n * own traffic-light buttons, so this cluster renders nothing there. The host\n * decides — Loom does not sniff the OS, because the host already knows its\n * platform and a PWA has no native controls to avoid.\n */\n platform?: WindowPlatform;\n /** Swaps the middle button between its Maximize and Restore glyph and label. */\n isMaximized?: boolean;\n /**\n * Names for the three buttons, as any subset of `WindowControlsLabels` —\n * the rest stay as the host's `provideLoomLabels` vocabulary left them, and\n * then as Loom's English.\n *\n * This took a whole object before the seam existed, which meant a host that\n * wanted one word in their own language had to restate the other three in\n * English and keep them in step by hand.\n */\n labels?: LabelOverrides<WindowControlsLabels>;\n }>(),\n { platform: \"windows\", isMaximized: false },\n);\n\nconst emit = defineEmits<{\n (e: \"minimize\"): void;\n (e: \"maximize\"): void;\n (e: \"close\"): void;\n}>();\n\n// `text`, not `labels`: the prop of that name is one of the three sources this\n// resolves, and a template reading the raw prop would be reading the overrides\n// rather than the answer.\nconst text = useLabels(\"windowControls\", WINDOW_CONTROLS_LABELS, () => props.labels);\n</script>\n\n<template>\n <!-- On macOS the OS owns the traffic-light buttons; rendering a second set\n would be redundant. The host can also choose \"linux\" if their desktop\n environment handles window buttons natively. -->\n <div\n v-if=\"platform !== 'macos'\"\n class=\"flex h-full items-stretch\"\n style=\"-webkit-app-region: no-drag\"\n >\n <button\n type=\"button\"\n class=\"flex w-11 items-center justify-center text-muted-foreground transition-colors duration-fast ease-out hover:bg-subtle hover:text-foreground active:brightness-90 focus-visible:outline-2 focus-visible:-outline-offset-2 focus-visible:outline-ring\"\n :aria-label=\"text.minimize\"\n data-testid=\"win-minimize\"\n @click=\"emit('minimize')\"\n >\n <svg width=\"10\" height=\"10\" viewBox=\"0 0 10 10\" aria-hidden=\"true\">\n <rect y=\"4.5\" width=\"10\" height=\"1\" fill=\"currentColor\" />\n </svg>\n </button>\n\n <button\n type=\"button\"\n class=\"flex w-11 items-center justify-center text-muted-foreground transition-colors duration-fast ease-out hover:bg-subtle hover:text-foreground active:brightness-90 focus-visible:outline-2 focus-visible:-outline-offset-2 focus-visible:outline-ring\"\n :aria-label=\"isMaximized ? text.restore : text.maximize\"\n data-testid=\"win-maximize\"\n @click=\"emit('maximize')\"\n >\n <svg v-if=\"!isMaximized\" width=\"10\" height=\"10\" viewBox=\"0 0 10 10\" aria-hidden=\"true\">\n <rect x=\"0.5\" y=\"0.5\" width=\"9\" height=\"9\" fill=\"none\" stroke=\"currentColor\" />\n </svg>\n <svg v-else width=\"10\" height=\"10\" viewBox=\"0 0 10 10\" aria-hidden=\"true\">\n <rect x=\"0.5\" y=\"2.5\" width=\"7\" height=\"7\" fill=\"none\" stroke=\"currentColor\" />\n <path d=\"M2.5 2.5 V0.5 H9.5 V7.5 H7.5\" fill=\"none\" stroke=\"currentColor\" />\n </svg>\n </button>\n\n <button\n type=\"button\"\n class=\"flex w-11 items-center justify-center text-muted-foreground transition-colors duration-fast ease-out hover:bg-destructive hover:text-destructive-foreground active:brightness-90 focus-visible:outline-2 focus-visible:-outline-offset-2 focus-visible:outline-ring\"\n :aria-label=\"text.close\"\n data-testid=\"win-close\"\n @click=\"emit('close')\"\n >\n <svg width=\"10\" height=\"10\" viewBox=\"0 0 10 10\" aria-hidden=\"true\">\n <path d=\"M0 0 L10 10 M10 0 L0 10\" stroke=\"currentColor\" />\n </svg>\n </button>\n </div>\n</template>\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA4CA,IAAa,yBAA+C;CAC1D,UAAU;CACV,UAAU;CACV,SAAS;CACT,OAAO;AACT;;;;;;;;;;;;;;;;;EAMA,MAAM,QAAQ;EAyBd,MAAM,OAAO;EASb,MAAM,OAAO,UAAU,kBAAkB,8BAA8B,MAAM,MAAM;;GAQzE,OAAA,QAAA,aAAQ,WADhB,UAAA,GAAA,mBA4CM,OA5CN,YA4CM;IAvCJ,mBAUS,UAAA;KATP,MAAK;KACL,OAAM;KACL,cAAY,MAAA,IAAA,CAAI,CAAC;KAClB,eAAY;KACX,SAAK,OAAA,OAAA,OAAA,MAAA,WAAE,KAAI,UAAA;IAEZ,GAAA,CAAA,GAAA,OAAA,OAAA,OAAA,KAAA,CAAA,mBAEM,OAAA;KAFD,OAAM;KAAK,QAAO;KAAK,SAAQ;KAAY,eAAY;IAC1D,GAAA,CAAA,mBAA0D,QAAA;KAApD,GAAE;KAAM,OAAM;KAAK,QAAO;KAAI,MAAK;;IAI7C,mBAcS,UAAA;KAbP,MAAK;KACL,OAAM;KACL,cAAY,QAAA,cAAc,MAAA,IAAA,CAAI,CAAC,UAAU,MAAA,IAAA,CAAI,CAAC;KAC/C,eAAY;KACX,SAAK,OAAA,OAAA,OAAA,MAAA,WAAE,KAAI,UAAA;IAEA,GAAA,CAAA,CAAA,QAAA,eAAZ,UAAA,GAAA,mBAEM,OAFN,YAEM,CAAA,GAAA,OAAA,OAAA,OAAA,KAAA,CADJ,mBAA+E,QAAA;KAAzE,GAAE;KAAM,GAAE;KAAM,OAAM;KAAI,QAAO;KAAI,MAAK;KAAO,QAAO;IAEhE,GAAA,MAAA,EAAA,CAAA,EAAA,CAAA,MAAA,UAAA,GAAA,mBAGM,OAHN,YAGM,CAAA,GAAA,OAAA,OAAA,OAAA,KAAA,CAFJ,mBAA+E,QAAA;KAAzE,GAAE;KAAM,GAAE;KAAM,OAAM;KAAI,QAAO;KAAI,MAAK;KAAO,QAAO;IAC9D,GAAA,MAAA,EAAA,GAAA,mBAA2E,QAAA;KAArE,GAAE;KAA+B,MAAK;KAAO,QAAO;;IAI9D,mBAUS,UAAA;KATP,MAAK;KACL,OAAM;KACL,cAAY,MAAA,IAAA,CAAI,CAAC;KAClB,eAAY;KACX,SAAK,OAAA,OAAA,OAAA,MAAA,WAAE,KAAI,OAAA;IAEZ,GAAA,CAAA,GAAA,OAAA,OAAA,OAAA,KAAA,CAAA,mBAEM,OAAA;KAFD,OAAM;KAAK,QAAO;KAAK,SAAQ;KAAY,eAAY;IAC1D,GAAA,CAAA,mBAA0D,QAAA;KAApD,GAAE;KAA0B,QAAO"}