@prismicio/vue 6.1.3 → 6.1.4-pr.98.764fac2
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.cjs.map +1 -1
- package/dist/PrismicImage.js.map +1 -1
- package/dist/PrismicImage.vue.d.cts +14 -11
- package/dist/PrismicImage.vue.d.cts.map +1 -1
- package/dist/PrismicImage.vue.d.ts +14 -11
- package/dist/PrismicImage.vue.d.ts.map +1 -1
- package/dist/PrismicImage.vue_vue_type_script_setup_true_lang.cjs +1 -1
- package/dist/PrismicImage.vue_vue_type_script_setup_true_lang.cjs.map +1 -1
- package/dist/PrismicImage.vue_vue_type_script_setup_true_lang.js +1 -1
- package/dist/PrismicImage.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/PrismicLink.cjs.map +1 -1
- package/dist/PrismicLink.js.map +1 -1
- package/dist/PrismicLink.vue.d.cts +17 -13
- package/dist/PrismicLink.vue.d.cts.map +1 -1
- package/dist/PrismicLink.vue.d.ts +17 -13
- package/dist/PrismicLink.vue.d.ts.map +1 -1
- package/dist/PrismicLink.vue_vue_type_script_setup_true_lang.cjs +3 -3
- package/dist/PrismicLink.vue_vue_type_script_setup_true_lang.cjs.map +1 -1
- package/dist/PrismicLink.vue_vue_type_script_setup_true_lang.js +3 -3
- package/dist/PrismicLink.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/PrismicRichText/PrismicRichText.cjs.map +1 -1
- package/dist/PrismicRichText/PrismicRichText.js.map +1 -1
- package/dist/PrismicRichText/PrismicRichText.vue.d.cts +8 -9
- package/dist/PrismicRichText/PrismicRichText.vue.d.cts.map +1 -1
- package/dist/PrismicRichText/PrismicRichText.vue.d.ts +7 -8
- package/dist/PrismicRichText/PrismicRichText.vue.d.ts.map +1 -1
- package/dist/PrismicRichText/PrismicRichText.vue_vue_type_script_setup_true_lang.cjs +1 -1
- package/dist/PrismicRichText/PrismicRichText.vue_vue_type_script_setup_true_lang.cjs.map +1 -1
- package/dist/PrismicRichText/PrismicRichText.vue_vue_type_script_setup_true_lang.js +1 -1
- package/dist/PrismicRichText/PrismicRichText.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/PrismicRichText/PrismicRichTextDefaultComponent.vue_vue_type_script_setup_true_lang.cjs +1 -1
- package/dist/PrismicRichText/PrismicRichTextDefaultComponent.vue_vue_type_script_setup_true_lang.cjs.map +1 -1
- package/dist/PrismicRichText/PrismicRichTextDefaultComponent.vue_vue_type_script_setup_true_lang.js +1 -1
- package/dist/PrismicRichText/PrismicRichTextDefaultComponent.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/PrismicRichText/PrismicRichTextSerialize.vue_vue_type_script_setup_true_lang.cjs +1 -1
- package/dist/PrismicRichText/PrismicRichTextSerialize.vue_vue_type_script_setup_true_lang.cjs.map +1 -1
- package/dist/PrismicRichText/PrismicRichTextSerialize.vue_vue_type_script_setup_true_lang.js +1 -1
- package/dist/PrismicRichText/PrismicRichTextSerialize.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/PrismicRichText/getRichTextComponentProps.cjs +2 -2
- package/dist/PrismicRichText/getRichTextComponentProps.cjs.map +1 -1
- package/dist/PrismicRichText/getRichTextComponentProps.d.cts +3 -4
- package/dist/PrismicRichText/getRichTextComponentProps.d.cts.map +1 -1
- package/dist/PrismicRichText/getRichTextComponentProps.d.ts +2 -3
- package/dist/PrismicRichText/getRichTextComponentProps.d.ts.map +1 -1
- package/dist/PrismicRichText/getRichTextComponentProps.js +2 -2
- package/dist/PrismicRichText/getRichTextComponentProps.js.map +1 -1
- package/dist/PrismicRichText/index.d.cts +2 -1
- package/dist/PrismicRichText/index.d.ts +2 -1
- package/dist/PrismicRichText/types.d.cts +1 -2
- package/dist/PrismicRichText/types.d.cts.map +1 -1
- package/dist/PrismicRichText/types.d.ts +1 -2
- package/dist/PrismicRichText/types.d.ts.map +1 -1
- package/dist/PrismicTable/PrismicTable.cjs.map +1 -1
- package/dist/PrismicTable/PrismicTable.js.map +1 -1
- package/dist/PrismicTable/PrismicTable.vue.d.cts +6 -6
- package/dist/PrismicTable/PrismicTable.vue.d.cts.map +1 -1
- package/dist/PrismicTable/PrismicTable.vue.d.ts +6 -6
- package/dist/PrismicTable/PrismicTable.vue.d.ts.map +1 -1
- package/dist/PrismicTable/PrismicTable.vue_vue_type_script_setup_true_lang.cjs +1 -1
- package/dist/PrismicTable/PrismicTable.vue_vue_type_script_setup_true_lang.cjs.map +1 -1
- package/dist/PrismicTable/PrismicTable.vue_vue_type_script_setup_true_lang.js +1 -1
- package/dist/PrismicTable/PrismicTable.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/PrismicTable/PrismicTableDefaultComponents.cjs.map +1 -1
- package/dist/PrismicTable/PrismicTableDefaultComponents.js.map +1 -1
- package/dist/PrismicTable/PrismicTableRow.vue_vue_type_script_setup_true_lang.cjs +1 -1
- package/dist/PrismicTable/PrismicTableRow.vue_vue_type_script_setup_true_lang.cjs.map +1 -1
- package/dist/PrismicTable/PrismicTableRow.vue_vue_type_script_setup_true_lang.js +1 -1
- package/dist/PrismicTable/PrismicTableRow.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/PrismicTable/getTableComponentProps.cjs +6 -6
- package/dist/PrismicTable/getTableComponentProps.cjs.map +1 -1
- package/dist/PrismicTable/getTableComponentProps.d.cts +8 -10
- package/dist/PrismicTable/getTableComponentProps.d.cts.map +1 -1
- package/dist/PrismicTable/getTableComponentProps.d.ts +7 -9
- package/dist/PrismicTable/getTableComponentProps.d.ts.map +1 -1
- package/dist/PrismicTable/getTableComponentProps.js +6 -6
- package/dist/PrismicTable/getTableComponentProps.js.map +1 -1
- package/dist/PrismicTable/index.d.cts +2 -1
- package/dist/PrismicTable/index.d.ts +2 -1
- package/dist/PrismicTable/types.d.cts +0 -1
- package/dist/PrismicTable/types.d.cts.map +1 -1
- package/dist/PrismicTable/types.d.ts +0 -1
- package/dist/PrismicTable/types.d.ts.map +1 -1
- package/dist/PrismicText.vue.d.cts +4 -5
- package/dist/PrismicText.vue.d.cts.map +1 -1
- package/dist/PrismicText.vue.d.ts +4 -5
- package/dist/PrismicText.vue.d.ts.map +1 -1
- package/dist/PrismicText.vue_vue_type_script_setup_true_lang.cjs +1 -1
- package/dist/PrismicText.vue_vue_type_script_setup_true_lang.cjs.map +1 -1
- package/dist/PrismicText.vue_vue_type_script_setup_true_lang.js +1 -1
- package/dist/PrismicText.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/SliceSimulator.vue.d.cts +14 -15
- package/dist/SliceSimulator.vue.d.cts.map +1 -1
- package/dist/SliceSimulator.vue.d.ts +14 -15
- package/dist/SliceSimulator.vue.d.ts.map +1 -1
- package/dist/SliceSimulator.vue_vue_type_script_setup_true_lang.cjs +1 -1
- package/dist/SliceSimulator.vue_vue_type_script_setup_true_lang.cjs.map +1 -1
- package/dist/SliceSimulator.vue_vue_type_script_setup_true_lang.js +1 -1
- package/dist/SliceSimulator.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/SliceZone/SliceZone.vue.d.cts +9 -7
- package/dist/SliceZone/SliceZone.vue.d.cts.map +1 -1
- package/dist/SliceZone/SliceZone.vue.d.ts +9 -7
- package/dist/SliceZone/SliceZone.vue.d.ts.map +1 -1
- package/dist/SliceZone/SliceZone.vue_vue_type_script_setup_true_lang.cjs +1 -1
- package/dist/SliceZone/SliceZone.vue_vue_type_script_setup_true_lang.cjs.map +1 -1
- package/dist/SliceZone/SliceZone.vue_vue_type_script_setup_true_lang.js +1 -1
- package/dist/SliceZone/SliceZone.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/SliceZone/TODOSliceComponent.cjs.map +1 -1
- package/dist/SliceZone/TODOSliceComponent.d.cts +0 -1
- package/dist/SliceZone/TODOSliceComponent.d.cts.map +1 -1
- package/dist/SliceZone/TODOSliceComponent.d.ts +0 -1
- package/dist/SliceZone/TODOSliceComponent.d.ts.map +1 -1
- package/dist/SliceZone/TODOSliceComponent.js.map +1 -1
- package/dist/SliceZone/defineSliceZoneComponents.cjs +1 -1
- package/dist/SliceZone/defineSliceZoneComponents.cjs.map +1 -1
- package/dist/SliceZone/defineSliceZoneComponents.d.cts +1 -2
- package/dist/SliceZone/defineSliceZoneComponents.d.cts.map +1 -1
- package/dist/SliceZone/defineSliceZoneComponents.d.ts +1 -2
- package/dist/SliceZone/defineSliceZoneComponents.d.ts.map +1 -1
- package/dist/SliceZone/defineSliceZoneComponents.js +1 -1
- package/dist/SliceZone/defineSliceZoneComponents.js.map +1 -1
- package/dist/SliceZone/getSliceComponentProps.cjs +2 -2
- package/dist/SliceZone/getSliceComponentProps.cjs.map +1 -1
- package/dist/SliceZone/getSliceComponentProps.d.cts +2 -3
- package/dist/SliceZone/getSliceComponentProps.d.cts.map +1 -1
- package/dist/SliceZone/getSliceComponentProps.d.ts +2 -3
- package/dist/SliceZone/getSliceComponentProps.d.ts.map +1 -1
- package/dist/SliceZone/getSliceComponentProps.js +2 -2
- package/dist/SliceZone/getSliceComponentProps.js.map +1 -1
- package/dist/SliceZone/index.d.cts +2 -1
- package/dist/SliceZone/index.d.ts +2 -1
- package/dist/SliceZone/types.d.cts +8 -5
- package/dist/SliceZone/types.d.cts.map +1 -1
- package/dist/SliceZone/types.d.ts +8 -5
- package/dist/SliceZone/types.d.ts.map +1 -1
- package/dist/createPrismic.cjs +1 -1
- package/dist/createPrismic.cjs.map +1 -1
- package/dist/createPrismic.d.cts +18 -9
- package/dist/createPrismic.d.cts.map +1 -1
- package/dist/createPrismic.d.ts +17 -8
- package/dist/createPrismic.d.ts.map +1 -1
- package/dist/createPrismic.js +1 -1
- package/dist/createPrismic.js.map +1 -1
- package/dist/index.cjs +7 -7
- package/dist/index.d.cts +10 -7
- package/dist/index.d.ts +10 -7
- package/dist/lib/devMsg.cjs +1 -1
- package/dist/lib/devMsg.cjs.map +1 -1
- package/dist/lib/devMsg.js +1 -1
- package/dist/lib/devMsg.js.map +1 -1
- package/dist/lib/isInternalURL.cjs.map +1 -1
- package/dist/lib/isInternalURL.js.map +1 -1
- package/dist/package.cjs +1 -1
- package/dist/package.js +1 -1
- package/dist/types.cjs.map +1 -1
- package/dist/types.d.cts +3 -2
- package/dist/types.d.cts.map +1 -1
- package/dist/types.d.ts +3 -2
- package/dist/types.d.ts.map +1 -1
- package/dist/types.js.map +1 -1
- package/package.json +17 -17
- package/src/PrismicImage.vue +1 -1
- package/src/PrismicLink.vue +2 -2
- package/src/PrismicRichText/PrismicRichText.vue +1 -1
- package/src/PrismicRichText/getRichTextComponentProps.ts +2 -2
- package/src/PrismicTable/PrismicTable.vue +1 -1
- package/src/PrismicTable/getTableComponentProps.ts +6 -6
- package/src/SliceZone/defineSliceZoneComponents.ts +1 -1
- package/src/SliceZone/getSliceComponentProps.ts +2 -2
- package/src/createPrismic.ts +1 -1
- package/src/lib/devMsg.ts +1 -1
package/dist/createPrismic.d.cts
CHANGED
|
@@ -1,13 +1,16 @@
|
|
|
1
1
|
import { ComponentOrTagName } from "./types.cjs";
|
|
2
2
|
import { RichTextComponents } from "./PrismicRichText/types.cjs";
|
|
3
|
+
import "./PrismicRichText/index.cjs";
|
|
3
4
|
import { TableComponents } from "./PrismicTable/types.cjs";
|
|
4
|
-
import
|
|
5
|
+
import "./PrismicTable/index.cjs";
|
|
5
6
|
import { CreateClient, LinkResolverFunction, isFilled } from "@prismicio/client";
|
|
6
|
-
|
|
7
|
+
import { App } from "vue";
|
|
7
8
|
//#region src/createPrismic.d.ts
|
|
8
9
|
/** Components configuration. */
|
|
9
10
|
type ComponentsConfig = {
|
|
10
|
-
/** The default component rendered for internal URLs. */
|
|
11
|
+
/** The default component rendered for internal URLs. */
|
|
12
|
+
linkInternalComponent?: ComponentOrTagName;
|
|
13
|
+
/** The default component rendered for external URLs. */
|
|
11
14
|
linkExternalComponent?: ComponentOrTagName;
|
|
12
15
|
/**
|
|
13
16
|
* The default components or shorthand definitions for rich text and table components.
|
|
@@ -19,26 +22,32 @@ type ComponentsConfig = {
|
|
|
19
22
|
};
|
|
20
23
|
/** Prismic Vue plugin configuration. */
|
|
21
24
|
type PrismicPluginConfig = {
|
|
22
|
-
/** A Prismic client instance to inject into the Vue app. */
|
|
25
|
+
/** A Prismic client instance to inject into the Vue app. */
|
|
26
|
+
client: ReturnType<CreateClient>;
|
|
23
27
|
/**
|
|
24
28
|
* A default link resolver used to resolve links when route resolvers cannot be used.
|
|
25
29
|
*
|
|
26
30
|
* @see {@link https://prismic.io/docs/routes}
|
|
27
31
|
*/
|
|
28
|
-
linkResolver?: LinkResolverFunction;
|
|
32
|
+
linkResolver?: LinkResolverFunction;
|
|
33
|
+
/** Components configuration. */
|
|
29
34
|
components?: ComponentsConfig;
|
|
30
35
|
};
|
|
31
36
|
/** Prismic Vue plugin interface accessible through `usePrismic()` and `$prismic`. */
|
|
32
37
|
type PrismicPlugin = {
|
|
33
|
-
/** A Prismic client that can be used to query content from a repository. */
|
|
38
|
+
/** A Prismic client that can be used to query content from a repository. */
|
|
39
|
+
client: ReturnType<CreateClient>;
|
|
40
|
+
/** Helpers to determine if a field is filled. */
|
|
34
41
|
isFilled: typeof isFilled;
|
|
35
42
|
/**
|
|
36
43
|
* The default link resolver used to resolve links when route resolvers cannot be used.
|
|
37
44
|
*
|
|
38
45
|
* @see {@link https://prismic.io/docs/routes}
|
|
39
46
|
*/
|
|
40
|
-
linkResolver?: LinkResolverFunction;
|
|
41
|
-
|
|
47
|
+
linkResolver?: LinkResolverFunction;
|
|
48
|
+
/** @internal */
|
|
49
|
+
readonly components: ComponentsConfig;
|
|
50
|
+
/** @internal */
|
|
42
51
|
install: (app: App) => void;
|
|
43
52
|
};
|
|
44
53
|
/** Creates a Prismic Vue plugin instance that can be used by a Vue app. */
|
|
@@ -47,7 +56,7 @@ declare const createPrismic: (config: PrismicPluginConfig) => PrismicPlugin;
|
|
|
47
56
|
* Access the Prismic Vue plugin interface.
|
|
48
57
|
*
|
|
49
58
|
* @example
|
|
50
|
-
*
|
|
59
|
+
* ```typescript
|
|
51
60
|
* const { client, isFilled } = usePrismic()
|
|
52
61
|
* ```
|
|
53
62
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"createPrismic.d.cts","names":[],"sources":["../src/createPrismic.ts"],"mappings":"
|
|
1
|
+
{"version":3,"file":"createPrismic.d.cts","names":[],"sources":["../src/createPrismic.ts"],"mappings":";;;;;;;;;KAYK;;EAEJ,wBAAwB;;EAGxB,wBAAwB;;;;;;;EAQxB,qBAAqB,qBAAqB;;;KAI/B;;EAEX,QAAQ,WAAW;;;;;;EAOnB,eAAe;;EAGf,aAAa;;;KAIF;;EAEX,QAAQ,WAAW;;EAGnB,iBAAiB;;;;;;EAOjB,eAAe;;WAGN,YAAY;;EAGrB,UAAU,KAAK;;;cAIH,gBAAiB,QAAQ,wBAAsB;;;;;;;;;cAoB/C,kBAAiB;;YAKZ;;IAEhB,UAAU"}
|
package/dist/createPrismic.d.ts
CHANGED
|
@@ -1,13 +1,16 @@
|
|
|
1
1
|
import { ComponentOrTagName } from "./types.js";
|
|
2
2
|
import { RichTextComponents } from "./PrismicRichText/types.js";
|
|
3
|
+
import "./PrismicRichText/index.js";
|
|
3
4
|
import { TableComponents } from "./PrismicTable/types.js";
|
|
5
|
+
import "./PrismicTable/index.js";
|
|
4
6
|
import { App } from "vue";
|
|
5
7
|
import { CreateClient, LinkResolverFunction, isFilled } from "@prismicio/client";
|
|
6
|
-
|
|
7
8
|
//#region src/createPrismic.d.ts
|
|
8
9
|
/** Components configuration. */
|
|
9
10
|
type ComponentsConfig = {
|
|
10
|
-
/** The default component rendered for internal URLs. */
|
|
11
|
+
/** The default component rendered for internal URLs. */
|
|
12
|
+
linkInternalComponent?: ComponentOrTagName;
|
|
13
|
+
/** The default component rendered for external URLs. */
|
|
11
14
|
linkExternalComponent?: ComponentOrTagName;
|
|
12
15
|
/**
|
|
13
16
|
* The default components or shorthand definitions for rich text and table components.
|
|
@@ -19,26 +22,32 @@ type ComponentsConfig = {
|
|
|
19
22
|
};
|
|
20
23
|
/** Prismic Vue plugin configuration. */
|
|
21
24
|
type PrismicPluginConfig = {
|
|
22
|
-
/** A Prismic client instance to inject into the Vue app. */
|
|
25
|
+
/** A Prismic client instance to inject into the Vue app. */
|
|
26
|
+
client: ReturnType<CreateClient>;
|
|
23
27
|
/**
|
|
24
28
|
* A default link resolver used to resolve links when route resolvers cannot be used.
|
|
25
29
|
*
|
|
26
30
|
* @see {@link https://prismic.io/docs/routes}
|
|
27
31
|
*/
|
|
28
|
-
linkResolver?: LinkResolverFunction;
|
|
32
|
+
linkResolver?: LinkResolverFunction;
|
|
33
|
+
/** Components configuration. */
|
|
29
34
|
components?: ComponentsConfig;
|
|
30
35
|
};
|
|
31
36
|
/** Prismic Vue plugin interface accessible through `usePrismic()` and `$prismic`. */
|
|
32
37
|
type PrismicPlugin = {
|
|
33
|
-
/** A Prismic client that can be used to query content from a repository. */
|
|
38
|
+
/** A Prismic client that can be used to query content from a repository. */
|
|
39
|
+
client: ReturnType<CreateClient>;
|
|
40
|
+
/** Helpers to determine if a field is filled. */
|
|
34
41
|
isFilled: typeof isFilled;
|
|
35
42
|
/**
|
|
36
43
|
* The default link resolver used to resolve links when route resolvers cannot be used.
|
|
37
44
|
*
|
|
38
45
|
* @see {@link https://prismic.io/docs/routes}
|
|
39
46
|
*/
|
|
40
|
-
linkResolver?: LinkResolverFunction;
|
|
41
|
-
|
|
47
|
+
linkResolver?: LinkResolverFunction;
|
|
48
|
+
/** @internal */
|
|
49
|
+
readonly components: ComponentsConfig;
|
|
50
|
+
/** @internal */
|
|
42
51
|
install: (app: App) => void;
|
|
43
52
|
};
|
|
44
53
|
/** Creates a Prismic Vue plugin instance that can be used by a Vue app. */
|
|
@@ -47,7 +56,7 @@ declare const createPrismic: (config: PrismicPluginConfig) => PrismicPlugin;
|
|
|
47
56
|
* Access the Prismic Vue plugin interface.
|
|
48
57
|
*
|
|
49
58
|
* @example
|
|
50
|
-
*
|
|
59
|
+
* ```typescript
|
|
51
60
|
* const { client, isFilled } = usePrismic()
|
|
52
61
|
* ```
|
|
53
62
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"createPrismic.d.ts","names":[],"sources":["../src/createPrismic.ts"],"mappings":"
|
|
1
|
+
{"version":3,"file":"createPrismic.d.ts","names":[],"sources":["../src/createPrismic.ts"],"mappings":";;;;;;;;;KAYK;;EAEJ,wBAAwB;;EAGxB,wBAAwB;;;;;;;EAQxB,qBAAqB,qBAAqB;;;KAI/B;;EAEX,QAAQ,WAAW;;;;;;EAOnB,eAAe;;EAGf,aAAa;;;KAIF;;EAEX,QAAQ,WAAW;;EAGnB,iBAAiB;;;;;;EAOjB,eAAe;;WAGN,YAAY;;EAGrB,UAAU,KAAK;;;cAIH,gBAAiB,QAAQ,wBAAsB;;;;;;;;;cAoB/C,kBAAiB;;YAKZ;;IAEhB,UAAU"}
|
package/dist/createPrismic.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"createPrismic.js","names":[],"sources":["../src/createPrismic.ts"],"sourcesContent":["import type { CreateClient, LinkResolverFunction } from \"@prismicio/client\"\nimport { isFilled } from \"@prismicio/client\"\nimport type { App, InjectionKey } from \"vue\"\nimport { inject } from \"vue\"\n\nimport type { RichTextComponents } from \"./PrismicRichText\"\nimport type { TableComponents } from \"./PrismicTable\"\nimport type { ComponentOrTagName } from \"./types\"\n\nconst prismicKey = Symbol.for(\"@prismicio/vue/plugin\") as InjectionKey<PrismicPlugin>\n\n/** Components configuration. */\ntype ComponentsConfig = {\n\t/** The default component rendered for internal URLs. */\n\tlinkInternalComponent?: ComponentOrTagName\n\n\t/** The default component rendered for external URLs. */\n\tlinkExternalComponent?: ComponentOrTagName\n\n\t/**\n\t * The default components or shorthand definitions for rich text and table components.\n\t *\n\t * @see {@link https://prismic.io/docs/fields/rich-text}\n\t * @see {@link https://prismic.io/docs/fields/table}\n\t */\n\trichTextComponents?: RichTextComponents & TableComponents\n}\n\n/** Prismic Vue plugin configuration. */\nexport type PrismicPluginConfig = {\n\t/** A Prismic client instance to inject into the Vue app. */\n\tclient: ReturnType<CreateClient>\n\n\t/**\n\t * A default link resolver used to resolve links when route resolvers cannot be used.\n\t *\n\t * @see {@link https://prismic.io/docs/routes}\n\t */\n\tlinkResolver?: LinkResolverFunction\n\n\t/** Components configuration. */\n\tcomponents?: ComponentsConfig\n}\n\n/** Prismic Vue plugin interface accessible through `usePrismic()` and `$prismic`. */\nexport type PrismicPlugin = {\n\t/** A Prismic client that can be used to query content from a repository. */\n\tclient: ReturnType<CreateClient>\n\n\t/** Helpers to determine if a field is filled. */\n\tisFilled: typeof isFilled\n\n\t/**\n\t * The default link resolver used to resolve links when route resolvers cannot be used.\n\t *\n\t * @see {@link https://prismic.io/docs/routes}\n\t */\n\tlinkResolver?: LinkResolverFunction\n\n\t/** @internal */\n\treadonly components: ComponentsConfig\n\n\t/** @internal */\n\tinstall: (app: App) => void\n}\n\n/** Creates a Prismic Vue plugin instance that can be used by a Vue app. */\nexport const createPrismic = (config: PrismicPluginConfig): PrismicPlugin => {\n\treturn {\n\t\t...config,\n\t\tcomponents: config.components || {},\n\t\tisFilled,\n\t\tinstall(app: App): void {\n\t\t\tapp.provide(prismicKey, this)\n\t\t\tapp.config.globalProperties.$prismic = this\n\t\t},\n\t}\n}\n\n/**\n * Access the Prismic Vue plugin interface.\n *\n * @example\n * \t
|
|
1
|
+
{"version":3,"file":"createPrismic.js","names":[],"sources":["../src/createPrismic.ts"],"sourcesContent":["import type { CreateClient, LinkResolverFunction } from \"@prismicio/client\"\nimport { isFilled } from \"@prismicio/client\"\nimport type { App, InjectionKey } from \"vue\"\nimport { inject } from \"vue\"\n\nimport type { RichTextComponents } from \"./PrismicRichText\"\nimport type { TableComponents } from \"./PrismicTable\"\nimport type { ComponentOrTagName } from \"./types\"\n\nconst prismicKey = Symbol.for(\"@prismicio/vue/plugin\") as InjectionKey<PrismicPlugin>\n\n/** Components configuration. */\ntype ComponentsConfig = {\n\t/** The default component rendered for internal URLs. */\n\tlinkInternalComponent?: ComponentOrTagName\n\n\t/** The default component rendered for external URLs. */\n\tlinkExternalComponent?: ComponentOrTagName\n\n\t/**\n\t * The default components or shorthand definitions for rich text and table components.\n\t *\n\t * @see {@link https://prismic.io/docs/fields/rich-text}\n\t * @see {@link https://prismic.io/docs/fields/table}\n\t */\n\trichTextComponents?: RichTextComponents & TableComponents\n}\n\n/** Prismic Vue plugin configuration. */\nexport type PrismicPluginConfig = {\n\t/** A Prismic client instance to inject into the Vue app. */\n\tclient: ReturnType<CreateClient>\n\n\t/**\n\t * A default link resolver used to resolve links when route resolvers cannot be used.\n\t *\n\t * @see {@link https://prismic.io/docs/routes}\n\t */\n\tlinkResolver?: LinkResolverFunction\n\n\t/** Components configuration. */\n\tcomponents?: ComponentsConfig\n}\n\n/** Prismic Vue plugin interface accessible through `usePrismic()` and `$prismic`. */\nexport type PrismicPlugin = {\n\t/** A Prismic client that can be used to query content from a repository. */\n\tclient: ReturnType<CreateClient>\n\n\t/** Helpers to determine if a field is filled. */\n\tisFilled: typeof isFilled\n\n\t/**\n\t * The default link resolver used to resolve links when route resolvers cannot be used.\n\t *\n\t * @see {@link https://prismic.io/docs/routes}\n\t */\n\tlinkResolver?: LinkResolverFunction\n\n\t/** @internal */\n\treadonly components: ComponentsConfig\n\n\t/** @internal */\n\tinstall: (app: App) => void\n}\n\n/** Creates a Prismic Vue plugin instance that can be used by a Vue app. */\nexport const createPrismic = (config: PrismicPluginConfig): PrismicPlugin => {\n\treturn {\n\t\t...config,\n\t\tcomponents: config.components || {},\n\t\tisFilled,\n\t\tinstall(app: App): void {\n\t\t\tapp.provide(prismicKey, this)\n\t\t\tapp.config.globalProperties.$prismic = this\n\t\t},\n\t}\n}\n\n/**\n * Access the Prismic Vue plugin interface.\n *\n * @example\n * \t```typescript\n * \tconst { client, isFilled } = usePrismic()\n * \t```\n */\nexport const usePrismic = (): PrismicPlugin => {\n\treturn inject(prismicKey, { components: {} } as PrismicPlugin)\n}\n\ndeclare module \"vue\" {\n\texport interface ComponentCustomProperties {\n\t\t/** The Prismic Vue plugin interface. */\n\t\t$prismic: PrismicPlugin\n\t}\n}\n"],"mappings":";;;AASA,MAAM,aAAa,OAAO,IAAI,uBAAuB;;AA0DrD,MAAa,iBAAiB,WAA+C;CAC5E,OAAO;EACN,GAAG;EACH,YAAY,OAAO,cAAc,CAAC;EAClC;EACA,QAAQ,KAAgB;GACvB,IAAI,QAAQ,YAAY,IAAI;GAC5B,IAAI,OAAO,iBAAiB,WAAW;EACxC;CACD;AACD;;;;;;;;;AAUA,MAAa,mBAAkC;CAC9C,OAAO,OAAO,YAAY,EAAE,YAAY,CAAC,EAAE,CAAkB;AAC9D"}
|
package/dist/index.cjs
CHANGED
|
@@ -12,13 +12,13 @@ const require_SliceZone = require("./SliceZone/SliceZone.cjs");
|
|
|
12
12
|
const require_getSliceComponentProps = require("./SliceZone/getSliceComponentProps.cjs");
|
|
13
13
|
const require_defineSliceZoneComponents = require("./SliceZone/defineSliceZoneComponents.cjs");
|
|
14
14
|
const require_SliceSimulator = require("./SliceSimulator.cjs");
|
|
15
|
-
exports.PrismicImage = require_PrismicImage;
|
|
16
|
-
exports.PrismicLink = require_PrismicLink;
|
|
17
|
-
exports.PrismicRichText = require_PrismicRichText;
|
|
18
|
-
exports.PrismicTable = require_PrismicTable;
|
|
19
|
-
exports.PrismicText = require_PrismicText;
|
|
20
|
-
exports.SliceSimulator = require_SliceSimulator;
|
|
21
|
-
exports.SliceZone = require_SliceZone;
|
|
15
|
+
exports.PrismicImage = require_PrismicImage.default;
|
|
16
|
+
exports.PrismicLink = require_PrismicLink.default;
|
|
17
|
+
exports.PrismicRichText = require_PrismicRichText.default;
|
|
18
|
+
exports.PrismicTable = require_PrismicTable.default;
|
|
19
|
+
exports.PrismicText = require_PrismicText.default;
|
|
20
|
+
exports.SliceSimulator = require_SliceSimulator.default;
|
|
21
|
+
exports.SliceZone = require_SliceZone.default;
|
|
22
22
|
exports.TODOSliceComponent = require_TODOSliceComponent.TODOSliceComponent;
|
|
23
23
|
exports.createPrismic = require_createPrismic.createPrismic;
|
|
24
24
|
exports.defineSliceZoneComponents = require_defineSliceZoneComponents.defineSliceZoneComponents;
|
package/dist/index.d.cts
CHANGED
|
@@ -1,17 +1,20 @@
|
|
|
1
1
|
import { RichTextComponentProps, RichTextComponents } from "./PrismicRichText/types.cjs";
|
|
2
|
-
import { PrismicRichTextProps
|
|
2
|
+
import _default$2, { PrismicRichTextProps } from "./PrismicRichText/PrismicRichText.vue.cjs";
|
|
3
3
|
import { getRichTextComponentProps } from "./PrismicRichText/getRichTextComponentProps.cjs";
|
|
4
|
+
import "./PrismicRichText/index.cjs";
|
|
4
5
|
import { TableComponents } from "./PrismicTable/types.cjs";
|
|
5
|
-
import { PrismicTableProps
|
|
6
|
+
import _default$3, { PrismicTableProps } from "./PrismicTable/PrismicTable.vue.cjs";
|
|
6
7
|
import { getTableComponentProps_d_exports } from "./PrismicTable/getTableComponentProps.cjs";
|
|
7
|
-
import
|
|
8
|
-
import
|
|
9
|
-
import
|
|
8
|
+
import "./PrismicTable/index.cjs";
|
|
9
|
+
import _default, { PrismicImageProps } from "./PrismicImage.vue.cjs";
|
|
10
|
+
import _default$1, { PrismicLinkProps } from "./PrismicLink.vue.cjs";
|
|
11
|
+
import _default$4, { PrismicTextProps } from "./PrismicText.vue.cjs";
|
|
10
12
|
import { SliceComponentProps, SliceComponentType, SliceLike, SliceLikeGraphQL, SliceLikeRestV2, SliceZoneComponents, SliceZoneLike } from "./SliceZone/types.cjs";
|
|
11
|
-
import { SliceZoneProps
|
|
13
|
+
import _default$6, { SliceZoneProps } from "./SliceZone/SliceZone.vue.cjs";
|
|
12
14
|
import { TODOSliceComponent } from "./SliceZone/TODOSliceComponent.cjs";
|
|
13
15
|
import { getSliceComponentProps } from "./SliceZone/getSliceComponentProps.cjs";
|
|
14
16
|
import { defineSliceZoneComponents } from "./SliceZone/defineSliceZoneComponents.cjs";
|
|
15
|
-
import
|
|
17
|
+
import "./SliceZone/index.cjs";
|
|
18
|
+
import _default$5, { SliceSimulatorProps } from "./SliceSimulator.vue.cjs";
|
|
16
19
|
import { PrismicPlugin, PrismicPluginConfig, createPrismic, usePrismic } from "./createPrismic.cjs";
|
|
17
20
|
export { _default as PrismicImage, type PrismicImageProps, _default$1 as PrismicLink, type PrismicLinkProps, type PrismicPlugin, type PrismicPluginConfig, _default$2 as PrismicRichText, type PrismicRichTextProps, _default$3 as PrismicTable, type PrismicTableProps, _default$4 as PrismicText, type PrismicTextProps, type RichTextComponentProps, type RichTextComponents, type SliceComponentProps, type SliceComponentType, type SliceLike, type SliceLikeGraphQL, type SliceLikeRestV2, _default$5 as SliceSimulator, type SliceSimulatorProps, _default$6 as SliceZone, type SliceZoneComponents, type SliceZoneLike, type SliceZoneProps, TODOSliceComponent, type TableComponents, createPrismic, defineSliceZoneComponents, getRichTextComponentProps, getSliceComponentProps, getTableComponentProps_d_exports as getTableComponentProps, usePrismic };
|
package/dist/index.d.ts
CHANGED
|
@@ -1,17 +1,20 @@
|
|
|
1
1
|
import { RichTextComponentProps, RichTextComponents } from "./PrismicRichText/types.js";
|
|
2
|
-
import { PrismicRichTextProps
|
|
2
|
+
import _default$2, { PrismicRichTextProps } from "./PrismicRichText/PrismicRichText.vue.js";
|
|
3
3
|
import { getRichTextComponentProps } from "./PrismicRichText/getRichTextComponentProps.js";
|
|
4
|
+
import "./PrismicRichText/index.js";
|
|
4
5
|
import { TableComponents } from "./PrismicTable/types.js";
|
|
5
|
-
import { PrismicTableProps
|
|
6
|
+
import _default$3, { PrismicTableProps } from "./PrismicTable/PrismicTable.vue.js";
|
|
6
7
|
import { getTableComponentProps_d_exports } from "./PrismicTable/getTableComponentProps.js";
|
|
7
|
-
import
|
|
8
|
-
import
|
|
9
|
-
import
|
|
8
|
+
import "./PrismicTable/index.js";
|
|
9
|
+
import _default, { PrismicImageProps } from "./PrismicImage.vue.js";
|
|
10
|
+
import _default$1, { PrismicLinkProps } from "./PrismicLink.vue.js";
|
|
11
|
+
import _default$4, { PrismicTextProps } from "./PrismicText.vue.js";
|
|
10
12
|
import { SliceComponentProps, SliceComponentType, SliceLike, SliceLikeGraphQL, SliceLikeRestV2, SliceZoneComponents, SliceZoneLike } from "./SliceZone/types.js";
|
|
11
|
-
import { SliceZoneProps
|
|
13
|
+
import _default$6, { SliceZoneProps } from "./SliceZone/SliceZone.vue.js";
|
|
12
14
|
import { TODOSliceComponent } from "./SliceZone/TODOSliceComponent.js";
|
|
13
15
|
import { getSliceComponentProps } from "./SliceZone/getSliceComponentProps.js";
|
|
14
16
|
import { defineSliceZoneComponents } from "./SliceZone/defineSliceZoneComponents.js";
|
|
15
|
-
import
|
|
17
|
+
import "./SliceZone/index.js";
|
|
18
|
+
import _default$5, { SliceSimulatorProps } from "./SliceSimulator.vue.js";
|
|
16
19
|
import { PrismicPlugin, PrismicPluginConfig, createPrismic, usePrismic } from "./createPrismic.js";
|
|
17
20
|
export { _default as PrismicImage, type PrismicImageProps, _default$1 as PrismicLink, type PrismicLinkProps, type PrismicPlugin, type PrismicPluginConfig, _default$2 as PrismicRichText, type PrismicRichTextProps, _default$3 as PrismicTable, type PrismicTableProps, _default$4 as PrismicText, type PrismicTextProps, type RichTextComponentProps, type RichTextComponents, type SliceComponentProps, type SliceComponentType, type SliceLike, type SliceLikeGraphQL, type SliceLikeRestV2, _default$5 as SliceSimulator, type SliceSimulatorProps, _default$6 as SliceZone, type SliceZoneComponents, type SliceZoneLike, type SliceZoneProps, TODOSliceComponent, type TableComponents, createPrismic, defineSliceZoneComponents, getRichTextComponentProps, getSliceComponentProps, getTableComponentProps_d_exports as getTableComponentProps, usePrismic };
|
package/dist/lib/devMsg.cjs
CHANGED
package/dist/lib/devMsg.cjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"devMsg.cjs","names":["version"],"sources":["../../src/lib/devMsg.ts"],"sourcesContent":["import { version } from \"../../package.json\"\n\n/**\n * Returns a `prismic.dev/msg` URL for a given message slug.\n *\n * @example\n * \t
|
|
1
|
+
{"version":3,"file":"devMsg.cjs","names":["version"],"sources":["../../src/lib/devMsg.ts"],"sourcesContent":["import { version } from \"../../package.json\"\n\n/**\n * Returns a `prismic.dev/msg` URL for a given message slug.\n *\n * @example\n * \t```ts\n * \tdevMsg(\"missing-param\")\n * \t// => \"https://prismic.dev/msg/svelte/v1.2.3/missing-param.md\"\n * \t```\n *\n * @param slug - Slug for the message. This corresponds to a Markdown file in the Git repository's\n * `/messages` directory.\n * @returns The `prismic.dev/msg` URL for the given slug.\n */\nexport const devMsg = (slug: string): string => {\n\treturn `https://prismic.dev/msg/vue/v${version}/${slug}`\n}\n"],"mappings":";;;;;;;;;;;;;;;AAeA,MAAa,UAAU,SAAyB;CAC/C,OAAO,gCAAgCA,gBAAAA,QAAQ,GAAG;AACnD"}
|
package/dist/lib/devMsg.js
CHANGED
package/dist/lib/devMsg.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"devMsg.js","names":[],"sources":["../../src/lib/devMsg.ts"],"sourcesContent":["import { version } from \"../../package.json\"\n\n/**\n * Returns a `prismic.dev/msg` URL for a given message slug.\n *\n * @example\n * \t
|
|
1
|
+
{"version":3,"file":"devMsg.js","names":[],"sources":["../../src/lib/devMsg.ts"],"sourcesContent":["import { version } from \"../../package.json\"\n\n/**\n * Returns a `prismic.dev/msg` URL for a given message slug.\n *\n * @example\n * \t```ts\n * \tdevMsg(\"missing-param\")\n * \t// => \"https://prismic.dev/msg/svelte/v1.2.3/missing-param.md\"\n * \t```\n *\n * @param slug - Slug for the message. This corresponds to a Markdown file in the Git repository's\n * `/messages` directory.\n * @returns The `prismic.dev/msg` URL for the given slug.\n */\nexport const devMsg = (slug: string): string => {\n\treturn `https://prismic.dev/msg/vue/v${version}/${slug}`\n}\n"],"mappings":";;;;;;;;;;;;;;;AAeA,MAAa,UAAU,SAAyB;CAC/C,OAAO,gCAAgC,QAAQ,GAAG;AACnD"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"isInternalURL.cjs","names":[],"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 * @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/** @see Regex101 expression: {@link https://regex101.com/r/1y7iod/1} */\n\tconst isInternal = /^\\/(?!\\/)/.test(url)\n\t/** @see Regex101 expression: {@link https://regex101.com/r/RnUseS/1} */\n\tconst isSpecialLink = !isInternal && !/^https?:\\/\\//i.test(url)\n\n\treturn isInternal && !isSpecialLink\n}\n"],"mappings":";;;;;;;AAOA,MAAa,iBAAiB,QAAyB;;CAEtD,MAAM,aAAa,YAAY,KAAK,
|
|
1
|
+
{"version":3,"file":"isInternalURL.cjs","names":[],"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 * @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/** @see Regex101 expression: {@link https://regex101.com/r/1y7iod/1} */\n\tconst isInternal = /^\\/(?!\\/)/.test(url)\n\t/** @see Regex101 expression: {@link https://regex101.com/r/RnUseS/1} */\n\tconst isSpecialLink = !isInternal && !/^https?:\\/\\//i.test(url)\n\n\treturn isInternal && !isSpecialLink\n}\n"],"mappings":";;;;;;;AAOA,MAAa,iBAAiB,QAAyB;;CAEtD,MAAM,aAAa,YAAY,KAAK,GAAG;;CAEvC,MAAM,gBAAgB,CAAC,cAAc,CAAC,gBAAgB,KAAK,GAAG;CAE9D,OAAO,cAAc,CAAC;AACvB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"isInternalURL.js","names":[],"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 * @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/** @see Regex101 expression: {@link https://regex101.com/r/1y7iod/1} */\n\tconst isInternal = /^\\/(?!\\/)/.test(url)\n\t/** @see Regex101 expression: {@link https://regex101.com/r/RnUseS/1} */\n\tconst isSpecialLink = !isInternal && !/^https?:\\/\\//i.test(url)\n\n\treturn isInternal && !isSpecialLink\n}\n"],"mappings":";;;;;;;AAOA,MAAa,iBAAiB,QAAyB;;CAEtD,MAAM,aAAa,YAAY,KAAK,
|
|
1
|
+
{"version":3,"file":"isInternalURL.js","names":[],"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 * @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/** @see Regex101 expression: {@link https://regex101.com/r/1y7iod/1} */\n\tconst isInternal = /^\\/(?!\\/)/.test(url)\n\t/** @see Regex101 expression: {@link https://regex101.com/r/RnUseS/1} */\n\tconst isSpecialLink = !isInternal && !/^https?:\\/\\//i.test(url)\n\n\treturn isInternal && !isSpecialLink\n}\n"],"mappings":";;;;;;;AAOA,MAAa,iBAAiB,QAAyB;;CAEtD,MAAM,aAAa,YAAY,KAAK,GAAG;;CAEvC,MAAM,gBAAgB,CAAC,cAAc,CAAC,gBAAgB,KAAK,GAAG;CAE9D,OAAO,cAAc,CAAC;AACvB"}
|
package/dist/package.cjs
CHANGED
package/dist/package.js
CHANGED
package/dist/types.cjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.cjs","names":[],"sources":["../src/types.ts"],"sourcesContent":["import type { Component as _Component } from \"vue\"\n\nexport type ComponentOrTagName = string | _Component\n\n// For reference within TypeScript files when `*.vue` type cannot be inferred\nexport type Component<TProps> = _Component | _Component<TProps>\n\n/** A shorthand definition for `<PrismicRichText />` and `<PrismicTable />` component types. */\nexport type ComponentShorthand = {\n\t/** The HTML element type rendered for this node type. */\n\tas?: string\n\n\t/** Other attributes to apply to the element type. */\n\t[Attribute: string]: string | boolean | null | undefined\n}\n\nexport const isComponent = <T>(\n\tcomponent: Component<T> | ComponentShorthand | undefined,\n): component is Component<T> => {\n\treturn (\n\t\t!!component &&\n\t\t(typeof component === \"function\" ||\n\t\t\t(typeof component === \"object\" &&\n\t\t\t\t((\"render\" in component && typeof component.render === \"function\") ||\n\t\t\t\t\t(\"setup\" in component && typeof component.setup === \"function\") ||\n\t\t\t\t\t(\"__file\" in component && !!component.__file) ||\n\t\t\t\t\t(\"__name\" in component && !!component.__name) ||\n\t\t\t\t\t(\"props\" in component && typeof component.props === \"object\"))))\n\t)\n}\n"],"mappings":";AAgBA,MAAa,eACZ,cAC+B;
|
|
1
|
+
{"version":3,"file":"types.cjs","names":[],"sources":["../src/types.ts"],"sourcesContent":["import type { Component as _Component } from \"vue\"\n\nexport type ComponentOrTagName = string | _Component\n\n// For reference within TypeScript files when `*.vue` type cannot be inferred\nexport type Component<TProps> = _Component | _Component<TProps>\n\n/** A shorthand definition for `<PrismicRichText />` and `<PrismicTable />` component types. */\nexport type ComponentShorthand = {\n\t/** The HTML element type rendered for this node type. */\n\tas?: string\n\n\t/** Other attributes to apply to the element type. */\n\t[Attribute: string]: string | boolean | null | undefined\n}\n\nexport const isComponent = <T>(\n\tcomponent: Component<T> | ComponentShorthand | undefined,\n): component is Component<T> => {\n\treturn (\n\t\t!!component &&\n\t\t(typeof component === \"function\" ||\n\t\t\t(typeof component === \"object\" &&\n\t\t\t\t((\"render\" in component && typeof component.render === \"function\") ||\n\t\t\t\t\t(\"setup\" in component && typeof component.setup === \"function\") ||\n\t\t\t\t\t(\"__file\" in component && !!component.__file) ||\n\t\t\t\t\t(\"__name\" in component && !!component.__name) ||\n\t\t\t\t\t(\"props\" in component && typeof component.props === \"object\"))))\n\t)\n}\n"],"mappings":";AAgBA,MAAa,eACZ,cAC+B;CAC/B,OACC,CAAC,CAAC,cACD,OAAO,cAAc,cACpB,OAAO,cAAc,aACnB,YAAY,aAAa,OAAO,UAAU,WAAW,cACrD,WAAW,aAAa,OAAO,UAAU,UAAU,cACnD,YAAY,aAAa,CAAC,CAAC,UAAU,UACrC,YAAY,aAAa,CAAC,CAAC,UAAU,UACrC,WAAW,aAAa,OAAO,UAAU,UAAU;AAEzD"}
|
package/dist/types.d.cts
CHANGED
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
import { Component } from "vue";
|
|
2
|
-
|
|
3
2
|
//#region src/types.d.ts
|
|
4
3
|
type ComponentOrTagName = string | Component;
|
|
5
4
|
type Component$1<TProps> = Component | Component<TProps>;
|
|
6
5
|
/** A shorthand definition for `<PrismicRichText />` and `<PrismicTable />` component types. */
|
|
7
6
|
type ComponentShorthand = {
|
|
8
|
-
/** The HTML element type rendered for this node type. */
|
|
7
|
+
/** The HTML element type rendered for this node type. */
|
|
8
|
+
as?: string;
|
|
9
|
+
/** Other attributes to apply to the element type. */
|
|
9
10
|
[Attribute: string]: string | boolean | null | undefined;
|
|
10
11
|
};
|
|
11
12
|
//#endregion
|
package/dist/types.d.cts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.cts","names":[],"sources":["../src/types.ts"],"mappings":"
|
|
1
|
+
{"version":3,"file":"types.d.cts","names":[],"sources":["../src/types.ts"],"mappings":";;KAEY,8BAA8B;KAG9B,YAAU,UAAU,YAAa,UAAW;;KAG5C;;EAEX;;GAGC"}
|
package/dist/types.d.ts
CHANGED
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
import { Component } from "vue";
|
|
2
|
-
|
|
3
2
|
//#region src/types.d.ts
|
|
4
3
|
type ComponentOrTagName = string | Component;
|
|
5
4
|
type Component$1<TProps> = Component | Component<TProps>;
|
|
6
5
|
/** A shorthand definition for `<PrismicRichText />` and `<PrismicTable />` component types. */
|
|
7
6
|
type ComponentShorthand = {
|
|
8
|
-
/** The HTML element type rendered for this node type. */
|
|
7
|
+
/** The HTML element type rendered for this node type. */
|
|
8
|
+
as?: string;
|
|
9
|
+
/** Other attributes to apply to the element type. */
|
|
9
10
|
[Attribute: string]: string | boolean | null | undefined;
|
|
10
11
|
};
|
|
11
12
|
//#endregion
|
package/dist/types.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","names":[],"sources":["../src/types.ts"],"mappings":"
|
|
1
|
+
{"version":3,"file":"types.d.ts","names":[],"sources":["../src/types.ts"],"mappings":";;KAEY,8BAA8B;KAG9B,YAAU,UAAU,YAAa,UAAW;;KAG5C;;EAEX;;GAGC"}
|
package/dist/types.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.js","names":[],"sources":["../src/types.ts"],"sourcesContent":["import type { Component as _Component } from \"vue\"\n\nexport type ComponentOrTagName = string | _Component\n\n// For reference within TypeScript files when `*.vue` type cannot be inferred\nexport type Component<TProps> = _Component | _Component<TProps>\n\n/** A shorthand definition for `<PrismicRichText />` and `<PrismicTable />` component types. */\nexport type ComponentShorthand = {\n\t/** The HTML element type rendered for this node type. */\n\tas?: string\n\n\t/** Other attributes to apply to the element type. */\n\t[Attribute: string]: string | boolean | null | undefined\n}\n\nexport const isComponent = <T>(\n\tcomponent: Component<T> | ComponentShorthand | undefined,\n): component is Component<T> => {\n\treturn (\n\t\t!!component &&\n\t\t(typeof component === \"function\" ||\n\t\t\t(typeof component === \"object\" &&\n\t\t\t\t((\"render\" in component && typeof component.render === \"function\") ||\n\t\t\t\t\t(\"setup\" in component && typeof component.setup === \"function\") ||\n\t\t\t\t\t(\"__file\" in component && !!component.__file) ||\n\t\t\t\t\t(\"__name\" in component && !!component.__name) ||\n\t\t\t\t\t(\"props\" in component && typeof component.props === \"object\"))))\n\t)\n}\n"],"mappings":";AAgBA,MAAa,eACZ,cAC+B;
|
|
1
|
+
{"version":3,"file":"types.js","names":[],"sources":["../src/types.ts"],"sourcesContent":["import type { Component as _Component } from \"vue\"\n\nexport type ComponentOrTagName = string | _Component\n\n// For reference within TypeScript files when `*.vue` type cannot be inferred\nexport type Component<TProps> = _Component | _Component<TProps>\n\n/** A shorthand definition for `<PrismicRichText />` and `<PrismicTable />` component types. */\nexport type ComponentShorthand = {\n\t/** The HTML element type rendered for this node type. */\n\tas?: string\n\n\t/** Other attributes to apply to the element type. */\n\t[Attribute: string]: string | boolean | null | undefined\n}\n\nexport const isComponent = <T>(\n\tcomponent: Component<T> | ComponentShorthand | undefined,\n): component is Component<T> => {\n\treturn (\n\t\t!!component &&\n\t\t(typeof component === \"function\" ||\n\t\t\t(typeof component === \"object\" &&\n\t\t\t\t((\"render\" in component && typeof component.render === \"function\") ||\n\t\t\t\t\t(\"setup\" in component && typeof component.setup === \"function\") ||\n\t\t\t\t\t(\"__file\" in component && !!component.__file) ||\n\t\t\t\t\t(\"__name\" in component && !!component.__name) ||\n\t\t\t\t\t(\"props\" in component && typeof component.props === \"object\"))))\n\t)\n}\n"],"mappings":";AAgBA,MAAa,eACZ,cAC+B;CAC/B,OACC,CAAC,CAAC,cACD,OAAO,cAAc,cACpB,OAAO,cAAc,aACnB,YAAY,aAAa,OAAO,UAAU,WAAW,cACrD,WAAW,aAAa,OAAO,UAAU,UAAU,cACnD,YAAY,aAAa,CAAC,CAAC,UAAU,UACrC,YAAY,aAAa,CAAC,CAAC,UAAU,UACrC,WAAW,aAAa,OAAO,UAAU,UAAU;AAEzD"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@prismicio/vue",
|
|
3
|
-
"version": "6.1.
|
|
3
|
+
"version": "6.1.4-pr.98.764fac2",
|
|
4
4
|
"description": "Vue plugin, components, and composables to fetch and present Prismic content",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"plugin",
|
|
@@ -52,33 +52,33 @@
|
|
|
52
52
|
"test": "npm run lint && npm run types && npm run unit && npm run build"
|
|
53
53
|
},
|
|
54
54
|
"dependencies": {
|
|
55
|
-
"@prismicio/simulator": "^0.2.
|
|
55
|
+
"@prismicio/simulator": "^0.2.4",
|
|
56
56
|
"esm-env": "^1.2.2"
|
|
57
57
|
},
|
|
58
58
|
"devDependencies": {
|
|
59
|
-
"@prismicio/client": "^7.
|
|
59
|
+
"@prismicio/client": "^7.22.0",
|
|
60
60
|
"@prismicio/mock": "^0.7.2",
|
|
61
61
|
"@types/jsdom-global": "^3.0.7",
|
|
62
|
-
"@vitejs/plugin-vue": "^6.0.
|
|
63
|
-
"@vitest/coverage-v8": "^4.1.
|
|
64
|
-
"@vue/test-utils": "^2.
|
|
65
|
-
"jsdom": "^
|
|
62
|
+
"@vitejs/plugin-vue": "^6.0.8",
|
|
63
|
+
"@vitest/coverage-v8": "^4.1.11",
|
|
64
|
+
"@vue/test-utils": "^2.5.0",
|
|
65
|
+
"jsdom": "^30.0.1",
|
|
66
66
|
"jsdom-global": "^3.0.2",
|
|
67
|
-
"oxfmt": "
|
|
68
|
-
"oxlint": "1.
|
|
69
|
-
"tsdown": "^0.
|
|
70
|
-
"typescript": "^6.0.
|
|
71
|
-
"vite": "^8.
|
|
72
|
-
"vitest": "^4.1.
|
|
73
|
-
"vue": "^3.5.
|
|
74
|
-
"vue-router": "^5.0
|
|
75
|
-
"vue-tsc": "^3.
|
|
67
|
+
"oxfmt": "0.65.0",
|
|
68
|
+
"oxlint": "1.80.0",
|
|
69
|
+
"tsdown": "^0.22.14",
|
|
70
|
+
"typescript": "^6.0.3",
|
|
71
|
+
"vite": "^8.2.2",
|
|
72
|
+
"vitest": "^4.1.11",
|
|
73
|
+
"vue": "^3.5.42",
|
|
74
|
+
"vue-router": "^5.3.0",
|
|
75
|
+
"vue-tsc": "^3.3.11"
|
|
76
76
|
},
|
|
77
77
|
"peerDependencies": {
|
|
78
78
|
"@prismicio/client": "^7",
|
|
79
79
|
"vue": "^3"
|
|
80
80
|
},
|
|
81
81
|
"engines": {
|
|
82
|
-
"node": ">=
|
|
82
|
+
"node": ">=22"
|
|
83
83
|
}
|
|
84
84
|
}
|
package/src/PrismicImage.vue
CHANGED
package/src/PrismicLink.vue
CHANGED
|
@@ -72,11 +72,11 @@ export type PrismicLinkProps = {
|
|
|
72
72
|
const props = defineProps<PrismicLinkProps>()
|
|
73
73
|
defineOptions({ name: "PrismicLink" })
|
|
74
74
|
|
|
75
|
-
const { linkResolver, components } = usePrismic()
|
|
75
|
+
const { linkResolver: pluginLinkResolver, components } = usePrismic()
|
|
76
76
|
|
|
77
77
|
const rawAttrs = computed(() => {
|
|
78
78
|
return asLinkAttrs(props.field || props.document, {
|
|
79
|
-
linkResolver: props.linkResolver ||
|
|
79
|
+
linkResolver: props.linkResolver || pluginLinkResolver,
|
|
80
80
|
rel(args) {
|
|
81
81
|
if (props.rel) {
|
|
82
82
|
return typeof props.rel === "function" ? props.rel(args) : props.rel
|
|
@@ -23,7 +23,7 @@ type DefineComponentRichTextComponentProps<TRTNode extends RTAnyNode = RTAnyNode
|
|
|
23
23
|
* Props are: `["node"]`
|
|
24
24
|
*
|
|
25
25
|
* @example
|
|
26
|
-
*
|
|
26
|
+
* ```javascript
|
|
27
27
|
* // Defining a new rich text component
|
|
28
28
|
* import { getRichTextComponentProps } from "@prismicio/vue"
|
|
29
29
|
*
|
|
@@ -31,7 +31,7 @@ type DefineComponentRichTextComponentProps<TRTNode extends RTAnyNode = RTAnyNode
|
|
|
31
31
|
* ```
|
|
32
32
|
*
|
|
33
33
|
* @example
|
|
34
|
-
*
|
|
34
|
+
* ```typescript
|
|
35
35
|
* // Defining a new rich text component for a specific node type
|
|
36
36
|
* import { getRichTextComponentProps } from "@prismicio/vue"
|
|
37
37
|
*
|
|
@@ -16,7 +16,7 @@ import type { PropType } from "vue"
|
|
|
16
16
|
* Props are: `["table"]`
|
|
17
17
|
*
|
|
18
18
|
* @example
|
|
19
|
-
*
|
|
19
|
+
* ```javascript
|
|
20
20
|
* // Defining a new rich text component
|
|
21
21
|
* import { getTableComponentProps } from "@prismicio/vue"
|
|
22
22
|
*
|
|
@@ -36,7 +36,7 @@ export const table = (): {
|
|
|
36
36
|
* Props are: `["head"]`
|
|
37
37
|
*
|
|
38
38
|
* @example
|
|
39
|
-
*
|
|
39
|
+
* ```javascript
|
|
40
40
|
* // Defining a new rich text component
|
|
41
41
|
* import { getTableComponentProps } from "@prismicio/vue"
|
|
42
42
|
*
|
|
@@ -56,7 +56,7 @@ export const thead = (): {
|
|
|
56
56
|
* Props are: `["body"]`
|
|
57
57
|
*
|
|
58
58
|
* @example
|
|
59
|
-
*
|
|
59
|
+
* ```javascript
|
|
60
60
|
* // Defining a new rich text component
|
|
61
61
|
* import { getTableComponentProps } from "@prismicio/vue"
|
|
62
62
|
*
|
|
@@ -76,7 +76,7 @@ export const tbody = (): {
|
|
|
76
76
|
* Props are: `["row"]`
|
|
77
77
|
*
|
|
78
78
|
* @example
|
|
79
|
-
*
|
|
79
|
+
* ```javascript
|
|
80
80
|
* // Defining a new rich text component
|
|
81
81
|
* import { getTableComponentProps } from "@prismicio/vue"
|
|
82
82
|
*
|
|
@@ -102,7 +102,7 @@ export const tr = (): {
|
|
|
102
102
|
* Props are: `["cell"]`
|
|
103
103
|
*
|
|
104
104
|
* @example
|
|
105
|
-
*
|
|
105
|
+
* ```javascript
|
|
106
106
|
* // Defining a new rich text component
|
|
107
107
|
* import { getTableComponentProps } from "@prismicio/vue"
|
|
108
108
|
*
|
|
@@ -122,7 +122,7 @@ export const th = (): {
|
|
|
122
122
|
* Props are: `["cell"]`
|
|
123
123
|
*
|
|
124
124
|
* @example
|
|
125
|
-
*
|
|
125
|
+
* ```javascript
|
|
126
126
|
* // Defining a new rich text component
|
|
127
127
|
* import { getTableComponentProps } from "@prismicio/vue"
|
|
128
128
|
*
|
|
@@ -10,7 +10,7 @@ import type { SliceComponentType, SliceLike, SliceZoneComponents } from "./types
|
|
|
10
10
|
* This is essentially an helper function to ensure {@link markRaw} is correctly applied on each
|
|
11
11
|
* components, improving performances.
|
|
12
12
|
* @example
|
|
13
|
-
*
|
|
13
|
+
* ```javascript
|
|
14
14
|
* // Defining a slice components
|
|
15
15
|
* import { defineSliceZoneComponents } from "@prismicio/vue";
|
|
16
16
|
*
|
|
@@ -40,7 +40,7 @@ type DefineComponentSliceComponentProps<
|
|
|
40
40
|
* Props are: `["slice", "index", "slices", "context"]`
|
|
41
41
|
*
|
|
42
42
|
* @example
|
|
43
|
-
*
|
|
43
|
+
* ```typescript
|
|
44
44
|
* // Defining a new slice component
|
|
45
45
|
* import { getSliceComponentProps } from "@prismicio/vue"
|
|
46
46
|
*
|
|
@@ -48,7 +48,7 @@ type DefineComponentSliceComponentProps<
|
|
|
48
48
|
* ```
|
|
49
49
|
*
|
|
50
50
|
* @example
|
|
51
|
-
*
|
|
51
|
+
* ```typescript
|
|
52
52
|
* // Defining a new slice component with visual hint
|
|
53
53
|
* import { getSliceComponentProps } from "@prismicio/vue"
|
|
54
54
|
*
|
package/src/createPrismic.ts
CHANGED