@metamorph-labs/polymorph-vue-ui 1.0.17 → 1.0.18

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 (722) hide show
  1. package/CHANGELOG.md +166 -0
  2. package/dist/ai/ArtifactPane.js.map +1 -1
  3. package/dist/ai/ArtifactPane.vue_vue_type_script_setup_true_lang.js +80 -72
  4. package/dist/ai/ArtifactPane.vue_vue_type_script_setup_true_lang.js.map +1 -1
  5. package/dist/ai/PromptInput.js.map +1 -1
  6. package/dist/ai/PromptInput.vue_vue_type_script_setup_true_lang.js +105 -105
  7. package/dist/ai/PromptInput.vue_vue_type_script_setup_true_lang.js.map +1 -1
  8. package/dist/ai/ReasoningDisclosure.js.map +1 -1
  9. package/dist/ai/ReasoningDisclosure.vue_vue_type_script_setup_true_lang.js +1 -1
  10. package/dist/ai/ReasoningDisclosure.vue_vue_type_script_setup_true_lang.js.map +1 -1
  11. package/dist/ai/ToolCall.js.map +1 -1
  12. package/dist/ai/ToolCall.vue_vue_type_script_setup_true_lang.js +1 -1
  13. package/dist/ai/ToolCall.vue_vue_type_script_setup_true_lang.js.map +1 -1
  14. package/dist/ai/artifact-pane.css +1 -1
  15. package/dist/ai/artifact-pane.module.js +1 -1
  16. package/dist/ai/attachment-chip.css +1 -1
  17. package/dist/ai/attachment-chip.module.js +1 -1
  18. package/dist/ai/attachment-chip.module.js.map +1 -1
  19. package/dist/ai/chat-thread.css +1 -1
  20. package/dist/ai/chat-thread.module.js +1 -1
  21. package/dist/ai/citation.css +1 -1
  22. package/dist/ai/citation.module.js +1 -1
  23. package/dist/ai/prompt-input.css +1 -1
  24. package/dist/ai/prompt-input.module.js +1 -1
  25. package/dist/ai/prompt-input.module.js.map +1 -1
  26. package/dist/ai/reasoning-disclosure.css +1 -1
  27. package/dist/ai/reasoning-disclosure.module.js +5 -5
  28. package/dist/ai/reasoning-disclosure.module.js.map +1 -1
  29. package/dist/ai/source-list.css +1 -1
  30. package/dist/ai/source-list.module.js +1 -1
  31. package/dist/ai/source-list.module.js.map +1 -1
  32. package/dist/ai/tool-call.css +1 -1
  33. package/dist/ai/tool-call.module.js +1 -1
  34. package/dist/archetypes/AppShell.js.map +1 -1
  35. package/dist/archetypes/AppShell.vue_vue_type_script_setup_true_lang.js +139 -88
  36. package/dist/archetypes/AppShell.vue_vue_type_script_setup_true_lang.js.map +1 -1
  37. package/dist/archetypes/FormPage.js.map +1 -1
  38. package/dist/archetypes/FormPage.vue_vue_type_script_setup_true_lang.js +43 -21
  39. package/dist/archetypes/FormPage.vue_vue_type_script_setup_true_lang.js.map +1 -1
  40. package/dist/archetypes/app-shell.css +1 -1
  41. package/dist/archetypes/app-shell.module.js +9 -8
  42. package/dist/archetypes/app-shell.module.js.map +1 -1
  43. package/dist/archetypes/form-page.css +1 -1
  44. package/dist/archetypes/form-page.module.js +5 -3
  45. package/dist/archetypes/form-page.module.js.map +1 -1
  46. package/dist/archetypes/master-detail-page.css +1 -1
  47. package/dist/archetypes/master-detail-page.module.js +1 -1
  48. package/dist/archetypes/master-detail-page.module.js.map +1 -1
  49. package/dist/charts/area-chart.css +1 -1
  50. package/dist/charts/area-chart.module.js +1 -1
  51. package/dist/charts/bar-chart.css +1 -1
  52. package/dist/charts/bar-chart.module.js +1 -1
  53. package/dist/charts/donut-chart.css +1 -1
  54. package/dist/charts/donut-chart.module.js +1 -1
  55. package/dist/charts/frame/chart-frame.css +1 -1
  56. package/dist/charts/frame/chart-frame.module.js +1 -1
  57. package/dist/charts/frame/chart-legend.css +1 -1
  58. package/dist/charts/frame/chart-legend.module.js +1 -1
  59. package/dist/charts/frame/chart-legend.module.js.map +1 -1
  60. package/dist/charts/funnel-chart.css +1 -1
  61. package/dist/charts/funnel-chart.module.js +1 -1
  62. package/dist/charts/heatmap.css +1 -1
  63. package/dist/charts/heatmap.module.js +1 -1
  64. package/dist/charts/histogram.css +1 -1
  65. package/dist/charts/histogram.module.js +1 -1
  66. package/dist/charts/line-chart.css +1 -1
  67. package/dist/charts/line-chart.module.js +1 -1
  68. package/dist/charts/radar-chart.css +1 -1
  69. package/dist/charts/radar-chart.module.js +1 -1
  70. package/dist/charts/scatter-chart.css +1 -1
  71. package/dist/charts/scatter-chart.module.js +1 -1
  72. package/dist/charts/treemap.css +1 -1
  73. package/dist/charts/treemap.module.js +1 -1
  74. package/dist/controls/AvatarButton.js.map +1 -1
  75. package/dist/controls/AvatarButton.vue_vue_type_script_setup_true_lang.js +43 -35
  76. package/dist/controls/AvatarButton.vue_vue_type_script_setup_true_lang.js.map +1 -1
  77. package/dist/controls/Button.js.map +1 -1
  78. package/dist/controls/Button.vue_vue_type_script_setup_true_lang.js +74 -62
  79. package/dist/controls/Button.vue_vue_type_script_setup_true_lang.js.map +1 -1
  80. package/dist/controls/Calendar.js.map +1 -1
  81. package/dist/controls/Calendar.vue_vue_type_script_setup_true_lang.js +1 -1
  82. package/dist/controls/Calendar.vue_vue_type_script_setup_true_lang.js.map +1 -1
  83. package/dist/controls/Checkbox.js.map +1 -1
  84. package/dist/controls/Checkbox.vue_vue_type_script_setup_true_lang.js +1 -1
  85. package/dist/controls/Checkbox.vue_vue_type_script_setup_true_lang.js.map +1 -1
  86. package/dist/controls/ColorInput.js.map +1 -1
  87. package/dist/controls/ColorInput.vue_vue_type_script_setup_true_lang.js +95 -95
  88. package/dist/controls/ColorInput.vue_vue_type_script_setup_true_lang.js.map +1 -1
  89. package/dist/controls/Combobox.js.map +1 -1
  90. package/dist/controls/Combobox.vue_vue_type_script_setup_true_lang.js +1 -1
  91. package/dist/controls/Combobox.vue_vue_type_script_setup_true_lang.js.map +1 -1
  92. package/dist/controls/CopyButton.js.map +1 -1
  93. package/dist/controls/CopyButton.vue_vue_type_script_setup_true_lang.js +44 -30
  94. package/dist/controls/CopyButton.vue_vue_type_script_setup_true_lang.js.map +1 -1
  95. package/dist/controls/DatePicker.js.map +1 -1
  96. package/dist/controls/DatePicker.vue_vue_type_script_setup_true_lang.js +1 -1
  97. package/dist/controls/DatePicker.vue_vue_type_script_setup_true_lang.js.map +1 -1
  98. package/dist/controls/DateRangePicker.js.map +1 -1
  99. package/dist/controls/DateRangePicker.vue_vue_type_script_setup_true_lang.js +1 -1
  100. package/dist/controls/DateRangePicker.vue_vue_type_script_setup_true_lang.js.map +1 -1
  101. package/dist/controls/FileUpload.js.map +1 -1
  102. package/dist/controls/FileUpload.vue_vue_type_script_setup_true_lang.js +98 -89
  103. package/dist/controls/FileUpload.vue_vue_type_script_setup_true_lang.js.map +1 -1
  104. package/dist/controls/InlineEdit.js.map +1 -1
  105. package/dist/controls/InlineEdit.vue_vue_type_script_setup_true_lang.js +71 -63
  106. package/dist/controls/InlineEdit.vue_vue_type_script_setup_true_lang.js.map +1 -1
  107. package/dist/controls/MultiSelect.js.map +1 -1
  108. package/dist/controls/MultiSelect.vue_vue_type_script_setup_true_lang.js +188 -177
  109. package/dist/controls/MultiSelect.vue_vue_type_script_setup_true_lang.js.map +1 -1
  110. package/dist/controls/NumberInput.js.map +1 -1
  111. package/dist/controls/NumberInput.vue_vue_type_script_setup_true_lang.js +1 -1
  112. package/dist/controls/NumberInput.vue_vue_type_script_setup_true_lang.js.map +1 -1
  113. package/dist/controls/PhoneInput.js.map +1 -1
  114. package/dist/controls/PhoneInput.vue_vue_type_script_setup_true_lang.js +39 -39
  115. package/dist/controls/PhoneInput.vue_vue_type_script_setup_true_lang.js.map +1 -1
  116. package/dist/controls/RadioGroup.js.map +1 -1
  117. package/dist/controls/RadioGroup.vue_vue_type_script_setup_true_lang.js +1 -1
  118. package/dist/controls/RadioGroup.vue_vue_type_script_setup_true_lang.js.map +1 -1
  119. package/dist/controls/SegmentedControl.js.map +1 -1
  120. package/dist/controls/SegmentedControl.vue_vue_type_script_setup_true_lang.js +1 -1
  121. package/dist/controls/SegmentedControl.vue_vue_type_script_setup_true_lang.js.map +1 -1
  122. package/dist/controls/Select.js.map +1 -1
  123. package/dist/controls/Select.vue_vue_type_script_setup_true_lang.js +1 -1
  124. package/dist/controls/Select.vue_vue_type_script_setup_true_lang.js.map +1 -1
  125. package/dist/controls/Slider.js.map +1 -1
  126. package/dist/controls/Slider.vue_vue_type_script_setup_true_lang.js +1 -1
  127. package/dist/controls/Slider.vue_vue_type_script_setup_true_lang.js.map +1 -1
  128. package/dist/controls/SplitButton.js.map +1 -1
  129. package/dist/controls/SplitButton.vue_vue_type_script_setup_true_lang.js +102 -87
  130. package/dist/controls/SplitButton.vue_vue_type_script_setup_true_lang.js.map +1 -1
  131. package/dist/controls/SplitButtonSubmenu.js.map +1 -1
  132. package/dist/controls/SplitButtonSubmenu.vue_vue_type_script_setup_true_lang.js +1 -1
  133. package/dist/controls/SplitButtonSubmenu.vue_vue_type_script_setup_true_lang.js.map +1 -1
  134. package/dist/controls/Switch.js.map +1 -1
  135. package/dist/controls/Switch.vue_vue_type_script_setup_true_lang.js +1 -1
  136. package/dist/controls/Switch.vue_vue_type_script_setup_true_lang.js.map +1 -1
  137. package/dist/controls/TagInput.js.map +1 -1
  138. package/dist/controls/TagInput.vue_vue_type_script_setup_true_lang.js +122 -111
  139. package/dist/controls/TagInput.vue_vue_type_script_setup_true_lang.js.map +1 -1
  140. package/dist/controls/TreeSelect.js.map +1 -1
  141. package/dist/controls/TreeSelect.vue_vue_type_script_setup_true_lang.js +56 -56
  142. package/dist/controls/TreeSelect.vue_vue_type_script_setup_true_lang.js.map +1 -1
  143. package/dist/controls/avatar-button.css +1 -1
  144. package/dist/controls/avatar-button.module.js +5 -4
  145. package/dist/controls/avatar-button.module.js.map +1 -1
  146. package/dist/controls/button.css +1 -1
  147. package/dist/controls/button.module.js +4 -3
  148. package/dist/controls/button.module.js.map +1 -1
  149. package/dist/controls/calendar.css +1 -1
  150. package/dist/controls/calendar.module.js +3 -3
  151. package/dist/controls/calendar.module.js.map +1 -1
  152. package/dist/controls/checkbox-group.css +1 -1
  153. package/dist/controls/checkbox-group.module.js +1 -1
  154. package/dist/controls/checkbox.css +1 -1
  155. package/dist/controls/checkbox.module.js +2 -2
  156. package/dist/controls/checkbox.module.js.map +1 -1
  157. package/dist/controls/choice-card.css +1 -1
  158. package/dist/controls/choice-card.module.js +2 -2
  159. package/dist/controls/choice-card.module.js.map +1 -1
  160. package/dist/controls/color-input.css +1 -1
  161. package/dist/controls/color-input.module.js +1 -1
  162. package/dist/controls/color-input.module.js.map +1 -1
  163. package/dist/controls/combobox.css +1 -1
  164. package/dist/controls/combobox.module.js +5 -5
  165. package/dist/controls/combobox.module.js.map +1 -1
  166. package/dist/controls/copy-button.css +1 -1
  167. package/dist/controls/copy-button.module.js +8 -7
  168. package/dist/controls/copy-button.module.js.map +1 -1
  169. package/dist/controls/date-picker.css +1 -1
  170. package/dist/controls/date-picker.module.js +1 -1
  171. package/dist/controls/date-range-picker.css +1 -1
  172. package/dist/controls/date-range-picker.module.js +6 -6
  173. package/dist/controls/date-range-picker.module.js.map +1 -1
  174. package/dist/controls/duration-input.css +1 -1
  175. package/dist/controls/duration-input.module.js +1 -1
  176. package/dist/controls/file-upload.css +1 -1
  177. package/dist/controls/file-upload.module.js +1 -1
  178. package/dist/controls/file-upload.module.js.map +1 -1
  179. package/dist/controls/input.css +1 -1
  180. package/dist/controls/input.module.js +2 -2
  181. package/dist/controls/input.module.js.map +1 -1
  182. package/dist/controls/link.css +1 -1
  183. package/dist/controls/link.module.js +1 -1
  184. package/dist/controls/link.module.js.map +1 -1
  185. package/dist/controls/month-input.css +1 -1
  186. package/dist/controls/month-input.module.js +1 -1
  187. package/dist/controls/multi-select.css +1 -1
  188. package/dist/controls/multi-select.module.js +5 -5
  189. package/dist/controls/multi-select.module.js.map +1 -1
  190. package/dist/controls/number-input.css +1 -1
  191. package/dist/controls/number-input.module.js +1 -1
  192. package/dist/controls/number-input.module.js.map +1 -1
  193. package/dist/controls/otp-input.css +1 -1
  194. package/dist/controls/otp-input.module.js +2 -2
  195. package/dist/controls/otp-input.module.js.map +1 -1
  196. package/dist/controls/password-input.css +1 -1
  197. package/dist/controls/password-input.module.js +2 -2
  198. package/dist/controls/password-input.module.js.map +1 -1
  199. package/dist/controls/provider-button.css +1 -1
  200. package/dist/controls/provider-button.module.js +1 -1
  201. package/dist/controls/radio-group.css +1 -1
  202. package/dist/controls/radio-group.module.js +2 -2
  203. package/dist/controls/radio-group.module.js.map +1 -1
  204. package/dist/controls/rating.css +1 -1
  205. package/dist/controls/rating.module.js +1 -1
  206. package/dist/controls/rich-text-input.css +1 -1
  207. package/dist/controls/rich-text-input.module.js +1 -1
  208. package/dist/controls/rich-text-input.module.js.map +1 -1
  209. package/dist/controls/segmented-control.css +1 -1
  210. package/dist/controls/segmented-control.module.js +1 -1
  211. package/dist/controls/select.css +1 -1
  212. package/dist/controls/select.module.js +3 -3
  213. package/dist/controls/select.module.js.map +1 -1
  214. package/dist/controls/slider.css +1 -1
  215. package/dist/controls/slider.module.js +1 -1
  216. package/dist/controls/slider.module.js.map +1 -1
  217. package/dist/controls/split-button.css +1 -1
  218. package/dist/controls/split-button.module.js +20 -19
  219. package/dist/controls/split-button.module.js.map +1 -1
  220. package/dist/controls/switch.css +1 -1
  221. package/dist/controls/switch.module.js +1 -1
  222. package/dist/controls/switch.module.js.map +1 -1
  223. package/dist/controls/tag-input.css +1 -1
  224. package/dist/controls/tag-input.module.js +1 -1
  225. package/dist/controls/textarea.css +1 -1
  226. package/dist/controls/textarea.module.js +1 -1
  227. package/dist/controls/time-input.css +1 -1
  228. package/dist/controls/time-input.module.js +1 -1
  229. package/dist/controls/tree-select.css +1 -1
  230. package/dist/controls/tree-select.module.js +1 -1
  231. package/dist/layout/split-pane.css +1 -1
  232. package/dist/layout/split-pane.module.js +1 -1
  233. package/dist/layout/split-pane.module.js.map +1 -1
  234. package/dist/node/ai/ArtifactPane.js.map +1 -1
  235. package/dist/node/ai/ArtifactPane.vue_vue_type_script_setup_true_lang.js +80 -72
  236. package/dist/node/ai/ArtifactPane.vue_vue_type_script_setup_true_lang.js.map +1 -1
  237. package/dist/node/ai/PromptInput.js.map +1 -1
  238. package/dist/node/ai/PromptInput.vue_vue_type_script_setup_true_lang.js +105 -105
  239. package/dist/node/ai/PromptInput.vue_vue_type_script_setup_true_lang.js.map +1 -1
  240. package/dist/node/ai/ReasoningDisclosure.js.map +1 -1
  241. package/dist/node/ai/ReasoningDisclosure.vue_vue_type_script_setup_true_lang.js +1 -1
  242. package/dist/node/ai/ReasoningDisclosure.vue_vue_type_script_setup_true_lang.js.map +1 -1
  243. package/dist/node/ai/ToolCall.js.map +1 -1
  244. package/dist/node/ai/ToolCall.vue_vue_type_script_setup_true_lang.js +1 -1
  245. package/dist/node/ai/ToolCall.vue_vue_type_script_setup_true_lang.js.map +1 -1
  246. package/dist/node/ai/artifact-pane.module.js +1 -1
  247. package/dist/node/ai/attachment-chip.module.js +1 -1
  248. package/dist/node/ai/attachment-chip.module.js.map +1 -1
  249. package/dist/node/ai/chat-thread.module.js +1 -1
  250. package/dist/node/ai/citation.module.js +1 -1
  251. package/dist/node/ai/prompt-input.module.js +1 -1
  252. package/dist/node/ai/prompt-input.module.js.map +1 -1
  253. package/dist/node/ai/reasoning-disclosure.module.js +5 -5
  254. package/dist/node/ai/reasoning-disclosure.module.js.map +1 -1
  255. package/dist/node/ai/source-list.module.js +1 -1
  256. package/dist/node/ai/source-list.module.js.map +1 -1
  257. package/dist/node/ai/tool-call.module.js +1 -1
  258. package/dist/node/archetypes/AppShell.js.map +1 -1
  259. package/dist/node/archetypes/AppShell.vue_vue_type_script_setup_true_lang.js +139 -88
  260. package/dist/node/archetypes/AppShell.vue_vue_type_script_setup_true_lang.js.map +1 -1
  261. package/dist/node/archetypes/FormPage.js.map +1 -1
  262. package/dist/node/archetypes/FormPage.vue_vue_type_script_setup_true_lang.js +43 -21
  263. package/dist/node/archetypes/FormPage.vue_vue_type_script_setup_true_lang.js.map +1 -1
  264. package/dist/node/archetypes/app-shell.module.js +9 -8
  265. package/dist/node/archetypes/app-shell.module.js.map +1 -1
  266. package/dist/node/archetypes/form-page.module.js +5 -3
  267. package/dist/node/archetypes/form-page.module.js.map +1 -1
  268. package/dist/node/archetypes/master-detail-page.module.js +1 -1
  269. package/dist/node/archetypes/master-detail-page.module.js.map +1 -1
  270. package/dist/node/charts/area-chart.module.js +1 -1
  271. package/dist/node/charts/bar-chart.module.js +1 -1
  272. package/dist/node/charts/donut-chart.module.js +1 -1
  273. package/dist/node/charts/frame/chart-frame.module.js +1 -1
  274. package/dist/node/charts/frame/chart-legend.module.js +1 -1
  275. package/dist/node/charts/frame/chart-legend.module.js.map +1 -1
  276. package/dist/node/charts/funnel-chart.module.js +1 -1
  277. package/dist/node/charts/heatmap.module.js +1 -1
  278. package/dist/node/charts/histogram.module.js +1 -1
  279. package/dist/node/charts/line-chart.module.js +1 -1
  280. package/dist/node/charts/radar-chart.module.js +1 -1
  281. package/dist/node/charts/scatter-chart.module.js +1 -1
  282. package/dist/node/charts/treemap.module.js +1 -1
  283. package/dist/node/controls/AvatarButton.js.map +1 -1
  284. package/dist/node/controls/AvatarButton.vue_vue_type_script_setup_true_lang.js +43 -35
  285. package/dist/node/controls/AvatarButton.vue_vue_type_script_setup_true_lang.js.map +1 -1
  286. package/dist/node/controls/Button.js.map +1 -1
  287. package/dist/node/controls/Button.vue_vue_type_script_setup_true_lang.js +74 -62
  288. package/dist/node/controls/Button.vue_vue_type_script_setup_true_lang.js.map +1 -1
  289. package/dist/node/controls/Calendar.js.map +1 -1
  290. package/dist/node/controls/Calendar.vue_vue_type_script_setup_true_lang.js +1 -1
  291. package/dist/node/controls/Calendar.vue_vue_type_script_setup_true_lang.js.map +1 -1
  292. package/dist/node/controls/Checkbox.js.map +1 -1
  293. package/dist/node/controls/Checkbox.vue_vue_type_script_setup_true_lang.js +1 -1
  294. package/dist/node/controls/Checkbox.vue_vue_type_script_setup_true_lang.js.map +1 -1
  295. package/dist/node/controls/ColorInput.js.map +1 -1
  296. package/dist/node/controls/ColorInput.vue_vue_type_script_setup_true_lang.js +95 -95
  297. package/dist/node/controls/ColorInput.vue_vue_type_script_setup_true_lang.js.map +1 -1
  298. package/dist/node/controls/Combobox.js.map +1 -1
  299. package/dist/node/controls/Combobox.vue_vue_type_script_setup_true_lang.js +1 -1
  300. package/dist/node/controls/Combobox.vue_vue_type_script_setup_true_lang.js.map +1 -1
  301. package/dist/node/controls/CopyButton.js.map +1 -1
  302. package/dist/node/controls/CopyButton.vue_vue_type_script_setup_true_lang.js +44 -30
  303. package/dist/node/controls/CopyButton.vue_vue_type_script_setup_true_lang.js.map +1 -1
  304. package/dist/node/controls/DatePicker.js.map +1 -1
  305. package/dist/node/controls/DatePicker.vue_vue_type_script_setup_true_lang.js +1 -1
  306. package/dist/node/controls/DatePicker.vue_vue_type_script_setup_true_lang.js.map +1 -1
  307. package/dist/node/controls/DateRangePicker.js.map +1 -1
  308. package/dist/node/controls/DateRangePicker.vue_vue_type_script_setup_true_lang.js +1 -1
  309. package/dist/node/controls/DateRangePicker.vue_vue_type_script_setup_true_lang.js.map +1 -1
  310. package/dist/node/controls/FileUpload.js.map +1 -1
  311. package/dist/node/controls/FileUpload.vue_vue_type_script_setup_true_lang.js +98 -89
  312. package/dist/node/controls/FileUpload.vue_vue_type_script_setup_true_lang.js.map +1 -1
  313. package/dist/node/controls/InlineEdit.js.map +1 -1
  314. package/dist/node/controls/InlineEdit.vue_vue_type_script_setup_true_lang.js +71 -63
  315. package/dist/node/controls/InlineEdit.vue_vue_type_script_setup_true_lang.js.map +1 -1
  316. package/dist/node/controls/MultiSelect.js.map +1 -1
  317. package/dist/node/controls/MultiSelect.vue_vue_type_script_setup_true_lang.js +188 -177
  318. package/dist/node/controls/MultiSelect.vue_vue_type_script_setup_true_lang.js.map +1 -1
  319. package/dist/node/controls/NumberInput.js.map +1 -1
  320. package/dist/node/controls/NumberInput.vue_vue_type_script_setup_true_lang.js +1 -1
  321. package/dist/node/controls/NumberInput.vue_vue_type_script_setup_true_lang.js.map +1 -1
  322. package/dist/node/controls/PhoneInput.js.map +1 -1
  323. package/dist/node/controls/PhoneInput.vue_vue_type_script_setup_true_lang.js +39 -39
  324. package/dist/node/controls/PhoneInput.vue_vue_type_script_setup_true_lang.js.map +1 -1
  325. package/dist/node/controls/RadioGroup.js.map +1 -1
  326. package/dist/node/controls/RadioGroup.vue_vue_type_script_setup_true_lang.js +1 -1
  327. package/dist/node/controls/RadioGroup.vue_vue_type_script_setup_true_lang.js.map +1 -1
  328. package/dist/node/controls/SegmentedControl.js.map +1 -1
  329. package/dist/node/controls/SegmentedControl.vue_vue_type_script_setup_true_lang.js +1 -1
  330. package/dist/node/controls/SegmentedControl.vue_vue_type_script_setup_true_lang.js.map +1 -1
  331. package/dist/node/controls/Select.js.map +1 -1
  332. package/dist/node/controls/Select.vue_vue_type_script_setup_true_lang.js +1 -1
  333. package/dist/node/controls/Select.vue_vue_type_script_setup_true_lang.js.map +1 -1
  334. package/dist/node/controls/Slider.js.map +1 -1
  335. package/dist/node/controls/Slider.vue_vue_type_script_setup_true_lang.js +1 -1
  336. package/dist/node/controls/Slider.vue_vue_type_script_setup_true_lang.js.map +1 -1
  337. package/dist/node/controls/SplitButton.js.map +1 -1
  338. package/dist/node/controls/SplitButton.vue_vue_type_script_setup_true_lang.js +102 -87
  339. package/dist/node/controls/SplitButton.vue_vue_type_script_setup_true_lang.js.map +1 -1
  340. package/dist/node/controls/SplitButtonSubmenu.js.map +1 -1
  341. package/dist/node/controls/SplitButtonSubmenu.vue_vue_type_script_setup_true_lang.js +1 -1
  342. package/dist/node/controls/SplitButtonSubmenu.vue_vue_type_script_setup_true_lang.js.map +1 -1
  343. package/dist/node/controls/Switch.js.map +1 -1
  344. package/dist/node/controls/Switch.vue_vue_type_script_setup_true_lang.js +1 -1
  345. package/dist/node/controls/Switch.vue_vue_type_script_setup_true_lang.js.map +1 -1
  346. package/dist/node/controls/TagInput.js.map +1 -1
  347. package/dist/node/controls/TagInput.vue_vue_type_script_setup_true_lang.js +122 -111
  348. package/dist/node/controls/TagInput.vue_vue_type_script_setup_true_lang.js.map +1 -1
  349. package/dist/node/controls/TreeSelect.js.map +1 -1
  350. package/dist/node/controls/TreeSelect.vue_vue_type_script_setup_true_lang.js +56 -56
  351. package/dist/node/controls/TreeSelect.vue_vue_type_script_setup_true_lang.js.map +1 -1
  352. package/dist/node/controls/avatar-button.module.js +5 -4
  353. package/dist/node/controls/avatar-button.module.js.map +1 -1
  354. package/dist/node/controls/button.module.js +4 -3
  355. package/dist/node/controls/button.module.js.map +1 -1
  356. package/dist/node/controls/calendar.module.js +3 -3
  357. package/dist/node/controls/calendar.module.js.map +1 -1
  358. package/dist/node/controls/checkbox-group.module.js +1 -1
  359. package/dist/node/controls/checkbox.module.js +2 -2
  360. package/dist/node/controls/checkbox.module.js.map +1 -1
  361. package/dist/node/controls/choice-card.module.js +2 -2
  362. package/dist/node/controls/choice-card.module.js.map +1 -1
  363. package/dist/node/controls/color-input.module.js +1 -1
  364. package/dist/node/controls/color-input.module.js.map +1 -1
  365. package/dist/node/controls/combobox.module.js +5 -5
  366. package/dist/node/controls/combobox.module.js.map +1 -1
  367. package/dist/node/controls/copy-button.module.js +8 -7
  368. package/dist/node/controls/copy-button.module.js.map +1 -1
  369. package/dist/node/controls/date-picker.module.js +1 -1
  370. package/dist/node/controls/date-range-picker.module.js +6 -6
  371. package/dist/node/controls/date-range-picker.module.js.map +1 -1
  372. package/dist/node/controls/duration-input.module.js +1 -1
  373. package/dist/node/controls/file-upload.module.js +1 -1
  374. package/dist/node/controls/file-upload.module.js.map +1 -1
  375. package/dist/node/controls/input.module.js +2 -2
  376. package/dist/node/controls/input.module.js.map +1 -1
  377. package/dist/node/controls/link.module.js +1 -1
  378. package/dist/node/controls/link.module.js.map +1 -1
  379. package/dist/node/controls/month-input.module.js +1 -1
  380. package/dist/node/controls/multi-select.module.js +5 -5
  381. package/dist/node/controls/multi-select.module.js.map +1 -1
  382. package/dist/node/controls/number-input.module.js +1 -1
  383. package/dist/node/controls/number-input.module.js.map +1 -1
  384. package/dist/node/controls/otp-input.module.js +2 -2
  385. package/dist/node/controls/otp-input.module.js.map +1 -1
  386. package/dist/node/controls/password-input.module.js +2 -2
  387. package/dist/node/controls/password-input.module.js.map +1 -1
  388. package/dist/node/controls/provider-button.module.js +1 -1
  389. package/dist/node/controls/radio-group.module.js +2 -2
  390. package/dist/node/controls/radio-group.module.js.map +1 -1
  391. package/dist/node/controls/rating.module.js +1 -1
  392. package/dist/node/controls/rich-text-input.module.js +1 -1
  393. package/dist/node/controls/rich-text-input.module.js.map +1 -1
  394. package/dist/node/controls/segmented-control.module.js +1 -1
  395. package/dist/node/controls/select.module.js +3 -3
  396. package/dist/node/controls/select.module.js.map +1 -1
  397. package/dist/node/controls/slider.module.js +1 -1
  398. package/dist/node/controls/slider.module.js.map +1 -1
  399. package/dist/node/controls/split-button.module.js +20 -19
  400. package/dist/node/controls/split-button.module.js.map +1 -1
  401. package/dist/node/controls/switch.module.js +1 -1
  402. package/dist/node/controls/switch.module.js.map +1 -1
  403. package/dist/node/controls/tag-input.module.js +1 -1
  404. package/dist/node/controls/textarea.module.js +1 -1
  405. package/dist/node/controls/time-input.module.js +1 -1
  406. package/dist/node/controls/tree-select.module.js +1 -1
  407. package/dist/node/layout/split-pane.module.js +1 -1
  408. package/dist/node/layout/split-pane.module.js.map +1 -1
  409. package/dist/node/overlays/Command.js.map +1 -1
  410. package/dist/node/overlays/Command.vue_vue_type_script_setup_true_lang.js +50 -45
  411. package/dist/node/overlays/Command.vue_vue_type_script_setup_true_lang.js.map +1 -1
  412. package/dist/node/overlays/CommandPanel.js.map +1 -1
  413. package/dist/node/overlays/CommandPanel.vue_vue_type_script_setup_true_lang.js +82 -82
  414. package/dist/node/overlays/CommandPanel.vue_vue_type_script_setup_true_lang.js.map +1 -1
  415. package/dist/node/overlays/ContextMenu.js.map +1 -1
  416. package/dist/node/overlays/ContextMenu.vue_vue_type_script_setup_true_lang.js +1 -1
  417. package/dist/node/overlays/ContextMenu.vue_vue_type_script_setup_true_lang.js.map +1 -1
  418. package/dist/node/overlays/ContextMenuSubmenu.js.map +1 -1
  419. package/dist/node/overlays/ContextMenuSubmenu.vue_vue_type_script_setup_true_lang.js +1 -1
  420. package/dist/node/overlays/ContextMenuSubmenu.vue_vue_type_script_setup_true_lang.js.map +1 -1
  421. package/dist/node/overlays/Dialog.js.map +1 -1
  422. package/dist/node/overlays/Dialog.vue_vue_type_script_setup_true_lang.js +47 -43
  423. package/dist/node/overlays/Dialog.vue_vue_type_script_setup_true_lang.js.map +1 -1
  424. package/dist/node/overlays/Drawer.js.map +1 -1
  425. package/dist/node/overlays/Drawer.vue_vue_type_script_setup_true_lang.js +58 -53
  426. package/dist/node/overlays/Drawer.vue_vue_type_script_setup_true_lang.js.map +1 -1
  427. package/dist/node/overlays/Lightbox.js.map +1 -1
  428. package/dist/node/overlays/Lightbox.vue_vue_type_script_setup_true_lang.js +65 -61
  429. package/dist/node/overlays/Lightbox.vue_vue_type_script_setup_true_lang.js.map +1 -1
  430. package/dist/node/overlays/Menu.js.map +1 -1
  431. package/dist/node/overlays/Menu.vue_vue_type_script_setup_true_lang.js +1 -1
  432. package/dist/node/overlays/Menu.vue_vue_type_script_setup_true_lang.js.map +1 -1
  433. package/dist/node/overlays/MenuSubmenu.js.map +1 -1
  434. package/dist/node/overlays/MenuSubmenu.vue_vue_type_script_setup_true_lang.js +1 -1
  435. package/dist/node/overlays/MenuSubmenu.vue_vue_type_script_setup_true_lang.js.map +1 -1
  436. package/dist/node/overlays/Menubar.js.map +1 -1
  437. package/dist/node/overlays/Menubar.vue_vue_type_script_setup_true_lang.js +1 -1
  438. package/dist/node/overlays/Menubar.vue_vue_type_script_setup_true_lang.js.map +1 -1
  439. package/dist/node/overlays/MenubarSubmenu.js.map +1 -1
  440. package/dist/node/overlays/MenubarSubmenu.vue_vue_type_script_setup_true_lang.js +1 -1
  441. package/dist/node/overlays/MenubarSubmenu.vue_vue_type_script_setup_true_lang.js.map +1 -1
  442. package/dist/node/overlays/Popover.js.map +1 -1
  443. package/dist/node/overlays/Popover.vue_vue_type_script_setup_true_lang.js +1 -1
  444. package/dist/node/overlays/Popover.vue_vue_type_script_setup_true_lang.js.map +1 -1
  445. package/dist/node/overlays/Tabs.js.map +1 -1
  446. package/dist/node/overlays/Tabs.vue_vue_type_script_setup_true_lang.js +1 -1
  447. package/dist/node/overlays/Tabs.vue_vue_type_script_setup_true_lang.js.map +1 -1
  448. package/dist/node/overlays/Toast.js.map +1 -1
  449. package/dist/node/overlays/Toast.vue_vue_type_script_setup_true_lang.js.map +1 -1
  450. package/dist/node/overlays/ToastCard.js.map +1 -1
  451. package/dist/node/overlays/ToastCard.vue_vue_type_script_setup_true_lang.js +74 -71
  452. package/dist/node/overlays/ToastCard.vue_vue_type_script_setup_true_lang.js.map +1 -1
  453. package/dist/node/overlays/ToastViewport.js.map +1 -1
  454. package/dist/node/overlays/ToastViewport.vue_vue_type_script_setup_true_lang.js +70 -59
  455. package/dist/node/overlays/ToastViewport.vue_vue_type_script_setup_true_lang.js.map +1 -1
  456. package/dist/node/overlays/Tooltip.js.map +1 -1
  457. package/dist/node/overlays/Tooltip.vue_vue_type_script_setup_true_lang.js +46 -26
  458. package/dist/node/overlays/Tooltip.vue_vue_type_script_setup_true_lang.js.map +1 -1
  459. package/dist/node/overlays/Tour.js.map +1 -1
  460. package/dist/node/overlays/Tour.vue_vue_type_script_setup_true_lang.js +74 -69
  461. package/dist/node/overlays/Tour.vue_vue_type_script_setup_true_lang.js.map +1 -1
  462. package/dist/node/overlays/context-menu.module.js +4 -4
  463. package/dist/node/overlays/context-menu.module.js.map +1 -1
  464. package/dist/node/overlays/dialog.module.js +1 -1
  465. package/dist/node/overlays/dialog.module.js.map +1 -1
  466. package/dist/node/overlays/drawer.module.js +1 -1
  467. package/dist/node/overlays/drawer.module.js.map +1 -1
  468. package/dist/node/overlays/lightbox.module.js +1 -1
  469. package/dist/node/overlays/menu.module.js +4 -4
  470. package/dist/node/overlays/menu.module.js.map +1 -1
  471. package/dist/node/overlays/menubar.module.js +1 -1
  472. package/dist/node/overlays/menubar.module.js.map +1 -1
  473. package/dist/node/overlays/popover.module.js +3 -3
  474. package/dist/node/overlays/popover.module.js.map +1 -1
  475. package/dist/node/overlays/sheet.module.js +1 -1
  476. package/dist/node/overlays/sheet.module.js.map +1 -1
  477. package/dist/node/overlays/tabs.module.js +4 -4
  478. package/dist/node/overlays/tabs.module.js.map +1 -1
  479. package/dist/node/overlays/toast.module.js +1 -1
  480. package/dist/node/overlays/toast.module.js.map +1 -1
  481. package/dist/node/overlays/tour.module.js +1 -1
  482. package/dist/node/overlays/tour.module.js.map +1 -1
  483. package/dist/node/structure/Accordion.js.map +1 -1
  484. package/dist/node/structure/Accordion.vue_vue_type_script_setup_true_lang.js +1 -1
  485. package/dist/node/structure/Accordion.vue_vue_type_script_setup_true_lang.js.map +1 -1
  486. package/dist/node/structure/Alert.js.map +1 -1
  487. package/dist/node/structure/Alert.vue_vue_type_script_setup_true_lang.js +62 -54
  488. package/dist/node/structure/Alert.vue_vue_type_script_setup_true_lang.js.map +1 -1
  489. package/dist/node/structure/Banner.js.map +1 -1
  490. package/dist/node/structure/Banner.vue_vue_type_script_setup_true_lang.js +42 -34
  491. package/dist/node/structure/Banner.vue_vue_type_script_setup_true_lang.js.map +1 -1
  492. package/dist/node/structure/Carousel.js.map +1 -1
  493. package/dist/node/structure/Carousel.vue_vue_type_script_setup_true_lang.js +8 -8
  494. package/dist/node/structure/Carousel.vue_vue_type_script_setup_true_lang.js.map +1 -1
  495. package/dist/node/structure/Collapsible.js.map +1 -1
  496. package/dist/node/structure/Collapsible.vue_vue_type_script_setup_true_lang.js +1 -1
  497. package/dist/node/structure/Collapsible.vue_vue_type_script_setup_true_lang.js.map +1 -1
  498. package/dist/node/structure/DataTable.vue_vue_type_script_setup_true_lang.js.map +1 -1
  499. package/dist/node/structure/Pagination.js.map +1 -1
  500. package/dist/node/structure/Pagination.vue_vue_type_script_setup_true_lang.js +118 -88
  501. package/dist/node/structure/Pagination.vue_vue_type_script_setup_true_lang.js.map +1 -1
  502. package/dist/node/structure/ScrollArea.js.map +1 -1
  503. package/dist/node/structure/ScrollArea.vue_vue_type_script_setup_true_lang.js +30 -27
  504. package/dist/node/structure/ScrollArea.vue_vue_type_script_setup_true_lang.js.map +1 -1
  505. package/dist/node/structure/Table.js.map +1 -1
  506. package/dist/node/structure/Table.vue_vue_type_script_setup_true_lang.js +71 -61
  507. package/dist/node/structure/Table.vue_vue_type_script_setup_true_lang.js.map +1 -1
  508. package/dist/node/structure/accordion.module.js +5 -5
  509. package/dist/node/structure/accordion.module.js.map +1 -1
  510. package/dist/node/structure/breadcrumbs.module.js +1 -1
  511. package/dist/node/structure/breadcrumbs.module.js.map +1 -1
  512. package/dist/node/structure/card.module.js +1 -1
  513. package/dist/node/structure/card.module.js.map +1 -1
  514. package/dist/node/structure/carousel.module.js +1 -1
  515. package/dist/node/structure/carousel.module.js.map +1 -1
  516. package/dist/node/structure/code-block.module.js +1 -1
  517. package/dist/node/structure/collapsible.module.js +5 -5
  518. package/dist/node/structure/collapsible.module.js.map +1 -1
  519. package/dist/node/structure/cursor-pagination.module.js +1 -1
  520. package/dist/node/structure/data-table.module.js +1 -1
  521. package/dist/node/structure/error-summary.module.js +1 -1
  522. package/dist/node/structure/error-summary.module.js.map +1 -1
  523. package/dist/node/structure/json-tree.module.js +1 -1
  524. package/dist/node/structure/json-tree.module.js.map +1 -1
  525. package/dist/node/structure/list.module.js +1 -1
  526. package/dist/node/structure/list.module.js.map +1 -1
  527. package/dist/node/structure/log-view.module.js +1 -1
  528. package/dist/node/structure/pagination.module.js +4 -3
  529. package/dist/node/structure/pagination.module.js.map +1 -1
  530. package/dist/node/structure/rich-text-content.module.js +1 -1
  531. package/dist/node/structure/section-nav.module.js +1 -1
  532. package/dist/node/structure/section-nav.module.js.map +1 -1
  533. package/dist/node/structure/stepper.module.js +2 -2
  534. package/dist/node/structure/stepper.module.js.map +1 -1
  535. package/dist/node/structure/table-of-contents.module.js +1 -1
  536. package/dist/node/structure/table-of-contents.module.js.map +1 -1
  537. package/dist/node/structure/table.module.js +1 -1
  538. package/dist/node/structure/table.module.js.map +1 -1
  539. package/dist/node/structure/tree.module.js +1 -1
  540. package/dist/node/structure/tree.module.js.map +1 -1
  541. package/dist/overlays/Command.js.map +1 -1
  542. package/dist/overlays/Command.vue_vue_type_script_setup_true_lang.js +50 -45
  543. package/dist/overlays/Command.vue_vue_type_script_setup_true_lang.js.map +1 -1
  544. package/dist/overlays/CommandPanel.js.map +1 -1
  545. package/dist/overlays/CommandPanel.vue_vue_type_script_setup_true_lang.js +82 -82
  546. package/dist/overlays/CommandPanel.vue_vue_type_script_setup_true_lang.js.map +1 -1
  547. package/dist/overlays/ContextMenu.js.map +1 -1
  548. package/dist/overlays/ContextMenu.vue_vue_type_script_setup_true_lang.js +1 -1
  549. package/dist/overlays/ContextMenu.vue_vue_type_script_setup_true_lang.js.map +1 -1
  550. package/dist/overlays/ContextMenuSubmenu.js.map +1 -1
  551. package/dist/overlays/ContextMenuSubmenu.vue_vue_type_script_setup_true_lang.js +1 -1
  552. package/dist/overlays/ContextMenuSubmenu.vue_vue_type_script_setup_true_lang.js.map +1 -1
  553. package/dist/overlays/Dialog.js.map +1 -1
  554. package/dist/overlays/Dialog.vue_vue_type_script_setup_true_lang.js +47 -43
  555. package/dist/overlays/Dialog.vue_vue_type_script_setup_true_lang.js.map +1 -1
  556. package/dist/overlays/Drawer.js.map +1 -1
  557. package/dist/overlays/Drawer.vue_vue_type_script_setup_true_lang.js +58 -53
  558. package/dist/overlays/Drawer.vue_vue_type_script_setup_true_lang.js.map +1 -1
  559. package/dist/overlays/Lightbox.js.map +1 -1
  560. package/dist/overlays/Lightbox.vue_vue_type_script_setup_true_lang.js +65 -61
  561. package/dist/overlays/Lightbox.vue_vue_type_script_setup_true_lang.js.map +1 -1
  562. package/dist/overlays/Menu.js.map +1 -1
  563. package/dist/overlays/Menu.vue_vue_type_script_setup_true_lang.js +1 -1
  564. package/dist/overlays/Menu.vue_vue_type_script_setup_true_lang.js.map +1 -1
  565. package/dist/overlays/MenuSubmenu.js.map +1 -1
  566. package/dist/overlays/MenuSubmenu.vue_vue_type_script_setup_true_lang.js +1 -1
  567. package/dist/overlays/MenuSubmenu.vue_vue_type_script_setup_true_lang.js.map +1 -1
  568. package/dist/overlays/Menubar.js.map +1 -1
  569. package/dist/overlays/Menubar.vue_vue_type_script_setup_true_lang.js +1 -1
  570. package/dist/overlays/Menubar.vue_vue_type_script_setup_true_lang.js.map +1 -1
  571. package/dist/overlays/MenubarSubmenu.js.map +1 -1
  572. package/dist/overlays/MenubarSubmenu.vue_vue_type_script_setup_true_lang.js +1 -1
  573. package/dist/overlays/MenubarSubmenu.vue_vue_type_script_setup_true_lang.js.map +1 -1
  574. package/dist/overlays/Popover.js.map +1 -1
  575. package/dist/overlays/Popover.vue_vue_type_script_setup_true_lang.js +1 -1
  576. package/dist/overlays/Popover.vue_vue_type_script_setup_true_lang.js.map +1 -1
  577. package/dist/overlays/Tabs.js.map +1 -1
  578. package/dist/overlays/Tabs.vue_vue_type_script_setup_true_lang.js +1 -1
  579. package/dist/overlays/Tabs.vue_vue_type_script_setup_true_lang.js.map +1 -1
  580. package/dist/overlays/Toast.js.map +1 -1
  581. package/dist/overlays/Toast.vue_vue_type_script_setup_true_lang.js.map +1 -1
  582. package/dist/overlays/ToastCard.js.map +1 -1
  583. package/dist/overlays/ToastCard.vue_vue_type_script_setup_true_lang.js +74 -71
  584. package/dist/overlays/ToastCard.vue_vue_type_script_setup_true_lang.js.map +1 -1
  585. package/dist/overlays/ToastViewport.js.map +1 -1
  586. package/dist/overlays/ToastViewport.vue_vue_type_script_setup_true_lang.js +70 -59
  587. package/dist/overlays/ToastViewport.vue_vue_type_script_setup_true_lang.js.map +1 -1
  588. package/dist/overlays/Tooltip.js.map +1 -1
  589. package/dist/overlays/Tooltip.vue_vue_type_script_setup_true_lang.js +46 -26
  590. package/dist/overlays/Tooltip.vue_vue_type_script_setup_true_lang.js.map +1 -1
  591. package/dist/overlays/Tour.js.map +1 -1
  592. package/dist/overlays/Tour.vue_vue_type_script_setup_true_lang.js +74 -69
  593. package/dist/overlays/Tour.vue_vue_type_script_setup_true_lang.js.map +1 -1
  594. package/dist/overlays/context-menu.css +1 -1
  595. package/dist/overlays/context-menu.module.js +4 -4
  596. package/dist/overlays/context-menu.module.js.map +1 -1
  597. package/dist/overlays/dialog.css +1 -1
  598. package/dist/overlays/dialog.module.js +1 -1
  599. package/dist/overlays/dialog.module.js.map +1 -1
  600. package/dist/overlays/drawer.css +1 -1
  601. package/dist/overlays/drawer.module.js +1 -1
  602. package/dist/overlays/drawer.module.js.map +1 -1
  603. package/dist/overlays/lightbox.css +1 -1
  604. package/dist/overlays/lightbox.module.js +1 -1
  605. package/dist/overlays/menu.css +1 -1
  606. package/dist/overlays/menu.module.js +4 -4
  607. package/dist/overlays/menu.module.js.map +1 -1
  608. package/dist/overlays/menubar.css +1 -1
  609. package/dist/overlays/menubar.module.js +1 -1
  610. package/dist/overlays/menubar.module.js.map +1 -1
  611. package/dist/overlays/popover.css +1 -1
  612. package/dist/overlays/popover.module.js +3 -3
  613. package/dist/overlays/popover.module.js.map +1 -1
  614. package/dist/overlays/sheet.css +1 -1
  615. package/dist/overlays/sheet.module.js +1 -1
  616. package/dist/overlays/sheet.module.js.map +1 -1
  617. package/dist/overlays/tabs.css +1 -1
  618. package/dist/overlays/tabs.module.js +4 -4
  619. package/dist/overlays/tabs.module.js.map +1 -1
  620. package/dist/overlays/toast.css +1 -1
  621. package/dist/overlays/toast.module.js +1 -1
  622. package/dist/overlays/toast.module.js.map +1 -1
  623. package/dist/overlays/tour.css +1 -1
  624. package/dist/overlays/tour.module.js +1 -1
  625. package/dist/overlays/tour.module.js.map +1 -1
  626. package/dist/structure/Accordion.js.map +1 -1
  627. package/dist/structure/Accordion.vue_vue_type_script_setup_true_lang.js +1 -1
  628. package/dist/structure/Accordion.vue_vue_type_script_setup_true_lang.js.map +1 -1
  629. package/dist/structure/Alert.js.map +1 -1
  630. package/dist/structure/Alert.vue_vue_type_script_setup_true_lang.js +62 -54
  631. package/dist/structure/Alert.vue_vue_type_script_setup_true_lang.js.map +1 -1
  632. package/dist/structure/Banner.js.map +1 -1
  633. package/dist/structure/Banner.vue_vue_type_script_setup_true_lang.js +42 -34
  634. package/dist/structure/Banner.vue_vue_type_script_setup_true_lang.js.map +1 -1
  635. package/dist/structure/Carousel.js.map +1 -1
  636. package/dist/structure/Carousel.vue_vue_type_script_setup_true_lang.js +8 -8
  637. package/dist/structure/Carousel.vue_vue_type_script_setup_true_lang.js.map +1 -1
  638. package/dist/structure/Collapsible.js.map +1 -1
  639. package/dist/structure/Collapsible.vue_vue_type_script_setup_true_lang.js +1 -1
  640. package/dist/structure/Collapsible.vue_vue_type_script_setup_true_lang.js.map +1 -1
  641. package/dist/structure/DataTable.vue_vue_type_script_setup_true_lang.js.map +1 -1
  642. package/dist/structure/Pagination.js.map +1 -1
  643. package/dist/structure/Pagination.vue_vue_type_script_setup_true_lang.js +118 -88
  644. package/dist/structure/Pagination.vue_vue_type_script_setup_true_lang.js.map +1 -1
  645. package/dist/structure/ScrollArea.js.map +1 -1
  646. package/dist/structure/ScrollArea.vue_vue_type_script_setup_true_lang.js +30 -27
  647. package/dist/structure/ScrollArea.vue_vue_type_script_setup_true_lang.js.map +1 -1
  648. package/dist/structure/Table.js.map +1 -1
  649. package/dist/structure/Table.vue_vue_type_script_setup_true_lang.js +71 -61
  650. package/dist/structure/Table.vue_vue_type_script_setup_true_lang.js.map +1 -1
  651. package/dist/structure/accordion.css +1 -1
  652. package/dist/structure/accordion.module.js +5 -5
  653. package/dist/structure/accordion.module.js.map +1 -1
  654. package/dist/structure/breadcrumbs.css +1 -1
  655. package/dist/structure/breadcrumbs.module.js +1 -1
  656. package/dist/structure/breadcrumbs.module.js.map +1 -1
  657. package/dist/structure/card.css +1 -1
  658. package/dist/structure/card.module.js +1 -1
  659. package/dist/structure/card.module.js.map +1 -1
  660. package/dist/structure/carousel.css +1 -1
  661. package/dist/structure/carousel.module.js +1 -1
  662. package/dist/structure/carousel.module.js.map +1 -1
  663. package/dist/structure/code-block.css +1 -1
  664. package/dist/structure/code-block.module.js +1 -1
  665. package/dist/structure/collapsible.css +1 -1
  666. package/dist/structure/collapsible.module.js +5 -5
  667. package/dist/structure/collapsible.module.js.map +1 -1
  668. package/dist/structure/cursor-pagination.css +1 -1
  669. package/dist/structure/cursor-pagination.module.js +1 -1
  670. package/dist/structure/data-table.css +1 -1
  671. package/dist/structure/data-table.module.js +1 -1
  672. package/dist/structure/error-summary.css +1 -1
  673. package/dist/structure/error-summary.module.js +1 -1
  674. package/dist/structure/error-summary.module.js.map +1 -1
  675. package/dist/structure/json-tree.css +1 -1
  676. package/dist/structure/json-tree.module.js +1 -1
  677. package/dist/structure/json-tree.module.js.map +1 -1
  678. package/dist/structure/list.css +1 -1
  679. package/dist/structure/list.module.js +1 -1
  680. package/dist/structure/list.module.js.map +1 -1
  681. package/dist/structure/log-view.css +1 -1
  682. package/dist/structure/log-view.module.js +1 -1
  683. package/dist/structure/pagination.css +1 -1
  684. package/dist/structure/pagination.module.js +4 -3
  685. package/dist/structure/pagination.module.js.map +1 -1
  686. package/dist/structure/rich-text-content.css +1 -1
  687. package/dist/structure/rich-text-content.module.js +1 -1
  688. package/dist/structure/section-nav.css +1 -1
  689. package/dist/structure/section-nav.module.js +1 -1
  690. package/dist/structure/section-nav.module.js.map +1 -1
  691. package/dist/structure/stepper.css +1 -1
  692. package/dist/structure/stepper.module.js +2 -2
  693. package/dist/structure/stepper.module.js.map +1 -1
  694. package/dist/structure/table-of-contents.css +1 -1
  695. package/dist/structure/table-of-contents.module.js +1 -1
  696. package/dist/structure/table-of-contents.module.js.map +1 -1
  697. package/dist/structure/table.css +1 -1
  698. package/dist/structure/table.module.js +1 -1
  699. package/dist/structure/table.module.js.map +1 -1
  700. package/dist/structure/tree.css +1 -1
  701. package/dist/structure/tree.module.js +1 -1
  702. package/dist/structure/tree.module.js.map +1 -1
  703. package/dist/types/ai/AttachmentChip.vue.d.ts +1 -1
  704. package/dist/types/ai/ToolCall.vue.d.ts +1 -1
  705. package/dist/types/archetypes/FormPage.vue.d.ts +1 -0
  706. package/dist/types/charts/BarChart.vue.d.ts +1 -1
  707. package/dist/types/controls/FileUpload.vue.d.ts +1 -1
  708. package/dist/types/controls/RecordButton.vue.d.ts +2 -2
  709. package/dist/types/controls/Slider.vue.d.ts +1 -1
  710. package/dist/types/layout/Grid.vue.d.ts +1 -1
  711. package/dist/types/layout/Inline.vue.d.ts +2 -2
  712. package/dist/types/layout/Stack.vue.d.ts +2 -2
  713. package/dist/types/overlays/Drawer.vue.d.ts +1 -1
  714. package/dist/types/overlays/HoverCard.vue.d.ts +1 -1
  715. package/dist/types/overlays/Menu.vue.d.ts +1 -1
  716. package/dist/types/overlays/Popover.vue.d.ts +1 -1
  717. package/dist/types/overlays/Toast.vue.d.ts +3 -1
  718. package/dist/types/overlays/Tooltip.vue.d.ts +1 -1
  719. package/dist/types/structure/EmptyState.vue.d.ts +1 -1
  720. package/dist/types/structure/Hero.vue.d.ts +1 -1
  721. package/dist/types/structure/RelativeTime.vue.d.ts +1 -1
  722. package/package.json +3 -3
