@prismicio/vue 3.0.0-beta.7 → 3.0.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/README.md +1 -1
- package/dist/index.cjs +5 -3
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.ts +8 -8
- package/dist/index.js +5 -3
- package/dist/index.js.map +1 -1
- package/package.json +21 -23
- package/src/components/PrismicRichText.ts +3 -2
- package/src/components/PrismicText.ts +2 -1
- package/src/components/SliceZone.ts +4 -2
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@prismicio/vue",
|
|
3
|
-
"version": "3.0.0
|
|
3
|
+
"version": "3.0.0",
|
|
4
4
|
"description": "Vue plugin, components, and composables to fetch and present Prismic content",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"typescript",
|
|
@@ -45,45 +45,43 @@
|
|
|
45
45
|
"release:dry": "standard-version --dry-run",
|
|
46
46
|
"size": "size-limit",
|
|
47
47
|
"test": "npm run lint && npm run unit && npm run build && npm run size",
|
|
48
|
-
"unit": "
|
|
48
|
+
"unit": "vitest run --coverage",
|
|
49
|
+
"unit:watch": "vitest watch"
|
|
49
50
|
},
|
|
50
51
|
"dependencies": {
|
|
51
|
-
"@prismicio/client": "^6.
|
|
52
|
-
"@prismicio/helpers": "^2.3.
|
|
53
|
-
"@prismicio/types": "^0.
|
|
52
|
+
"@prismicio/client": "^6.6.1",
|
|
53
|
+
"@prismicio/helpers": "^2.3.2",
|
|
54
|
+
"@prismicio/types": "^0.2.0",
|
|
54
55
|
"isomorphic-unfetch": "^3.1.0",
|
|
55
|
-
"vue-router": "^4.
|
|
56
|
+
"vue-router": "^4.1.2"
|
|
56
57
|
},
|
|
57
58
|
"devDependencies": {
|
|
58
59
|
"@prismicio/mock": "^0.0.10",
|
|
59
60
|
"@size-limit/preset-small-lib": "^7.0.8",
|
|
60
61
|
"@types/escape-html": "^1.0.2",
|
|
61
62
|
"@types/jsdom-global": "^3.0.2",
|
|
62
|
-
"@
|
|
63
|
-
"@typescript-eslint/
|
|
64
|
-
"@
|
|
65
|
-
"@vitejs/plugin-vue": "^2.3.3",
|
|
63
|
+
"@typescript-eslint/eslint-plugin": "^5.30.6",
|
|
64
|
+
"@typescript-eslint/parser": "^5.30.6",
|
|
65
|
+
"@vitejs/plugin-vue": "^3.0.1",
|
|
66
66
|
"@vue/compiler-sfc": "^3.2.37",
|
|
67
|
-
"@vue/eslint-config-typescript": "^
|
|
68
|
-
"@vue/test-utils": "^2.0.
|
|
69
|
-
"
|
|
70
|
-
"eslint": "^8.
|
|
67
|
+
"@vue/eslint-config-typescript": "^11.0.0",
|
|
68
|
+
"@vue/test-utils": "^2.0.2",
|
|
69
|
+
"c8": "^7.11.3",
|
|
70
|
+
"eslint": "^8.20.0",
|
|
71
71
|
"eslint-config-prettier": "^8.5.0",
|
|
72
|
-
"eslint-plugin-prettier": "^4.
|
|
72
|
+
"eslint-plugin-prettier": "^4.2.1",
|
|
73
73
|
"eslint-plugin-tsdoc": "^0.2.16",
|
|
74
|
-
"eslint-plugin-vue": "^9.
|
|
75
|
-
"jsdom": "^
|
|
74
|
+
"eslint-plugin-vue": "^9.2.0",
|
|
75
|
+
"jsdom": "^20.0.0",
|
|
76
76
|
"jsdom-global": "^3.0.2",
|
|
77
|
-
"
|
|
78
|
-
"prettier": "^2.6.2",
|
|
77
|
+
"prettier": "^2.7.1",
|
|
79
78
|
"prettier-plugin-jsdoc": "^0.3.38",
|
|
80
|
-
"sinon": "^14.0.0",
|
|
81
79
|
"siroc": "^0.16.0",
|
|
82
80
|
"size-limit": "^7.0.8",
|
|
83
81
|
"standard-version": "^9.5.0",
|
|
84
|
-
"
|
|
85
|
-
"
|
|
86
|
-
"
|
|
82
|
+
"typescript": "^4.7.4",
|
|
83
|
+
"vite": "^3.0.1",
|
|
84
|
+
"vitest": "^0.18.1",
|
|
87
85
|
"vue": "^3.2.37"
|
|
88
86
|
},
|
|
89
87
|
"peerDependencies": {
|
|
@@ -137,7 +137,8 @@ export const PrismicRichTextImpl = /*#__PURE__*/ defineComponent({
|
|
|
137
137
|
props: {
|
|
138
138
|
field: {
|
|
139
139
|
type: Array as unknown as PropType<RichTextField | null | undefined>,
|
|
140
|
-
|
|
140
|
+
default: undefined,
|
|
141
|
+
required: false,
|
|
141
142
|
},
|
|
142
143
|
linkResolver: {
|
|
143
144
|
type: Function as PropType<LinkResolverFunction>,
|
|
@@ -168,7 +169,7 @@ export const PrismicRichTextImpl = /*#__PURE__*/ defineComponent({
|
|
|
168
169
|
const root = ref<HTMLElement | Comment | Component | null>(null);
|
|
169
170
|
|
|
170
171
|
const maybeRouter = inject(routerKey, null);
|
|
171
|
-
if (maybeRouter
|
|
172
|
+
if (maybeRouter) {
|
|
172
173
|
type InternalLink = {
|
|
173
174
|
element: HTMLAnchorElement;
|
|
174
175
|
listener: EventListener;
|
|
@@ -104,7 +104,8 @@ export const PrismicTextImpl = /*#__PURE__*/ defineComponent({
|
|
|
104
104
|
props: {
|
|
105
105
|
field: {
|
|
106
106
|
type: Array as unknown as PropType<RichTextField | null | undefined>,
|
|
107
|
-
|
|
107
|
+
default: undefined,
|
|
108
|
+
required: false,
|
|
108
109
|
},
|
|
109
110
|
separator: {
|
|
110
111
|
type: String as PropType<string>,
|
|
@@ -124,7 +124,8 @@ export type SliceComponentProps<
|
|
|
124
124
|
* available to all Slice components
|
|
125
125
|
*/
|
|
126
126
|
export type DefineComponentSliceComponentProps<
|
|
127
|
-
|
|
127
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
128
|
+
TSlice extends SliceLike = any,
|
|
128
129
|
TContext = unknown,
|
|
129
130
|
> = {
|
|
130
131
|
slice: {
|
|
@@ -317,7 +318,8 @@ export type SliceZoneComponents<
|
|
|
317
318
|
* @returns A new optimized record of {@link SliceZoneComponents}
|
|
318
319
|
*/
|
|
319
320
|
export const defineSliceZoneComponents = <
|
|
320
|
-
|
|
321
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
322
|
+
TSlice extends SliceLike = any,
|
|
321
323
|
TContext = unknown,
|
|
322
324
|
>(
|
|
323
325
|
components: SliceZoneComponents<TSlice, TContext>,
|