@prismicio/react 2.8.0 → 2.9.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.
- package/dist/PrismicImage.d.ts +90 -8
- package/dist/PrismicToolbar.cjs +0 -1
- package/dist/PrismicToolbar.cjs.map +1 -1
- package/dist/PrismicToolbar.js +0 -1
- package/dist/PrismicToolbar.js.map +1 -1
- package/dist/_node_modules/@prismicio/client/dist/errors/PrismicError.cjs +1 -4
- package/dist/_node_modules/@prismicio/client/dist/errors/PrismicError.cjs.map +1 -1
- package/dist/_node_modules/@prismicio/client/dist/errors/PrismicError.js +1 -4
- package/dist/_node_modules/@prismicio/client/dist/errors/PrismicError.js.map +1 -1
- package/dist/_node_modules/@prismicio/client/dist/helpers/asImagePixelDensitySrcSet.cjs +4 -3
- package/dist/_node_modules/@prismicio/client/dist/helpers/asImagePixelDensitySrcSet.cjs.map +1 -1
- package/dist/_node_modules/@prismicio/client/dist/helpers/asImagePixelDensitySrcSet.js +2 -1
- package/dist/_node_modules/@prismicio/client/dist/helpers/asImagePixelDensitySrcSet.js.map +1 -1
- package/dist/_node_modules/@prismicio/client/dist/helpers/asImageWidthSrcSet.cjs +7 -6
- package/dist/_node_modules/@prismicio/client/dist/helpers/asImageWidthSrcSet.cjs.map +1 -1
- package/dist/_node_modules/@prismicio/client/dist/helpers/asImageWidthSrcSet.js +3 -2
- package/dist/_node_modules/@prismicio/client/dist/helpers/asImageWidthSrcSet.js.map +1 -1
- package/dist/_node_modules/@prismicio/client/dist/helpers/asText.cjs +2 -2
- package/dist/_node_modules/@prismicio/client/dist/helpers/asText.cjs.map +1 -1
- package/dist/_node_modules/@prismicio/client/dist/helpers/asText.js +1 -1
- package/dist/_node_modules/@prismicio/client/dist/helpers/asText.js.map +1 -1
- package/dist/_node_modules/@prismicio/client/dist/helpers/documentToLinkField.cjs +1 -0
- package/dist/_node_modules/@prismicio/client/dist/helpers/documentToLinkField.cjs.map +1 -1
- package/dist/_node_modules/@prismicio/client/dist/helpers/documentToLinkField.js +1 -0
- package/dist/_node_modules/@prismicio/client/dist/helpers/documentToLinkField.js.map +1 -1
- package/dist/_node_modules/@prismicio/client/dist/richtext/asText.cjs +13 -0
- package/dist/_node_modules/@prismicio/client/dist/richtext/asText.cjs.map +1 -0
- package/dist/_node_modules/@prismicio/client/dist/richtext/asText.js +13 -0
- package/dist/_node_modules/@prismicio/client/dist/richtext/asText.js.map +1 -0
- package/dist/_node_modules/imgix-url-builder/dist/buildPixelDensitySrcSet.cjs +10 -0
- package/dist/_node_modules/imgix-url-builder/dist/buildPixelDensitySrcSet.cjs.map +1 -0
- package/dist/_node_modules/imgix-url-builder/dist/buildPixelDensitySrcSet.js +10 -0
- package/dist/_node_modules/imgix-url-builder/dist/buildPixelDensitySrcSet.js.map +1 -0
- package/dist/_node_modules/imgix-url-builder/dist/{index.cjs → buildURL.cjs} +1 -13
- package/dist/_node_modules/imgix-url-builder/dist/buildURL.cjs.map +1 -0
- package/dist/_node_modules/imgix-url-builder/dist/{index.js → buildURL.js} +2 -14
- package/dist/_node_modules/imgix-url-builder/dist/buildURL.js.map +1 -0
- package/dist/_node_modules/imgix-url-builder/dist/buildWidthSrcSet.cjs +10 -0
- package/dist/_node_modules/imgix-url-builder/dist/buildWidthSrcSet.cjs.map +1 -0
- package/dist/_node_modules/imgix-url-builder/dist/buildWidthSrcSet.js +10 -0
- package/dist/_node_modules/imgix-url-builder/dist/buildWidthSrcSet.js.map +1 -0
- package/dist/clientHooks.d.ts +18 -72
- package/dist/package.json.cjs +1 -1
- package/dist/package.json.js +1 -1
- package/dist/react-server/PrismicLink.cjs +4 -4
- package/dist/react-server/PrismicLink.cjs.map +1 -1
- package/dist/react-server/PrismicLink.d.ts +6 -1
- package/dist/react-server/PrismicLink.js +4 -4
- package/dist/react-server/PrismicLink.js.map +1 -1
- package/dist/useStatefulPrismicClientMethod.cjs +1 -5
- package/dist/useStatefulPrismicClientMethod.cjs.map +1 -1
- package/dist/useStatefulPrismicClientMethod.d.ts +1 -1
- package/dist/useStatefulPrismicClientMethod.js +1 -5
- package/dist/useStatefulPrismicClientMethod.js.map +1 -1
- package/package.json +3 -3
- package/src/react-server/PrismicLink.tsx +23 -7
- package/src/useStatefulPrismicClientMethod.ts +2 -6
- package/dist/_node_modules/imgix-url-builder/dist/index.cjs.map +0 -1
- package/dist/_node_modules/imgix-url-builder/dist/index.js.map +0 -1
package/dist/PrismicImage.d.ts
CHANGED
|
@@ -94,6 +94,14 @@ export declare const PrismicImage: React.ForwardRefExoticComponent<(Omit<Omit<Re
|
|
|
94
94
|
imgixParams?: {
|
|
95
95
|
ar?: `${number}:${number}` | null | undefined;
|
|
96
96
|
auto?: ("true" | "enhance" | "format" | "redeye" | "compress")[] | null | undefined;
|
|
97
|
+
bgRemoveFallback?: boolean | null | undefined;
|
|
98
|
+
bgRemove?: boolean | null | undefined;
|
|
99
|
+
backgroundRemove?: boolean | null | undefined;
|
|
100
|
+
bgReplaceFallback?: boolean | null | undefined;
|
|
101
|
+
bgReplaceNegPrompt?: string | null | undefined;
|
|
102
|
+
backgroundReplaceNegativePrompt?: string | null | undefined;
|
|
103
|
+
bgReplace?: string | null | undefined;
|
|
104
|
+
backgroundReplace?: string | null | undefined;
|
|
97
105
|
bg?: string | null | undefined;
|
|
98
106
|
blendAlign?: ("top" | "bottom" | "middle" | "left" | "right" | "center")[] | null | undefined;
|
|
99
107
|
blendalign?: ("top" | "bottom" | "middle" | "left" | "right" | "center")[] | null | undefined;
|
|
@@ -150,7 +158,7 @@ export declare const PrismicImage: React.ForwardRefExoticComponent<(Omit<Omit<Re
|
|
|
150
158
|
con?: number | null | undefined;
|
|
151
159
|
cornerRadius?: number | [number, number, number, number] | null | undefined;
|
|
152
160
|
crop?: ("faces" | "top" | "bottom" | "left" | "right" | "entropy" | "edges" | "focalpoint")[] | null | undefined;
|
|
153
|
-
cs?: "srgb" | "adobergb1998" | "tinysrgb" | "strip" | null | undefined;
|
|
161
|
+
cs?: "origin" | "srgb" | "adobergb1998" | "tinysrgb" | "strip" | null | undefined;
|
|
154
162
|
dl?: string | null | undefined;
|
|
155
163
|
dpi?: number | null | undefined;
|
|
156
164
|
dpr?: number | null | undefined;
|
|
@@ -163,7 +171,25 @@ export declare const PrismicImage: React.ForwardRefExoticComponent<(Omit<Omit<Re
|
|
|
163
171
|
faces?: 1 | null | undefined;
|
|
164
172
|
fillColor?: string | null | undefined;
|
|
165
173
|
fillcolor?: string | null | undefined;
|
|
166
|
-
|
|
174
|
+
fillGenFallback?: boolean | null | undefined;
|
|
175
|
+
fillGenerativeFallback?: boolean | null | undefined;
|
|
176
|
+
fillGenNegPrompt?: string | null | undefined;
|
|
177
|
+
fillGenerativeNegativePrompt?: string | null | undefined;
|
|
178
|
+
fillGenPos?: ("top" | "bottom" | "middle" | "left" | "right" | "center")[] | null | undefined;
|
|
179
|
+
fillGenerativePosition?: ("top" | "bottom" | "middle" | "left" | "right" | "center")[] | null | undefined;
|
|
180
|
+
fillGenPrompt?: string | null | undefined;
|
|
181
|
+
fillGenerativePrompt?: string | null | undefined;
|
|
182
|
+
fillGenSeed?: number | null | undefined;
|
|
183
|
+
fillGenerativeSeed?: number | null | undefined;
|
|
184
|
+
fillGradientCs?: "srgb" | "linear" | "oklab" | "hsl" | "lch" | null | undefined;
|
|
185
|
+
fillGradientLinearDirection?: ("top" | "bottom" | "left" | "right")[] | null | undefined;
|
|
186
|
+
fillGradientLinear?: [string, string] | null | undefined;
|
|
187
|
+
fillGradientRadialRadius?: [number, number] | null | undefined;
|
|
188
|
+
fillGradientRadialX?: number | null | undefined;
|
|
189
|
+
fillGradientRadialY?: number | null | undefined;
|
|
190
|
+
fillGradientRadial?: [string, string] | null | undefined;
|
|
191
|
+
fillGradientType?: "linear" | "radial" | null | undefined;
|
|
192
|
+
fill?: "blur" | "solid" | "gen" | "generative" | "gradient" | null | undefined;
|
|
167
193
|
fit?: "crop" | "fill" | "clamp" | "clip" | "scale" | "max" | "facearea" | "fillmax" | "min" | null | undefined;
|
|
168
194
|
f?: "crop" | "fill" | "clamp" | "clip" | "scale" | "max" | "facearea" | "fillmax" | "min" | null | undefined;
|
|
169
195
|
flip?: "h" | "v" | "hv" | null | undefined;
|
|
@@ -172,7 +198,11 @@ export declare const PrismicImage: React.ForwardRefExoticComponent<(Omit<Omit<Re
|
|
|
172
198
|
fpX?: number | null | undefined;
|
|
173
199
|
fpY?: number | null | undefined;
|
|
174
200
|
fpZ?: number | null | undefined;
|
|
201
|
+
fps?: number | null | undefined;
|
|
202
|
+
frame?: number | import("imgix-url-builder/dist/types.generated").Range | null | undefined;
|
|
175
203
|
gam?: number | null | undefined;
|
|
204
|
+
gifQ?: number | null | undefined;
|
|
205
|
+
gifq?: number | null | undefined;
|
|
176
206
|
gridColors?: [string, string] | null | undefined;
|
|
177
207
|
gridSize?: number | null | undefined;
|
|
178
208
|
h?: number | null | undefined;
|
|
@@ -180,9 +210,13 @@ export declare const PrismicImage: React.ForwardRefExoticComponent<(Omit<Omit<Re
|
|
|
180
210
|
high?: number | null | undefined;
|
|
181
211
|
htn?: number | null | undefined;
|
|
182
212
|
hue?: number | null | undefined;
|
|
213
|
+
interval?: number | null | undefined;
|
|
183
214
|
invert?: boolean | null | undefined;
|
|
184
215
|
inv?: boolean | null | undefined;
|
|
185
216
|
iptc?: "allow" | "block" | null | undefined;
|
|
217
|
+
jpgProgressive?: boolean | null | undefined;
|
|
218
|
+
jpegProgressive?: boolean | null | undefined;
|
|
219
|
+
loop?: number | null | undefined;
|
|
186
220
|
lossless?: boolean | null | undefined;
|
|
187
221
|
markAlign?: ("top" | "bottom" | "middle" | "left" | "right" | "center")[] | null | undefined;
|
|
188
222
|
ma?: ("top" | "bottom" | "middle" | "left" | "right" | "center")[] | null | undefined;
|
|
@@ -250,11 +284,14 @@ export declare const PrismicImage: React.ForwardRefExoticComponent<(Omit<Omit<Re
|
|
|
250
284
|
px?: number | null | undefined;
|
|
251
285
|
q?: number | null | undefined;
|
|
252
286
|
rect?: [number | "left" | "right" | "center", number | "top" | "bottom" | "middle", number, number] | null | undefined;
|
|
287
|
+
reverse?: boolean | null | undefined;
|
|
253
288
|
rot?: number | null | undefined;
|
|
254
289
|
sat?: number | null | undefined;
|
|
255
290
|
sepia?: number | null | undefined;
|
|
256
291
|
shad?: number | null | undefined;
|
|
257
292
|
sharp?: number | null | undefined;
|
|
293
|
+
skip?: number | null | undefined;
|
|
294
|
+
svgSanitize?: boolean | null | undefined;
|
|
258
295
|
transparency?: "grid" | null | undefined;
|
|
259
296
|
trimColor?: string | null | undefined;
|
|
260
297
|
trimcolor?: string | null | undefined;
|
|
@@ -285,8 +322,6 @@ export declare const PrismicImage: React.ForwardRefExoticComponent<(Omit<Omit<Re
|
|
|
285
322
|
txtfont?: import("imgix-url-builder").Font | null | undefined;
|
|
286
323
|
txtLead?: number | null | undefined;
|
|
287
324
|
txtlead?: number | null | undefined;
|
|
288
|
-
txtLig?: 0 | 1 | 2 | null | undefined;
|
|
289
|
-
txtlig?: 0 | 1 | 2 | null | undefined;
|
|
290
325
|
txtLineColor?: string | null | undefined;
|
|
291
326
|
txtlinecolor?: string | null | undefined;
|
|
292
327
|
txtLineClr?: string | null | undefined;
|
|
@@ -308,8 +343,14 @@ export declare const PrismicImage: React.ForwardRefExoticComponent<(Omit<Omit<Re
|
|
|
308
343
|
tt?: number | null | undefined;
|
|
309
344
|
txtWidth?: number | null | undefined;
|
|
310
345
|
txtwidth?: number | null | undefined;
|
|
346
|
+
txtX?: number | null | undefined;
|
|
347
|
+
txtx?: number | null | undefined;
|
|
348
|
+
txtY?: number | null | undefined;
|
|
349
|
+
txty?: number | null | undefined;
|
|
311
350
|
txt?: string | null | undefined;
|
|
312
351
|
t?: string | null | undefined;
|
|
352
|
+
upscaleFallback?: boolean | null | undefined;
|
|
353
|
+
upscale?: boolean | null | undefined;
|
|
313
354
|
usm?: number | null | undefined;
|
|
314
355
|
usmrad?: number | null | undefined;
|
|
315
356
|
vib?: number | null | undefined;
|
|
@@ -362,6 +403,14 @@ export declare const PrismicImage: React.ForwardRefExoticComponent<(Omit<Omit<Re
|
|
|
362
403
|
imgixParams?: {
|
|
363
404
|
ar?: `${number}:${number}` | null | undefined;
|
|
364
405
|
auto?: ("true" | "enhance" | "format" | "redeye" | "compress")[] | null | undefined;
|
|
406
|
+
bgRemoveFallback?: boolean | null | undefined;
|
|
407
|
+
bgRemove?: boolean | null | undefined;
|
|
408
|
+
backgroundRemove?: boolean | null | undefined;
|
|
409
|
+
bgReplaceFallback?: boolean | null | undefined;
|
|
410
|
+
bgReplaceNegPrompt?: string | null | undefined;
|
|
411
|
+
backgroundReplaceNegativePrompt?: string | null | undefined;
|
|
412
|
+
bgReplace?: string | null | undefined;
|
|
413
|
+
backgroundReplace?: string | null | undefined;
|
|
365
414
|
bg?: string | null | undefined;
|
|
366
415
|
blendAlign?: ("top" | "bottom" | "middle" | "left" | "right" | "center")[] | null | undefined;
|
|
367
416
|
blendalign?: ("top" | "bottom" | "middle" | "left" | "right" | "center")[] | null | undefined;
|
|
@@ -418,7 +467,7 @@ export declare const PrismicImage: React.ForwardRefExoticComponent<(Omit<Omit<Re
|
|
|
418
467
|
con?: number | null | undefined;
|
|
419
468
|
cornerRadius?: number | [number, number, number, number] | null | undefined;
|
|
420
469
|
crop?: ("faces" | "top" | "bottom" | "left" | "right" | "entropy" | "edges" | "focalpoint")[] | null | undefined;
|
|
421
|
-
cs?: "srgb" | "adobergb1998" | "tinysrgb" | "strip" | null | undefined;
|
|
470
|
+
cs?: "origin" | "srgb" | "adobergb1998" | "tinysrgb" | "strip" | null | undefined;
|
|
422
471
|
dl?: string | null | undefined;
|
|
423
472
|
dpi?: number | null | undefined;
|
|
424
473
|
dpr?: number | null | undefined;
|
|
@@ -431,7 +480,25 @@ export declare const PrismicImage: React.ForwardRefExoticComponent<(Omit<Omit<Re
|
|
|
431
480
|
faces?: 1 | null | undefined;
|
|
432
481
|
fillColor?: string | null | undefined;
|
|
433
482
|
fillcolor?: string | null | undefined;
|
|
434
|
-
|
|
483
|
+
fillGenFallback?: boolean | null | undefined;
|
|
484
|
+
fillGenerativeFallback?: boolean | null | undefined;
|
|
485
|
+
fillGenNegPrompt?: string | null | undefined;
|
|
486
|
+
fillGenerativeNegativePrompt?: string | null | undefined;
|
|
487
|
+
fillGenPos?: ("top" | "bottom" | "middle" | "left" | "right" | "center")[] | null | undefined;
|
|
488
|
+
fillGenerativePosition?: ("top" | "bottom" | "middle" | "left" | "right" | "center")[] | null | undefined;
|
|
489
|
+
fillGenPrompt?: string | null | undefined;
|
|
490
|
+
fillGenerativePrompt?: string | null | undefined;
|
|
491
|
+
fillGenSeed?: number | null | undefined;
|
|
492
|
+
fillGenerativeSeed?: number | null | undefined;
|
|
493
|
+
fillGradientCs?: "srgb" | "linear" | "oklab" | "hsl" | "lch" | null | undefined;
|
|
494
|
+
fillGradientLinearDirection?: ("top" | "bottom" | "left" | "right")[] | null | undefined;
|
|
495
|
+
fillGradientLinear?: [string, string] | null | undefined;
|
|
496
|
+
fillGradientRadialRadius?: [number, number] | null | undefined;
|
|
497
|
+
fillGradientRadialX?: number | null | undefined;
|
|
498
|
+
fillGradientRadialY?: number | null | undefined;
|
|
499
|
+
fillGradientRadial?: [string, string] | null | undefined;
|
|
500
|
+
fillGradientType?: "linear" | "radial" | null | undefined;
|
|
501
|
+
fill?: "blur" | "solid" | "gen" | "generative" | "gradient" | null | undefined;
|
|
435
502
|
fit?: "crop" | "fill" | "clamp" | "clip" | "scale" | "max" | "facearea" | "fillmax" | "min" | null | undefined;
|
|
436
503
|
f?: "crop" | "fill" | "clamp" | "clip" | "scale" | "max" | "facearea" | "fillmax" | "min" | null | undefined;
|
|
437
504
|
flip?: "h" | "v" | "hv" | null | undefined;
|
|
@@ -440,7 +507,11 @@ export declare const PrismicImage: React.ForwardRefExoticComponent<(Omit<Omit<Re
|
|
|
440
507
|
fpX?: number | null | undefined;
|
|
441
508
|
fpY?: number | null | undefined;
|
|
442
509
|
fpZ?: number | null | undefined;
|
|
510
|
+
fps?: number | null | undefined;
|
|
511
|
+
frame?: number | import("imgix-url-builder/dist/types.generated").Range | null | undefined;
|
|
443
512
|
gam?: number | null | undefined;
|
|
513
|
+
gifQ?: number | null | undefined;
|
|
514
|
+
gifq?: number | null | undefined;
|
|
444
515
|
gridColors?: [string, string] | null | undefined;
|
|
445
516
|
gridSize?: number | null | undefined;
|
|
446
517
|
h?: number | null | undefined;
|
|
@@ -448,9 +519,13 @@ export declare const PrismicImage: React.ForwardRefExoticComponent<(Omit<Omit<Re
|
|
|
448
519
|
high?: number | null | undefined;
|
|
449
520
|
htn?: number | null | undefined;
|
|
450
521
|
hue?: number | null | undefined;
|
|
522
|
+
interval?: number | null | undefined;
|
|
451
523
|
invert?: boolean | null | undefined;
|
|
452
524
|
inv?: boolean | null | undefined;
|
|
453
525
|
iptc?: "allow" | "block" | null | undefined;
|
|
526
|
+
jpgProgressive?: boolean | null | undefined;
|
|
527
|
+
jpegProgressive?: boolean | null | undefined;
|
|
528
|
+
loop?: number | null | undefined;
|
|
454
529
|
lossless?: boolean | null | undefined;
|
|
455
530
|
markAlign?: ("top" | "bottom" | "middle" | "left" | "right" | "center")[] | null | undefined;
|
|
456
531
|
ma?: ("top" | "bottom" | "middle" | "left" | "right" | "center")[] | null | undefined;
|
|
@@ -518,11 +593,14 @@ export declare const PrismicImage: React.ForwardRefExoticComponent<(Omit<Omit<Re
|
|
|
518
593
|
px?: number | null | undefined;
|
|
519
594
|
q?: number | null | undefined;
|
|
520
595
|
rect?: [number | "left" | "right" | "center", number | "top" | "bottom" | "middle", number, number] | null | undefined;
|
|
596
|
+
reverse?: boolean | null | undefined;
|
|
521
597
|
rot?: number | null | undefined;
|
|
522
598
|
sat?: number | null | undefined;
|
|
523
599
|
sepia?: number | null | undefined;
|
|
524
600
|
shad?: number | null | undefined;
|
|
525
601
|
sharp?: number | null | undefined;
|
|
602
|
+
skip?: number | null | undefined;
|
|
603
|
+
svgSanitize?: boolean | null | undefined;
|
|
526
604
|
transparency?: "grid" | null | undefined;
|
|
527
605
|
trimColor?: string | null | undefined;
|
|
528
606
|
trimcolor?: string | null | undefined;
|
|
@@ -553,8 +631,6 @@ export declare const PrismicImage: React.ForwardRefExoticComponent<(Omit<Omit<Re
|
|
|
553
631
|
txtfont?: import("imgix-url-builder").Font | null | undefined;
|
|
554
632
|
txtLead?: number | null | undefined;
|
|
555
633
|
txtlead?: number | null | undefined;
|
|
556
|
-
txtLig?: 0 | 1 | 2 | null | undefined;
|
|
557
|
-
txtlig?: 0 | 1 | 2 | null | undefined;
|
|
558
634
|
txtLineColor?: string | null | undefined;
|
|
559
635
|
txtlinecolor?: string | null | undefined;
|
|
560
636
|
txtLineClr?: string | null | undefined;
|
|
@@ -576,8 +652,14 @@ export declare const PrismicImage: React.ForwardRefExoticComponent<(Omit<Omit<Re
|
|
|
576
652
|
tt?: number | null | undefined;
|
|
577
653
|
txtWidth?: number | null | undefined;
|
|
578
654
|
txtwidth?: number | null | undefined;
|
|
655
|
+
txtX?: number | null | undefined;
|
|
656
|
+
txtx?: number | null | undefined;
|
|
657
|
+
txtY?: number | null | undefined;
|
|
658
|
+
txty?: number | null | undefined;
|
|
579
659
|
txt?: string | null | undefined;
|
|
580
660
|
t?: string | null | undefined;
|
|
661
|
+
upscaleFallback?: boolean | null | undefined;
|
|
662
|
+
upscale?: boolean | null | undefined;
|
|
581
663
|
usm?: number | null | undefined;
|
|
582
664
|
usmrad?: number | null | undefined;
|
|
583
665
|
vib?: number | null | undefined;
|
package/dist/PrismicToolbar.cjs
CHANGED
|
@@ -4,7 +4,6 @@
|
|
|
4
4
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
5
5
|
const React = require("react");
|
|
6
6
|
const getToolbarSrc = require('./_node_modules/@prismicio/client/dist/getToolbarSrc.cjs');
|
|
7
|
-
require("@prismicio/richtext");
|
|
8
7
|
function _interopNamespaceDefault(e) {
|
|
9
8
|
const n = Object.create(null, { [Symbol.toStringTag]: { value: "Module" } });
|
|
10
9
|
if (e) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PrismicToolbar.cjs","sources":["../../src/PrismicToolbar.tsx"],"sourcesContent":["\"use client\";\n\nimport * as React from \"react\";\nimport { getToolbarSrc } from \"@prismicio/client\";\n\n/**\n * Props for `<PrismicToolbar>`.\n */\nexport type PrismicToolbarProps = {\n\t/**\n\t * The name of the Prismic repository. For example, `\"my-repo\"` if the\n\t * repository URL is `my-repo.prismic.io`.\n\t */\n\trepositoryName: string;\n\n\t/**\n\t * The type of toolbar needed for the repository. Defaults to `\"new\"`.\n\t *\n\t * @deprecated All repositories use the \"new\"-type toolbar. This option can be\n\t * removed.\n\t * @see To check which version you need, view the Prismic Toolbar documentation {@link https://prismic.io/docs/technologies/previews-and-the-prismic-toolbar-reactjs}\n\t */\n\ttype?: \"new\" | \"legacy\";\n};\n\n/**\n * React component that injects the Prismic Toolbar into the app. This component\n * can be placed anywhere in the React tree.\n */\nexport const PrismicToolbar = ({\n\trepositoryName,\n}: PrismicToolbarProps): null => {\n\tconst src = getToolbarSrc(repositoryName);\n\n\tReact.useEffect(() => {\n\t\tconst existingScript = document.querySelector(`script[src=\"${src}\"]`);\n\n\t\tif (!existingScript) {\n\t\t\tconst script = document.createElement(\"script\");\n\t\t\tscript.src = src;\n\t\t\tscript.defer = true;\n\n\t\t\t// Used to distinguish the toolbar element from other elements.\n\t\t\tscript.dataset.prismicToolbar = \"\";\n\t\t\tscript.dataset.repositoryName = repositoryName;\n\n\t\t\t// Disable Happy DOM `<script>` evaluation during\n\t\t\t// tests.\n\t\t\t//\n\t\t\t// This is a patch ONLY INCLUDED DURING TESTS. It will\n\t\t\t// be pruned during code minification in non-test\n\t\t\t// environments.\n\t\t\t//\n\t\t\t// @see https://github.com/capricorn86/happy-dom/blob/02ae081e36f990c06171eda44f9d885fd9413d73/packages/happy-dom/src/nodes/html-script-element/HTMLScriptElement.ts#L191-L209\n\t\t\tif (typeof process !== \"undefined\" && process.env.NODE_ENV === \"test\") {\n\t\t\t\t// @ts-expect-error - `_evaluateScript` is a Happy DOM-specific property.\n\t\t\t\tscript._evaluateScript = false;\n\t\t\t}\n\n\t\t\tdocument.body.appendChild(script);\n\t\t}\n\t}, [repositoryName, src]);\n\n\treturn null;\n};\n"],"names":["React"],"mappings":"
|
|
1
|
+
{"version":3,"file":"PrismicToolbar.cjs","sources":["../../src/PrismicToolbar.tsx"],"sourcesContent":["\"use client\";\n\nimport * as React from \"react\";\nimport { getToolbarSrc } from \"@prismicio/client\";\n\n/**\n * Props for `<PrismicToolbar>`.\n */\nexport type PrismicToolbarProps = {\n\t/**\n\t * The name of the Prismic repository. For example, `\"my-repo\"` if the\n\t * repository URL is `my-repo.prismic.io`.\n\t */\n\trepositoryName: string;\n\n\t/**\n\t * The type of toolbar needed for the repository. Defaults to `\"new\"`.\n\t *\n\t * @deprecated All repositories use the \"new\"-type toolbar. This option can be\n\t * removed.\n\t * @see To check which version you need, view the Prismic Toolbar documentation {@link https://prismic.io/docs/technologies/previews-and-the-prismic-toolbar-reactjs}\n\t */\n\ttype?: \"new\" | \"legacy\";\n};\n\n/**\n * React component that injects the Prismic Toolbar into the app. This component\n * can be placed anywhere in the React tree.\n */\nexport const PrismicToolbar = ({\n\trepositoryName,\n}: PrismicToolbarProps): null => {\n\tconst src = getToolbarSrc(repositoryName);\n\n\tReact.useEffect(() => {\n\t\tconst existingScript = document.querySelector(`script[src=\"${src}\"]`);\n\n\t\tif (!existingScript) {\n\t\t\tconst script = document.createElement(\"script\");\n\t\t\tscript.src = src;\n\t\t\tscript.defer = true;\n\n\t\t\t// Used to distinguish the toolbar element from other elements.\n\t\t\tscript.dataset.prismicToolbar = \"\";\n\t\t\tscript.dataset.repositoryName = repositoryName;\n\n\t\t\t// Disable Happy DOM `<script>` evaluation during\n\t\t\t// tests.\n\t\t\t//\n\t\t\t// This is a patch ONLY INCLUDED DURING TESTS. It will\n\t\t\t// be pruned during code minification in non-test\n\t\t\t// environments.\n\t\t\t//\n\t\t\t// @see https://github.com/capricorn86/happy-dom/blob/02ae081e36f990c06171eda44f9d885fd9413d73/packages/happy-dom/src/nodes/html-script-element/HTMLScriptElement.ts#L191-L209\n\t\t\tif (typeof process !== \"undefined\" && process.env.NODE_ENV === \"test\") {\n\t\t\t\t// @ts-expect-error - `_evaluateScript` is a Happy DOM-specific property.\n\t\t\t\tscript._evaluateScript = false;\n\t\t\t}\n\n\t\t\tdocument.body.appendChild(script);\n\t\t}\n\t}, [repositoryName, src]);\n\n\treturn null;\n};\n"],"names":["React"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;AA6BO;AAGA;AAENA;AACC;AAEA;AACO;AACN;AACA;AAGA;AACA;AAUA;AAEC;AAAyB;AAGjB;AAAuB;AAChC;AAGK;AACR;;"}
|
package/dist/PrismicToolbar.js
CHANGED
|
@@ -2,7 +2,6 @@
|
|
|
2
2
|
'use client';
|
|
3
3
|
import * as React from "react";
|
|
4
4
|
import { getToolbarSrc } from './_node_modules/@prismicio/client/dist/getToolbarSrc.js';
|
|
5
|
-
import "@prismicio/richtext";
|
|
6
5
|
const PrismicToolbar = ({ repositoryName }) => {
|
|
7
6
|
const src = getToolbarSrc(repositoryName);
|
|
8
7
|
React.useEffect(() => {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PrismicToolbar.js","sources":["../../src/PrismicToolbar.tsx"],"sourcesContent":["\"use client\";\n\nimport * as React from \"react\";\nimport { getToolbarSrc } from \"@prismicio/client\";\n\n/**\n * Props for `<PrismicToolbar>`.\n */\nexport type PrismicToolbarProps = {\n\t/**\n\t * The name of the Prismic repository. For example, `\"my-repo\"` if the\n\t * repository URL is `my-repo.prismic.io`.\n\t */\n\trepositoryName: string;\n\n\t/**\n\t * The type of toolbar needed for the repository. Defaults to `\"new\"`.\n\t *\n\t * @deprecated All repositories use the \"new\"-type toolbar. This option can be\n\t * removed.\n\t * @see To check which version you need, view the Prismic Toolbar documentation {@link https://prismic.io/docs/technologies/previews-and-the-prismic-toolbar-reactjs}\n\t */\n\ttype?: \"new\" | \"legacy\";\n};\n\n/**\n * React component that injects the Prismic Toolbar into the app. This component\n * can be placed anywhere in the React tree.\n */\nexport const PrismicToolbar = ({\n\trepositoryName,\n}: PrismicToolbarProps): null => {\n\tconst src = getToolbarSrc(repositoryName);\n\n\tReact.useEffect(() => {\n\t\tconst existingScript = document.querySelector(`script[src=\"${src}\"]`);\n\n\t\tif (!existingScript) {\n\t\t\tconst script = document.createElement(\"script\");\n\t\t\tscript.src = src;\n\t\t\tscript.defer = true;\n\n\t\t\t// Used to distinguish the toolbar element from other elements.\n\t\t\tscript.dataset.prismicToolbar = \"\";\n\t\t\tscript.dataset.repositoryName = repositoryName;\n\n\t\t\t// Disable Happy DOM `<script>` evaluation during\n\t\t\t// tests.\n\t\t\t//\n\t\t\t// This is a patch ONLY INCLUDED DURING TESTS. It will\n\t\t\t// be pruned during code minification in non-test\n\t\t\t// environments.\n\t\t\t//\n\t\t\t// @see https://github.com/capricorn86/happy-dom/blob/02ae081e36f990c06171eda44f9d885fd9413d73/packages/happy-dom/src/nodes/html-script-element/HTMLScriptElement.ts#L191-L209\n\t\t\tif (typeof process !== \"undefined\" && process.env.NODE_ENV === \"test\") {\n\t\t\t\t// @ts-expect-error - `_evaluateScript` is a Happy DOM-specific property.\n\t\t\t\tscript._evaluateScript = false;\n\t\t\t}\n\n\t\t\tdocument.body.appendChild(script);\n\t\t}\n\t}, [repositoryName, src]);\n\n\treturn null;\n};\n"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"PrismicToolbar.js","sources":["../../src/PrismicToolbar.tsx"],"sourcesContent":["\"use client\";\n\nimport * as React from \"react\";\nimport { getToolbarSrc } from \"@prismicio/client\";\n\n/**\n * Props for `<PrismicToolbar>`.\n */\nexport type PrismicToolbarProps = {\n\t/**\n\t * The name of the Prismic repository. For example, `\"my-repo\"` if the\n\t * repository URL is `my-repo.prismic.io`.\n\t */\n\trepositoryName: string;\n\n\t/**\n\t * The type of toolbar needed for the repository. Defaults to `\"new\"`.\n\t *\n\t * @deprecated All repositories use the \"new\"-type toolbar. This option can be\n\t * removed.\n\t * @see To check which version you need, view the Prismic Toolbar documentation {@link https://prismic.io/docs/technologies/previews-and-the-prismic-toolbar-reactjs}\n\t */\n\ttype?: \"new\" | \"legacy\";\n};\n\n/**\n * React component that injects the Prismic Toolbar into the app. This component\n * can be placed anywhere in the React tree.\n */\nexport const PrismicToolbar = ({\n\trepositoryName,\n}: PrismicToolbarProps): null => {\n\tconst src = getToolbarSrc(repositoryName);\n\n\tReact.useEffect(() => {\n\t\tconst existingScript = document.querySelector(`script[src=\"${src}\"]`);\n\n\t\tif (!existingScript) {\n\t\t\tconst script = document.createElement(\"script\");\n\t\t\tscript.src = src;\n\t\t\tscript.defer = true;\n\n\t\t\t// Used to distinguish the toolbar element from other elements.\n\t\t\tscript.dataset.prismicToolbar = \"\";\n\t\t\tscript.dataset.repositoryName = repositoryName;\n\n\t\t\t// Disable Happy DOM `<script>` evaluation during\n\t\t\t// tests.\n\t\t\t//\n\t\t\t// This is a patch ONLY INCLUDED DURING TESTS. It will\n\t\t\t// be pruned during code minification in non-test\n\t\t\t// environments.\n\t\t\t//\n\t\t\t// @see https://github.com/capricorn86/happy-dom/blob/02ae081e36f990c06171eda44f9d885fd9413d73/packages/happy-dom/src/nodes/html-script-element/HTMLScriptElement.ts#L191-L209\n\t\t\tif (typeof process !== \"undefined\" && process.env.NODE_ENV === \"test\") {\n\t\t\t\t// @ts-expect-error - `_evaluateScript` is a Happy DOM-specific property.\n\t\t\t\tscript._evaluateScript = false;\n\t\t\t}\n\n\t\t\tdocument.body.appendChild(script);\n\t\t}\n\t}, [repositoryName, src]);\n\n\treturn null;\n};\n"],"names":[],"mappings":";;;;AA6BO;AAGA;AAEN;AACC;AAEA;AACO;AACN;AACA;AAGA;AACA;AAUA;AAEC;AAAyB;AAGjB;AAAuB;AAChC;AAGK;AACR;;;;"}
|
|
@@ -2,10 +2,7 @@
|
|
|
2
2
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
3
|
var __defProp = Object.defineProperty;
|
|
4
4
|
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
5
|
-
var __publicField = (obj, key, value) =>
|
|
6
|
-
__defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
7
|
-
return value;
|
|
8
|
-
};
|
|
5
|
+
var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
9
6
|
class PrismicError extends Error {
|
|
10
7
|
constructor(message = "An invalid API response was returned", url, response) {
|
|
11
8
|
super(message);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PrismicError.cjs","sources":["../../../../../../node_modules/@prismicio/client/dist/errors/PrismicError.js"],"sourcesContent":["var __defProp = Object.defineProperty;\nvar __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;\nvar __publicField = (obj, key, value) =>
|
|
1
|
+
{"version":3,"file":"PrismicError.cjs","sources":["../../../../../../node_modules/@prismicio/client/dist/errors/PrismicError.js"],"sourcesContent":["var __defProp = Object.defineProperty;\nvar __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;\nvar __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== \"symbol\" ? key + \"\" : key, value);\nclass PrismicError extends Error {\n constructor(message = \"An invalid API response was returned\", url, response) {\n super(message);\n __publicField(this, \"url\");\n __publicField(this, \"response\");\n this.url = url;\n this.response = response;\n }\n}\nexport {\n PrismicError\n};\n//# sourceMappingURL=PrismicError.js.map\n"],"names":[],"mappings":";;AAAA,IAAI,YAAY,OAAO;AACvB,IAAI,kBAAkB,CAAC,KAAK,KAAK,UAAU,OAAO,MAAM,UAAU,KAAK,KAAK,EAAE,YAAY,MAAM,cAAc,MAAM,UAAU,MAAM,MAAO,CAAA,IAAI,IAAI,GAAG,IAAI;AAC1J,IAAI,gBAAgB,CAAC,KAAK,KAAK,UAAU,gBAAgB,KAAK,OAAO,QAAQ,WAAW,MAAM,KAAK,KAAK,KAAK;AAC7G,MAAM,qBAAqB,MAAM;AAAA,EAC/B,YAAY,UAAU,wCAAwC,KAAK,UAAU;AAC3E,UAAM,OAAO;AACb,kBAAc,MAAM,KAAK;AACzB,kBAAc,MAAM,UAAU;AAC9B,SAAK,MAAM;AACX,SAAK,WAAW;AAAA,EACjB;AACH;;","x_google_ignoreList":[0]}
|
|
@@ -1,9 +1,6 @@
|
|
|
1
1
|
var __defProp = Object.defineProperty;
|
|
2
2
|
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
3
|
-
var __publicField = (obj, key, value) =>
|
|
4
|
-
__defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
5
|
-
return value;
|
|
6
|
-
};
|
|
3
|
+
var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
7
4
|
class PrismicError extends Error {
|
|
8
5
|
constructor(message = "An invalid API response was returned", url, response) {
|
|
9
6
|
super(message);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PrismicError.js","sources":["../../../../../../node_modules/@prismicio/client/dist/errors/PrismicError.js"],"sourcesContent":["var __defProp = Object.defineProperty;\nvar __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;\nvar __publicField = (obj, key, value) =>
|
|
1
|
+
{"version":3,"file":"PrismicError.js","sources":["../../../../../../node_modules/@prismicio/client/dist/errors/PrismicError.js"],"sourcesContent":["var __defProp = Object.defineProperty;\nvar __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;\nvar __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== \"symbol\" ? key + \"\" : key, value);\nclass PrismicError extends Error {\n constructor(message = \"An invalid API response was returned\", url, response) {\n super(message);\n __publicField(this, \"url\");\n __publicField(this, \"response\");\n this.url = url;\n this.response = response;\n }\n}\nexport {\n PrismicError\n};\n//# sourceMappingURL=PrismicError.js.map\n"],"names":[],"mappings":"AAAA,IAAI,YAAY,OAAO;AACvB,IAAI,kBAAkB,CAAC,KAAK,KAAK,UAAU,OAAO,MAAM,UAAU,KAAK,KAAK,EAAE,YAAY,MAAM,cAAc,MAAM,UAAU,MAAM,MAAO,CAAA,IAAI,IAAI,GAAG,IAAI;AAC1J,IAAI,gBAAgB,CAAC,KAAK,KAAK,UAAU,gBAAgB,KAAK,OAAO,QAAQ,WAAW,MAAM,KAAK,KAAK,KAAK;AAC7G,MAAM,qBAAqB,MAAM;AAAA,EAC/B,YAAY,UAAU,wCAAwC,KAAK,UAAU;AAC3E,UAAM,OAAO;AACb,kBAAc,MAAM,KAAK;AACzB,kBAAc,MAAM,UAAU;AAC9B,SAAK,MAAM;AACX,SAAK,WAAW;AAAA,EACjB;AACH;","x_google_ignoreList":[0]}
|
|
@@ -1,14 +1,15 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
-
const
|
|
3
|
+
const buildURL = require("../../../../imgix-url-builder/dist/buildURL.cjs");
|
|
4
|
+
const buildPixelDensitySrcSet = require("../../../../imgix-url-builder/dist/buildPixelDensitySrcSet.cjs");
|
|
4
5
|
const isFilled = require("./isFilled.cjs");
|
|
5
6
|
const DEFAULT_PIXEL_DENSITIES = [1, 2, 3];
|
|
6
7
|
const asImagePixelDensitySrcSet = (field, config = {}) => {
|
|
7
8
|
if (field && isFilled.imageThumbnail(field)) {
|
|
8
9
|
const { pixelDensities = DEFAULT_PIXEL_DENSITIES, ...imgixParams } = config;
|
|
9
10
|
return {
|
|
10
|
-
src:
|
|
11
|
-
srcset:
|
|
11
|
+
src: buildURL.buildURL(field.url, imgixParams),
|
|
12
|
+
srcset: buildPixelDensitySrcSet.buildPixelDensitySrcSet(field.url, {
|
|
12
13
|
...imgixParams,
|
|
13
14
|
pixelDensities
|
|
14
15
|
})
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"asImagePixelDensitySrcSet.cjs","sources":["../../../../../../node_modules/@prismicio/client/dist/helpers/asImagePixelDensitySrcSet.js"],"sourcesContent":["import { buildURL, buildPixelDensitySrcSet } from \"imgix-url-builder\";\nimport { imageThumbnail } from \"./isFilled.js\";\nconst DEFAULT_PIXEL_DENSITIES = [1, 2, 3];\nconst asImagePixelDensitySrcSet = (field, config = {}) => {\n if (field && imageThumbnail(field)) {\n const { pixelDensities = DEFAULT_PIXEL_DENSITIES, ...imgixParams } = config;\n return {\n src: buildURL(field.url, imgixParams),\n srcset: buildPixelDensitySrcSet(field.url, {\n ...imgixParams,\n pixelDensities\n })\n };\n } else {\n return null;\n }\n};\nexport {\n asImagePixelDensitySrcSet\n};\n//# sourceMappingURL=asImagePixelDensitySrcSet.js.map\n"],"names":["imageThumbnail","buildURL","buildPixelDensitySrcSet"],"mappings":"
|
|
1
|
+
{"version":3,"file":"asImagePixelDensitySrcSet.cjs","sources":["../../../../../../node_modules/@prismicio/client/dist/helpers/asImagePixelDensitySrcSet.js"],"sourcesContent":["import { buildURL, buildPixelDensitySrcSet } from \"imgix-url-builder\";\nimport { imageThumbnail } from \"./isFilled.js\";\nconst DEFAULT_PIXEL_DENSITIES = [1, 2, 3];\nconst asImagePixelDensitySrcSet = (field, config = {}) => {\n if (field && imageThumbnail(field)) {\n const { pixelDensities = DEFAULT_PIXEL_DENSITIES, ...imgixParams } = config;\n return {\n src: buildURL(field.url, imgixParams),\n srcset: buildPixelDensitySrcSet(field.url, {\n ...imgixParams,\n pixelDensities\n })\n };\n } else {\n return null;\n }\n};\nexport {\n asImagePixelDensitySrcSet\n};\n//# sourceMappingURL=asImagePixelDensitySrcSet.js.map\n"],"names":["imageThumbnail","buildURL","buildPixelDensitySrcSet"],"mappings":";;;;;AAEA,MAAM,0BAA0B,CAAC,GAAG,GAAG,CAAC;AACnC,MAAC,4BAA4B,CAAC,OAAO,SAAS,OAAO;AACxD,MAAI,SAASA,wBAAe,KAAK,GAAG;AAClC,UAAM,EAAE,iBAAiB,yBAAyB,GAAG,YAAW,IAAK;AACrE,WAAO;AAAA,MACL,KAAKC,SAAQ,SAAC,MAAM,KAAK,WAAW;AAAA,MACpC,QAAQC,wBAAAA,wBAAwB,MAAM,KAAK;AAAA,QACzC,GAAG;AAAA,QACH;AAAA,MACR,CAAO;AAAA,IACP;AAAA,EACA,OAAS;AACL,WAAO;AAAA,EACR;AACH;;","x_google_ignoreList":[0]}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import { buildURL
|
|
1
|
+
import { buildURL } from "../../../../imgix-url-builder/dist/buildURL.js";
|
|
2
|
+
import { buildPixelDensitySrcSet } from "../../../../imgix-url-builder/dist/buildPixelDensitySrcSet.js";
|
|
2
3
|
import { imageThumbnail } from "./isFilled.js";
|
|
3
4
|
const DEFAULT_PIXEL_DENSITIES = [1, 2, 3];
|
|
4
5
|
const asImagePixelDensitySrcSet = (field, config = {}) => {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"asImagePixelDensitySrcSet.js","sources":["../../../../../../node_modules/@prismicio/client/dist/helpers/asImagePixelDensitySrcSet.js"],"sourcesContent":["import { buildURL, buildPixelDensitySrcSet } from \"imgix-url-builder\";\nimport { imageThumbnail } from \"./isFilled.js\";\nconst DEFAULT_PIXEL_DENSITIES = [1, 2, 3];\nconst asImagePixelDensitySrcSet = (field, config = {}) => {\n if (field && imageThumbnail(field)) {\n const { pixelDensities = DEFAULT_PIXEL_DENSITIES, ...imgixParams } = config;\n return {\n src: buildURL(field.url, imgixParams),\n srcset: buildPixelDensitySrcSet(field.url, {\n ...imgixParams,\n pixelDensities\n })\n };\n } else {\n return null;\n }\n};\nexport {\n asImagePixelDensitySrcSet\n};\n//# sourceMappingURL=asImagePixelDensitySrcSet.js.map\n"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"asImagePixelDensitySrcSet.js","sources":["../../../../../../node_modules/@prismicio/client/dist/helpers/asImagePixelDensitySrcSet.js"],"sourcesContent":["import { buildURL, buildPixelDensitySrcSet } from \"imgix-url-builder\";\nimport { imageThumbnail } from \"./isFilled.js\";\nconst DEFAULT_PIXEL_DENSITIES = [1, 2, 3];\nconst asImagePixelDensitySrcSet = (field, config = {}) => {\n if (field && imageThumbnail(field)) {\n const { pixelDensities = DEFAULT_PIXEL_DENSITIES, ...imgixParams } = config;\n return {\n src: buildURL(field.url, imgixParams),\n srcset: buildPixelDensitySrcSet(field.url, {\n ...imgixParams,\n pixelDensities\n })\n };\n } else {\n return null;\n }\n};\nexport {\n asImagePixelDensitySrcSet\n};\n//# sourceMappingURL=asImagePixelDensitySrcSet.js.map\n"],"names":[],"mappings":";;;AAEA,MAAM,0BAA0B,CAAC,GAAG,GAAG,CAAC;AACnC,MAAC,4BAA4B,CAAC,OAAO,SAAS,OAAO;AACxD,MAAI,SAAS,eAAe,KAAK,GAAG;AAClC,UAAM,EAAE,iBAAiB,yBAAyB,GAAG,YAAW,IAAK;AACrE,WAAO;AAAA,MACL,KAAK,SAAS,MAAM,KAAK,WAAW;AAAA,MACpC,QAAQ,wBAAwB,MAAM,KAAK;AAAA,QACzC,GAAG;AAAA,QACH;AAAA,MACR,CAAO;AAAA,IACP;AAAA,EACA,OAAS;AACL,WAAO;AAAA,EACR;AACH;","x_google_ignoreList":[0]}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
-
const
|
|
3
|
+
const buildURL = require("../../../../imgix-url-builder/dist/buildURL.cjs");
|
|
4
|
+
const buildWidthSrcSet = require("../../../../imgix-url-builder/dist/buildWidthSrcSet.cjs");
|
|
4
5
|
const isFilled = require("./isFilled.cjs");
|
|
5
6
|
const DEFAULT_WIDTHS = [640, 828, 1200, 2048, 3840];
|
|
6
7
|
const asImageWidthSrcSet = (field, config = {}) => {
|
|
@@ -10,28 +11,28 @@ const asImageWidthSrcSet = (field, config = {}) => {
|
|
|
10
11
|
// eslint-disable-next-line prefer-const
|
|
11
12
|
...imgixParams
|
|
12
13
|
} = config;
|
|
13
|
-
const { url, dimensions, alt: _alt, copyright: _copyright, ...responsiveViews } = field;
|
|
14
|
+
const { url, dimensions, id: _id, alt: _alt, copyright: _copyright, edit: _edit, ...responsiveViews } = field;
|
|
14
15
|
const responsiveViewObjects = Object.values(responsiveViews);
|
|
15
16
|
if (widths === "thumbnails" && responsiveViewObjects.length < 1) {
|
|
16
17
|
widths = DEFAULT_WIDTHS;
|
|
17
18
|
}
|
|
18
19
|
return {
|
|
19
|
-
src:
|
|
20
|
+
src: buildURL.buildURL(url, imgixParams),
|
|
20
21
|
srcset: (
|
|
21
22
|
// By this point, we know `widths` can only be
|
|
22
23
|
// `"thubmanils"` if the field has thumbnails.
|
|
23
24
|
widths === "thumbnails" ? [
|
|
24
|
-
|
|
25
|
+
buildWidthSrcSet.buildWidthSrcSet(url, {
|
|
25
26
|
...imgixParams,
|
|
26
27
|
widths: [dimensions.width]
|
|
27
28
|
}),
|
|
28
29
|
...responsiveViewObjects.map((thumbnail) => {
|
|
29
|
-
return
|
|
30
|
+
return buildWidthSrcSet.buildWidthSrcSet(thumbnail.url, {
|
|
30
31
|
...imgixParams,
|
|
31
32
|
widths: [thumbnail.dimensions.width]
|
|
32
33
|
});
|
|
33
34
|
})
|
|
34
|
-
].join(", ") :
|
|
35
|
+
].join(", ") : buildWidthSrcSet.buildWidthSrcSet(field.url, {
|
|
35
36
|
...imgixParams,
|
|
36
37
|
widths
|
|
37
38
|
})
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"asImageWidthSrcSet.cjs","sources":["../../../../../../node_modules/@prismicio/client/dist/helpers/asImageWidthSrcSet.js"],"sourcesContent":["import { buildURL, buildWidthSrcSet } from \"imgix-url-builder\";\nimport { imageThumbnail } from \"./isFilled.js\";\nconst DEFAULT_WIDTHS = [640, 828, 1200, 2048, 3840];\nconst asImageWidthSrcSet = (field, config = {}) => {\n if (field && imageThumbnail(field)) {\n let {\n widths = DEFAULT_WIDTHS,\n // eslint-disable-next-line prefer-const\n ...imgixParams\n } = config;\n const { url, dimensions, alt: _alt, copyright: _copyright, ...responsiveViews } = field;\n const responsiveViewObjects = Object.values(responsiveViews);\n if (widths === \"thumbnails\" && responsiveViewObjects.length < 1) {\n widths = DEFAULT_WIDTHS;\n }\n return {\n src: buildURL(url, imgixParams),\n srcset: (\n // By this point, we know `widths` can only be\n // `\"thubmanils\"` if the field has thumbnails.\n widths === \"thumbnails\" ? [\n buildWidthSrcSet(url, {\n ...imgixParams,\n widths: [dimensions.width]\n }),\n ...responsiveViewObjects.map((thumbnail) => {\n return buildWidthSrcSet(thumbnail.url, {\n ...imgixParams,\n widths: [thumbnail.dimensions.width]\n });\n })\n ].join(\", \") : buildWidthSrcSet(field.url, {\n ...imgixParams,\n widths\n })\n )\n };\n } else {\n return null;\n }\n};\nexport {\n asImageWidthSrcSet\n};\n//# sourceMappingURL=asImageWidthSrcSet.js.map\n"],"names":["imageThumbnail","buildURL","buildWidthSrcSet"],"mappings":"
|
|
1
|
+
{"version":3,"file":"asImageWidthSrcSet.cjs","sources":["../../../../../../node_modules/@prismicio/client/dist/helpers/asImageWidthSrcSet.js"],"sourcesContent":["import { buildURL, buildWidthSrcSet } from \"imgix-url-builder\";\nimport { imageThumbnail } from \"./isFilled.js\";\nconst DEFAULT_WIDTHS = [640, 828, 1200, 2048, 3840];\nconst asImageWidthSrcSet = (field, config = {}) => {\n if (field && imageThumbnail(field)) {\n let {\n widths = DEFAULT_WIDTHS,\n // eslint-disable-next-line prefer-const\n ...imgixParams\n } = config;\n const { url, dimensions, id: _id, alt: _alt, copyright: _copyright, edit: _edit, ...responsiveViews } = field;\n const responsiveViewObjects = Object.values(responsiveViews);\n if (widths === \"thumbnails\" && responsiveViewObjects.length < 1) {\n widths = DEFAULT_WIDTHS;\n }\n return {\n src: buildURL(url, imgixParams),\n srcset: (\n // By this point, we know `widths` can only be\n // `\"thubmanils\"` if the field has thumbnails.\n widths === \"thumbnails\" ? [\n buildWidthSrcSet(url, {\n ...imgixParams,\n widths: [dimensions.width]\n }),\n ...responsiveViewObjects.map((thumbnail) => {\n return buildWidthSrcSet(thumbnail.url, {\n ...imgixParams,\n widths: [thumbnail.dimensions.width]\n });\n })\n ].join(\", \") : buildWidthSrcSet(field.url, {\n ...imgixParams,\n widths\n })\n )\n };\n } else {\n return null;\n }\n};\nexport {\n asImageWidthSrcSet\n};\n//# sourceMappingURL=asImageWidthSrcSet.js.map\n"],"names":["imageThumbnail","buildURL","buildWidthSrcSet"],"mappings":";;;;;AAEA,MAAM,iBAAiB,CAAC,KAAK,KAAK,MAAM,MAAM,IAAI;AAC7C,MAAC,qBAAqB,CAAC,OAAO,SAAS,OAAO;AACjD,MAAI,SAASA,wBAAe,KAAK,GAAG;AAClC,QAAI;AAAA,MACF,SAAS;AAAA;AAAA,MAET,GAAG;AAAA,IACJ,IAAG;AACJ,UAAM,EAAE,KAAK,YAAY,IAAI,KAAK,KAAK,MAAM,WAAW,YAAY,MAAM,OAAO,GAAG,gBAAe,IAAK;AACxG,UAAM,wBAAwB,OAAO,OAAO,eAAe;AAC3D,QAAI,WAAW,gBAAgB,sBAAsB,SAAS,GAAG;AAC/D,eAAS;AAAA,IACV;AACD,WAAO;AAAA,MACL,KAAKC,SAAAA,SAAS,KAAK,WAAW;AAAA,MAC9B;AAAA;AAAA;AAAA,QAGE,WAAW,eAAe;AAAA,UACxBC,iBAAAA,iBAAiB,KAAK;AAAA,YACpB,GAAG;AAAA,YACH,QAAQ,CAAC,WAAW,KAAK;AAAA,UACrC,CAAW;AAAA,UACD,GAAG,sBAAsB,IAAI,CAAC,cAAc;AAC1C,mBAAOA,iBAAgB,iBAAC,UAAU,KAAK;AAAA,cACrC,GAAG;AAAA,cACH,QAAQ,CAAC,UAAU,WAAW,KAAK;AAAA,YACjD,CAAa;AAAA,UACb,CAAW;AAAA,QACF,EAAC,KAAK,IAAI,IAAIA,iBAAAA,iBAAiB,MAAM,KAAK;AAAA,UACzC,GAAG;AAAA,UACH;AAAA,QACV,CAAS;AAAA;AAAA,IAET;AAAA,EACA,OAAS;AACL,WAAO;AAAA,EACR;AACH;;","x_google_ignoreList":[0]}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import { buildURL
|
|
1
|
+
import { buildURL } from "../../../../imgix-url-builder/dist/buildURL.js";
|
|
2
|
+
import { buildWidthSrcSet } from "../../../../imgix-url-builder/dist/buildWidthSrcSet.js";
|
|
2
3
|
import { imageThumbnail } from "./isFilled.js";
|
|
3
4
|
const DEFAULT_WIDTHS = [640, 828, 1200, 2048, 3840];
|
|
4
5
|
const asImageWidthSrcSet = (field, config = {}) => {
|
|
@@ -8,7 +9,7 @@ const asImageWidthSrcSet = (field, config = {}) => {
|
|
|
8
9
|
// eslint-disable-next-line prefer-const
|
|
9
10
|
...imgixParams
|
|
10
11
|
} = config;
|
|
11
|
-
const { url, dimensions, alt: _alt, copyright: _copyright, ...responsiveViews } = field;
|
|
12
|
+
const { url, dimensions, id: _id, alt: _alt, copyright: _copyright, edit: _edit, ...responsiveViews } = field;
|
|
12
13
|
const responsiveViewObjects = Object.values(responsiveViews);
|
|
13
14
|
if (widths === "thumbnails" && responsiveViewObjects.length < 1) {
|
|
14
15
|
widths = DEFAULT_WIDTHS;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"asImageWidthSrcSet.js","sources":["../../../../../../node_modules/@prismicio/client/dist/helpers/asImageWidthSrcSet.js"],"sourcesContent":["import { buildURL, buildWidthSrcSet } from \"imgix-url-builder\";\nimport { imageThumbnail } from \"./isFilled.js\";\nconst DEFAULT_WIDTHS = [640, 828, 1200, 2048, 3840];\nconst asImageWidthSrcSet = (field, config = {}) => {\n if (field && imageThumbnail(field)) {\n let {\n widths = DEFAULT_WIDTHS,\n // eslint-disable-next-line prefer-const\n ...imgixParams\n } = config;\n const { url, dimensions, alt: _alt, copyright: _copyright, ...responsiveViews } = field;\n const responsiveViewObjects = Object.values(responsiveViews);\n if (widths === \"thumbnails\" && responsiveViewObjects.length < 1) {\n widths = DEFAULT_WIDTHS;\n }\n return {\n src: buildURL(url, imgixParams),\n srcset: (\n // By this point, we know `widths` can only be\n // `\"thubmanils\"` if the field has thumbnails.\n widths === \"thumbnails\" ? [\n buildWidthSrcSet(url, {\n ...imgixParams,\n widths: [dimensions.width]\n }),\n ...responsiveViewObjects.map((thumbnail) => {\n return buildWidthSrcSet(thumbnail.url, {\n ...imgixParams,\n widths: [thumbnail.dimensions.width]\n });\n })\n ].join(\", \") : buildWidthSrcSet(field.url, {\n ...imgixParams,\n widths\n })\n )\n };\n } else {\n return null;\n }\n};\nexport {\n asImageWidthSrcSet\n};\n//# sourceMappingURL=asImageWidthSrcSet.js.map\n"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"asImageWidthSrcSet.js","sources":["../../../../../../node_modules/@prismicio/client/dist/helpers/asImageWidthSrcSet.js"],"sourcesContent":["import { buildURL, buildWidthSrcSet } from \"imgix-url-builder\";\nimport { imageThumbnail } from \"./isFilled.js\";\nconst DEFAULT_WIDTHS = [640, 828, 1200, 2048, 3840];\nconst asImageWidthSrcSet = (field, config = {}) => {\n if (field && imageThumbnail(field)) {\n let {\n widths = DEFAULT_WIDTHS,\n // eslint-disable-next-line prefer-const\n ...imgixParams\n } = config;\n const { url, dimensions, id: _id, alt: _alt, copyright: _copyright, edit: _edit, ...responsiveViews } = field;\n const responsiveViewObjects = Object.values(responsiveViews);\n if (widths === \"thumbnails\" && responsiveViewObjects.length < 1) {\n widths = DEFAULT_WIDTHS;\n }\n return {\n src: buildURL(url, imgixParams),\n srcset: (\n // By this point, we know `widths` can only be\n // `\"thubmanils\"` if the field has thumbnails.\n widths === \"thumbnails\" ? [\n buildWidthSrcSet(url, {\n ...imgixParams,\n widths: [dimensions.width]\n }),\n ...responsiveViewObjects.map((thumbnail) => {\n return buildWidthSrcSet(thumbnail.url, {\n ...imgixParams,\n widths: [thumbnail.dimensions.width]\n });\n })\n ].join(\", \") : buildWidthSrcSet(field.url, {\n ...imgixParams,\n widths\n })\n )\n };\n } else {\n return null;\n }\n};\nexport {\n asImageWidthSrcSet\n};\n//# sourceMappingURL=asImageWidthSrcSet.js.map\n"],"names":[],"mappings":";;;AAEA,MAAM,iBAAiB,CAAC,KAAK,KAAK,MAAM,MAAM,IAAI;AAC7C,MAAC,qBAAqB,CAAC,OAAO,SAAS,OAAO;AACjD,MAAI,SAAS,eAAe,KAAK,GAAG;AAClC,QAAI;AAAA,MACF,SAAS;AAAA;AAAA,MAET,GAAG;AAAA,IACJ,IAAG;AACJ,UAAM,EAAE,KAAK,YAAY,IAAI,KAAK,KAAK,MAAM,WAAW,YAAY,MAAM,OAAO,GAAG,gBAAe,IAAK;AACxG,UAAM,wBAAwB,OAAO,OAAO,eAAe;AAC3D,QAAI,WAAW,gBAAgB,sBAAsB,SAAS,GAAG;AAC/D,eAAS;AAAA,IACV;AACD,WAAO;AAAA,MACL,KAAK,SAAS,KAAK,WAAW;AAAA,MAC9B;AAAA;AAAA;AAAA,QAGE,WAAW,eAAe;AAAA,UACxB,iBAAiB,KAAK;AAAA,YACpB,GAAG;AAAA,YACH,QAAQ,CAAC,WAAW,KAAK;AAAA,UACrC,CAAW;AAAA,UACD,GAAG,sBAAsB,IAAI,CAAC,cAAc;AAC1C,mBAAO,iBAAiB,UAAU,KAAK;AAAA,cACrC,GAAG;AAAA,cACH,QAAQ,CAAC,UAAU,WAAW,KAAK;AAAA,YACjD,CAAa;AAAA,UACb,CAAW;AAAA,QACF,EAAC,KAAK,IAAI,IAAI,iBAAiB,MAAM,KAAK;AAAA,UACzC,GAAG;AAAA,UACH;AAAA,QACV,CAAS;AAAA;AAAA,IAET;AAAA,EACA,OAAS;AACL,WAAO;AAAA,EACR;AACH;","x_google_ignoreList":[0]}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
-
const
|
|
3
|
+
const asText$1 = require("../richtext/asText.cjs");
|
|
4
4
|
const asText = (richTextField, ...configObjectOrTuple) => {
|
|
5
5
|
if (richTextField) {
|
|
6
6
|
const [configObjectOrSeparator] = configObjectOrTuple;
|
|
@@ -12,7 +12,7 @@ const asText = (richTextField, ...configObjectOrTuple) => {
|
|
|
12
12
|
} else {
|
|
13
13
|
config = { ...configObjectOrSeparator };
|
|
14
14
|
}
|
|
15
|
-
return
|
|
15
|
+
return asText$1.asText(richTextField, config.separator);
|
|
16
16
|
} else {
|
|
17
17
|
return null;
|
|
18
18
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"asText.cjs","sources":["../../../../../../node_modules/@prismicio/client/dist/helpers/asText.js"],"sourcesContent":["import { asText as asText$1 } from \"
|
|
1
|
+
{"version":3,"file":"asText.cjs","sources":["../../../../../../node_modules/@prismicio/client/dist/helpers/asText.js"],"sourcesContent":["import { asText as asText$1 } from \"../richtext/asText.js\";\nconst asText = (richTextField, ...configObjectOrTuple) => {\n if (richTextField) {\n const [configObjectOrSeparator] = configObjectOrTuple;\n let config;\n if (typeof configObjectOrSeparator === \"string\") {\n config = {\n separator: configObjectOrSeparator\n };\n } else {\n config = { ...configObjectOrSeparator };\n }\n return asText$1(richTextField, config.separator);\n } else {\n return null;\n }\n};\nexport {\n asText\n};\n//# sourceMappingURL=asText.js.map\n"],"names":["asText$1"],"mappings":";;;AACK,MAAC,SAAS,CAAC,kBAAkB,wBAAwB;AACxD,MAAI,eAAe;AACjB,UAAM,CAAC,uBAAuB,IAAI;AAClC,QAAI;AACJ,QAAI,OAAO,4BAA4B,UAAU;AAC/C,eAAS;AAAA,QACP,WAAW;AAAA,MACnB;AAAA,IACA,OAAW;AACL,eAAS,EAAE,GAAG;IACf;AACD,WAAOA,gBAAS,eAAe,OAAO,SAAS;AAAA,EACnD,OAAS;AACL,WAAO;AAAA,EACR;AACH;;","x_google_ignoreList":[0]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"asText.js","sources":["../../../../../../node_modules/@prismicio/client/dist/helpers/asText.js"],"sourcesContent":["import { asText as asText$1 } from \"
|
|
1
|
+
{"version":3,"file":"asText.js","sources":["../../../../../../node_modules/@prismicio/client/dist/helpers/asText.js"],"sourcesContent":["import { asText as asText$1 } from \"../richtext/asText.js\";\nconst asText = (richTextField, ...configObjectOrTuple) => {\n if (richTextField) {\n const [configObjectOrSeparator] = configObjectOrTuple;\n let config;\n if (typeof configObjectOrSeparator === \"string\") {\n config = {\n separator: configObjectOrSeparator\n };\n } else {\n config = { ...configObjectOrSeparator };\n }\n return asText$1(richTextField, config.separator);\n } else {\n return null;\n }\n};\nexport {\n asText\n};\n//# sourceMappingURL=asText.js.map\n"],"names":[],"mappings":";AACK,MAAC,SAAS,CAAC,kBAAkB,wBAAwB;AACxD,MAAI,eAAe;AACjB,UAAM,CAAC,uBAAuB,IAAI;AAClC,QAAI;AACJ,QAAI,OAAO,4BAA4B,UAAU;AAC/C,eAAS;AAAA,QACP,WAAW;AAAA,MACnB;AAAA,IACA,OAAW;AACL,eAAS,EAAE,GAAG;IACf;AACD,WAAO,SAAS,eAAe,OAAO,SAAS;AAAA,EACnD,OAAS;AACL,WAAO;AAAA,EACR;AACH;","x_google_ignoreList":[0]}
|
|
@@ -12,6 +12,7 @@ const documentToLinkField = (prismicDocument) => {
|
|
|
12
12
|
lang: prismicDocument.lang,
|
|
13
13
|
url: prismicDocument.url == null ? void 0 : prismicDocument.url,
|
|
14
14
|
slug: (_a = prismicDocument.slugs) == null ? void 0 : _a[0],
|
|
15
|
+
// Slug field is not available with GraphQL
|
|
15
16
|
// The REST API does not include a `data` property if the data
|
|
16
17
|
// object is empty.
|
|
17
18
|
//
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"documentToLinkField.cjs","sources":["../../../../../../node_modules/@prismicio/client/dist/helpers/documentToLinkField.js"],"sourcesContent":["import { LinkType } from \"../types/value/link.js\";\nconst documentToLinkField = (prismicDocument) => {\n var _a;\n return {\n link_type: LinkType.Document,\n id: prismicDocument.id,\n uid: prismicDocument.uid || void 0,\n type: prismicDocument.type,\n tags: prismicDocument.tags,\n lang: prismicDocument.lang,\n url: prismicDocument.url == null ? void 0 : prismicDocument.url,\n slug: (_a = prismicDocument.slugs) == null ? void 0 : _a[0],\n // The REST API does not include a `data` property if the data\n // object is empty.\n //\n // A presence check for `prismicDocument.data` is done to\n // support partial documents. While `documentToLinkField` is\n // not typed to accept partial documents, passing a partial\n // document can happen in untyped projects.\n ...prismicDocument.data && Object.keys(prismicDocument.data).length > 0 ? { data: prismicDocument.data } : {}\n };\n};\nexport {\n documentToLinkField\n};\n//# sourceMappingURL=documentToLinkField.js.map\n"],"names":["LinkType"],"mappings":";;;AACK,MAAC,sBAAsB,CAAC,oBAAoB;AAC/C,MAAI;AACJ,SAAO;AAAA,IACL,WAAWA,KAAQ,SAAC;AAAA,IACpB,IAAI,gBAAgB;AAAA,IACpB,KAAK,gBAAgB,OAAO;AAAA,IAC5B,MAAM,gBAAgB;AAAA,IACtB,MAAM,gBAAgB;AAAA,IACtB,MAAM,gBAAgB;AAAA,IACtB,KAAK,gBAAgB,OAAO,OAAO,SAAS,gBAAgB;AAAA,IAC5D,OAAO,KAAK,gBAAgB,UAAU,OAAO,SAAS,GAAG,CAAC;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,
|
|
1
|
+
{"version":3,"file":"documentToLinkField.cjs","sources":["../../../../../../node_modules/@prismicio/client/dist/helpers/documentToLinkField.js"],"sourcesContent":["import { LinkType } from \"../types/value/link.js\";\nconst documentToLinkField = (prismicDocument) => {\n var _a;\n return {\n link_type: LinkType.Document,\n id: prismicDocument.id,\n uid: prismicDocument.uid || void 0,\n type: prismicDocument.type,\n tags: prismicDocument.tags,\n lang: prismicDocument.lang,\n url: prismicDocument.url == null ? void 0 : prismicDocument.url,\n slug: (_a = prismicDocument.slugs) == null ? void 0 : _a[0],\n // Slug field is not available with GraphQL\n // The REST API does not include a `data` property if the data\n // object is empty.\n //\n // A presence check for `prismicDocument.data` is done to\n // support partial documents. While `documentToLinkField` is\n // not typed to accept partial documents, passing a partial\n // document can happen in untyped projects.\n ...prismicDocument.data && Object.keys(prismicDocument.data).length > 0 ? { data: prismicDocument.data } : {}\n };\n};\nexport {\n documentToLinkField\n};\n//# sourceMappingURL=documentToLinkField.js.map\n"],"names":["LinkType"],"mappings":";;;AACK,MAAC,sBAAsB,CAAC,oBAAoB;AAC/C,MAAI;AACJ,SAAO;AAAA,IACL,WAAWA,KAAQ,SAAC;AAAA,IACpB,IAAI,gBAAgB;AAAA,IACpB,KAAK,gBAAgB,OAAO;AAAA,IAC5B,MAAM,gBAAgB;AAAA,IACtB,MAAM,gBAAgB;AAAA,IACtB,MAAM,gBAAgB;AAAA,IACtB,KAAK,gBAAgB,OAAO,OAAO,SAAS,gBAAgB;AAAA,IAC5D,OAAO,KAAK,gBAAgB,UAAU,OAAO,SAAS,GAAG,CAAC;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAS1D,GAAG,gBAAgB,QAAQ,OAAO,KAAK,gBAAgB,IAAI,EAAE,SAAS,IAAI,EAAE,MAAM,gBAAgB,KAAM,IAAG,CAAE;AAAA,EACjH;AACA;;","x_google_ignoreList":[0]}
|
|
@@ -10,6 +10,7 @@ const documentToLinkField = (prismicDocument) => {
|
|
|
10
10
|
lang: prismicDocument.lang,
|
|
11
11
|
url: prismicDocument.url == null ? void 0 : prismicDocument.url,
|
|
12
12
|
slug: (_a = prismicDocument.slugs) == null ? void 0 : _a[0],
|
|
13
|
+
// Slug field is not available with GraphQL
|
|
13
14
|
// The REST API does not include a `data` property if the data
|
|
14
15
|
// object is empty.
|
|
15
16
|
//
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"documentToLinkField.js","sources":["../../../../../../node_modules/@prismicio/client/dist/helpers/documentToLinkField.js"],"sourcesContent":["import { LinkType } from \"../types/value/link.js\";\nconst documentToLinkField = (prismicDocument) => {\n var _a;\n return {\n link_type: LinkType.Document,\n id: prismicDocument.id,\n uid: prismicDocument.uid || void 0,\n type: prismicDocument.type,\n tags: prismicDocument.tags,\n lang: prismicDocument.lang,\n url: prismicDocument.url == null ? void 0 : prismicDocument.url,\n slug: (_a = prismicDocument.slugs) == null ? void 0 : _a[0],\n // The REST API does not include a `data` property if the data\n // object is empty.\n //\n // A presence check for `prismicDocument.data` is done to\n // support partial documents. While `documentToLinkField` is\n // not typed to accept partial documents, passing a partial\n // document can happen in untyped projects.\n ...prismicDocument.data && Object.keys(prismicDocument.data).length > 0 ? { data: prismicDocument.data } : {}\n };\n};\nexport {\n documentToLinkField\n};\n//# sourceMappingURL=documentToLinkField.js.map\n"],"names":[],"mappings":";AACK,MAAC,sBAAsB,CAAC,oBAAoB;AAC/C,MAAI;AACJ,SAAO;AAAA,IACL,WAAW,SAAS;AAAA,IACpB,IAAI,gBAAgB;AAAA,IACpB,KAAK,gBAAgB,OAAO;AAAA,IAC5B,MAAM,gBAAgB;AAAA,IACtB,MAAM,gBAAgB;AAAA,IACtB,MAAM,gBAAgB;AAAA,IACtB,KAAK,gBAAgB,OAAO,OAAO,SAAS,gBAAgB;AAAA,IAC5D,OAAO,KAAK,gBAAgB,UAAU,OAAO,SAAS,GAAG,CAAC;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,
|
|
1
|
+
{"version":3,"file":"documentToLinkField.js","sources":["../../../../../../node_modules/@prismicio/client/dist/helpers/documentToLinkField.js"],"sourcesContent":["import { LinkType } from \"../types/value/link.js\";\nconst documentToLinkField = (prismicDocument) => {\n var _a;\n return {\n link_type: LinkType.Document,\n id: prismicDocument.id,\n uid: prismicDocument.uid || void 0,\n type: prismicDocument.type,\n tags: prismicDocument.tags,\n lang: prismicDocument.lang,\n url: prismicDocument.url == null ? void 0 : prismicDocument.url,\n slug: (_a = prismicDocument.slugs) == null ? void 0 : _a[0],\n // Slug field is not available with GraphQL\n // The REST API does not include a `data` property if the data\n // object is empty.\n //\n // A presence check for `prismicDocument.data` is done to\n // support partial documents. While `documentToLinkField` is\n // not typed to accept partial documents, passing a partial\n // document can happen in untyped projects.\n ...prismicDocument.data && Object.keys(prismicDocument.data).length > 0 ? { data: prismicDocument.data } : {}\n };\n};\nexport {\n documentToLinkField\n};\n//# sourceMappingURL=documentToLinkField.js.map\n"],"names":[],"mappings":";AACK,MAAC,sBAAsB,CAAC,oBAAoB;AAC/C,MAAI;AACJ,SAAO;AAAA,IACL,WAAW,SAAS;AAAA,IACpB,IAAI,gBAAgB;AAAA,IACpB,KAAK,gBAAgB,OAAO;AAAA,IAC5B,MAAM,gBAAgB;AAAA,IACtB,MAAM,gBAAgB;AAAA,IACtB,MAAM,gBAAgB;AAAA,IACtB,KAAK,gBAAgB,OAAO,OAAO,SAAS,gBAAgB;AAAA,IAC5D,OAAO,KAAK,gBAAgB,UAAU,OAAO,SAAS,GAAG,CAAC;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAS1D,GAAG,gBAAgB,QAAQ,OAAO,KAAK,gBAAgB,IAAI,EAAE,SAAS,IAAI,EAAE,MAAM,gBAAgB,KAAM,IAAG,CAAE;AAAA,EACjH;AACA;","x_google_ignoreList":[0]}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
+
const asText = (richTextField, separator = " ") => {
|
|
4
|
+
let result = "";
|
|
5
|
+
for (let i = 0; i < richTextField.length; i++) {
|
|
6
|
+
if ("text" in richTextField[i]) {
|
|
7
|
+
result += (result ? separator : "") + richTextField[i].text;
|
|
8
|
+
}
|
|
9
|
+
}
|
|
10
|
+
return result;
|
|
11
|
+
};
|
|
12
|
+
exports.asText = asText;
|
|
13
|
+
//# sourceMappingURL=asText.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"asText.cjs","sources":["../../../../../../node_modules/@prismicio/client/dist/richtext/asText.js"],"sourcesContent":["const asText = (richTextField, separator = \" \") => {\n let result = \"\";\n for (let i = 0; i < richTextField.length; i++) {\n if (\"text\" in richTextField[i]) {\n result += (result ? separator : \"\") + richTextField[i].text;\n }\n }\n return result;\n};\nexport {\n asText\n};\n//# sourceMappingURL=asText.js.map\n"],"names":[],"mappings":";;AAAK,MAAC,SAAS,CAAC,eAAe,YAAY,QAAQ;AACjD,MAAI,SAAS;AACb,WAAS,IAAI,GAAG,IAAI,cAAc,QAAQ,KAAK;AAC7C,QAAI,UAAU,cAAc,CAAC,GAAG;AAC9B,iBAAW,SAAS,YAAY,MAAM,cAAc,CAAC,EAAE;AAAA,IACxD;AAAA,EACF;AACD,SAAO;AACT;;","x_google_ignoreList":[0]}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
const asText = (richTextField, separator = " ") => {
|
|
2
|
+
let result = "";
|
|
3
|
+
for (let i = 0; i < richTextField.length; i++) {
|
|
4
|
+
if ("text" in richTextField[i]) {
|
|
5
|
+
result += (result ? separator : "") + richTextField[i].text;
|
|
6
|
+
}
|
|
7
|
+
}
|
|
8
|
+
return result;
|
|
9
|
+
};
|
|
10
|
+
export {
|
|
11
|
+
asText
|
|
12
|
+
};
|
|
13
|
+
//# sourceMappingURL=asText.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"asText.js","sources":["../../../../../../node_modules/@prismicio/client/dist/richtext/asText.js"],"sourcesContent":["const asText = (richTextField, separator = \" \") => {\n let result = \"\";\n for (let i = 0; i < richTextField.length; i++) {\n if (\"text\" in richTextField[i]) {\n result += (result ? separator : \"\") + richTextField[i].text;\n }\n }\n return result;\n};\nexport {\n asText\n};\n//# sourceMappingURL=asText.js.map\n"],"names":[],"mappings":"AAAK,MAAC,SAAS,CAAC,eAAe,YAAY,QAAQ;AACjD,MAAI,SAAS;AACb,WAAS,IAAI,GAAG,IAAI,cAAc,QAAQ,KAAK;AAC7C,QAAI,UAAU,cAAc,CAAC,GAAG;AAC9B,iBAAW,SAAS,YAAY,MAAM,cAAc,CAAC,EAAE;AAAA,IACxD;AAAA,EACF;AACD,SAAO;AACT;","x_google_ignoreList":[0]}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
+
const buildURL = require("./buildURL.cjs");
|
|
4
|
+
const buildPixelDensitySrcSet = (url, { pixelDensities, ...params }) => {
|
|
5
|
+
return pixelDensities.map((dpr) => {
|
|
6
|
+
return `${buildURL.buildURL(url, { ...params, dpr })} ${dpr}x`;
|
|
7
|
+
}).join(", ");
|
|
8
|
+
};
|
|
9
|
+
exports.buildPixelDensitySrcSet = buildPixelDensitySrcSet;
|
|
10
|
+
//# sourceMappingURL=buildPixelDensitySrcSet.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"buildPixelDensitySrcSet.cjs","sources":["../../../../node_modules/imgix-url-builder/dist/buildPixelDensitySrcSet.js"],"sourcesContent":["import { buildURL } from \"./buildURL.js\";\nconst buildPixelDensitySrcSet = (url, { pixelDensities, ...params }) => {\n return pixelDensities.map((dpr) => {\n return `${buildURL(url, { ...params, dpr })} ${dpr}x`;\n }).join(\", \");\n};\nexport {\n buildPixelDensitySrcSet\n};\n//# sourceMappingURL=buildPixelDensitySrcSet.js.map\n"],"names":["buildURL"],"mappings":";;;AACK,MAAC,0BAA0B,CAAC,KAAK,EAAE,gBAAgB,GAAG,OAAM,MAAO;AACtE,SAAO,eAAe,IAAI,CAAC,QAAQ;AACjC,WAAO,GAAGA,SAAAA,SAAS,KAAK,EAAE,GAAG,QAAQ,IAAG,CAAE,KAAK;AAAA,EACnD,CAAG,EAAE,KAAK,IAAI;AACd;;","x_google_ignoreList":[0]}
|