prismic 1.21.0 → 1.22.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,4 +1,4 @@
1
- import{D as e,E as t,_ as n,a as r,c as i,l as a,t as o,tt as s,u as c,x as l}from"./adapters-BAbISLsD.mjs";import{c as u,h as d}from"./request-DozpYv-V.mjs";import{n as f,o as p}from"./packageJson-Bvm9nRNl.mjs";import{relative as m}from"node:path";import{fileURLToPath as h}from"node:url";const g=t`
1
+ import{a as e,b as t,c as n,g as r,l as i,nt as a,ot as o,t as s,tt as c,u as l}from"./adapters-DPb0t6EU.mjs";import{c as u,h as d}from"./request-DozpYv-V.mjs";import{n as f,o as p}from"./packageJson-Bvm9nRNl.mjs";import{relative as m}from"node:path";import{fileURLToPath as h}from"node:url";const g=c`
2
2
  return (
3
3
  <section
4
4
  data-slice-type={slice.slice_type}
@@ -9,54 +9,54 @@ import{D as e,E as t,_ as n,a as r,c as i,l as a,t as o,tt as s,u as c,x as l}fr
9
9
  <strong>You can edit this slice directly in your code editor.</strong>
10
10
  </section>
11
11
  )
12
- `;function _({name:e,id:n,typescript:r}){let i=s(e),a=s(n),o=t`
12
+ `;function _({name:e,id:t,typescript:n}){let r=o(e),i=o(t),a=c`
13
13
  import { FC } from "react";
14
14
  import { Content } from "@prismicio/client";
15
15
  import { SliceComponentProps } from "@prismicio/react";
16
16
 
17
17
  /**
18
- * Props for \`${i}\`.
18
+ * Props for \`${r}\`.
19
19
  */
20
- export type ${i}Props = SliceComponentProps<Content.${a}Slice>;
20
+ export type ${r}Props = SliceComponentProps<Content.${i}Slice>;
21
21
 
22
22
  /**
23
23
  * Component for "${e}" Slices.
24
24
  */
25
- const ${i}: FC<${i}Props> = ({ slice }) => {
25
+ const ${r}: FC<${r}Props> = ({ slice }) => {
26
26
  ${g}
27
27
  };
28
28
 
29
- export default ${i}
30
- `,c=t`
29
+ export default ${r}
30
+ `,s=c`
31
31
  /**
32
- * @typedef {import("@prismicio/client").Content.${a}Slice} ${i}Slice
33
- * @typedef {import("@prismicio/react").SliceComponentProps<${i}Slice>} ${i}Props
34
- * @type {import("react").FC<${i}Props>}
32
+ * @typedef {import("@prismicio/client").Content.${i}Slice} ${r}Slice
33
+ * @typedef {import("@prismicio/react").SliceComponentProps<${r}Slice>} ${r}Props
34
+ * @type {import("react").FC<${r}Props>}
35
35
  */
36
- const ${i} = ({ slice }) => {
36
+ const ${r} = ({ slice }) => {
37
37
  ${g}
38
38
  };
39
39
 
40
- export default ${i};
41
- `;return r?o:c}function v({model:e,routePath:n,typescript:r,appRouter:i}){return i?e.repeatable?r?t`
40
+ export default ${r};
41
+ `;return n?a:s}function v({model:e,routePath:t,typescript:n,appRouter:r}){return r?e.repeatable?n?c`
42
42
  import { SliceZone } from "@prismicio/react";
43
43
  import { createClient } from "@/prismicio";
44
44
  import { components } from "@/slices";
45
45
 
46
- export default async function Page({ params }: PageProps<"/${n}">) {
46
+ export default async function Page({ params }: PageProps<"/${t}">) {
47
47
  const { uid } = await params;
48
48
  const client = createClient();
49
49
  const page = await client.getByUID("${e.id}", uid);
50
50
 
51
51
  return <SliceZone slices={page.data.slices} components={components} />;
52
52
  }
53
- `:t`
53
+ `:c`
54
54
  import { SliceZone } from "@prismicio/react";
55
55
  import { createClient } from "@/prismicio";
56
56
  import { components } from "@/slices";
57
57
 
58
58
  /**
59
- * @type {PageProps<"/${n}">}
59
+ * @type {PageProps<"/${t}">}
60
60
  */
61
61
  export default async function Page({ params }) {
62
62
  const { uid } = await params;
@@ -65,7 +65,7 @@ import{D as e,E as t,_ as n,a as r,c as i,l as a,t as o,tt as s,u as c,x as l}fr
65
65
 
66
66
  return <SliceZone slices={page.data.slices} components={components} />;
67
67
  }
68
- `:t`
68
+ `:c`
69
69
  import { SliceZone } from "@prismicio/react";
70
70
  import { createClient } from "@/prismicio";
71
71
  import { components } from "@/slices";
@@ -76,7 +76,7 @@ import{D as e,E as t,_ as n,a as r,c as i,l as a,t as o,tt as s,u as c,x as l}fr
76
76
 
77
77
  return <SliceZone slices={page.data.slices} components={components} />;
78
78
  }
79
- `:e.repeatable?r?t`
79
+ `:e.repeatable?n?c`
80
80
  import type { InferGetStaticPropsType, GetStaticPropsContext } from "next";
81
81
  import { SliceZone } from "@prismicio/react";
82
82
  import { createClient } from "@/prismicio";
@@ -104,7 +104,7 @@ import{D as e,E as t,_ as n,a as r,c as i,l as a,t as o,tt as s,u as c,x as l}fr
104
104
  fallback: false,
105
105
  };
106
106
  }
