@slicemachine/adapter-nuxt 0.3.18-dev-next-release.9 → 0.3.18-dev-slice-templates-svelte-nuxt.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (37) hide show
  1. package/dist/AlternateGrid/javascript.vue +224 -0
  2. package/dist/AlternateGrid/screenshot-default.png +0 -0
  3. package/dist/AlternateGrid/screenshot-imageRight.png +0 -0
  4. package/dist/AlternateGrid/typescript.vue +231 -0
  5. package/dist/CallToAction/javascript.vue +128 -0
  6. package/dist/CallToAction/screenshot-alignLeft.png +0 -0
  7. package/dist/CallToAction/screenshot-default.png +0 -0
  8. package/dist/CallToAction/typescript.vue +133 -0
  9. package/dist/CustomerLogos/javascript.vue +115 -0
  10. package/dist/CustomerLogos/screenshot-default.png +0 -0
  11. package/dist/CustomerLogos/typescript.vue +122 -0
  12. package/dist/Hero/javascript.vue +43 -75
  13. package/dist/Hero/typescript.vue +44 -76
  14. package/dist/plugin.cjs +4 -1
  15. package/dist/plugin.cjs.map +1 -1
  16. package/dist/plugin.js +4 -1
  17. package/dist/plugin.js.map +1 -1
  18. package/dist/sliceTemplates/AlternateGrid/index.cjs +436 -0
  19. package/dist/sliceTemplates/AlternateGrid/index.cjs.map +1 -0
  20. package/dist/sliceTemplates/AlternateGrid/index.d.ts +8 -0
  21. package/dist/sliceTemplates/AlternateGrid/index.js +436 -0
  22. package/dist/sliceTemplates/AlternateGrid/index.js.map +1 -0
  23. package/dist/sliceTemplates/CallToAction/index.cjs +264 -0
  24. package/dist/sliceTemplates/CallToAction/index.cjs.map +1 -0
  25. package/dist/sliceTemplates/CallToAction/index.d.ts +8 -0
  26. package/dist/sliceTemplates/CallToAction/index.js +264 -0
  27. package/dist/sliceTemplates/CallToAction/index.js.map +1 -0
  28. package/dist/sliceTemplates/CustomerLogos/index.cjs +314 -0
  29. package/dist/sliceTemplates/CustomerLogos/index.cjs.map +1 -0
  30. package/dist/sliceTemplates/CustomerLogos/index.d.ts +7 -0
  31. package/dist/sliceTemplates/CustomerLogos/index.js +314 -0
  32. package/dist/sliceTemplates/CustomerLogos/index.js.map +1 -0
  33. package/package.json +3 -3
  34. package/src/plugin.ts +4 -1
  35. package/src/sliceTemplates/AlternateGrid/index.ts +441 -0
  36. package/src/sliceTemplates/CallToAction/index.ts +265 -0
  37. package/src/sliceTemplates/CustomerLogos/index.ts +313 -0
