vue-datocms 8.1.13 → 8.1.15
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/index.cjs.js +15 -2
- package/dist/index.d.ts +31 -1
- package/dist/index.esm.mjs +15 -2
- package/package.json +4 -4
package/dist/index.cjs.js
CHANGED
|
@@ -8,7 +8,7 @@ var datocmsStructuredTextUtils = require('datocms-structured-text-utils');
|
|
|
8
8
|
var datocmsListen = require('datocms-listen');
|
|
9
9
|
|
|
10
10
|
function useContentLink(options = {}) {
|
|
11
|
-
const { enabled = true, onNavigateTo, root } = options;
|
|
11
|
+
const { enabled = true, onNavigateTo, root, hue } = options;
|
|
12
12
|
const controller = vue.ref(null);
|
|
13
13
|
const onNavigateToRef = vue.ref(onNavigateTo);
|
|
14
14
|
vue.watch(
|
|
@@ -36,6 +36,9 @@ function useContentLink(options = {}) {
|
|
|
36
36
|
if (root == null ? void 0 : root.value) {
|
|
37
37
|
controllerOptions.root = root.value;
|
|
38
38
|
}
|
|
39
|
+
if (hue !== void 0) {
|
|
40
|
+
controllerOptions.hue = hue;
|
|
41
|
+
}
|
|
39
42
|
controller.value = contentLink.createController(controllerOptions);
|
|
40
43
|
};
|
|
41
44
|
vue.onMounted(() => {
|
|
@@ -153,13 +156,23 @@ const ContentLink = vue.defineComponent({
|
|
|
153
156
|
stripStega: {
|
|
154
157
|
type: Boolean,
|
|
155
158
|
required: false
|
|
159
|
+
},
|
|
160
|
+
/**
|
|
161
|
+
* Hue (0–359) of the overlay accent color.
|
|
162
|
+
*
|
|
163
|
+
* @default 17 (orange)
|
|
164
|
+
*/
|
|
165
|
+
hue: {
|
|
166
|
+
type: Number,
|
|
167
|
+
required: false
|
|
156
168
|
}
|
|
157
169
|
},
|
|
158
170
|
setup(props) {
|
|
159
171
|
const { enableClickToEdit: enableClickToEditFn, setCurrentPath } = useContentLink({
|
|
160
172
|
enabled: props.stripStega !== void 0 ? { stripStega: props.stripStega } : true,
|
|
161
173
|
onNavigateTo: props.onNavigateTo,
|
|
162
|
-
root: props.root
|
|
174
|
+
root: props.root,
|
|
175
|
+
hue: props.hue
|
|
163
176
|
});
|
|
164
177
|
vue.onMounted(() => {
|
|
165
178
|
if (!props.enableClickToEdit) {
|
package/dist/index.d.ts
CHANGED
|
@@ -56,6 +56,12 @@ type UseContentLinkOptions = {
|
|
|
56
56
|
onNavigateTo?: (path: string) => void;
|
|
57
57
|
/** Root element to limit scanning to (instead of document) */
|
|
58
58
|
root?: Ref<ParentNode | null | undefined>;
|
|
59
|
+
/**
|
|
60
|
+
* Hue (0–359) of the overlay accent color.
|
|
61
|
+
*
|
|
62
|
+
* @default 17 (orange)
|
|
63
|
+
*/
|
|
64
|
+
hue?: number;
|
|
59
65
|
};
|
|
60
66
|
type UseContentLinkResult = {
|
|
61
67
|
/** The controller instance, or null if disabled */
|
|
@@ -112,7 +118,7 @@ type UseContentLinkResult = {
|
|
|
112
118
|
*/
|
|
113
119
|
declare function useContentLink(options?: UseContentLinkOptions): UseContentLinkResult;
|
|
114
120
|
|
|
115
|
-
type ContentLinkProps = Omit<UseContentLinkOptions, 'enabled'> & {
|
|
121
|
+
type ContentLinkProps = Omit<UseContentLinkOptions, 'enabled' | 'hue'> & {
|
|
116
122
|
/** Current pathname to sync with Web Previews plugin */
|
|
117
123
|
currentPath?: string;
|
|
118
124
|
/**
|
|
@@ -133,6 +139,12 @@ type ContentLinkProps = Omit<UseContentLinkOptions, 'enabled'> & {
|
|
|
133
139
|
enableClickToEdit?: boolean | ClickToEditOptions;
|
|
134
140
|
/** Whether to strip stega encoding from text nodes after stamping. */
|
|
135
141
|
stripStega?: boolean;
|
|
142
|
+
/**
|
|
143
|
+
* Hue (0–359) of the overlay accent color.
|
|
144
|
+
*
|
|
145
|
+
* @default 17 (orange)
|
|
146
|
+
*/
|
|
147
|
+
hue?: number;
|
|
136
148
|
};
|
|
137
149
|
/**
|
|
138
150
|
* ContentLink component enables Visual Editing for DatoCMS content.
|
|
@@ -283,6 +295,15 @@ declare const ContentLink: vue.DefineComponent<{
|
|
|
283
295
|
type: BooleanConstructor;
|
|
284
296
|
required: false;
|
|
285
297
|
};
|
|
298
|
+
/**
|
|
299
|
+
* Hue (0–359) of the overlay accent color.
|
|
300
|
+
*
|
|
301
|
+
* @default 17 (orange)
|
|
302
|
+
*/
|
|
303
|
+
hue: {
|
|
304
|
+
type: NumberConstructor;
|
|
305
|
+
required: false;
|
|
306
|
+
};
|
|
286
307
|
}, () => null, unknown, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {}, string, vue.VNodeProps & vue.AllowedComponentProps & vue.ComponentCustomProps, Readonly<vue.ExtractPropTypes<{
|
|
287
308
|
/**
|
|
288
309
|
* Callback when Web Previews plugin requests navigation.
|
|
@@ -342,6 +363,15 @@ declare const ContentLink: vue.DefineComponent<{
|
|
|
342
363
|
type: BooleanConstructor;
|
|
343
364
|
required: false;
|
|
344
365
|
};
|
|
366
|
+
/**
|
|
367
|
+
* Hue (0–359) of the overlay accent color.
|
|
368
|
+
*
|
|
369
|
+
* @default 17 (orange)
|
|
370
|
+
*/
|
|
371
|
+
hue: {
|
|
372
|
+
type: NumberConstructor;
|
|
373
|
+
required: false;
|
|
374
|
+
};
|
|
345
375
|
}>>, {
|
|
346
376
|
stripStega: boolean;
|
|
347
377
|
}, {}>;
|
package/dist/index.esm.mjs
CHANGED
|
@@ -9,7 +9,7 @@ export { RenderError } from 'datocms-structured-text-utils';
|
|
|
9
9
|
import { subscribeToQuery } from 'datocms-listen';
|
|
10
10
|
|
|
11
11
|
function useContentLink(options = {}) {
|
|
12
|
-
const { enabled = true, onNavigateTo, root } = options;
|
|
12
|
+
const { enabled = true, onNavigateTo, root, hue } = options;
|
|
13
13
|
const controller = ref(null);
|
|
14
14
|
const onNavigateToRef = ref(onNavigateTo);
|
|
15
15
|
watch(
|
|
@@ -37,6 +37,9 @@ function useContentLink(options = {}) {
|
|
|
37
37
|
if (root == null ? void 0 : root.value) {
|
|
38
38
|
controllerOptions.root = root.value;
|
|
39
39
|
}
|
|
40
|
+
if (hue !== void 0) {
|
|
41
|
+
controllerOptions.hue = hue;
|
|
42
|
+
}
|
|
40
43
|
controller.value = createController(controllerOptions);
|
|
41
44
|
};
|
|
42
45
|
onMounted(() => {
|
|
@@ -154,13 +157,23 @@ const ContentLink = defineComponent({
|
|
|
154
157
|
stripStega: {
|
|
155
158
|
type: Boolean,
|
|
156
159
|
required: false
|
|
160
|
+
},
|
|
161
|
+
/**
|
|
162
|
+
* Hue (0–359) of the overlay accent color.
|
|
163
|
+
*
|
|
164
|
+
* @default 17 (orange)
|
|
165
|
+
*/
|
|
166
|
+
hue: {
|
|
167
|
+
type: Number,
|
|
168
|
+
required: false
|
|
157
169
|
}
|
|
158
170
|
},
|
|
159
171
|
setup(props) {
|
|
160
172
|
const { enableClickToEdit: enableClickToEditFn, setCurrentPath } = useContentLink({
|
|
161
173
|
enabled: props.stripStega !== void 0 ? { stripStega: props.stripStega } : true,
|
|
162
174
|
onNavigateTo: props.onNavigateTo,
|
|
163
|
-
root: props.root
|
|
175
|
+
root: props.root,
|
|
176
|
+
hue: props.hue
|
|
164
177
|
});
|
|
165
178
|
onMounted(() => {
|
|
166
179
|
if (!props.enableClickToEdit) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "vue-datocms",
|
|
3
|
-
"version": "8.1.
|
|
3
|
+
"version": "8.1.15",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "A set of components and utilities to work faster with DatoCMS in Vue.js environments",
|
|
6
6
|
"keywords": [
|
|
@@ -42,7 +42,7 @@
|
|
|
42
42
|
"toc": "doctoc --github src/components src/lib"
|
|
43
43
|
},
|
|
44
44
|
"dependencies": {
|
|
45
|
-
"@datocms/content-link": "^0.3.
|
|
45
|
+
"@datocms/content-link": "^0.3.19",
|
|
46
46
|
"datocms-listen": "^1.0.2",
|
|
47
47
|
"hls.js": "^1.5.17",
|
|
48
48
|
"datocms-structured-text-generic-html-renderer": "^5.0.0",
|
|
@@ -60,8 +60,8 @@
|
|
|
60
60
|
},
|
|
61
61
|
"devDependencies": {
|
|
62
62
|
"@biomejs/biome": "^1.6.3",
|
|
63
|
-
"@mux/mux-player": "^
|
|
64
|
-
"@mux/playback-core": "^0.
|
|
63
|
+
"@mux/mux-player": "^3.11.4",
|
|
64
|
+
"@mux/playback-core": "^0.33.1",
|
|
65
65
|
"@types/hyphenate-style-name": "^1.0.2",
|
|
66
66
|
"@types/jest": "^29.5.11",
|
|
67
67
|
"@types/node": "^25.0.10",
|