@highstate/designer 0.1.0 → 0.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (335) hide show
  1. package/package.json +10 -8
  2. package/.output/nitro.json +0 -15
  3. package/.output/public/_nuxt/1jbH28Ud.js +0 -1
  4. package/.output/public/_nuxt/BAsjE6c8.js +0 -69
  5. package/.output/public/_nuxt/D4AvvZ3p.js +0 -1
  6. package/.output/public/_nuxt/DcSK-0AR.js +0 -1
  7. package/.output/public/_nuxt/builds/latest.json +0 -1
  8. package/.output/public/_nuxt/builds/meta/0ea9cf82-d280-4ae3-95c8-082f396c88c7.json +0 -1
  9. package/.output/public/_nuxt/entry.Df9XoxdB.css +0 -1
  10. package/.output/public/_nuxt/error-404.SWzu_puR.css +0 -1
  11. package/.output/public/_nuxt/error-500.Bkv_zTjr.css +0 -1
  12. package/.output/public/favicon.ico +0 -0
  13. package/.output/public/robots.txt +0 -1
  14. package/.output/server/chunks/_/error-500.mjs +0 -8
  15. package/.output/server/chunks/_/error-500.mjs.map +0 -1
  16. package/.output/server/chunks/_/index.mjs +0 -229
  17. package/.output/server/chunks/_/index.mjs.map +0 -1
  18. package/.output/server/chunks/build/ComponentIcon-styles.CVav5bPa.mjs +0 -6
  19. package/.output/server/chunks/build/ComponentIcon-styles.CVav5bPa.mjs.map +0 -1
  20. package/.output/server/chunks/build/ComponentIcon-styles.DJ59dQiL.mjs +0 -6
  21. package/.output/server/chunks/build/ComponentIcon-styles.DJ59dQiL.mjs.map +0 -1
  22. package/.output/server/chunks/build/ComponentNode-styles.5_iLK35r.mjs +0 -6
  23. package/.output/server/chunks/build/ComponentNode-styles.5_iLK35r.mjs.map +0 -1
  24. package/.output/server/chunks/build/ComponentNode-styles.7QJfF7h3.mjs +0 -6
  25. package/.output/server/chunks/build/ComponentNode-styles.7QJfF7h3.mjs.map +0 -1
  26. package/.output/server/chunks/build/ProjectCanvas-styles.B6yAk_TI.mjs +0 -7
  27. package/.output/server/chunks/build/ProjectCanvas-styles.B6yAk_TI.mjs.map +0 -1
  28. package/.output/server/chunks/build/ProjectCanvas-styles.BxP3nGl6.mjs +0 -6
  29. package/.output/server/chunks/build/ProjectCanvas-styles.BxP3nGl6.mjs.map +0 -1
  30. package/.output/server/chunks/build/ProjectCanvas-styles.CsOcKxeb.mjs +0 -6
  31. package/.output/server/chunks/build/ProjectCanvas-styles.CsOcKxeb.mjs.map +0 -1
  32. package/.output/server/chunks/build/VAppBar-styles.CaKoZ7v7.mjs +0 -6
  33. package/.output/server/chunks/build/VAppBar-styles.CaKoZ7v7.mjs.map +0 -1
  34. package/.output/server/chunks/build/VAvatar-styles.BloWs-NL.mjs +0 -6
  35. package/.output/server/chunks/build/VAvatar-styles.BloWs-NL.mjs.map +0 -1
  36. package/.output/server/chunks/build/VBtn-styles.5s8xLaPo.mjs +0 -6
  37. package/.output/server/chunks/build/VBtn-styles.5s8xLaPo.mjs.map +0 -1
  38. package/.output/server/chunks/build/VBtnGroup-styles.B8WSSc7t.mjs +0 -6
  39. package/.output/server/chunks/build/VBtnGroup-styles.B8WSSc7t.mjs.map +0 -1
  40. package/.output/server/chunks/build/VBtnToggle-styles.DRWSZkHZ.mjs +0 -6
  41. package/.output/server/chunks/build/VBtnToggle-styles.DRWSZkHZ.mjs.map +0 -1
  42. package/.output/server/chunks/build/VCard-styles.BpQql6F5.mjs +0 -6
  43. package/.output/server/chunks/build/VCard-styles.BpQql6F5.mjs.map +0 -1
  44. package/.output/server/chunks/build/VChip-styles.KvWWirvS.mjs +0 -6
  45. package/.output/server/chunks/build/VChip-styles.KvWWirvS.mjs.map +0 -1
  46. package/.output/server/chunks/build/VChipGroup-styles.SezSZY5I.mjs +0 -6
  47. package/.output/server/chunks/build/VChipGroup-styles.SezSZY5I.mjs.map +0 -1
  48. package/.output/server/chunks/build/VCounter-styles.DlbjDB7E.mjs +0 -6
  49. package/.output/server/chunks/build/VCounter-styles.DlbjDB7E.mjs.map +0 -1
  50. package/.output/server/chunks/build/VDivider-styles.B5vnnFG1.mjs +0 -6
  51. package/.output/server/chunks/build/VDivider-styles.B5vnnFG1.mjs.map +0 -1
  52. package/.output/server/chunks/build/VField-styles.DkgSx68C.mjs +0 -6
  53. package/.output/server/chunks/build/VField-styles.DkgSx68C.mjs.map +0 -1
  54. package/.output/server/chunks/build/VIcon-styles._8GsAkxR.mjs +0 -6
  55. package/.output/server/chunks/build/VIcon-styles._8GsAkxR.mjs.map +0 -1
  56. package/.output/server/chunks/build/VImg-styles.BQYU2VXD.mjs +0 -6
  57. package/.output/server/chunks/build/VImg-styles.BQYU2VXD.mjs.map +0 -1
  58. package/.output/server/chunks/build/VInput-styles.Cr1uxB2l.mjs +0 -6
  59. package/.output/server/chunks/build/VInput-styles.Cr1uxB2l.mjs.map +0 -1
  60. package/.output/server/chunks/build/VLabel-styles.OzbLNKaZ.mjs +0 -6
  61. package/.output/server/chunks/build/VLabel-styles.OzbLNKaZ.mjs.map +0 -1
  62. package/.output/server/chunks/build/VLayout-styles.DBbIk0kn.mjs +0 -6
  63. package/.output/server/chunks/build/VLayout-styles.DBbIk0kn.mjs.map +0 -1
  64. package/.output/server/chunks/build/VMain-styles.CI15Xs8y.mjs +0 -6
  65. package/.output/server/chunks/build/VMain-styles.CI15Xs8y.mjs.map +0 -1
  66. package/.output/server/chunks/build/VMessages-styles.C9dRMjf9.mjs +0 -6
  67. package/.output/server/chunks/build/VMessages-styles.C9dRMjf9.mjs.map +0 -1
  68. package/.output/server/chunks/build/VNavigationDrawer-styles.BcT_iIsk.mjs +0 -6
  69. package/.output/server/chunks/build/VNavigationDrawer-styles.BcT_iIsk.mjs.map +0 -1
  70. package/.output/server/chunks/build/VProgressCircular-styles.CWpXfZ6Q.mjs +0 -6
  71. package/.output/server/chunks/build/VProgressCircular-styles.CWpXfZ6Q.mjs.map +0 -1
  72. package/.output/server/chunks/build/VProgressLinear-styles.DjitzH7c.mjs +0 -6
  73. package/.output/server/chunks/build/VProgressLinear-styles.DjitzH7c.mjs.map +0 -1
  74. package/.output/server/chunks/build/VResponsive-styles.KUuswLet.mjs +0 -6
  75. package/.output/server/chunks/build/VResponsive-styles.KUuswLet.mjs.map +0 -1
  76. package/.output/server/chunks/build/VSlideGroup-styles.fT1UQTdA.mjs +0 -6
  77. package/.output/server/chunks/build/VSlideGroup-styles.fT1UQTdA.mjs.map +0 -1
  78. package/.output/server/chunks/build/VSpacer-styles.B_L0TU3-.mjs +0 -6
  79. package/.output/server/chunks/build/VSpacer-styles.B_L0TU3-.mjs.map +0 -1
  80. package/.output/server/chunks/build/VTextField-styles.e8Z3kCRA.mjs +0 -6
  81. package/.output/server/chunks/build/VTextField-styles.e8Z3kCRA.mjs.map +0 -1
  82. package/.output/server/chunks/build/VToolbar-styles.Bvr717Vh.mjs +0 -6
  83. package/.output/server/chunks/build/VToolbar-styles.Bvr717Vh.mjs.map +0 -1
  84. package/.output/server/chunks/build/app-styles.-ZJ3yGO7.mjs +0 -6
  85. package/.output/server/chunks/build/app-styles.-ZJ3yGO7.mjs.map +0 -1
  86. package/.output/server/chunks/build/app-styles.Ckjy6RrK.mjs +0 -6
  87. package/.output/server/chunks/build/app-styles.Ckjy6RrK.mjs.map +0 -1
  88. package/.output/server/chunks/build/client.manifest.mjs +0 -82
  89. package/.output/server/chunks/build/client.manifest.mjs.map +0 -1
  90. package/.output/server/chunks/build/entry-styles-10.mjs-BpLi0qx6.mjs +0 -4
  91. package/.output/server/chunks/build/entry-styles-10.mjs-BpLi0qx6.mjs.map +0 -1
  92. package/.output/server/chunks/build/entry-styles-11.mjs-6TeH4I7w.mjs +0 -4
  93. package/.output/server/chunks/build/entry-styles-11.mjs-6TeH4I7w.mjs.map +0 -1
  94. package/.output/server/chunks/build/entry-styles-12.mjs-DU1igcRL.mjs +0 -4
  95. package/.output/server/chunks/build/entry-styles-12.mjs-DU1igcRL.mjs.map +0 -1
  96. package/.output/server/chunks/build/entry-styles-13.mjs-lZGUjhhD.mjs +0 -4
  97. package/.output/server/chunks/build/entry-styles-13.mjs-lZGUjhhD.mjs.map +0 -1
  98. package/.output/server/chunks/build/entry-styles-14.mjs-BRdr1-px.mjs +0 -4
  99. package/.output/server/chunks/build/entry-styles-14.mjs-BRdr1-px.mjs.map +0 -1
  100. package/.output/server/chunks/build/entry-styles-15.mjs-mUPL6Nc9.mjs +0 -4
  101. package/.output/server/chunks/build/entry-styles-15.mjs-mUPL6Nc9.mjs.map +0 -1
  102. package/.output/server/chunks/build/entry-styles-16.mjs-CPJMcIL1.mjs +0 -4
  103. package/.output/server/chunks/build/entry-styles-16.mjs-CPJMcIL1.mjs.map +0 -1
  104. package/.output/server/chunks/build/entry-styles-17.mjs-CQOORRn5.mjs +0 -4
  105. package/.output/server/chunks/build/entry-styles-17.mjs-CQOORRn5.mjs.map +0 -1
  106. package/.output/server/chunks/build/entry-styles-18.mjs-C7z1LTi9.mjs +0 -4
  107. package/.output/server/chunks/build/entry-styles-18.mjs-C7z1LTi9.mjs.map +0 -1
  108. package/.output/server/chunks/build/entry-styles-19.mjs-it-LBeIM.mjs +0 -4
  109. package/.output/server/chunks/build/entry-styles-19.mjs-it-LBeIM.mjs.map +0 -1
  110. package/.output/server/chunks/build/entry-styles-2.mjs-CIKbACDD.mjs +0 -4
  111. package/.output/server/chunks/build/entry-styles-2.mjs-CIKbACDD.mjs.map +0 -1
  112. package/.output/server/chunks/build/entry-styles-20.mjs-Igpd8vNA.mjs +0 -4
  113. package/.output/server/chunks/build/entry-styles-20.mjs-Igpd8vNA.mjs.map +0 -1
  114. package/.output/server/chunks/build/entry-styles-21.mjs-VGEW4cec.mjs +0 -4
  115. package/.output/server/chunks/build/entry-styles-21.mjs-VGEW4cec.mjs.map +0 -1
  116. package/.output/server/chunks/build/entry-styles-22.mjs-DLAUZ2Ss.mjs +0 -4
  117. package/.output/server/chunks/build/entry-styles-22.mjs-DLAUZ2Ss.mjs.map +0 -1
  118. package/.output/server/chunks/build/entry-styles-23.mjs-D6dUb4Q1.mjs +0 -4
  119. package/.output/server/chunks/build/entry-styles-23.mjs-D6dUb4Q1.mjs.map +0 -1
  120. package/.output/server/chunks/build/entry-styles-24.mjs-CR2CscOT.mjs +0 -4
  121. package/.output/server/chunks/build/entry-styles-24.mjs-CR2CscOT.mjs.map +0 -1
  122. package/.output/server/chunks/build/entry-styles-25.mjs-gcGnyYj1.mjs +0 -4
  123. package/.output/server/chunks/build/entry-styles-25.mjs-gcGnyYj1.mjs.map +0 -1
  124. package/.output/server/chunks/build/entry-styles-26.mjs-BGcP6LjH.mjs +0 -4
  125. package/.output/server/chunks/build/entry-styles-26.mjs-BGcP6LjH.mjs.map +0 -1
  126. package/.output/server/chunks/build/entry-styles-27.mjs-DKPK367G.mjs +0 -4
  127. package/.output/server/chunks/build/entry-styles-27.mjs-DKPK367G.mjs.map +0 -1
  128. package/.output/server/chunks/build/entry-styles-28.mjs-BxlgEOUH.mjs +0 -4
  129. package/.output/server/chunks/build/entry-styles-28.mjs-BxlgEOUH.mjs.map +0 -1
  130. package/.output/server/chunks/build/entry-styles-29.mjs-EoZxjH32.mjs +0 -4
  131. package/.output/server/chunks/build/entry-styles-29.mjs-EoZxjH32.mjs.map +0 -1
  132. package/.output/server/chunks/build/entry-styles-3.mjs-BZeC22He.mjs +0 -4
  133. package/.output/server/chunks/build/entry-styles-3.mjs-BZeC22He.mjs.map +0 -1
  134. package/.output/server/chunks/build/entry-styles-30.mjs-CoAZ885y.mjs +0 -4
  135. package/.output/server/chunks/build/entry-styles-30.mjs-CoAZ885y.mjs.map +0 -1
  136. package/.output/server/chunks/build/entry-styles-31.mjs-JYOGcJtH.mjs +0 -4
  137. package/.output/server/chunks/build/entry-styles-31.mjs-JYOGcJtH.mjs.map +0 -1
  138. package/.output/server/chunks/build/entry-styles-32.mjs-lT-SGbzA.mjs +0 -4
  139. package/.output/server/chunks/build/entry-styles-32.mjs-lT-SGbzA.mjs.map +0 -1
  140. package/.output/server/chunks/build/entry-styles-33.mjs-CGVyg8PA.mjs +0 -4
  141. package/.output/server/chunks/build/entry-styles-33.mjs-CGVyg8PA.mjs.map +0 -1
  142. package/.output/server/chunks/build/entry-styles-4.mjs-DZ0RUZ3Y.mjs +0 -4
  143. package/.output/server/chunks/build/entry-styles-4.mjs-DZ0RUZ3Y.mjs.map +0 -1
  144. package/.output/server/chunks/build/entry-styles-5.mjs-CWoX264H.mjs +0 -4
  145. package/.output/server/chunks/build/entry-styles-5.mjs-CWoX264H.mjs.map +0 -1
  146. package/.output/server/chunks/build/entry-styles-6.mjs-D97cocWn.mjs +0 -4
  147. package/.output/server/chunks/build/entry-styles-6.mjs-D97cocWn.mjs.map +0 -1
  148. package/.output/server/chunks/build/entry-styles-7.mjs-fDLOEPrI.mjs +0 -4
  149. package/.output/server/chunks/build/entry-styles-7.mjs-fDLOEPrI.mjs.map +0 -1
  150. package/.output/server/chunks/build/entry-styles-8.mjs-CogORmQT.mjs +0 -4
  151. package/.output/server/chunks/build/entry-styles-8.mjs-CogORmQT.mjs.map +0 -1
  152. package/.output/server/chunks/build/entry-styles-9.mjs-CIkuJriK.mjs +0 -4
  153. package/.output/server/chunks/build/entry-styles-9.mjs-CIkuJriK.mjs.map +0 -1
  154. package/.output/server/chunks/build/entry-styles.CtA8hhgO.mjs +0 -39
  155. package/.output/server/chunks/build/entry-styles.CtA8hhgO.mjs.map +0 -1
  156. package/.output/server/chunks/build/error-404-BE32jcXw.mjs +0 -399
  157. package/.output/server/chunks/build/error-404-BE32jcXw.mjs.map +0 -1
  158. package/.output/server/chunks/build/error-404-styles-1.mjs-BnwklZPR.mjs +0 -4
  159. package/.output/server/chunks/build/error-404-styles-1.mjs-BnwklZPR.mjs.map +0 -1
  160. package/.output/server/chunks/build/error-404-styles.B5NDqGbJ.mjs +0 -6
  161. package/.output/server/chunks/build/error-404-styles.B5NDqGbJ.mjs.map +0 -1
  162. package/.output/server/chunks/build/error-404-styles.CeFcgbBS.mjs +0 -6
  163. package/.output/server/chunks/build/error-404-styles.CeFcgbBS.mjs.map +0 -1
  164. package/.output/server/chunks/build/error-500-B3vPuajn.mjs +0 -80
  165. package/.output/server/chunks/build/error-500-B3vPuajn.mjs.map +0 -1
  166. package/.output/server/chunks/build/error-500-styles-1.mjs-C2TN-owL.mjs +0 -4
  167. package/.output/server/chunks/build/error-500-styles-1.mjs-C2TN-owL.mjs.map +0 -1
  168. package/.output/server/chunks/build/error-500-styles.BE3GHqYY.mjs +0 -6
  169. package/.output/server/chunks/build/error-500-styles.BE3GHqYY.mjs.map +0 -1
  170. package/.output/server/chunks/build/error-500-styles.LQn8-gvg.mjs +0 -6
  171. package/.output/server/chunks/build/error-500-styles.LQn8-gvg.mjs.map +0 -1
  172. package/.output/server/chunks/build/index-C2merokO.mjs +0 -34
  173. package/.output/server/chunks/build/index-C2merokO.mjs.map +0 -1
  174. package/.output/server/chunks/build/index-styles.C7jmw0Wl.mjs +0 -6
  175. package/.output/server/chunks/build/index-styles.C7jmw0Wl.mjs.map +0 -1
  176. package/.output/server/chunks/build/server.mjs +0 -10495
  177. package/.output/server/chunks/build/server.mjs.map +0 -1
  178. package/.output/server/chunks/build/styles.mjs +0 -47
  179. package/.output/server/chunks/build/styles.mjs.map +0 -1
  180. package/.output/server/chunks/nitro/nitro.mjs +0 -6203
  181. package/.output/server/chunks/nitro/nitro.mjs.map +0 -1
  182. package/.output/server/chunks/routes/api/_trpc_.mjs +0 -209
  183. package/.output/server/chunks/routes/api/_trpc_.mjs.map +0 -1
  184. package/.output/server/chunks/routes/renderer.mjs +0 -391
  185. package/.output/server/chunks/routes/renderer.mjs.map +0 -1
  186. package/.output/server/chunks/virtual/_virtual_spa-template.mjs +0 -4
  187. package/.output/server/chunks/virtual/_virtual_spa-template.mjs.map +0 -1
  188. package/.output/server/index.mjs +0 -7
  189. package/.output/server/index.mjs.map +0 -1
  190. package/.output/server/node_modules/@babel/parser/lib/index.js +0 -14023
  191. package/.output/server/node_modules/@babel/parser/package.json +0 -50
  192. package/.output/server/node_modules/@iconify/vue/dist/iconify.mjs +0 -1996
  193. package/.output/server/node_modules/@iconify/vue/package.json +0 -65
  194. package/.output/server/node_modules/@trpc/client/dist/TRPCClientError-38f9a32a.mjs +0 -59
  195. package/.output/server/node_modules/@trpc/client/dist/httpBatchLink-d0f9eac9.mjs +0 -248
  196. package/.output/server/node_modules/@trpc/client/dist/httpUtils-b9d0cb48.mjs +0 -144
  197. package/.output/server/node_modules/@trpc/client/dist/index.mjs +0 -365
  198. package/.output/server/node_modules/@trpc/client/dist/links/httpLink.mjs +0 -62
  199. package/.output/server/node_modules/@trpc/client/dist/links/loggerLink.mjs +0 -173
  200. package/.output/server/node_modules/@trpc/client/dist/links/wsLink.mjs +0 -278
  201. package/.output/server/node_modules/@trpc/client/dist/splitLink-4c75f7be.mjs +0 -45
  202. package/.output/server/node_modules/@trpc/client/dist/transformResult-ace864b8.mjs +0 -58
  203. package/.output/server/node_modules/@trpc/client/package.json +0 -101
  204. package/.output/server/node_modules/@trpc/server/dist/TRPCError-98d44758.mjs +0 -39
  205. package/.output/server/node_modules/@trpc/server/dist/batchStreamFormatter-fc1ffb26.mjs +0 -30
  206. package/.output/server/node_modules/@trpc/server/dist/codes-c924c3db.mjs +0 -44
  207. package/.output/server/node_modules/@trpc/server/dist/config-d5fdbd39.mjs +0 -196
  208. package/.output/server/node_modules/@trpc/server/dist/contentType-9fd995d3.mjs +0 -52
  209. package/.output/server/node_modules/@trpc/server/dist/getCauseFromUnknown-2d66414a.mjs +0 -33
  210. package/.output/server/node_modules/@trpc/server/dist/http/index.mjs +0 -9
  211. package/.output/server/node_modules/@trpc/server/dist/index-f91d720c.mjs +0 -97
  212. package/.output/server/node_modules/@trpc/server/dist/index.mjs +0 -871
  213. package/.output/server/node_modules/@trpc/server/dist/observable/index.mjs +0 -147
  214. package/.output/server/node_modules/@trpc/server/dist/observable-ade1bad8.mjs +0 -81
  215. package/.output/server/node_modules/@trpc/server/dist/resolveHTTPResponse-2fc435bb.mjs +0 -291
  216. package/.output/server/node_modules/@trpc/server/dist/shared/index.mjs +0 -4
  217. package/.output/server/node_modules/@trpc/server/dist/transformTRPCResponse-1153b421.mjs +0 -53
  218. package/.output/server/node_modules/@trpc/server/package.json +0 -177
  219. package/.output/server/node_modules/@unhead/dom/dist/index.mjs +0 -197
  220. package/.output/server/node_modules/@unhead/dom/package.json +0 -40
  221. package/.output/server/node_modules/@unhead/shared/dist/index.mjs +0 -731
  222. package/.output/server/node_modules/@unhead/shared/package.json +0 -47
  223. package/.output/server/node_modules/@unhead/ssr/dist/index.mjs +0 -95
  224. package/.output/server/node_modules/@unhead/ssr/package.json +0 -40
  225. package/.output/server/node_modules/@vue/compiler-core/dist/compiler-core.cjs.prod.js +0 -6690
  226. package/.output/server/node_modules/@vue/compiler-core/package.json +0 -58
  227. package/.output/server/node_modules/@vue/compiler-dom/dist/compiler-dom.cjs.prod.js +0 -686
  228. package/.output/server/node_modules/@vue/compiler-dom/package.json +0 -57
  229. package/.output/server/node_modules/@vue/compiler-ssr/dist/compiler-ssr.cjs.js +0 -1404
  230. package/.output/server/node_modules/@vue/compiler-ssr/package.json +0 -34
  231. package/.output/server/node_modules/@vue/reactivity/dist/reactivity.cjs.prod.js +0 -1789
  232. package/.output/server/node_modules/@vue/reactivity/package.json +0 -55
  233. package/.output/server/node_modules/@vue/runtime-core/dist/runtime-core.cjs.prod.js +0 -6654
  234. package/.output/server/node_modules/@vue/runtime-core/package.json +0 -52
  235. package/.output/server/node_modules/@vue/runtime-dom/dist/runtime-dom.cjs.prod.js +0 -1669
  236. package/.output/server/node_modules/@vue/runtime-dom/package.json +0 -60
  237. package/.output/server/node_modules/@vue/server-renderer/dist/server-renderer.cjs.prod.js +0 -857
  238. package/.output/server/node_modules/@vue/server-renderer/package.json +0 -55
  239. package/.output/server/node_modules/@vue/shared/dist/shared.cjs.prod.js +0 -594
  240. package/.output/server/node_modules/@vue/shared/package.json +0 -47
  241. package/.output/server/node_modules/@vue-flow/background/dist/vue-flow-background.mjs +0 -126
  242. package/.output/server/node_modules/@vue-flow/background/package.json +0 -73
  243. package/.output/server/node_modules/@vue-flow/core/dist/vue-flow-core.mjs +0 -9873
  244. package/.output/server/node_modules/@vue-flow/core/package.json +0 -92
  245. package/.output/server/node_modules/@vue-flow/minimap/dist/vue-flow-minimap.mjs +0 -2953
  246. package/.output/server/node_modules/@vue-flow/minimap/package.json +0 -80
  247. package/.output/server/node_modules/devalue/index.js +0 -3
  248. package/.output/server/node_modules/devalue/package.json +0 -34
  249. package/.output/server/node_modules/devalue/src/base64.js +0 -110
  250. package/.output/server/node_modules/devalue/src/constants.js +0 -6
  251. package/.output/server/node_modules/devalue/src/parse.js +0 -160
  252. package/.output/server/node_modules/devalue/src/stringify.js +0 -232
  253. package/.output/server/node_modules/devalue/src/uneval.js +0 -351
  254. package/.output/server/node_modules/devalue/src/utils.js +0 -113
  255. package/.output/server/node_modules/entities/lib/decode.js +0 -536
  256. package/.output/server/node_modules/entities/lib/decode_codepoint.js +0 -76
  257. package/.output/server/node_modules/entities/lib/generated/decode-data-html.js +0 -9
  258. package/.output/server/node_modules/entities/lib/generated/decode-data-xml.js +0 -9
  259. package/.output/server/node_modules/entities/package.json +0 -90
  260. package/.output/server/node_modules/estree-walker/dist/umd/estree-walker.js +0 -344
  261. package/.output/server/node_modules/estree-walker/package.json +0 -37
  262. package/.output/server/node_modules/hookable/dist/index.mjs +0 -290
  263. package/.output/server/node_modules/hookable/package.json +0 -49
  264. package/.output/server/node_modules/nanoid/index.js +0 -46
  265. package/.output/server/node_modules/nanoid/package.json +0 -41
  266. package/.output/server/node_modules/nanoid/url-alphabet/index.js +0 -2
  267. package/.output/server/node_modules/pinia/dist/pinia.prod.cjs +0 -858
  268. package/.output/server/node_modules/pinia/package.json +0 -100
  269. package/.output/server/node_modules/source-map-js/lib/array-set.js +0 -121
  270. package/.output/server/node_modules/source-map-js/lib/base64-vlq.js +0 -140
  271. package/.output/server/node_modules/source-map-js/lib/base64.js +0 -67
  272. package/.output/server/node_modules/source-map-js/lib/binary-search.js +0 -111
  273. package/.output/server/node_modules/source-map-js/lib/mapping-list.js +0 -79
  274. package/.output/server/node_modules/source-map-js/lib/quick-sort.js +0 -132
  275. package/.output/server/node_modules/source-map-js/lib/source-map-consumer.js +0 -1188
  276. package/.output/server/node_modules/source-map-js/lib/source-map-generator.js +0 -444
  277. package/.output/server/node_modules/source-map-js/lib/source-node.js +0 -413
  278. package/.output/server/node_modules/source-map-js/lib/util.js +0 -594
  279. package/.output/server/node_modules/source-map-js/package.json +0 -71
  280. package/.output/server/node_modules/source-map-js/source-map.js +0 -8
  281. package/.output/server/node_modules/ufo/dist/index.mjs +0 -630
  282. package/.output/server/node_modules/ufo/package.json +0 -47
  283. package/.output/server/node_modules/unhead/dist/index.mjs +0 -747
  284. package/.output/server/node_modules/unhead/package.json +0 -46
  285. package/.output/server/node_modules/vue/dist/vue.cjs.js +0 -80
  286. package/.output/server/node_modules/vue/dist/vue.cjs.prod.js +0 -66
  287. package/.output/server/node_modules/vue/index.js +0 -7
  288. package/.output/server/node_modules/vue/index.mjs +0 -1
  289. package/.output/server/node_modules/vue/package.json +0 -112
  290. package/.output/server/node_modules/vue/server-renderer/index.mjs +0 -1
  291. package/.output/server/node_modules/vue-bundle-renderer/dist/runtime.mjs +0 -196
  292. package/.output/server/node_modules/vue-bundle-renderer/package.json +0 -50
  293. package/.output/server/node_modules/vue-demi/lib/index.cjs +0 -29
  294. package/.output/server/node_modules/vue-demi/package.json +0 -47
  295. package/.output/server/node_modules/zod/lib/index.mjs +0 -4236
  296. package/.output/server/node_modules/zod/package.json +0 -119
  297. package/.output/server/node_modules/zod-to-json-schema/dist/esm/Options.js +0 -31
  298. package/.output/server/node_modules/zod-to-json-schema/dist/esm/Refs.js +0 -21
  299. package/.output/server/node_modules/zod-to-json-schema/dist/esm/errorMessages.js +0 -14
  300. package/.output/server/node_modules/zod-to-json-schema/dist/esm/index.js +0 -37
  301. package/.output/server/node_modules/zod-to-json-schema/dist/esm/package.json +0 -1
  302. package/.output/server/node_modules/zod-to-json-schema/dist/esm/parseDef.js +0 -164
  303. package/.output/server/node_modules/zod-to-json-schema/dist/esm/parsers/any.js +0 -3
  304. package/.output/server/node_modules/zod-to-json-schema/dist/esm/parsers/array.js +0 -25
  305. package/.output/server/node_modules/zod-to-json-schema/dist/esm/parsers/bigint.js +0 -49
  306. package/.output/server/node_modules/zod-to-json-schema/dist/esm/parsers/boolean.js +0 -5
  307. package/.output/server/node_modules/zod-to-json-schema/dist/esm/parsers/branded.js +0 -4
  308. package/.output/server/node_modules/zod-to-json-schema/dist/esm/parsers/catch.js +0 -4
  309. package/.output/server/node_modules/zod-to-json-schema/dist/esm/parsers/date.js +0 -46
  310. package/.output/server/node_modules/zod-to-json-schema/dist/esm/parsers/default.js +0 -7
  311. package/.output/server/node_modules/zod-to-json-schema/dist/esm/parsers/effects.js +0 -6
  312. package/.output/server/node_modules/zod-to-json-schema/dist/esm/parsers/enum.js +0 -6
  313. package/.output/server/node_modules/zod-to-json-schema/dist/esm/parsers/intersection.js +0 -52
  314. package/.output/server/node_modules/zod-to-json-schema/dist/esm/parsers/literal.js +0 -21
  315. package/.output/server/node_modules/zod-to-json-schema/dist/esm/parsers/map.js +0 -25
  316. package/.output/server/node_modules/zod-to-json-schema/dist/esm/parsers/nativeEnum.js +0 -16
  317. package/.output/server/node_modules/zod-to-json-schema/dist/esm/parsers/never.js +0 -5
  318. package/.output/server/node_modules/zod-to-json-schema/dist/esm/parsers/null.js +0 -10
  319. package/.output/server/node_modules/zod-to-json-schema/dist/esm/parsers/nullable.js +0 -33
  320. package/.output/server/node_modules/zod-to-json-schema/dist/esm/parsers/number.js +0 -52
  321. package/.output/server/node_modules/zod-to-json-schema/dist/esm/parsers/object.js +0 -45
  322. package/.output/server/node_modules/zod-to-json-schema/dist/esm/parsers/optional.js +0 -20
  323. package/.output/server/node_modules/zod-to-json-schema/dist/esm/parsers/pipeline.js +0 -20
  324. package/.output/server/node_modules/zod-to-json-schema/dist/esm/parsers/promise.js +0 -4
  325. package/.output/server/node_modules/zod-to-json-schema/dist/esm/parsers/readonly.js +0 -4
  326. package/.output/server/node_modules/zod-to-json-schema/dist/esm/parsers/record.js +0 -57
  327. package/.output/server/node_modules/zod-to-json-schema/dist/esm/parsers/set.js +0 -20
  328. package/.output/server/node_modules/zod-to-json-schema/dist/esm/parsers/string.js +0 -324
  329. package/.output/server/node_modules/zod-to-json-schema/dist/esm/parsers/tuple.js +0 -32
  330. package/.output/server/node_modules/zod-to-json-schema/dist/esm/parsers/undefined.js +0 -5
  331. package/.output/server/node_modules/zod-to-json-schema/dist/esm/parsers/union.js +0 -80
  332. package/.output/server/node_modules/zod-to-json-schema/dist/esm/parsers/unknown.js +0 -3
  333. package/.output/server/node_modules/zod-to-json-schema/dist/esm/zodToJsonSchema.js +0 -59
  334. package/.output/server/node_modules/zod-to-json-schema/package.json +0 -89
  335. package/.output/server/package.json +0 -1