@@ -1,112 +1,123 @@
1
1
  import e from "../conventions/a11y.module.js";
2
2
  import t from "./toast.module.js";
3
3
  import n from "./ToastCard.js";
4
- import { actOnToastNotice as r, agentMember as i, dismissToastNotice as a, getToasts as o, subscribeToasts as s, toast as c, toastDetails as l, toastNotices as u } from "@polymorph/vue";
5
- import { Fragment as d, computed as f, createBlock as p, createElementBlock as m, createElementVNode as h, defineComponent as g, normalizeClass as _, onBeforeUnmount as v, onMounted as y, openBlock as b, ref as x, renderList as S, toDisplayString as C, unref as w, useTemplateRef as T } from "vue";
4
+ import { TOAST_QUIET as r, actOnToastNotice as i, agentMember as a, announceToasts as o, dismissToastNotice as s, followToastFocus as c, getToasts as l, holdToastTimers as u, subscribeToasts as d, toast as f, toastDetails as p, toastNotices as m } from "@polymorph/vue";
5
+ import { Fragment as h, computed as g, createBlock as _, createElementBlock as v, createElementVNode as y, defineComponent as b, normalizeClass as x, onBeforeUnmount as S, onMounted as C, openBlock as w, ref as T, renderList as E, toDisplayString as D, unref as O, useTemplateRef as k, watch as A } from "vue";
6
6
  //#region src/overlays/ToastViewport.vue?vue&type=script&setup=true&lang.ts
