@slicemachine/adapter-nuxt 0.3.22-dev-next-release.3 → 0.3.22-dev-next-release.4
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.
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"documentation-read.cjs","sources":["../../../src/hooks/documentation-read.ts"],"sourcesContent":["import { source, stripIndent } from \"common-tags\";\n\nimport type { DocumentationReadHook } from \"@slicemachine/plugin-kit\";\n\nimport type { PluginOptions } from \"../types\";\nimport { checkIsTypeScriptProject } from \"../lib/checkIsTypeScriptProject\";\n\nexport const documentationRead: DocumentationReadHook<PluginOptions> = async (\n\tdata,\n\t{ options, helpers },\n) => {\n\tconst isTypeScriptProject = await checkIsTypeScriptProject({\n\t\thelpers,\n\t\toptions,\n\t});\n\n\tif (data.kind === \"PageSnippet\") {\n\t\tconst { model } = data.data;\n\t\tconst filePath = `${model.repeatable ? \"[uid]\" : model.id}.vue`;\n\t\tconst scriptAttributes = [\"setup\"];\n\t\tif (isTypeScriptProject) {\n\t\t\tscriptAttributes.push('lang=\"ts\"');\n\t\t}\n\n\t\tlet fileContent: string;\n\n\t\tif (model.repeatable) {\n\t\t\tfileContent = stripIndent`\n\t\t\t\t<script ${scriptAttributes.join(\" \")}>\n\t\t\t\timport { components } from \"~/slices\";\n\n\t\t\t\tconst prismic = usePrismic();\n\t\t\t\tconst route = useRoute();\n\t\t\t\tconst { data: page } = useAsyncData(\\`[${\n\t\t\t\t\tmodel.id\n\t\t\t\t}-uid-\\${route.params.uid}]\\`, () =>\n\t\t\t\t\tprismic.client.getByUID(\"${model.id}\", route.params.uid${\n\t\t\t\tisTypeScriptProject ? \" as string\" : \"\"\n\t\t\t})\n\t\t\t\t);\n\n\t\t\t\tuseHead({\n\t\t\t\t\ttitle: page.value?.data.meta_title,\n\t\t\t\t\tmeta: [{\n\t\t\t\t\t\tname: \"description\",\n\t\t\t\t\t\tcontent: page.value?.data.meta_description,\n\t\t\t\t\t}],\n\t\t\t\t});\n\t\t\t\t</script>\n\n\t\t\t\t<template>\n\t\t\t\t\t<SliceZone\n\t\t\t\t\t\twrapper=\"main\"\n\t\t\t\t\t\t:slices=\"page?.data.slices ?? []\"\n\t\t\t\t\t\t:components=\"components\"\n\t\t\t\t\t/>\n\t\t\t\t</template>\n\t\t\t`;\n\t\t} else {\n\t\t\tfileContent = stripIndent`\n\t\t\t\t<script ${scriptAttributes.join(\" \")}>\n\t\t\t\t\timport { components } from \"~/slices\";\n\n\t\t\t\t\tconst prismic = usePrismic();\n\t\t\t\t\tconst { data: page } = useAsyncData(\"[${model.id}]\", () =>\n\t\t\t\t\t\tprismic.client.getSingle(\"${model.id}\")\n\t\t\t\t\t);\n\n\t\t\t\t\tuseHead({\n\t\t\t\t\t\ttitle: page.value?.data.meta_title,\n\t\t\t\t\t\tmeta: [{\n\t\t\t\t\t\t\tname: \"description\",\n\t\t\t\t\t\t\tcontent: page.value?.data.meta_description,\n\t\t\t\t\t\t}],\n\t\t\t\t\t});\n\t\t\t\t</script>\n\n\t\t\t\t<template>\n\t\t\t\t\t<SliceZone\n\t\t\t\t\t\twrapper=\"main\"\n\t\t\t\t\t\t:slices=\"page?.data.slices ?? []\"\n\t\t\t\t\t\t:components=\"components\"\n\t\t\t\t\t/>\n\t\t\t\t</template>\n\t\t\t`;\n\t\t}\n\n\t\tif (options.format) {\n\t\t\tfileContent = await helpers.format(\n\t\t\t\tfileContent,\n\t\t\t\thelpers.joinPathFromRoot(\"index.vue\"),\n\t\t\t\t{\n\t\t\t\t\tprettier: { parser: \"vue\" },\n\t\t\t\t\tincludeNewlineAtEnd: false,\n\t\t\t\t},\n\t\t\t);\n\t\t}\n\n\t\treturn [\n\t\t\t{\n\t\t\t\tlabel: \"Composition API\",\n\t\t\t\tcontent: source`\n\t\t\t\t\t## Create your ${model.label}'s page component\n\n\t\t\t\t\tAdd a new route by creating an \\`~/pages/${filePath}\\` file. (If the route should be nested in a child directory, you can create the file in a directory, like \\`~/pages/marketing/${filePath}\\`.)\n\n\t\t\t\t\tPaste in this code:\n\n\t\t\t\t\t${`~~~vue [~/pages/${filePath}]\\n${fileContent}\\n~~~`}\n\n\t\t\t\t\tMake sure all of your import paths are correct. See the [install guide](https://prismic.io/docs/nuxt-3-setup) for more information.\n\t\t\t\t`,\n\t\t\t},\n\t\t];\n\t}\n\n\treturn [];\n};\n"],"names":["checkIsTypeScriptProject","stripIndent","source"],"mappings":";;;;;;;AAAA,IAAA,IAAA;AAOO,MAAM,oBAA0D,OACtE,MACA,EAAE,SAAS,cACR;AACG,QAAA,sBAAsB,MAAMA,kDAAyB;AAAA,IAC1D;AAAA,IACA;AAAA,EAAA,CACA;AAEG,MAAA,KAAK,SAAS,eAAe;AAC1B,UAAA,EAAE,MAAK,IAAK,KAAK;AACvB,UAAM,WAAW,GAAG,MAAM,aAAa,UAAU,MAAM;AACjD,UAAA,mBAAmB,CAAC,OAAO;AACjC,QAAI,qBAAqB;AACxB,uBAAiB,KAAK,WAAW;AAAA,IACjC;AAEG,QAAA;AAEJ,QAAI,MAAM,YAAY;AACP,oBAAAC,WAAAA,YAAA,OAAA,KAAW,8BACY,iKAOpC,qEACoC,
|
|
1
|
+
{"version":3,"file":"documentation-read.cjs","sources":["../../../src/hooks/documentation-read.ts"],"sourcesContent":["import { source, stripIndent } from \"common-tags\";\n\nimport type { DocumentationReadHook } from \"@slicemachine/plugin-kit\";\n\nimport type { PluginOptions } from \"../types\";\nimport { checkIsTypeScriptProject } from \"../lib/checkIsTypeScriptProject\";\n\nexport const documentationRead: DocumentationReadHook<PluginOptions> = async (\n\tdata,\n\t{ options, helpers },\n) => {\n\tconst isTypeScriptProject = await checkIsTypeScriptProject({\n\t\thelpers,\n\t\toptions,\n\t});\n\n\tif (data.kind === \"PageSnippet\") {\n\t\tconst { model } = data.data;\n\t\tconst filePath = `${model.repeatable ? \"[uid]\" : model.id}.vue`;\n\t\tconst scriptAttributes = [\"setup\"];\n\t\tif (isTypeScriptProject) {\n\t\t\tscriptAttributes.push('lang=\"ts\"');\n\t\t}\n\n\t\tlet fileContent: string;\n\n\t\tif (model.repeatable) {\n\t\t\tfileContent = stripIndent`\n\t\t\t\t<script ${scriptAttributes.join(\" \")}>\n\t\t\t\timport { components } from \"~/slices\";\n\n\t\t\t\tconst prismic = usePrismic();\n\t\t\t\tconst route = useRoute();\n\t\t\t\tconst { data: page } = useAsyncData(\\`[${\n\t\t\t\t\tmodel.id\n\t\t\t\t}-uid-\\${route.params.uid}]\\`, () =>\n\t\t\t\t\tprismic.client.getByUID(\"${model.id}\", route.params.uid${\n\t\t\t\t\t\tisTypeScriptProject ? \" as string\" : \"\"\n\t\t\t\t\t})\n\t\t\t\t);\n\n\t\t\t\tuseHead({\n\t\t\t\t\ttitle: page.value?.data.meta_title,\n\t\t\t\t\tmeta: [{\n\t\t\t\t\t\tname: \"description\",\n\t\t\t\t\t\tcontent: page.value?.data.meta_description,\n\t\t\t\t\t}],\n\t\t\t\t});\n\t\t\t\t</script>\n\n\t\t\t\t<template>\n\t\t\t\t\t<SliceZone\n\t\t\t\t\t\twrapper=\"main\"\n\t\t\t\t\t\t:slices=\"page?.data.slices ?? []\"\n\t\t\t\t\t\t:components=\"components\"\n\t\t\t\t\t/>\n\t\t\t\t</template>\n\t\t\t`;\n\t\t} else {\n\t\t\tfileContent = stripIndent`\n\t\t\t\t<script ${scriptAttributes.join(\" \")}>\n\t\t\t\t\timport { components } from \"~/slices\";\n\n\t\t\t\t\tconst prismic = usePrismic();\n\t\t\t\t\tconst { data: page } = useAsyncData(\"[${model.id}]\", () =>\n\t\t\t\t\t\tprismic.client.getSingle(\"${model.id}\")\n\t\t\t\t\t);\n\n\t\t\t\t\tuseHead({\n\t\t\t\t\t\ttitle: page.value?.data.meta_title,\n\t\t\t\t\t\tmeta: [{\n\t\t\t\t\t\t\tname: \"description\",\n\t\t\t\t\t\t\tcontent: page.value?.data.meta_description,\n\t\t\t\t\t\t}],\n\t\t\t\t\t});\n\t\t\t\t</script>\n\n\t\t\t\t<template>\n\t\t\t\t\t<SliceZone\n\t\t\t\t\t\twrapper=\"main\"\n\t\t\t\t\t\t:slices=\"page?.data.slices ?? []\"\n\t\t\t\t\t\t:components=\"components\"\n\t\t\t\t\t/>\n\t\t\t\t</template>\n\t\t\t`;\n\t\t}\n\n\t\tif (options.format) {\n\t\t\tfileContent = await helpers.format(\n\t\t\t\tfileContent,\n\t\t\t\thelpers.joinPathFromRoot(\"index.vue\"),\n\t\t\t\t{\n\t\t\t\t\tprettier: { parser: \"vue\" },\n\t\t\t\t\tincludeNewlineAtEnd: false,\n\t\t\t\t},\n\t\t\t);\n\t\t}\n\n\t\treturn [\n\t\t\t{\n\t\t\t\tlabel: \"Composition API\",\n\t\t\t\tcontent: source`\n\t\t\t\t\t## Create your ${model.label}'s page component\n\n\t\t\t\t\tAdd a new route by creating an \\`~/pages/${filePath}\\` file. (If the route should be nested in a child directory, you can create the file in a directory, like \\`~/pages/marketing/${filePath}\\`.)\n\n\t\t\t\t\tPaste in this code:\n\n\t\t\t\t\t${`~~~vue [~/pages/${filePath}]\\n${fileContent}\\n~~~`}\n\n\t\t\t\t\tMake sure all of your import paths are correct. See the [install guide](https://prismic.io/docs/nuxt-3-setup) for more information.\n\t\t\t\t`,\n\t\t\t},\n\t\t];\n\t}\n\n\treturn [];\n};\n"],"names":["checkIsTypeScriptProject","stripIndent","source"],"mappings":";;;;;;;AAAA,IAAA,IAAA;AAOO,MAAM,oBAA0D,OACtE,MACA,EAAE,SAAS,cACR;AACG,QAAA,sBAAsB,MAAMA,kDAAyB;AAAA,IAC1D;AAAA,IACA;AAAA,EAAA,CACA;AAEG,MAAA,KAAK,SAAS,eAAe;AAC1B,UAAA,EAAE,MAAK,IAAK,KAAK;AACvB,UAAM,WAAW,GAAG,MAAM,aAAa,UAAU,MAAM;AACjD,UAAA,mBAAmB,CAAC,OAAO;AACjC,QAAI,qBAAqB;AACxB,uBAAiB,KAAK,WAAW;AAAA,IACjC;AAEG,QAAA;AAEJ,QAAI,MAAM,YAAY;AACP,oBAAAC,WAAAA,YAAA,OAAA,KAAW,8BACY,iKAOpC,qEACoC,uBAEnC,wWAXuB,GAAA,CAAA,kBACY,mKAOpC,yEACoC,uBAEnC,6WAVS,iBAAiB,KAAK,GAAG,GAMlC,MAAM,IAEqB,MAAM,IAChC,sBAAsB,eAAe,EAAA;AAAA,IAAA,OAqBlC;AACQ,oBAAAA,WAAAA,YAAA,OAAA,KAAW,WACY,CAAA,kBAAA,qIAIa,+CACX,iXAAA,CAAA,IAL5B,iBAAiB,KAAK,GAAG,GAIM,MAAM,IACjB,MAAM,EAAA;AAAA,IAoBrC;AAED,QAAI,QAAQ,QAAQ;AACnB,oBAAc,MAAM,QAAQ,OAC3B,aACA,QAAQ,iBAAiB,WAAW,GACpC;AAAA,QACC,UAAU,EAAE,QAAQ,MAAO;AAAA,QAC3B,qBAAqB;AAAA,MAAA,CACrB;AAAA,IAEF;AAEM,WAAA;AAAA,MACN;AAAA,QACC,OAAO;AAAA,QACP,SAASC,WAAAA;AAAAA,sBACS,MAAM;AAAA;AAAA,gDAEoB,0IAA0I;AAAA;AAAA;AAAA;AAAA,OAInL,mBAAmB;AAAA,EAAc;AAAA;AAAA;AAAA;AAAA;AAAA,MAIpC;AAAA,IAAA;AAAA,EAEF;AAED,SAAO;AACR;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"documentation-read.js","sources":["../../../src/hooks/documentation-read.ts"],"sourcesContent":["import { source, stripIndent } from \"common-tags\";\n\nimport type { DocumentationReadHook } from \"@slicemachine/plugin-kit\";\n\nimport type { PluginOptions } from \"../types\";\nimport { checkIsTypeScriptProject } from \"../lib/checkIsTypeScriptProject\";\n\nexport const documentationRead: DocumentationReadHook<PluginOptions> = async (\n\tdata,\n\t{ options, helpers },\n) => {\n\tconst isTypeScriptProject = await checkIsTypeScriptProject({\n\t\thelpers,\n\t\toptions,\n\t});\n\n\tif (data.kind === \"PageSnippet\") {\n\t\tconst { model } = data.data;\n\t\tconst filePath = `${model.repeatable ? \"[uid]\" : model.id}.vue`;\n\t\tconst scriptAttributes = [\"setup\"];\n\t\tif (isTypeScriptProject) {\n\t\t\tscriptAttributes.push('lang=\"ts\"');\n\t\t}\n\n\t\tlet fileContent: string;\n\n\t\tif (model.repeatable) {\n\t\t\tfileContent = stripIndent`\n\t\t\t\t<script ${scriptAttributes.join(\" \")}>\n\t\t\t\timport { components } from \"~/slices\";\n\n\t\t\t\tconst prismic = usePrismic();\n\t\t\t\tconst route = useRoute();\n\t\t\t\tconst { data: page } = useAsyncData(\\`[${\n\t\t\t\t\tmodel.id\n\t\t\t\t}-uid-\\${route.params.uid}]\\`, () =>\n\t\t\t\t\tprismic.client.getByUID(\"${model.id}\", route.params.uid${\n\t\t\t\tisTypeScriptProject ? \" as string\" : \"\"\n\t\t\t})\n\t\t\t\t);\n\n\t\t\t\tuseHead({\n\t\t\t\t\ttitle: page.value?.data.meta_title,\n\t\t\t\t\tmeta: [{\n\t\t\t\t\t\tname: \"description\",\n\t\t\t\t\t\tcontent: page.value?.data.meta_description,\n\t\t\t\t\t}],\n\t\t\t\t});\n\t\t\t\t</script>\n\n\t\t\t\t<template>\n\t\t\t\t\t<SliceZone\n\t\t\t\t\t\twrapper=\"main\"\n\t\t\t\t\t\t:slices=\"page?.data.slices ?? []\"\n\t\t\t\t\t\t:components=\"components\"\n\t\t\t\t\t/>\n\t\t\t\t</template>\n\t\t\t`;\n\t\t} else {\n\t\t\tfileContent = stripIndent`\n\t\t\t\t<script ${scriptAttributes.join(\" \")}>\n\t\t\t\t\timport { components } from \"~/slices\";\n\n\t\t\t\t\tconst prismic = usePrismic();\n\t\t\t\t\tconst { data: page } = useAsyncData(\"[${model.id}]\", () =>\n\t\t\t\t\t\tprismic.client.getSingle(\"${model.id}\")\n\t\t\t\t\t);\n\n\t\t\t\t\tuseHead({\n\t\t\t\t\t\ttitle: page.value?.data.meta_title,\n\t\t\t\t\t\tmeta: [{\n\t\t\t\t\t\t\tname: \"description\",\n\t\t\t\t\t\t\tcontent: page.value?.data.meta_description,\n\t\t\t\t\t\t}],\n\t\t\t\t\t});\n\t\t\t\t</script>\n\n\t\t\t\t<template>\n\t\t\t\t\t<SliceZone\n\t\t\t\t\t\twrapper=\"main\"\n\t\t\t\t\t\t:slices=\"page?.data.slices ?? []\"\n\t\t\t\t\t\t:components=\"components\"\n\t\t\t\t\t/>\n\t\t\t\t</template>\n\t\t\t`;\n\t\t}\n\n\t\tif (options.format) {\n\t\t\tfileContent = await helpers.format(\n\t\t\t\tfileContent,\n\t\t\t\thelpers.joinPathFromRoot(\"index.vue\"),\n\t\t\t\t{\n\t\t\t\t\tprettier: { parser: \"vue\" },\n\t\t\t\t\tincludeNewlineAtEnd: false,\n\t\t\t\t},\n\t\t\t);\n\t\t}\n\n\t\treturn [\n\t\t\t{\n\t\t\t\tlabel: \"Composition API\",\n\t\t\t\tcontent: source`\n\t\t\t\t\t## Create your ${model.label}'s page component\n\n\t\t\t\t\tAdd a new route by creating an \\`~/pages/${filePath}\\` file. (If the route should be nested in a child directory, you can create the file in a directory, like \\`~/pages/marketing/${filePath}\\`.)\n\n\t\t\t\t\tPaste in this code:\n\n\t\t\t\t\t${`~~~vue [~/pages/${filePath}]\\n${fileContent}\\n~~~`}\n\n\t\t\t\t\tMake sure all of your import paths are correct. See the [install guide](https://prismic.io/docs/nuxt-3-setup) for more information.\n\t\t\t\t`,\n\t\t\t},\n\t\t];\n\t}\n\n\treturn [];\n};\n"],"names":[],"mappings":";;;;;AAAA,IAAA,IAAA;AAOO,MAAM,oBAA0D,OACtE,MACA,EAAE,SAAS,cACR;AACG,QAAA,sBAAsB,MAAM,yBAAyB;AAAA,IAC1D;AAAA,IACA;AAAA,EAAA,CACA;AAEG,MAAA,KAAK,SAAS,eAAe;AAC1B,UAAA,EAAE,MAAK,IAAK,KAAK;AACvB,UAAM,WAAW,GAAG,MAAM,aAAa,UAAU,MAAM;AACjD,UAAA,mBAAmB,CAAC,OAAO;AACjC,QAAI,qBAAqB;AACxB,uBAAiB,KAAK,WAAW;AAAA,IACjC;AAEG,QAAA;AAEJ,QAAI,MAAM,YAAY;AACP,oBAAA,YAAA,OAAA,KAAW,8BACY,iKAOpC,qEACoC,
|
|
1
|
+
{"version":3,"file":"documentation-read.js","sources":["../../../src/hooks/documentation-read.ts"],"sourcesContent":["import { source, stripIndent } from \"common-tags\";\n\nimport type { DocumentationReadHook } from \"@slicemachine/plugin-kit\";\n\nimport type { PluginOptions } from \"../types\";\nimport { checkIsTypeScriptProject } from \"../lib/checkIsTypeScriptProject\";\n\nexport const documentationRead: DocumentationReadHook<PluginOptions> = async (\n\tdata,\n\t{ options, helpers },\n) => {\n\tconst isTypeScriptProject = await checkIsTypeScriptProject({\n\t\thelpers,\n\t\toptions,\n\t});\n\n\tif (data.kind === \"PageSnippet\") {\n\t\tconst { model } = data.data;\n\t\tconst filePath = `${model.repeatable ? \"[uid]\" : model.id}.vue`;\n\t\tconst scriptAttributes = [\"setup\"];\n\t\tif (isTypeScriptProject) {\n\t\t\tscriptAttributes.push('lang=\"ts\"');\n\t\t}\n\n\t\tlet fileContent: string;\n\n\t\tif (model.repeatable) {\n\t\t\tfileContent = stripIndent`\n\t\t\t\t<script ${scriptAttributes.join(\" \")}>\n\t\t\t\timport { components } from \"~/slices\";\n\n\t\t\t\tconst prismic = usePrismic();\n\t\t\t\tconst route = useRoute();\n\t\t\t\tconst { data: page } = useAsyncData(\\`[${\n\t\t\t\t\tmodel.id\n\t\t\t\t}-uid-\\${route.params.uid}]\\`, () =>\n\t\t\t\t\tprismic.client.getByUID(\"${model.id}\", route.params.uid${\n\t\t\t\t\t\tisTypeScriptProject ? \" as string\" : \"\"\n\t\t\t\t\t})\n\t\t\t\t);\n\n\t\t\t\tuseHead({\n\t\t\t\t\ttitle: page.value?.data.meta_title,\n\t\t\t\t\tmeta: [{\n\t\t\t\t\t\tname: \"description\",\n\t\t\t\t\t\tcontent: page.value?.data.meta_description,\n\t\t\t\t\t}],\n\t\t\t\t});\n\t\t\t\t</script>\n\n\t\t\t\t<template>\n\t\t\t\t\t<SliceZone\n\t\t\t\t\t\twrapper=\"main\"\n\t\t\t\t\t\t:slices=\"page?.data.slices ?? []\"\n\t\t\t\t\t\t:components=\"components\"\n\t\t\t\t\t/>\n\t\t\t\t</template>\n\t\t\t`;\n\t\t} else {\n\t\t\tfileContent = stripIndent`\n\t\t\t\t<script ${scriptAttributes.join(\" \")}>\n\t\t\t\t\timport { components } from \"~/slices\";\n\n\t\t\t\t\tconst prismic = usePrismic();\n\t\t\t\t\tconst { data: page } = useAsyncData(\"[${model.id}]\", () =>\n\t\t\t\t\t\tprismic.client.getSingle(\"${model.id}\")\n\t\t\t\t\t);\n\n\t\t\t\t\tuseHead({\n\t\t\t\t\t\ttitle: page.value?.data.meta_title,\n\t\t\t\t\t\tmeta: [{\n\t\t\t\t\t\t\tname: \"description\",\n\t\t\t\t\t\t\tcontent: page.value?.data.meta_description,\n\t\t\t\t\t\t}],\n\t\t\t\t\t});\n\t\t\t\t</script>\n\n\t\t\t\t<template>\n\t\t\t\t\t<SliceZone\n\t\t\t\t\t\twrapper=\"main\"\n\t\t\t\t\t\t:slices=\"page?.data.slices ?? []\"\n\t\t\t\t\t\t:components=\"components\"\n\t\t\t\t\t/>\n\t\t\t\t</template>\n\t\t\t`;\n\t\t}\n\n\t\tif (options.format) {\n\t\t\tfileContent = await helpers.format(\n\t\t\t\tfileContent,\n\t\t\t\thelpers.joinPathFromRoot(\"index.vue\"),\n\t\t\t\t{\n\t\t\t\t\tprettier: { parser: \"vue\" },\n\t\t\t\t\tincludeNewlineAtEnd: false,\n\t\t\t\t},\n\t\t\t);\n\t\t}\n\n\t\treturn [\n\t\t\t{\n\t\t\t\tlabel: \"Composition API\",\n\t\t\t\tcontent: source`\n\t\t\t\t\t## Create your ${model.label}'s page component\n\n\t\t\t\t\tAdd a new route by creating an \\`~/pages/${filePath}\\` file. (If the route should be nested in a child directory, you can create the file in a directory, like \\`~/pages/marketing/${filePath}\\`.)\n\n\t\t\t\t\tPaste in this code:\n\n\t\t\t\t\t${`~~~vue [~/pages/${filePath}]\\n${fileContent}\\n~~~`}\n\n\t\t\t\t\tMake sure all of your import paths are correct. See the [install guide](https://prismic.io/docs/nuxt-3-setup) for more information.\n\t\t\t\t`,\n\t\t\t},\n\t\t];\n\t}\n\n\treturn [];\n};\n"],"names":[],"mappings":";;;;;AAAA,IAAA,IAAA;AAOO,MAAM,oBAA0D,OACtE,MACA,EAAE,SAAS,cACR;AACG,QAAA,sBAAsB,MAAM,yBAAyB;AAAA,IAC1D;AAAA,IACA;AAAA,EAAA,CACA;AAEG,MAAA,KAAK,SAAS,eAAe;AAC1B,UAAA,EAAE,MAAK,IAAK,KAAK;AACvB,UAAM,WAAW,GAAG,MAAM,aAAa,UAAU,MAAM;AACjD,UAAA,mBAAmB,CAAC,OAAO;AACjC,QAAI,qBAAqB;AACxB,uBAAiB,KAAK,WAAW;AAAA,IACjC;AAEG,QAAA;AAEJ,QAAI,MAAM,YAAY;AACP,oBAAA,YAAA,OAAA,KAAW,8BACY,iKAOpC,qEACoC,uBAEnC,wWAXuB,GAAA,CAAA,kBACY,mKAOpC,yEACoC,uBAEnC,6WAVS,iBAAiB,KAAK,GAAG,GAMlC,MAAM,IAEqB,MAAM,IAChC,sBAAsB,eAAe,EAAA;AAAA,IAAA,OAqBlC;AACQ,oBAAA,YAAA,OAAA,KAAW,WACY,CAAA,kBAAA,qIAIa,+CACX,iXAAA,CAAA,IAL5B,iBAAiB,KAAK,GAAG,GAIM,MAAM,IACjB,MAAM,EAAA;AAAA,IAoBrC;AAED,QAAI,QAAQ,QAAQ;AACnB,oBAAc,MAAM,QAAQ,OAC3B,aACA,QAAQ,iBAAiB,WAAW,GACpC;AAAA,QACC,UAAU,EAAE,QAAQ,MAAO;AAAA,QAC3B,qBAAqB;AAAA,MAAA,CACrB;AAAA,IAEF;AAEM,WAAA;AAAA,MACN;AAAA,QACC,OAAO;AAAA,QACP,SAAS;AAAA,sBACS,MAAM;AAAA;AAAA,gDAEoB,0IAA0I;AAAA;AAAA;AAAA;AAAA,OAInL,mBAAmB;AAAA,EAAc;AAAA;AAAA;AAAA;AAAA;AAAA,MAIpC;AAAA,IAAA;AAAA,EAEF;AAED,SAAO;AACR;"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@slicemachine/adapter-nuxt",
|
|
3
|
-
"version": "0.3.22-dev-next-release.
|
|
3
|
+
"version": "0.3.22-dev-next-release.4",
|
|
4
4
|
"description": "Slice Machine adapter for Nuxt 3.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"typescript",
|
|
@@ -61,7 +61,7 @@
|
|
|
61
61
|
"dependencies": {
|
|
62
62
|
"@prismicio/simulator": "^0.1.4",
|
|
63
63
|
"@prismicio/types-internal": "^2.2.0",
|
|
64
|
-
"@slicemachine/plugin-kit": "^0.4.22-dev-next-release.
|
|
64
|
+
"@slicemachine/plugin-kit": "^0.4.22-dev-next-release.4",
|
|
65
65
|
"common-tags": "^1.8.2",
|
|
66
66
|
"fp-ts": "^2.13.1",
|
|
67
67
|
"io-ts": "^2.2.20",
|
|
@@ -77,18 +77,17 @@
|
|
|
77
77
|
"@prismicio/mock": "0.2.0",
|
|
78
78
|
"@size-limit/preset-small-lib": "8.2.4",
|
|
79
79
|
"@types/common-tags": "1.8.1",
|
|
80
|
-
"@types/prettier": "2.7.2",
|
|
81
80
|
"@typescript-eslint/eslint-plugin": "5.55.0",
|
|
82
81
|
"@typescript-eslint/parser": "5.55.0",
|
|
83
82
|
"@vitest/coverage-v8": "0.32.0",
|
|
84
83
|
"depcheck": "1.4.3",
|
|
85
84
|
"eslint": "8.37.0",
|
|
86
|
-
"eslint-config-prettier": "
|
|
87
|
-
"eslint-plugin-prettier": "
|
|
85
|
+
"eslint-config-prettier": "9.0.0",
|
|
86
|
+
"eslint-plugin-prettier": "5.0.1",
|
|
88
87
|
"eslint-plugin-tsdoc": "0.2.17",
|
|
89
88
|
"nuxt": "3.3.3",
|
|
90
|
-
"prettier": "
|
|
91
|
-
"prettier-plugin-jsdoc": "
|
|
89
|
+
"prettier": "3.0.3",
|
|
90
|
+
"prettier-plugin-jsdoc": "1.1.1",
|
|
92
91
|
"size-limit": "8.2.4",
|
|
93
92
|
"ts-morph": "17.0.1",
|
|
94
93
|
"typescript": "4.9.5",
|
|
@@ -103,5 +102,5 @@
|
|
|
103
102
|
"engines": {
|
|
104
103
|
"node": ">=14.15.0"
|
|
105
104
|
},
|
|
106
|
-
"gitHead": "
|
|
105
|
+
"gitHead": "1444d3484bf7babe488259c26847aceb44a6b42a"
|
|
107
106
|
}
|
|
@@ -35,8 +35,8 @@ export const documentationRead: DocumentationReadHook<PluginOptions> = async (
|
|
|
35
35
|
model.id
|
|
36
36
|
}-uid-\${route.params.uid}]\`, () =>
|
|
37
37
|
prismic.client.getByUID("${model.id}", route.params.uid${
|
|
38
|
-
|
|
39
|
-
|
|
38
|
+
isTypeScriptProject ? " as string" : ""
|
|
39
|
+
})
|
|
40
40
|
);
|
|
41
41
|
|
|
42
42
|
useHead({
|