@@ -1,747 +0,0 @@
1
- import { DomPlugin } from '@unhead/dom';
2
- import { defineHeadPlugin, tagDedupeKey, hashTag, tagWeight, HasElementTags, NetworkEvents, hashCode, SortModifiers, processTemplateParams, resolveTitleTemplate, IsBrowser, normaliseEntryTags, composableNames, whitelistSafeInput, ScriptNetworkEvents, unpackMeta } from '@unhead/shared';
3
- export { composableNames } from '@unhead/shared';
4
- import { createHooks } from 'hookable';
5
-
6
- const UsesMergeStrategy = /* @__PURE__ */ new Set(["templateParams", "htmlAttrs", "bodyAttrs"]);
7
- const DedupePlugin = defineHeadPlugin({
8
- hooks: {
9
- "tag:normalise": ({ tag }) => {
10
- if (tag.props.hid) {
11
- tag.key = tag.props.hid;
12
- delete tag.props.hid;
13
- }
14
- if (tag.props.vmid) {
15
- tag.key = tag.props.vmid;
16
- delete tag.props.vmid;
17
- }
18
- if (tag.props.key) {
19
- tag.key = tag.props.key;
20
- delete tag.props.key;
21
- }
22
- const generatedKey = tagDedupeKey(tag);
23
- if (generatedKey && !generatedKey.startsWith("meta:og:") && !generatedKey.startsWith("meta:twitter:")) {
24
- delete tag.key;
25
- }
26
- const dedupe = generatedKey || (tag.key ? `${tag.tag}:${tag.key}` : false);
27
- if (dedupe)
28
- tag._d = dedupe;
29
- },
30
- "tags:resolve": (ctx) => {
31
- const deduping = /* @__PURE__ */ Object.create(null);
32
- for (const tag of ctx.tags) {
33
- const dedupeKey = (tag.key ? `${tag.tag}:${tag.key}` : tag._d) || hashTag(tag);
34
- const dupedTag = deduping[dedupeKey];
35
- if (dupedTag) {
36
- let strategy = tag?.tagDuplicateStrategy;
37
- if (!strategy && UsesMergeStrategy.has(tag.tag))
38
- strategy = "merge";
39
- if (strategy === "merge") {
40
- const oldProps = dupedTag.props;
41
- if (oldProps.style && tag.props.style) {
42
- if (oldProps.style[oldProps.style.length - 1] !== ";") {
43
- oldProps.style += ";";
44
- }
45
- tag.props.style = `${oldProps.style} ${tag.props.style}`;
46
- }
47
- if (oldProps.class && tag.props.class) {
48
- tag.props.class = `${oldProps.class} ${tag.props.class}`;
49
- } else if (oldProps.class) {
50
- tag.props.class = oldProps.class;
51
- }
52
- deduping[dedupeKey].props = {
53
- ...oldProps,
54
- ...tag.props
55
- };
56
- continue;
57
- } else if (tag._e === dupedTag._e) {
58
- dupedTag._duped = dupedTag._duped || [];
59
- tag._d = `${dupedTag._d}:${dupedTag._duped.length + 1}`;
60
- dupedTag._duped.push(tag);
61
- continue;
62
- } else if (tagWeight(tag) > tagWeight(dupedTag)) {
63
- continue;
64
- }
65
- }
66
- const hasProps = tag.innerHTML || tag.textContent || Object.keys(tag.props).length !== 0;
67
- if (!hasProps && HasElementTags.has(tag.tag)) {
68
- delete deduping[dedupeKey];
69
- continue;
70
- }
71
- deduping[dedupeKey] = tag;
72
- }
73
- const newTags = [];
74
- for (const key in deduping) {
75
- const tag = deduping[key];
76
- const dupes = tag._duped;
77
- newTags.push(tag);
78
- if (dupes) {
79
- delete tag._duped;
80
- newTags.push(...dupes);
81
- }
82
- }
83
- ctx.tags = newTags;
84
- ctx.tags = ctx.tags.filter((t) => !(t.tag === "meta" && (t.props.name || t.props.property) && !t.props.content));
85
- }
86
- }
87
- });
88
-
89
- const ValidEventTags = /* @__PURE__ */ new Set(["script", "link", "bodyAttrs"]);
90
- const EventHandlersPlugin = defineHeadPlugin((head) => ({
91
- hooks: {
92
- "tags:resolve": (ctx) => {
93
- for (const tag of ctx.tags) {
94
- if (!ValidEventTags.has(tag.tag)) {
95
- continue;
96
- }
97
- const props = tag.props;
98
- for (const key in props) {
99
- if (key[0] !== "o" || key[1] !== "n") {
100
- continue;
101
- }
102
- if (!Object.prototype.hasOwnProperty.call(props, key)) {
103
- continue;
104
- }
105
- const value = props[key];
106
- if (typeof value !== "function") {
107
- continue;
108
- }
109
- if (head.ssr && NetworkEvents.has(key)) {
110
- props[key] = `this.dataset.${key}fired = true`;
111
- } else {
112
- delete props[key];
113
- }
114
- tag._eventHandlers = tag._eventHandlers || {};
115
- tag._eventHandlers[key] = value;
116
- }
117
- if (head.ssr && tag._eventHandlers && (tag.props.src || tag.props.href)) {
118
- tag.key = tag.key || hashCode(tag.props.src || tag.props.href);
119
- }
120
- }
121
- },
122
- "dom:renderTag": ({ $el, tag }) => {
123
- const dataset = $el?.dataset;
124
- if (!dataset) {
125
- return;
126
- }
127
- for (const k in dataset) {
128
- if (!k.endsWith("fired")) {
129
- continue;
130
- }
131
- const ek = k.slice(0, -5);
132
- if (!NetworkEvents.has(ek)) {
133
- continue;
134
- }
135
- tag._eventHandlers?.[ek]?.call($el, new Event(ek.substring(2)));
136
- }
137
- }
138
- }
139
- }));
140
-
141
- const DupeableTags = /* @__PURE__ */ new Set(["link", "style", "script", "noscript"]);
142
- const HashKeyedPlugin = defineHeadPlugin({
143
- hooks: {
144
- "tag:normalise": ({ tag }) => {
145
- if (tag.key && DupeableTags.has(tag.tag)) {
146
- tag.props["data-hid"] = tag._h = hashCode(tag.key);
147
- }
148
- }
149
- }
150
- });
151
-
152
- const PayloadPlugin = defineHeadPlugin({
153
- mode: "server",
154
- hooks: {
155
- "tags:beforeResolve": (ctx) => {
156
- const payload = {};
157
- let hasPayload = false;
158
- for (const tag of ctx.tags) {
159
- if (tag._m !== "server" || tag.tag !== "titleTemplate" && tag.tag !== "templateParams" && tag.tag !== "title") {
160
- continue;
161
- }
162
- payload[tag.tag] = tag.tag === "title" || tag.tag === "titleTemplate" ? tag.textContent : tag.props;
163
- hasPayload = true;
164
- }
165
- if (hasPayload) {
166
- ctx.tags.push({
167
- tag: "script",
168
- innerHTML: JSON.stringify(payload),
169
- props: { id: "unhead:payload", type: "application/json" }
170
- });
171
- }
172
- }
173
- }
174
- });
175
-
176
- const SortPlugin = defineHeadPlugin({
177
- hooks: {
178
- "tags:resolve": (ctx) => {
179
- for (const tag of ctx.tags) {
180
- if (typeof tag.tagPriority !== "string") {
181
- continue;
182
- }
183
- for (const { prefix, offset } of SortModifiers) {
184
- if (!tag.tagPriority.startsWith(prefix)) {
185
- continue;
186
- }
187
- const key = tag.tagPriority.substring(prefix.length);
188
- const position = ctx.tags.find((tag2) => tag2._d === key)?._p;
189
- if (position !== void 0) {
190
- tag._p = position + offset;
191
- break;
192
- }
193
- }
194
- }
195
- ctx.tags.sort((a, b) => {
196
- const aWeight = tagWeight(a);
197
- const bWeight = tagWeight(b);
198
- if (aWeight < bWeight) {
199
- return -1;
200
- } else if (aWeight > bWeight) {
201
- return 1;
202
- }
203
- return a._p - b._p;
204
- });
205
- }
206
- }
207
- });
208
-
209
- const SupportedAttrs = {
210
- meta: "content",
211
- link: "href",
212
- htmlAttrs: "lang"
213
- };
214
- const contentAttrs = ["innerHTML", "textContent"];
215
- const TemplateParamsPlugin = defineHeadPlugin((head) => ({
216
- hooks: {
217
- "tags:resolve": (ctx) => {
218
- const { tags } = ctx;
219
- let templateParams;
220
- for (let i = 0; i < tags.length; i += 1) {
221
- const tag = tags[i];
222
- if (tag.tag !== "templateParams") {
223
- continue;
224
- }
225
- templateParams = ctx.tags.splice(i, 1)[0].props;
226
- i -= 1;
227
- }
228
- const params = templateParams || {};
229
- const sep = params.separator || "|";
230
- delete params.separator;
231
- params.pageTitle = processTemplateParams(
232
- // find templateParams
233
- params.pageTitle || tags.find((tag) => tag.tag === "title")?.textContent || "",
234
- params,
235
- sep
236
- );
237
- for (const tag of tags) {
238
- if (tag.processTemplateParams === false) {
239
- continue;
240
- }
241
- const v = SupportedAttrs[tag.tag];
242
- if (v && typeof tag.props[v] === "string") {
243
- tag.props[v] = processTemplateParams(tag.props[v], params, sep);
244
- } else if (tag.processTemplateParams || tag.tag === "titleTemplate" || tag.tag === "title") {
245
- for (const p of contentAttrs) {
246
- if (typeof tag[p] === "string")
247
- tag[p] = processTemplateParams(tag[p], params, sep, tag.tag === "script" && tag.props.type.endsWith("json"));
248
- }
249
- }
250
- }
251
- head._templateParams = params;
252
- head._separator = sep;
253
- },
254
- "tags:afterResolve": ({ tags }) => {
255
- let title;
256
- for (let i = 0; i < tags.length; i += 1) {
257
- const tag = tags[i];
258
- if (tag.tag === "title" && tag.processTemplateParams !== false) {
259
- title = tag;
260
- }
261
- }
262
- if (title?.textContent) {
263
- title.textContent = processTemplateParams(title.textContent, head._templateParams, head._separator);
264
- }
265
- }
266
- }
267
- }));
268
-
269
- const TitleTemplatePlugin = defineHeadPlugin({
270
- hooks: {
271
- "tags:resolve": (ctx) => {
272
- const { tags } = ctx;
273
- let titleTag;
274
- let titleTemplateTag;
275
- for (let i = 0; i < tags.length; i += 1) {
276
- const tag = tags[i];
277
- if (tag.tag === "title") {
278
- titleTag = tag;
279
- } else if (tag.tag === "titleTemplate") {
280
- titleTemplateTag = tag;
281
- }
282
- }
283
- if (titleTemplateTag && titleTag) {
284
- const newTitle = resolveTitleTemplate(
285
- titleTemplateTag.textContent,
286
- titleTag.textContent
287
- );
288
- if (newTitle !== null) {
289
- titleTag.textContent = newTitle || titleTag.textContent;
290
- } else {
291
- ctx.tags.splice(ctx.tags.indexOf(titleTag), 1);
292
- }
293
- } else if (titleTemplateTag) {
294
- const newTitle = resolveTitleTemplate(
295
- titleTemplateTag.textContent
296
- );
297
- if (newTitle !== null) {
298
- titleTemplateTag.textContent = newTitle;
299
- titleTemplateTag.tag = "title";
300
- titleTemplateTag = void 0;
301
- }
302
- }
303
- if (titleTemplateTag) {
304
- ctx.tags.splice(ctx.tags.indexOf(titleTemplateTag), 1);
305
- }
306
- }
307
- }
308
- });
309
-
310
- const XSSPlugin = defineHeadPlugin({
311
- hooks: {
312
- "tags:afterResolve": (ctx) => {
313
- for (const tag of ctx.tags) {
314
- if (typeof tag.innerHTML === "string") {
315
- if (tag.innerHTML && (tag.props.type === "application/ld+json" || tag.props.type === "application/json")) {
316
- tag.innerHTML = tag.innerHTML.replace(/</g, "\\u003C");
317
- } else {
318
- tag.innerHTML = tag.innerHTML.replace(new RegExp(`</${tag.tag}`, "g"), `<\\/${tag.tag}`);
319
- }
320
- }
321
- }
322
- }
323
- }
324
- });
325
-
326
- let activeHead;
327
- // @__NO_SIDE_EFFECTS__
328
- function createHead(options = {}) {
329
- const head = createHeadCore(options);
330
- head.use(DomPlugin());
331
- return activeHead = head;
332
- }
333
- // @__NO_SIDE_EFFECTS__
334
- function createServerHead(options = {}) {
335
- return activeHead = createHeadCore(options);
336
- }
337
- function filterMode(mode, ssr) {
338
- return !mode || mode === "server" && ssr || mode === "client" && !ssr;
339
- }
340
- function createHeadCore(options = {}) {
341
- const hooks = createHooks();
342
- hooks.addHooks(options.hooks || {});
343
- options.document = options.document || (IsBrowser ? document : void 0);
344
- const ssr = !options.document;
345
- const updated = () => {
346
- head.dirty = true;
347
- hooks.callHook("entries:updated", head);
348
- };
349
- let entryCount = 0;
350
- let entries = [];
351
- const plugins = [];
352
- const head = {
353
- plugins,
354
- dirty: false,
355
- resolvedOptions: options,
356
- hooks,
357
- headEntries() {
358
- return entries;
359
- },
360
- use(p) {
361
- const plugin = typeof p === "function" ? p(head) : p;
362
- if (!plugin.key || !plugins.some((p2) => p2.key === plugin.key)) {
363
- plugins.push(plugin);
364
- filterMode(plugin.mode, ssr) && hooks.addHooks(plugin.hooks || {});
365
- }
366
- },
367
- push(input, entryOptions) {
368
- delete entryOptions?.head;
369
- const entry = {
370
- _i: entryCount++,
371
- input,
372
- ...entryOptions
373
- };
374
- if (filterMode(entry.mode, ssr)) {
375
- entries.push(entry);
376
- updated();
377
- }
378
- return {
379
- dispose() {
380
- entries = entries.filter((e) => e._i !== entry._i);
381
- updated();
382
- },
383
- // a patch is the same as creating a new entry, just a nice DX
384
- patch(input2) {
385
- for (const e of entries) {
386
- if (e._i === entry._i) {
387
- e.input = entry.input = input2;
388
- }
389
- }
390
- updated();
391
- }
392
- };
393
- },
394
- async resolveTags() {
395
- const resolveCtx = { tags: [], entries: [...entries] };
396
- await hooks.callHook("entries:resolve", resolveCtx);
397
- for (const entry of resolveCtx.entries) {
398
- const resolved = entry.resolvedInput || entry.input;
399
- entry.resolvedInput = await (entry.transform ? entry.transform(resolved) : resolved);
400
- if (entry.resolvedInput) {
401
- for (const tag of await normaliseEntryTags(entry)) {
402
- const tagCtx = { tag, entry, resolvedOptions: head.resolvedOptions };
403
- await hooks.callHook("tag:normalise", tagCtx);
404
- resolveCtx.tags.push(tagCtx.tag);
405
- }
406
- }
407
- }
408
- await hooks.callHook("tags:beforeResolve", resolveCtx);
409
- await hooks.callHook("tags:resolve", resolveCtx);
410
- await hooks.callHook("tags:afterResolve", resolveCtx);
411
- return resolveCtx.tags;
412
- },
413
- ssr
414
- };
415
- [
416
- DedupePlugin,
417
- PayloadPlugin,
418
- EventHandlersPlugin,
419
- HashKeyedPlugin,
420
- SortPlugin,
421
- TemplateParamsPlugin,
422
- TitleTemplatePlugin,
423
- XSSPlugin,
424
- ...options?.plugins || []
425
- ].forEach((p) => head.use(p));
426
- head.hooks.callHook("init", head);
427
- return head;
428
- }
429
-
430
- const unheadComposablesImports = [
431
- {
432
- from: "unhead",
433
- imports: composableNames
434
- }
435
- ];
436
-
437
- function getActiveHead() {
438
- return activeHead;
439
- }
440
-
441
- function useHead(input, options = {}) {
442
- const head = options.head || getActiveHead();
443
- return head?.push(input, options);
444
- }
445
-
446
- function useHeadSafe(input, options) {
447
- return useHead(input, {
448
- ...options,
449
- transform: whitelistSafeInput
450
- });
451
- }
452
-
453
- const ScriptProxyTarget = Symbol("ScriptProxyTarget");
454
- function scriptProxy() {
455
- }
456
- scriptProxy[ScriptProxyTarget] = true;
457
- function resolveScriptKey(input) {
458
- return input.key || hashCode(input.src || (typeof input.innerHTML === "string" ? input.innerHTML : ""));
459
- }
460
- function useScript(_input, _options) {
461
- const input = typeof _input === "string" ? { src: _input } : _input;
462
- const options = _options || {};
463
- const head = options.head || getActiveHead();
464
- if (!head)
465
- throw new Error("Missing Unhead context.");
466
- const id = resolveScriptKey(input);
467
- const prevScript = head._scripts?.[id];
468
- if (prevScript) {
469
- prevScript.setupTriggerHandler(options.trigger);
470
- return prevScript;
471
- }
472
- options.beforeInit?.();
473
- const syncStatus = (s) => {
474
- script.status = s;
475
- head.hooks.callHook(`script:updated`, hookCtx);
476
- };
477
- ScriptNetworkEvents.forEach((fn) => {
478
- const _fn = typeof input[fn] === "function" ? input[fn].bind(options.eventContext) : null;
479
- input[fn] = (e) => {
480
- syncStatus(fn === "onload" ? "loaded" : fn === "onerror" ? "error" : "loading");
481
- _fn?.(e);
482
- };
483
- });
484
- const _cbs = { loaded: [], error: [] };
485
- const _registerCb = (key, cb) => {
486
- if (_cbs[key]) {
487
- const i = _cbs[key].push(cb);
488
- return () => _cbs[key]?.splice(i - 1, 1);
489
- }
490
- cb(script.instance);
491
- return () => {
492
- };
493
- };
494
- const loadPromise = new Promise((resolve) => {
495
- if (head.ssr)
496
- return;
497
- const emit = (api) => requestAnimationFrame(() => resolve(api));
498
- const _ = head.hooks.hook("script:updated", ({ script: script2 }) => {
499
- const status = script2.status;
500
- if (script2.id === id && (status === "loaded" || status === "error")) {
501
- if (status === "loaded") {
502
- if (typeof options.use === "function") {
503
- const api = options.use();
504
- if (api) {
505
- emit(api);
506
- }
507
- } else {
508
- emit({});
509
- }
510
- } else if (status === "error") {
511
- resolve(false);
512
- }
513
- _();
514
- }
515
- });
516
- });
517
- const script = Object.assign(loadPromise, {
518
- instance: !head.ssr && options?.use?.() || null,
519
- proxy: null,
520
- id,
521
- status: "awaitingLoad",
522
- remove() {
523
- script._triggerAbortController?.abort();
524
- script._triggerPromises = [];
525
- if (script.entry) {
526
- script.entry.dispose();
527
- syncStatus("removed");
528
- delete head._scripts?.[id];
529
- return true;
530
- }
531
- return false;
532
- },
533
- load(cb) {
534
- script._triggerAbortController?.abort();
535
- script._triggerPromises = [];
536
- if (!script.entry) {
537
- syncStatus("loading");
538
- const defaults = {
539
- defer: true,
540
- fetchpriority: "low"
541
- };
542
- if (input.src && (input.src.startsWith("http") || input.src.startsWith("//"))) {
543
- defaults.crossorigin = "anonymous";
544
- defaults.referrerpolicy = "no-referrer";
545
- }
546
- script.entry = head.push({
547
- script: [{ ...defaults, ...input, key: `script.${id}` }]
548
- }, options);
549
- }
550
- if (cb)
551
- _registerCb("loaded", cb);
552
- return loadPromise;
553
- },
554
- onLoaded(cb) {
555
- return _registerCb("loaded", cb);
556
- },
557
- onError(cb) {
558
- return _registerCb("error", cb);
559
- },
560
- setupTriggerHandler(trigger) {
561
- if (script.status !== "awaitingLoad") {
562
- return;
563
- }
564
- if ((typeof trigger === "undefined" || trigger === "client") && !head.ssr || trigger === "server") {
565
- script.load();
566
- } else if (trigger instanceof Promise) {
567
- if (head.ssr) {
568
- return;
569
- }
570
- if (!script._triggerAbortController) {
571
- script._triggerAbortController = new AbortController();
572
- script._triggerAbortPromise = new Promise((resolve) => {
573
- script._triggerAbortController.signal.addEventListener("abort", () => {
574
- script._triggerAbortController = null;
575
- resolve();
576
- });
577
- });
578
- }
579
- script._triggerPromises = script._triggerPromises || [];
580
- const idx = script._triggerPromises.push(Promise.race([
581
- trigger.then((v) => typeof v === "undefined" || v ? script.load : void 0),
582
- script._triggerAbortPromise
583
- ]).catch(() => {
584
- }).then((res2) => {
585
- res2?.();
586
- }).finally(() => {
587
- script._triggerPromises?.splice(idx, 1);
588
- }));
589
- } else if (typeof trigger === "function") {
590
- trigger(script.load);
591
- }
592
- },
593
- _cbs
594
- });
595
- loadPromise.then((api) => {
596
- if (api !== false) {
597
- script.instance = api;
598
- _cbs.loaded?.forEach((cb) => cb(api));
599
- _cbs.loaded = null;
600
- } else {
601
- _cbs.error?.forEach((cb) => cb());
602
- _cbs.error = null;
603
- }
604
- });
605
- const hookCtx = { script };
606
- script.setupTriggerHandler(options.trigger);
607
- script.$script = script;
608
- const proxyChain = (instance, accessor, accessors) => {
609
- return new Proxy((!accessor ? instance : instance?.[accessor]) || scriptProxy, {
610
- get(_, k, r) {
611
- head.hooks.callHook("script:instance-fn", { script, fn: k, exists: k in _ });
612
- if (!accessor) {
613
- const stub = options.stub?.({ script, fn: k });
614
- if (stub)
615
- return stub;
616
- }
617
- if (_ && k in _ && typeof _[k] !== "undefined") {
618
- return Reflect.get(_, k, r);
619
- }
620
- if (k === Symbol.iterator) {
621
- return [][Symbol.iterator];
622
- }
623
- return proxyChain(accessor ? instance?.[accessor] : instance, k, accessors || [k]);
624
- },
625
- async apply(_, _this, args) {
626
- if (head.ssr && _[ScriptProxyTarget])
627
- return;
628
- let instance2;
629
- const access = (fn2) => {
630
- instance2 = fn2 || instance2;
631
- for (let i = 0; i < (accessors || []).length; i++) {
632
- const k = (accessors || [])[i];
633
- fn2 = fn2?.[k];
634
- }
635
- return fn2;
636
- };
637
- let fn = access(script.instance);
638
- if (!fn) {
639
- fn = await new Promise((resolve) => {
640
- script.onLoaded((api) => {
641
- resolve(access(api));
642
- });
643
- });
644
- }
645
- return typeof fn === "function" ? Reflect.apply(fn, instance2, args) : fn;
646
- }
647
- });
648
- };
649
- script.proxy = proxyChain(script.instance);
650
- const res = new Proxy(script, {
651
- get(_, k) {
652
- const target = k in script || String(k)[0] === "_" ? script : script.proxy;
653
- if (k === "then" || k === "catch") {
654
- return script[k].bind(script);
655
- }
656
- return Reflect.get(target, k, target);
657
- }
658
- });
659
- head._scripts = Object.assign(head._scripts || {}, { [id]: res });
660
- return res;
661
- }
662
-
663
- function useSeoMeta(input, options) {
664
- const { title, titleTemplate, ...meta } = input;
665
- return useHead({
666
- title,
667
- titleTemplate,
668
- // we need to input the meta so the reactivity will be resolved
669
- // @ts-expect-error runtime type
670
- _flatMeta: meta
671
- }, {
672
- ...options,
673
- transform(t) {
674
- const meta2 = unpackMeta({ ...t._flatMeta });
675
- delete t._flatMeta;
676
- return {
677
- // @ts-expect-error runtime type
678
- ...t,
679
- meta: meta2
680
- };
681
- }
682
- });
683
- }
684
-
685
- function useServerHead(input, options = {}) {
686
- return useHead(input, { ...options, mode: "server" });
687
- }
688
-
689
- function useServerHeadSafe(input, options = {}) {
690
- return useHeadSafe(input, { ...options, mode: "server" });
691
- }
692
-
693
- function useServerSeoMeta(input, options) {
694
- return useSeoMeta(input, {
695
- ...options,
696
- mode: "server"
697
- });
698
- }
699
-
700
- const importRe = /@import/;
701
- // @__NO_SIDE_EFFECTS__
702
- function CapoPlugin(options) {
703
- return defineHeadPlugin({
704
- hooks: {
705
- "tags:beforeResolve": ({ tags }) => {
706
- for (const tag of tags) {
707
- if (tag.tagPosition && tag.tagPosition !== "head")
708
- continue;
709
- tag.tagPriority = tag.tagPriority || tagWeight(tag);
710
- if (tag.tagPriority !== 100)
711
- continue;
712
- const isTruthy = (val) => val === "" || val === true;
713
- const isScript = tag.tag === "script";
714
- const isLink = tag.tag === "link";
715
- if (isScript && isTruthy(tag.props.async)) {
716
- tag.tagPriority = 30;
717
- } else if (tag.tag === "style" && tag.innerHTML && importRe.test(tag.innerHTML)) {
718
- tag.tagPriority = 40;
719
- } else if (isScript && tag.props.src && !isTruthy(tag.props.defer) && !isTruthy(tag.props.async) && tag.props.type !== "module" && !tag.props.type?.endsWith("json")) {
720
- tag.tagPriority = 50;
721
- } else if (isLink && tag.props.rel === "stylesheet" || tag.tag === "style") {
722
- tag.tagPriority = 60;
723
- } else if (isLink && (tag.props.rel === "preload" || tag.props.rel === "modulepreload")) {
724
- tag.tagPriority = 70;
725
- } else if (isScript && isTruthy(tag.props.defer) && tag.props.src && !isTruthy(tag.props.async)) {
726
- tag.tagPriority = 80;
727
- } else if (isLink && (tag.props.rel === "prefetch" || tag.props.rel === "dns-prefetch" || tag.props.rel === "prerender")) {
728
- tag.tagPriority = 90;
729
- }
730
- }
731
- options?.track && tags.push({
732
- tag: "htmlAttrs",
733
- props: {
734
- "data-capo": ""
735
- }
736
- });
737
- }
738
- }
739
- });
740
- }
741
-
742
- // @__NO_SIDE_EFFECTS__
743
- function HashHydrationPlugin() {
744
- return defineHeadPlugin({});
745
- }
746
-
747
- export { CapoPlugin, HashHydrationPlugin, createHead, createHeadCore, createServerHead, getActiveHead, resolveScriptKey, unheadComposablesImports, useHead, useHeadSafe, useScript, useSeoMeta, useServerHead, useServerHeadSafe, useServerSeoMeta };