@pastweb/vue 2.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (734) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +1455 -0
  3. package/dist/EntryAdapter/EntryAdapter.cjs +6 -0
  4. package/dist/EntryAdapter/EntryAdapter.cjs.map +1 -0
  5. package/dist/EntryAdapter/EntryAdapter.js +7 -0
  6. package/dist/EntryAdapter/EntryAdapter.js.map +1 -0
  7. package/dist/EntryAdapter/EntryAdapter.vue.d.cts +36 -0
  8. package/dist/EntryAdapter/EntryAdapter.vue.d.ts +37 -0
  9. package/dist/EntryAdapter/EntryAdapter.vue_vue_type_script_lang.cjs +62 -0
  10. package/dist/EntryAdapter/EntryAdapter.vue_vue_type_script_lang.cjs.map +1 -0
  11. package/dist/EntryAdapter/EntryAdapter.vue_vue_type_script_lang.js +62 -0
  12. package/dist/EntryAdapter/EntryAdapter.vue_vue_type_script_lang.js.map +1 -0
  13. package/dist/EntryAdapter/constants.cjs +14 -0
  14. package/dist/EntryAdapter/constants.cjs.map +1 -0
  15. package/dist/EntryAdapter/constants.d.cts +14 -0
  16. package/dist/EntryAdapter/constants.d.ts +14 -0
  17. package/dist/EntryAdapter/constants.js +13 -0
  18. package/dist/EntryAdapter/constants.js.map +1 -0
  19. package/dist/EntryAdapter/index.cjs +3 -0
  20. package/dist/EntryAdapter/index.d.cts +2 -0
  21. package/dist/EntryAdapter/index.d.ts +2 -0
  22. package/dist/EntryAdapter/index.js +2 -0
  23. package/dist/EntryAdapter/types.cjs +0 -0
  24. package/dist/EntryAdapter/types.d.cts +44 -0
  25. package/dist/EntryAdapter/types.d.ts +44 -0
  26. package/dist/EntryAdapter/types.js +0 -0
  27. package/dist/EntryAdapter/utils.cjs +62 -0
  28. package/dist/EntryAdapter/utils.cjs.map +1 -0
  29. package/dist/EntryAdapter/utils.d.cts +36 -0
  30. package/dist/EntryAdapter/utils.d.ts +36 -0
  31. package/dist/EntryAdapter/utils.js +60 -0
  32. package/dist/EntryAdapter/utils.js.map +1 -0
  33. package/dist/Island/Island.cjs +6 -0
  34. package/dist/Island/Island.cjs.map +1 -0
  35. package/dist/Island/Island.js +7 -0
  36. package/dist/Island/Island.js.map +1 -0
  37. package/dist/Island/Island.vue.d.cts +22 -0
  38. package/dist/Island/Island.vue.d.ts +23 -0
  39. package/dist/Island/Island.vue_vue_type_script_setup_true_lang.cjs +145 -0
  40. package/dist/Island/Island.vue_vue_type_script_setup_true_lang.cjs.map +1 -0
  41. package/dist/Island/Island.vue_vue_type_script_setup_true_lang.js +144 -0
  42. package/dist/Island/Island.vue_vue_type_script_setup_true_lang.js.map +1 -0
  43. package/dist/Island/constants.cjs +12 -0
  44. package/dist/Island/constants.cjs.map +1 -0
  45. package/dist/Island/constants.d.cts +11 -0
  46. package/dist/Island/constants.d.ts +11 -0
  47. package/dist/Island/constants.js +10 -0
  48. package/dist/Island/constants.js.map +1 -0
  49. package/dist/Island/index.cjs +9 -0
  50. package/dist/Island/index.d.cts +5 -0
  51. package/dist/Island/index.d.ts +5 -0
  52. package/dist/Island/index.js +4 -0
  53. package/dist/Island/types.cjs +0 -0
  54. package/dist/Island/types.d.cts +18 -0
  55. package/dist/Island/types.d.ts +18 -0
  56. package/dist/Island/types.js +0 -0
  57. package/dist/Island/useIsland.cjs +23 -0
  58. package/dist/Island/useIsland.cjs.map +1 -0
  59. package/dist/Island/useIsland.d.cts +15 -0
  60. package/dist/Island/useIsland.d.ts +15 -0
  61. package/dist/Island/useIsland.js +21 -0
  62. package/dist/Island/useIsland.js.map +1 -0
  63. package/dist/Render/Render.cjs +6 -0
  64. package/dist/Render/Render.cjs.map +1 -0
  65. package/dist/Render/Render.js +7 -0
  66. package/dist/Render/Render.js.map +1 -0
  67. package/dist/Render/Render.vue.d.cts +10 -0
  68. package/dist/Render/Render.vue.d.ts +11 -0
  69. package/dist/Render/Render.vue_vue_type_script_lang.cjs +47 -0
  70. package/dist/Render/Render.vue_vue_type_script_lang.cjs.map +1 -0
  71. package/dist/Render/Render.vue_vue_type_script_lang.js +47 -0
  72. package/dist/Render/Render.vue_vue_type_script_lang.js.map +1 -0
  73. package/dist/Render/index.cjs +3 -0
  74. package/dist/Render/index.d.cts +3 -0
  75. package/dist/Render/index.d.ts +3 -0
  76. package/dist/Render/index.js +2 -0
  77. package/dist/Render/types.cjs +0 -0
  78. package/dist/Render/types.d.cts +21 -0
  79. package/dist/Render/types.d.ts +21 -0
  80. package/dist/Render/types.js +0 -0
  81. package/dist/Slot/Slot.cjs +89 -0
  82. package/dist/Slot/Slot.cjs.map +1 -0
  83. package/dist/Slot/Slot.d.cts +38 -0
  84. package/dist/Slot/Slot.d.ts +39 -0
  85. package/dist/Slot/Slot.js +89 -0
  86. package/dist/Slot/Slot.js.map +1 -0
  87. package/dist/Slot/index.cjs +3 -0
  88. package/dist/Slot/index.d.cts +3 -0
  89. package/dist/Slot/index.d.ts +3 -0
  90. package/dist/Slot/index.js +2 -0
  91. package/dist/Slot/types.cjs +0 -0
  92. package/dist/Slot/types.d.cts +17 -0
  93. package/dist/Slot/types.d.ts +17 -0
  94. package/dist/Slot/types.js +0 -0
  95. package/dist/_virtual/_rolldown/runtime.cjs +4 -0
  96. package/dist/api/hooks/index.cjs +20 -0
  97. package/dist/api/hooks/index.d.cts +12 -0
  98. package/dist/api/hooks/index.d.ts +12 -0
  99. package/dist/api/hooks/index.js +13 -0
  100. package/dist/api/hooks/reuseQuery/index.cjs +4 -0
  101. package/dist/api/hooks/reuseQuery/index.d.cts +2 -0
  102. package/dist/api/hooks/reuseQuery/index.d.ts +2 -0
  103. package/dist/api/hooks/reuseQuery/index.js +2 -0
  104. package/dist/api/hooks/reuseQuery/reuseQuery.cjs +44 -0
  105. package/dist/api/hooks/reuseQuery/reuseQuery.cjs.map +1 -0
  106. package/dist/api/hooks/reuseQuery/reuseQuery.d.cts +37 -0
  107. package/dist/api/hooks/reuseQuery/reuseQuery.d.ts +37 -0
  108. package/dist/api/hooks/reuseQuery/reuseQuery.js +42 -0
  109. package/dist/api/hooks/reuseQuery/reuseQuery.js.map +1 -0
  110. package/dist/api/hooks/useApiQueryCache/index.cjs +3 -0
  111. package/dist/api/hooks/useApiQueryCache/index.d.cts +2 -0
  112. package/dist/api/hooks/useApiQueryCache/index.d.ts +2 -0
  113. package/dist/api/hooks/useApiQueryCache/index.js +2 -0
  114. package/dist/api/hooks/useApiQueryCache/useApiQueryCache.cjs +31 -0
  115. package/dist/api/hooks/useApiQueryCache/useApiQueryCache.cjs.map +1 -0
  116. package/dist/api/hooks/useApiQueryCache/useApiQueryCache.d.cts +24 -0
  117. package/dist/api/hooks/useApiQueryCache/useApiQueryCache.d.ts +24 -0
  118. package/dist/api/hooks/useApiQueryCache/useApiQueryCache.js +30 -0
  119. package/dist/api/hooks/useApiQueryCache/useApiQueryCache.js.map +1 -0
  120. package/dist/api/hooks/useInfiniteQuery/index.cjs +3 -0
  121. package/dist/api/hooks/useInfiniteQuery/index.d.cts +3 -0
  122. package/dist/api/hooks/useInfiniteQuery/index.d.ts +3 -0
  123. package/dist/api/hooks/useInfiniteQuery/index.js +2 -0
  124. package/dist/api/hooks/useInfiniteQuery/useInfiniteQuery.cjs +34 -0
  125. package/dist/api/hooks/useInfiniteQuery/useInfiniteQuery.cjs.map +1 -0
  126. package/dist/api/hooks/useInfiniteQuery/useInfiniteQuery.d.cts +29 -0
  127. package/dist/api/hooks/useInfiniteQuery/useInfiniteQuery.d.ts +29 -0
  128. package/dist/api/hooks/useInfiniteQuery/useInfiniteQuery.js +33 -0
  129. package/dist/api/hooks/useInfiniteQuery/useInfiniteQuery.js.map +1 -0
  130. package/dist/api/hooks/useMutation/index.cjs +3 -0
  131. package/dist/api/hooks/useMutation/index.d.cts +3 -0
  132. package/dist/api/hooks/useMutation/index.d.ts +3 -0
  133. package/dist/api/hooks/useMutation/index.js +2 -0
  134. package/dist/api/hooks/useMutation/useMutation.cjs +30 -0
  135. package/dist/api/hooks/useMutation/useMutation.cjs.map +1 -0
  136. package/dist/api/hooks/useMutation/useMutation.d.cts +25 -0
  137. package/dist/api/hooks/useMutation/useMutation.d.ts +25 -0
  138. package/dist/api/hooks/useMutation/useMutation.js +29 -0
  139. package/dist/api/hooks/useMutation/useMutation.js.map +1 -0
  140. package/dist/api/hooks/useQueries/index.cjs +3 -0
  141. package/dist/api/hooks/useQueries/index.d.cts +3 -0
  142. package/dist/api/hooks/useQueries/index.d.ts +3 -0
  143. package/dist/api/hooks/useQueries/index.js +2 -0
  144. package/dist/api/hooks/useQueries/useQueries.cjs +32 -0
  145. package/dist/api/hooks/useQueries/useQueries.cjs.map +1 -0
  146. package/dist/api/hooks/useQueries/useQueries.d.cts +28 -0
  147. package/dist/api/hooks/useQueries/useQueries.d.ts +28 -0
  148. package/dist/api/hooks/useQueries/useQueries.js +31 -0
  149. package/dist/api/hooks/useQueries/useQueries.js.map +1 -0
  150. package/dist/api/hooks/useQuery/index.cjs +3 -0
  151. package/dist/api/hooks/useQuery/index.d.cts +3 -0
  152. package/dist/api/hooks/useQuery/index.d.ts +3 -0
  153. package/dist/api/hooks/useQuery/index.js +2 -0
  154. package/dist/api/hooks/useQuery/useQuery.cjs +30 -0
  155. package/dist/api/hooks/useQuery/useQuery.cjs.map +1 -0
  156. package/dist/api/hooks/useQuery/useQuery.d.cts +25 -0
  157. package/dist/api/hooks/useQuery/useQuery.d.ts +25 -0
  158. package/dist/api/hooks/useQuery/useQuery.js +29 -0
  159. package/dist/api/hooks/useQuery/useQuery.js.map +1 -0
  160. package/dist/api/hooks/utils/index.cjs +4 -0
  161. package/dist/api/hooks/utils/index.d.cts +2 -0
  162. package/dist/api/hooks/utils/index.d.ts +2 -0
  163. package/dist/api/hooks/utils/index.js +2 -0
  164. package/dist/api/hooks/utils/useReactiveRender.cjs +56 -0
  165. package/dist/api/hooks/utils/useReactiveRender.cjs.map +1 -0
  166. package/dist/api/hooks/utils/useReactiveRender.d.cts +29 -0
  167. package/dist/api/hooks/utils/useReactiveRender.d.ts +29 -0
  168. package/dist/api/hooks/utils/useReactiveRender.js +54 -0
  169. package/dist/api/hooks/utils/useReactiveRender.js.map +1 -0
  170. package/dist/api/index.cjs +18 -0
  171. package/dist/api/index.d.cts +15 -0
  172. package/dist/api/index.d.ts +15 -0
  173. package/dist/api/index.js +10 -0
  174. package/dist/api/installApiCache/index.cjs +3 -0
  175. package/dist/api/installApiCache/index.d.cts +3 -0
  176. package/dist/api/installApiCache/index.d.ts +3 -0
  177. package/dist/api/installApiCache/index.js +2 -0
  178. package/dist/api/installApiCache/installApiCache.cjs +35 -0
  179. package/dist/api/installApiCache/installApiCache.cjs.map +1 -0
  180. package/dist/api/installApiCache/installApiCache.d.cts +29 -0
  181. package/dist/api/installApiCache/installApiCache.d.ts +29 -0
  182. package/dist/api/installApiCache/installApiCache.js +34 -0
  183. package/dist/api/installApiCache/installApiCache.js.map +1 -0
  184. package/dist/api/installApiCache/types.cjs +0 -0
  185. package/dist/api/installApiCache/types.d.cts +21 -0
  186. package/dist/api/installApiCache/types.d.ts +21 -0
  187. package/dist/api/installApiCache/types.js +0 -0
  188. package/dist/api/types.cjs +0 -0
  189. package/dist/api/types.d.cts +2 -0
  190. package/dist/api/types.d.ts +2 -0
  191. package/dist/api/types.js +0 -0
  192. package/dist/computed/computed.cjs +28 -0
  193. package/dist/computed/computed.cjs.map +1 -0
  194. package/dist/computed/computed.d.cts +25 -0
  195. package/dist/computed/computed.d.ts +25 -0
  196. package/dist/computed/computed.js +27 -0
  197. package/dist/computed/computed.js.map +1 -0
  198. package/dist/computed/index.cjs +3 -0
  199. package/dist/computed/index.d.cts +2 -0
  200. package/dist/computed/index.d.ts +2 -0
  201. package/dist/computed/index.js +2 -0
  202. package/dist/createEntry/UpdateEntry/UpdateEntry.cjs +6 -0
  203. package/dist/createEntry/UpdateEntry/UpdateEntry.cjs.map +1 -0
  204. package/dist/createEntry/UpdateEntry/UpdateEntry.js +7 -0
  205. package/dist/createEntry/UpdateEntry/UpdateEntry.js.map +1 -0
  206. package/dist/createEntry/UpdateEntry/UpdateEntry.vue.d.cts +6 -0
  207. package/dist/createEntry/UpdateEntry/UpdateEntry.vue.d.ts +7 -0
  208. package/dist/createEntry/UpdateEntry/UpdateEntry.vue_vue_type_script_setup_true_lang.cjs +35 -0
  209. package/dist/createEntry/UpdateEntry/UpdateEntry.vue_vue_type_script_setup_true_lang.cjs.map +1 -0
  210. package/dist/createEntry/UpdateEntry/UpdateEntry.vue_vue_type_script_setup_true_lang.js +35 -0
  211. package/dist/createEntry/UpdateEntry/UpdateEntry.vue_vue_type_script_setup_true_lang.js.map +1 -0
  212. package/dist/createEntry/UpdateEntry/Vnode.cjs +19 -0
  213. package/dist/createEntry/UpdateEntry/Vnode.cjs.map +1 -0
  214. package/dist/createEntry/UpdateEntry/Vnode.d.cts +20 -0
  215. package/dist/createEntry/UpdateEntry/Vnode.d.ts +20 -0
  216. package/dist/createEntry/UpdateEntry/Vnode.js +18 -0
  217. package/dist/createEntry/UpdateEntry/Vnode.js.map +1 -0
  218. package/dist/createEntry/UpdateEntry/index.cjs +3 -0
  219. package/dist/createEntry/UpdateEntry/index.d.cts +3 -0
  220. package/dist/createEntry/UpdateEntry/index.d.ts +3 -0
  221. package/dist/createEntry/UpdateEntry/index.js +2 -0
  222. package/dist/createEntry/UpdateEntry/types.cjs +0 -0
  223. package/dist/createEntry/UpdateEntry/types.d.cts +18 -0
  224. package/dist/createEntry/UpdateEntry/types.d.ts +18 -0
  225. package/dist/createEntry/UpdateEntry/types.js +0 -0
  226. package/dist/createEntry/WaitFor/WaitFor.cjs +6 -0
  227. package/dist/createEntry/WaitFor/WaitFor.cjs.map +1 -0
  228. package/dist/createEntry/WaitFor/WaitFor.js +7 -0
  229. package/dist/createEntry/WaitFor/WaitFor.js.map +1 -0
  230. package/dist/createEntry/WaitFor/WaitFor.vue.d.cts +6 -0
  231. package/dist/createEntry/WaitFor/WaitFor.vue.d.ts +7 -0
  232. package/dist/createEntry/WaitFor/WaitFor.vue_vue_type_script_setup_true_lang.cjs +50 -0
  233. package/dist/createEntry/WaitFor/WaitFor.vue_vue_type_script_setup_true_lang.cjs.map +1 -0
  234. package/dist/createEntry/WaitFor/WaitFor.vue_vue_type_script_setup_true_lang.js +50 -0
  235. package/dist/createEntry/WaitFor/WaitFor.vue_vue_type_script_setup_true_lang.js.map +1 -0
  236. package/dist/createEntry/WaitFor/index.cjs +3 -0
  237. package/dist/createEntry/WaitFor/index.d.cts +3 -0
  238. package/dist/createEntry/WaitFor/index.d.ts +3 -0
  239. package/dist/createEntry/WaitFor/index.js +2 -0
  240. package/dist/createEntry/WaitFor/types.cjs +0 -0
  241. package/dist/createEntry/WaitFor/types.d.cts +21 -0
  242. package/dist/createEntry/WaitFor/types.d.ts +21 -0
  243. package/dist/createEntry/WaitFor/types.js +0 -0
  244. package/dist/createEntry/createEntry.cjs +32 -0
  245. package/dist/createEntry/createEntry.cjs.map +1 -0
  246. package/dist/createEntry/createEntry.d.cts +17 -0
  247. package/dist/createEntry/createEntry.d.ts +17 -0
  248. package/dist/createEntry/createEntry.js +31 -0
  249. package/dist/createEntry/createEntry.js.map +1 -0
  250. package/dist/createEntry/createServerEntry.cjs +45 -0
  251. package/dist/createEntry/createServerEntry.cjs.map +1 -0
  252. package/dist/createEntry/createServerEntry.d.cts +17 -0
  253. package/dist/createEntry/createServerEntry.d.ts +17 -0
  254. package/dist/createEntry/createServerEntry.js +43 -0
  255. package/dist/createEntry/createServerEntry.js.map +1 -0
  256. package/dist/createEntry/index.cjs +5 -0
  257. package/dist/createEntry/index.d.cts +5 -0
  258. package/dist/createEntry/index.d.ts +5 -0
  259. package/dist/createEntry/index.js +3 -0
  260. package/dist/createEntry/types.cjs +0 -0
  261. package/dist/createEntry/types.d.cts +75 -0
  262. package/dist/createEntry/types.d.ts +75 -0
  263. package/dist/createEntry/types.js +0 -0
  264. package/dist/createEntry/utils/createServerVueApp/createServerVueApp.cjs +28 -0
  265. package/dist/createEntry/utils/createServerVueApp/createServerVueApp.cjs.map +1 -0
  266. package/dist/createEntry/utils/createServerVueApp/createServerVueApp.d.cts +27 -0
  267. package/dist/createEntry/utils/createServerVueApp/createServerVueApp.d.ts +27 -0
  268. package/dist/createEntry/utils/createServerVueApp/createServerVueApp.js +27 -0
  269. package/dist/createEntry/utils/createServerVueApp/createServerVueApp.js.map +1 -0
  270. package/dist/createEntry/utils/createServerVueApp/index.cjs +3 -0
  271. package/dist/createEntry/utils/createServerVueApp/index.d.cts +2 -0
  272. package/dist/createEntry/utils/createServerVueApp/index.d.ts +2 -0
  273. package/dist/createEntry/utils/createServerVueApp/index.js +2 -0
  274. package/dist/createEntry/utils/createServerVueApp/types.cjs +0 -0
  275. package/dist/createEntry/utils/createServerVueApp/types.d.cts +7 -0
  276. package/dist/createEntry/utils/createServerVueApp/types.d.ts +7 -0
  277. package/dist/createEntry/utils/createServerVueApp/types.js +0 -0
  278. package/dist/createEntry/utils/createVueApp/createVueApp.cjs +43 -0
  279. package/dist/createEntry/utils/createVueApp/createVueApp.cjs.map +1 -0
  280. package/dist/createEntry/utils/createVueApp/createVueApp.d.cts +22 -0
  281. package/dist/createEntry/utils/createVueApp/createVueApp.d.ts +22 -0
  282. package/dist/createEntry/utils/createVueApp/createVueApp.js +42 -0
  283. package/dist/createEntry/utils/createVueApp/createVueApp.js.map +1 -0
  284. package/dist/createEntry/utils/createVueApp/index.cjs +3 -0
  285. package/dist/createEntry/utils/createVueApp/index.d.cts +2 -0
  286. package/dist/createEntry/utils/createVueApp/index.d.ts +2 -0
  287. package/dist/createEntry/utils/createVueApp/index.js +2 -0
  288. package/dist/createEntry/utils/index.cjs +10 -0
  289. package/dist/createEntry/utils/index.d.cts +5 -0
  290. package/dist/createEntry/utils/index.d.ts +5 -0
  291. package/dist/createEntry/utils/index.js +6 -0
  292. package/dist/createEntry/utils/normalizeVueOptions/index.cjs +3 -0
  293. package/dist/createEntry/utils/normalizeVueOptions/index.d.cts +2 -0
  294. package/dist/createEntry/utils/normalizeVueOptions/index.d.ts +2 -0
  295. package/dist/createEntry/utils/normalizeVueOptions/index.js +2 -0
  296. package/dist/createEntry/utils/normalizeVueOptions/normalizeVueOptions.cjs +28 -0
  297. package/dist/createEntry/utils/normalizeVueOptions/normalizeVueOptions.cjs.map +1 -0
  298. package/dist/createEntry/utils/normalizeVueOptions/normalizeVueOptions.d.cts +17 -0
  299. package/dist/createEntry/utils/normalizeVueOptions/normalizeVueOptions.d.ts +17 -0
  300. package/dist/createEntry/utils/normalizeVueOptions/normalizeVueOptions.js +27 -0
  301. package/dist/createEntry/utils/normalizeVueOptions/normalizeVueOptions.js.map +1 -0
  302. package/dist/createEntry/utils/setupVueEntry/index.cjs +3 -0
  303. package/dist/createEntry/utils/setupVueEntry/index.d.cts +2 -0
  304. package/dist/createEntry/utils/setupVueEntry/index.d.ts +2 -0
  305. package/dist/createEntry/utils/setupVueEntry/index.js +2 -0
  306. package/dist/createEntry/utils/setupVueEntry/setupVueEntry.cjs +31 -0
  307. package/dist/createEntry/utils/setupVueEntry/setupVueEntry.cjs.map +1 -0
  308. package/dist/createEntry/utils/setupVueEntry/setupVueEntry.d.cts +17 -0
  309. package/dist/createEntry/utils/setupVueEntry/setupVueEntry.d.ts +17 -0
  310. package/dist/createEntry/utils/setupVueEntry/setupVueEntry.js +30 -0
  311. package/dist/createEntry/utils/setupVueEntry/setupVueEntry.js.map +1 -0
  312. package/dist/createPiniaAsyncStore/createPiniaAsyncStore.cjs +49 -0
  313. package/dist/createPiniaAsyncStore/createPiniaAsyncStore.cjs.map +1 -0
  314. package/dist/createPiniaAsyncStore/createPiniaAsyncStore.d.cts +33 -0
  315. package/dist/createPiniaAsyncStore/createPiniaAsyncStore.d.ts +33 -0
  316. package/dist/createPiniaAsyncStore/createPiniaAsyncStore.js +48 -0
  317. package/dist/createPiniaAsyncStore/createPiniaAsyncStore.js.map +1 -0
  318. package/dist/createPiniaAsyncStore/index.cjs +3 -0
  319. package/dist/createPiniaAsyncStore/index.d.cts +3 -0
  320. package/dist/createPiniaAsyncStore/index.d.ts +3 -0
  321. package/dist/createPiniaAsyncStore/index.js +2 -0
  322. package/dist/createPiniaAsyncStore/types.cjs +0 -0
  323. package/dist/createPiniaAsyncStore/types.d.cts +22 -0
  324. package/dist/createPiniaAsyncStore/types.d.ts +22 -0
  325. package/dist/createPiniaAsyncStore/types.js +0 -0
  326. package/dist/getContext/getContext.cjs +29 -0
  327. package/dist/getContext/getContext.cjs.map +1 -0
  328. package/dist/getContext/getContext.d.cts +24 -0
  329. package/dist/getContext/getContext.d.ts +24 -0
  330. package/dist/getContext/getContext.js +28 -0
  331. package/dist/getContext/getContext.js.map +1 -0
  332. package/dist/getContext/index.cjs +3 -0
  333. package/dist/getContext/index.d.cts +2 -0
  334. package/dist/getContext/index.d.ts +2 -0
  335. package/dist/getContext/index.js +2 -0
  336. package/dist/getEventHandlers/getEventHandlers.cjs +65 -0
  337. package/dist/getEventHandlers/getEventHandlers.cjs.map +1 -0
  338. package/dist/getEventHandlers/getEventHandlers.d.cts +45 -0
  339. package/dist/getEventHandlers/getEventHandlers.d.ts +45 -0
  340. package/dist/getEventHandlers/getEventHandlers.js +64 -0
  341. package/dist/getEventHandlers/getEventHandlers.js.map +1 -0
  342. package/dist/getEventHandlers/index.cjs +3 -0
  343. package/dist/getEventHandlers/index.d.cts +3 -0
  344. package/dist/getEventHandlers/index.d.ts +3 -0
  345. package/dist/getEventHandlers/index.js +2 -0
  346. package/dist/getEventHandlers/types.cjs +0 -0
  347. package/dist/getEventHandlers/types.d.cts +7 -0
  348. package/dist/getEventHandlers/types.d.ts +7 -0
  349. package/dist/getEventHandlers/types.js +0 -0
  350. package/dist/index.cjs +104 -0
  351. package/dist/index.d.cts +61 -0
  352. package/dist/index.d.ts +61 -0
  353. package/dist/index.js +62 -0
  354. package/dist/node_modules/@babel/parser/lib/index.cjs +12599 -0
  355. package/dist/node_modules/@babel/parser/lib/index.cjs.map +1 -0
  356. package/dist/node_modules/@vue/compiler-core/dist/compiler-core.cjs.cjs +4832 -0
  357. package/dist/node_modules/@vue/compiler-core/dist/compiler-core.cjs.cjs.map +1 -0
  358. package/dist/node_modules/@vue/compiler-core/dist/compiler-core.cjs.prod.cjs +4775 -0
  359. package/dist/node_modules/@vue/compiler-core/dist/compiler-core.cjs.prod.cjs.map +1 -0
  360. package/dist/node_modules/@vue/compiler-core/index.cjs +18 -0
  361. package/dist/node_modules/@vue/compiler-core/index.cjs.map +1 -0
  362. package/dist/node_modules/@vue/compiler-dom/dist/compiler-dom.cjs.cjs +665 -0
  363. package/dist/node_modules/@vue/compiler-dom/dist/compiler-dom.cjs.cjs.map +1 -0
  364. package/dist/node_modules/@vue/compiler-dom/dist/compiler-dom.cjs.prod.cjs +447 -0
  365. package/dist/node_modules/@vue/compiler-dom/dist/compiler-dom.cjs.prod.cjs.map +1 -0
  366. package/dist/node_modules/@vue/compiler-dom/index.cjs +18 -0
  367. package/dist/node_modules/@vue/compiler-dom/index.cjs.map +1 -0
  368. package/dist/node_modules/@vue/compiler-ssr/dist/compiler-ssr.cjs.cjs +848 -0
  369. package/dist/node_modules/@vue/compiler-ssr/dist/compiler-ssr.cjs.cjs.map +1 -0
  370. package/dist/node_modules/@vue/server-renderer/dist/server-renderer.cjs.cjs +830 -0
  371. package/dist/node_modules/@vue/server-renderer/dist/server-renderer.cjs.cjs.map +1 -0
  372. package/dist/node_modules/@vue/server-renderer/dist/server-renderer.cjs.prod.cjs +605 -0
  373. package/dist/node_modules/@vue/server-renderer/dist/server-renderer.cjs.prod.cjs.map +1 -0
  374. package/dist/node_modules/@vue/server-renderer/dist/server-renderer.esm-bundler.js +532 -0
  375. package/dist/node_modules/@vue/server-renderer/dist/server-renderer.esm-bundler.js.map +1 -0
  376. package/dist/node_modules/@vue/server-renderer/index.cjs +18 -0
  377. package/dist/node_modules/@vue/server-renderer/index.cjs.map +1 -0
  378. package/dist/node_modules/@vue/shared/dist/shared.cjs.cjs +496 -0
  379. package/dist/node_modules/@vue/shared/dist/shared.cjs.cjs.map +1 -0
  380. package/dist/node_modules/@vue/shared/dist/shared.cjs.prod.cjs +495 -0
  381. package/dist/node_modules/@vue/shared/dist/shared.cjs.prod.cjs.map +1 -0
  382. package/dist/node_modules/@vue/shared/dist/shared.esm-bundler.js +166 -0
  383. package/dist/node_modules/@vue/shared/dist/shared.esm-bundler.js.map +1 -0
  384. package/dist/node_modules/@vue/shared/index.cjs +18 -0
  385. package/dist/node_modules/@vue/shared/index.cjs.map +1 -0
  386. package/dist/node_modules/entities/dist/commonjs/decode-codepoint.cjs +81 -0
  387. package/dist/node_modules/entities/dist/commonjs/decode-codepoint.cjs.map +1 -0
  388. package/dist/node_modules/entities/dist/commonjs/decode.cjs +474 -0
  389. package/dist/node_modules/entities/dist/commonjs/decode.cjs.map +1 -0
  390. package/dist/node_modules/entities/dist/commonjs/generated/decode-data-html.cjs +18 -0
  391. package/dist/node_modules/entities/dist/commonjs/generated/decode-data-html.cjs.map +1 -0
  392. package/dist/node_modules/entities/dist/commonjs/generated/decode-data-xml.cjs +18 -0
  393. package/dist/node_modules/entities/dist/commonjs/generated/decode-data-xml.cjs.map +1 -0
  394. package/dist/node_modules/entities/dist/commonjs/internal/bin-trie-flags.cjs +32 -0
  395. package/dist/node_modules/entities/dist/commonjs/internal/bin-trie-flags.cjs.map +1 -0
  396. package/dist/node_modules/entities/dist/commonjs/internal/decode-shared.cjs +26 -0
  397. package/dist/node_modules/entities/dist/commonjs/internal/decode-shared.cjs.map +1 -0
  398. package/dist/node_modules/estree-walker/dist/umd/estree-walker.cjs +254 -0
  399. package/dist/node_modules/estree-walker/dist/umd/estree-walker.cjs.map +1 -0
  400. package/dist/node_modules/source-map-js/lib/array-set.cjs +102 -0
  401. package/dist/node_modules/source-map-js/lib/array-set.cjs.map +1 -0
  402. package/dist/node_modules/source-map-js/lib/base64-vlq.cjs +75 -0
  403. package/dist/node_modules/source-map-js/lib/base64-vlq.cjs.map +1 -0
  404. package/dist/node_modules/source-map-js/lib/base64.cjs +42 -0
  405. package/dist/node_modules/source-map-js/lib/base64.cjs.map +1 -0
  406. package/dist/node_modules/source-map-js/lib/binary-search.cjs +69 -0
  407. package/dist/node_modules/source-map-js/lib/binary-search.cjs.map +1 -0
  408. package/dist/node_modules/source-map-js/lib/mapping-list.cjs +79 -0
  409. package/dist/node_modules/source-map-js/lib/mapping-list.cjs.map +1 -0
  410. package/dist/node_modules/source-map-js/lib/quick-sort.cjs +90 -0
  411. package/dist/node_modules/source-map-js/lib/quick-sort.cjs.map +1 -0
  412. package/dist/node_modules/source-map-js/lib/source-map-consumer.cjs +790 -0
  413. package/dist/node_modules/source-map-js/lib/source-map-consumer.cjs.map +1 -0
  414. package/dist/node_modules/source-map-js/lib/source-map-generator.cjs +297 -0
  415. package/dist/node_modules/source-map-js/lib/source-map-generator.cjs.map +1 -0
  416. package/dist/node_modules/source-map-js/lib/source-node.cjs +295 -0
  417. package/dist/node_modules/source-map-js/lib/source-node.cjs.map +1 -0
  418. package/dist/node_modules/source-map-js/lib/util.cjs +353 -0
  419. package/dist/node_modules/source-map-js/lib/util.cjs.map +1 -0
  420. package/dist/node_modules/source-map-js/source-map.cjs +19 -0
  421. package/dist/node_modules/source-map-js/source-map.cjs.map +1 -0
  422. package/dist/portals/Portal/Portal.cjs +6 -0
  423. package/dist/portals/Portal/Portal.cjs.map +1 -0
  424. package/dist/portals/Portal/Portal.js +7 -0
  425. package/dist/portals/Portal/Portal.js.map +1 -0
  426. package/dist/portals/Portal/Portal.vue.d.cts +6 -0
  427. package/dist/portals/Portal/Portal.vue.d.ts +7 -0
  428. package/dist/portals/Portal/Portal.vue_vue_type_script_setup_true_lang.cjs +56 -0
  429. package/dist/portals/Portal/Portal.vue_vue_type_script_setup_true_lang.cjs.map +1 -0
  430. package/dist/portals/Portal/Portal.vue_vue_type_script_setup_true_lang.js +56 -0
  431. package/dist/portals/Portal/Portal.vue_vue_type_script_setup_true_lang.js.map +1 -0
  432. package/dist/portals/Portal/index.cjs +3 -0
  433. package/dist/portals/Portal/index.d.cts +3 -0
  434. package/dist/portals/Portal/index.d.ts +3 -0
  435. package/dist/portals/Portal/index.js +2 -0
  436. package/dist/portals/Portal/types.cjs +0 -0
  437. package/dist/portals/Portal/types.d.cts +19 -0
  438. package/dist/portals/Portal/types.d.ts +19 -0
  439. package/dist/portals/Portal/types.js +0 -0
  440. package/dist/portals/index.cjs +13 -0
  441. package/dist/portals/index.d.cts +8 -0
  442. package/dist/portals/index.d.ts +8 -0
  443. package/dist/portals/index.js +8 -0
  444. package/dist/portals/installPortals/index.cjs +3 -0
  445. package/dist/portals/installPortals/index.d.cts +3 -0
  446. package/dist/portals/installPortals/index.d.ts +3 -0
  447. package/dist/portals/installPortals/index.js +2 -0
  448. package/dist/portals/installPortals/installPortals.cjs +25 -0
  449. package/dist/portals/installPortals/installPortals.cjs.map +1 -0
  450. package/dist/portals/installPortals/installPortals.d.cts +25 -0
  451. package/dist/portals/installPortals/installPortals.d.ts +25 -0
  452. package/dist/portals/installPortals/installPortals.js +24 -0
  453. package/dist/portals/installPortals/installPortals.js.map +1 -0
  454. package/dist/portals/installPortals/types.cjs +0 -0
  455. package/dist/portals/installPortals/types.d.cts +23 -0
  456. package/dist/portals/installPortals/types.d.ts +23 -0
  457. package/dist/portals/installPortals/types.js +0 -0
  458. package/dist/portals/types.cjs +0 -0
  459. package/dist/portals/types.d.cts +40 -0
  460. package/dist/portals/types.d.ts +40 -0
  461. package/dist/portals/types.js +0 -0
  462. package/dist/portals/usePortal.cjs +44 -0
  463. package/dist/portals/usePortal.cjs.map +1 -0
  464. package/dist/portals/usePortal.d.cts +17 -0
  465. package/dist/portals/usePortal.d.ts +17 -0
  466. package/dist/portals/usePortal.js +43 -0
  467. package/dist/portals/usePortal.js.map +1 -0
  468. package/dist/portals/usePortalAnchors.cjs +21 -0
  469. package/dist/portals/usePortalAnchors.cjs.map +1 -0
  470. package/dist/portals/usePortalAnchors.d.cts +14 -0
  471. package/dist/portals/usePortalAnchors.d.ts +14 -0
  472. package/dist/portals/usePortalAnchors.js +20 -0
  473. package/dist/portals/usePortalAnchors.js.map +1 -0
  474. package/dist/portals/usePortals.cjs +21 -0
  475. package/dist/portals/usePortals.cjs.map +1 -0
  476. package/dist/portals/usePortals.d.cts +14 -0
  477. package/dist/portals/usePortals.d.ts +14 -0
  478. package/dist/portals/usePortals.js +20 -0
  479. package/dist/portals/usePortals.js.map +1 -0
  480. package/dist/router/RouterLink/RouterLink.cjs +6 -0
  481. package/dist/router/RouterLink/RouterLink.cjs.map +1 -0
  482. package/dist/router/RouterLink/RouterLink.js +7 -0
  483. package/dist/router/RouterLink/RouterLink.js.map +1 -0
  484. package/dist/router/RouterLink/RouterLink.vue.d.cts +18 -0
  485. package/dist/router/RouterLink/RouterLink.vue.d.ts +19 -0
  486. package/dist/router/RouterLink/RouterLink.vue_vue_type_script_setup_true_lang.cjs +59 -0
  487. package/dist/router/RouterLink/RouterLink.vue_vue_type_script_setup_true_lang.cjs.map +1 -0
  488. package/dist/router/RouterLink/RouterLink.vue_vue_type_script_setup_true_lang.js +59 -0
  489. package/dist/router/RouterLink/RouterLink.vue_vue_type_script_setup_true_lang.js.map +1 -0
  490. package/dist/router/RouterLink/index.cjs +3 -0
  491. package/dist/router/RouterLink/index.d.cts +3 -0
  492. package/dist/router/RouterLink/index.d.ts +3 -0
  493. package/dist/router/RouterLink/index.js +2 -0
  494. package/dist/router/RouterLink/types.cjs +0 -0
  495. package/dist/router/RouterLink/types.d.cts +11 -0
  496. package/dist/router/RouterLink/types.d.ts +11 -0
  497. package/dist/router/RouterLink/types.js +0 -0
  498. package/dist/router/RouterView/RouterView.cjs +6 -0
  499. package/dist/router/RouterView/RouterView.cjs.map +1 -0
  500. package/dist/router/RouterView/RouterView.js +7 -0
  501. package/dist/router/RouterView/RouterView.js.map +1 -0
  502. package/dist/router/RouterView/RouterView.vue.d.cts +6 -0
  503. package/dist/router/RouterView/RouterView.vue.d.ts +7 -0
  504. package/dist/router/RouterView/RouterView.vue_vue_type_script_setup_true_lang.cjs +58 -0
  505. package/dist/router/RouterView/RouterView.vue_vue_type_script_setup_true_lang.cjs.map +1 -0
  506. package/dist/router/RouterView/RouterView.vue_vue_type_script_setup_true_lang.js +58 -0
  507. package/dist/router/RouterView/RouterView.vue_vue_type_script_setup_true_lang.js.map +1 -0
  508. package/dist/router/RouterView/index.cjs +3 -0
  509. package/dist/router/RouterView/index.d.cts +2 -0
  510. package/dist/router/RouterView/index.d.ts +2 -0
  511. package/dist/router/RouterView/index.js +2 -0
  512. package/dist/router/RouterView/types.cjs +0 -0
  513. package/dist/router/RouterView/types.d.cts +15 -0
  514. package/dist/router/RouterView/types.d.ts +15 -0
  515. package/dist/router/RouterView/types.js +0 -0
  516. package/dist/router/index.cjs +28 -0
  517. package/dist/router/index.d.cts +12 -0
  518. package/dist/router/index.d.ts +12 -0
  519. package/dist/router/index.js +18 -0
  520. package/dist/router/installRouter.cjs +34 -0
  521. package/dist/router/installRouter.cjs.map +1 -0
  522. package/dist/router/installRouter.d.cts +14 -0
  523. package/dist/router/installRouter.d.ts +14 -0
  524. package/dist/router/installRouter.js +33 -0
  525. package/dist/router/installRouter.js.map +1 -0
  526. package/dist/router/types.cjs +1 -0
  527. package/dist/router/types.d.cts +21 -0
  528. package/dist/router/types.d.ts +21 -0
  529. package/dist/router/types.js +1 -0
  530. package/dist/router/useLocation/index.cjs +3 -0
  531. package/dist/router/useLocation/index.d.cts +2 -0
  532. package/dist/router/useLocation/index.d.ts +2 -0
  533. package/dist/router/useLocation/index.js +2 -0
  534. package/dist/router/useLocation/useLocation.cjs +24 -0
  535. package/dist/router/useLocation/useLocation.cjs.map +1 -0
  536. package/dist/router/useLocation/useLocation.d.cts +12 -0
  537. package/dist/router/useLocation/useLocation.d.ts +12 -0
  538. package/dist/router/useLocation/useLocation.js +23 -0
  539. package/dist/router/useLocation/useLocation.js.map +1 -0
  540. package/dist/router/useNavigate/index.cjs +3 -0
  541. package/dist/router/useNavigate/index.d.cts +2 -0
  542. package/dist/router/useNavigate/index.d.ts +2 -0
  543. package/dist/router/useNavigate/index.js +2 -0
  544. package/dist/router/useNavigate/useNavigate.cjs +17 -0
  545. package/dist/router/useNavigate/useNavigate.cjs.map +1 -0
  546. package/dist/router/useNavigate/useNavigate.d.cts +12 -0
  547. package/dist/router/useNavigate/useNavigate.d.ts +12 -0
  548. package/dist/router/useNavigate/useNavigate.js +16 -0
  549. package/dist/router/useNavigate/useNavigate.js.map +1 -0
  550. package/dist/router/usePaths/index.cjs +3 -0
  551. package/dist/router/usePaths/index.d.cts +2 -0
  552. package/dist/router/usePaths/index.d.ts +2 -0
  553. package/dist/router/usePaths/index.js +2 -0
  554. package/dist/router/usePaths/usePaths.cjs +27 -0
  555. package/dist/router/usePaths/usePaths.cjs.map +1 -0
  556. package/dist/router/usePaths/usePaths.d.cts +14 -0
  557. package/dist/router/usePaths/usePaths.d.ts +14 -0
  558. package/dist/router/usePaths/usePaths.js +26 -0
  559. package/dist/router/usePaths/usePaths.js.map +1 -0
  560. package/dist/router/useRoute/index.cjs +3 -0
  561. package/dist/router/useRoute/index.d.cts +2 -0
  562. package/dist/router/useRoute/index.d.ts +2 -0
  563. package/dist/router/useRoute/index.js +2 -0
  564. package/dist/router/useRoute/useRoute.cjs +28 -0
  565. package/dist/router/useRoute/useRoute.cjs.map +1 -0
  566. package/dist/router/useRoute/useRoute.d.cts +12 -0
  567. package/dist/router/useRoute/useRoute.d.ts +12 -0
  568. package/dist/router/useRoute/useRoute.js +27 -0
  569. package/dist/router/useRoute/useRoute.js.map +1 -0
  570. package/dist/router/useRouter/index.cjs +3 -0
  571. package/dist/router/useRouter/index.d.cts +2 -0
  572. package/dist/router/useRouter/index.d.ts +2 -0
  573. package/dist/router/useRouter/index.js +2 -0
  574. package/dist/router/useRouter/useRouter.cjs +17 -0
  575. package/dist/router/useRouter/useRouter.cjs.map +1 -0
  576. package/dist/router/useRouter/useRouter.d.cts +12 -0
  577. package/dist/router/useRouter/useRouter.d.ts +12 -0
  578. package/dist/router/useRouter/useRouter.js +16 -0
  579. package/dist/router/useRouter/useRouter.js.map +1 -0
  580. package/dist/router/useRouterLink/index.cjs +3 -0
  581. package/dist/router/useRouterLink/index.d.cts +3 -0
  582. package/dist/router/useRouterLink/index.d.ts +3 -0
  583. package/dist/router/useRouterLink/index.js +2 -0
  584. package/dist/router/useRouterLink/types.cjs +0 -0
  585. package/dist/router/useRouterLink/types.d.cts +2 -0
  586. package/dist/router/useRouterLink/types.d.ts +2 -0
  587. package/dist/router/useRouterLink/types.js +0 -0
  588. package/dist/router/useRouterLink/useRouterLink.cjs +37 -0
  589. package/dist/router/useRouterLink/useRouterLink.cjs.map +1 -0
  590. package/dist/router/useRouterLink/useRouterLink.d.cts +13 -0
  591. package/dist/router/useRouterLink/useRouterLink.d.ts +13 -0
  592. package/dist/router/useRouterLink/useRouterLink.js +36 -0
  593. package/dist/router/useRouterLink/useRouterLink.js.map +1 -0
  594. package/dist/router/useSearchParams/index.cjs +3 -0
  595. package/dist/router/useSearchParams/index.d.cts +2 -0
  596. package/dist/router/useSearchParams/index.d.ts +2 -0
  597. package/dist/router/useSearchParams/index.js +2 -0
  598. package/dist/router/useSearchParams/useSearchParams.cjs +29 -0
  599. package/dist/router/useSearchParams/useSearchParams.cjs.map +1 -0
  600. package/dist/router/useSearchParams/useSearchParams.d.cts +14 -0
  601. package/dist/router/useSearchParams/useSearchParams.d.ts +14 -0
  602. package/dist/router/useSearchParams/useSearchParams.js +28 -0
  603. package/dist/router/useSearchParams/useSearchParams.js.map +1 -0
  604. package/dist/setContext/index.cjs +3 -0
  605. package/dist/setContext/index.d.cts +2 -0
  606. package/dist/setContext/index.d.ts +2 -0
  607. package/dist/setContext/index.js +2 -0
  608. package/dist/setContext/setContext.cjs +29 -0
  609. package/dist/setContext/setContext.cjs.map +1 -0
  610. package/dist/setContext/setContext.d.cts +24 -0
  611. package/dist/setContext/setContext.d.ts +24 -0
  612. package/dist/setContext/setContext.js +28 -0
  613. package/dist/setContext/setContext.js.map +1 -0
  614. package/dist/useBeforeMount/index.cjs +3 -0
  615. package/dist/useBeforeMount/index.d.cts +2 -0
  616. package/dist/useBeforeMount/index.d.ts +2 -0
  617. package/dist/useBeforeMount/index.js +2 -0
  618. package/dist/useBeforeMount/useBeforeMount.cjs +29 -0
  619. package/dist/useBeforeMount/useBeforeMount.cjs.map +1 -0
  620. package/dist/useBeforeMount/useBeforeMount.d.cts +24 -0
  621. package/dist/useBeforeMount/useBeforeMount.d.ts +24 -0
  622. package/dist/useBeforeMount/useBeforeMount.js +28 -0
  623. package/dist/useBeforeMount/useBeforeMount.js.map +1 -0
  624. package/dist/useBeforeUnmount/index.cjs +3 -0
  625. package/dist/useBeforeUnmount/index.d.cts +2 -0
  626. package/dist/useBeforeUnmount/index.d.ts +2 -0
  627. package/dist/useBeforeUnmount/index.js +2 -0
  628. package/dist/useBeforeUnmount/useBeforeUnmount.cjs +29 -0
  629. package/dist/useBeforeUnmount/useBeforeUnmount.cjs.map +1 -0
  630. package/dist/useBeforeUnmount/useBeforeUnmount.d.cts +24 -0
  631. package/dist/useBeforeUnmount/useBeforeUnmount.d.ts +24 -0
  632. package/dist/useBeforeUnmount/useBeforeUnmount.js +28 -0
  633. package/dist/useBeforeUnmount/useBeforeUnmount.js.map +1 -0
  634. package/dist/useChildren/index.cjs +3 -0
  635. package/dist/useChildren/index.d.cts +2 -0
  636. package/dist/useChildren/index.d.ts +2 -0
  637. package/dist/useChildren/index.js +2 -0
  638. package/dist/useChildren/useChildren.cjs +35 -0
  639. package/dist/useChildren/useChildren.cjs.map +1 -0
  640. package/dist/useChildren/useChildren.d.cts +26 -0
  641. package/dist/useChildren/useChildren.d.ts +26 -0
  642. package/dist/useChildren/useChildren.js +34 -0
  643. package/dist/useChildren/useChildren.js.map +1 -0
  644. package/dist/useColorScheme/index.cjs +3 -0
  645. package/dist/useColorScheme/index.d.cts +2 -0
  646. package/dist/useColorScheme/index.d.ts +2 -0
  647. package/dist/useColorScheme/index.js +2 -0
  648. package/dist/useColorScheme/useColorScheme.cjs +46 -0
  649. package/dist/useColorScheme/useColorScheme.cjs.map +1 -0
  650. package/dist/useColorScheme/useColorScheme.d.cts +29 -0
  651. package/dist/useColorScheme/useColorScheme.d.ts +29 -0
  652. package/dist/useColorScheme/useColorScheme.js +45 -0
  653. package/dist/useColorScheme/useColorScheme.js.map +1 -0
  654. package/dist/useMediator/index.cjs +3 -0
  655. package/dist/useMediator/index.d.cts +3 -0
  656. package/dist/useMediator/index.d.ts +3 -0
  657. package/dist/useMediator/index.js +2 -0
  658. package/dist/useMediator/types.cjs +0 -0
  659. package/dist/useMediator/types.d.cts +2 -0
  660. package/dist/useMediator/types.d.ts +2 -0
  661. package/dist/useMediator/types.js +0 -0
  662. package/dist/useMediator/useMediator.cjs +137 -0
  663. package/dist/useMediator/useMediator.cjs.map +1 -0
  664. package/dist/useMediator/useMediator.d.cts +61 -0
  665. package/dist/useMediator/useMediator.d.ts +61 -0
  666. package/dist/useMediator/useMediator.js +136 -0
  667. package/dist/useMediator/useMediator.js.map +1 -0
  668. package/dist/useMediator/utils.cjs +22 -0
  669. package/dist/useMediator/utils.cjs.map +1 -0
  670. package/dist/useMediator/utils.d.cts +14 -0
  671. package/dist/useMediator/utils.d.ts +14 -0
  672. package/dist/useMediator/utils.js +21 -0
  673. package/dist/useMediator/utils.js.map +1 -0
  674. package/dist/useMounted/index.cjs +3 -0
  675. package/dist/useMounted/index.d.cts +2 -0
  676. package/dist/useMounted/index.d.ts +2 -0
  677. package/dist/useMounted/index.js +2 -0
  678. package/dist/useMounted/useMounted.cjs +29 -0
  679. package/dist/useMounted/useMounted.cjs.map +1 -0
  680. package/dist/useMounted/useMounted.d.cts +24 -0
  681. package/dist/useMounted/useMounted.d.ts +24 -0
  682. package/dist/useMounted/useMounted.js +28 -0
  683. package/dist/useMounted/useMounted.js.map +1 -0
  684. package/dist/useRef/index.cjs +3 -0
  685. package/dist/useRef/index.d.cts +2 -0
  686. package/dist/useRef/index.d.ts +2 -0
  687. package/dist/useRef/index.js +2 -0
  688. package/dist/useRef/useRef.cjs +28 -0
  689. package/dist/useRef/useRef.cjs.map +1 -0
  690. package/dist/useRef/useRef.d.cts +25 -0
  691. package/dist/useRef/useRef.d.ts +25 -0
  692. package/dist/useRef/useRef.js +27 -0
  693. package/dist/useRef/useRef.js.map +1 -0
  694. package/dist/withDefaultProps/constants.cjs +10 -0
  695. package/dist/withDefaultProps/constants.cjs.map +1 -0
  696. package/dist/withDefaultProps/constants.d.cts +8 -0
  697. package/dist/withDefaultProps/constants.d.ts +8 -0
  698. package/dist/withDefaultProps/constants.js +9 -0
  699. package/dist/withDefaultProps/constants.js.map +1 -0
  700. package/dist/withDefaultProps/index.cjs +3 -0
  701. package/dist/withDefaultProps/index.d.cts +3 -0
  702. package/dist/withDefaultProps/index.d.ts +3 -0
  703. package/dist/withDefaultProps/index.js +2 -0
  704. package/dist/withDefaultProps/types.cjs +0 -0
  705. package/dist/withDefaultProps/types.d.cts +25 -0
  706. package/dist/withDefaultProps/types.d.ts +25 -0
  707. package/dist/withDefaultProps/types.js +0 -0
  708. package/dist/withDefaultProps/withDefaultProps.cjs +85 -0
  709. package/dist/withDefaultProps/withDefaultProps.cjs.map +1 -0
  710. package/dist/withDefaultProps/withDefaultProps.d.cts +48 -0
  711. package/dist/withDefaultProps/withDefaultProps.d.ts +48 -0
  712. package/dist/withDefaultProps/withDefaultProps.js +84 -0
  713. package/dist/withDefaultProps/withDefaultProps.js.map +1 -0
  714. package/dist/withDefaultPropsHandlers/constants.cjs +7 -0
  715. package/dist/withDefaultPropsHandlers/constants.cjs.map +1 -0
  716. package/dist/withDefaultPropsHandlers/constants.d.cts +5 -0
  717. package/dist/withDefaultPropsHandlers/constants.d.ts +5 -0
  718. package/dist/withDefaultPropsHandlers/constants.js +6 -0
  719. package/dist/withDefaultPropsHandlers/constants.js.map +1 -0
  720. package/dist/withDefaultPropsHandlers/index.cjs +3 -0
  721. package/dist/withDefaultPropsHandlers/index.d.cts +3 -0
  722. package/dist/withDefaultPropsHandlers/index.d.ts +3 -0
  723. package/dist/withDefaultPropsHandlers/index.js +2 -0
  724. package/dist/withDefaultPropsHandlers/types.cjs +0 -0
  725. package/dist/withDefaultPropsHandlers/types.d.cts +12 -0
  726. package/dist/withDefaultPropsHandlers/types.d.ts +12 -0
  727. package/dist/withDefaultPropsHandlers/types.js +0 -0
  728. package/dist/withDefaultPropsHandlers/withDefaultPropsHandlers.cjs +81 -0
  729. package/dist/withDefaultPropsHandlers/withDefaultPropsHandlers.cjs.map +1 -0
  730. package/dist/withDefaultPropsHandlers/withDefaultPropsHandlers.d.cts +49 -0
  731. package/dist/withDefaultPropsHandlers/withDefaultPropsHandlers.d.ts +49 -0
  732. package/dist/withDefaultPropsHandlers/withDefaultPropsHandlers.js +80 -0
  733. package/dist/withDefaultPropsHandlers/withDefaultPropsHandlers.js.map +1 -0
  734. package/package.json +647 -0