@@ -0,0 +1,115 @@
1
+ <script setup lang="ts">
2
+ import { isFilled } from "@prismicio/client";
3
+
4
+ defineProps(getSliceComponentProps(["slice", "index", "slices", "context"]));
5
+ </script>
6
+
7
+ <template>
8
+ <section
9
+ :data-slice-type="slice.slice_type"
10
+ :data-slice-variation="slice.variation"
11
+ class="es-bounded es-customer-logos"
12
+ >
13
+ <div class="es-bounded__content es-customer-logos__content">
14
+ <h2
15
+ v-if="isFilled.richText(slice.primary.eyebrowHeadline)"
16
+ class="es-customer-logos__heading"
17
+ >
18
+ <PrismicRichText :field="slice.primary.eyebrowHeadline" />
19
+ </h2>
20
+ <ul v-if="slice.items.length > 0" class="es-customer-logos__logos">
21
+ <li
22
+ v-for="item in slice.items"
23
+ :key="item.image.url"
24
+ class="es-customer-logos__logo"
25
+ >
26
+ <PrismicLink :field="item.link">
27
+ <PrismicImage
28
+ :field="item.image"
29
+ :height="26"
30
+ :width="160"
31
+ class="es-customer-logos__logo__link__image"
32
+ />
33
+ </PrismicLink>
34
+ </li>
35
+ </ul>
36
+ <PrismicLink
37
+ :field="slice.primary.callToActionLink"
38
+ class="es-customer-logos__button"
39
+ >
40
+ {{ slice.primary.callToActionLabel || "Learn more..." }}
41
+ </PrismicLink>
42
+ </div>
43
+ </section>
44
+ </template>
45
+
46
+ <style scoped>
47
+ .es-bounded {
48
+ margin: 0px;
49
+ min-width: 0px;
50
+ position: relative;
51
+ padding: 8vw 1.25rem;
52
+ }
53
+
54
+ .es-bounded__content {
55
+ min-width: 0px;
56
+ max-width: 90%;
57
+ margin: 0px auto;
58
+ font-family: system-ui, sans-serif;
59
+ }
60
+
61
+ .es-customer-logos {
62
+ background-color: #f4f0ec;
63
+ color: #333;
64
+ }
65
+
66
+ .es-customer-logos__content {
67
+ display: grid;
68
+ gap: 2rem;
69
+ justify-items: center;
70
+ }
71
+
72
+ .es-customer-logos__heading {
73
+ color: #8592e0;
74
+ font-size: 1.5rem;
75
+ font-weight: 500;
76
+ text-align: center;
77
+ }
78
+
79
+ .es-customer-logos__logos {
80
+ display: grid;
81
+ grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
82
+ grid-column-gap: 1.25rem;
83
+ grid-row-gap: 2rem;
84
+ align-items: center;
85
+ list-style-type: none;
86
+ width: 100%;
87
+ }
88
+
89
+ @media (min-width: 1200px) {
90
+ .es-customer-logos__logos {
91
+ margin-left: -3rem;
92
+ }
93
+ }
94
+
95
+ .es-customer-logos__logo {
96
+ margin: 0;
97
+ display: flex;
98
+ justify-content: center;
99
+ }
100
+
101
+ @media (min-width: 1200px) {
102
+ .es-customer-logos__logo {
103
+ margin-left: 3rem;
104
+ }
105
+ }
106
+
107
+ .es-customer-logos__logo__link__image {
108
+ max-width: 10rem;
109
+ }
110
+
111
+ .es-customer-logos__button {
112
+ justify-self: center;
113
+ text-decoration: underline;
114
+ }
115
+ </style>
@@ -0,0 +1,122 @@
1
+ <script setup lang="ts">
2
+ import { Content, isFilled } from "@prismicio/client";
3
+
4
+ defineProps(
5
+ getSliceComponentProps<Content.PascalNameToReplaceSlice>([
6
+ "slice",
7
+ "index",
8
+ "slices",
9
+ "context",
10
+ ]),
11
+ );
12
+ </script>
13
+
14
+ <template>
15
+ <section
16
+ :data-slice-type="slice.slice_type"
17
+ :data-slice-variation="slice.variation"
18
+ class="es-bounded es-customer-logos"
19
+ >
20
+ <div class="es-bounded__content es-customer-logos__content">
21
+ <h2
22
+ v-if="isFilled.richText(slice.primary.eyebrowHeadline)"
23
+ class="es-customer-logos__heading"
24
+ >
25
+ <PrismicRichText :field="slice.primary.eyebrowHeadline" />
26
+ </h2>
27
+ <ul v-if="slice.items.length > 0" class="es-customer-logos__logos">
28
+ <li
29
+ v-for="item in slice.items"
30
+ :key="item.image.url"
31
+ class="es-customer-logos__logo"
32
+ >
33
+ <PrismicLink :field="item.link">
34
+ <PrismicImage
35
+ :field="item.image"
36
+ :height="26"
37
+ :width="160"
38
+ class="es-customer-logos__logo__link__image"
39
+ />
40
+ </PrismicLink>
41
+ </li>
42
+ </ul>
43
+ <PrismicLink
44
+ :field="slice.primary.callToActionLink"
45
+ class="es-customer-logos__button"
46
+ >
47
+ {{ slice.primary.callToActionLabel || "Learn more..." }}
48
+ </PrismicLink>
49
+ </div>
50
+ </section>
51
+ </template>
52
+
53
+ <style scoped>
54
+ .es-bounded {
55
+ margin: 0px;
56
+ min-width: 0px;
57
+ position: relative;
58
+ padding: 8vw 1.25rem;
59
+ }
60
+
61
+ .es-bounded__content {
62
+ min-width: 0px;
63
+ max-width: 90%;
64
+ margin: 0px auto;
65
+ font-family: system-ui, sans-serif;
66
+ }
67
+
68
+ .es-customer-logos {
69
+ background-color: #f4f0ec;
70
+ color: #333;
71
+ }
72
+
73
+ .es-customer-logos__content {
74
+ display: grid;
75
+ gap: 2rem;
76
+ justify-items: center;
77
+ }
78
+
79
+ .es-customer-logos__heading {
80
+ color: #8592e0;
81
+ font-size: 1.5rem;
82
+ font-weight: 500;
83
+ text-align: center;
84
+ }
85
+
86
+ .es-customer-logos__logos {
87
+ display: grid;
88
+ grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
89
+ grid-column-gap: 1.25rem;
90
+ grid-row-gap: 2rem;
91
+ align-items: center;
92
+ list-style-type: none;
93
+ width: 100%;
94
+ }
95
+
96
+ @media (min-width: 1200px) {
97
+ .es-customer-logos__logos {
98
+ margin-left: -3rem;
99
+ }
100
+ }
101
+
102
+ .es-customer-logos__logo {
103
+ margin: 0;
104
+ display: flex;
105
+ justify-content: center;
106
+ }
107
+
108
+ @media (min-width: 1200px) {
109
+ .es-customer-logos__logo {
110
+ margin-left: 3rem;
111
+ }
112
+ }
113
+
114
+ .es-customer-logos__logo__link__image {
115
+ max-width: 10rem;
116
+ }
117
+
118
+ .es-customer-logos__button {
119
+ justify-self: center;
120
+ text-decoration: underline;
121
+ }
122
+ </style>
@@ -8,39 +8,52 @@ defineProps(getSliceComponentProps(["slice", "index", "slices", "context"]));
8
8
  <section
9
9
  :data-slice-type="slice.slice_type"
10
10
  :data-slice-variation="slice.variation"
11
- class="es-bounded es-fullpage-hero es-bounded__content es-fullpage-hero__content"
12
- :class="
13
- slice.variation === 'imageRight'
14
- ? 'es-fullpage-hero__image--right'
15
- : 'es-fullpage-hero__image--left'
16
- "
11
+ class="es-bounded es-fullpage-hero"
17
12
  >
18
- <div>
19
- <PrismicImage
20
- v-if="isFilled.image(slice.primary.image)"
21
- :field="slice.primary.image"
22
- class="es-fullpage-hero__image"
23
- />
24
- </div>
25
- <div class="es-fullpage-hero__content-right">
26
- <div class="es-fullpage-hero__content__intro">
27
- <p
28
- v-if="isFilled.keyText(slice.primary.eyebrowHeadline)"
29
- class="es-fullpage-hero__content__intro__eyebrow"
30
- >
31
- {{ slice.primary.eyebrowHeadline }}
32
- </p>
33
- <PrismicRichText
34
- v-if="isFilled.richText(slice.primary.title)"
35
- class="es-fullpage-hero__content__intro__headline"
36
- :field="slice.primary.title"
13
+ <div
14
+ class="es-fullpage-hero__content"
15
+ :class="
16
+ slice.variation === 'imageRight'
17
+ ? 'es-fullpage-hero__image--right'
18
+ : 'es-fullpage-hero__image--left'
19
+ "
20
+ >
21
+ <div>
22
+ <PrismicImage
23
+ v-if="isFilled.image(slice.primary.image)"
24
+ :field="slice.primary.image"
25
+ class="es-fullpage-hero__image"
37
26
  />
38
27
  </div>
39
- <PrismicRichText
40
- v-if="isFilled.richText(slice.primary.description)"
41
- class="es-fullpage-hero__content__intro__description"
42
- :field="slice.primary.description"
43
- />
28
+ <div class="es-fullpage-hero__content-right">
29
+ <div class="es-fullpage-hero__content__intro">
30
+ <p
31
+ v-if="isFilled.keyText(slice.primary.eyebrowHeadline)"
32
+ class="es-fullpage-hero__content__intro__eyebrow"
33
+ >
34
+ {{ slice.primary.eyebrowHeadline }}
35
+ </p>
36
+ <div
37
+ v-if="isFilled.richText(slice.primary.title)"
38
+ class="es-fullpage-hero__content__intro__headline"
39
+ >
40
+ <PrismicRichText :field="slice.primary.title" />
41
+ </div>
42
+ <div
43
+ v-if="isFilled.richText(slice.primary.description)"
44
+ class="es-fullpage-hero__content__intro__description"
45
+ >
46
+ <PrismicRichText :field="slice.primary.description" />
47
+ </div>
48
+ <PrismicLink
49
+ v-if="isFilled.link(slice.primary.callToActionLink)"
50
+ class="es-call-to-action__link"
51
+ :field="slice.primary.callToActionLink"
52
+ >
53
+ {{ slice.primary.callToActionLabel || "Learn more…" }}
54
+ </PrismicLink>
55
+ </div>
56
+ </div>
44
57
  </div>