7
- var E = ["aria-label"], D = /*@__PURE__*/ g({
7
+ var j = ["aria-label"], M = /*@__PURE__*/ b({
8
8
  name: "ToastViewport",
9
9
  inheritAttrs: !1,
10
10
  __name: "ToastViewport",
11
11
  props: { messages: {} },
12
- setup(g) {
13
- let D = g, O = x(0), k = x(!1), A = T("list"), j = T("region"), M = f(() => D.messages ?? {
12
+ setup(b) {
13
+ let M = b, N = T(0), P = T(!1), F = T(r), I = k("list"), L = k("region"), R = g(() => M.messages ?? {
14
14
  dismiss: "Dismiss",
15
15
  notification: "Notification",
16
16
  viewport: "Notifications (F8)"
17
- }), N = f(() => O.value < 0 ? [] : o()), P = f(() => (e) => {
18
- let t = N.value.filter((t) => t.closing !== !0 && (t.tone === "danger" || t.tone === "warning") === e).at(-1);
19
- return t === void 0 ? "" : [
20
- M.value.notification,
21
- t.title,
22
- t.description
23
- ].filter(Boolean).join(" ");
24
- }), F;
25
- y(() => {
26
- F?.();
27
- let e = (O.value += 1, s(() => {
28
- O.value += 1;
17
+ }), z = g(() => N.value < 0 ? [] : l()), B;
18
+ C(() => {
19
+ B?.();
20
+ let e = (N.value += 1, d(() => {
21
+ N.value += 1;
29
22
  }));
30
- F = () => {
23
+ B = () => {
31
24
  e();
32
25
  };
33
- }), v(() => F?.());
34
- let I;
35
- y(() => {
36
- I?.();
26
+ }), S(() => B?.());
27
+ let V;
28
+ C(() => {
29
+ V?.();
37
30
  let e = (e) => {
38
- e.key === "F8" && (e.preventDefault(), A.value?.focus());
31
+ e.key === "F8" && (e.preventDefault(), I.value?.focus());
39
32
  };
40
- document.addEventListener("keydown", e), I = () => document.removeEventListener("keydown", e);
41
- }), v(() => I?.());
42
- let L;
43
- return y(() => {
44
- L?.();
45
- let e = i({
33
+ document.addEventListener("keydown", e), V = () => document.removeEventListener("keydown", e);
34
+ }), S(() => V?.());
35
+ let H;
36
+ C(() => {
37
+ H?.();
38
+ let e = u(L.value, (e) => {
39
+ P.value = e;
40
+ });
41
+ H = () => {
42
+ e();
43
+ };
44
+ }), S(() => H?.());
45
+ let U;
46
+ C(() => {
47
+ U?.();
48
+ let e = c(I.value);
49
+ U = () => {
50
+ e();
51
+ };
52
+ }), S(() => U?.());
53
+ let W = () => {
54
+ F.value = o(F.value, z.value, I.value, R.value.notification);
55
+ };
56
+ C(W), A(() => N.value, W, { flush: "post" });
57
+ let G;
58
+ return C(() => {
59
+ G?.();
60
+ let e = a({
46
61
  member: "Toast",
47
- element: () => j.value,
62
+ element: () => L.value,
48
63
  state: () => ({
49
- notices: u(o()),
50
- details: l(o())
64
+ notices: m(l()),
65
+ details: p(l())
51
66
  }),
52
67
  actions: {
53
68
  dismiss: {
54
69
  argument: "id",
55
- run: (e) => a(c, o(), e)
70
+ run: (e) => s(f, l(), e)
56
71
  },
57
72
  act: {
58
73
  argument: "id",
59
- run: (e) => r(c, o(), e)
74
+ run: (e) => i(f, l(), e)
60
75
  }
61
76
  },
62
- withholds: () => [...A.value?.querySelectorAll("[data-member=\"toast\"] > div ~ div") ?? []]
77
+ withholds: () => [...I.value?.querySelectorAll("[data-member=\"toast\"] > div ~ div") ?? []]
63
78
  });
64
- L = () => {
79
+ G = () => {
65
80
  e();
66
81
  };
67
- }), v(() => L?.()), (r, i) => (b(), m("div", {
82
+ }), S(() => G?.()), (r, i) => (w(), v("div", {
68
83
  ref_key: "region",
69
- ref: j,
84
+ ref: L,
70
85
  role: "region",
71
- "aria-label": M.value.viewport,
86
+ "aria-label": R.value.viewport,
72
87
  tabindex: "-1"
73
88
  }, [
74
- h("ol", {
89
+ y("ol", {
75
90
  ref_key: "list",
76
- ref: A,
77
- class: _(w(t).viewport),
91
+ ref: I,
92
+ class: x(O(t).viewport),
78
93
  tabindex: "-1",
79
- "data-toast-part": "list",
80
- onPointerenter: i[0] ||= (e) => k.value = !0,
81
- onPointerleave: i[1] ||= (e) => k.value = !1,
82
- onFocusin: i[2] ||= (e) => k.value = !0,
83
- onFocusout: i[3] ||= (e) => k.value = !1
84
- }, [(b(!0), m(d, null, S(N.value, (e) => (b(), p(n, {
94
+ "data-toast-part": "list"
95
+ }, [(w(!0), v(h, null, E(z.value, (e) => (w(), _(n, {
85
96
  key: e.id,
86
97
  record: e,
87
- dismissLabel: M.value.dismiss,
88
- paused: k.value
98
+ dismissLabel: R.value.dismiss,
99
+ paused: P.value
89
100
  }, null, 8, [
90
101
  "record",
91
102
  "dismissLabel",
92
103
  "paused"
93
- ]))), 128))], 34),
94
- h("div", {
95
- class: _(w(e).visuallyHidden),
104
+ ]))), 128))], 2),
105
+ y("div", {
106
+ class: x(O(e).visuallyHidden),
96
107
  role: "status",
97
108
  "aria-live": "polite",
98
109
  "aria-atomic": "true"
99
- }, C(P.value(!1)), 3),
100
- h("div", {
101
- class: _(w(e).visuallyHidden),
110
+ }, [(w(!0), v(h, null, E([F.value.polite], (e) => (w(), v("span", { key: e.key }, D(e.words), 1))), 128))], 2),
111
+ y("div", {
112
+ class: x(O(e).visuallyHidden),
102
113
  role: "alert",
103
114
  "aria-live": "assertive",
104
115
  "aria-atomic": "true"
105
- }, C(P.value(!0)), 3)
106
- ], 8, E));
116
+ }, [(w(!0), v(h, null, E([F.value.assertive], (e) => (w(), v("span", { key: e.key }, D(e.words), 1))), 128))], 2)
117
+ ], 8, j));
107
118
  }
108
119
  });
109
120
  //#endregion
110
- export { D as default };
121
+ export { M as default };
111
122
 
112
123
  //# sourceMappingURL=ToastViewport.vue_vue_type_script_setup_true_lang.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"ToastViewport.vue_vue_type_script_setup_true_lang.js","names":[],"sources":["../../src/overlays/ToastViewport.vue"],"sourcesContent":["<script setup lang=\"ts\">\n/**\n * Toast.Viewport: the one viewport the application mounts, which draws every toast the store holds.\n *\n * Generated by `pnpm shells` from `packages/shells/src/members/toast.ts`, the member's\n * framework-neutral description. Never edit it by hand: change the description and\n * run `pnpm shells`.\n */\nimport { computed, onBeforeUnmount, onMounted, ref, useTemplateRef } from 'vue'\n\nimport {\n actOnToastNotice,\n agentMember,\n dismissToastNotice,\n getToasts,\n subscribeToasts,\n toast,\n toastDetails,\n toastNotices,\n} from '@polymorph/vue'\nimport styles from '@polymorph/recipes/overlays/toast.module.css'\nimport a11y from '@polymorph/recipes/conventions/a11y.module.css'\nimport ToastCard from './ToastCard.vue'\nimport type { ToasterMessages } from './Toast.vue'\n\nexport interface ToastViewportProps {\n /**\n * The close button’s name, the announcement’s prefix and the region’s name, from the catalog.\n */\n messages?: ToasterMessages\n}\n\ndefineOptions({ name: 'ToastViewport', inheritAttrs: false })\n\nconst props = defineProps<ToastViewportProps>()\nconst version = ref(0)\nconst paused = ref(false)\nconst list = useTemplateRef<HTMLElement>('list')\nconst region = useTemplateRef<HTMLElement>('region')\nconst say = computed(\n () =>\n props.messages ?? {\n dismiss: 'Dismiss',\n notification: 'Notification',\n viewport: 'Notifications (F8)',\n },\n)\nconst records = computed(() => (version.value < 0 ? [] : getToasts()))\nconst words = computed(() => (urgent: boolean): string => {\n const record = records.value\n .filter(\n (each) =>\n each.closing !== true && (each.tone === 'danger' || each.tone === 'warning') === urgent,\n )\n .at(-1)\n return record === undefined\n ? ''\n : [say.value.notification, record.title, record.description].filter(Boolean).join(' ')\n})\nlet release1: (() => void) | undefined\nconst effect1 = () => {\n release1?.()\n const ran =\n ((version.value += 1),\n subscribeToasts(() => {\n version.value += 1\n }))\n release1 = () => {\n ran()\n }\n}\nonMounted(effect1)\nonBeforeUnmount(() => release1?.())\nlet release2: (() => void) | undefined\nconst effect2 = () => {\n release2?.()\n const listener = ($event: DocumentEventMap['keydown']) => {\n $event.key === 'F8' && ($event.preventDefault(), list.value?.focus())\n }\n document.addEventListener('keydown', listener)\n release2 = () => document.removeEventListener('keydown', listener)\n}\nonMounted(effect2)\nonBeforeUnmount(() => release2?.())\nlet release3: (() => void) | undefined\nconst effect3 = () => {\n release3?.()\n const ran = agentMember({\n member: 'Toast',\n element: () => region.value,\n state: () => ({ notices: toastNotices(getToasts()), details: toastDetails(getToasts()) }),\n actions: {\n dismiss: { argument: 'id', run: (value) => dismissToastNotice(toast, getToasts(), value) },\n act: { argument: 'id', run: (value) => actOnToastNotice(toast, getToasts(), value) },\n },\n withholds: () => [...(list.value?.querySelectorAll('[data-member=\"toast\"] > div ~ div') ?? [])],\n })\n release3 = () => {\n ran()\n }\n}\nonMounted(effect3)\nonBeforeUnmount(() => release3?.())\n</script>\n\n<template>\n <div ref=\"region\" role=\"region\" :aria-label=\"say.viewport\" tabindex=\"-1\">\n <!-- list -->\n <ol\n ref=\"list\"\n :class=\"styles.viewport\"\n tabindex=\"-1\"\n data-toast-part=\"list\"\n @pointerenter=\"paused = true\"\n @pointerleave=\"paused = false\"\n @focusin=\"paused = true\"\n @focusout=\"paused = false\"\n >\n <template v-for=\"record in records\" :key=\"record.id\">\n <ToastCard :record=\"record\" :dismissLabel=\"say.dismiss\" :paused=\"paused\" />\n </template>\n </ol>\n <!-- polite -->\n <div :class=\"a11y.visuallyHidden\" role=\"status\" aria-live=\"polite\" aria-atomic=\"true\">\n {{ words(false) }}\n </div>\n <!-- assertive -->\n <div :class=\"a11y.visuallyHidden\" role=\"alert\" aria-live=\"assertive\" aria-atomic=\"true\">\n {{ words(true) }}\n </div>\n </div>\n</template>\n"],"mappings":";;;;;;;;;;;;EAkCA,IAAM,IAAQ,GACR,IAAU,EAAI,CAAC,GACf,IAAS,EAAI,EAAK,GAClB,IAAO,EAA4B,MAAM,GACzC,IAAS,EAA4B,QAAQ,GAC7C,IAAM,QAER,EAAM,YAAY;GAChB,SAAS;GACT,cAAc;GACd,UAAU;EACZ,CACJ,GACM,IAAU,QAAgB,EAAQ,QAAQ,IAAI,CAAC,IAAI,EAAU,CAAE,GAC/D,IAAQ,SAAgB,MAA4B;GACxD,IAAM,IAAS,EAAQ,MACpB,QACE,MACC,EAAK,YAAY,OAAS,EAAK,SAAS,YAAY,EAAK,SAAS,eAAe,CACrF,CAAA,CACC,GAAG,EAAE;GACR,OAAO,MAAW,KAAA,IACd,KACA;IAAC,EAAI,MAAM;IAAc,EAAO;IAAO,EAAO;GAAW,CAAC,CAAC,OAAO,OAAO,CAAC,CAAC,KAAK,GAAG;EACzF,CAAC,GACG;EAaJ,AADA,QAXsB;GACpB,IAAW;GACX,IAAM,KACF,EAAQ,SAAS,GACnB,QAAsB;IACpB,EAAQ,SAAS;GACnB,CAAC;GACH,UAAiB;IACf,EAAI;GACN;EACF,CACiB,GACjB,QAAsB,IAAW,CAAC;EAClC,IAAI;EAUJ,AADA,QARsB;GACpB,IAAW;GACX,IAAM,KAAY,MAAwC;IACxD,EAAO,QAAQ,SAAS,EAAO,eAAe,GAAG,EAAK,OAAO,MAAM;GACrE;GAEA,AADA,SAAS,iBAAiB,WAAW,CAAQ,GAC7C,UAAiB,SAAS,oBAAoB,WAAW,CAAQ;EACnE,CACiB,GACjB,QAAsB,IAAW,CAAC;EAClC,IAAI;SAiBJ,QAhBsB;GACpB,IAAW;GACX,IAAM,IAAM,EAAY;IACtB,QAAQ;IACR,eAAe,EAAO;IACtB,cAAc;KAAE,SAAS,EAAa,EAAU,CAAC;KAAG,SAAS,EAAa,EAAU,CAAC;IAAE;IACvF,SAAS;KACP,SAAS;MAAE,UAAU;MAAM,MAAM,MAAU,EAAmB,GAAO,EAAU,GAAG,CAAK;KAAE;KACzF,KAAK;MAAE,UAAU;MAAM,MAAM,MAAU,EAAiB,GAAO,EAAU,GAAG,CAAK;KAAE;IACrF;IACA,iBAAiB,CAAC,GAAI,EAAK,OAAO,iBAAiB,qCAAmC,KAAK,CAAC,CAAE;GAChG,CAAC;GACD,UAAiB;IACf,EAAI;GACN;EACF,CACiB,GACjB,QAAsB,IAAW,CAAC,mBAIhC,EAwBM,OAAA;YAxBG;GAAJ,KAAI;GAAS,MAAK;GAAU,cAAY,EAAA,MAAI;GAAU,UAAS;;GAElE,EAaK,MAAA;aAZC;IAAJ,KAAI;IACH,OAAK,EAAE,EAAA,CAAA,CAAM,CAAC,QAAQ;IACvB,UAAS;IACT,mBAAgB;IACf,gBAAY,AAAA,EAAA,QAAA,MAAE,EAAA,QAAM;IACpB,gBAAY,AAAA,EAAA,QAAA,MAAE,EAAA,QAAM;IACpB,WAAO,AAAA,EAAA,QAAA,MAAE,EAAA,QAAM;IACf,YAAQ,AAAA,EAAA,QAAA,MAAE,EAAA,QAAM;eAEjB,EAEW,GAAA,MAAA,EAFgB,EAAA,QAAV,YACf,EAA2E,GAAA;SADnC,EAAO;IAC3B;IAAS,cAAc,EAAA,MAAI;IAAU,QAAQ,EAAA;;;;;;GAIrE,EAEM,OAAA;IAFA,OAAK,EAAE,EAAA,CAAA,CAAI,CAAC,cAAc;IAAE,MAAK;IAAS,aAAU;IAAS,eAAY;QAC1E,EAAA,MAAK,EAAA,CAAA,GAAA,CAAA;GAGV,EAEM,OAAA;IAFA,OAAK,EAAE,EAAA,CAAA,CAAI,CAAC,cAAc;IAAE,MAAK;IAAQ,aAAU;IAAY,eAAY;QAC5E,EAAA,MAAK,EAAA,CAAA,GAAA,CAAA"}
1
+ {"version":3,"file":"ToastViewport.vue_vue_type_script_setup_true_lang.js","names":[],"sources":["../../src/overlays/ToastViewport.vue"],"sourcesContent":["<script setup lang=\"ts\">\n/**\n * Toast.Viewport: the one viewport the application mounts, which draws every toast the store holds.\n *\n * Generated by `pnpm shells` from `packages/shells/src/members/toast.ts`, the member's\n * framework-neutral description. Never edit it by hand: change the description and\n * run `pnpm shells`.\n */\nimport { computed, onBeforeUnmount, onMounted, ref, useTemplateRef, watch } from 'vue'\n\nimport {\n TOAST_QUIET,\n actOnToastNotice,\n agentMember,\n announceToasts,\n dismissToastNotice,\n followToastFocus,\n getToasts,\n holdToastTimers,\n subscribeToasts,\n toast,\n toastDetails,\n toastNotices,\n} from '@polymorph/vue'\nimport styles from '@polymorph/recipes/overlays/toast.module.css'\nimport a11y from '@polymorph/recipes/conventions/a11y.module.css'\nimport ToastCard from './ToastCard.vue'\nimport type { ToasterMessages } from './Toast.vue'\n\nexport interface ToastViewportProps {\n /**\n * The close button’s name, the announcement’s prefix and the region’s name, from the catalog.\n */\n messages?: ToasterMessages\n}\n\ndefineOptions({ name: 'ToastViewport', inheritAttrs: false })\n\nconst props = defineProps<ToastViewportProps>()\nconst version = ref(0)\nconst paused = ref(false)\nconst said = ref(TOAST_QUIET)\nconst list = useTemplateRef<HTMLElement>('list')\nconst region = useTemplateRef<HTMLElement>('region')\nconst say = computed(\n () =>\n props.messages ?? {\n dismiss: 'Dismiss',\n notification: 'Notification',\n viewport: 'Notifications (F8)',\n },\n)\nconst records = computed(() => (version.value < 0 ? [] : getToasts()))\nlet release1: (() => void) | undefined\nconst effect1 = () => {\n release1?.()\n const ran =\n ((version.value += 1),\n subscribeToasts(() => {\n version.value += 1\n }))\n release1 = () => {\n ran()\n }\n}\nonMounted(effect1)\nonBeforeUnmount(() => release1?.())\nlet release2: (() => void) | undefined\nconst effect2 = () => {\n release2?.()\n const listener = ($event: DocumentEventMap['keydown']) => {\n $event.key === 'F8' && ($event.preventDefault(), list.value?.focus())\n }\n document.addEventListener('keydown', listener)\n release2 = () => document.removeEventListener('keydown', listener)\n}\nonMounted(effect2)\nonBeforeUnmount(() => release2?.())\nlet release3: (() => void) | undefined\nconst effect3 = () => {\n release3?.()\n const ran = holdToastTimers(region.value, (held) => {\n paused.value = held\n })\n release3 = () => {\n ran()\n }\n}\nonMounted(effect3)\nonBeforeUnmount(() => release3?.())\nlet release4: (() => void) | undefined\nconst effect4 = () => {\n release4?.()\n const ran = followToastFocus(list.value)\n release4 = () => {\n ran()\n }\n}\nonMounted(effect4)\nonBeforeUnmount(() => release4?.())\nconst effect5 = () => {\n said.value = announceToasts(said.value, records.value, list.value, say.value.notification)\n}\nonMounted(effect5)\nwatch(() => version.value, effect5, { flush: 'post' })\nlet release6: (() => void) | undefined\nconst effect6 = () => {\n release6?.()\n const ran = agentMember({\n member: 'Toast',\n element: () => region.value,\n state: () => ({ notices: toastNotices(getToasts()), details: toastDetails(getToasts()) }),\n actions: {\n dismiss: { argument: 'id', run: (value) => dismissToastNotice(toast, getToasts(), value) },\n act: { argument: 'id', run: (value) => actOnToastNotice(toast, getToasts(), value) },\n },\n withholds: () => [...(list.value?.querySelectorAll('[data-member=\"toast\"] > div ~ div') ?? [])],\n })\n release6 = () => {\n ran()\n }\n}\nonMounted(effect6)\nonBeforeUnmount(() => release6?.())\n</script>\n\n<template>\n <div ref=\"region\" role=\"region\" :aria-label=\"say.viewport\" tabindex=\"-1\">\n <!-- list -->\n <ol ref=\"list\" :class=\"styles.viewport\" tabindex=\"-1\" data-toast-part=\"list\">\n <template v-for=\"record in records\" :key=\"record.id\">\n <ToastCard :record=\"record\" :dismissLabel=\"say.dismiss\" :paused=\"paused\" />\n </template>\n </ol>\n <!-- polite -->\n <div :class=\"a11y.visuallyHidden\" role=\"status\" aria-live=\"polite\" aria-atomic=\"true\">\n <template v-for=\"saying in [said.polite]\" :key=\"saying.key\">\n <!-- saying -->\n <span>\n {{ saying.words }}\n </span>\n </template>\n </div>\n <!-- assertive -->\n <div :class=\"a11y.visuallyHidden\" role=\"alert\" aria-live=\"assertive\" aria-atomic=\"true\">\n <template v-for=\"saying in [said.assertive]\" :key=\"saying.key\">\n <!-- urgent -->\n <span>\n {{ saying.words }}\n </span>\n </template>\n </div>\n </div>\n</template>\n"],"mappings":";;;;;;;;;;;;EAsCA,IAAM,IAAQ,GACR,IAAU,EAAI,CAAC,GACf,IAAS,EAAI,EAAK,GAClB,IAAO,EAAI,CAAW,GACtB,IAAO,EAA4B,MAAM,GACzC,IAAS,EAA4B,QAAQ,GAC7C,IAAM,QAER,EAAM,YAAY;GAChB,SAAS;GACT,cAAc;GACd,UAAU;EACZ,CACJ,GACM,IAAU,QAAgB,EAAQ,QAAQ,IAAI,CAAC,IAAI,EAAU,CAAE,GACjE;EAaJ,AADA,QAXsB;GACpB,IAAW;GACX,IAAM,KACF,EAAQ,SAAS,GACnB,QAAsB;IACpB,EAAQ,SAAS;GACnB,CAAC;GACH,UAAiB;IACf,EAAI;GACN;EACF,CACiB,GACjB,QAAsB,IAAW,CAAC;EAClC,IAAI;EAUJ,AADA,QARsB;GACpB,IAAW;GACX,IAAM,KAAY,MAAwC;IACxD,EAAO,QAAQ,SAAS,EAAO,eAAe,GAAG,EAAK,OAAO,MAAM;GACrE;GAEA,AADA,SAAS,iBAAiB,WAAW,CAAQ,GAC7C,UAAiB,SAAS,oBAAoB,WAAW,CAAQ;EACnE,CACiB,GACjB,QAAsB,IAAW,CAAC;EAClC,IAAI;EAWJ,AADA,QATsB;GACpB,IAAW;GACX,IAAM,IAAM,EAAgB,EAAO,QAAQ,MAAS;IAClD,EAAO,QAAQ;GACjB,CAAC;GACD,UAAiB;IACf,EAAI;GACN;EACF,CACiB,GACjB,QAAsB,IAAW,CAAC;EAClC,IAAI;EASJ,AADA,QAPsB;GACpB,IAAW;GACX,IAAM,IAAM,EAAiB,EAAK,KAAK;GACvC,UAAiB;IACf,EAAI;GACN;EACF,CACiB,GACjB,QAAsB,IAAW,CAAC;EAClC,IAAM,UAAgB;GACpB,EAAK,QAAQ,EAAe,EAAK,OAAO,EAAQ,OAAO,EAAK,OAAO,EAAI,MAAM,YAAY;EAC3F;EAEA,AADA,EAAU,CAAO,GACjB,QAAY,EAAQ,OAAO,GAAS,EAAE,OAAO,OAAO,CAAC;EACrD,IAAI;SAiBJ,QAhBsB;GACpB,IAAW;GACX,IAAM,IAAM,EAAY;IACtB,QAAQ;IACR,eAAe,EAAO;IACtB,cAAc;KAAE,SAAS,EAAa,EAAU,CAAC;KAAG,SAAS,EAAa,EAAU,CAAC;IAAE;IACvF,SAAS;KACP,SAAS;MAAE,UAAU;MAAM,MAAM,MAAU,EAAmB,GAAO,EAAU,GAAG,CAAK;KAAE;KACzF,KAAK;MAAE,UAAU;MAAM,MAAM,MAAU,EAAiB,GAAO,EAAU,GAAG,CAAK;KAAE;IACrF;IACA,iBAAiB,CAAC,GAAI,EAAK,OAAO,iBAAiB,qCAAmC,KAAK,CAAC,CAAE;GAChG,CAAC;GACD,UAAiB;IACf,EAAI;GACN;EACF,CACiB,GACjB,QAAsB,IAAW,CAAC,mBAIhC,EAyBM,OAAA;YAzBG;GAAJ,KAAI;GAAS,MAAK;GAAU,cAAY,EAAA,MAAI;GAAU,UAAS;;GAElE,EAIK,MAAA;aAJG;IAAJ,KAAI;IAAQ,OAAK,EAAE,EAAA,CAAA,CAAM,CAAC,QAAQ;IAAE,UAAS;IAAK,mBAAgB;eACpE,EAEW,GAAA,MAAA,EAFgB,EAAA,QAAV,YACf,EAA2E,GAAA;SADnC,EAAO;IAC3B;IAAS,cAAc,EAAA,MAAI;IAAU,QAAQ,EAAA;;;;;;GAIrE,EAOM,OAAA;IAPA,OAAK,EAAE,EAAA,CAAA,CAAI,CAAC,cAAc;IAAE,MAAK;IAAS,aAAU;IAAS,eAAY;eAC7E,EAKW,GAAA,MAAA,EAAA,CALiB,EAAA,MAAK,MAAM,IAAtB,YAEf,EAEO,QAAA,EAAA,KAJuC,EAAO,IAAA,GAAA,EAGhD,EAAO,KAAK,GAAA,CAAA;GAKrB,EAOM,OAAA;IAPA,OAAK,EAAE,EAAA,CAAA,CAAI,CAAC,cAAc;IAAE,MAAK;IAAQ,aAAU;IAAY,eAAY;eAC/E,EAKW,GAAA,MAAA,EAAA,CALiB,EAAA,MAAK,SAAS,IAAzB,YAEf,EAEO,QAAA,EAAA,KAJ0C,EAAO,IAAA,GAAA,EAGnD,EAAO,KAAK,GAAA,CAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"Tooltip.js","names":[],"sources":["../../src/overlays/Tooltip.vue"],"sourcesContent":["<script setup lang=\"ts\">\n/**\n * A short text hint shown on hover or focus (`design/components/tooltip.md`).\n *\n * Generated by `pnpm shells` from `packages/shells/src/members/tooltip.ts`, the member's\n * framework-neutral description. Never edit it by hand: change the description and\n * run `pnpm shells`.\n */\nimport { computed, onMounted, useId, useTemplateRef, watch } from 'vue'\n\nimport * as zag from '@zag-js/tooltip'\nimport { normalizeProps, useMachine } from '@zag-js/vue'\n\nimport {\n TOOLTIP_DELAY_MS,\n TOOLTIP_SKIP_DELAY_MS,\n anchorProps,\n syncTriggerAnchor,\n useDirection,\n} from '@polymorph/vue'\nimport { usePresence } from '@polymorph/vue/motion'\nimport styles from '@polymorph/recipes/overlays/tooltip.module.css'\n\nexport type TooltipAlign = NonNullable<TooltipProps['align']>\n\nexport type TooltipSide = NonNullable<TooltipProps['side']>\n\nexport interface TooltipProps {\n align?: 'start' | 'center' | 'end'\n content: string\n /**\n * Opens on mount, for galleries and tests.\n */\n defaultOpen?: boolean\n side?: 'bottom' | 'top' | 'right' | 'left'\n}\n\ndefineOptions({ name: 'Tooltip', inheritAttrs: false })\n\nconst props = withDefaults(defineProps<TooltipProps>(), {\n align: 'center',\n defaultOpen: undefined,\n side: 'top',\n})\ndefineSlots<{ default: (props: Record<string, never>) => unknown }>()\nconst uid = useId()\nconst anchor = useTemplateRef<HTMLElement>('anchor')\nconst bubble = useTemplateRef<HTMLElement>('bubble')\nconst documentDirection = useDirection()\nconst service = useMachine(\n zag.machine,\n computed(() => ({\n id: uid,\n dir: documentDirection.value,\n defaultOpen: props.defaultOpen,\n openDelay: TOOLTIP_DELAY_MS,\n closeDelay: TOOLTIP_SKIP_DELAY_MS,\n positioning: {\n placement: props.align === 'center' ? props.side : `${props.side}-${props.align}`,\n gutter: 0,\n },\n })),\n)\nconst api = computed(() => zag.connect(service, normalizeProps))\nconst present = usePresence(() => api.value.open, bubble, 'tooltip.bubble', {\n get side() {\n return props.side\n },\n get align() {\n return props.align\n },\n})\nconst effect1 = () => {\n syncTriggerAnchor(anchor.value, api.value.getTriggerProps(), api.value.open, false)\n}\nonMounted(effect1)\nwatch(() => api.value.open, effect1, { flush: 'post' })\n</script>\n\n<template>\n <span ref=\"anchor\" v-bind=\"anchorProps(api.getTriggerProps())\" :class=\"styles.anchor\">\n <slot />\n </span>\n <Teleport to=\"body\">\n <div v-if=\"present\" v-bind=\"api.getPositionerProps()\">\n <!-- bubble -->\n <div\n ref=\"bubble\"\n v-bind=\"api.getContentProps()\"\n :class=\"styles.bubble\"\n :style=\"{ '--radix-tooltip-content-available-width': 'var(--available-width)' }\"\n :hidden=\"undefined\"\n :data-state=\"api.open ? 'delayed-open' : 'closed'\"\n data-member=\"tooltip\"\n >\n {{ content }}\n </div>\n </div>\n </Teleport>\n</template>\n"],"mappings":""}
1
+ {"version":3,"file":"Tooltip.js","names":[],"sources":["../../src/overlays/Tooltip.vue"],"sourcesContent":["<script setup lang=\"ts\">\n/**\n * A short text hint shown on hover or focus (`design/components/tooltip.md`).\n *\n * Generated by `pnpm shells` from `packages/shells/src/members/tooltip.ts`, the member's\n * framework-neutral description. Never edit it by hand: change the description and\n * run `pnpm shells`.\n */\nimport { computed, onBeforeUnmount, onMounted, useId, useTemplateRef, watch } from 'vue'\n\nimport * as zag from '@zag-js/tooltip'\nimport { normalizeProps, useMachine } from '@zag-js/vue'\n\nimport {\n TOOLTIP_DELAY_MS,\n TOOLTIP_SKIP_DELAY_MS,\n anchorProps,\n closeTooltipOnScroll,\n holdTooltipFromPointer,\n syncTriggerAnchor,\n useDirection,\n} from '@polymorph/vue'\nimport { usePresence } from '@polymorph/vue/motion'\nimport styles from '@polymorph/recipes/overlays/tooltip.module.css'\n\nexport type TooltipAlign = NonNullable<TooltipProps['align']>\n\nexport type TooltipSide = NonNullable<TooltipProps['side']>\n\nexport interface TooltipProps {\n align?: 'start' | 'center' | 'end'\n content: string\n /**\n * Opens on mount, for galleries and tests.\n */\n defaultOpen?: boolean\n side?: 'bottom' | 'top' | 'right' | 'left'\n}\n\ndefineOptions({ name: 'Tooltip', inheritAttrs: false })\n\nconst props = withDefaults(defineProps<TooltipProps>(), {\n align: 'center',\n defaultOpen: undefined,\n side: 'top',\n})\ndefineSlots<{ default: (props: Record<string, never>) => unknown }>()\nconst uid = useId()\nconst anchor = useTemplateRef<HTMLElement>('anchor')\nconst bubble = useTemplateRef<HTMLElement>('bubble')\nconst documentDirection = useDirection(() => anchor.value)\nconst service = useMachine(\n zag.machine,\n computed(() => ({\n id: uid,\n dir: documentDirection.value,\n defaultOpen: props.defaultOpen,\n openDelay: TOOLTIP_DELAY_MS,\n closeDelay: TOOLTIP_SKIP_DELAY_MS,\n closeOnScroll: false,\n positioning: {\n placement: props.align === 'center' ? props.side : `${props.side}-${props.align}`,\n gutter: 0,\n },\n })),\n)\nconst api = computed(() => zag.connect(service, normalizeProps))\nconst present = usePresence(() => api.value.open, bubble, 'tooltip.bubble', {\n get side() {\n return props.side\n },\n get align() {\n return props.align\n },\n})\nconst effect1 = () => {\n syncTriggerAnchor(anchor.value, api.value.getTriggerProps(), api.value.open, false)\n}\nonMounted(effect1)\nwatch(() => api.value.open, effect1, { flush: 'post' })\nlet release2: (() => void) | undefined\nconst effect2 = () => {\n release2?.()\n const ran = closeTooltipOnScroll(api.value.open ? anchor.value : null, () =>\n api.value.setOpen(false),\n )\n release2 = () => {\n ran()\n }\n}\nonMounted(effect2)\nwatch(() => api.value.open, effect2, { flush: 'post' })\nonBeforeUnmount(() => release2?.())\nlet release3: (() => void) | undefined\nconst effect3 = () => {\n release3?.()\n const ran = holdTooltipFromPointer(anchor.value)\n release3 = () => {\n ran()\n }\n}\nonMounted(effect3)\nonBeforeUnmount(() => release3?.())\n</script>\n\n<template>\n <span\n ref=\"anchor\"\n v-bind=\"anchorProps(api.getTriggerProps())\"\n :class=\"styles.anchor\"\n data-tooltip-part=\"trigger\"\n >\n <slot />\n </span>\n <Teleport to=\"body\">\n <div v-if=\"present\" v-bind=\"api.getPositionerProps()\">\n <!-- bubble -->\n <div\n ref=\"bubble\"\n v-bind=\"api.getContentProps()\"\n :class=\"styles.bubble\"\n :style=\"{ '--radix-tooltip-content-available-width': 'var(--available-width)' }\"\n :hidden=\"undefined\"\n :data-state=\"api.open ? 'delayed-open' : 'closed'\"\n data-member=\"tooltip\"\n >\n {{ content }}\n </div>\n </div>\n </Teleport>\n</template>\n"],"mappings":""}
@@ -1,11 +1,11 @@
1
1
  import e from "./tooltip.module.js";
2
- import { TOOLTIP_DELAY_MS as t, TOOLTIP_SKIP_DELAY_MS as n, anchorProps as r, syncTriggerAnchor as i, useDirection as a } from "@polymorph/vue";
3
- import { Fragment as o, Teleport as s, computed as c, createBlock as l, createCommentVNode as u, createElementBlock as d, createElementVNode as f, defineComponent as p, mergeProps as m, normalizeProps as h, onMounted as g, openBlock as _, renderSlot as v, toDisplayString as y, unref as b, useId as x, useTemplateRef as S, watch as C } from "vue";
4
- import { normalizeProps as w, useMachine as T } from "@zag-js/vue";
5
- import { usePresence as E } from "@polymorph/vue/motion";
6
- import * as D from "@zag-js/tooltip";
2
+ import { TOOLTIP_DELAY_MS as t, TOOLTIP_SKIP_DELAY_MS as n, anchorProps as r, closeTooltipOnScroll as i, holdTooltipFromPointer as a, syncTriggerAnchor as o, useDirection as s } from "@polymorph/vue";
3
+ import { Fragment as c, Teleport as l, computed as u, createBlock as d, createCommentVNode as f, createElementBlock as p, createElementVNode as m, defineComponent as h, mergeProps as g, normalizeProps as _, onBeforeUnmount as v, onMounted as y, openBlock as b, renderSlot as x, toDisplayString as S, unref as C, useId as w, useTemplateRef as T, watch as E } from "vue";
4
+ import { normalizeProps as D, useMachine as O } from "@zag-js/vue";
5
+ import { usePresence as k } from "@polymorph/vue/motion";
6
+ import * as A from "@zag-js/tooltip";
7
7
  //#region src/overlays/Tooltip.vue?vue&type=script&setup=true&lang.ts
8
- var O = ["data-state"], k = /*@__PURE__*/ p({
8
+ var j = ["data-state"], M = /*@__PURE__*/ h({
9
9
  name: "Tooltip",
10
10
  inheritAttrs: !1,
11
11
  __name: "Tooltip",
@@ -18,43 +18,63 @@ var O = ["data-state"], k = /*@__PURE__*/ p({
18
18
  },
19
19
  side: { default: "top" }
20
20
  },
21
- setup(p) {
22
- let k = p, A = x(), j = S("anchor"), M = S("bubble"), N = a(), P = T(D.machine, c(() => ({
23
- id: A,
24
- dir: N.value,
25
- defaultOpen: k.defaultOpen,
21
+ setup(h) {
22
+ let M = h, N = w(), P = T("anchor"), F = T("bubble"), I = s(() => P.value), L = O(A.machine, u(() => ({
23
+ id: N,
24
+ dir: I.value,
25
+ defaultOpen: M.defaultOpen,
26
26
  openDelay: t,
27
27
  closeDelay: n,
28
+ closeOnScroll: !1,
28
29
  positioning: {
29
- placement: k.align === "center" ? k.side : `${k.side}-${k.align}`,
30
+ placement: M.align === "center" ? M.side : `${M.side}-${M.align}`,
30
31
  gutter: 0
31
32
  }
32
- }))), F = c(() => D.connect(P, w)), I = E(() => F.value.open, M, "tooltip.bubble", {
33
+ }))), R = u(() => A.connect(L, D)), z = k(() => R.value.open, F, "tooltip.bubble", {
33
34
  get side() {
34
- return k.side;
35
+ return M.side;
35
36
  },
36
37
  get align() {
37
- return k.align;
38
+ return M.align;
38
39
  }
39
- }), L = () => {
40
- i(j.value, F.value.getTriggerProps(), F.value.open, !1);
40
+ }), B = () => {
41
+ o(P.value, R.value.getTriggerProps(), R.value.open, !1);
41
42
  };
42
- return g(L), C(() => F.value.open, L, { flush: "post" }), (t, n) => (_(), d(o, null, [f("span", m({
43
+ y(B), E(() => R.value.open, B, { flush: "post" });
44
+ let V, H = () => {
45
+ V?.();
46
+ let e = i(R.value.open ? P.value : null, () => R.value.setOpen(!1));
47
+ V = () => {
48
+ e();
49
+ };
50
+ };
51
+ y(H), E(() => R.value.open, H, { flush: "post" }), v(() => V?.());
52
+ let U;
53
+ return y(() => {
54
+ U?.();
55
+ let e = a(P.value);
56
+ U = () => {
57
+ e();
58
+ };
59
+ }), v(() => U?.()), (t, n) => (b(), p(c, null, [m("span", g({
43
60
  ref_key: "anchor",
44
- ref: j
45
- }, b(r)(F.value.getTriggerProps()), { class: b(e).anchor }), [v(t.$slots, "default")], 16), (_(), l(s, { to: "body" }, [b(I) ? (_(), d("div", h(m({ key: 0 }, F.value.getPositionerProps())), [f("div", m({
61
+ ref: P
62
+ }, C(r)(R.value.getTriggerProps()), {
63
+ class: C(e).anchor,
64
+ "data-tooltip-part": "trigger"
65
+ }), [x(t.$slots, "default")], 16), (b(), d(l, { to: "body" }, [C(z) ? (b(), p("div", _(g({ key: 0 }, R.value.getPositionerProps())), [m("div", g({
46
66
  ref_key: "bubble",
47
- ref: M
48
- }, F.value.getContentProps(), {
49
- class: b(e).bubble,
67
+ ref: F
68
+ }, R.value.getContentProps(), {
69
+ class: C(e).bubble,
50
70
  style: { "--radix-tooltip-content-available-width": "var(--available-width)" },
51
71
  hidden: void 0,
52
- "data-state": F.value.open ? "delayed-open" : "closed",
72
+ "data-state": R.value.open ? "delayed-open" : "closed",
53
73
  "data-member": "tooltip"
54
- }), y(p.content), 17, O)], 16)) : u("", !0)]))], 64));
74
+ }), S(h.content), 17, j)], 16)) : f("", !0)]))], 64));
55
75
  }
56
76
  });
57
77
  //#endregion
58
- export { k as default };
78
+ export { M as default };
59
79
 
60
80
  //# sourceMappingURL=Tooltip.vue_vue_type_script_setup_true_lang.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"Tooltip.vue_vue_type_script_setup_true_lang.js","names":[],"sources":["../../src/overlays/Tooltip.vue"],"sourcesContent":["<script setup lang=\"ts\">\n/**\n * A short text hint shown on hover or focus (`design/components/tooltip.md`).\n *\n * Generated by `pnpm shells` from `packages/shells/src/members/tooltip.ts`, the member's\n * framework-neutral description. Never edit it by hand: change the description and\n * run `pnpm shells`.\n */\nimport { computed, onMounted, useId, useTemplateRef, watch } from 'vue'\n\nimport * as zag from '@zag-js/tooltip'\nimport { normalizeProps, useMachine } from '@zag-js/vue'\n\nimport {\n TOOLTIP_DELAY_MS,\n TOOLTIP_SKIP_DELAY_MS,\n anchorProps,\n syncTriggerAnchor,\n useDirection,\n} from '@polymorph/vue'\nimport { usePresence } from '@polymorph/vue/motion'\nimport styles from '@polymorph/recipes/overlays/tooltip.module.css'\n\nexport type TooltipAlign = NonNullable<TooltipProps['align']>\n\nexport type TooltipSide = NonNullable<TooltipProps['side']>\n\nexport interface TooltipProps {\n align?: 'start' | 'center' | 'end'\n content: string\n /**\n * Opens on mount, for galleries and tests.\n */\n defaultOpen?: boolean\n side?: 'bottom' | 'top' | 'right' | 'left'\n}\n\ndefineOptions({ name: 'Tooltip', inheritAttrs: false })\n\nconst props = withDefaults(defineProps<TooltipProps>(), {\n align: 'center',\n defaultOpen: undefined,\n side: 'top',\n})\ndefineSlots<{ default: (props: Record<string, never>) => unknown }>()\nconst uid = useId()\nconst anchor = useTemplateRef<HTMLElement>('anchor')\nconst bubble = useTemplateRef<HTMLElement>('bubble')\nconst documentDirection = useDirection()\nconst service = useMachine(\n zag.machine,\n computed(() => ({\n id: uid,\n dir: documentDirection.value,\n defaultOpen: props.defaultOpen,\n openDelay: TOOLTIP_DELAY_MS,\n closeDelay: TOOLTIP_SKIP_DELAY_MS,\n positioning: {\n placement: props.align === 'center' ? props.side : `${props.side}-${props.align}`,\n gutter: 0,\n },\n })),\n)\nconst api = computed(() => zag.connect(service, normalizeProps))\nconst present = usePresence(() => api.value.open, bubble, 'tooltip.bubble', {\n get side() {\n return props.side\n },\n get align() {\n return props.align\n },\n})\nconst effect1 = () => {\n syncTriggerAnchor(anchor.value, api.value.getTriggerProps(), api.value.open, false)\n}\nonMounted(effect1)\nwatch(() => api.value.open, effect1, { flush: 'post' })\n</script>\n\n<template>\n <span ref=\"anchor\" v-bind=\"anchorProps(api.getTriggerProps())\" :class=\"styles.anchor\">\n <slot />\n </span>\n <Teleport to=\"body\">\n <div v-if=\"present\" v-bind=\"api.getPositionerProps()\">\n <!-- bubble -->\n <div\n ref=\"bubble\"\n v-bind=\"api.getContentProps()\"\n :class=\"styles.bubble\"\n :style=\"{ '--radix-tooltip-content-available-width': 'var(--available-width)' }\"\n :hidden=\"undefined\"\n :data-state=\"api.open ? 'delayed-open' : 'closed'\"\n data-member=\"tooltip\"\n >\n {{ content }}\n </div>\n </div>\n </Teleport>\n</template>\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;EAuCA,IAAM,IAAQ,GAMR,IAAM,EAAM,GACZ,IAAS,EAA4B,QAAQ,GAC7C,IAAS,EAA4B,QAAQ,GAC7C,IAAoB,EAAa,GACjC,IAAU,EACd,EAAI,SACJ,SAAgB;GACd,IAAI;GACJ,KAAK,EAAkB;GACvB,aAAa,EAAM;GACnB,WAAW;GACX,YAAY;GACZ,aAAa;IACX,WAAW,EAAM,UAAU,WAAW,EAAM,OAAO,GAAG,EAAM,KAAK,GAAG,EAAM;IAC1E,QAAQ;GACV;EACF,EAAE,CACJ,GACM,IAAM,QAAe,EAAI,QAAQ,GAAS,CAAc,CAAC,GACzD,IAAU,QAAkB,EAAI,MAAM,MAAM,GAAQ,kBAAkB;GAC1E,IAAI,OAAO;IACT,OAAO,EAAM;GACf;GACA,IAAI,QAAQ;IACV,OAAO,EAAM;GACf;EACF,CAAC,GACK,UAAgB;GACpB,EAAkB,EAAO,OAAO,EAAI,MAAM,gBAAgB,GAAG,EAAI,MAAM,MAAM,EAAK;EACpF;SACA,EAAU,CAAO,GACjB,QAAY,EAAI,MAAM,MAAM,GAAS,EAAE,OAAO,OAAO,CAAC,+BAIpD,EAEO,QAFP,EAEO;YAFG;GAAJ,KAAI;KAAiB,EAAA,CAAA,CAAW,CAAC,EAAA,MAAI,gBAAe,CAAA,GAAA,EAAM,OAAO,EAAA,CAAA,CAAM,CAAC,OAAA,CAAA,GAAA,CAC5E,EAAQ,EAAA,QAAA,SAAA,CAAA,GAAA,EAAA,IAAA,EAAA,GAEV,EAeW,GAAA,EAfD,IAAG,OAAM,GAAA,CACN,EAAA,CAAA,KAAA,EAAA,GAAX,EAaM,OAAA,EAAA,EAAA,EAAA,KAAA,EAAA,GAbsB,EAAA,MAAI,mBAAkB,CAAA,CAAA,GAAA,CAEhD,EAUM,OAVN,EAUM;YATA;GAAJ,KAAI;KACI,EAAA,MAAI,gBAAe,GAAA;GAC1B,OAAO,EAAA,CAAA,CAAM,CAAC;GACd,OAAO,EAAA,2CAAA,yBAAA;GACP,QAAQ,KAAA;GACR,cAAY,EAAA,MAAI,OAAI,iBAAA;GACrB,eAAY;QAET,EAAA,OAAO,GAAA,IAAA,CAAA,CAAA,GAAA,EAAA,KAAA,EAAA,IAAA,EAAA,CAAA,CAAA,EAAA,GAAA,EAAA"}
1
+ {"version":3,"file":"Tooltip.vue_vue_type_script_setup_true_lang.js","names":[],"sources":["../../src/overlays/Tooltip.vue"],"sourcesContent":["<script setup lang=\"ts\">\n/**\n * A short text hint shown on hover or focus (`design/components/tooltip.md`).\n *\n * Generated by `pnpm shells` from `packages/shells/src/members/tooltip.ts`, the member's\n * framework-neutral description. Never edit it by hand: change the description and\n * run `pnpm shells`.\n */\nimport { computed, onBeforeUnmount, onMounted, useId, useTemplateRef, watch } from 'vue'\n\nimport * as zag from '@zag-js/tooltip'\nimport { normalizeProps, useMachine } from '@zag-js/vue'\n\nimport {\n TOOLTIP_DELAY_MS,\n TOOLTIP_SKIP_DELAY_MS,\n anchorProps,\n closeTooltipOnScroll,\n holdTooltipFromPointer,\n syncTriggerAnchor,\n useDirection,\n} from '@polymorph/vue'\nimport { usePresence } from '@polymorph/vue/motion'\nimport styles from '@polymorph/recipes/overlays/tooltip.module.css'\n\nexport type TooltipAlign = NonNullable<TooltipProps['align']>\n\nexport type TooltipSide = NonNullable<TooltipProps['side']>\n\nexport interface TooltipProps {\n align?: 'start' | 'center' | 'end'\n content: string\n /**\n * Opens on mount, for galleries and tests.\n */\n defaultOpen?: boolean\n side?: 'bottom' | 'top' | 'right' | 'left'\n}\n\ndefineOptions({ name: 'Tooltip', inheritAttrs: false })\n\nconst props = withDefaults(defineProps<TooltipProps>(), {\n align: 'center',\n defaultOpen: undefined,\n side: 'top',\n})\ndefineSlots<{ default: (props: Record<string, never>) => unknown }>()\nconst uid = useId()\nconst anchor = useTemplateRef<HTMLElement>('anchor')\nconst bubble = useTemplateRef<HTMLElement>('bubble')\nconst documentDirection = useDirection(() => anchor.value)\nconst service = useMachine(\n zag.machine,\n computed(() => ({\n id: uid,\n dir: documentDirection.value,\n defaultOpen: props.defaultOpen,\n openDelay: TOOLTIP_DELAY_MS,\n closeDelay: TOOLTIP_SKIP_DELAY_MS,\n closeOnScroll: false,\n positioning: {\n placement: props.align === 'center' ? props.side : `${props.side}-${props.align}`,\n gutter: 0,\n },\n })),\n)\nconst api = computed(() => zag.connect(service, normalizeProps))\nconst present = usePresence(() => api.value.open, bubble, 'tooltip.bubble', {\n get side() {\n return props.side\n },\n get align() {\n return props.align\n },\n})\nconst effect1 = () => {\n syncTriggerAnchor(anchor.value, api.value.getTriggerProps(), api.value.open, false)\n}\nonMounted(effect1)\nwatch(() => api.value.open, effect1, { flush: 'post' })\nlet release2: (() => void) | undefined\nconst effect2 = () => {\n release2?.()\n const ran = closeTooltipOnScroll(api.value.open ? anchor.value : null, () =>\n api.value.setOpen(false),\n )\n release2 = () => {\n ran()\n }\n}\nonMounted(effect2)\nwatch(() => api.value.open, effect2, { flush: 'post' })\nonBeforeUnmount(() => release2?.())\nlet release3: (() => void) | undefined\nconst effect3 = () => {\n release3?.()\n const ran = holdTooltipFromPointer(anchor.value)\n release3 = () => {\n ran()\n }\n}\nonMounted(effect3)\nonBeforeUnmount(() => release3?.())\n</script>\n\n<template>\n <span\n ref=\"anchor\"\n v-bind=\"anchorProps(api.getTriggerProps())\"\n :class=\"styles.anchor\"\n data-tooltip-part=\"trigger\"\n >\n <slot />\n </span>\n <Teleport to=\"body\">\n <div v-if=\"present\" v-bind=\"api.getPositionerProps()\">\n <!-- bubble -->\n <div\n ref=\"bubble\"\n v-bind=\"api.getContentProps()\"\n :class=\"styles.bubble\"\n :style=\"{ '--radix-tooltip-content-available-width': 'var(--available-width)' }\"\n :hidden=\"undefined\"\n :data-state=\"api.open ? 'delayed-open' : 'closed'\"\n data-member=\"tooltip\"\n >\n {{ content }}\n </div>\n </div>\n </Teleport>\n</template>\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;EAyCA,IAAM,IAAQ,GAMR,IAAM,EAAM,GACZ,IAAS,EAA4B,QAAQ,GAC7C,IAAS,EAA4B,QAAQ,GAC7C,IAAoB,QAAmB,EAAO,KAAK,GACnD,IAAU,EACd,EAAI,SACJ,SAAgB;GACd,IAAI;GACJ,KAAK,EAAkB;GACvB,aAAa,EAAM;GACnB,WAAW;GACX,YAAY;GACZ,eAAe;GACf,aAAa;IACX,WAAW,EAAM,UAAU,WAAW,EAAM,OAAO,GAAG,EAAM,KAAK,GAAG,EAAM;IAC1E,QAAQ;GACV;EACF,EAAE,CACJ,GACM,IAAM,QAAe,EAAI,QAAQ,GAAS,CAAc,CAAC,GACzD,IAAU,QAAkB,EAAI,MAAM,MAAM,GAAQ,kBAAkB;GAC1E,IAAI,OAAO;IACT,OAAO,EAAM;GACf;GACA,IAAI,QAAQ;IACV,OAAO,EAAM;GACf;EACF,CAAC,GACK,UAAgB;GACpB,EAAkB,EAAO,OAAO,EAAI,MAAM,gBAAgB,GAAG,EAAI,MAAM,MAAM,EAAK;EACpF;EAEA,AADA,EAAU,CAAO,GACjB,QAAY,EAAI,MAAM,MAAM,GAAS,EAAE,OAAO,OAAO,CAAC;EACtD,IAAI,GACE,UAAgB;GACpB,IAAW;GACX,IAAM,IAAM,EAAqB,EAAI,MAAM,OAAO,EAAO,QAAQ,YAC/D,EAAI,MAAM,QAAQ,EAAK,CACzB;GACA,UAAiB;IACf,EAAI;GACN;EACF;EAGA,AAFA,EAAU,CAAO,GACjB,QAAY,EAAI,MAAM,MAAM,GAAS,EAAE,OAAO,OAAO,CAAC,GACtD,QAAsB,IAAW,CAAC;EAClC,IAAI;SAQJ,QAPsB;GACpB,IAAW;GACX,IAAM,IAAM,EAAuB,EAAO,KAAK;GAC/C,UAAiB;IACf,EAAI;GACN;EACF,CACiB,GACjB,QAAsB,IAAW,CAAC,+BAIhC,EAOO,QAPP,EAOO;YAND;GAAJ,KAAI;KACI,EAAA,CAAA,CAAW,CAAC,EAAA,MAAI,gBAAe,CAAA,GAAA;GACtC,OAAO,EAAA,CAAA,CAAM,CAAC;GACf,qBAAkB;OAElB,EAAQ,EAAA,QAAA,SAAA,CAAA,GAAA,EAAA,IAAA,EAAA,GAEV,EAeW,GAAA,EAfD,IAAG,OAAM,GAAA,CACN,EAAA,CAAA,KAAA,EAAA,GAAX,EAaM,OAAA,EAAA,EAAA,EAAA,KAAA,EAAA,GAbsB,EAAA,MAAI,mBAAkB,CAAA,CAAA,GAAA,CAEhD,EAUM,OAVN,EAUM;YATA;GAAJ,KAAI;KACI,EAAA,MAAI,gBAAe,GAAA;GAC1B,OAAO,EAAA,CAAA,CAAM,CAAC;GACd,OAAO,EAAA,2CAAA,yBAAA;GACP,QAAQ,KAAA;GACR,cAAY,EAAA,MAAI,OAAI,iBAAA;GACrB,eAAY;QAET,EAAA,OAAO,GAAA,IAAA,CAAA,CAAA,GAAA,EAAA,KAAA,EAAA,IAAA,EAAA,CAAA,CAAA,EAAA,GAAA,EAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"Tour.js","names":[],"sources":["../../src/overlays/Tour.vue"],"sourcesContent":["<script setup lang=\"ts\">\n/**\n * Steps pointing at the parts of a page (`design/components/tour.md`).\n *\n * Generated by `pnpm shells` from `packages/shells/src/members/tour.ts`, the member's\n * framework-neutral description. Never edit it by hand: change the description and\n * run `pnpm shells`.\n */\nimport { computed, onBeforeUnmount, onMounted, ref, useId, useTemplateRef, watch } from 'vue'\n\nimport * as zag from '@zag-js/dialog'\nimport { normalizeProps, useMachine } from '@zag-js/vue'\n\nimport {\n agentMember,\n revealTourTarget,\n tourPlacement,\n tourTarget,\n tourTargetRect,\n tourViewport,\n useDirection,\n} from '@polymorph/vue'\nimport { usePresence } from '@polymorph/vue/motion'\nimport styles from '@polymorph/recipes/overlays/tour.module.css'\nimport Button from '../controls/Button.vue'\n\nexport interface TourStep {\n /** The step's key, unique in the tour. */\n id: string\n /** The `name` of the `Tour.Target` the step points at. Without one, the step is drawn centred. */\n target?: string\n title: string\n /** A sentence or two about the target, as text. */\n body: string\n /** The side of the target the panel opens on, when it fits there. */\n side?: 'top' | 'right' | 'bottom' | 'left'\n}\n\nexport interface TourMessages {\n next: string\n previous: string\n /** The last step's forward control, which ends the tour. */\n done: string\n /** The close control's accessible name. */\n close: string\n /** The position line, counting from 1: \"Step 2 of 5\". */\n position: (position: number, count: number) => string\n}\n\nexport type TourEnd = 'finished' | 'dismissed'\n\nexport interface TourProps {\n defaultOpen?: boolean\n defaultStep?: number\n messages?: TourMessages\n open?: boolean\n /**\n * The current step's index, clamped to the steps.\n */\n step?: number\n steps: readonly TourStep[]\n}\n\ndefineOptions({ name: 'Tour', inheritAttrs: false })\n\nconst props = withDefaults(defineProps<TourProps>(), {\n defaultOpen: undefined,\n messages: () => ({\n next: 'Next',\n previous: 'Previous',\n done: 'Done',\n close: 'Close',\n position: (position: number, count: number) => `Step ${position} of ${count}`,\n }),\n open: undefined,\n})\nconst emit = defineEmits<{ end: [reason: TourEnd]; stepChange: [index: number] }>()\nconst uid = useId()\nconst uncontrolledStep = ref(props.defaultStep ?? 0)\nconst ending = ref(null as 'finished' | 'dismissed' | null)\nconst geometry = ref(\n null as {\n x: number\n y: number\n placement: 'top' | 'right' | 'bottom' | 'left' | 'center'\n hole: { x: number; y: number; width: number; height: number } | null\n } | null,\n)\nconst panel = useTemplateRef<HTMLElement>('panel')\nconst positioner = useTemplateRef<HTMLElement>('positioner')\nconst scrim = useTemplateRef<HTMLElement>('scrim')\nconst count = computed(() => props.steps.length)\nconst index = computed(() =>\n Math.min(Math.max(props.step ?? uncontrolledStep.value, 0), Math.max(count.value - 1, 0)),\n)\nconst current = computed(() => props.steps[index.value])\nconst first = computed(() => index.value === 0)\nconst last = computed(() => index.value === count.value - 1)\nconst drawnAt = computed(() => geometry.value?.placement ?? 'center')\nconst cutOut = computed(() => geometry.value?.hole ?? null)\nconst go = computed(() => (next: number): void => {\n uncontrolledStep.value = next\n emit('stepChange', next)\n})\nconst closed = computed(() => (open: boolean): void => {\n if (open) return\n const reason = ending.value ?? 'dismissed'\n ending.value = null\n emit('end', reason)\n})\nconst place = computed(() => (): void => {\n if (positioner.value == null || current.value === undefined) return\n const rect = tourTargetRect(tourTarget(current.value.target))\n const next = {\n ...tourPlacement(\n rect,\n { width: positioner.value.offsetWidth, height: positioner.value.offsetHeight },\n tourViewport(),\n current.value.side,\n ),\n hole: rect,\n }\n if (JSON.stringify(next) !== JSON.stringify(geometry.value)) geometry.value = next\n})\nconst follow = computed(() => (): (() => void) => {\n const again = (): void => place.value()\n window.addEventListener('resize', again)\n document.addEventListener('scroll', again, { capture: true, passive: true })\n return () => {\n window.removeEventListener('resize', again)\n document.removeEventListener('scroll', again, { capture: true })\n }\n})\nconst documentDirection = useDirection()\nconst service = useMachine(\n zag.machine,\n computed(() => ({\n id: uid,\n dir: documentDirection.value,\n open: props.open === undefined ? undefined : props.open && count.value > 0,\n defaultOpen: props.defaultOpen === true && count.value > 0,\n preventScroll: false,\n closeOnInteractOutside: false,\n initialFocusEl: () => panel.value,\n onOpenChange: (details) => {\n closed.value(details.open)\n },\n })),\n)\nconst api = computed(() => zag.connect(service, normalizeProps))\nconst end = computed(() => (reason: 'finished' | 'dismissed'): void => {\n ending.value = reason\n api.value.setOpen(false)\n})\nconst show = computed(() => (): void => {\n if (!api.value.open || current.value === undefined) return\n revealTourTarget(tourTarget(current.value.target))\n place.value()\n requestAnimationFrame(() => place.value())\n})\nconst scrimPresent = usePresence(\n () => api.value.open && current.value !== undefined,\n scrim,\n 'dialog.scrim',\n)\nconst panelPresent = usePresence(\n () => api.value.open && current.value !== undefined,\n panel,\n 'popover.panel',\n {\n get side() {\n return drawnAt.value === 'center' ? undefined : drawnAt.value\n },\n align: 'center',\n },\n)\nconst effect1 = () => {\n show.value()\n}\nonMounted(effect1)\nwatch(() => [api.value.open, index.value], effect1, { flush: 'post' })\nlet release2: (() => void) | undefined\nconst effect2 = () => {\n release2?.()\n const run = () => {\n place.value()\n }\n const resize = typeof ResizeObserver === 'undefined' ? undefined : new ResizeObserver(run)\n for (const element of [positioner.value]) if (element) resize?.observe(element)\n release2 = () => {\n resize?.disconnect()\n }\n run()\n}\nonMounted(effect2)\nwatch(() => api.value.open, effect2, { flush: 'post' })\nonBeforeUnmount(() => release2?.())\nlet release3: (() => void) | undefined\nconst effect3 = () => {\n release3?.()\n const ran = follow.value()\n release3 = () => {\n ran()\n }\n}\nonMounted(effect3)\nwatch(() => api.value.open, effect3, { flush: 'post' })\nonBeforeUnmount(() => release3?.())\nconst effect4 = () => {\n api.value.open && panel.value?.focus()\n}\nwatch(() => index.value, effect4, { flush: 'post' })\nlet release5: (() => void) | undefined\nconst effect5 = () => {\n release5?.()\n const ran = agentMember({\n member: 'Tour',\n element: () => panel.value,\n state: () => ({\n open: api.value.open,\n step: index.value,\n steps: props.steps.map((each) => ({ id: each.id, title: each.title, body: each.body })),\n }),\n actions: {\n next: () =>\n (() => {\n if (!api.value.open) throw new Error('The tour is not open.')\n if (last.value) throw new Error('On the last step, an agent ends a tour with dismiss.')\n go.value(index.value + 1)\n })(),\n previous: () =>\n (() => {\n if (!api.value.open) throw new Error('The tour is not open.')\n if (first.value) throw new Error('This is the first step.')\n go.value(index.value - 1)\n })(),\n dismiss: () => api.value.open && end.value('dismissed'),\n },\n withholds: () => panel.value,\n })\n release5 = () => {\n ran()\n }\n}\nonMounted(effect5)\nonBeforeUnmount(() => release5?.())\n</script>\n\n<template>\n <Teleport to=\"body\">\n <!-- scrim -->\n <div\n v-if=\"scrimPresent\"\n ref=\"scrim\"\n v-bind=\"api.getBackdropProps()\"\n :class=\"[\n cutOut !== null ? styles.spotlight : undefined,\n cutOut === null ? styles.scrim : undefined,\n ]\"\n :style=\"{\n '--pm-tour-hole-x': cutOut === null ? undefined : `${cutOut.x}px`,\n '--pm-tour-hole-y': cutOut === null ? undefined : `${cutOut.y}px`,\n '--pm-tour-hole-width': cutOut === null ? undefined : `${cutOut.width}px`,\n '--pm-tour-hole-height': cutOut === null ? undefined : `${cutOut.height}px`,\n }\"\n :hidden=\"undefined\"\n aria-hidden=\"true\"\n data-tour-part=\"scrim\"\n />\n <div\n v-if=\"panelPresent\"\n ref=\"positioner\"\n v-bind=\"api.getPositionerProps()\"\n :class=\"styles.positioner\"\n :style=\"{ '--pm-tour-x': `${geometry?.x ?? 0}px`, '--pm-tour-y': `${geometry?.y ?? 0}px` }\"\n :data-placement=\"drawnAt\"\n >\n <!-- panel -->\n <div\n ref=\"panel\"\n v-bind=\"api.getContentProps()\"\n :class=\"styles.panel\"\n :hidden=\"undefined\"\n :data-step=\"current?.id\"\n data-member=\"tour\"\n >\n <!-- title -->\n <h2 v-bind=\"api.getTitleProps()\" :class=\"styles.title\">\n {{ current?.title }}\n </h2>\n <!-- description -->\n <div v-bind=\"api.getDescriptionProps()\" :class=\"styles.description\">\n <!-- body -->\n <p :class=\"styles.body\">\n {{ current?.body }}\n </p>\n <!-- position -->\n <p :class=\"styles.position\" data-tour-part=\"position\">\n {{ messages.position(index + 1, count) }}\n </p>\n </div>\n <!-- actions -->\n <div :class=\"styles.actions\" data-tour-part=\"actions\">\n <Button\n v-if=\"!first\"\n variant=\"outline\"\n tone=\"neutral\"\n size=\"sm\"\n :label=\"messages.previous\"\n @click=\"go(index - 1)\"\n />\n <Button\n size=\"sm\"\n :label=\"last ? messages.done : messages.next\"\n @click=\"last ? end('finished') : go(index + 1)\"\n />\n </div>\n <!-- close -->\n <div :class=\"styles.close\" data-tour-part=\"close\">\n <Button\n variant=\"ghost\"\n tone=\"neutral\"\n size=\"sm\"\n :iconOnly=\"true\"\n icon=\"close\"\n :label=\"messages.close\"\n @click=\"end('dismissed')\"\n />\n </div>\n </div>\n </div>\n </Teleport>\n</template>\n"],"mappings":""}
1
+ {"version":3,"file":"Tour.js","names":[],"sources":["../../src/overlays/Tour.vue"],"sourcesContent":["<script setup lang=\"ts\">\n/**\n * Steps pointing at the parts of a page (`design/components/tour.md`).\n *\n * Generated by `pnpm shells` from `packages/shells/src/members/tour.ts`, the member's\n * framework-neutral description. Never edit it by hand: change the description and\n * run `pnpm shells`.\n */\nimport { computed, onBeforeUnmount, onMounted, ref, useId, useTemplateRef, watch } from 'vue'\n\nimport * as zag from '@zag-js/dialog'\nimport { normalizeProps, useMachine } from '@zag-js/vue'\n\nimport {\n agentMember,\n focusPlace,\n focusReturnTarget,\n revealTourTarget,\n tourPlacement,\n tourTarget,\n tourTargetRect,\n tourViewport,\n useDirection,\n} from '@polymorph/vue'\nimport { usePresence } from '@polymorph/vue/motion'\nimport styles from '@polymorph/recipes/overlays/tour.module.css'\nimport Button from '../controls/Button.vue'\n\nexport interface TourStep {\n /** The step's key, unique in the tour. */\n id: string\n /** The `name` of the `Tour.Target` the step points at. Without one, the step is drawn centred. */\n target?: string\n title: string\n /** A sentence or two about the target, as text. */\n body: string\n /** The side of the target the panel opens on, when it fits there. */\n side?: 'top' | 'right' | 'bottom' | 'left'\n}\n\nexport interface TourMessages {\n next: string\n previous: string\n /** The last step's forward control, which ends the tour. */\n done: string\n /** The close control's accessible name. */\n close: string\n /** The position line, counting from 1: \"Step 2 of 5\". */\n position: (position: number, count: number) => string\n}\n\nexport type TourEnd = 'finished' | 'dismissed'\n\nexport interface TourProps {\n defaultOpen?: boolean\n defaultStep?: number\n messages?: TourMessages\n open?: boolean\n /**\n * The current step's index, clamped to the steps.\n */\n step?: number\n steps: readonly TourStep[]\n}\n\ndefineOptions({ name: 'Tour', inheritAttrs: false })\n\nconst props = withDefaults(defineProps<TourProps>(), {\n defaultOpen: undefined,\n messages: () => ({\n next: 'Next',\n previous: 'Previous',\n done: 'Done',\n close: 'Close',\n position: (position: number, count: number) => `Step ${position} of ${count}`,\n }),\n open: undefined,\n})\nconst emit = defineEmits<{ end: [reason: TourEnd]; stepChange: [index: number] }>()\nconst uid = useId()\nconst uncontrolledStep = ref(props.defaultStep ?? 0)\nconst ending = ref(null as 'finished' | 'dismissed' | null)\nconst returnTo = ref(null as ReturnType<typeof focusPlace>)\nconst geometry = ref(\n null as {\n x: number\n y: number\n placement: 'top' | 'right' | 'bottom' | 'left' | 'center'\n hole: { x: number; y: number; width: number; height: number } | null\n } | null,\n)\nconst panel = useTemplateRef<HTMLElement>('panel')\nconst positioner = useTemplateRef<HTMLElement>('positioner')\nconst scrim = useTemplateRef<HTMLElement>('scrim')\nconst count = computed(() => props.steps.length)\nconst index = computed(() =>\n Math.min(Math.max(props.step ?? uncontrolledStep.value, 0), Math.max(count.value - 1, 0)),\n)\nconst current = computed(() => props.steps[index.value])\nconst first = computed(() => index.value === 0)\nconst last = computed(() => index.value === count.value - 1)\nconst drawnAt = computed(() => geometry.value?.placement ?? 'center')\nconst cutOut = computed(() => geometry.value?.hole ?? null)\nconst go = computed(() => (next: number): void => {\n uncontrolledStep.value = next\n emit('stepChange', next)\n})\nconst closed = computed(() => (open: boolean): void => {\n if (open) return\n const reason = ending.value ?? 'dismissed'\n ending.value = null\n emit('end', reason)\n})\nconst place = computed(() => (): void => {\n if (positioner.value == null || current.value === undefined) return\n const rect = tourTargetRect(tourTarget(current.value.target))\n const next = {\n ...tourPlacement(\n rect,\n { width: positioner.value.offsetWidth, height: positioner.value.offsetHeight },\n tourViewport(),\n current.value.side,\n ),\n hole: rect,\n }\n if (JSON.stringify(next) !== JSON.stringify(geometry.value)) geometry.value = next\n})\nconst follow = computed(() => (): (() => void) => {\n const again = (): void => place.value()\n window.addEventListener('resize', again)\n document.addEventListener('scroll', again, { capture: true, passive: true })\n return () => {\n window.removeEventListener('resize', again)\n document.removeEventListener('scroll', again, { capture: true })\n }\n})\nconst documentDirection = useDirection()\nconst service = useMachine(\n zag.machine,\n computed(() => ({\n id: uid,\n dir: documentDirection.value,\n open: props.open === undefined ? undefined : props.open && count.value > 0,\n defaultOpen: props.defaultOpen === true && count.value > 0,\n preventScroll: false,\n closeOnInteractOutside: false,\n initialFocusEl: () => panel.value,\n finalFocusEl: () => focusReturnTarget(returnTo.value, [panel.value]),\n onOpenChange: (details) => {\n closed.value(details.open)\n },\n })),\n)\nconst api = computed(() => zag.connect(service, normalizeProps))\nconst end = computed(() => (reason: 'finished' | 'dismissed'): void => {\n ending.value = reason\n api.value.setOpen(false)\n})\nconst show = computed(() => (): void => {\n if (!api.value.open || current.value === undefined) return\n revealTourTarget(tourTarget(current.value.target))\n place.value()\n requestAnimationFrame(() => place.value())\n})\nconst scrimPresent = usePresence(\n () => api.value.open && current.value !== undefined,\n scrim,\n 'dialog.scrim',\n)\nconst panelPresent = usePresence(\n () => api.value.open && current.value !== undefined,\n panel,\n 'popover.panel',\n {\n get side() {\n return drawnAt.value === 'center' ? undefined : drawnAt.value\n },\n align: 'center',\n },\n)\nconst effect1 = () => {\n api.value.open && (returnTo.value = focusPlace(document.activeElement))\n}\nonMounted(effect1)\nwatch(() => api.value.open, effect1, { flush: 'post' })\nconst effect2 = () => {\n show.value()\n}\nonMounted(effect2)\nwatch(() => [api.value.open, index.value], effect2, { flush: 'post' })\nlet release3: (() => void) | undefined\nconst effect3 = () => {\n release3?.()\n const run = () => {\n place.value()\n }\n const resize = typeof ResizeObserver === 'undefined' ? undefined : new ResizeObserver(run)\n for (const element of [positioner.value]) if (element) resize?.observe(element)\n release3 = () => {\n resize?.disconnect()\n }\n run()\n}\nonMounted(effect3)\nwatch(() => api.value.open, effect3, { flush: 'post' })\nonBeforeUnmount(() => release3?.())\nlet release4: (() => void) | undefined\nconst effect4 = () => {\n release4?.()\n const ran = follow.value()\n release4 = () => {\n ran()\n }\n}\nonMounted(effect4)\nwatch(() => api.value.open, effect4, { flush: 'post' })\nonBeforeUnmount(() => release4?.())\nconst effect5 = () => {\n api.value.open && panel.value?.focus()\n}\nwatch(() => index.value, effect5, { flush: 'post' })\nlet release6: (() => void) | undefined\nconst effect6 = () => {\n release6?.()\n const ran = agentMember({\n member: 'Tour',\n element: () => panel.value,\n state: () => ({\n open: api.value.open,\n step: index.value,\n steps: props.steps.map((each) => ({ id: each.id, title: each.title, body: each.body })),\n }),\n actions: {\n next: () =>\n (() => {\n if (!api.value.open) throw new Error('The tour is not open.')\n if (last.value) throw new Error('On the last step, an agent ends a tour with dismiss.')\n go.value(index.value + 1)\n })(),\n previous: () =>\n (() => {\n if (!api.value.open) throw new Error('The tour is not open.')\n if (first.value) throw new Error('This is the first step.')\n go.value(index.value - 1)\n })(),\n dismiss: () => api.value.open && end.value('dismissed'),\n },\n withholds: () => panel.value,\n })\n release6 = () => {\n ran()\n }\n}\nonMounted(effect6)\nonBeforeUnmount(() => release6?.())\n</script>\n\n<template>\n <Teleport to=\"body\">\n <!-- scrim -->\n <div\n v-if=\"scrimPresent\"\n ref=\"scrim\"\n v-bind=\"api.getBackdropProps()\"\n :class=\"[\n cutOut !== null ? styles.spotlight : undefined,\n cutOut === null ? styles.scrim : undefined,\n ]\"\n :style=\"{\n '--pm-tour-hole-x': cutOut === null ? undefined : `${cutOut.x}px`,\n '--pm-tour-hole-y': cutOut === null ? undefined : `${cutOut.y}px`,\n '--pm-tour-hole-width': cutOut === null ? undefined : `${cutOut.width}px`,\n '--pm-tour-hole-height': cutOut === null ? undefined : `${cutOut.height}px`,\n }\"\n :hidden=\"undefined\"\n aria-hidden=\"true\"\n data-tour-part=\"scrim\"\n />\n <div\n v-if=\"panelPresent\"\n ref=\"positioner\"\n v-bind=\"api.getPositionerProps()\"\n :class=\"styles.positioner\"\n :style=\"{ '--pm-tour-x': `${geometry?.x ?? 0}px`, '--pm-tour-y': `${geometry?.y ?? 0}px` }\"\n :data-placement=\"drawnAt\"\n >\n <!-- panel -->\n <div\n ref=\"panel\"\n v-bind=\"api.getContentProps()\"\n :class=\"styles.panel\"\n :hidden=\"undefined\"\n :data-step=\"current?.id\"\n data-member=\"tour\"\n >\n <!-- title -->\n <h2 v-bind=\"api.getTitleProps()\" :class=\"styles.title\">\n {{ current?.title }}\n </h2>\n <!-- description -->\n <div v-bind=\"api.getDescriptionProps()\" :class=\"styles.description\">\n <!-- body -->\n <p :class=\"styles.body\">\n {{ current?.body }}\n </p>\n <!-- position -->\n <p :class=\"styles.position\" data-tour-part=\"position\">\n {{ messages.position(index + 1, count) }}\n </p>\n </div>\n <!-- actions -->\n <div :class=\"styles.actions\" data-tour-part=\"actions\">\n <Button\n v-if=\"!first\"\n variant=\"outline\"\n tone=\"neutral\"\n size=\"sm\"\n :label=\"messages.previous\"\n @click=\"go(index - 1)\"\n />\n <Button\n size=\"sm\"\n :label=\"last ? messages.done : messages.next\"\n @click=\"last ? end('finished') : go(index + 1)\"\n />\n </div>\n <!-- close -->\n <div :class=\"styles.close\" data-tour-part=\"close\">\n <Button\n variant=\"ghost\"\n tone=\"neutral\"\n size=\"sm\"\n :iconOnly=\"true\"\n icon=\"close\"\n :label=\"messages.close\"\n @click=\"end('dismissed')\"\n />\n </div>\n </div>\n </div>\n </Teleport>\n</template>\n"],"mappings":""}