@prismicio/vue 4.2.3 → 4.3.1
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/components/PrismicEmbed.cjs.map +1 -1
- package/dist/components/PrismicEmbed.d.ts +7 -7
- package/dist/components/PrismicEmbed.js.map +1 -1
- package/dist/components/PrismicImage.cjs.map +1 -1
- package/dist/components/PrismicImage.d.ts +10 -8
- package/dist/components/PrismicImage.js.map +1 -1
- package/dist/components/PrismicLink.cjs +8 -3
- package/dist/components/PrismicLink.cjs.map +1 -1
- package/dist/components/PrismicLink.d.ts +14 -8
- package/dist/components/PrismicLink.js +8 -3
- package/dist/components/PrismicLink.js.map +1 -1
- package/dist/components/PrismicRichText.cjs.map +1 -1
- package/dist/components/PrismicRichText.d.ts +8 -8
- package/dist/components/PrismicRichText.js.map +1 -1
- package/dist/components/PrismicText.cjs.map +1 -1
- package/dist/components/PrismicText.d.ts +8 -8
- package/dist/components/PrismicText.js.map +1 -1
- package/dist/components/SliceZone.cjs.map +1 -1
- package/dist/components/SliceZone.d.ts +14 -12
- package/dist/components/SliceZone.js.map +1 -1
- package/dist/components/index.d.ts +1 -1
- package/dist/composables.cjs.map +1 -1
- package/dist/composables.d.ts +38 -74
- package/dist/composables.js.map +1 -1
- package/dist/createPrismic.cjs.map +1 -1
- package/dist/createPrismic.js.map +1 -1
- package/dist/injectionSymbols.cjs.map +1 -1
- package/dist/injectionSymbols.js.map +1 -1
- package/dist/lib/__PRODUCTION__.cjs.map +1 -1
- package/dist/lib/__PRODUCTION__.js.map +1 -1
- package/dist/lib/getSlots.cjs +6 -4
- package/dist/lib/getSlots.cjs.map +1 -1
- package/dist/lib/getSlots.d.ts +2 -2
- package/dist/lib/getSlots.js +6 -4
- package/dist/lib/getSlots.js.map +1 -1
- package/dist/lib/isInternalURL.cjs.map +1 -1
- package/dist/lib/isInternalURL.js.map +1 -1
- package/dist/lib/simplyResolveComponent.cjs.map +1 -1
- package/dist/lib/simplyResolveComponent.d.ts +1 -1
- package/dist/lib/simplyResolveComponent.js.map +1 -1
- package/dist/types.d.ts +11 -2
- package/dist/usePrismic.cjs.map +1 -1
- package/dist/usePrismic.d.ts +5 -5
- package/dist/usePrismic.js.map +1 -1
- package/dist/useStatefulPrismicClientMethod.cjs.map +1 -1
- package/dist/useStatefulPrismicClientMethod.d.ts +4 -3
- package/dist/useStatefulPrismicClientMethod.js.map +1 -1
- package/package.json +28 -29
- package/src/components/PrismicEmbed.ts +16 -17
- package/src/components/PrismicImage.ts +57 -59
- package/src/components/PrismicLink.ts +78 -67
- package/src/components/PrismicRichText.ts +64 -63
- package/src/components/PrismicText.ts +30 -32
- package/src/components/SliceZone.ts +94 -96
- package/src/components/index.ts +12 -16
- package/src/composables.ts +41 -23
- package/src/createPrismic.ts +40 -34
- package/src/globalExtensions.ts +2 -2
- package/src/index.ts +10 -10
- package/src/injectionSymbols.ts +4 -4
- package/src/lib/__PRODUCTION__.ts +2 -2
- package/src/lib/getSlots.ts +17 -8
- package/src/lib/isInternalURL.ts +4 -4
- package/src/lib/simplyResolveComponent.ts +4 -9
- package/src/types.ts +61 -52
- package/src/usePrismic.ts +9 -9
- package/src/useStatefulPrismicClientMethod.ts +42 -40
package/dist/lib/getSlots.js
CHANGED
|
@@ -1,15 +1,17 @@
|
|
|
1
|
-
|
|
1
|
+
import { h, Text } from "vue";
|
|
2
|
+
const getSlots = (parent, slots, defaultPayload, fallback) => {
|
|
3
|
+
const fallbackSlot = fallback ? () => [h(Text, fallback)] : void 0;
|
|
2
4
|
if (typeof parent === "string") {
|
|
3
|
-
return slots.default
|
|
5
|
+
return slots.default ? slots.default(defaultPayload) : fallbackSlot == null ? void 0 : fallbackSlot();
|
|
4
6
|
} else {
|
|
5
7
|
if (slots.default) {
|
|
6
8
|
const content = slots.default(defaultPayload);
|
|
7
9
|
return {
|
|
8
10
|
...slots,
|
|
9
|
-
default: () => content
|
|
11
|
+
default: content.length ? () => content : fallbackSlot
|
|
10
12
|
};
|
|
11
13
|
} else {
|
|
12
|
-
return
|
|
14
|
+
return fallbackSlot;
|
|
13
15
|
}
|
|
14
16
|
}
|
|
15
17
|
};
|
package/dist/lib/getSlots.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getSlots.js","sources":["../../../src/lib/getSlots.ts"],"sourcesContent":["import { ConcreteComponent
|
|
1
|
+
{"version":3,"file":"getSlots.js","sources":["../../../src/lib/getSlots.ts"],"sourcesContent":["import {\n\ttype ConcreteComponent,\n\ttype Slot,\n\ttype Slots,\n\tText,\n\ttype VNode,\n\th,\n} from \"vue\"\n\n/**\n * Get the appropriate `slots` object/array according to the provided parent,\n * fixing `Non-function value encountered for default slot.` warnings.\n *\n * @param parent - The parent inheriting slots\n * @param slots - The `slots` to transform for parent\n * @param defaultParams - The parameters to provide to the default slot\n *\n * @returns The appropriate slots object/array\n *\n * @internal\n */\nexport const getSlots = (\n\tparent: string | ConcreteComponent,\n\tslots: Slots,\n\tdefaultPayload?: unknown,\n\tfallback?: string,\n): VNode[] | Slots | Slot | undefined => {\n\tconst fallbackSlot = fallback ? () => [h(Text, fallback)] : undefined\n\tif (typeof parent === \"string\") {\n\t\treturn slots.default ? slots.default(defaultPayload) : fallbackSlot?.()\n\t} else {\n\t\tif (slots.default) {\n\t\t\tconst content = slots.default(defaultPayload)\n\n\t\t\treturn {\n\t\t\t\t...slots,\n\t\t\t\tdefault: content.length ? () => content : fallbackSlot,\n\t\t\t}\n\t\t} else {\n\t\t\treturn fallbackSlot\n\t\t}\n\t}\n}\n"],"names":[],"mappings":";AAqBO,MAAM,WAAW,CACvB,QACA,OACA,gBACA,aACuC;AACjC,QAAA,eAAe,WAAW,MAAM,CAAC,EAAE,MAAM,QAAQ,CAAC,IAAI;AACxD,MAAA,OAAO,WAAW,UAAU;AAC/B,WAAO,MAAM,UAAU,MAAM,QAAQ,cAAc,IAAI;AAAA,SACjD;AACN,QAAI,MAAM,SAAS;AACZ,YAAA,UAAU,MAAM,QAAQ,cAAc;AAErC,aAAA;AAAA,QACN,GAAG;AAAA,QACH,SAAS,QAAQ,SAAS,MAAM,UAAU;AAAA;WAErC;AACC,aAAA;AAAA,IAAA;AAAA,EACR;AAEF;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"isInternalURL.cjs","sources":["../../../src/lib/isInternalURL.ts"],"sourcesContent":["/**\n * Determines if a URL is internal or external.\n *\n * @param url - The URL to check if internal or external\n *\n * @returns `true` if `url` is internal, `false` otherwise\n */\n// TODO: This does not detect all relative URLs as internal, such as `about` or `./about`. This function assumes relative URLs start with a \"/\"`.\nexport const isInternalURL = (url: string): boolean => {\n\t/**\n\t * @see Regex101 expression: {@link https://regex101.com/r/1y7iod/1}\n\t */\n\tconst isInternal = /^\\/(?!\\/)/.test(url)
|
|
1
|
+
{"version":3,"file":"isInternalURL.cjs","sources":["../../../src/lib/isInternalURL.ts"],"sourcesContent":["/**\n * Determines if a URL is internal or external.\n *\n * @param url - The URL to check if internal or external\n *\n * @returns `true` if `url` is internal, `false` otherwise\n */\n// TODO: This does not detect all relative URLs as internal, such as `about` or `./about`. This function assumes relative URLs start with a \"/\"`.\nexport const isInternalURL = (url: string): boolean => {\n\t/**\n\t * @see Regex101 expression: {@link https://regex101.com/r/1y7iod/1}\n\t */\n\tconst isInternal = /^\\/(?!\\/)/.test(url)\n\t/**\n\t * @see Regex101 expression: {@link https://regex101.com/r/RnUseS/1}\n\t */\n\tconst isSpecialLink = !isInternal && !/^https?:\\/\\//i.test(url)\n\n\treturn isInternal && !isSpecialLink\n}\n"],"names":[],"mappings":";;AAQa,MAAA,gBAAgB,CAAC,QAAwB;AAI/C,QAAA,aAAa,YAAY,KAAK,GAAG;AAIvC,QAAM,gBAAgB,CAAC,cAAc,CAAC,gBAAgB,KAAK,GAAG;AAE9D,SAAO,cAAc,CAAC;AACvB;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"isInternalURL.js","sources":["../../../src/lib/isInternalURL.ts"],"sourcesContent":["/**\n * Determines if a URL is internal or external.\n *\n * @param url - The URL to check if internal or external\n *\n * @returns `true` if `url` is internal, `false` otherwise\n */\n// TODO: This does not detect all relative URLs as internal, such as `about` or `./about`. This function assumes relative URLs start with a \"/\"`.\nexport const isInternalURL = (url: string): boolean => {\n\t/**\n\t * @see Regex101 expression: {@link https://regex101.com/r/1y7iod/1}\n\t */\n\tconst isInternal = /^\\/(?!\\/)/.test(url)
|
|
1
|
+
{"version":3,"file":"isInternalURL.js","sources":["../../../src/lib/isInternalURL.ts"],"sourcesContent":["/**\n * Determines if a URL is internal or external.\n *\n * @param url - The URL to check if internal or external\n *\n * @returns `true` if `url` is internal, `false` otherwise\n */\n// TODO: This does not detect all relative URLs as internal, such as `about` or `./about`. This function assumes relative URLs start with a \"/\"`.\nexport const isInternalURL = (url: string): boolean => {\n\t/**\n\t * @see Regex101 expression: {@link https://regex101.com/r/1y7iod/1}\n\t */\n\tconst isInternal = /^\\/(?!\\/)/.test(url)\n\t/**\n\t * @see Regex101 expression: {@link https://regex101.com/r/RnUseS/1}\n\t */\n\tconst isSpecialLink = !isInternal && !/^https?:\\/\\//i.test(url)\n\n\treturn isInternal && !isSpecialLink\n}\n"],"names":[],"mappings":"AAQa,MAAA,gBAAgB,CAAC,QAAwB;AAI/C,QAAA,aAAa,YAAY,KAAK,GAAG;AAIvC,QAAM,gBAAgB,CAAC,cAAc,CAAC,gBAAgB,KAAK,GAAG;AAE9D,SAAO,cAAc,CAAC;AACvB;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"simplyResolveComponent.cjs","sources":["../../../src/lib/simplyResolveComponent.ts"],"sourcesContent":["import {\
|
|
1
|
+
{"version":3,"file":"simplyResolveComponent.cjs","sources":["../../../src/lib/simplyResolveComponent.ts"],"sourcesContent":["import type { ConcreteComponent, DefineComponent, Raw, VNode } from \"vue\"\nimport { resolveDynamicComponent } from \"vue\"\n\n/**\n * A stricter version of {@link resolveDynamicComponent} that resolves only type\n * {@link VNode} for existing components or provided `string`.\n *\n * @param component - An HTML tag name, a component, or a functional component\n *\n * @returns Resolved component as a {@link VNode} or provided `string`.\n *\n * @internal\n */\nexport const simplyResolveComponent = (\n\tcomponent: string | ConcreteComponent | Raw<DefineComponent>,\n): string | VNode => {\n\treturn resolveDynamicComponent(component) as string | VNode\n}\n"],"names":["resolveDynamicComponent"],"mappings":";;;AAaa,MAAA,yBAAyB,CACrC,cACmB;AACnB,SAAOA,IAAAA,wBAAwB,SAAS;AACzC;;"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ConcreteComponent, DefineComponent, Raw, VNode } from "vue";
|
|
1
|
+
import type { ConcreteComponent, DefineComponent, Raw, VNode } from "vue";
|
|
2
2
|
/**
|
|
3
3
|
* A stricter version of {@link resolveDynamicComponent} that resolves only type
|
|
4
4
|
* {@link VNode} for existing components or provided `string`.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"simplyResolveComponent.js","sources":["../../../src/lib/simplyResolveComponent.ts"],"sourcesContent":["import {\
|
|
1
|
+
{"version":3,"file":"simplyResolveComponent.js","sources":["../../../src/lib/simplyResolveComponent.ts"],"sourcesContent":["import type { ConcreteComponent, DefineComponent, Raw, VNode } from \"vue\"\nimport { resolveDynamicComponent } from \"vue\"\n\n/**\n * A stricter version of {@link resolveDynamicComponent} that resolves only type\n * {@link VNode} for existing components or provided `string`.\n *\n * @param component - An HTML tag name, a component, or a functional component\n *\n * @returns Resolved component as a {@link VNode} or provided `string`.\n *\n * @internal\n */\nexport const simplyResolveComponent = (\n\tcomponent: string | ConcreteComponent | Raw<DefineComponent>,\n): string | VNode => {\n\treturn resolveDynamicComponent(component) as string | VNode\n}\n"],"names":[],"mappings":";AAaa,MAAA,yBAAyB,CACrC,cACmB;AACnB,SAAO,wBAAwB,SAAS;AACzC;"}
|
package/dist/types.d.ts
CHANGED
|
@@ -22,6 +22,7 @@ type PrismicPluginComponentsOptions = {
|
|
|
22
22
|
* @remarks
|
|
23
23
|
* Components will be rendered using Vue Router {@link RouterLink} interface
|
|
24
24
|
* (`to` props).
|
|
25
|
+
*
|
|
25
26
|
* @defaultValue {@link RouterLink}
|
|
26
27
|
*/
|
|
27
28
|
linkInternalComponent?: string | ConcreteComponent | Raw<DefineComponent>;
|
|
@@ -35,6 +36,7 @@ type PrismicPluginComponentsOptions = {
|
|
|
35
36
|
* @remarks
|
|
36
37
|
* Components will be rendered using Vue Router {@link RouterLink} interface
|
|
37
38
|
* (`to` props).
|
|
39
|
+
*
|
|
38
40
|
* @defaultValue `"a"`
|
|
39
41
|
*/
|
|
40
42
|
linkExternalComponent?: string | ConcreteComponent | Raw<DefineComponent>;
|
|
@@ -46,6 +48,7 @@ type PrismicPluginComponentsOptions = {
|
|
|
46
48
|
* HTML tag names and components will be rendered using the `img` tag
|
|
47
49
|
* interface (`src` and `alt` attribute). Components will also receive an
|
|
48
50
|
* additional `copyright` props.
|
|
51
|
+
*
|
|
49
52
|
* @defaultValue `"img"`
|
|
50
53
|
*/
|
|
51
54
|
imageComponent?: string | ConcreteComponent | Raw<DefineComponent>;
|
|
@@ -56,6 +59,7 @@ type PrismicPluginComponentsOptions = {
|
|
|
56
59
|
* Consider configuring image widths within your content type definition and
|
|
57
60
|
* using `widths="auto"` instead to give content writers the ability to crop
|
|
58
61
|
* images in the editor.
|
|
62
|
+
*
|
|
59
63
|
* @defaultValue `@prismicio/client` defaults
|
|
60
64
|
*/
|
|
61
65
|
imageWidthSrcSetDefaults?: number[];
|
|
@@ -132,6 +136,7 @@ type PrismicPluginOptionsWithClient = PrismicPluginOptionsBase & {
|
|
|
132
136
|
* The client will be used by `@prismicio/vue` composables, such as
|
|
133
137
|
* {@link usePrismicDocuments} and exposed through `this.$prismic.client` and
|
|
134
138
|
* `usePrismic().client`.
|
|
139
|
+
*
|
|
135
140
|
* @see Prismic client documentation {@link https://prismic.io/docs/technologies/javascript}
|
|
136
141
|
*/
|
|
137
142
|
client: ReturnType<CreateClient>;
|
|
@@ -162,14 +167,15 @@ type PrismicPluginOptionsWithEndpoint = PrismicPluginOptionsBase & {
|
|
|
162
167
|
* Said client will be used by `@prismicio/vue` composables, such as
|
|
163
168
|
* {@link usePrismicDocuments} and exposed through `this.$prismic.client` and
|
|
164
169
|
* `usePrismic().client`.
|
|
170
|
+
*
|
|
165
171
|
* @example
|
|
166
172
|
*
|
|
167
173
|
* ```javascript
|
|
168
174
|
* // A repository ID
|
|
169
|
-
* "my-repo"
|
|
175
|
+
* "my-repo"
|
|
170
176
|
*
|
|
171
177
|
* //A full repository endpoint
|
|
172
|
-
* "https://my-repo.cdn.prismic.io/api/v2"
|
|
178
|
+
* "https://my-repo.cdn.prismic.io/api/v2"
|
|
173
179
|
* ```
|
|
174
180
|
*
|
|
175
181
|
* @see Prismic client documentation {@link https://prismic.io/docs/technologies/javascript}
|
|
@@ -266,6 +272,7 @@ export type PrismicPluginHelpers = {
|
|
|
266
272
|
* @remarks
|
|
267
273
|
* If no `htmlSerializer` is provided the function will use the one provided
|
|
268
274
|
* to the plugin at {@link PrismicPluginOptions.htmlSerializer} if available.
|
|
275
|
+
*
|
|
269
276
|
* @see Templating rich text and title fields {@link https://prismic.io/docs/technologies/vue-template-content#rich-text-and-titles}
|
|
270
277
|
*/
|
|
271
278
|
asHTML: typeof asHTML;
|
|
@@ -276,6 +283,7 @@ export type PrismicPluginHelpers = {
|
|
|
276
283
|
* @remarks
|
|
277
284
|
* If no `linkResolver` is provided the function will use the one provided to
|
|
278
285
|
* the plugin at {@link PrismicPluginOptions.linkResolver} if available.
|
|
286
|
+
*
|
|
279
287
|
* @see Templating link fields {@link https://prismic.io/docs/technologies/vue-template-content#links-and-content-relationships}
|
|
280
288
|
*/
|
|
281
289
|
asLink: typeof asLink;
|
|
@@ -286,6 +294,7 @@ export type PrismicPluginHelpers = {
|
|
|
286
294
|
* @remarks
|
|
287
295
|
* If no `linkResolver` is provided the function will use the one provided to
|
|
288
296
|
* the plugin at {@link PrismicPluginOptions.linkResolver} if available.
|
|
297
|
+
*
|
|
289
298
|
* @see Templating link fields {@link https://prismic.io/docs/technologies/vue-template-content#links-and-content-relationships}
|
|
290
299
|
*/
|
|
291
300
|
asLinkAttrs: typeof asLinkAttrs;
|
package/dist/usePrismic.cjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"usePrismic.cjs","sources":["../../src/usePrismic.ts"],"sourcesContent":["import { inject } from \"vue\"
|
|
1
|
+
{"version":3,"file":"usePrismic.cjs","sources":["../../src/usePrismic.ts"],"sourcesContent":["import { inject } from \"vue\"\n\nimport type { PrismicPlugin } from \"./types\"\n\nimport { prismicKey } from \"./injectionSymbols\"\n\n/**\n * Accesses `@prismicio/vue` plugin interface.\n *\n * @example\n *\n * ```javascript\n * // With the composition API\n * import { usePrismic } from \"@prismicio/vue\"\n *\n * export default {\n * \tsetup() {\n * \t\tconst prismic = usePrismic()\n *\n * \t\treturn {}\n * \t},\n * }\n * ```\n *\n * @returns The interface {@link PrismicPlugin}\n */\nexport const usePrismic = (): PrismicPlugin => {\n\treturn inject(prismicKey, { options: { endpoint: \"\" } } as PrismicPlugin)\n}\n"],"names":["inject","prismicKey"],"mappings":";;;;AA0BO,MAAM,aAAa,MAAoB;AACtC,SAAAA,IAAAA,OAAOC,iBAAAA,YAAY,EAAE,SAAS,EAAE,UAAU,GAAA,GAAuB;AACzE;;"}
|
package/dist/usePrismic.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { PrismicPlugin } from "./types";
|
|
1
|
+
import type { PrismicPlugin } from "./types";
|
|
2
2
|
/**
|
|
3
3
|
* Accesses `@prismicio/vue` plugin interface.
|
|
4
4
|
*
|
|
@@ -6,15 +6,15 @@ import { PrismicPlugin } from "./types";
|
|
|
6
6
|
*
|
|
7
7
|
* ```javascript
|
|
8
8
|
* // With the composition API
|
|
9
|
-
* import { usePrismic } from "@prismicio/vue"
|
|
9
|
+
* import { usePrismic } from "@prismicio/vue"
|
|
10
10
|
*
|
|
11
11
|
* export default {
|
|
12
12
|
* setup() {
|
|
13
|
-
* const prismic = usePrismic()
|
|
13
|
+
* const prismic = usePrismic()
|
|
14
14
|
*
|
|
15
|
-
* return {}
|
|
15
|
+
* return {}
|
|
16
16
|
* },
|
|
17
|
-
* }
|
|
17
|
+
* }
|
|
18
18
|
* ```
|
|
19
19
|
*
|
|
20
20
|
* @returns The interface {@link PrismicPlugin}
|
package/dist/usePrismic.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"usePrismic.js","sources":["../../src/usePrismic.ts"],"sourcesContent":["import { inject } from \"vue\"
|
|
1
|
+
{"version":3,"file":"usePrismic.js","sources":["../../src/usePrismic.ts"],"sourcesContent":["import { inject } from \"vue\"\n\nimport type { PrismicPlugin } from \"./types\"\n\nimport { prismicKey } from \"./injectionSymbols\"\n\n/**\n * Accesses `@prismicio/vue` plugin interface.\n *\n * @example\n *\n * ```javascript\n * // With the composition API\n * import { usePrismic } from \"@prismicio/vue\"\n *\n * export default {\n * \tsetup() {\n * \t\tconst prismic = usePrismic()\n *\n * \t\treturn {}\n * \t},\n * }\n * ```\n *\n * @returns The interface {@link PrismicPlugin}\n */\nexport const usePrismic = (): PrismicPlugin => {\n\treturn inject(prismicKey, { options: { endpoint: \"\" } } as PrismicPlugin)\n}\n"],"names":[],"mappings":";;AA0BO,MAAM,aAAa,MAAoB;AACtC,SAAA,OAAO,YAAY,EAAE,SAAS,EAAE,UAAU,GAAA,GAAuB;AACzE;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useStatefulPrismicClientMethod.cjs","sources":["../../src/useStatefulPrismicClientMethod.ts"],"sourcesContent":["import {\n\tClient,\n\tForbiddenError,\n\tParsingError,\n\tPrismicError,\n} from \"@prismicio/client\"
|
|
1
|
+
{"version":3,"file":"useStatefulPrismicClientMethod.cjs","sources":["../../src/useStatefulPrismicClientMethod.ts"],"sourcesContent":["import type {\n\tClient,\n\tForbiddenError,\n\tParsingError,\n\tPrismicError,\n} from \"@prismicio/client\"\nimport type { Ref } from \"vue\"\nimport { isRef, ref, shallowRef, unref, watch } from \"vue\"\n\nimport type { VueUseParameters } from \"./types\"\nimport { PrismicClientComposableState } from \"./types\"\n\nimport { usePrismic } from \"./usePrismic\"\n\n// Helpers\ntype UnwrapPromise<T> = T extends Promise<infer U> ? U : T\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\ntype ClientMethodLike = (...args: any[]) => Promise<any> | any\ntype ClientMethods = typeof Client.prototype\ntype ClientError = PrismicError<unknown> | ParsingError | ForbiddenError\n\n// Interfaces\n\n/**\n * @internal\n */\nexport type ClientMethodParameters<TMethodName extends keyof ClientMethods> =\n\tClientMethods[TMethodName] extends ClientMethodLike\n\t\t? VueUseParameters<Parameters<ClientMethods[TMethodName]>>\n\t\t: never\n\n/**\n * @internal\n */\nexport type ClientMethodReturnType<TMethodName extends keyof ClientMethods> =\n\tClientMethods[TMethodName] extends ClientMethodLike\n\t\t? ReturnType<ClientMethods[TMethodName]>\n\t\t: never\n\n/**\n * @internal\n */\nexport type ComposableOnlyParameters = {\n\tclient?: Ref<Client> | Client\n}\n\n/**\n * The return type of a `@prismicio/client` Vue composable.\n *\n * @typeParam TData - The expected format of the `data` property of the returned\n * object\n */\nexport type ClientComposableReturnType<TData = unknown> = {\n\t/**\n\t * The current state of the composable's client method call.\n\t */\n\tstate: Ref<PrismicClientComposableState>\n\n\t/**\n\t * Data returned by the client.\n\t */\n\tdata: Ref<TData | null>\n\n\t/**\n\t * Error returned by the composable's client method call if in an errror\n\t * state.\n\t */\n\terror: Ref<ClientError | Error | null>\n\n\t/**\n\t * Perform the composable's client method call again.\n\t */\n\trefresh: () => Promise<void>\n}\n\n/**\n * Determines if a value is a `@prismicio/client` params object.\n *\n * @param value - The value to check\n *\n * @returns `true` if `value` is a `@prismicio/client` params object, `false`\n * otherwise\n */\nconst isParams = (\n\tvalue: unknown,\n): value is ClientMethodParameters<\"get\">[0] & ComposableOnlyParameters => {\n\t// This is a *very* naive check.\n\treturn typeof value === \"object\" && value !== null && !Array.isArray(value)\n}\n\n/**\n * A low level Vue composable that uses provided method name on plugin or\n * provided client with given arguments. The composable has its own internal\n * state manager to report async status, such as pending or error statuses.\n *\n * @typeParam TClientMethodName - A method name from `@prismicio/client`\n * @typeParam TClientMethodArguments - The method expected arguments\n * @typeParam TClientMethodReturnType - The method expected return type\n *\n * @param method - The `@prismicio/client` method name to use\n * @param args - The arguments to use with requested method\n *\n * @returns The composable payload {@link ClientComposableReturnType}\n *\n * @internal\n */\nexport const useStatefulPrismicClientMethod = <\n\tTClientMethodName extends keyof ClientMethods,\n\tTClientMethodArguments extends ClientMethodParameters<TClientMethodName>,\n\tTClientMethodReturnType extends UnwrapPromise<\n\t\tClientMethodReturnType<TClientMethodName>\n\t>,\n>(\n\tmethodName: TClientMethodName,\n\targs: TClientMethodArguments,\n): ClientComposableReturnType<TClientMethodReturnType> => {\n\tconst { client } = usePrismic()\n\n\tconst state = ref<PrismicClientComposableState>(\n\t\tPrismicClientComposableState.Idle,\n\t)\n\tconst data = shallowRef<TClientMethodReturnType | null>(null)\n\tconst error = ref<ClientError | Error | null>(null)\n\tconst refresh = async (): Promise<void> => {\n\t\tconst lastArg = unref(args[args.length - 1])\n\t\tconst { client: explicitClient, ...params } = isParams(lastArg)\n\t\t\t? (lastArg as ClientMethodParameters<\"get\">[0] & ComposableOnlyParameters)\n\t\t\t: ({} as ComposableOnlyParameters)\n\t\tconst argsWithoutParams = isParams(lastArg) ? args.slice(0, -1) : args\n\n\t\tstate.value = PrismicClientComposableState.Pending\n\t\tdata.value = null\n\t\terror.value = null\n\t\ttry {\n\t\t\tdata.value = await (\n\t\t\t\t(unref(explicitClient) || client)[methodName] as ClientMethodLike\n\t\t\t)(\n\t\t\t\t...argsWithoutParams.map((arg: Ref<unknown> | unknown) => unref(arg)),\n\t\t\t\tparams,\n\t\t\t)\n\t\t\tstate.value = PrismicClientComposableState.Success\n\t\t} catch (err) {\n\t\t\tstate.value = PrismicClientComposableState.Error\n\t\t\terror.value = err as ClientError | Error\n\t\t}\n\t}\n\n\t// Watch reactive args\n\tconst refArgs = args.filter((arg) => isRef(arg))\n\tif (refArgs.length) {\n\t\twatch(refArgs, refresh, { deep: true })\n\t}\n\n\t// Fetch once\n\trefresh()\n\n\treturn { state, data, error, refresh }\n}\n"],"names":["usePrismic","ref","shallowRef","unref","isRef","watch"],"mappings":";;;;AAmFA,MAAM,WAAW,CAChB,UACyE;AAElE,SAAA,OAAO,UAAU,YAAY,UAAU,QAAQ,CAAC,MAAM,QAAQ,KAAK;AAC3E;AAkBa,MAAA,iCAAiC,CAO7C,YACA,SACwD;AAClD,QAAA,EAAE,OAAM,IAAKA;AAEnB,QAAM,QAAQC,IAAA;AAAA,IAAG;AAAA;AAAA,EAAA;AAGX,QAAA,OAAOC,eAA2C,IAAI;AACtD,QAAA,QAAQD,QAAgC,IAAI;AAClD,QAAM,UAAU,YAA0B;AACzC,UAAM,UAAUE,IAAAA,MAAM,KAAK,KAAK,SAAS,CAAC,CAAC;AACrC,UAAA,EAAE,QAAQ,gBAAgB,GAAG,WAAW,SAAS,OAAO,IAC1D,UACA;AACE,UAAA,oBAAoB,SAAS,OAAO,IAAI,KAAK,MAAM,GAAG,EAAE,IAAI;AAElE,UAAM,QAAK;AACX,SAAK,QAAQ;AACb,UAAM,QAAQ;AACV,QAAA;AACH,WAAK,QAAQ,OACXA,IAAA,MAAM,cAAc,KAAK,QAAQ,UAAU,EAE5C,GAAG,kBAAkB,IAAI,CAAC,QAAgCA,UAAM,GAAG,CAAC,GACpE,MAAM;AAEP,YAAM,QAAK;AAAA,aACH,KAAK;AACb,YAAM,QAAK;AACX,YAAM,QAAQ;AAAA,IAAA;AAAA,EAEhB;AAGA,QAAM,UAAU,KAAK,OAAO,CAAC,QAAQC,IAAAA,MAAM,GAAG,CAAC;AAC/C,MAAI,QAAQ,QAAQ;AACnBC,QAAAA,MAAM,SAAS,SAAS,EAAE,MAAM,MAAM;AAAA,EAAA;;AAMvC,SAAO,EAAE,OAAO,MAAM,OAAO,QAAO;AACrC;;"}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import { Client, ForbiddenError, ParsingError, PrismicError } from "@prismicio/client";
|
|
2
|
-
import { Ref } from "vue";
|
|
3
|
-
import {
|
|
1
|
+
import type { Client, ForbiddenError, ParsingError, PrismicError } from "@prismicio/client";
|
|
2
|
+
import type { Ref } from "vue";
|
|
3
|
+
import type { VueUseParameters } from "./types";
|
|
4
|
+
import { PrismicClientComposableState } from "./types";
|
|
4
5
|
type UnwrapPromise<T> = T extends Promise<infer U> ? U : T;
|
|
5
6
|
type ClientMethodLike = (...args: any[]) => Promise<any> | any;
|
|
6
7
|
type ClientMethods = typeof Client.prototype;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useStatefulPrismicClientMethod.js","sources":["../../src/useStatefulPrismicClientMethod.ts"],"sourcesContent":["import {\n\tClient,\n\tForbiddenError,\n\tParsingError,\n\tPrismicError,\n} from \"@prismicio/client\"
|
|
1
|
+
{"version":3,"file":"useStatefulPrismicClientMethod.js","sources":["../../src/useStatefulPrismicClientMethod.ts"],"sourcesContent":["import type {\n\tClient,\n\tForbiddenError,\n\tParsingError,\n\tPrismicError,\n} from \"@prismicio/client\"\nimport type { Ref } from \"vue\"\nimport { isRef, ref, shallowRef, unref, watch } from \"vue\"\n\nimport type { VueUseParameters } from \"./types\"\nimport { PrismicClientComposableState } from \"./types\"\n\nimport { usePrismic } from \"./usePrismic\"\n\n// Helpers\ntype UnwrapPromise<T> = T extends Promise<infer U> ? U : T\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\ntype ClientMethodLike = (...args: any[]) => Promise<any> | any\ntype ClientMethods = typeof Client.prototype\ntype ClientError = PrismicError<unknown> | ParsingError | ForbiddenError\n\n// Interfaces\n\n/**\n * @internal\n */\nexport type ClientMethodParameters<TMethodName extends keyof ClientMethods> =\n\tClientMethods[TMethodName] extends ClientMethodLike\n\t\t? VueUseParameters<Parameters<ClientMethods[TMethodName]>>\n\t\t: never\n\n/**\n * @internal\n */\nexport type ClientMethodReturnType<TMethodName extends keyof ClientMethods> =\n\tClientMethods[TMethodName] extends ClientMethodLike\n\t\t? ReturnType<ClientMethods[TMethodName]>\n\t\t: never\n\n/**\n * @internal\n */\nexport type ComposableOnlyParameters = {\n\tclient?: Ref<Client> | Client\n}\n\n/**\n * The return type of a `@prismicio/client` Vue composable.\n *\n * @typeParam TData - The expected format of the `data` property of the returned\n * object\n */\nexport type ClientComposableReturnType<TData = unknown> = {\n\t/**\n\t * The current state of the composable's client method call.\n\t */\n\tstate: Ref<PrismicClientComposableState>\n\n\t/**\n\t * Data returned by the client.\n\t */\n\tdata: Ref<TData | null>\n\n\t/**\n\t * Error returned by the composable's client method call if in an errror\n\t * state.\n\t */\n\terror: Ref<ClientError | Error | null>\n\n\t/**\n\t * Perform the composable's client method call again.\n\t */\n\trefresh: () => Promise<void>\n}\n\n/**\n * Determines if a value is a `@prismicio/client` params object.\n *\n * @param value - The value to check\n *\n * @returns `true` if `value` is a `@prismicio/client` params object, `false`\n * otherwise\n */\nconst isParams = (\n\tvalue: unknown,\n): value is ClientMethodParameters<\"get\">[0] & ComposableOnlyParameters => {\n\t// This is a *very* naive check.\n\treturn typeof value === \"object\" && value !== null && !Array.isArray(value)\n}\n\n/**\n * A low level Vue composable that uses provided method name on plugin or\n * provided client with given arguments. The composable has its own internal\n * state manager to report async status, such as pending or error statuses.\n *\n * @typeParam TClientMethodName - A method name from `@prismicio/client`\n * @typeParam TClientMethodArguments - The method expected arguments\n * @typeParam TClientMethodReturnType - The method expected return type\n *\n * @param method - The `@prismicio/client` method name to use\n * @param args - The arguments to use with requested method\n *\n * @returns The composable payload {@link ClientComposableReturnType}\n *\n * @internal\n */\nexport const useStatefulPrismicClientMethod = <\n\tTClientMethodName extends keyof ClientMethods,\n\tTClientMethodArguments extends ClientMethodParameters<TClientMethodName>,\n\tTClientMethodReturnType extends UnwrapPromise<\n\t\tClientMethodReturnType<TClientMethodName>\n\t>,\n>(\n\tmethodName: TClientMethodName,\n\targs: TClientMethodArguments,\n): ClientComposableReturnType<TClientMethodReturnType> => {\n\tconst { client } = usePrismic()\n\n\tconst state = ref<PrismicClientComposableState>(\n\t\tPrismicClientComposableState.Idle,\n\t)\n\tconst data = shallowRef<TClientMethodReturnType | null>(null)\n\tconst error = ref<ClientError | Error | null>(null)\n\tconst refresh = async (): Promise<void> => {\n\t\tconst lastArg = unref(args[args.length - 1])\n\t\tconst { client: explicitClient, ...params } = isParams(lastArg)\n\t\t\t? (lastArg as ClientMethodParameters<\"get\">[0] & ComposableOnlyParameters)\n\t\t\t: ({} as ComposableOnlyParameters)\n\t\tconst argsWithoutParams = isParams(lastArg) ? args.slice(0, -1) : args\n\n\t\tstate.value = PrismicClientComposableState.Pending\n\t\tdata.value = null\n\t\terror.value = null\n\t\ttry {\n\t\t\tdata.value = await (\n\t\t\t\t(unref(explicitClient) || client)[methodName] as ClientMethodLike\n\t\t\t)(\n\t\t\t\t...argsWithoutParams.map((arg: Ref<unknown> | unknown) => unref(arg)),\n\t\t\t\tparams,\n\t\t\t)\n\t\t\tstate.value = PrismicClientComposableState.Success\n\t\t} catch (err) {\n\t\t\tstate.value = PrismicClientComposableState.Error\n\t\t\terror.value = err as ClientError | Error\n\t\t}\n\t}\n\n\t// Watch reactive args\n\tconst refArgs = args.filter((arg) => isRef(arg))\n\tif (refArgs.length) {\n\t\twatch(refArgs, refresh, { deep: true })\n\t}\n\n\t// Fetch once\n\trefresh()\n\n\treturn { state, data, error, refresh }\n}\n"],"names":[],"mappings":";;AAmFA,MAAM,WAAW,CAChB,UACyE;AAElE,SAAA,OAAO,UAAU,YAAY,UAAU,QAAQ,CAAC,MAAM,QAAQ,KAAK;AAC3E;AAkBa,MAAA,iCAAiC,CAO7C,YACA,SACwD;AAClD,QAAA,EAAE,OAAM,IAAK;AAEnB,QAAM,QAAQ;AAAA,IAAG;AAAA;AAAA,EAAA;AAGX,QAAA,OAAO,WAA2C,IAAI;AACtD,QAAA,QAAQ,IAAgC,IAAI;AAClD,QAAM,UAAU,YAA0B;AACzC,UAAM,UAAU,MAAM,KAAK,KAAK,SAAS,CAAC,CAAC;AACrC,UAAA,EAAE,QAAQ,gBAAgB,GAAG,WAAW,SAAS,OAAO,IAC1D,UACA;AACE,UAAA,oBAAoB,SAAS,OAAO,IAAI,KAAK,MAAM,GAAG,EAAE,IAAI;AAElE,UAAM,QAAK;AACX,SAAK,QAAQ;AACb,UAAM,QAAQ;AACV,QAAA;AACH,WAAK,QAAQ,OACX,MAAM,cAAc,KAAK,QAAQ,UAAU,EAE5C,GAAG,kBAAkB,IAAI,CAAC,QAAgC,MAAM,GAAG,CAAC,GACpE,MAAM;AAEP,YAAM,QAAK;AAAA,aACH,KAAK;AACb,YAAM,QAAK;AACX,YAAM,QAAQ;AAAA,IAAA;AAAA,EAEhB;AAGA,QAAM,UAAU,KAAK,OAAO,CAAC,QAAQ,MAAM,GAAG,CAAC;AAC/C,MAAI,QAAQ,QAAQ;AACnB,UAAM,SAAS,SAAS,EAAE,MAAM,MAAM;AAAA,EAAA;;AAMvC,SAAO,EAAE,OAAO,MAAM,OAAO,QAAO;AACrC;"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@prismicio/vue",
|
|
3
|
-
"version": "4.
|
|
3
|
+
"version": "4.3.1",
|
|
4
4
|
"description": "Vue plugin, components, and composables to fetch and present Prismic content",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"typescript",
|
|
@@ -48,47 +48,46 @@
|
|
|
48
48
|
"release:dry": "standard-version --dry-run",
|
|
49
49
|
"release:beta": "npm run test && standard-version --release-as major --prerelease beta && git push --follow-tags && npm run build && npm publish --tag beta",
|
|
50
50
|
"release:beta:dry": "standard-version --release-as major --prerelease beta --dry-run",
|
|
51
|
-
"lint": "eslint
|
|
52
|
-
"types": "vitest typecheck --run && tsc --noEmit",
|
|
53
|
-
"types:watch": "vitest typecheck",
|
|
51
|
+
"lint": "eslint",
|
|
52
|
+
"types": "vitest --typecheck.only --run && tsc --noEmit",
|
|
53
|
+
"types:watch": "vitest --typecheck.only",
|
|
54
54
|
"unit": "vitest run --coverage",
|
|
55
55
|
"unit:watch": "vitest watch",
|
|
56
56
|
"size": "size-limit",
|
|
57
57
|
"test": "npm run lint && npm run types && npm run unit && npm run build && npm run size"
|
|
58
58
|
},
|
|
59
59
|
"dependencies": {
|
|
60
|
-
"@prismicio/client": "^7.
|
|
60
|
+
"@prismicio/client": "^7.12.0",
|
|
61
61
|
"isomorphic-unfetch": "^3.1.0",
|
|
62
|
-
"vue-router": "^4.
|
|
62
|
+
"vue-router": "^4.5.0"
|
|
63
63
|
},
|
|
64
64
|
"devDependencies": {
|
|
65
|
-
"@
|
|
66
|
-
"@
|
|
65
|
+
"@eslint/js": "^9.16.0",
|
|
66
|
+
"@prismicio/mock": "^0.4.0",
|
|
67
|
+
"@size-limit/preset-small-lib": "^11.1.6",
|
|
67
68
|
"@trivago/prettier-plugin-sort-imports": "^4.3.0",
|
|
68
69
|
"@types/jsdom-global": "^3.0.7",
|
|
69
|
-
"@
|
|
70
|
-
"@
|
|
71
|
-
"@
|
|
72
|
-
"@
|
|
73
|
-
"
|
|
74
|
-
"
|
|
75
|
-
"
|
|
76
|
-
"eslint": "^
|
|
77
|
-
"eslint-
|
|
78
|
-
"
|
|
79
|
-
"eslint-plugin-tsdoc": "^0.2.17",
|
|
80
|
-
"eslint-plugin-vue": "^9.24.0",
|
|
81
|
-
"jsdom": "^24.0.0",
|
|
70
|
+
"@vitejs/plugin-vue": "^5.2.1",
|
|
71
|
+
"@vitest/coverage-v8": "^2.1.8",
|
|
72
|
+
"@vue/eslint-config-typescript": "^14.1.4",
|
|
73
|
+
"@vue/test-utils": "^2.4.6",
|
|
74
|
+
"eslint": "^9.16.0",
|
|
75
|
+
"eslint-config-prettier": "^9.1.0",
|
|
76
|
+
"eslint-plugin-prettier": "^5.2.1",
|
|
77
|
+
"eslint-plugin-tsdoc": "^0.4.0",
|
|
78
|
+
"eslint-plugin-vue": "^9.32.0",
|
|
79
|
+
"jsdom": "^25.0.1",
|
|
82
80
|
"jsdom-global": "^3.0.2",
|
|
83
|
-
"prettier": "^
|
|
84
|
-
"prettier-plugin-jsdoc": "^
|
|
85
|
-
"size-limit": "^
|
|
81
|
+
"prettier": "^3.4.1",
|
|
82
|
+
"prettier-plugin-jsdoc": "^1.3.0",
|
|
83
|
+
"size-limit": "^11.1.6",
|
|
86
84
|
"standard-version": "^9.5.0",
|
|
87
|
-
"typescript": "^5.
|
|
88
|
-
"
|
|
89
|
-
"vite
|
|
90
|
-
"
|
|
91
|
-
"
|
|
85
|
+
"typescript": "^5.7.2",
|
|
86
|
+
"typescript-eslint": "^8.17.0",
|
|
87
|
+
"vite": "^6.0.2",
|
|
88
|
+
"vite-plugin-sdk": "^0.1.3",
|
|
89
|
+
"vitest": "^2.1.8",
|
|
90
|
+
"vue": "^3.5.13"
|
|
92
91
|
},
|
|
93
92
|
"peerDependencies": {
|
|
94
93
|
"vue": "^3.0.0"
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { EmbedField } from "@prismicio/client"
|
|
2
|
-
import {
|
|
1
|
+
import type { EmbedField } from "@prismicio/client"
|
|
2
|
+
import type {
|
|
3
3
|
AllowedComponentProps,
|
|
4
4
|
ComponentCustomProps,
|
|
5
5
|
ConcreteComponent,
|
|
@@ -7,16 +7,15 @@ import {
|
|
|
7
7
|
PropType,
|
|
8
8
|
Raw,
|
|
9
9
|
VNodeProps,
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
} from "vue";
|
|
10
|
+
} from "vue"
|
|
11
|
+
import { defineComponent, h } from "vue"
|
|
13
12
|
|
|
14
|
-
import { simplyResolveComponent } from "../lib/simplyResolveComponent"
|
|
13
|
+
import { simplyResolveComponent } from "../lib/simplyResolveComponent"
|
|
15
14
|
|
|
16
15
|
/**
|
|
17
16
|
* The default component rendered to wrap the embed.
|
|
18
17
|
*/
|
|
19
|
-
const defaultWrapper = "div"
|
|
18
|
+
const defaultWrapper = "div"
|
|
20
19
|
|
|
21
20
|
/**
|
|
22
21
|
* Props for `<PrismicEmbed />`.
|
|
@@ -25,7 +24,7 @@ export type PrismicEmbedProps = {
|
|
|
25
24
|
/**
|
|
26
25
|
* The Prismic embed field to render.
|
|
27
26
|
*/
|
|
28
|
-
field: EmbedField
|
|
27
|
+
field: EmbedField
|
|
29
28
|
|
|
30
29
|
/**
|
|
31
30
|
* An HTML tag name, a component, or a functional component used to wrap the
|
|
@@ -33,8 +32,8 @@ export type PrismicEmbedProps = {
|
|
|
33
32
|
*
|
|
34
33
|
* @defaultValue `"div"`
|
|
35
34
|
*/
|
|
36
|
-
wrapper?: string | ConcreteComponent | Raw<DefineComponent
|
|
37
|
-
}
|
|
35
|
+
wrapper?: string | ConcreteComponent | Raw<DefineComponent>
|
|
36
|
+
}
|
|
38
37
|
|
|
39
38
|
/**
|
|
40
39
|
* `<PrismicEmbed />` implementation.
|
|
@@ -59,7 +58,7 @@ export const PrismicEmbedImpl = /*#__PURE__*/ defineComponent({
|
|
|
59
58
|
setup(props) {
|
|
60
59
|
// Prevent fatal if user didn't check for field, throws `Invalid prop` warn
|
|
61
60
|
if (!props.field) {
|
|
62
|
-
return () => null
|
|
61
|
+
return () => null
|
|
63
62
|
}
|
|
64
63
|
|
|
65
64
|
return () => {
|
|
@@ -68,10 +67,10 @@ export const PrismicEmbedImpl = /*#__PURE__*/ defineComponent({
|
|
|
68
67
|
"data-oembed-type": props.field.type,
|
|
69
68
|
"data-oembed-provider": props.field.provider_name,
|
|
70
69
|
innerHTML: props.field.html || null,
|
|
71
|
-
})
|
|
72
|
-
}
|
|
70
|
+
})
|
|
71
|
+
}
|
|
73
72
|
},
|
|
74
|
-
})
|
|
73
|
+
})
|
|
75
74
|
|
|
76
75
|
// export the public type for h/tsx inference
|
|
77
76
|
// also to avoid inline import() in generated d.ts files
|
|
@@ -86,6 +85,6 @@ export const PrismicEmbed = PrismicEmbedImpl as unknown as {
|
|
|
86
85
|
$props: AllowedComponentProps &
|
|
87
86
|
ComponentCustomProps &
|
|
88
87
|
VNodeProps &
|
|
89
|
-
PrismicEmbedProps
|
|
90
|
-
}
|
|
91
|
-
}
|
|
88
|
+
PrismicEmbedProps
|
|
89
|
+
}
|
|
90
|
+
}
|