107
- `:t`
107
+ `:c`
108
108
  import { SliceZone } from "@prismicio/react";
109
109
  import { createClient } from "@/prismicio";
110
110
  import { components } from "@/slices";
@@ -132,7 +132,7 @@ import{D as e,E as t,_ as n,a as r,c as i,l as a,t as o,tt as s,u as c,x as l}fr
132
132
  fallback: false,
133
133
  };
134
134
  }
135
- `:r?t`
135
+ `:n?c`
136
136
  import type { InferGetStaticPropsType, GetStaticPropsContext } from "next";
137
137
  import { SliceZone } from "@prismicio/react";
138
138
  import { createClient } from "@/prismicio";
@@ -148,7 +148,7 @@ import{D as e,E as t,_ as n,a as r,c as i,l as a,t as o,tt as s,u as c,x as l}fr
148
148
  export default function Page({ page }: InferGetStaticPropsType<typeof getStaticProps>) {
149
149
  return <SliceZone slices={page.data.slices} components={components} />;
150
150
  }
151
- `:t`
151
+ `:c`
152
152
  import { SliceZone } from "@prismicio/react";
153
153
  import { createClient } from "@/prismicio";
154
154
  import { components } from "@/slices";
@@ -166,14 +166,14 @@ import{D as e,E as t,_ as n,a as r,c as i,l as a,t as o,tt as s,u as c,x as l}fr
166
166
 
167
167
  return { props: { page } };
168
168
  }
169
- `}function y({typescript:e,appRouter:n,hasSrcDirectory:r}){let i=`${r?`..`:`.`}/prismic.config.json`,a,o;return n&&e?(a=t`
169
+ `}function y({typescript:e,appRouter:t,hasSrcDirectory:n}){let r=`${n?`..`:`.`}/prismic.config.json`,i,a;return t&&e?(i=c`
170
170
  import {
171
171
  createClient as baseCreateClient,
172
172
  type ClientConfig,
173
173
  } from "@prismicio/client";
174
174
  import { enableAutoPreviews } from "@prismicio/next";
