@highstate/designer 0.1.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.
- package/.output/nitro.json +15 -0
- package/.output/public/_nuxt/1jbH28Ud.js +1 -0
- package/.output/public/_nuxt/BAsjE6c8.js +69 -0
- package/.output/public/_nuxt/D4AvvZ3p.js +1 -0
- package/.output/public/_nuxt/DcSK-0AR.js +1 -0
- package/.output/public/_nuxt/builds/latest.json +1 -0
- package/.output/public/_nuxt/builds/meta/0ea9cf82-d280-4ae3-95c8-082f396c88c7.json +1 -0
- package/.output/public/_nuxt/entry.Df9XoxdB.css +1 -0
- package/.output/public/_nuxt/error-404.SWzu_puR.css +1 -0
- package/.output/public/_nuxt/error-500.Bkv_zTjr.css +1 -0
- package/.output/public/favicon.ico +0 -0
- package/.output/public/robots.txt +1 -0
- package/.output/server/chunks/_/error-500.mjs +8 -0
- package/.output/server/chunks/_/error-500.mjs.map +1 -0
- package/.output/server/chunks/_/index.mjs +229 -0
- package/.output/server/chunks/_/index.mjs.map +1 -0
- package/.output/server/chunks/build/ComponentIcon-styles.CVav5bPa.mjs +6 -0
- package/.output/server/chunks/build/ComponentIcon-styles.CVav5bPa.mjs.map +1 -0
- package/.output/server/chunks/build/ComponentIcon-styles.DJ59dQiL.mjs +6 -0
- package/.output/server/chunks/build/ComponentIcon-styles.DJ59dQiL.mjs.map +1 -0
- package/.output/server/chunks/build/ComponentNode-styles.5_iLK35r.mjs +6 -0
- package/.output/server/chunks/build/ComponentNode-styles.5_iLK35r.mjs.map +1 -0
- package/.output/server/chunks/build/ComponentNode-styles.7QJfF7h3.mjs +6 -0
- package/.output/server/chunks/build/ComponentNode-styles.7QJfF7h3.mjs.map +1 -0
- package/.output/server/chunks/build/ProjectCanvas-styles.B6yAk_TI.mjs +7 -0
- package/.output/server/chunks/build/ProjectCanvas-styles.B6yAk_TI.mjs.map +1 -0
- package/.output/server/chunks/build/ProjectCanvas-styles.BxP3nGl6.mjs +6 -0
- package/.output/server/chunks/build/ProjectCanvas-styles.BxP3nGl6.mjs.map +1 -0
- package/.output/server/chunks/build/ProjectCanvas-styles.CsOcKxeb.mjs +6 -0
- package/.output/server/chunks/build/ProjectCanvas-styles.CsOcKxeb.mjs.map +1 -0
- package/.output/server/chunks/build/VAppBar-styles.CaKoZ7v7.mjs +6 -0
- package/.output/server/chunks/build/VAppBar-styles.CaKoZ7v7.mjs.map +1 -0
- package/.output/server/chunks/build/VAvatar-styles.BloWs-NL.mjs +6 -0
- package/.output/server/chunks/build/VAvatar-styles.BloWs-NL.mjs.map +1 -0
- package/.output/server/chunks/build/VBtn-styles.5s8xLaPo.mjs +6 -0
- package/.output/server/chunks/build/VBtn-styles.5s8xLaPo.mjs.map +1 -0
- package/.output/server/chunks/build/VBtnGroup-styles.B8WSSc7t.mjs +6 -0
- package/.output/server/chunks/build/VBtnGroup-styles.B8WSSc7t.mjs.map +1 -0
- package/.output/server/chunks/build/VBtnToggle-styles.DRWSZkHZ.mjs +6 -0
- package/.output/server/chunks/build/VBtnToggle-styles.DRWSZkHZ.mjs.map +1 -0
- package/.output/server/chunks/build/VCard-styles.BpQql6F5.mjs +6 -0
- package/.output/server/chunks/build/VCard-styles.BpQql6F5.mjs.map +1 -0
- package/.output/server/chunks/build/VChip-styles.KvWWirvS.mjs +6 -0
- package/.output/server/chunks/build/VChip-styles.KvWWirvS.mjs.map +1 -0
- package/.output/server/chunks/build/VChipGroup-styles.SezSZY5I.mjs +6 -0
- package/.output/server/chunks/build/VChipGroup-styles.SezSZY5I.mjs.map +1 -0
- package/.output/server/chunks/build/VCounter-styles.DlbjDB7E.mjs +6 -0
- package/.output/server/chunks/build/VCounter-styles.DlbjDB7E.mjs.map +1 -0
- package/.output/server/chunks/build/VDivider-styles.B5vnnFG1.mjs +6 -0
- package/.output/server/chunks/build/VDivider-styles.B5vnnFG1.mjs.map +1 -0
- package/.output/server/chunks/build/VField-styles.DkgSx68C.mjs +6 -0
- package/.output/server/chunks/build/VField-styles.DkgSx68C.mjs.map +1 -0
- package/.output/server/chunks/build/VIcon-styles._8GsAkxR.mjs +6 -0
- package/.output/server/chunks/build/VIcon-styles._8GsAkxR.mjs.map +1 -0
- package/.output/server/chunks/build/VImg-styles.BQYU2VXD.mjs +6 -0
- package/.output/server/chunks/build/VImg-styles.BQYU2VXD.mjs.map +1 -0
- package/.output/server/chunks/build/VInput-styles.Cr1uxB2l.mjs +6 -0
- package/.output/server/chunks/build/VInput-styles.Cr1uxB2l.mjs.map +1 -0
- package/.output/server/chunks/build/VLabel-styles.OzbLNKaZ.mjs +6 -0
- package/.output/server/chunks/build/VLabel-styles.OzbLNKaZ.mjs.map +1 -0
- package/.output/server/chunks/build/VLayout-styles.DBbIk0kn.mjs +6 -0
- package/.output/server/chunks/build/VLayout-styles.DBbIk0kn.mjs.map +1 -0
- package/.output/server/chunks/build/VMain-styles.CI15Xs8y.mjs +6 -0
- package/.output/server/chunks/build/VMain-styles.CI15Xs8y.mjs.map +1 -0
- package/.output/server/chunks/build/VMessages-styles.C9dRMjf9.mjs +6 -0
- package/.output/server/chunks/build/VMessages-styles.C9dRMjf9.mjs.map +1 -0
- package/.output/server/chunks/build/VNavigationDrawer-styles.BcT_iIsk.mjs +6 -0
- package/.output/server/chunks/build/VNavigationDrawer-styles.BcT_iIsk.mjs.map +1 -0
- package/.output/server/chunks/build/VProgressCircular-styles.CWpXfZ6Q.mjs +6 -0
- package/.output/server/chunks/build/VProgressCircular-styles.CWpXfZ6Q.mjs.map +1 -0
- package/.output/server/chunks/build/VProgressLinear-styles.DjitzH7c.mjs +6 -0
- package/.output/server/chunks/build/VProgressLinear-styles.DjitzH7c.mjs.map +1 -0
- package/.output/server/chunks/build/VResponsive-styles.KUuswLet.mjs +6 -0
- package/.output/server/chunks/build/VResponsive-styles.KUuswLet.mjs.map +1 -0
- package/.output/server/chunks/build/VSlideGroup-styles.fT1UQTdA.mjs +6 -0
- package/.output/server/chunks/build/VSlideGroup-styles.fT1UQTdA.mjs.map +1 -0
- package/.output/server/chunks/build/VSpacer-styles.B_L0TU3-.mjs +6 -0
- package/.output/server/chunks/build/VSpacer-styles.B_L0TU3-.mjs.map +1 -0
- package/.output/server/chunks/build/VTextField-styles.e8Z3kCRA.mjs +6 -0
- package/.output/server/chunks/build/VTextField-styles.e8Z3kCRA.mjs.map +1 -0
- package/.output/server/chunks/build/VToolbar-styles.Bvr717Vh.mjs +6 -0
- package/.output/server/chunks/build/VToolbar-styles.Bvr717Vh.mjs.map +1 -0
- package/.output/server/chunks/build/app-styles.-ZJ3yGO7.mjs +6 -0
- package/.output/server/chunks/build/app-styles.-ZJ3yGO7.mjs.map +1 -0
- package/.output/server/chunks/build/app-styles.Ckjy6RrK.mjs +6 -0
- package/.output/server/chunks/build/app-styles.Ckjy6RrK.mjs.map +1 -0
- package/.output/server/chunks/build/client.manifest.mjs +82 -0
- package/.output/server/chunks/build/client.manifest.mjs.map +1 -0
- package/.output/server/chunks/build/entry-styles-10.mjs-BpLi0qx6.mjs +4 -0
- package/.output/server/chunks/build/entry-styles-10.mjs-BpLi0qx6.mjs.map +1 -0
- package/.output/server/chunks/build/entry-styles-11.mjs-6TeH4I7w.mjs +4 -0
- package/.output/server/chunks/build/entry-styles-11.mjs-6TeH4I7w.mjs.map +1 -0
- package/.output/server/chunks/build/entry-styles-12.mjs-DU1igcRL.mjs +4 -0
- package/.output/server/chunks/build/entry-styles-12.mjs-DU1igcRL.mjs.map +1 -0
- package/.output/server/chunks/build/entry-styles-13.mjs-lZGUjhhD.mjs +4 -0
- package/.output/server/chunks/build/entry-styles-13.mjs-lZGUjhhD.mjs.map +1 -0
- package/.output/server/chunks/build/entry-styles-14.mjs-BRdr1-px.mjs +4 -0
- package/.output/server/chunks/build/entry-styles-14.mjs-BRdr1-px.mjs.map +1 -0
- package/.output/server/chunks/build/entry-styles-15.mjs-mUPL6Nc9.mjs +4 -0
- package/.output/server/chunks/build/entry-styles-15.mjs-mUPL6Nc9.mjs.map +1 -0
- package/.output/server/chunks/build/entry-styles-16.mjs-CPJMcIL1.mjs +4 -0
- package/.output/server/chunks/build/entry-styles-16.mjs-CPJMcIL1.mjs.map +1 -0
- package/.output/server/chunks/build/entry-styles-17.mjs-CQOORRn5.mjs +4 -0
- package/.output/server/chunks/build/entry-styles-17.mjs-CQOORRn5.mjs.map +1 -0
- package/.output/server/chunks/build/entry-styles-18.mjs-C7z1LTi9.mjs +4 -0
- package/.output/server/chunks/build/entry-styles-18.mjs-C7z1LTi9.mjs.map +1 -0
- package/.output/server/chunks/build/entry-styles-19.mjs-it-LBeIM.mjs +4 -0
- package/.output/server/chunks/build/entry-styles-19.mjs-it-LBeIM.mjs.map +1 -0
- package/.output/server/chunks/build/entry-styles-2.mjs-CIKbACDD.mjs +4 -0
- package/.output/server/chunks/build/entry-styles-2.mjs-CIKbACDD.mjs.map +1 -0
- package/.output/server/chunks/build/entry-styles-20.mjs-Igpd8vNA.mjs +4 -0
- package/.output/server/chunks/build/entry-styles-20.mjs-Igpd8vNA.mjs.map +1 -0
- package/.output/server/chunks/build/entry-styles-21.mjs-VGEW4cec.mjs +4 -0
- package/.output/server/chunks/build/entry-styles-21.mjs-VGEW4cec.mjs.map +1 -0
- package/.output/server/chunks/build/entry-styles-22.mjs-DLAUZ2Ss.mjs +4 -0
- package/.output/server/chunks/build/entry-styles-22.mjs-DLAUZ2Ss.mjs.map +1 -0
- package/.output/server/chunks/build/entry-styles-23.mjs-D6dUb4Q1.mjs +4 -0
- package/.output/server/chunks/build/entry-styles-23.mjs-D6dUb4Q1.mjs.map +1 -0
- package/.output/server/chunks/build/entry-styles-24.mjs-CR2CscOT.mjs +4 -0
- package/.output/server/chunks/build/entry-styles-24.mjs-CR2CscOT.mjs.map +1 -0
- package/.output/server/chunks/build/entry-styles-25.mjs-gcGnyYj1.mjs +4 -0
- package/.output/server/chunks/build/entry-styles-25.mjs-gcGnyYj1.mjs.map +1 -0
- package/.output/server/chunks/build/entry-styles-26.mjs-BGcP6LjH.mjs +4 -0
- package/.output/server/chunks/build/entry-styles-26.mjs-BGcP6LjH.mjs.map +1 -0
- package/.output/server/chunks/build/entry-styles-27.mjs-DKPK367G.mjs +4 -0
- package/.output/server/chunks/build/entry-styles-27.mjs-DKPK367G.mjs.map +1 -0
- package/.output/server/chunks/build/entry-styles-28.mjs-BxlgEOUH.mjs +4 -0
- package/.output/server/chunks/build/entry-styles-28.mjs-BxlgEOUH.mjs.map +1 -0
- package/.output/server/chunks/build/entry-styles-29.mjs-EoZxjH32.mjs +4 -0
- package/.output/server/chunks/build/entry-styles-29.mjs-EoZxjH32.mjs.map +1 -0
- package/.output/server/chunks/build/entry-styles-3.mjs-BZeC22He.mjs +4 -0
- package/.output/server/chunks/build/entry-styles-3.mjs-BZeC22He.mjs.map +1 -0
- package/.output/server/chunks/build/entry-styles-30.mjs-CoAZ885y.mjs +4 -0
- package/.output/server/chunks/build/entry-styles-30.mjs-CoAZ885y.mjs.map +1 -0
- package/.output/server/chunks/build/entry-styles-31.mjs-JYOGcJtH.mjs +4 -0
- package/.output/server/chunks/build/entry-styles-31.mjs-JYOGcJtH.mjs.map +1 -0
- package/.output/server/chunks/build/entry-styles-32.mjs-lT-SGbzA.mjs +4 -0
- package/.output/server/chunks/build/entry-styles-32.mjs-lT-SGbzA.mjs.map +1 -0
- package/.output/server/chunks/build/entry-styles-33.mjs-CGVyg8PA.mjs +4 -0
- package/.output/server/chunks/build/entry-styles-33.mjs-CGVyg8PA.mjs.map +1 -0
- package/.output/server/chunks/build/entry-styles-4.mjs-DZ0RUZ3Y.mjs +4 -0
- package/.output/server/chunks/build/entry-styles-4.mjs-DZ0RUZ3Y.mjs.map +1 -0
- package/.output/server/chunks/build/entry-styles-5.mjs-CWoX264H.mjs +4 -0
- package/.output/server/chunks/build/entry-styles-5.mjs-CWoX264H.mjs.map +1 -0
- package/.output/server/chunks/build/entry-styles-6.mjs-D97cocWn.mjs +4 -0
- package/.output/server/chunks/build/entry-styles-6.mjs-D97cocWn.mjs.map +1 -0
- package/.output/server/chunks/build/entry-styles-7.mjs-fDLOEPrI.mjs +4 -0
- package/.output/server/chunks/build/entry-styles-7.mjs-fDLOEPrI.mjs.map +1 -0
- package/.output/server/chunks/build/entry-styles-8.mjs-CogORmQT.mjs +4 -0
- package/.output/server/chunks/build/entry-styles-8.mjs-CogORmQT.mjs.map +1 -0
- package/.output/server/chunks/build/entry-styles-9.mjs-CIkuJriK.mjs +4 -0
- package/.output/server/chunks/build/entry-styles-9.mjs-CIkuJriK.mjs.map +1 -0
- package/.output/server/chunks/build/entry-styles.CtA8hhgO.mjs +39 -0
- package/.output/server/chunks/build/entry-styles.CtA8hhgO.mjs.map +1 -0
- package/.output/server/chunks/build/error-404-BE32jcXw.mjs +399 -0
- package/.output/server/chunks/build/error-404-BE32jcXw.mjs.map +1 -0
- package/.output/server/chunks/build/error-404-styles-1.mjs-BnwklZPR.mjs +4 -0
- package/.output/server/chunks/build/error-404-styles-1.mjs-BnwklZPR.mjs.map +1 -0
- package/.output/server/chunks/build/error-404-styles.B5NDqGbJ.mjs +6 -0
- package/.output/server/chunks/build/error-404-styles.B5NDqGbJ.mjs.map +1 -0
- package/.output/server/chunks/build/error-404-styles.CeFcgbBS.mjs +6 -0
- package/.output/server/chunks/build/error-404-styles.CeFcgbBS.mjs.map +1 -0
- package/.output/server/chunks/build/error-500-B3vPuajn.mjs +80 -0
- package/.output/server/chunks/build/error-500-B3vPuajn.mjs.map +1 -0
- package/.output/server/chunks/build/error-500-styles-1.mjs-C2TN-owL.mjs +4 -0
- package/.output/server/chunks/build/error-500-styles-1.mjs-C2TN-owL.mjs.map +1 -0
- package/.output/server/chunks/build/error-500-styles.BE3GHqYY.mjs +6 -0
- package/.output/server/chunks/build/error-500-styles.BE3GHqYY.mjs.map +1 -0
- package/.output/server/chunks/build/error-500-styles.LQn8-gvg.mjs +6 -0
- package/.output/server/chunks/build/error-500-styles.LQn8-gvg.mjs.map +1 -0
- package/.output/server/chunks/build/index-C2merokO.mjs +34 -0
- package/.output/server/chunks/build/index-C2merokO.mjs.map +1 -0
- package/.output/server/chunks/build/index-styles.C7jmw0Wl.mjs +6 -0
- package/.output/server/chunks/build/index-styles.C7jmw0Wl.mjs.map +1 -0
- package/.output/server/chunks/build/server.mjs +10495 -0
- package/.output/server/chunks/build/server.mjs.map +1 -0
- package/.output/server/chunks/build/styles.mjs +47 -0
- package/.output/server/chunks/build/styles.mjs.map +1 -0
- package/.output/server/chunks/nitro/nitro.mjs +6203 -0
- package/.output/server/chunks/nitro/nitro.mjs.map +1 -0
- package/.output/server/chunks/routes/api/_trpc_.mjs +209 -0
- package/.output/server/chunks/routes/api/_trpc_.mjs.map +1 -0
- package/.output/server/chunks/routes/renderer.mjs +391 -0
- package/.output/server/chunks/routes/renderer.mjs.map +1 -0
- package/.output/server/chunks/virtual/_virtual_spa-template.mjs +4 -0
- package/.output/server/chunks/virtual/_virtual_spa-template.mjs.map +1 -0
- package/.output/server/index.mjs +7 -0
- package/.output/server/index.mjs.map +1 -0
- package/.output/server/node_modules/@babel/parser/lib/index.js +14023 -0
- package/.output/server/node_modules/@babel/parser/package.json +50 -0
- package/.output/server/node_modules/@iconify/vue/dist/iconify.mjs +1996 -0
- package/.output/server/node_modules/@iconify/vue/package.json +65 -0
- package/.output/server/node_modules/@trpc/client/dist/TRPCClientError-38f9a32a.mjs +59 -0
- package/.output/server/node_modules/@trpc/client/dist/httpBatchLink-d0f9eac9.mjs +248 -0
- package/.output/server/node_modules/@trpc/client/dist/httpUtils-b9d0cb48.mjs +144 -0
- package/.output/server/node_modules/@trpc/client/dist/index.mjs +365 -0
- package/.output/server/node_modules/@trpc/client/dist/links/httpLink.mjs +62 -0
- package/.output/server/node_modules/@trpc/client/dist/links/loggerLink.mjs +173 -0
- package/.output/server/node_modules/@trpc/client/dist/links/wsLink.mjs +278 -0
- package/.output/server/node_modules/@trpc/client/dist/splitLink-4c75f7be.mjs +45 -0
- package/.output/server/node_modules/@trpc/client/dist/transformResult-ace864b8.mjs +58 -0
- package/.output/server/node_modules/@trpc/client/package.json +101 -0
- package/.output/server/node_modules/@trpc/server/dist/TRPCError-98d44758.mjs +39 -0
- package/.output/server/node_modules/@trpc/server/dist/batchStreamFormatter-fc1ffb26.mjs +30 -0
- package/.output/server/node_modules/@trpc/server/dist/codes-c924c3db.mjs +44 -0
- package/.output/server/node_modules/@trpc/server/dist/config-d5fdbd39.mjs +196 -0
- package/.output/server/node_modules/@trpc/server/dist/contentType-9fd995d3.mjs +52 -0
- package/.output/server/node_modules/@trpc/server/dist/getCauseFromUnknown-2d66414a.mjs +33 -0
- package/.output/server/node_modules/@trpc/server/dist/http/index.mjs +9 -0
- package/.output/server/node_modules/@trpc/server/dist/index-f91d720c.mjs +97 -0
- package/.output/server/node_modules/@trpc/server/dist/index.mjs +871 -0
- package/.output/server/node_modules/@trpc/server/dist/observable/index.mjs +147 -0
- package/.output/server/node_modules/@trpc/server/dist/observable-ade1bad8.mjs +81 -0
- package/.output/server/node_modules/@trpc/server/dist/resolveHTTPResponse-2fc435bb.mjs +291 -0
- package/.output/server/node_modules/@trpc/server/dist/shared/index.mjs +4 -0
- package/.output/server/node_modules/@trpc/server/dist/transformTRPCResponse-1153b421.mjs +53 -0
- package/.output/server/node_modules/@trpc/server/package.json +177 -0
- package/.output/server/node_modules/@unhead/dom/dist/index.mjs +197 -0
- package/.output/server/node_modules/@unhead/dom/package.json +40 -0
- package/.output/server/node_modules/@unhead/shared/dist/index.mjs +731 -0
- package/.output/server/node_modules/@unhead/shared/package.json +47 -0
- package/.output/server/node_modules/@unhead/ssr/dist/index.mjs +95 -0
- package/.output/server/node_modules/@unhead/ssr/package.json +40 -0
- package/.output/server/node_modules/@vue/compiler-core/dist/compiler-core.cjs.prod.js +6690 -0
- package/.output/server/node_modules/@vue/compiler-core/package.json +58 -0
- package/.output/server/node_modules/@vue/compiler-dom/dist/compiler-dom.cjs.prod.js +686 -0
- package/.output/server/node_modules/@vue/compiler-dom/package.json +57 -0
- package/.output/server/node_modules/@vue/compiler-ssr/dist/compiler-ssr.cjs.js +1404 -0
- package/.output/server/node_modules/@vue/compiler-ssr/package.json +34 -0
- package/.output/server/node_modules/@vue/reactivity/dist/reactivity.cjs.prod.js +1789 -0
- package/.output/server/node_modules/@vue/reactivity/package.json +55 -0
- package/.output/server/node_modules/@vue/runtime-core/dist/runtime-core.cjs.prod.js +6654 -0
- package/.output/server/node_modules/@vue/runtime-core/package.json +52 -0
- package/.output/server/node_modules/@vue/runtime-dom/dist/runtime-dom.cjs.prod.js +1669 -0
- package/.output/server/node_modules/@vue/runtime-dom/package.json +60 -0
- package/.output/server/node_modules/@vue/server-renderer/dist/server-renderer.cjs.prod.js +857 -0
- package/.output/server/node_modules/@vue/server-renderer/package.json +55 -0
- package/.output/server/node_modules/@vue/shared/dist/shared.cjs.prod.js +594 -0
- package/.output/server/node_modules/@vue/shared/package.json +47 -0
- package/.output/server/node_modules/@vue-flow/background/dist/vue-flow-background.mjs +126 -0
- package/.output/server/node_modules/@vue-flow/background/package.json +73 -0
- package/.output/server/node_modules/@vue-flow/core/dist/vue-flow-core.mjs +9873 -0
- package/.output/server/node_modules/@vue-flow/core/package.json +92 -0
- package/.output/server/node_modules/@vue-flow/minimap/dist/vue-flow-minimap.mjs +2953 -0
- package/.output/server/node_modules/@vue-flow/minimap/package.json +80 -0
- package/.output/server/node_modules/devalue/index.js +3 -0
- package/.output/server/node_modules/devalue/package.json +34 -0
- package/.output/server/node_modules/devalue/src/base64.js +110 -0
- package/.output/server/node_modules/devalue/src/constants.js +6 -0
- package/.output/server/node_modules/devalue/src/parse.js +160 -0
- package/.output/server/node_modules/devalue/src/stringify.js +232 -0
- package/.output/server/node_modules/devalue/src/uneval.js +351 -0
- package/.output/server/node_modules/devalue/src/utils.js +113 -0
- package/.output/server/node_modules/entities/lib/decode.js +536 -0
- package/.output/server/node_modules/entities/lib/decode_codepoint.js +76 -0
- package/.output/server/node_modules/entities/lib/generated/decode-data-html.js +9 -0
- package/.output/server/node_modules/entities/lib/generated/decode-data-xml.js +9 -0
- package/.output/server/node_modules/entities/package.json +90 -0
- package/.output/server/node_modules/estree-walker/dist/umd/estree-walker.js +344 -0
- package/.output/server/node_modules/estree-walker/package.json +37 -0
- package/.output/server/node_modules/hookable/dist/index.mjs +290 -0
- package/.output/server/node_modules/hookable/package.json +49 -0
- package/.output/server/node_modules/nanoid/index.js +46 -0
- package/.output/server/node_modules/nanoid/package.json +41 -0
- package/.output/server/node_modules/nanoid/url-alphabet/index.js +2 -0
- package/.output/server/node_modules/pinia/dist/pinia.prod.cjs +858 -0
- package/.output/server/node_modules/pinia/package.json +100 -0
- package/.output/server/node_modules/source-map-js/lib/array-set.js +121 -0
- package/.output/server/node_modules/source-map-js/lib/base64-vlq.js +140 -0
- package/.output/server/node_modules/source-map-js/lib/base64.js +67 -0
- package/.output/server/node_modules/source-map-js/lib/binary-search.js +111 -0
- package/.output/server/node_modules/source-map-js/lib/mapping-list.js +79 -0
- package/.output/server/node_modules/source-map-js/lib/quick-sort.js +132 -0
- package/.output/server/node_modules/source-map-js/lib/source-map-consumer.js +1188 -0
- package/.output/server/node_modules/source-map-js/lib/source-map-generator.js +444 -0
- package/.output/server/node_modules/source-map-js/lib/source-node.js +413 -0
- package/.output/server/node_modules/source-map-js/lib/util.js +594 -0
- package/.output/server/node_modules/source-map-js/package.json +71 -0
- package/.output/server/node_modules/source-map-js/source-map.js +8 -0
- package/.output/server/node_modules/ufo/dist/index.mjs +630 -0
- package/.output/server/node_modules/ufo/package.json +47 -0
- package/.output/server/node_modules/unhead/dist/index.mjs +747 -0
- package/.output/server/node_modules/unhead/package.json +46 -0
- package/.output/server/node_modules/vue/dist/vue.cjs.js +80 -0
- package/.output/server/node_modules/vue/dist/vue.cjs.prod.js +66 -0
- package/.output/server/node_modules/vue/index.js +7 -0
- package/.output/server/node_modules/vue/index.mjs +1 -0
- package/.output/server/node_modules/vue/package.json +112 -0
- package/.output/server/node_modules/vue/server-renderer/index.mjs +1 -0
- package/.output/server/node_modules/vue-bundle-renderer/dist/runtime.mjs +196 -0
- package/.output/server/node_modules/vue-bundle-renderer/package.json +50 -0
- package/.output/server/node_modules/vue-demi/lib/index.cjs +29 -0
- package/.output/server/node_modules/vue-demi/package.json +47 -0
- package/.output/server/node_modules/zod/lib/index.mjs +4236 -0
- package/.output/server/node_modules/zod/package.json +119 -0
- package/.output/server/node_modules/zod-to-json-schema/dist/esm/Options.js +31 -0
- package/.output/server/node_modules/zod-to-json-schema/dist/esm/Refs.js +21 -0
- package/.output/server/node_modules/zod-to-json-schema/dist/esm/errorMessages.js +14 -0
- package/.output/server/node_modules/zod-to-json-schema/dist/esm/index.js +37 -0
- package/.output/server/node_modules/zod-to-json-schema/dist/esm/package.json +1 -0
- package/.output/server/node_modules/zod-to-json-schema/dist/esm/parseDef.js +164 -0
- package/.output/server/node_modules/zod-to-json-schema/dist/esm/parsers/any.js +3 -0
- package/.output/server/node_modules/zod-to-json-schema/dist/esm/parsers/array.js +25 -0
- package/.output/server/node_modules/zod-to-json-schema/dist/esm/parsers/bigint.js +49 -0
- package/.output/server/node_modules/zod-to-json-schema/dist/esm/parsers/boolean.js +5 -0
- package/.output/server/node_modules/zod-to-json-schema/dist/esm/parsers/branded.js +4 -0
- package/.output/server/node_modules/zod-to-json-schema/dist/esm/parsers/catch.js +4 -0
- package/.output/server/node_modules/zod-to-json-schema/dist/esm/parsers/date.js +46 -0
- package/.output/server/node_modules/zod-to-json-schema/dist/esm/parsers/default.js +7 -0
- package/.output/server/node_modules/zod-to-json-schema/dist/esm/parsers/effects.js +6 -0
- package/.output/server/node_modules/zod-to-json-schema/dist/esm/parsers/enum.js +6 -0
- package/.output/server/node_modules/zod-to-json-schema/dist/esm/parsers/intersection.js +52 -0
- package/.output/server/node_modules/zod-to-json-schema/dist/esm/parsers/literal.js +21 -0
- package/.output/server/node_modules/zod-to-json-schema/dist/esm/parsers/map.js +25 -0
- package/.output/server/node_modules/zod-to-json-schema/dist/esm/parsers/nativeEnum.js +16 -0
- package/.output/server/node_modules/zod-to-json-schema/dist/esm/parsers/never.js +5 -0
- package/.output/server/node_modules/zod-to-json-schema/dist/esm/parsers/null.js +10 -0
- package/.output/server/node_modules/zod-to-json-schema/dist/esm/parsers/nullable.js +33 -0
- package/.output/server/node_modules/zod-to-json-schema/dist/esm/parsers/number.js +52 -0
- package/.output/server/node_modules/zod-to-json-schema/dist/esm/parsers/object.js +45 -0
- package/.output/server/node_modules/zod-to-json-schema/dist/esm/parsers/optional.js +20 -0
- package/.output/server/node_modules/zod-to-json-schema/dist/esm/parsers/pipeline.js +20 -0
- package/.output/server/node_modules/zod-to-json-schema/dist/esm/parsers/promise.js +4 -0
- package/.output/server/node_modules/zod-to-json-schema/dist/esm/parsers/readonly.js +4 -0
- package/.output/server/node_modules/zod-to-json-schema/dist/esm/parsers/record.js +57 -0
- package/.output/server/node_modules/zod-to-json-schema/dist/esm/parsers/set.js +20 -0
- package/.output/server/node_modules/zod-to-json-schema/dist/esm/parsers/string.js +324 -0
- package/.output/server/node_modules/zod-to-json-schema/dist/esm/parsers/tuple.js +32 -0
- package/.output/server/node_modules/zod-to-json-schema/dist/esm/parsers/undefined.js +5 -0
- package/.output/server/node_modules/zod-to-json-schema/dist/esm/parsers/union.js +80 -0
- package/.output/server/node_modules/zod-to-json-schema/dist/esm/parsers/unknown.js +3 -0
- package/.output/server/node_modules/zod-to-json-schema/dist/esm/zodToJsonSchema.js +59 -0
- package/.output/server/node_modules/zod-to-json-schema/package.json +89 -0
- package/.output/server/package.json +1 -0
- package/package.json +41 -0
|
@@ -0,0 +1,747 @@
|
|
|
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 };
|