package/README.md ADDED
@@ -0,0 +1,1455 @@
1
+ # @pastweb/vue
2
+
3
+ Vue integration package for building tools-powered Vue applications.
4
+
5
+ It provides Vue-specific bindings for the framework-agnostic primitives in `@pastweb/tools`: API/query composables, router integration, entry composition, portals, rendering helpers, context helpers, lifecycle utilities, and Vue utility composables. Use it as a standalone Vue utility layer or as part of a larger Pastweb-based stack.
6
+
7
+ ## Features
8
+
9
+ - **Tools-first architecture** - Vue composables and components wrap the core `@pastweb/tools` functionality instead of replacing it.
10
+ - **API/query integration** - Vue wrappers for query cache access, `useQuery`, `useMutation`, `useQueries`, `useInfiniteQuery`, and reusable query state.
11
+ - **Router integration** - Vue components and composables for `createViewRouter`.
12
+ - **Entry composition** - Vue entry helpers for mounting, updating, plugins, components, directives, and async waits.
13
+ - **Portal support** - Vue components and composables for portal descriptors and anchors.
14
+ - **TypeScript-first** - Public APIs include TSDoc and exported types for app-level integration.
15
+
16
+ ## Installation
17
+
18
+ ```bash
19
+ npm i -S @pastweb/vue
20
+ # or
21
+ pnpm i -S @pastweb/vue
22
+ # or
23
+ yarn add -S @pastweb/vue
24
+ ```
25
+
26
+ ## Documentation Overview
27
+
28
+ The documentation is organized into the following major categories. Each section provides syntax notes, practical examples, and integration guidance where useful.
29
+
30
+ - **Core functions** - `getContext` and `setContext` helpers for sharing Vue-provided values.
31
+ - **API functions** - Query cache installer and Vue wrappers around tools API hooks.
32
+ - **Async functions** - Pinia async store helpers and color-scheme composable factory.
33
+ - **Routing** - Vue integration for `createViewRouter`.
34
+ - **Element functions** - Entry rendering, islands, portals, slots, and UI composition helpers.
35
+ - **Hook functions** - Vue lifecycle and mediator composables.
36
+ - **Utility functions** - Small Vue utilities such as `Render`, `computed`, `useRef`, `getEventHandlers`, `withDefaultProps`, and `withDefaultPropsHandlers`.
37
+
38
+ This project is distributed under the MIT licence.
39
+
40
+ ## Summary
41
+
42
+ - [Core functions](#core-functions)
43
+ - [getContext](#getcontext)
44
+ - [setContext](#setcontext)
45
+ - [API functions](#api-functions)
46
+ - [installApiCache](#installapicache)
47
+ - [useApiQueryCache](#useapiquerycache)
48
+ - [reuseQuery](#reusequery)
49
+ - [reuseMutation](#reusemutation)
50
+ - [useQuery](#usequery)
51
+ - [useMutation](#usemutation)
52
+ - [useQueries](#usequeries)
53
+ - [useInfiniteQuery](#useinfinitequery)
54
+ - [Async functions](#async-functions)
55
+ - [createPiniaAsyncStore](#createpiniaasyncstore)
56
+ - [useColorScheme](#usecolorscheme)
57
+ - [Routing](#routing)
58
+ - [createRouter](#createrouter)
59
+ - [RouterView](#routerview)
60
+ - [RouterLink](#routerlink)
61
+ - [useLocation](#uselocation)
62
+ - [useNavigate](#usenavigate)
63
+ - [usePaths](#usepaths)
64
+ - [useRoute](#useroute)
65
+ - [useRouter](#userouter)
66
+ - [useRouterLink](#userouterlink)
67
+ - [useSearchParams](#usesearchparams)
68
+ - [Element functions](#element-functions)
69
+ - [createEntry](#createentry)
70
+ - [createServerEntry](#createserverentry)
71
+ - [EntryAdapter](#entryadapter)
72
+ - [Island](#island)
73
+ - [portals](#portals)
74
+ - [Render](#render)
75
+ - [Slot](#slot)
76
+ - [Hook functions](#hook-functions)
77
+ - [useBeforeMount](#usebeforemount)
78
+ - [useBeforeUnmount](#usebeforeunmount)
79
+ - [useMediator](#usemediator)
80
+ - [useMounted](#usemounted)
81
+ - [useRef](#useref)
82
+ - [Utility functions](#utility-functions)
83
+ - [computed](#computed)
84
+ - [useChildren](#usechildren)
85
+ - [withDefaultProps](#withdefaultprops)
86
+ - [getEventHandlers](#geteventhandlers)
87
+ - [withDefaultPropsHandlers](#withdefaultpropshandlers)
88
+
89
+ ---
90
+ ## Core functions
91
+
92
+ ### `getContext`
93
+
94
+ Reads one value from the active Vue dependency-injection context.
95
+
96
+ Use `getContext` inside component setup or inside composables that run during setup. Package composables should use this helper instead of importing Vue `inject` directly, so context access stays consistent across the Vue integration.
97
+
98
+ > #### Syntax
99
+
100
+ ```ts
101
+ function getContext<T = any>(key: string): T;
102
+ ```
103
+
104
+ Parameters
105
+ * `key`: `string`
106
+ * Context key that was provided with `setContext`, a Vue plugin, or another Vue provider.
107
+
108
+ Returns
109
+ * `T`
110
+ * The injected value cast to `T`. Include `undefined` in `T` when the provider is optional.
111
+
112
+ **Example:**
113
+ ```ts
114
+ import { getContext, setContext } from '@pastweb/vue';
115
+
116
+ setContext('session', { userId: 'user-1' });
117
+ const session = getContext<{ userId: string }>('session');
118
+ ```
119
+
120
+ ### `setContext`
121
+
122
+ Provides one value through Vue dependency injection.
123
+
124
+ Call it during component setup or inside a composable that runs during setup. Use it instead of importing Vue `provide` directly in package composables.
125
+
126
+ > #### Syntax
127
+
128
+ ```ts
129
+ function setContext<T = undefined>(key: string, value: T): void;
130
+ ```
131
+
132
+ **Example:**
133
+ ```ts
134
+ import { setContext } from '@pastweb/vue';
135
+
136
+ setContext('session', { userId: 'user-1' });
137
+ ```
138
+
139
+ ---
140
+ ## API functions
141
+
142
+ The API helpers are Vue wrappers around the framework-agnostic query/cache primitives from `@pastweb/tools`. The cache and agent still live in `tools`; this package provides Vue app installation, injection access, and Vue render updates for the reactive query states.
143
+
144
+ ### `installApiCache`
145
+
146
+ Creates a Vue plugin that provides a `QueryCache` to API composables.
147
+
148
+ > #### Syntax
149
+
150
+ ```ts
151
+ function installApiCache(options: ApiCacheOptions): ApiCachePlugin
152
+ ```
153
+
154
+ **Example:**
155
+ ```ts
156
+ import { createApp } from 'vue';
157
+ import { createQueryCache } from '@pastweb/tools';
158
+ import { installApiCache } from '@pastweb/vue';
159
+ import App from './App.vue';
160
+
161
+ const queryCache = createQueryCache();
162
+
163
+ createApp(App)
164
+ .use(installApiCache({ queryCache }))
165
+ .mount('#app');
166
+ ```
167
+
168
+ ### `useApiQueryCache`
169
+
170
+ Returns the active `QueryCache` installed with `installApiCache`.
171
+
172
+ > #### Syntax
173
+
174
+ ```ts
175
+ function useApiQueryCache(): QueryCache
176
+ ```
177
+
178
+ **Example:**
179
+ ```ts
180
+ import { useApiQueryCache } from '@pastweb/vue';
181
+
182
+ const queryCache = useApiQueryCache();
183
+ ```
184
+
185
+ ### `reuseQuery`
186
+
187
+ Bridges any tools reactive query-like state into Vue rendering. The returned object keeps the tools state shape, and Vue components update when its enumerable fields change.
188
+
189
+ > #### Syntax
190
+
191
+ ```ts
192
+ function reuseQuery<TState extends Record<PropertyKey, any>>( createState: () => TState ): TState
193
+ ```
194
+
195
+ **Example:**
196
+ ```ts
197
+ import { createApiAgent, createQueryCache, useQuery as createToolsQuery } from '@pastweb/tools';
198
+ import { reuseQuery } from '@pastweb/vue';
199
+
200
+ const queryCache = createQueryCache();
201
+ const agent = createApiAgent({ queryCache });
202
+
203
+ export function useUsers() {
204
+ return reuseQuery(() => createToolsQuery({
205
+ fn: () => agent.get('/api/users', { queryKey: ['users'] }),
206
+ }));
207
+ }
208
+ ```
209
+
210
+ ### `reuseMutation`
211
+
212
+ Alias of `reuseQuery` for mutation-style state. It uses the same implementation, but makes custom mutation composables easier to read.
213
+
214
+ > #### Syntax
215
+
216
+ ```ts
217
+ function reuseMutation<TState extends Record<PropertyKey, any>>(
218
+ createState: () => TState,
219
+ ): TState
220
+ ```
221
+
222
+ **Example:**
223
+ ```ts
224
+ import { useMutation as createToolsMutation } from '@pastweb/tools';
225
+ import { reuseMutation } from '@pastweb/vue';
226
+
227
+ export function useSaveUser(agent: Agent) {
228
+ return reuseMutation(() => createToolsMutation({
229
+ fn: user => agent.post('/api/users', user),
230
+ }));
231
+ }
232
+ ```
233
+
234
+ ### `useQuery`
235
+
236
+ Vue wrapper for `@pastweb/tools` `useQuery`.
237
+
238
+ > #### Syntax
239
+
240
+ ```ts
241
+ function useQuery<T>(config: QueryConfig<T>): QueryInfo<T>
242
+ ```
243
+
244
+ **Example:**
245
+ ```vue
246
+ <script setup lang="ts">
247
+ import { useQuery } from '@pastweb/vue';
248
+
249
+ const users = useQuery({
250
+ fn: () => agent.get('/api/users', { queryKey: ['users'] }),
251
+ });
252
+ </script>
253
+
254
+ <template>
255
+ <span v-if="users.isLoading">Loading...</span>
256
+ <span v-else-if="users.isError">Could not load users</span>
257
+ <ul v-else>
258
+ <li v-for="user in users.data ?? []" :key="user.id">
259
+ {{ user.name }}
260
+ </li>
261
+ </ul>
262
+ </template>
263
+ ```
264
+
265
+ ### `useMutation`
266
+
267
+ Vue wrapper for `@pastweb/tools` `useMutation`.
268
+
269
+ > #### Syntax
270
+
271
+ ```ts
272
+ function useMutation<T>(config: MutationConfig<T>): MutationInfo<T>
273
+ ```
274
+
275
+ **Example:**
276
+ ```vue
277
+ <script setup lang="ts">
278
+ import { useMutation } from '@pastweb/vue';
279
+
280
+ const saveUser = useMutation({
281
+ fn: payload => agent.post('/api/users', payload),
282
+ });
283
+ </script>
284
+
285
+ <template>
286
+ <button :disabled="saveUser.isMutating" @click="saveUser.mutate(user)">
287
+ Save
288
+ </button>
289
+ </template>
290
+ ```
291
+
292
+ ### `useQueries`
293
+
294
+ Vue wrapper for multiple tools queries.
295
+
296
+ > #### Syntax
297
+
298
+ ```ts
299
+ function useQueries<T extends readonly QueryConfig<any>[]>(
300
+ config: UseQueriesInput<T>,
301
+ ): UseQueriesInfo<T>
302
+ ```
303
+
304
+ **Example:**
305
+ ```ts
306
+ const dashboard = useQueries({
307
+ queries: [
308
+ { fn: () => agent.get('/api/users', { queryKey: ['users'] }) },
309
+ { fn: () => agent.get('/api/posts', { queryKey: ['posts'] }) },
310
+ ],
311
+ });
312
+ ```
313
+
314
+ ### `useInfiniteQuery`
315
+
316
+ Vue wrapper for paginated tools queries.
317
+
318
+ > #### Syntax
319
+
320
+ ```ts
321
+ function useInfiniteQuery<TPage, TPageParam = unknown>(
322
+ config: InfiniteQueryConfig<TPage, TPageParam>,
323
+ ): InfiniteQueryInfo<TPage, TPageParam>
324
+ ```
325
+
326
+ **Example:**
327
+ ```vue
328
+ <script setup lang="ts">
329
+ import { useInfiniteQuery } from '@pastweb/vue';
330
+
331
+ const posts = useInfiniteQuery({
332
+ initialPageParam: 1,
333
+ fn: page => agent.get(`/api/posts?page=${page}`, {
334
+ queryKey: ['posts', page],
335
+ }),
336
+ });
337
+ </script>
338
+
339
+ <template>
340
+ <button :disabled="!posts.hasNextPage" @click="posts.fetchNextPage">
341
+ More
342
+ </button>
343
+ </template>
344
+ ```
345
+
346
+ ---
347
+ ## Async functions
348
+
349
+ ### `createPiniaAsyncStore`
350
+
351
+ Creates a Pinia-flavored async store wrapper around tools async store primitives. The returned async store includes a Pinia instance on `store`; calling `init()` runs `onInit(pinia)` and marks the store as ready once initialization completes.
352
+
353
+ Use it when a store needs to initialize asynchronously before the application starts reading from it.
354
+
355
+ > #### Syntax
356
+
357
+ ```ts
358
+ function createPiniaAsyncStore(options: PiniaStoreOptions): PiniaAsyncStore
359
+ ```
360
+
361
+ Parameters
362
+
363
+ * `name`: `string` _(optional)_
364
+ * Optional name suffix for the underlying async store. The generated name is `PiniaAsyncStore` or `PiniaAsyncStore:name`.
365
+ * `onInit`: `(pinia: Pinia) => Promise<void> | void` _(optional)_
366
+ * Initialization callback called with the created Pinia instance.
367
+
368
+ Returns
369
+
370
+ * `PiniaAsyncStore`
371
+ * A tools async store with a `store` property containing the Pinia instance.
372
+
373
+ **Example:**
374
+ ```ts
375
+ import { createApp } from 'vue';
376
+ import { createPiniaAsyncStore } from '@pastweb/vue/createPiniaAsyncStore';
377
+ import App from './App.vue';
378
+
379
+ const app = createApp(App);
380
+
381
+ export const piniaStore = createPiniaAsyncStore({
382
+ name: 'app',
383
+ async onInit(pinia) {
384
+ app.use(pinia);
385
+ },
386
+ });
387
+
388
+ await piniaStore.init();
389
+ await piniaStore.isReady;
390
+ ```
391
+
392
+ ### `useColorScheme`
393
+
394
+ Vue composable for color-scheme state from `@pastweb/tools`. Pass options to create an internal `MatchScheme`, or pass a pre-created `MatchScheme` as the second argument.
395
+
396
+ > #### Syntax
397
+
398
+ ```ts
399
+ function useColorScheme(options?: SchemeOptions, matchScheme?: MatchScheme): [ColorSchemeInfo, (mode: string) => void]
400
+ ```
401
+
402
+ **Example:**
403
+ ```ts
404
+ import { useColorScheme } from '@pastweb/vue';
405
+
406
+ const [info, setMode] = useColorScheme({ defaultMode: 'auto' });
407
+
408
+ setMode('dark');
409
+ ```
410
+
411
+ ---
412
+ ## Routing
413
+
414
+ The router helpers integrate Vue with `createViewRouter` from `@pastweb/tools`. The tools router owns the route matching and reactive router state; this package provides Vue plugin installation, Vue dependency-injection access, and Vue-friendly reactive mirrors for components and composables.
415
+
416
+ ### `createRouter`
417
+
418
+ Creates a Vue plugin for a tools `ViewRouter`. It provides the router under the shared tools router context key, initializes route depth for nested `RouterView` components, and registers `RouterView` and `RouterLink` globally.
419
+
420
+ > #### Syntax
421
+
422
+ ```ts
423
+ function createRouter(router: ViewRouter): Plugin;
424
+ ```
425
+
426
+ **Example:**
427
+ ```ts
428
+ import { createViewRouter, type Route } from '@pastweb/tools/createViewRouter';
429
+ import { createRouter, RouterView } from '@pastweb/vue';
430
+
431
+ const router = createViewRouter({
432
+ routes: routes as Route[],
433
+ RouterView,
434
+ });
435
+
436
+ app.use(createRouter(router));
437
+ ```
438
+
439
+ ### `RouterView`
440
+
441
+ Renders the selected route view for the active route depth. Named views use the `name` prop and route props are read from `route.meta.props`.
442
+
443
+ > #### Syntax
444
+
445
+ ```ts
446
+ type RouterViewProps = {
447
+ name?: string;
448
+ };
449
+ ```
450
+
451
+ **Example:**
452
+ ```vue
453
+ <template>
454
+ <RouterView />
455
+ </template>
456
+ ```
457
+
458
+ **Example with route props:**
459
+ ```ts
460
+ const routes = [{
461
+ path: '/user/:id',
462
+ view: UserPage,
463
+ meta: {
464
+ props: {
465
+ title: 'User profile',
466
+ },
467
+ },
468
+ }];
469
+ ```
470
+
471
+ ### `RouterLink`
472
+
473
+ Renders an anchor whose `href`, active state, and click navigation come from `router.getRouterLink`.
474
+
475
+ > #### Syntax
476
+
477
+ ```ts
478
+ type RouterLinkProps = RouterLinkOptions & {
479
+ className?: string;
480
+ preventNavigate?: boolean;
481
+ };
482
+ ```
483
+
484
+ **Example:**
485
+ ```vue
486
+ <RouterLink
487
+ path="/users/:id"
488
+ :params="{ id: 123 }"
489
+ :search-params="new URLSearchParams({ tab: 'profile' })"
490
+ hash="details"
491
+ >
492
+ User profile
493
+ </RouterLink>
494
+ ```
495
+
496
+ ### `useLocation`
497
+
498
+ Returns a Vue reactive mirror of the current tools router location.
499
+
500
+ > #### Syntax
501
+
502
+ ```ts
503
+ function useLocation(): Location
504
+ ```
505
+
506
+ **Example:**
507
+ ```vue
508
+ <script setup lang="ts">
509
+ import { useLocation } from '@pastweb/vue';
510
+
511
+ const location = useLocation();
512
+ </script>
513
+
514
+ <template>
515
+ <span>{{ location.pathname }}</span>
516
+ </template>
517
+ ```
518
+
519
+ ### `useNavigate`
520
+
521
+ Returns the router navigation function.
522
+
523
+ > #### Syntax
524
+
525
+ ```ts
526
+ function useNavigate(): ViewRouter['navigate']
527
+ ```
528
+
529
+ **Example:**
530
+ ```vue
531
+ <script setup lang="ts">
532
+ import { useNavigate } from '@pastweb/vue';
533
+
534
+ const navigate = useNavigate();
535
+ </script>
536
+
537
+ <template>
538
+ <button @click="navigate('/settings')">
539
+ Settings
540
+ </button>
541
+ </template>
542
+ ```
543
+
544
+ ### `usePaths`
545
+
546
+ Returns a Vue reactive route array filtered by the tools `filterRoutes` helper.
547
+
548
+ > #### Syntax
549
+
550
+ ```ts
551
+ function usePaths(filter?: FilterDescriptor): Route[]
552
+ ```
553
+
554
+ **Example:**
555
+ ```vue
556
+ <script setup lang="ts">
557
+ import { usePaths, RouterLink } from '@pastweb/vue';
558
+
559
+ const docsPaths = usePaths({
560
+ section: 'docs',
561
+ });
562
+ </script>
563
+
564
+ <template>
565
+ <nav>
566
+ <RouterLink
567
+ v-for="route in docsPaths"
568
+ :key="route.path"
569
+ :path="route.path"
570
+ >
571
+ {{ route.meta?.title || route.path }}
572
+ </RouterLink>
573
+ </nav>
574
+ </template>
575
+ ```
576
+
577
+ ### `useRoute`
578
+
579
+ Returns a Vue reactive mirror of the selected route for the current view depth.
580
+
581
+ ### `useRouter`
582
+
583
+ Returns the active tools `ViewRouter`.
584
+
585
+ **Example:**
586
+ ```vue
587
+ <script setup lang="ts">
588
+ import { useRouter } from '@pastweb/vue';
589
+
590
+ const router = useRouter();
591
+
592
+ async function refreshRoute() {
593
+ await router.navigate(router.location.pathname);
594
+ }
595
+ </script>
596
+
597
+ <template>
598
+ <button @click="refreshRoute">
599
+ Refresh route
600
+ </button>
601
+ </template>
602
+ ```
603
+
604
+ ### `useRouterLink`
605
+
606
+ Returns a Vue reactive router link descriptor for a route target. The descriptor includes `pathname`, `isActive`, `isExactActive`, and `navigate`.
607
+
608
+ **Example:**
609
+ ```vue
610
+ <script setup lang="ts">
611
+ import { useRouterLink } from '@pastweb/vue';
612
+
613
+ const link = useRouterLink({
614
+ path: '/users/:id',
615
+ params: { id: 123 },
616
+ searchParams: new URLSearchParams({ tab: 'profile' }),
617
+ });
618
+ </script>
619
+
620
+ <template>
621
+ <a
622
+ :href="link.pathname"
623
+ :aria-current="link.isExactActive ? 'page' : undefined"
624
+ @click.prevent="link.navigate()"
625
+ >
626
+ User profile
627
+ </a>
628
+ </template>
629
+ ```
630
+
631
+ ### `useSearchParams`
632
+
633
+ Returns URL search parameters for the current location and the router `setSearchParams` method.
634
+
635
+ **Example:**
636
+ ```vue
637
+ <script setup lang="ts">
638
+ import { computed, useSearchParams } from '@pastweb/vue';
639
+
640
+ const search = useSearchParams();
641
+ const view = computed(() => search.params.get('view') || 'grid');
642
+
643
+ function setView(value: string) {
644
+ const params = new URLSearchParams(search.params);
645
+ params.set('view', value);
646
+ search.setSearchParams(params);
647
+ }
648
+ </script>
649
+
650
+ <template>
651
+ <button :aria-pressed="view === 'grid'" @click="setView('grid')">
652
+ Grid
653
+ </button>
654
+ <button :aria-pressed="view === 'list'" @click="setView('list')">
655
+ List
656
+ </button>
657
+ </template>
658
+ ```
659
+
660
+ ---
661
+ ## Element functions
662
+
663
+ ### `createEntry`
664
+
665
+ Creates a browser-side Vue entry object that can mount, hydrate, update, and unmount a Vue application. It supports Vue plugins, component/directive registration, and async wait/fallback configuration.
666
+
667
+ **Example:**
668
+ ```ts
669
+ import { createEntry } from '@pastweb/vue';
670
+ import App from './App.vue';
671
+
672
+ const entry = createEntry({
673
+ EntryComponent: App,
674
+ querySelector: '#app',
675
+ use: [installApiCache({ queryCache })],
676
+ });
677
+
678
+ entry.mount();
679
+ ```
680
+
681
+ ### `createServerEntry`
682
+
683
+ Creates a server-side Vue entry object that renders with Vue SSR and memoizes the result through the tools SSR composition helpers. Use this for server rendering; use `createEntry` for browser mounting and hydration.
684
+
685
+ > #### Syntax
686
+
687
+ ```ts
688
+ function createServerEntry(options?: VueEntryOptions): VueEntry
689
+ ```
690
+
691
+ **Example:**
692
+ ```ts
693
+ import { createServerEntry } from '@pastweb/vue';
694
+ import App from './App.vue';
695
+
696
+ const entry = createServerEntry({
697
+ EntryComponent: App,
698
+ initData: {
699
+ title: 'Hello from SSR',
700
+ },
701
+ });
702
+
703
+ const ssrId = entry.mount();
704
+ const html = await entry.getComposedSSR();
705
+ ```
706
+
707
+ ### `EntryAdapter`
708
+
709
+ `EntryAdapter` renders an entry inside a Vue tree. On the client it mounts the `entry` returned by `createEntry`; on the server it can load a separate `ssrEntry` through the SSR async task queue, keeping the server renderer out of the client bundle.
710
+
711
+ If your renderer uses the same entry implementation on client and server, omit `ssrEntry`; `EntryAdapter` will use `entry` during SSR too. `ssrEntry` is declared as an adapter prop, so it is not forwarded to the nested entry `initData` or update payload.
712
+
713
+ **Example:**
714
+ ```vue
715
+ <script setup lang="ts">
716
+ import { createEntry, EntryAdapter } from '@pastweb/vue';
717
+ import ProfileCard from './ProfileCard.vue';
718
+
719
+ function createProfileEntry() {
720
+ return createEntry({
721
+ EntryComponent: ProfileCard,
722
+ });
723
+ }
724
+
725
+ const createProfileServerEntry = import.meta.env.SSR
726
+ ? () => import('./profile.server-entry').then(module => module.createProfileServerEntry())
727
+ : undefined;
728
+ </script>
729
+
730
+ <template>
731
+ <EntryAdapter
732
+ :entry="createProfileEntry"
733
+ :ssr-entry="createProfileServerEntry"
734
+ :user-id="userId"
735
+ />
736
+ </template>
737
+ ```
738
+
739
+ `EntryAdapter` also reads the nearest `Island` context. When rendered inside an `Island`, the nested entry hydrates existing server markup; outside an island it mounts normally.
740
+
741
+ ### `Island`
742
+
743
+ Hydration-aware component for browser-only or delayed rendering strategies.
744
+
745
+ **Example:**
746
+ ```vue
747
+ <script setup lang="ts">
748
+ import { Island, EntryAdapter } from '@pastweb/vue';
749
+ import { createProfileEntry } from './profile.entry';
750
+ </script>
751
+
752
+ <template>
753
+ <Island client="visible" island-id="profile-card">
754
+ <EntryAdapter :entry="createProfileEntry" user-id="123" />
755
+ </Island>
756
+ </template>
757
+ ```
758
+
759
+ ### `portals`
760
+
761
+ Portal helpers provide portal anchors and render portal content through Vue components and composables. The actual portal lifecycle is powered by `@pastweb/tools`; this package installs the descriptors into Vue dependency injection and exposes Vue-friendly composables/components.
762
+
763
+ #### `installPortals`
764
+
765
+ Creates a Vue plugin that provides portal descriptors and anchor ids.
766
+
767
+ ```ts
768
+ function installPortals(options: PortalsOptions): {
769
+ install(app: App): void;
770
+ }
771
+
772
+ interface PortalsOptions {
773
+ anchorsIds: PortalAnchorsIds;
774
+ getEntry: (props: Record<string, any>, component: Component | VNode | null) => VueEntry;
775
+ idChahe?: IdCache;
776
+ portalsCache?: Portals;
777
+ }
778
+ ```
779
+
780
+ **Example:**
781
+ ```ts
782
+ import { createEntry, installPortals, Portal, usePortal } from '@pastweb/vue';
783
+
784
+ app.use(installPortals({
785
+ anchorsIds: {
786
+ modal: 'modal-root',
787
+ },
788
+ getEntry: (props, component) => createEntry({
789
+ EntryComponent: component,
790
+ initData: props,
791
+ }),
792
+ }));
793
+ ```
794
+
795
+ #### `usePortals`
796
+
797
+ Reads the portal descriptor map installed by `installPortals`.
798
+
799
+ > #### Syntax
800
+
801
+ ```ts
802
+ function usePortals<T>(): T;
803
+ ```
804
+
805
+ **Example:**
806
+ ```vue
807
+ <script setup lang="ts">
808
+ import { usePortals } from '@pastweb/vue';
809
+ import type { Portal } from '@pastweb/tools/portals';
810
+
811
+ type AppPortals = {
812
+ modal: Portal;
813
+ toaster: Portal;
814
+ };
815
+
816
+ const portals = usePortals<AppPortals>();
817
+
818
+ function scrollToModalAnchor() {
819
+ portals.modal.getPortalElement().scrollIntoView();
820
+ }
821
+ </script>
822
+
823
+ <template>
824
+ <button @click="scrollToModalAnchor">
825
+ Show modal anchor
826
+ </button>
827
+ </template>
828
+ ```
829
+
830
+ #### `usePortalAnchors`
831
+
832
+ Reads the installed portal anchor ids.
833
+
834
+ > #### Syntax
835
+
836
+ ```ts
837
+ function usePortalAnchors<T>(): T;
838
+ ```
839
+
840
+ **Example:**
841
+ ```vue
842
+ <script setup lang="ts">
843
+ import { usePortalAnchors } from '@pastweb/vue';
844
+
845
+ type PortalAnchors = {
846
+ modal: string;
847
+ toaster: string;
848
+ };
849
+
850
+ const anchors = usePortalAnchors<PortalAnchors>();
851
+ </script>
852
+
853
+ <template>
854
+ <div :id="anchors.modal" />
855
+ <div :id="anchors.toaster" />
856
+ </template>
857
+ ```
858
+
859
+ #### `usePortal`
860
+
861
+ Creates a portal handler that can be passed to the `Portal` component. Calls made before the component binds the real handler are queued and replayed when the component is ready.
862
+
863
+ > #### Syntax
864
+
865
+ ```ts
866
+ function usePortal(): PortalHandler & { isReady: () => void };
867
+ ```
868
+
869
+ **Example:**
870
+ ```vue
871
+ <script setup lang="ts">
872
+ import { Portal, usePortal } from '@pastweb/vue';
873
+
874
+ const modal = usePortal();
875
+ </script>
876
+
877
+ <template>
878
+ <button @click="modal.open()">
879
+ Open modal
880
+ </button>
881
+
882
+ <Portal path="modal" :use="modal">
883
+ <Dialog title="Hello from a portal" />
884
+ </Portal>
885
+ </template>
886
+ ```
887
+
888
+ #### `Portal`
889
+
890
+ Vue component that connects a `usePortal()` handler to an installed portal path.
891
+
892
+ > #### Syntax
893
+
894
+ ```ts
895
+ interface PortalProps {
896
+ path: string;
897
+ use: PortalHandler & { isReady: () => void };
898
+ }
899
+ ```
900
+
901
+ **Example:**
902
+ ```vue
903
+ <script setup lang="ts">
904
+ import { Portal, usePortal } from '@pastweb/vue';
905
+
906
+ const sheet = usePortal();
907
+ </script>
908
+
909
+ <template>
910
+ <button @click="sheet.open()">
911
+ Open sheet
912
+ </button>
913
+
914
+ <Portal path="viewSheet" :use="sheet">
915
+ <Sheet title="Route details" />
916
+ </Portal>
917
+ </template>
918
+ ```
919
+
920
+ ### `Render`
921
+
922
+ Renders primitive content, a Vue VNode, or a component definition with optional props.
923
+
924
+ > #### Syntax
925
+
926
+ ```ts
927
+ type Content = string | number | VNode | Component;
928
+
929
+ interface RenderProps {
930
+ content: Content;
931
+ props?: Record<string, any>;
932
+ }
933
+ ```
934
+
935
+ Parameters
936
+ * `content`: `Content`
937
+ * String and number values render as text.
938
+ * Vue VNodes are cloned with `props` merged onto the clone.
939
+ * Component definitions are rendered with `props`.
940
+ * `props`: `Record<string, any>` _(optional)_
941
+ * Additional props or listeners to apply to VNodes and components. Ignored for primitive content.
942
+
943
+ **Example:**
944
+ ```vue
945
+ <script setup lang="ts">
946
+ import { h } from 'vue';
947
+ import { Render } from '@pastweb/vue';
948
+
949
+ const vnode = h('button', 'Save');
950
+ </script>
951
+
952
+ <template>
953
+ <Render content="Plain text" />
954
+ <Render :content="vnode" :props="{ class: 'primary' }" />
955
+ <Render :content="MyComponent" :props="{ title: 'Hello' }" />
956
+ </template>
957
+ ```
958
+
959
+ ### `Slot`
960
+
961
+ `Slot` renders one of its own Vue slots by name, with optional prop injection or content mapping. It is useful for small composition wrappers where the component chooses which slot to display, applies common attributes/listeners to the rendered VNodes, or wraps slot output without forcing callers to repeat markup.
962
+
963
+ When `name` is omitted, `Slot` renders the default slot. When a named slot is requested but not provided, it falls back to the default slot. If `props` are provided, the rendered VNode or VNodes are cloned with those props. If `map` is provided, it receives the slot content and its return value is rendered instead; `map` takes precedence over `props`.
964
+
965
+ Parameters
966
+ * `name`: `string` _(optional)_
967
+ * Slot name to render. Defaults to `default`.
968
+ * `props`: `Record<string, any>` _(optional)_
969
+ * Props, classes, attrs, or listeners cloned onto each rendered slot VNode.
970
+ * `map`: `(content: VNode | VNode[]) => VNode | VNode[]` _(optional)_
971
+ * Transform function for wrapping or replacing the rendered slot content.
972
+
973
+ **Example:**
974
+ ```vue
975
+ <script setup lang="ts">
976
+ import { h } from 'vue';
977
+ import { Slot } from '@pastweb/vue';
978
+
979
+ const buttonProps = {
980
+ class: 'toolbar-action',
981
+ onClick: () => console.log('Action clicked'),
982
+ };
983
+
984
+ const wrapContent = content => h('section', { class: 'panel-body' }, content);
985
+ </script>
986
+
987
+ <template>
988
+ <Slot name="title">
989
+ <template #title>
990
+ <h2>Settings</h2>
991
+ </template>
992
+ </Slot>
993
+
994
+ <Slot :props="buttonProps">
995
+ <button>Save</button>
996
+ </Slot>
997
+
998
+ <Slot :map="wrapContent">
999
+ <p>Mapped default content.</p>
1000
+ </Slot>
1001
+ </template>
1002
+ ```
1003
+
1004
+ ---
1005
+ ## Hook functions
1006
+
1007
+ ### `useBeforeMount`
1008
+
1009
+ `useBeforeMount` registers a callback with Vue's `onBeforeMount` lifecycle hook. Use it for setup that should run after `setup()` has registered the component logic but before Vue mounts the component into the DOM.
1010
+
1011
+ The callback runs once for each component instance. Async callbacks are accepted, but Vue does not wait for the returned promise before continuing the mount.
1012
+
1013
+ > #### Syntax
1014
+ ```ts
1015
+ function useBeforeMount(fn: () => void | Promise<void>): void
1016
+ ```
1017
+
1018
+ Parameters
1019
+ * `fn`: `() => void | Promise<void>`
1020
+ * Callback invoked before the component mounts.
1021
+
1022
+ **Example:**
1023
+ ```vue
1024
+ <script setup lang="ts">
1025
+ import { ref } from 'vue';
1026
+ import { useBeforeMount } from '@pastweb/vue';
1027
+
1028
+ const isRegistered = ref(false);
1029
+
1030
+ useBeforeMount(() => {
1031
+ registry.register('settings-panel');
1032
+ isRegistered.value = true;
1033
+ });
1034
+ </script>
1035
+
1036
+ <template>
1037
+ <section :data-registered="isRegistered">
1038
+ Settings
1039
+ </section>
1040
+ </template>
1041
+ ```
1042
+
1043
+ ### `useBeforeUnmount`
1044
+
1045
+ `useBeforeUnmount` registers a callback with Vue's `onBeforeUnmount` lifecycle hook. Use it for cleanup that must run while the component instance is still active, such as removing listeners, closing subscriptions, or flushing pending work.
1046
+
1047
+ The callback runs once for each component instance, immediately before Vue unmounts it. Async callbacks are accepted, but Vue does not wait for the returned promise before continuing unmount.
1048
+
1049
+ > #### Syntax
1050
+ ```ts
1051
+ function useBeforeUnmount(fn: () => void | Promise<void>): void
1052
+ ```
1053
+
1054
+ Parameters
1055
+ * `fn`: `() => void | Promise<void>`
1056
+ * Callback invoked before the component unmounts.
1057
+
1058
+ **Example:**
1059
+ ```vue
1060
+ <script setup lang="ts">
1061
+ import { useBeforeUnmount, useMounted } from '@pastweb/vue';
1062
+
1063
+ let removeListener: (() => void) | undefined;
1064
+
1065
+ useMounted(() => {
1066
+ removeListener = bus.on('changed', value => {
1067
+ console.log(value);
1068
+ });
1069
+ });
1070
+
1071
+ useBeforeUnmount(() => {
1072
+ removeListener?.();
1073
+ });
1074
+ </script>
1075
+ ```
1076
+
1077
+ ### `useMediator`
1078
+
1079
+ `useMediator` creates a tools mediator inside a Vue component. The mediator is created once for the component instance, while `props` and `extras` are mirrored into tools reactive objects so updates from Vue props stay visible inside mediator methods.
1080
+
1081
+ Mediator `state` is copied into Vue shallow reactivity for rendering. This means tools reactive state changes can update Vue templates, while mediator methods and other returned values stay stable for the component lifetime. On unmount, Vue prop/extras watchers are stopped and pending state bridge work is ignored.
1082
+
1083
+ Unlike the React package, Vue does not need a render-time mediator store for ordinary rerenders because `setup()` runs once per component instance. Inline mediator state therefore persists across Vue prop updates naturally.
1084
+
1085
+ In development, `useMediator` also detects Vite (`import.meta.hot`) and Webpack/Rspack-compatible (`import.meta.webpackHot`) HMR through `@pastweb/tools`. When the mediator source signature changes, the mediator is reinitialized in place and the Vue state mirror is refreshed.
1086
+
1087
+ > #### Syntax
1088
+ ```ts
1089
+ function useMediator<T>(mediator: MediatorFunction<T>, props?: Props, extras?: Extras): T
1090
+ ```
1091
+
1092
+ #### Type Parameters
1093
+ * `T`
1094
+ * Mediator return type.
1095
+
1096
+ #### Parameters
1097
+ * `mediator`: `MediatorFunction<T>`
1098
+ * Function that creates mediator state and methods.
1099
+ * `props`: `Props` _(optional)_
1100
+ * Values passed to the mediator as reactive props. `children` is ignored.
1101
+ * `extras`: `Extras` _(optional)_
1102
+ * Additional values passed to the mediator as reactive extras.
1103
+
1104
+ #### Returns
1105
+ The mediator return value, with `state` mirrored into Vue rendering.
1106
+
1107
+ **Example:**
1108
+ `counterMediator.ts`
1109
+
1110
+ ```ts
1111
+ import { reactive } from '@pastweb/tools';
1112
+
1113
+ export function createCounter(props: { initial: number }) {
1114
+ const state = reactive({ count: props.initial });
1115
+
1116
+ return {
1117
+ state,
1118
+ increment() {
1119
+ state.count += 1;
1120
+ },
1121
+ };
1122
+ }
1123
+ ```
1124
+
1125
+ `CounterButton.vue`
1126
+
1127
+ ```vue
1128
+ <script setup lang="ts">
1129
+ import { useMediator } from '@pastweb/vue';
1130
+ import { createCounter } from './counterMediator';
1131
+
1132
+ const counter = useMediator(createCounter, { initial: 0 });
1133
+ </script>
1134
+
1135
+ <template>
1136
+ <button @click="counter.increment">
1137
+ {{ counter.state.count }}
1138
+ </button>
1139
+ </template>
1140
+ ```
1141
+
1142
+ ### `useMounted`
1143
+
1144
+ `useMounted` registers a callback with Vue's `onMounted` lifecycle hook. Use it for client-side work that needs the component to be mounted, such as reading DOM refs, focusing inputs, or installing browser listeners.
1145
+
1146
+ The callback runs once for each component instance. Async callbacks are allowed, but returned promises are not used as cleanup functions.
1147
+
1148
+ > #### Syntax
1149
+ ```ts
1150
+ function useMounted(fn: () => void | Promise<void>): void
1151
+ ```
1152
+
1153
+ Parameters
1154
+ * `fn`: `() => void | Promise<void>`
1155
+ * Callback invoked after the component mounts.
1156
+
1157
+ **Example:**
1158
+ ```vue
1159
+ <script setup lang="ts">
1160
+ import { useMounted, useRef } from '@pastweb/vue';
1161
+
1162
+ const input = useRef<HTMLInputElement | null>(null);
1163
+
1164
+ useMounted(() => {
1165
+ input.value?.focus();
1166
+ });
1167
+ </script>
1168
+
1169
+ <template>
1170
+ <input ref="input" />
1171
+ </template>
1172
+ ```
1173
+
1174
+ ### `useRef`
1175
+
1176
+ `useRef` creates a Vue `shallowRef`. It gives Vue code the same Pastweb ref helper name used in other framework packages while preserving Vue's normal `.value` access pattern.
1177
+
1178
+ Because the ref is shallow, replacing `.value` is reactive, but mutating nested object properties is not deeply tracked by this helper.
1179
+
1180
+ > #### Syntax
1181
+ ```ts
1182
+ function useRef<T>(value?: T): Ref<T | undefined>
1183
+ ```
1184
+
1185
+ Parameters
1186
+ * `value`: `T` _(optional)_
1187
+ * Initial value stored in the ref.
1188
+
1189
+ **Example:**
1190
+ ```vue
1191
+ <script setup lang="ts">
1192
+ import { useRef } from '@pastweb/vue';
1193
+
1194
+ const count = useRef(0);
1195
+
1196
+ function increment() {
1197
+ count.value += 1;
1198
+ }
1199
+ </script>
1200
+
1201
+ <template>
1202
+ <button @click="increment">{{ count }}</button>
1203
+ </template>
1204
+ ```
1205
+
1206
+ ---
1207
+ ## Utility functions
1208
+
1209
+ ### `computed`
1210
+
1211
+ Alias for Vue's native `computed` function. It is provided so applications can import `computed` from `@pastweb/vue` alongside the package utilities while keeping the same Vue `ComputedRef` behavior.
1212
+
1213
+ > #### Syntax
1214
+
1215
+ ```ts
1216
+ function computed<T = unknown>(fn: () => T): ComputedRef<T>
1217
+ ```
1218
+
1219
+ **Example:**
1220
+ ```ts
1221
+ import { ref } from 'vue';
1222
+ import { computed } from '@pastweb/vue';
1223
+
1224
+ const firstName = ref('Ada');
1225
+ const lastName = ref('Lovelace');
1226
+
1227
+ const fullName = computed(() => `${firstName.value} ${lastName.value}`);
1228
+ ```
1229
+
1230
+ ### `useChildren`
1231
+
1232
+ `useChildren` reads the active component's default slot children as Vue VNodes. Use it inside `setup()` when writing render-function utilities that need to inspect, wrap, or forward the component's default children.
1233
+
1234
+ When the current component has no default slot, it returns an empty array.
1235
+
1236
+ > #### Syntax
1237
+ ```ts
1238
+ function useChildren(): VNode[]
1239
+ ```
1240
+
1241
+ **Example:**
1242
+ ```ts
1243
+ import { h } from 'vue';
1244
+ import { useChildren } from '@pastweb/vue';
1245
+
1246
+ export default {
1247
+ setup() {
1248
+ const children = useChildren();
1249
+
1250
+ return () => h('section', { class: 'content' }, children);
1251
+ },
1252
+ };
1253
+ ```
1254
+
1255
+ ### `withDefaultProps`
1256
+
1257
+ `withDefaultProps` merges Vue props with defaults and returns a reactive normalized object. Defaults are used only when the incoming prop value is `undefined`; explicit falsy values such as `false`, `0`, and `''` are preserved.
1258
+
1259
+ The helper also includes Vue-specific normalization. Vue coerces absent Boolean props to `false` at runtime, which means a defaulting helper cannot tell whether a Boolean prop was omitted or explicitly passed as `false`. For that reason, `booleanChars` lets you model those props as string markers first, then normalize them after defaults are applied. By default, `+` becomes `true` and `-` becomes `false`.
1260
+
1261
+ A default named `className` is exposed as Vue's `class` prop by default.
1262
+
1263
+ Use `exclude` for defaults that should not be applied by this helper. If the source props object already contains an excluded key, that provided value is preserved; otherwise the excluded default is omitted.
1264
+
1265
+ > #### Syntax
1266
+ ```ts
1267
+ function withDefaultProps<T>(props: Record<string, any>, defaults: Record<string, any>, options?: Options): T
1268
+
1269
+ interface Options {
1270
+ booleanChars?: [string, string];
1271
+ className?: boolean;
1272
+ exclude?: string | RegExp | Array<string | RegExp>;
1273
+ }
1274
+ ```
1275
+
1276
+ Parameters
1277
+ * `props`: `Record<string, any>`
1278
+ * Source Vue props object.
1279
+ * `defaults`: `Record<string, any>`
1280
+ * Defaults applied when a prop is `undefined`.
1281
+ * `options`: `Options` _(optional)_
1282
+ * `booleanChars` controls string-to-boolean conversion for Boolean-like props that need to avoid Vue's absent-Boolean-to-`false` coercion. Defaults to `['+', '-']`.
1283
+ * `className` controls whether `className` defaults are mapped to `class`. Defaults to `true`.
1284
+ * `exclude` prevents matching default keys from being applied. Strings match exact keys and regular expressions match the original key from `defaults`.
1285
+
1286
+ **Example:**
1287
+ ```vue
1288
+ <script setup lang="ts">
1289
+ import { withDefaultProps } from '@pastweb/vue';
1290
+
1291
+ const props = defineProps<{
1292
+ tone?: 'neutral' | 'accent';
1293
+ block?: '+' | '-';
1294
+ className?: string;
1295
+ }>();
1296
+
1297
+ const p = withDefaultProps<{
1298
+ tone: 'neutral' | 'accent';
1299
+ block: boolean;
1300
+ class: string;
1301
+ }>(props, {
1302
+ tone: 'neutral',
1303
+ block: '-',
1304
+ className: 'button',
1305
+ });
1306
+ </script>
1307
+
1308
+ <template>
1309
+ <button :class="p.class" :data-tone="p.tone" :data-block="p.block">
1310
+ <slot />
1311
+ </button>
1312
+ </template>
1313
+ ```
1314
+
1315
+ **Example With Exclusions:**
1316
+ ```ts
1317
+ import { withDefaultProps } from '@pastweb/vue';
1318
+
1319
+ const p = withDefaultProps(
1320
+ props,
1321
+ {
1322
+ tone: 'neutral',
1323
+ debug: false,
1324
+ internalFlag: true,
1325
+ },
1326
+ {
1327
+ exclude: ['debug', /^internal/],
1328
+ },
1329
+ );
1330
+ ```
1331
+
1332
+ ### `getEventHandlers`
1333
+
1334
+ `getEventHandlers` extracts Vue-style handler props into an object that can be passed to `v-on`. Handler props must start with `on` followed by an uppercase character, such as `onClick`, `onChange`, or `onUpdateModelValue`. Regular props such as `online` or `once` are ignored.
1335
+
1336
+ The returned event names are lower kebab case after removing the `on` prefix, so `onClick` becomes `click` and `onUpdateModelValue` becomes `update-model-value`.
1337
+
1338
+ > #### Syntax
1339
+ ```ts
1340
+ function getEventHandlers(
1341
+ props: Record<string, any>,
1342
+ options?: Options,
1343
+ ): Record<string, Function>
1344
+
1345
+ interface Options {
1346
+ exclude?: string | RegExp | Array<string | RegExp>;
1347
+ }
1348
+ ```
1349
+
1350
+ Parameters
1351
+ * `props`: `Record<string, any>`
1352
+ * Source object containing regular props and handler props.
1353
+ * `options`: `Options` _(optional)_
1354
+ * `exclude` removes matching extracted event names. Strings match exact event names and regular expressions match the kebab-cased event name.
1355
+
1356
+ Returns
1357
+ * `Record<string, Function>`
1358
+ * Event map ready for `v-on`.
1359
+
1360
+ **Example:**
1361
+ ```vue
1362
+ <script setup lang="ts">
1363
+ import { getEventHandlers } from '@pastweb/vue';
1364
+
1365
+ const props = defineProps<{
1366
+ title?: string;
1367
+ online?: () => void;
1368
+ onClick?: () => void;
1369
+ onUpdateModelValue?: (value: string) => void;
1370
+ }>();
1371
+
1372
+ const events = getEventHandlers(props, {
1373
+ exclude: 'update-model-value',
1374
+ });
1375
+ </script>
1376
+
1377
+ <template>
1378
+ <button v-on="events">
1379
+ {{ props.title }}
1380
+ </button>
1381
+ </template>
1382
+ ```
1383
+
1384
+ ### `withDefaultPropsHandlers`
1385
+
1386
+ `withDefaultPropsHandlers` combines `withDefaultProps` with event-handler extraction. It returns normalized props for `v-bind` and a separate event map for `v-on`, which is useful for wrapper components that forward both props and listeners.
1387
+
1388
+ Event handler props are detected only when the prop name starts with `on` followed by an uppercase character, such as `onClick`, `onChange`, or `onUpdateModelValue`. This keeps regular props such as `online` or `once` from being removed from the normalized props object.
1389
+
1390
+ > #### Syntax
1391
+ ```ts
1392
+ function withDefaultPropsHandlers<T>(
1393
+ props: Record<string, any>,
1394
+ defaults: Record<string, any>,
1395
+ options?: Options,
1396
+ ): [T, Record<string, Function>]
1397
+
1398
+ interface Options {
1399
+ booleanChars?: [string, string];
1400
+ className?: boolean;
1401
+ excludeProps?: string | RegExp | Array<string | RegExp>;
1402
+ excludeHandlers?: string | RegExp | Array<string | RegExp>;
1403
+ }
1404
+ ```
1405
+
1406
+ Parameters
1407
+ * `props`: `Record<string, any>`
1408
+ * Source Vue props object.
1409
+ * `defaults`: `Record<string, any>`
1410
+ * Defaults applied to regular props and default handlers.
1411
+ * `options`: `Options` _(optional)_
1412
+ * `booleanChars` and `className` are passed to `withDefaultProps`.
1413
+ * `excludeProps` excludes keys from default merging.
1414
+ * `excludeHandlers` excludes extracted event names after removing `on` and converting to kebab case.
1415
+
1416
+ Returns
1417
+ * `[T, Record<string, Function>]`
1418
+ * Normalized props and extracted event handlers.
1419
+
1420
+ **Example:**
1421
+ ```vue
1422
+ <script setup lang="ts">
1423
+ import { withDefaultPropsHandlers } from '@pastweb/vue';
1424
+
1425
+ const props = defineProps<{
1426
+ tone?: 'neutral' | 'accent';
1427
+ block?: '+' | '-';
1428
+ online?: () => void;
1429
+ onClick?: () => void;
1430
+ onUpdateModelValue?: (value: string) => void;
1431
+ }>();
1432
+
1433
+ const [p, events] = withDefaultPropsHandlers<{
1434
+ tone: 'neutral' | 'accent';
1435
+ block: boolean;
1436
+ online: () => void;
1437
+ }>(props, {
1438
+ tone: 'neutral',
1439
+ block: '-',
1440
+ online: () => {},
1441
+ onClick: () => {},
1442
+ onUpdateModelValue: () => {},
1443
+ });
1444
+ </script>
1445
+
1446
+ <template>
1447
+ <button v-bind="p" v-on="events">
1448
+ <slot />
1449
+ </button>
1450
+ </template>
1451
+ ```
1452
+
1453
+ ## License
1454
+
1455
+ [MIT](./LICENSE) License (c) 2026 [Domenico Pasto](https://github.com/pastweb)