175
- import prismicConfig from "${i}";
176
- `,o=t`
175
+ import prismicConfig from "${r}";
176
+ `,a=c`
177
177
  /**
178
178
  * Creates a Prismic client for the project's repository. The client is used to
179
179
  * query content from the Prismic API.
@@ -194,11 +194,11 @@ import{D as e,E as t,_ as n,a as r,c as i,l as a,t as o,tt as s,u as c,x as l}fr
194
194
 
195
195
  return client;
196
196
  };
197
- `):n?(a=t`
197
+ `):t?(i=c`
198
198
  import { createClient as baseCreateClient } from "@prismicio/client";
199
199
  import { enableAutoPreviews } from "@prismicio/next";
200
- import prismicConfig from "${i}";
201
- `,o=t`
200
+ import prismicConfig from "${r}";
201
+ `,a=c`
202
202
  /**
203
203
  * Creates a Prismic client for the project's repository. The client is used to
204
204
  * query content from the Prismic API.
@@ -219,11 +219,11 @@ import{D as e,E as t,_ as n,a as r,c as i,l as a,t as o,tt as s,u as c,x as l}fr
219
219
 
220
220
  return client;
221
221
  };
222
- `):e?(a=t`
222
+ `):e?(i=c`
223
223
  import { createClient as baseCreateClient } from "@prismicio/client";
224
224
  import { enableAutoPreviews, type CreateClientConfig } from "@prismicio/next/pages";
225
- import prismicConfig from "${i}";
226
- `,o=t`
225
+ import prismicConfig from "${r}";
226
+ `,a=c`
227
227
  /**
228
228
  * Creates a Prismic client for the project's repository. The client is used to
229
229
  * query content from the Prismic API.
@@ -240,11 +240,11 @@ import{D as e,E as t,_ as n,a as r,c as i,l as a,t as o,tt as s,u as c,x as l}fr
240
240
 
241
241
  return client;
242
242
  };
243
- `):(a=t`
243
+ `):(i=c`
244
244
  import { createClient as baseCreateClient } from "@prismicio/client";
245
245
  import { enableAutoPreviews } from "@prismicio/next/pages";
246
- import prismicConfig from "${i}";
247
- `,o=t`
246
+ import prismicConfig from "${r}";
247
+ `,a=c`
248
248
  /**
249
249
  * Creates a Prismic client for the project's repository. The client is used to
250
250
  * query content from the Prismic API.
@@ -261,8 +261,8 @@ import{D as e,E as t,_ as n,a as r,c as i,l as a,t as o,tt as s,u as c,x as l}fr
261
261
 
262
262
  return client;
263
263
  };
264
- `),t`
265
- ${a}
264
+ `),c`
265
+ ${i}
266
266
 
267
267
  /**
268
268
  * The project's Prismic repository name.
@@ -270,8 +270,8 @@ import{D as e,E as t,_ as n,a as r,c as i,l as a,t as o,tt as s,u as c,x as l}fr
270
270
  export const repositoryName =
271
271
  process.env.NEXT_PUBLIC_PRISMIC_ENVIRONMENT || prismicConfig.repositoryName;
272
272
 
273
- ${o}
274
- `}function b({typescript:e,appRouter:n}){let r=t`
273
+ ${a}
274
+ `}function b({typescript:e,appRouter:t}){let n=c`
275
275
  import { SliceSimulator, SliceSimulatorParams, getSlices } from "@prismicio/next";
276
276
  import { SliceZone } from "@prismicio/react";
277
277
 
@@ -289,7 +289,7 @@ import{D as e,E as t,_ as n,a as r,c as i,l as a,t as o,tt as s,u as c,x as l}fr
289
289
  </SliceSimulator>
290
290
  );
291
291
  }
292
- `,i=t`
292
+ `,r=c`
293
293
  import { SliceSimulator, getSlices } from "@prismicio/next";
294
294
  import { SliceZone } from "@prismicio/react";
295
295
 
@@ -305,7 +305,7 @@ import{D as e,E as t,_ as n,a as r,c as i,l as a,t as o,tt as s,u as c,x as l}fr
305
305
  </SliceSimulator>
306
306
  );
307
307
  }
308
- `,a=t`
308
+ `,i=c`
309
309
  import { SliceSimulator } from "@prismicio/next/pages";
310
310
  import { SliceZone } from "@prismicio/react";
311
311
 
@@ -318,7 +318,7 @@ import{D as e,E as t,_ as n,a as r,c as i,l as a,t as o,tt as s,u as c,x as l}fr
318
318
  />
319
319
  );
320
320
  }
321
- `;return n?e?r:i:a}function x({typescript:e,appRouter:n}){let r=t`
321
+ `;return t?e?n:r:i}function x({typescript:e,appRouter:t}){let n=c`
322
322
  import { NextRequest } from "next/server";
323
323
  import { redirectToPreviewURL } from "@prismicio/next";
324
324
 
@@ -329,7 +329,7 @@ import{D as e,E as t,_ as n,a as r,c as i,l as a,t as o,tt as s,u as c,x as l}fr
329
329
 
330
330
  return await redirectToPreviewURL({ client, request });
331
331
  }
332
- `,i=t`
332
+ `,r=c`
333
333
  import { redirectToPreviewURL } from "@prismicio/next";
334
334
 
335
335
  import { createClient } from "../../../prismicio";
@@ -339,7 +339,7 @@ import{D as e,E as t,_ as n,a as r,c as i,l as a,t as o,tt as s,u as c,x as l}fr
339
339
 
340
340
  return await redirectToPreviewURL({ client, request });
341
341
  }
342
- `,a=t`
342
+ `,i=c`
343
343
  import { NextApiRequest, NextApiResponse } from "next";
344
344
  import { setPreviewData, redirectToPreviewURL } from "@prismicio/next/pages";
345
345
 
@@ -352,7 +352,7 @@ import{D as e,E as t,_ as n,a as r,c as i,l as a,t as o,tt as s,u as c,x as l}fr
352
352
 
353
353
  return await redirectToPreviewURL({ req, res, client });
354
354
  };
355
- `,o=t`
355
+ `,a=c`
356
356
  import { setPreviewData, redirectToPreviewURL } from "@prismicio/next/pages";
357
357
 
358
358
  import { createClient } from "../../prismicio";
@@ -364,26 +364,26 @@ import{D as e,E as t,_ as n,a as r,c as i,l as a,t as o,tt as s,u as c,x as l}fr
364
364
 
365
365
  return await redirectToPreviewURL({ req, res, client });
366
366
  };
367
- `;return n?e?r:i:e?a:o}function S({typescript:e,appRouter:n}){let r=t`
367
+ `;return t?e?n:r:e?i:a}function S({typescript:e,appRouter:t}){let n=c`
368
368
  import { exitPreview } from "@prismicio/next";
369
369
 
370
370
  export function GET() {
371
371
  return exitPreview();
372
372
  }
373
- `,i=t`
373
+ `,r=c`
374
374
  import { NextApiRequest, NextApiResponse } from "next";
375
375
  import { exitPreview } from "@prismicio/next/pages";
376
376
 
377
377
  export default function handler(req: NextApiRequest, res: NextApiResponse) {
378
378
  return exitPreview({ req, res });
379
379
  }
380
- `,a=t`
380
+ `,i=c`
381
381
  import { exitPreview } from "@prismicio/next/pages";
382
382
 
383
383
  export default function handler(req, res) {
384
384
  return exitPreview({ req, res });
385
385
  }
386
- `;return n?r:e?i:a}function C({supportsCacheLife:e}){return t`
386
+ `;return t?n:e?r:i}function C({supportsCacheLife:e}){return c`
387
387
  import { NextResponse } from "next/server";
388
388
  import { revalidateTag } from "next/cache";
389
389
 
@@ -392,13 +392,13 @@ import{D as e,E as t,_ as n,a as r,c as i,l as a,t as o,tt as s,u as c,x as l}fr
392
392
 
393
393
  return NextResponse.json({ revalidated: true, now: Date.now() });
394
394
  }
395
- `}var w=class extends o{id=`next`;environmentEnvVarName=`NEXT_PUBLIC_PRISMIC_ENVIRONMENT`;localPreviewConfig={name:`Development`,websiteURL:`http://localhost:3000`,resolverPath:`/api/preview`};async setupProject(){await f({"@prismicio/client":`^${await p(`@prismicio/client`)}`,"@prismicio/react":`^${await p(`@prismicio/react`)}`,"@prismicio/next":`^${await p(`@prismicio/next`)}`});let e=await E(),t=await a(),r=await n(),o=await T();await c(new URL(`prismicio.${t}`,e),y({typescript:r,appRouter:o,hasSrcDirectory:await D()})),await c(new URL(o?`app/slice-simulator/page.${t}x`:`pages/slice-simulator.${t}x`,e),b({typescript:r,appRouter:o})),await c(new URL(o?`app/api/preview/route.${t}`:`pages/api/preview.${t}`,e),x({typescript:r,appRouter:o})),await c(new URL(o?`app/api/exit-preview/route.${t}`:`pages/api/exit-preview.${t}`,e),S({typescript:r,appRouter:o})),o&&await c(new URL(`app/api/revalidate/route.${t}`,e),C({supportsCacheLife:await i(`next`)>=16}))}async getSetupInstructions(){if(await r(`PrismicPreview`))return;let e=await D()?`src/`:``,n=`${await a()}x`;return await T()?t`
395
+ `}var w=class extends s{id=`next`;environmentEnvVarName=`NEXT_PUBLIC_PRISMIC_ENVIRONMENT`;localPreviewConfig={name:`Development`,websiteURL:`http://localhost:3000`,resolverPath:`/api/preview`};async setupProject(){await f({"@prismicio/client":`^${await p(`@prismicio/client`)}`,"@prismicio/react":`^${await p(`@prismicio/react`)}`,"@prismicio/next":`^${await p(`@prismicio/next`)}`});let e=await E(),t=await i(),a=await r(),o=await T();await l(new URL(`prismicio.${t}`,e),y({typescript:a,appRouter:o,hasSrcDirectory:await D()})),await l(new URL(o?`app/slice-simulator/page.${t}x`:`pages/slice-simulator.${t}x`,e),b({typescript:a,appRouter:o})),await l(new URL(o?`app/api/preview/route.${t}`:`pages/api/preview.${t}`,e),x({typescript:a,appRouter:o})),await l(new URL(o?`app/api/exit-preview/route.${t}`:`pages/api/exit-preview.${t}`,e),S({typescript:a,appRouter:o})),o&&await l(new URL(`app/api/revalidate/route.${t}`,e),C({supportsCacheLife:await n(`next`)>=16}))}async getSetupInstructions(){if(await e(`PrismicPreview`))return;let t=await D()?`src/`:``,n=`${await i()}x`;return await T()?c`
396
396
  Action required: add <PrismicPreview> to your root layout.
397
397
 
398
398
  Previews do not work until you do this, and the CLI cannot edit your
399
399
  layout for you. Make the change now.
400
400
 
401
- Add the lines marked + to ${e}app/layout.${n}:
401
+ Add the lines marked + to ${t}app/layout.${n}:
402
402
 
403
403
  + import { PrismicPreview } from "@prismicio/next";
404
404
  + import { repositoryName } from "@/prismicio";
@@ -413,13 +413,13 @@ import{D as e,E as t,_ as n,a as r,c as i,l as a,t as o,tt as s,u as c,x as l}fr
413
413
  }
414
414
 
415
415
  Run \`prismic docs view nextjs\` for details.
416
- `:t`
416
+ `:c`
417
417
  Action required: add <PrismicPreview> to your app.
418
418
 
419
419
  Previews do not work until you do this, and the CLI cannot edit your app
420
420
  for you. Make the change now.
421
421
 
422
- Add the lines marked + to ${e}pages/_app.${n}:
422
+ Add the lines marked + to ${t}pages/_app.${n}:
423
423
 
424
424
  + import { PrismicPreview } from "@prismicio/next/pages";
425
425
  + import { repositoryName } from "@/prismicio";
@@ -434,14 +434,14 @@ import{D as e,E as t,_ as n,a as r,c as i,l as a,t as o,tt as s,u as c,x as l}fr
434
434
  }
435
435
 
436
436
  Run \`prismic docs view nextjs\` for details.
437
- `}async createSliceIndexFile(n){let r=(await this.getSlices()).filter(e=>e.library.href===n.href),i=r.map(e=>{let t=m(h(n),h(e.directory));return`import ${s(e.model.name)} from "./${t}";`}),o=r.map(t=>`${e(t.model.id)}: ${s(t.model.name)}`),c=t`
437
+ `}async createSliceIndexFile(e){let t=(await this.getSlices()).filter(t=>t.library.href===e.href),n=t.map(t=>{let n=m(h(e),h(t.directory));return`import ${o(t.model.name)} from "./${n}";`}),r=t.map(e=>`${a(e.model.id)}: ${o(e.model.name)}`),s=c`
438
438
  // Code generated by Prismic. DO NOT EDIT.
439
439
 
440
- ${i.join(`
440
+ ${n.join(`
441
441
  `)}
442
442
 
443
443
  export const components = {
444
- ${o.join(`,
444
+ ${r.join(`,
445
445
  `)}
446
446
  };
447
- `;await d(new URL(`index.${await a()}`,n),c)}async getDefaultSliceLibrary(){return new URL(await D()?`src/slices/`:`slices/`,await l())}async createSliceComponent(e,t){let r=_({name:e.name,id:e.id,typescript:await n()});await d(new URL(`index.${await a()}x`,t),r)}async getPageFiles(e,t){let r=await E(),i=`${await a()}x`,o=await T(),s=o?`app/${t}/page`:`pages/${t||`index`}`,c=new URL(`${s}.${i}`,r);for(let e of[`js`,`jsx`,`ts`,`tsx`]){let t=new URL(`${s}.${e}`,r);await u(t)&&(c=t)}let l=await n();return[{path:c,contents:v({model:e,routePath:t,typescript:l,appRouter:o})}]}};async function T(){return u(new URL(`app/`,await E()))}async function E(){let e=await l();return await D()?new URL(`src/`,e):e}async function D(){return u(new URL(`src/`,await l()))}export{w as NextJsAdapter};
447
+ `;await d(new URL(`index.${await i()}`,e),s)}async getDefaultSliceLibrary(){return new URL(await D()?`src/slices/`:`slices/`,await t())}async createSliceComponent(e,t){let n=_({name:e.name,id:e.id,typescript:await r()});await d(new URL(`index.${await i()}x`,t),n)}async getPageFiles(e,t){let n=await E(),a=`${await i()}x`,o=await T(),s=o?`app/${t}/page`:`pages/${t||`index`}`,c=new URL(`${s}.${a}`,n);for(let e of[`js`,`jsx`,`ts`,`tsx`]){let t=new URL(`${s}.${e}`,n);await u(t)&&(c=t)}let l=await r();return[{path:c,contents:v({model:e,routePath:t,typescript:l,appRouter:o})}]}};async function T(){return u(new URL(`app/`,await E()))}async function E(){let e=await t();return await D()?new URL(`src/`,e):e}async function D(){return u(new URL(`src/`,await t()))}export{w as NextJsAdapter};
@@ -1,4 +1,4 @@
1
- import{C as e,D as t,E as n,T as r,_ as i,l as a,t as o,tt as s,u as c,x as l}from"./adapters-BAbISLsD.mjs";import{c as u,h as d}from"./request-DozpYv-V.mjs";import{d as f,n as p,o as m}from"./packageJson-Bvm9nRNl.mjs";import{t as h}from"./taggedTemplateLiteral-DygvE_Ih.mjs";import{readFile as g,rm as _}from"node:fs/promises";import{relative as v}from"node:path";import{fileURLToPath as y}from"node:url";var b,x,S,C,w;const T=n`
1
+ import{S as e,b as t,g as n,l as r,nt as i,ot as a,t as o,tt as s,u as c,w as l}from"./adapters-DPb0t6EU.mjs";import{c as u,h as d}from"./request-DozpYv-V.mjs";import{d as f,n as p,o as m}from"./packageJson-Bvm9nRNl.mjs";import{t as h}from"./taggedTemplateLiteral-DygvE_Ih.mjs";import{readFile as g,rm as _}from"node:fs/promises";import{relative as v}from"node:path";import{fileURLToPath as y}from"node:url";var b,x,S,C,w;const T=s`
2
2
  <template>
3
3
  <section
4
4
  :data-slice-type="slice.slice_type"
@@ -9,7 +9,7 @@ import{C as e,D as t,E as n,T as r,_ as i,l as a,t as o,tt as s,u as c,x as l}fr
9
9
  <strong>You can edit this slice directly in your code editor.</strong>
10
10
  </section>
11
11
  </template>
12
- `;function E({name:e,typescript:t}){return t?n(b||=h([`
12
+ `;function E({name:e,typescript:t}){return t?s(b||=h([`
13
13
  <script setup lang="ts">
14
14
  import type { Content } from "@prismicio/client";
15
15
 
@@ -33,7 +33,7 @@ import{C as e,D as t,E as n,T as r,_ as i,l as a,t as o,tt as s,u as c,x as l}fr
33
33
  <\/script>
34
34
 
35
35
  `,`
36
- `]),s(e),T):n(x||=h([`
36
+ `]),a(e),T):s(x||=h([`
37
37
  <script setup>
38
38
  // The array passed to \`getSliceComponentProps\` is purely optional.
39
39
  // Consider it as a visual hint for you when templating your slice.
@@ -49,7 +49,7 @@ import{C as e,D as t,E as n,T as r,_ as i,l as a,t as o,tt as s,u as c,x as l}fr
49
49
  <\/script>
50
50
 
51
51
  `,`
52
- `]),T)}function D({model:e,typescript:t}){let r=t?`setup lang="ts"`:`setup`;if(e.repeatable){let i=t?`route.params.uid as string`:`route.params.uid`;return n(S||=h([`
52
+ `]),T)}function D({model:e,typescript:t}){let n=t?`setup lang="ts"`:`setup`;if(e.repeatable){let r=t?`route.params.uid as string`:`route.params.uid`;return s(S||=h([`
53
53
  <script `,`>
54
54
  import { components } from "~/slices";
55
55
 
@@ -65,7 +65,7 @@ import{C as e,D as t,E as n,T as r,_ as i,l as a,t as o,tt as s,u as c,x as l}fr
65
65
  <SliceZone :slices="page?.data.slices ?? []" :components="components" />
66
66
  </main>
67
67
  </template>
68
- `]),r,i,e.id,i)}return n(C||=h([`
68
+ `]),n,r,e.id,r)}return s(C||=h([`
69
69
  <script `,`>
70
70
  import { components } from "~/slices";
71
71
 
@@ -80,7 +80,7 @@ import{C as e,D as t,E as n,T as r,_ as i,l as a,t as o,tt as s,u as c,x as l}fr
80
80
  <SliceZone :slices="page?.data.slices ?? []" :components="components" />
81
81
  </main>
82
82
  </template>
83
- `]),r,e.id,e.id)}function O({typescript:e}){let t=e?`setup lang="ts"`:`setup`;return n(w||=h([`
83
+ `]),n,e.id,e.id)}function O({typescript:e}){let t=e?`setup lang="ts"`:`setup`;return s(w||=h([`
84
84
  <script `,`>
85
85
  import { components } from "~/slices";
86
86
  <\/script>
@@ -90,7 +90,7 @@ import{C as e,D as t,E as n,T as r,_ as i,l as a,t as o,tt as s,u as c,x as l}fr
90
90
  <SliceZone :slices="slices" :components="components" />
91
91
  </SliceSimulator>
92
92
  </template>
93
- `]),t)}const k=`@nuxtjs/prismic`,A=[`<template><div><NuxtRouteAnnouncer/><NuxtWelcome/></div></template>`,`<template><div><NuxtWelcome/></div></template>`];var j=class extends o{id=`nuxt`;environmentEnvVarName=`NUXT_PUBLIC_PRISMIC_ENVIRONMENT`;localPreviewConfig={name:`Development`,websiteURL:`http://localhost:3000`,resolverPath:`/preview`};async setupProject(){await p({"@prismicio/client":`^${await m(`@prismicio/client`)}`,[k]:`^${await m(k)}`}),await P(),await c(new URL(`slice-simulator.vue`,await N()),O({typescript:await i()})),await L(),await this.modifySliceLibraryPath()}async getSetupInstructions(){let e=[];await F()||e.push(n`
93
+ `]),t)}const k=`@nuxtjs/prismic`,A=[`<template><div><NuxtRouteAnnouncer/><NuxtWelcome/></div></template>`,`<template><div><NuxtWelcome/></div></template>`];var j=class extends o{id=`nuxt`;environmentEnvVarName=`NUXT_PUBLIC_PRISMIC_ENVIRONMENT`;localPreviewConfig={name:`Development`,websiteURL:`http://localhost:3000`,resolverPath:`/preview`};async setupProject(){await p({"@prismicio/client":`^${await m(`@prismicio/client`)}`,[k]:`^${await m(k)}`}),await P(),await c(new URL(`slice-simulator.vue`,await N()),O({typescript:await n()})),await L(),await this.modifySliceLibraryPath()}async getSetupInstructions(){let e=[];await F()||e.push(s`
94
94
  Action required: add "${k}" to modules in nuxt.config.
95
95
 
96
96
  Prismic does not work until you do this. Make the change now.
@@ -100,8 +100,8 @@ import{C as e,D as t,E as n,T as r,_ as i,l as a,t as o,tt as s,u as c,x as l}fr
100
100
  + "${k}",
101
101
  ],
102
102
  });
103
- `);let t=await I();if(t!==void 0&&!t.includes(`<NuxtPage`)){let t=v(y(await l()),y(new URL(`app.vue`,await M())));e.push(n`
104
- Action required: add <NuxtPage /> to ${t}.
103
+ `);let n=await I();if(n!==void 0&&!n.includes(`<NuxtPage`)){let n=v(y(await t()),y(new URL(`app.vue`,await M())));e.push(s`
104
+ Action required: add <NuxtPage /> to ${n}.
105
105
 
106
106
  Pages, including the slice simulator, do not render until you do
107
107
  this. Make the change now.
@@ -114,14 +114,14 @@ import{C as e,D as t,E as n,T as r,_ as i,l as a,t as o,tt as s,u as c,x as l}fr
114
114
  </template>
115
115
  `)}return e.join(`
116
116
 
117
- `)||void 0}async createSliceIndexFile(e){let r=(await this.getSlices()).filter(t=>t.library.href===e.href).map(n=>{let r=v(y(e),y(n.directory));return`${t(n.model.id)}: defineAsyncComponent(() => import("./${r}/index.vue"))`}),i=n`
117
+ `)||void 0}async createSliceIndexFile(e){let t=(await this.getSlices()).filter(t=>t.library.href===e.href).map(t=>{let n=v(y(e),y(t.directory));return`${i(t.model.id)}: defineAsyncComponent(() => import("./${n}/index.vue"))`}),n=s`
118
118
  // Code generated by Prismic. DO NOT EDIT.
119
119
 
120
120
  import { defineAsyncComponent } from "vue";
121
121
  import { defineSliceZoneComponents } from "@prismicio/vue";
122
122
 
123
123
  export const components = defineSliceZoneComponents({
124
- ${r.join(`,
124
+ ${t.join(`,
125
125
  `)}
126
126
  });
127
- `;await d(new URL(`index.${await a()}`,e),i)}async getDefaultSliceLibrary(){return new URL(`slices/`,await M())}async createSliceComponent(e,t){let n=E({name:e.name,typescript:await i()});await d(new URL(`index.vue`,t),n)}async getPageFiles(e,t){return[{path:new URL(`${t||`index`}.vue`,await N()),contents:D({model:e,typescript:await i()})}]}async modifySliceLibraryPath(){let t=await l(),n=await u(new URL(`app/`,t)),i=await u(new URL(`src/`,t));if(!n&&!i)return;let a;try{a=await e()}catch{return}JSON.stringify(a.libraries)===JSON.stringify([`./slices`])&&((await this.getSlices()).length>0||await r({libraries:[n?`./app/slices`:`./src/slices`]}))}};async function M(){let e=await l(),t=new URL(`app/`,e);if(await u(t))return t;let n=new URL(`src/`,e);return await u(n)?n:e}async function N(){let e=await l();for(let t of[`app/pages/`,`src/pages/`,`pages/`]){let n=new URL(t,e);if(await u(n))return n}return new URL(`pages/`,await M())}async function P(){if(!await F())try{await f(`nuxt`,[`module`,`add`,k,`--skipInstall`],{timeout:6e4,nodeOptions:{cwd:y(await l()),stdio:[`ignore`,`pipe`,`pipe`]}})}catch{}}async function F(){let e=await l();for(let t of[`ts`,`js`,`mts`,`mjs`,`cts`,`cjs`]){let n=new URL(`nuxt.config.${t}`,e);if((await g(n,`utf8`).catch(()=>``)).includes(k))return!0}return!1}async function I(){return await g(new URL(`app.vue`,await M()),`utf8`).catch(()=>void 0)}async function L(){let e=await I();A.includes(e?.replace(/\s/g,``)??``)&&await _(new URL(`app.vue`,await M()))}export{j as NuxtAdapter};
127
+ `;await d(new URL(`index.${await r()}`,e),n)}async getDefaultSliceLibrary(){return new URL(`slices/`,await M())}async createSliceComponent(e,t){let r=E({name:e.name,typescript:await n()});await d(new URL(`index.vue`,t),r)}async getPageFiles(e,t){return[{path:new URL(`${t||`index`}.vue`,await N()),contents:D({model:e,typescript:await n()})}]}async modifySliceLibraryPath(){let n=await t(),r=await u(new URL(`app/`,n)),i=await u(new URL(`src/`,n));if(!r&&!i)return;let a;try{a=await e()}catch{return}JSON.stringify(a.libraries)===JSON.stringify([`./slices`])&&((await this.getSlices()).length>0||await l({libraries:[r?`./app/slices`:`./src/slices`]}))}};async function M(){let e=await t(),n=new URL(`app/`,e);if(await u(n))return n;let r=new URL(`src/`,e);return await u(r)?r:e}async function N(){let e=await t();for(let t of[`app/pages/`,`src/pages/`,`pages/`]){let n=new URL(t,e);if(await u(n))return n}return new URL(`pages/`,await M())}async function P(){if(!await F())try{await f(`nuxt`,[`module`,`add`,k,`--skipInstall`],{timeout:6e4,nodeOptions:{cwd:y(await t()),stdio:[`ignore`,`pipe`,`pipe`]}})}catch{}}async function F(){let e=await t();for(let t of[`ts`,`js`,`mts`,`mjs`,`cts`,`cjs`]){let n=new URL(`nuxt.config.${t}`,e);if((await g(n,`utf8`).catch(()=>``)).includes(k))return!0}return!1}async function I(){return await g(new URL(`app.vue`,await M()),`utf8`).catch(()=>void 0)}async function L(){let e=await I();A.includes(e?.replace(/\s/g,``)??``)&&await _(new URL(`app.vue`,await M()))}export{j as NuxtAdapter};
@@ -0,0 +1 @@
1
+ var e=`prismic`,t=`1.22.0`;export{t as n,e as t};
@@ -1 +1 @@
1
- import{n as e,t}from"./package-IViHhlnH.mjs";import{fileURLToPath as n}from"node:url";import{spawn as r}from"node:child_process";const i=[],a=[];let o,s;function c(e){let{writeKey:t}=e;o=e.anonymousId,s=e.userId,process.on(`exit`,()=>d({writeKey:t}))}function l(n){s=n.userId,a.push({userId:n.userId,anonymousId:o,integrations:{Intercom:{user_hash:n.intercomHash}},context:{app:{name:t,version:e}},timestamp:(/* @__PURE__ */ new Date()).toISOString()})}function u(n,r={}){let{properties:a,groupId:c}=r;i.push({event:n,properties:{nodeVersion:process.versions.node,...a},context:{app:{name:t,version:e},groupId:c},userId:s,anonymousId:o,timestamp:(/* @__PURE__ */ new Date()).toISOString()})}function d(e){let{writeKey:t}=e;if(i.length!==0||a.length!==0){try{let e=Buffer.from(JSON.stringify({trackEvents:i.map(e=>({...e,userId:e.userId||s})),identifyEvents:a,writeKey:t})).toString(`base64`),o=n(new URL(`./subprocesses/sendSegmentEvents.mjs`,import.meta.url));r(process.execPath,[o,e],{detached:!0,stdio:`ignore`}).unref()}catch{}i.length=0,a.length=0}}async function f(e,t,n){let r={"Content-Type":`application/json`,Authorization:`Basic ${btoa(n+`:`)}`};await Promise.allSettled([...e.map(e=>fetch(`https://api.segment.io/v1/track`,{method:`POST`,headers:r,body:JSON.stringify(e)}).catch(()=>{})),...t.map(e=>fetch(`https://api.segment.io/v1/identify`,{method:`POST`,headers:r,body:JSON.stringify(e)}).catch(()=>{}))])}export{l as i,f as n,u as r,c as t};
1
+ import{n as e,t}from"./package-BmR9etBQ.mjs";import{fileURLToPath as n}from"node:url";import{spawn as r}from"node:child_process";const i=[],a=[];let o,s;function c(e){let{writeKey:t}=e;o=e.anonymousId,s=e.userId,process.on(`exit`,()=>d({writeKey:t}))}function l(n){s=n.userId,a.push({userId:n.userId,anonymousId:o,integrations:{Intercom:{user_hash:n.intercomHash}},context:{app:{name:t,version:e}},timestamp:(/* @__PURE__ */ new Date()).toISOString()})}function u(n,r={}){let{properties:a,groupId:c}=r;i.push({event:n,properties:{nodeVersion:process.versions.node,...a},context:{app:{name:t,version:e},groupId:c},userId:s,anonymousId:o,timestamp:(/* @__PURE__ */ new Date()).toISOString()})}function d(e){let{writeKey:t}=e;if(i.length!==0||a.length!==0){try{let e=Buffer.from(JSON.stringify({trackEvents:i.map(e=>({...e,userId:e.userId||s})),identifyEvents:a,writeKey:t})).toString(`base64`),o=n(new URL(`./subprocesses/sendSegmentEvents.mjs`,import.meta.url));r(process.execPath,[o,e],{detached:!0,stdio:`ignore`}).unref()}catch{}i.length=0,a.length=0}}async function f(e,t,n){let r={"Content-Type":`application/json`,Authorization:`Basic ${btoa(n+`:`)}`};await Promise.allSettled([...e.map(e=>fetch(`https://api.segment.io/v1/track`,{method:`POST`,headers:r,body:JSON.stringify(e)}).catch(()=>{})),...t.map(e=>fetch(`https://api.segment.io/v1/identify`,{method:`POST`,headers:r,body:JSON.stringify(e)}).catch(()=>{}))])}export{l as i,f as n,u as r,c as t};
@@ -1 +1 @@
1
- import{a as e}from"../auth-Bi0hYnVj.mjs";try{await e()}catch{}export{};
1
+ import{a as e}from"../auth-D17Z0IuK.mjs";try{await e()}catch{}export{};
@@ -1 +1 @@
1
- import{n as e}from"../segment-CGLmVq2C.mjs";const{trackEvents:t,identifyEvents:n,writeKey:r}=JSON.parse(Buffer.from(process.argv[2],`base64`).toString());try{await e(t,n,r)}catch{}export{};
1
+ import{n as e}from"../segment-DiEeqnUu.mjs";const{trackEvents:t,identifyEvents:n,writeKey:r}=JSON.parse(Buffer.from(process.argv[2],`base64`).toString());try{await e(t,n,r)}catch{}export{};
@@ -1 +1 @@
1
- import{n as e}from"../update-notifier-CWyOCy0G.mjs";const[t,n]=process.argv.slice(2);try{await e(t,new URL(n))}catch{}export{};
1
+ import{n as e}from"../update-notifier-BBo9CSjK.mjs";const[t,n]=process.argv.slice(2);try{await e(t,new URL(n))}catch{}export{};