45
58
  </section>
46
59
  </template>
@@ -52,12 +65,6 @@ defineProps(getSliceComponentProps(["slice", "index", "slices", "context"]));
52
65
  position: relative;
53
66
  }
54
67
 
55
- .es-bounded__content {
56
- min-width: 0px;
57
- max-width: 90%;
58
- margin: 0px auto;
59
- }
60
-
61
68
  .es-fullpage-hero {
62
69
  font-family: system-ui, sans-serif;
63
70
  background-color: #fff;
@@ -163,45 +170,6 @@ defineProps(getSliceComponentProps(["slice", "index", "slices", "context"]));
163
170
  }
164
171
  }
165
172
 
166
- .es-fullpage-hero__content__items {
167
- display: grid;
168
- gap: 2rem;
169
- }
170
-
171
- @media (min-width: 640px) {
172
- .es-fullpage-hero__content__items {
173
- grid-template-columns: repeat(2, 1fr);
174
- }
175
- }
176
-
177
- .es-fullpage-hero__item {
178
- display: grid;
179
- align-content: start;
180
- }
181
-
182
- .es-fullpage-hero__item__icon {
183
- max-height: 3rem;
184
- }
185
-
186
- .es-fullpage-hero__item__heading {
187
- font-weight: 700;
188
- font-size: 1.17rem;
189
- margin-top: 0;
190
- margin-bottom: 0.5rem;
191
- }
192
-
193
- .es-fullpage-hero__item__heading > * {
194
- margin: 0;
195
- }
196
-
197
- .es-fullpage-hero__item__description {
198
- font-size: 0.9rem;
199
- }
200
-
201
- .es-fullpage-hero__item__description > * {
202
- margin: 0;
203
- }
204
-
205
173
  .es-call-to-action__link {
206
174
  justify-self: flex-start;
207
175
  border-radius: 0.25rem;
@@ -2,7 +2,7 @@
2
2
  import { Content, isFilled } from "@prismicio/client";
3
3
 
4
4
  defineProps(
5
- getSliceComponentProps<Content.RichTextSlice>([
5
+ getSliceComponentProps<Content.PascalNameToReplaceSlice>([
6
6
  "slice",
7
7
  "index",
8
8
  "slices",
@@ -15,39 +15,52 @@ defineProps(
15
15
  <section
16
16
  :data-slice-type="slice.slice_type"
17
17
  :data-slice-variation="slice.variation"
18
- class="es-bounded es-fullpage-hero es-bounded__content es-fullpage-hero__content"
19
- :class="
20
- slice.variation === 'imageRight'
21
- ? 'es-fullpage-hero__image--right'
22
- : 'es-fullpage-hero__image--left'
23
- "
18
+ class="es-bounded es-fullpage-hero"
24
19
  >
25
- <div>
26
- <PrismicImage
27
- v-if="isFilled.image(slice.primary.image)"
28
- :field="slice.primary.image"
29
- class="es-fullpage-hero__image"
30
- />
31
- </div>
32
- <div class="es-fullpage-hero__content-right">
33
- <div class="es-fullpage-hero__content__intro">
34
- <p
35
- v-if="isFilled.keyText(slice.primary.eyebrowHeadline)"
36
- class="es-fullpage-hero__content__intro__eyebrow"
37
- >
38
- {{ slice.primary.eyebrowHeadline }}
39
- </p>
40
- <PrismicRichText
41
- v-if="isFilled.richText(slice.primary.title)"
42
- class="es-fullpage-hero__content__intro__headline"
43
- :field="slice.primary.title"
20
+ <div
21
+ class="es-fullpage-hero__content"
22
+ :class="
23
+ slice.variation === 'imageRight'
24
+ ? 'es-fullpage-hero__image--right'
25
+ : 'es-fullpage-hero__image--left'
26
+ "
27
+ >
28
+ <div>
29
+ <PrismicImage
30
+ v-if="isFilled.image(slice.primary.image)"
31
+ :field="slice.primary.image"
32
+ class="es-fullpage-hero__image"
44
33
  />
45
34
  </div>
46
- <PrismicRichText
47
- v-if="isFilled.richText(slice.primary.description)"
48
- class="es-fullpage-hero__content__intro__description"
49
- :field="slice.primary.description"
50
- />
35
+ <div class="es-fullpage-hero__content-right">
36
+ <div class="es-fullpage-hero__content__intro">
37
+ <p
38
+ v-if="isFilled.keyText(slice.primary.eyebrowHeadline)"
39
+ class="es-fullpage-hero__content__intro__eyebrow"
40
+ >
41
+ {{ slice.primary.eyebrowHeadline }}
42
+ </p>
43
+ <div
44
+ v-if="isFilled.richText(slice.primary.title)"
45
+ class="es-fullpage-hero__content__intro__headline"
46
+ >
47
+ <PrismicRichText :field="slice.primary.title" />
48
+ </div>
49
+ <div
50
+ v-if="isFilled.richText(slice.primary.description)"
51
+ class="es-fullpage-hero__content__intro__description"
52
+ >
53
+ <PrismicRichText :field="slice.primary.description" />
54
+ </div>
55
+ <PrismicLink
56
+ v-if="isFilled.link(slice.primary.callToActionLink)"
57
+ class="es-call-to-action__link"
58
+ :field="slice.primary.callToActionLink"
59
+ >
60
+ {{ slice.primary.callToActionLabel || "Learn more…" }}
61
+ </PrismicLink>
62
+ </div>
63
+ </div>
51
64
  </div>
52
65
  </section>
53
66
  </template>
@@ -59,12 +72,6 @@ defineProps(
59
72
  position: relative;
60
73
  }
61
74
 
62
- .es-bounded__content {
63
- min-width: 0px;
64
- max-width: 90%;
65
- margin: 0px auto;
66
- }
67
-
68
75
  .es-fullpage-hero {
69
76
  font-family: system-ui, sans-serif;
70
77
  background-color: #fff;
@@ -170,45 +177,6 @@ defineProps(
170
177
  }
171
178
  }
172
179
 
173
- .es-fullpage-hero__content__items {
174
- display: grid;
175
- gap: 2rem;
176
- }
177
-
178
- @media (min-width: 640px) {
179
- .es-fullpage-hero__content__items {
180
- grid-template-columns: repeat(2, 1fr);
181
- }
182
- }
183
-
184
- .es-fullpage-hero__item {
185
- display: grid;
186
- align-content: start;
187
- }
188
-
189
- .es-fullpage-hero__item__icon {
190
- max-height: 3rem;
191
- }
192
-
193
- .es-fullpage-hero__item__heading {
194
- font-weight: 700;
195
- font-size: 1.17rem;
196
- margin-top: 0;
197
- margin-bottom: 0.5rem;
198
- }
199
-
200
- .es-fullpage-hero__item__heading > * {
201
- margin: 0;
202
- }
203
-
204
- .es-fullpage-hero__item__description {
205
- font-size: 0.9rem;
206
- }
207
-
208
- .es-fullpage-hero__item__description > * {
209
- margin: 0;
210
- }
211
-
212
180
  .es-call-to-action__link {
213
181
  justify-self: flex-start;
214
182
  border-radius: 0.25rem;
package/dist/plugin.cjs CHANGED
@@ -13,6 +13,9 @@ const sliceCreate = require("./hooks/slice-create.cjs");
13
13
  const sliceSimulatorSetupRead = require("./hooks/sliceSimulator-setup-read.cjs");
14
14
  const snippetRead = require("./hooks/snippet-read.cjs");
15
15
  const index = require("./sliceTemplates/Hero/index.cjs");
16
+ const index$3 = require("./sliceTemplates/CallToAction/index.cjs");
17
+ const index$2 = require("./sliceTemplates/AlternateGrid/index.cjs");
18
+ const index$1 = require("./sliceTemplates/CustomerLogos/index.cjs");
16
19
  const plugin = pluginKit.defineSliceMachinePlugin({
17
20
  meta: {
18
21
  name: _package.name
@@ -119,7 +122,7 @@ const plugin = pluginKit.defineSliceMachinePlugin({
119
122
  ...data,
120
123
  ...context,
121
124
  dirName: path.dirname(node_url.fileURLToPath(new URL(typeof document === "undefined" ? require("url").pathToFileURL(__filename).href : document.currentScript && document.currentScript.src || new URL("plugin.cjs", document.baseURI).href))),
122
- templates: [index],
125
+ templates: [index, index$1, index$2, index$3],
123
126
  componentFileNames: {
124
127
  js: "javascript.vue",
125
128
  ts: "typescript.vue"
@@ -1 +1 @@
1
- {"version":3,"file":"plugin.cjs","sources":["../../src/plugin.ts"],"sourcesContent":["import path from \"node:path\";\nimport { fileURLToPath } from \"node:url\";\n\nimport { defineSliceMachinePlugin } from \"@slicemachine/plugin-kit\";\nimport {\n\tdeleteCustomTypeDirectory,\n\tdeleteCustomTypeFile,\n\tdeleteSliceDirectory,\n\tdeleteSliceFile,\n\treadCustomTypeFile,\n\treadCustomTypeLibrary,\n\treadCustomTypeModel,\n\treadSliceFile,\n\treadSliceLibrary,\n\treadSliceModel,\n\treadSliceTemplateLibrary,\n\trenameCustomType,\n\trenameSlice,\n\tupsertGlobalTypeScriptTypes,\n\twriteCustomTypeFile,\n\twriteCustomTypeModel,\n\twriteSliceFile,\n\twriteSliceModel,\n} from \"@slicemachine/plugin-kit/fs\";\n\nimport { rejectIfNecessary } from \"./lib/rejectIfNecessary\";\nimport { upsertSliceLibraryIndexFile } from \"./lib/upsertSliceLibraryIndexFile\";\n\nimport { name as pkgName } from \"../package.json\";\nimport { PluginOptions } from \"./types\";\n\nimport { documentationRead } from \"./hooks/documentation-read\";\nimport { projectInit } from \"./hooks/project-init\";\nimport { sliceCreate } from \"./hooks/slice-create\";\nimport { sliceSimulatorSetupRead } from \"./hooks/sliceSimulator-setup-read\";\nimport { snippetRead } from \"./hooks/snippet-read\";\n\nimport * as Hero from \"./sliceTemplates/Hero\";\n\nexport const plugin = defineSliceMachinePlugin<PluginOptions>({\n\tmeta: {\n\t\tname: pkgName,\n\t},\n\tdefaultOptions: {\n\t\tformat: true,\n\t\tlazyLoadSlices: true,\n\t},\n\tsetup({ hook }) {\n\t\t////////////////////////////////////////////////////////////////\n\t\t// project:*\n\t\t////////////////////////////////////////////////////////////////\n\n\t\thook(\"project:init\", projectInit);\n\n\t\t////////////////////////////////////////////////////////////////\n\t\t// slice:*\n\t\t////////////////////////////////////////////////////////////////\n\n\t\thook(\"slice:create\", sliceCreate);\n\t\thook(\"slice:update\", async (data, context) => {\n\t\t\tawait writeSliceModel({\n\t\t\t\tlibraryID: data.libraryID,\n\t\t\t\tmodel: data.model,\n\t\t\t\t...context,\n\t\t\t});\n\n\t\t\tawait upsertGlobalTypeScriptTypes({\n\t\t\t\tfilename: context.options.generatedTypesFilePath,\n\t\t\t\tformat: context.options.format,\n\t\t\t\t...context,\n\t\t\t});\n\t\t});\n\t\thook(\"slice:rename\", async (data, context) => {\n\t\t\tawait renameSlice({\n\t\t\t\tlibraryID: data.libraryID,\n\t\t\t\tmodel: data.model,\n\t\t\t\tformat: context.options.format,\n\t\t\t\t...context,\n\t\t\t});\n\n\t\t\trejectIfNecessary(\n\t\t\t\tawait Promise.allSettled([\n\t\t\t\t\tupsertSliceLibraryIndexFile({\n\t\t\t\t\t\tlibraryID: data.libraryID,\n\t\t\t\t\t\t...context,\n\t\t\t\t\t}),\n\t\t\t\t\tupsertGlobalTypeScriptTypes({\n\t\t\t\t\t\tfilename: context.options.generatedTypesFilePath,\n\t\t\t\t\t\tformat: context.options.format,\n\t\t\t\t\t\t...context,\n\t\t\t\t\t}),\n\t\t\t\t]),\n\t\t\t);\n\t\t});\n\t\thook(\"slice:delete\", async (data, context) => {\n\t\t\tawait deleteSliceDirectory({\n\t\t\t\tlibraryID: data.libraryID,\n\t\t\t\tmodel: data.model,\n\t\t\t\t...context,\n\t\t\t});\n\n\t\t\trejectIfNecessary(\n\t\t\t\tawait Promise.allSettled([\n\t\t\t\t\tupsertSliceLibraryIndexFile({\n\t\t\t\t\t\tlibraryID: data.libraryID,\n\t\t\t\t\t\t...context,\n\t\t\t\t\t}),\n\t\t\t\t\tupsertGlobalTypeScriptTypes({\n\t\t\t\t\t\tfilename: context.options.generatedTypesFilePath,\n\t\t\t\t\t\tformat: context.options.format,\n\t\t\t\t\t\t...context,\n\t\t\t\t\t}),\n\t\t\t\t]),\n\t\t\t);\n\t\t});\n\t\thook(\"slice:read\", async (data, context) => {\n\t\t\treturn await readSliceModel({\n\t\t\t\tlibraryID: data.libraryID,\n\t\t\t\tsliceID: data.sliceID,\n\t\t\t\t...context,\n\t\t\t});\n\t\t});\n\t\thook(\"slice:asset:update\", async (data, context) => {\n\t\t\tawait writeSliceFile({\n\t\t\t\tlibraryID: data.libraryID,\n\t\t\t\tsliceID: data.sliceID,\n\t\t\t\tfilename: data.asset.id,\n\t\t\t\tcontents: data.asset.data,\n\t\t\t\t...context,\n\t\t\t});\n\t\t});\n\t\thook(\"slice:asset:delete\", async (data, context) => {\n\t\t\tawait deleteSliceFile({\n\t\t\t\tlibraryID: data.libraryID,\n\t\t\t\tsliceID: data.sliceID,\n\t\t\t\tfilename: data.assetID,\n\t\t\t\t...context,\n\t\t\t});\n\t\t});\n\t\thook(\"slice:asset:read\", async (data, context) => {\n\t\t\tconst file = await readSliceFile({\n\t\t\t\tlibraryID: data.libraryID,\n\t\t\t\tsliceID: data.sliceID,\n\t\t\t\tfilename: data.assetID,\n\t\t\t\t...context,\n\t\t\t});\n\n\t\t\treturn {\n\t\t\t\tdata: file,\n\t\t\t};\n\t\t});\n\n\t\t////////////////////////////////////////////////////////////////\n\t\t// slice-library:*\n\t\t////////////////////////////////////////////////////////////////\n\n\t\thook(\"slice-library:read\", async (data, context) => {\n\t\t\treturn await readSliceLibrary({\n\t\t\t\tlibraryID: data.libraryID,\n\t\t\t\t...context,\n\t\t\t});\n\t\t});\n\n\t\t////////////////////////////////////////////////////////////////\n\t\t// slice-template-library:*\n\t\t////////////////////////////////////////////////////////////////\n\n\t\thook(\"slice-template-library:read\", async (data, context) => {\n\t\t\treturn await readSliceTemplateLibrary({\n\t\t\t\t...data,\n\t\t\t\t...context,\n\t\t\t\tdirName: path.dirname(fileURLToPath(new URL(import.meta.url))),\n\t\t\t\ttemplates: [Hero],\n\t\t\t\tcomponentFileNames: {\n\t\t\t\t\tjs: \"javascript.vue\",\n\t\t\t\t\tts: \"typescript.vue\",\n\t\t\t\t},\n\t\t\t});\n\t\t});\n\n\t\t////////////////////////////////////////////////////////////////\n\t\t// custom-type:*\n\t\t////////////////////////////////////////////////////////////////\n\n\t\thook(\"custom-type:create\", async (data, context) => {\n\t\t\tawait writeCustomTypeModel({\n\t\t\t\tmodel: data.model,\n\t\t\t\tformat: context.options.format,\n\t\t\t\t...context,\n\t\t\t});\n\n\t\t\tawait upsertGlobalTypeScriptTypes({\n\t\t\t\tfilename: context.options.generatedTypesFilePath,\n\t\t\t\tformat: context.options.format,\n\t\t\t\t...context,\n\t\t\t});\n\t\t});\n\t\thook(\"custom-type:update\", async (data, context) => {\n\t\t\tawait writeCustomTypeModel({\n\t\t\t\tmodel: data.model,\n\t\t\t\tformat: context.options.format,\n\t\t\t\t...context,\n\t\t\t});\n\n\t\t\tawait upsertGlobalTypeScriptTypes({\n\t\t\t\tfilename: context.options.generatedTypesFilePath,\n\t\t\t\tformat: context.options.format,\n\t\t\t\t...context,\n\t\t\t});\n\t\t});\n\t\thook(\"custom-type:rename\", async (data, context) => {\n\t\t\tawait renameCustomType({\n\t\t\t\tmodel: data.model,\n\t\t\t\tformat: context.options.format,\n\t\t\t\t...context,\n\t\t\t});\n\n\t\t\tawait upsertGlobalTypeScriptTypes({\n\t\t\t\tfilename: context.options.generatedTypesFilePath,\n\t\t\t\tformat: context.options.format,\n\t\t\t\t...context,\n\t\t\t});\n\t\t});\n\t\thook(\"custom-type:delete\", async (data, context) => {\n\t\t\tawait deleteCustomTypeDirectory({\n\t\t\t\tcustomTypeID: data.model.id,\n\t\t\t\t...context,\n\t\t\t});\n\n\t\t\tawait upsertGlobalTypeScriptTypes({\n\t\t\t\tfilename: context.options.generatedTypesFilePath,\n\t\t\t\tformat: context.options.format,\n\t\t\t\t...context,\n\t\t\t});\n\t\t});\n\t\thook(\"custom-type:read\", async (data, context) => {\n\t\t\treturn await readCustomTypeModel({\n\t\t\t\tcustomTypeID: data.id,\n\t\t\t\t...context,\n\t\t\t});\n\t\t});\n\t\thook(\"custom-type:asset:update\", async (data, context) => {\n\t\t\tawait writeCustomTypeFile({\n\t\t\t\tcustomTypeID: data.customTypeID,\n\t\t\t\tfilename: data.asset.id,\n\t\t\t\tcontents: data.asset.data,\n\t\t\t\t...context,\n\t\t\t});\n\t\t});\n\t\thook(\"custom-type:asset:delete\", async (data, context) => {\n\t\t\tawait deleteCustomTypeFile({\n\t\t\t\tcustomTypeID: data.customTypeID,\n\t\t\t\tfilename: data.assetID,\n\t\t\t\t...context,\n\t\t\t});\n\t\t});\n\t\thook(\"custom-type:asset:read\", async (data, context) => {\n\t\t\tconst file = await readCustomTypeFile({\n\t\t\t\tcustomTypeID: data.customTypeID,\n\t\t\t\tfilename: data.assetID,\n\t\t\t\t...context,\n\t\t\t});\n\n\t\t\treturn {\n\t\t\t\tdata: file,\n\t\t\t};\n\t\t});\n\n\t\t////////////////////////////////////////////////////////////////\n\t\t// custom-type-library:*\n\t\t////////////////////////////////////////////////////////////////\n\n\t\thook(\"custom-type-library:read\", async (_data, context) => {\n\t\t\treturn await readCustomTypeLibrary({\n\t\t\t\thelpers: context.helpers,\n\t\t\t});\n\t\t});\n\n\t\t////////////////////////////////////////////////////////////////\n\t\t// snippet:*\n\t\t////////////////////////////////////////////////////////////////\n\n\t\thook(\"snippet:read\", snippetRead);\n\n\t\t////////////////////////////////////////////////////////////////\n\t\t// documentation:*\n\t\t////////////////////////////////////////////////////////////////\n\n\t\thook(\"documentation:read\", documentationRead);\n\n\t\t////////////////////////////////////////////////////////////////\n\t\t// slice-simulator:*\n\t\t////////////////////////////////////////////////////////////////\n\n\t\thook(\"slice-simulator:setup:read\", sliceSimulatorSetupRead);\n\t},\n});\n"],"names":["defineSliceMachinePlugin","pkgName","projectInit","sliceCreate","writeSliceModel","upsertGlobalTypeScriptTypes","renameSlice","rejectIfNecessary","upsertSliceLibraryIndexFile","deleteSliceDirectory","readSliceModel","writeSliceFile","deleteSliceFile","readSliceFile","readSliceLibrary","readSliceTemplateLibrary","fileURLToPath","Hero","writeCustomTypeModel","renameCustomType","deleteCustomTypeDirectory","readCustomTypeModel","writeCustomTypeFile","deleteCustomTypeFile","readCustomTypeFile","readCustomTypeLibrary","snippetRead","documentationRead","sliceSimulatorSetupRead"],"mappings":";;;;;;;;;;;;;;;AAuCO,MAAM,SAASA,UAAAA,yBAAwC;AAAA,EAC7D,MAAM;AAAA,IACL,MAAMC,SAAA;AAAA,EACN;AAAA,EACD,gBAAgB;AAAA,IACf,QAAQ;AAAA,IACR,gBAAgB;AAAA,EAChB;AAAA,EAC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AQ;AAAA,QAC1B,QAAQ,QAAQ,QAAQ;AAAA,QACxB,GAAG;AAAA,MAAA,CACH;AAAA,IAAA,CACD;AACI,SAAA,oBAAoB,OAAO,MAAM,YAAW;AAChD,aAAO,MAAMgB,GAAAA,oBAAoB;AAAA,QAChC,cAAc,KAAK;AAAA,QACnB,GAAG;AAAA,MAAA,CACH;AAAA,IAAA,CACD;AACI,SAAA,4BAA4B,OAAO,MAAM,YAAW;AACxD,YAAMC,uBAAoB;AAAA,QACzB,cAAc,KAAK;AAAA,QACnB,UAAU,KAAK,MAAM;AAAA,QACrB,UAAU,KAAK,MAAM;AAAA,QACrB,GAAG;AAAA,MAAA,CACH;AAAA,IAAA,CACD;AACI,SAAA,4BAA4B,OAAO,MAAM,YAAW;AACxD,YAAMC,wBAAqB;AAAA,QAC1B,cAAc,KAAK;AAAA,QACnB,UAAU,KAAK;AAAA,QACf,GAAG;AAAA,MAAA,CACH;AAAA,IAAA,CACD;AACI,SAAA,0BAA0B,OAAO,MAAM,YAAW;AAChD,YAAA,OAAO,MAAMC,sBAAmB;AAAA,QACrC,cAAc,KAAK;AAAA,QACnB,UAAU,KAAK;AAAA,QACf,GAAG;AAAA,MAAA,CACH;AAEM,aAAA;AAAA,QACN,MAAM;AAAA,MAAA;AAAA,KAEP;AAMI,SAAA,4BAA4B,OAAO,OAAO,YAAW;AACzD,aAAO,MAAMC,GAAAA,sBAAsB;AAAA,QAClC,SAAS,QAAQ;AAAA,MAAA,CACjB;AAAA,IAAA,CACD;AAMD,SAAK,gBAAgBC,YAAAA,WAAW;AAMhC,SAAK,sBAAsBC,kBAAAA,iBAAiB;AAM5C,SAAK,8BAA8BC,wBAAAA,uBAAuB;AAAA,EAC3D;AACA,CAAA;;"}
1
+ {"version":3,"file":"plugin.cjs","sources":["../../src/plugin.ts"],"sourcesContent":["import path from \"node:path\";\nimport { fileURLToPath } from \"node:url\";\n\nimport { defineSliceMachinePlugin } from \"@slicemachine/plugin-kit\";\nimport {\n\tdeleteCustomTypeDirectory,\n\tdeleteCustomTypeFile,\n\tdeleteSliceDirectory,\n\tdeleteSliceFile,\n\treadCustomTypeFile,\n\treadCustomTypeLibrary,\n\treadCustomTypeModel,\n\treadSliceFile,\n\treadSliceLibrary,\n\treadSliceModel,\n\treadSliceTemplateLibrary,\n\trenameCustomType,\n\trenameSlice,\n\tupsertGlobalTypeScriptTypes,\n\twriteCustomTypeFile,\n\twriteCustomTypeModel,\n\twriteSliceFile,\n\twriteSliceModel,\n} from \"@slicemachine/plugin-kit/fs\";\n\nimport { rejectIfNecessary } from \"./lib/rejectIfNecessary\";\nimport { upsertSliceLibraryIndexFile } from \"./lib/upsertSliceLibraryIndexFile\";\n\nimport { name as pkgName } from \"../package.json\";\nimport { PluginOptions } from \"./types\";\n\nimport { documentationRead } from \"./hooks/documentation-read\";\nimport { projectInit } from \"./hooks/project-init\";\nimport { sliceCreate } from \"./hooks/slice-create\";\nimport { sliceSimulatorSetupRead } from \"./hooks/sliceSimulator-setup-read\";\nimport { snippetRead } from \"./hooks/snippet-read\";\n\nimport * as Hero from \"./sliceTemplates/Hero\";\nimport * as CallToAction from \"./sliceTemplates/CallToAction\";\nimport * as AlternateGrid from \"./sliceTemplates/AlternateGrid\";\nimport * as CustomerLogos from \"./sliceTemplates/CustomerLogos\";\n\nexport const plugin = defineSliceMachinePlugin<PluginOptions>({\n\tmeta: {\n\t\tname: pkgName,\n\t},\n\tdefaultOptions: {\n\t\tformat: true,\n\t\tlazyLoadSlices: true,\n\t},\n\tsetup({ hook }) {\n\t\t////////////////////////////////////////////////////////////////\n\t\t// project:*\n\t\t////////////////////////////////////////////////////////////////\n\n\t\thook(\"project:init\", projectInit);\n\n\t\t////////////////////////////////////////////////////////////////\n\t\t// slice:*\n\t\t////////////////////////////////////////////////////////////////\n\n\t\thook(\"slice:create\", sliceCreate);\n\t\thook(\"slice:update\", async (data, context) => {\n\t\t\tawait writeSliceModel({\n\t\t\t\tlibraryID: data.libraryID,\n\t\t\t\tmodel: data.model,\n\t\t\t\t...context,\n\t\t\t});\n\n\t\t\tawait upsertGlobalTypeScriptTypes({\n\t\t\t\tfilename: context.options.generatedTypesFilePath,\n\t\t\t\tformat: context.options.format,\n\t\t\t\t...context,\n\t\t\t});\n\t\t});\n\t\thook(\"slice:rename\", async (data, context) => {\n\t\t\tawait renameSlice({\n\t\t\t\tlibraryID: data.libraryID,\n\t\t\t\tmodel: data.model,\n\t\t\t\tformat: context.options.format,\n\t\t\t\t...context,\n\t\t\t});\n\n\t\t\trejectIfNecessary(\n\t\t\t\tawait Promise.allSettled([\n\t\t\t\t\tupsertSliceLibraryIndexFile({\n\t\t\t\t\t\tlibraryID: data.libraryID,\n\t\t\t\t\t\t...context,\n\t\t\t\t\t}),\n\t\t\t\t\tupsertGlobalTypeScriptTypes({\n\t\t\t\t\t\tfilename: context.options.generatedTypesFilePath,\n\t\t\t\t\t\tformat: context.options.format,\n\t\t\t\t\t\t...context,\n\t\t\t\t\t}),\n\t\t\t\t]),\n\t\t\t);\n\t\t});\n\t\thook(\"slice:delete\", async (data, context) => {\n\t\t\tawait deleteSliceDirectory({\n\t\t\t\tlibraryID: data.libraryID,\n\t\t\t\tmodel: data.model,\n\t\t\t\t...context,\n\t\t\t});\n\n\t\t\trejectIfNecessary(\n\t\t\t\tawait Promise.allSettled([\n\t\t\t\t\tupsertSliceLibraryIndexFile({\n\t\t\t\t\t\tlibraryID: data.libraryID,\n\t\t\t\t\t\t...context,\n\t\t\t\t\t}),\n\t\t\t\t\tupsertGlobalTypeScriptTypes({\n\t\t\t\t\t\tfilename: context.options.generatedTypesFilePath,\n\t\t\t\t\t\tformat: context.options.format,\n\t\t\t\t\t\t...context,\n\t\t\t\t\t}),\n\t\t\t\t]),\n\t\t\t);\n\t\t});\n\t\thook(\"slice:read\", async (data, context) => {\n\t\t\treturn await readSliceModel({\n\t\t\t\tlibraryID: data.libraryID,\n\t\t\t\tsliceID: data.sliceID,\n\t\t\t\t...context,\n\t\t\t});\n\t\t});\n\t\thook(\"slice:asset:update\", async (data, context) => {\n\t\t\tawait writeSliceFile({\n\t\t\t\tlibraryID: data.libraryID,\n\t\t\t\tsliceID: data.sliceID,\n\t\t\t\tfilename: data.asset.id,\n\t\t\t\tcontents: data.asset.data,\n\t\t\t\t...context,\n\t\t\t});\n\t\t});\n\t\thook(\"slice:asset:delete\", async (data, context) => {\n\t\t\tawait deleteSliceFile({\n\t\t\t\tlibraryID: data.libraryID,\n\t\t\t\tsliceID: data.sliceID,\n\t\t\t\tfilename: data.assetID,\n\t\t\t\t...context,\n\t\t\t});\n\t\t});\n\t\thook(\"slice:asset:read\", async (data, context) => {\n\t\t\tconst file = await readSliceFile({\n\t\t\t\tlibraryID: data.libraryID,\n\t\t\t\tsliceID: data.sliceID,\n\t\t\t\tfilename: data.assetID,\n\t\t\t\t...context,\n\t\t\t});\n\n\t\t\treturn {\n\t\t\t\tdata: file,\n\t\t\t};\n\t\t});\n\n\t\t////////////////////////////////////////////////////////////////\n\t\t// slice-library:*\n\t\t////////////////////////////////////////////////////////////////\n\n\t\thook(\"slice-library:read\", async (data, context) => {\n\t\t\treturn await readSliceLibrary({\n\t\t\t\tlibraryID: data.libraryID,\n\t\t\t\t...context,\n\t\t\t});\n\t\t});\n\n\t\t////////////////////////////////////////////////////////////////\n\t\t// slice-template-library:*\n\t\t////////////////////////////////////////////////////////////////\n\n\t\thook(\"slice-template-library:read\", async (data, context) => {\n\t\t\treturn await readSliceTemplateLibrary({\n\t\t\t\t...data,\n\t\t\t\t...context,\n\t\t\t\tdirName: path.dirname(fileURLToPath(new URL(import.meta.url))),\n\t\t\t\ttemplates: [Hero, CustomerLogos, AlternateGrid, CallToAction],\n\t\t\t\tcomponentFileNames: {\n\t\t\t\t\tjs: \"javascript.vue\",\n\t\t\t\t\tts: \"typescript.vue\",\n\t\t\t\t},\n\t\t\t});\n\t\t});\n\n\t\t////////////////////////////////////////////////////////////////\n\t\t// custom-type:*\n\t\t////////////////////////////////////////////////////////////////\n\n\t\thook(\"custom-type:create\", async (data, context) => {\n\t\t\tawait writeCustomTypeModel({\n\t\t\t\tmodel: data.model,\n\t\t\t\tformat: context.options.format,\n\t\t\t\t...context,\n\t\t\t});\n\n\t\t\tawait upsertGlobalTypeScriptTypes({\n\t\t\t\tfilename: context.options.generatedTypesFilePath,\n\t\t\t\tformat: context.options.format,\n\t\t\t\t...context,\n\t\t\t});\n\t\t});\n\t\thook(\"custom-type:update\", async (data, context) => {\n\t\t\tawait writeCustomTypeModel({\n\t\t\t\tmodel: data.model,\n\t\t\t\tformat: context.options.format,\n\t\t\t\t...context,\n\t\t\t});\n\n\t\t\tawait upsertGlobalTypeScriptTypes({\n\t\t\t\tfilename: context.options.generatedTypesFilePath,\n\t\t\t\tformat: context.options.format,\n\t\t\t\t...context,\n\t\t\t});\n\t\t});\n\t\thook(\"custom-type:rename\", async (data, context) => {\n\t\t\tawait renameCustomType({\n\t\t\t\tmodel: data.model,\n\t\t\t\tformat: context.options.format,\n\t\t\t\t...context,\n\t\t\t});\n\n\t\t\tawait upsertGlobalTypeScriptTypes({\n\t\t\t\tfilename: context.options.generatedTypesFilePath,\n\t\t\t\tformat: context.options.format,\n\t\t\t\t...context,\n\t\t\t});\n\t\t});\n\t\thook(\"custom-type:delete\", async (data, context) => {\n\t\t\tawait deleteCustomTypeDirectory({\n\t\t\t\tcustomTypeID: data.model.id,\n\t\t\t\t...context,\n\t\t\t});\n\n\t\t\tawait upsertGlobalTypeScriptTypes({\n\t\t\t\tfilename: context.options.generatedTypesFilePath,\n\t\t\t\tformat: context.options.format,\n\t\t\t\t...context,\n\t\t\t});\n\t\t});\n\t\thook(\"custom-type:read\", async (data, context) => {\n\t\t\treturn await readCustomTypeModel({\n\t\t\t\tcustomTypeID: data.id,\n\t\t\t\t...context,\n\t\t\t});\n\t\t});\n\t\thook(\"custom-type:asset:update\", async (data, context) => {\n\t\t\tawait writeCustomTypeFile({\n\t\t\t\tcustomTypeID: data.customTypeID,\n\t\t\t\tfilename: data.asset.id,\n\t\t\t\tcontents: data.asset.data,\n\t\t\t\t...context,\n\t\t\t});\n\t\t});\n\t\thook(\"custom-type:asset:delete\", async (data, context) => {\n\t\t\tawait deleteCustomTypeFile({\n\t\t\t\tcustomTypeID: data.customTypeID,\n\t\t\t\tfilename: data.assetID,\n\t\t\t\t...context,\n\t\t\t});\n\t\t});\n\t\thook(\"custom-type:asset:read\", async (data, context) => {\n\t\t\tconst file = await readCustomTypeFile({\n\t\t\t\tcustomTypeID: data.customTypeID,\n\t\t\t\tfilename: data.assetID,\n\t\t\t\t...context,\n\t\t\t});\n\n\t\t\treturn {\n\t\t\t\tdata: file,\n\t\t\t};\n\t\t});\n\n\t\t////////////////////////////////////////////////////////////////\n\t\t// custom-type-library:*\n\t\t////////////////////////////////////////////////////////////////\n\n\t\thook(\"custom-type-library:read\", async (_data, context) => {\n\t\t\treturn await readCustomTypeLibrary({\n\t\t\t\thelpers: context.helpers,\n\t\t\t});\n\t\t});\n\n\t\t////////////////////////////////////////////////////////////////\n\t\t// snippet:*\n\t\t////////////////////////////////////////////////////////////////\n\n\t\thook(\"snippet:read\", snippetRead);\n\n\t\t////////////////////////////////////////////////////////////////\n\t\t// documentation:*\n\t\t////////////////////////////////////////////////////////////////\n\n\t\thook(\"documentation:read\", documentationRead);\n\n\t\t////////////////////////////////////////////////////////////////\n\t\t// slice-simulator:*\n\t\t////////////////////////////////////////////////////////////////\n\n\t\thook(\"slice-simulator:setup:read\", sliceSimulatorSetupRead);\n\t},\n});\n"],"names":["defineSliceMachinePlugin","pkgName","projectInit","sliceCreate","writeSliceModel","upsertGlobalTypeScriptTypes","renameSlice","rejectIfNecessary","upsertSliceLibraryIndexFile","deleteSliceDirectory","readSliceModel","writeSliceFile","deleteSliceFile","readSliceFile","readSliceLibrary","readSliceTemplateLibrary","fileURLToPath","Hero","CustomerLogos","AlternateGrid","CallToAction","writeCustomTypeModel","renameCustomType","deleteCustomTypeDirectory","readCustomTypeModel","writeCustomTypeFile","deleteCustomTypeFile","readCust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BC,YAAAA,WAAW;AAMhC,SAAK,sBAAsBC,kBAAAA,iBAAiB;AAM5C,SAAK,8BAA8BC,wBAAAA,uBAAuB;AAAA,EAC3D;AACA,CAAA;;"}
package/dist/plugin.js CHANGED
@@ -11,6 +11,9 @@ import { sliceCreate } from "./hooks/slice-create.js";
11
11
  import { sliceSimulatorSetupRead } from "./hooks/sliceSimulator-setup-read.js";
12
12
  import { snippetRead } from "./hooks/snippet-read.js";
13
13
  import * as index from "./sliceTemplates/Hero/index.js";
14
+ import * as index$3 from "./sliceTemplates/CallToAction/index.js";
15
+ import * as index$2 from "./sliceTemplates/AlternateGrid/index.js";
16
+ import * as index$1 from "./sliceTemplates/CustomerLogos/index.js";
14
17
  const plugin = defineSliceMachinePlugin({
15
18
  meta: {
16
19
  name
@@ -117,7 +120,7 @@ const plugin = defineSliceMachinePlugin({
117
120
  ...data,
118
121
  ...context,
119
122
  dirName: path__default.dirname(fileURLToPath(new URL(import.meta.url))),
120
- templates: [index],
123
+ templates: [index, index$1, index$2, index$3],
121
124
  componentFileNames: {
122
125
  js: "javascript.vue",
123
126
  ts: "typescript.vue"