@slicemachine/adapter-sveltekit 0.3.79-beta.5 ā 0.3.79-beta.6
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":"slice-create.templates.cjs","sources":["../../../src/hooks/slice-create.templates.ts"],"sourcesContent":["import { SharedSlice } from \"@prismicio/types-internal/lib/customtypes\";\nimport { source as svelte } from \"common-tags\";\n\nimport { pascalCase } from \"../lib/pascalCase\";\n\nconst PLACEHOLDER = `\nPlaceholder component for {slice.slice_type} (variation: {slice.variation}) slices.\n<br />\n<strong>You can edit this slice directly in your code editor.</strong>\n<!--\nš” Use Prismic MCP with your code editor\n\nGet AI-powered help to build your slice components ā based on your actual model.\n\nā¶ļø Setup:\n1. Add a new MCP Server in your code editor:\n\n{\n \"mcpServers\": {\n \"Prismic MCP\": {\n \"command\": \"npx\",\n \"args\": [\"-y\", \"@prismicio/mcp-server\"]\n }\n }\n}\n\n2. Select a model optimized for coding (e.g. Claude 3.7 Sonnet or similar)\n\nā
Then open your slice file and ask your code editor:\n\t\"Code this slice\"\n\nYour code editor reads your slice model and helps you code faster ā”\nš Give your feedback: https://community.prismic.io/t/help-us-shape-the-future-of-slice-creation/19505\n-->\n`;\n\nexport function sliceTemplate(args: {\n\tmodel: SharedSlice;\n\ttypescript: boolean;\n\tversion: number;\n}): string {\n\tconst { model, typescript, version } = args;\n\n\tconst pascalName = pascalCase(model.name);\n\n\tconst v5TS = svelte`\n\t\t<script lang=\"ts\">\n\t\t\timport type { Content } from '@prismicio/client';\n\t\t\timport type { SliceComponentProps } from '@prismicio/svelte';\n\n\t\t\ttype Props = SliceComponentProps<Content.${pascalName}Slice>;\n\n\t\t\tconst { slice }: Props = $props();\n\t\t</script>\n\n\t\t<section data-slice-type={slice.slice_type} data-slice-variation={slice.variation}>\n\t\t\t${PLACEHOLDER}\n\t\t</section>\n\t`;\n\n\tconst v5JS = svelte`\n\t\t<script>\n\t\t\t/* @typedef {import(\"@prismicio/client\").Content} Content */\n\t\t\t/* @typedef {import(\"@prismicio/svelte\").SliceComponentProps} SliceComponentProps */\n\n\t\t\t/* @type {SliceComponentProps<Content.${pascalName}Slice>} */\n\t\t\tconst { slice } = $props();\n\t\t</script>\n\n\t\t<section data-slice-type={slice.slice_type} data-slice-variation={slice.variation}>\n\t\t\t${PLACEHOLDER}\n\t\t</section>\n\t`;\n\n\tconst v4TS = svelte`\n\t\t<script lang=\"ts\">\n\t\t\timport type { Content } from '@prismicio/client';\n\n\t\t\texport let slice: Content.${pascalName}Slice;\n\t\t</script>\n\n\t\t<section data-slice-type={slice.slice_type} data-slice-variation={slice.variation}>\n\t\t\t${PLACEHOLDER}\n\t\t</section>\n\t`;\n\n\tconst v4JS = svelte`\n\t\t<script>\n\t\t\t/** @type {import(\"@prismicio/client\").Content.${pascalName}Slice} */\n\t\t\texport let slice;\n\t\t</script>\n\n\t\t<section data-slice-type={slice.slice_type} data-slice-variation={slice.variation}>\n\t\t\t${PLACEHOLDER}\n\t\t</section>\n\t`;\n\n\tif (typescript) {\n\t\treturn version <= 4 ? v4TS : v5TS;\n\t}\n\n\treturn version <= 4 ? v4JS : v5JS;\n}\n"],"names":["pascalCase","svelte"],"mappings":";;;;;;;AACA,IAAA,IAAA,IAAA,IAAA;AAIA,MAAM,cAAc;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AA+Bd,SAAU,cAAc,MAI7B;AACA,QAAM,EAAE,OAAO,YAAY,QAAA,IAAY;AAEjC,QAAA,aAAaA,WAAAA,WAAW,MAAM,IAAI;AAExC,QAAM,OAAOC,WAAAA,OAAM,OAAA,KAAA,WAAA,CAAA;AAAA;AAAA;AAAA;AAAA;AAAA,+CAKoC,gKAMxC,wBAN8B,YAMzC,WAAA;AAIJ,QAAM,OAAOA,WAAA,OAAA,OAAA,KAAM,WAKiC,CAAA,uNAAA,0JAKrC,wBAL2B,YAKtC,WAAA;AAIJ,QAAM,OAAOA,WAAAA,OAAM,OAAA,KAAA,WAAA,CAAA;AAAA;AAAA;AAAA;AAAA,gCAIqB,sHAIzB,wBAJe,YAI1B,WAAA;AAIJ,QAAM,OAAOA,WAAA,OAAA,OAAA,KAAM,WAE0C,CAAA,oEAAA,+IAK9C,wBALoC,YAK/C,WAAA;AAIJ,MAAI,YAAY;AACR,WAAA,WAAW,IAAI,OAAO;AAAA,EAC9B;AAEO,SAAA,WAAW,IAAI,OAAO;AAC9B;;"}
|
1
|
+
{"version":3,"file":"slice-create.templates.cjs","sources":["../../../src/hooks/slice-create.templates.ts"],"sourcesContent":["import { SharedSlice } from \"@prismicio/types-internal/lib/customtypes\";\nimport { source as svelte } from \"common-tags\";\n\nimport { pascalCase } from \"../lib/pascalCase\";\n\nconst PLACEHOLDER = `\nPlaceholder component for {slice.slice_type} (variation: {slice.variation}) slices.\n<br />\n<strong>You can edit this slice directly in your code editor.</strong>\n<!--\nš” Use Prismic MCP with your code editor\n\nGet AI-powered help to build your slice components ā based on your actual model.\n\nā¶ļø Setup:\n1. Add a new MCP Server in your code editor:\n\n{\n \"mcpServers\": {\n \"Prismic MCP\": {\n \"command\": \"npx\",\n \"args\": [\"-y\", \"@prismicio/mcp-server@latest\"]\n }\n }\n}\n\n2. Select a model optimized for coding (e.g. Claude 3.7 Sonnet or similar)\n\nā
Then open your slice file and ask your code editor:\n\t\"Code this slice\"\n\nYour code editor reads your slice model and helps you code faster ā”\nš Give your feedback: https://community.prismic.io/t/help-us-shape-the-future-of-slice-creation/19505\n-->\n`;\n\nexport function sliceTemplate(args: {\n\tmodel: SharedSlice;\n\ttypescript: boolean;\n\tversion: number;\n}): string {\n\tconst { model, typescript, version } = args;\n\n\tconst pascalName = pascalCase(model.name);\n\n\tconst v5TS = svelte`\n\t\t<script lang=\"ts\">\n\t\t\timport type { Content } from '@prismicio/client';\n\t\t\timport type { SliceComponentProps } from '@prismicio/svelte';\n\n\t\t\ttype Props = SliceComponentProps<Content.${pascalName}Slice>;\n\n\t\t\tconst { slice }: Props = $props();\n\t\t</script>\n\n\t\t<section data-slice-type={slice.slice_type} data-slice-variation={slice.variation}>\n\t\t\t${PLACEHOLDER}\n\t\t</section>\n\t`;\n\n\tconst v5JS = svelte`\n\t\t<script>\n\t\t\t/* @typedef {import(\"@prismicio/client\").Content} Content */\n\t\t\t/* @typedef {import(\"@prismicio/svelte\").SliceComponentProps} SliceComponentProps */\n\n\t\t\t/* @type {SliceComponentProps<Content.${pascalName}Slice>} */\n\t\t\tconst { slice } = $props();\n\t\t</script>\n\n\t\t<section data-slice-type={slice.slice_type} data-slice-variation={slice.variation}>\n\t\t\t${PLACEHOLDER}\n\t\t</section>\n\t`;\n\n\tconst v4TS = svelte`\n\t\t<script lang=\"ts\">\n\t\t\timport type { Content } from '@prismicio/client';\n\n\t\t\texport let slice: Content.${pascalName}Slice;\n\t\t</script>\n\n\t\t<section data-slice-type={slice.slice_type} data-slice-variation={slice.variation}>\n\t\t\t${PLACEHOLDER}\n\t\t</section>\n\t`;\n\n\tconst v4JS = svelte`\n\t\t<script>\n\t\t\t/** @type {import(\"@prismicio/client\").Content.${pascalName}Slice} */\n\t\t\texport let slice;\n\t\t</script>\n\n\t\t<section data-slice-type={slice.slice_type} data-slice-variation={slice.variation}>\n\t\t\t${PLACEHOLDER}\n\t\t</section>\n\t`;\n\n\tif (typescript) {\n\t\treturn version <= 4 ? v4TS : v5TS;\n\t}\n\n\treturn version <= 4 ? v4JS : v5JS;\n}\n"],"names":["pascalCase","svelte"],"mappings":";;;;;;;AACA,IAAA,IAAA,IAAA,IAAA;AAIA,MAAM,cAAc;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AA+Bd,SAAU,cAAc,MAI7B;AACA,QAAM,EAAE,OAAO,YAAY,QAAA,IAAY;AAEjC,QAAA,aAAaA,WAAAA,WAAW,MAAM,IAAI;AAExC,QAAM,OAAOC,WAAAA,OAAM,OAAA,KAAA,WAAA,CAAA;AAAA;AAAA;AAAA;AAAA;AAAA,+CAKoC,gKAMxC,wBAN8B,YAMzC,WAAA;AAIJ,QAAM,OAAOA,WAAA,OAAA,OAAA,KAAM,WAKiC,CAAA,uNAAA,0JAKrC,wBAL2B,YAKtC,WAAA;AAIJ,QAAM,OAAOA,WAAAA,OAAM,OAAA,KAAA,WAAA,CAAA;AAAA;AAAA;AAAA;AAAA,gCAIqB,sHAIzB,wBAJe,YAI1B,WAAA;AAIJ,QAAM,OAAOA,WAAA,OAAA,OAAA,KAAM,WAE0C,CAAA,oEAAA,+IAK9C,wBALoC,YAK/C,WAAA;AAIJ,MAAI,YAAY;AACR,WAAA,WAAW,IAAI,OAAO;AAAA,EAC9B;AAEO,SAAA,WAAW,IAAI,OAAO;AAC9B;;"}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"slice-create.templates.js","sources":["../../../src/hooks/slice-create.templates.ts"],"sourcesContent":["import { SharedSlice } from \"@prismicio/types-internal/lib/customtypes\";\nimport { source as svelte } from \"common-tags\";\n\nimport { pascalCase } from \"../lib/pascalCase\";\n\nconst PLACEHOLDER = `\nPlaceholder component for {slice.slice_type} (variation: {slice.variation}) slices.\n<br />\n<strong>You can edit this slice directly in your code editor.</strong>\n<!--\nš” Use Prismic MCP with your code editor\n\nGet AI-powered help to build your slice components ā based on your actual model.\n\nā¶ļø Setup:\n1. Add a new MCP Server in your code editor:\n\n{\n \"mcpServers\": {\n \"Prismic MCP\": {\n \"command\": \"npx\",\n \"args\": [\"-y\", \"@prismicio/mcp-server\"]\n }\n }\n}\n\n2. Select a model optimized for coding (e.g. Claude 3.7 Sonnet or similar)\n\nā
Then open your slice file and ask your code editor:\n\t\"Code this slice\"\n\nYour code editor reads your slice model and helps you code faster ā”\nš Give your feedback: https://community.prismic.io/t/help-us-shape-the-future-of-slice-creation/19505\n-->\n`;\n\nexport function sliceTemplate(args: {\n\tmodel: SharedSlice;\n\ttypescript: boolean;\n\tversion: number;\n}): string {\n\tconst { model, typescript, version } = args;\n\n\tconst pascalName = pascalCase(model.name);\n\n\tconst v5TS = svelte`\n\t\t<script lang=\"ts\">\n\t\t\timport type { Content } from '@prismicio/client';\n\t\t\timport type { SliceComponentProps } from '@prismicio/svelte';\n\n\t\t\ttype Props = SliceComponentProps<Content.${pascalName}Slice>;\n\n\t\t\tconst { slice }: Props = $props();\n\t\t</script>\n\n\t\t<section data-slice-type={slice.slice_type} data-slice-variation={slice.variation}>\n\t\t\t${PLACEHOLDER}\n\t\t</section>\n\t`;\n\n\tconst v5JS = svelte`\n\t\t<script>\n\t\t\t/* @typedef {import(\"@prismicio/client\").Content} Content */\n\t\t\t/* @typedef {import(\"@prismicio/svelte\").SliceComponentProps} SliceComponentProps */\n\n\t\t\t/* @type {SliceComponentProps<Content.${pascalName}Slice>} */\n\t\t\tconst { slice } = $props();\n\t\t</script>\n\n\t\t<section data-slice-type={slice.slice_type} data-slice-variation={slice.variation}>\n\t\t\t${PLACEHOLDER}\n\t\t</section>\n\t`;\n\n\tconst v4TS = svelte`\n\t\t<script lang=\"ts\">\n\t\t\timport type { Content } from '@prismicio/client';\n\n\t\t\texport let slice: Content.${pascalName}Slice;\n\t\t</script>\n\n\t\t<section data-slice-type={slice.slice_type} data-slice-variation={slice.variation}>\n\t\t\t${PLACEHOLDER}\n\t\t</section>\n\t`;\n\n\tconst v4JS = svelte`\n\t\t<script>\n\t\t\t/** @type {import(\"@prismicio/client\").Content.${pascalName}Slice} */\n\t\t\texport let slice;\n\t\t</script>\n\n\t\t<section data-slice-type={slice.slice_type} data-slice-variation={slice.variation}>\n\t\t\t${PLACEHOLDER}\n\t\t</section>\n\t`;\n\n\tif (typescript) {\n\t\treturn version <= 4 ? v4TS : v5TS;\n\t}\n\n\treturn version <= 4 ? v4JS : v5JS;\n}\n"],"names":["svelte"],"mappings":";;;;;AACA,IAAA,IAAA,IAAA,IAAA;AAIA,MAAM,cAAc;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AA+Bd,SAAU,cAAc,MAI7B;AACA,QAAM,EAAE,OAAO,YAAY,QAAA,IAAY;AAEjC,QAAA,aAAa,WAAW,MAAM,IAAI;AAExC,QAAM,OAAOA,OAAM,OAAA,KAAA,WAAA,CAAA;AAAA;AAAA;AAAA;AAAA;AAAA,+CAKoC,gKAMxC,wBAN8B,YAMzC,WAAA;AAIJ,QAAM,OAAOA,OAAA,OAAA,KAAM,WAKiC,CAAA,uNAAA,0JAKrC,wBAL2B,YAKtC,WAAA;AAIJ,QAAM,OAAOA,OAAM,OAAA,KAAA,WAAA,CAAA;AAAA;AAAA;AAAA;AAAA,gCAIqB,sHAIzB,wBAJe,YAI1B,WAAA;AAIJ,QAAM,OAAOA,OAAA,OAAA,KAAM,WAE0C,CAAA,oEAAA,+IAK9C,wBALoC,YAK/C,WAAA;AAIJ,MAAI,YAAY;AACR,WAAA,WAAW,IAAI,OAAO;AAAA,EAC9B;AAEO,SAAA,WAAW,IAAI,OAAO;AAC9B;"}
|
1
|
+
{"version":3,"file":"slice-create.templates.js","sources":["../../../src/hooks/slice-create.templates.ts"],"sourcesContent":["import { SharedSlice } from \"@prismicio/types-internal/lib/customtypes\";\nimport { source as svelte } from \"common-tags\";\n\nimport { pascalCase } from \"../lib/pascalCase\";\n\nconst PLACEHOLDER = `\nPlaceholder component for {slice.slice_type} (variation: {slice.variation}) slices.\n<br />\n<strong>You can edit this slice directly in your code editor.</strong>\n<!--\nš” Use Prismic MCP with your code editor\n\nGet AI-powered help to build your slice components ā based on your actual model.\n\nā¶ļø Setup:\n1. Add a new MCP Server in your code editor:\n\n{\n \"mcpServers\": {\n \"Prismic MCP\": {\n \"command\": \"npx\",\n \"args\": [\"-y\", \"@prismicio/mcp-server@latest\"]\n }\n }\n}\n\n2. Select a model optimized for coding (e.g. Claude 3.7 Sonnet or similar)\n\nā
Then open your slice file and ask your code editor:\n\t\"Code this slice\"\n\nYour code editor reads your slice model and helps you code faster ā”\nš Give your feedback: https://community.prismic.io/t/help-us-shape-the-future-of-slice-creation/19505\n-->\n`;\n\nexport function sliceTemplate(args: {\n\tmodel: SharedSlice;\n\ttypescript: boolean;\n\tversion: number;\n}): string {\n\tconst { model, typescript, version } = args;\n\n\tconst pascalName = pascalCase(model.name);\n\n\tconst v5TS = svelte`\n\t\t<script lang=\"ts\">\n\t\t\timport type { Content } from '@prismicio/client';\n\t\t\timport type { SliceComponentProps } from '@prismicio/svelte';\n\n\t\t\ttype Props = SliceComponentProps<Content.${pascalName}Slice>;\n\n\t\t\tconst { slice }: Props = $props();\n\t\t</script>\n\n\t\t<section data-slice-type={slice.slice_type} data-slice-variation={slice.variation}>\n\t\t\t${PLACEHOLDER}\n\t\t</section>\n\t`;\n\n\tconst v5JS = svelte`\n\t\t<script>\n\t\t\t/* @typedef {import(\"@prismicio/client\").Content} Content */\n\t\t\t/* @typedef {import(\"@prismicio/svelte\").SliceComponentProps} SliceComponentProps */\n\n\t\t\t/* @type {SliceComponentProps<Content.${pascalName}Slice>} */\n\t\t\tconst { slice } = $props();\n\t\t</script>\n\n\t\t<section data-slice-type={slice.slice_type} data-slice-variation={slice.variation}>\n\t\t\t${PLACEHOLDER}\n\t\t</section>\n\t`;\n\n\tconst v4TS = svelte`\n\t\t<script lang=\"ts\">\n\t\t\timport type { Content } from '@prismicio/client';\n\n\t\t\texport let slice: Content.${pascalName}Slice;\n\t\t</script>\n\n\t\t<section data-slice-type={slice.slice_type} data-slice-variation={slice.variation}>\n\t\t\t${PLACEHOLDER}\n\t\t</section>\n\t`;\n\n\tconst v4JS = svelte`\n\t\t<script>\n\t\t\t/** @type {import(\"@prismicio/client\").Content.${pascalName}Slice} */\n\t\t\texport let slice;\n\t\t</script>\n\n\t\t<section data-slice-type={slice.slice_type} data-slice-variation={slice.variation}>\n\t\t\t${PLACEHOLDER}\n\t\t</section>\n\t`;\n\n\tif (typescript) {\n\t\treturn version <= 4 ? v4TS : v5TS;\n\t}\n\n\treturn version <= 4 ? v4JS : v5JS;\n}\n"],"names":["svelte"],"mappings":";;;;;AACA,IAAA,IAAA,IAAA,IAAA;AAIA,MAAM,cAAc;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AA+Bd,SAAU,cAAc,MAI7B;AACA,QAAM,EAAE,OAAO,YAAY,QAAA,IAAY;AAEjC,QAAA,aAAa,WAAW,MAAM,IAAI;AAExC,QAAM,OAAOA,OAAM,OAAA,KAAA,WAAA,CAAA;AAAA;AAAA;AAAA;AAAA;AAAA,+CAKoC,gKAMxC,wBAN8B,YAMzC,WAAA;AAIJ,QAAM,OAAOA,OAAA,OAAA,KAAM,WAKiC,CAAA,uNAAA,0JAKrC,wBAL2B,YAKtC,WAAA;AAIJ,QAAM,OAAOA,OAAM,OAAA,KAAA,WAAA,CAAA;AAAA;AAAA;AAAA;AAAA,gCAIqB,sHAIzB,wBAJe,YAI1B,WAAA;AAIJ,QAAM,OAAOA,OAAA,OAAA,KAAM,WAE0C,CAAA,oEAAA,+IAK9C,wBALoC,YAK/C,WAAA;AAIJ,MAAI,YAAY;AACR,WAAA,WAAW,IAAI,OAAO;AAAA,EAC9B;AAEO,SAAA,WAAW,IAAI,OAAO;AAC9B;"}
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@slicemachine/adapter-sveltekit",
|
3
|
-
"version": "0.3.79-beta.
|
3
|
+
"version": "0.3.79-beta.6",
|
4
4
|
"description": "Slice Machine adapter for SvelteKit.",
|
5
5
|
"keywords": [
|
6
6
|
"typescript",
|
@@ -64,7 +64,7 @@
|
|
64
64
|
"dependencies": {
|
65
65
|
"@prismicio/simulator": "^0.1.4",
|
66
66
|
"@prismicio/types-internal": "3.11.2",
|
67
|
-
"@slicemachine/plugin-kit": "0.4.78-beta.
|
67
|
+
"@slicemachine/plugin-kit": "0.4.78-beta.6",
|
68
68
|
"common-tags": "^1.8.2",
|
69
69
|
"fp-ts": "^2.13.1",
|
70
70
|
"io-ts": "^2.2.20",
|