@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.
@@ -22,7 +22,7 @@ Get AI-powered help to build your slice components — based on your actual mode
22
22
  "mcpServers": {
23
23
  "Prismic MCP": {
24
24
  "command": "npx",
25
- "args": ["-y", "@prismicio/mcp-server"]
25
+ "args": ["-y", "@prismicio/mcp-server@latest"]
26
26
  }
27
27
  }
28
28
  }
@@ -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;;"}
@@ -20,7 +20,7 @@ Get AI-powered help to build your slice components — based on your actual mode
20
20
  "mcpServers": {
21
21
  "Prismic MCP": {
22
22
  "command": "npx",
23
- "args": ["-y", "@prismicio/mcp-server"]
23
+ "args": ["-y", "@prismicio/mcp-server@latest"]
24
24
  }
25
25
  }
26
26
  }
@@ -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.5",
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.5",
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",
@@ -19,7 +19,7 @@ Get AI-powered help to build your slice components — based on your actual mode
19
19
  "mcpServers": {
20
20
  "Prismic MCP": {
21
21
  "command": "npx",
22
- "args": ["-y", "@prismicio/mcp-server"]
22
+ "args": ["-y", "@prismicio/mcp-server@latest"]
23
23
  }
24
24
  }
25
25
  }