@uniformdev/uniform-nuxt 19.48.0 → 19.48.1-alpha.8
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/module.d.ts +4 -0
- package/dist/module.json +1 -1
- package/dist/module.mjs +2 -1
- package/dist/runtime/components/UniformPlayground.d.ts +1 -0
- package/dist/runtime/components/UniformPlayground.mjs +1 -0
- package/dist/runtime/components/UniformRichText.d.ts +1 -1
- package/dist/runtime/components/UniformRichTextNode.d.ts +2 -2
- package/dist/runtime/plugin.mjs +15 -1
- package/package.json +8 -8
package/dist/module.d.ts
CHANGED
|
@@ -35,6 +35,10 @@ interface UniformModuleOptions {
|
|
|
35
35
|
* @default true
|
|
36
36
|
*/
|
|
37
37
|
enableContextDevTools?: boolean;
|
|
38
|
+
/**
|
|
39
|
+
* The path to the playground page, to live preview components and patterns.
|
|
40
|
+
*/
|
|
41
|
+
playgroundPath?: string;
|
|
38
42
|
}
|
|
39
43
|
declare const _default: _nuxt_schema.NuxtModule<UniformModuleOptions>;
|
|
40
44
|
|
package/dist/module.json
CHANGED
package/dist/module.mjs
CHANGED
|
@@ -17,7 +17,8 @@ const module = defineNuxtModule({
|
|
|
17
17
|
outputType: "standard",
|
|
18
18
|
uniformContextPath: void 0,
|
|
19
19
|
defaultConsent: false,
|
|
20
|
-
enableContextDevTools: true
|
|
20
|
+
enableContextDevTools: true,
|
|
21
|
+
playgroundPath: void 0
|
|
21
22
|
},
|
|
22
23
|
setup(options, nuxt) {
|
|
23
24
|
if (!options.projectId || !options.readOnlyApiKey) {
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { UniformPlayground as default } from '@uniformdev/canvas-vue';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { UniformPlayground as default } from "@uniformdev/canvas-vue";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { RenderRichTextComponentResolver, UniformRichTextNodeProps } from '@uniformdev/canvas-vue';
|
|
2
2
|
import { RichTextNode } from '@uniformdev/richtext';
|
|
3
3
|
import { PropType } from 'vue-demi';
|
|
4
|
-
export declare function getResolveVueRichTextRenderer(resolveRichTextRenderer: UniformRichTextNodeProps['resolveRichTextRenderer']): (node: RichTextNode) => import("vue-demi").ComponentOptions<import("@uniformdev/canvas-vue").RichTextComponentProps<RichTextNode>, any, any, import("vue-demi").ComputedOptions, import("vue-demi").MethodOptions, any, any, any> | import("vue-demi").FunctionalComponent<import("@uniformdev/canvas-vue").RichTextComponentProps<RichTextNode>, any> | null | undefined;
|
|
4
|
+
export declare function getResolveVueRichTextRenderer(resolveRichTextRenderer: UniformRichTextNodeProps['resolveRichTextRenderer']): (node: RichTextNode) => import("vue-demi").ComponentOptions<import("@uniformdev/canvas-vue").RichTextComponentProps<RichTextNode>, any, any, import("vue-demi").ComputedOptions, import("vue-demi").MethodOptions, any, any, any, any> | import("vue-demi").FunctionalComponent<import("@uniformdev/canvas-vue").RichTextComponentProps<RichTextNode>, any, any> | null | undefined;
|
|
5
5
|
export declare const UniformRichTextNode: import("vue-demi").DefineComponent<{
|
|
6
6
|
node: {
|
|
7
7
|
type: PropType<RichTextNode>;
|
|
@@ -22,5 +22,5 @@ export declare const UniformRichTextNode: import("vue-demi").DefineComponent<{
|
|
|
22
22
|
type: PropType<RenderRichTextComponentResolver | undefined>;
|
|
23
23
|
required: false;
|
|
24
24
|
};
|
|
25
|
-
}>>, {}>;
|
|
25
|
+
}>>, {}, {}>;
|
|
26
26
|
export default UniformRichTextNode;
|
package/dist/runtime/plugin.mjs
CHANGED
|
@@ -2,6 +2,7 @@ import {
|
|
|
2
2
|
CANVAS_DRAFT_STATE,
|
|
3
3
|
CANVAS_PUBLISHED_STATE,
|
|
4
4
|
CanvasClient,
|
|
5
|
+
IN_CONTEXT_EDITOR_PLAYGROUND_QUERY_STRING_PARAM,
|
|
5
6
|
IN_CONTEXT_EDITOR_QUERY_STRING_PARAM
|
|
6
7
|
} from "@uniformdev/canvas";
|
|
7
8
|
import { UniformComposition, UniformSlot, useCompositionEventEffect } from "@uniformdev/canvas-vue";
|
|
@@ -132,6 +133,19 @@ function setupPreview(nuxtApp) {
|
|
|
132
133
|
};
|
|
133
134
|
}
|
|
134
135
|
nuxtApp.hook("app:beforeMount", () => {
|
|
136
|
+
const options = getModuleOptions();
|
|
137
|
+
if (preview && route.query[IN_CONTEXT_EDITOR_PLAYGROUND_QUERY_STRING_PARAM] === "true" && options.playgroundPath) {
|
|
138
|
+
const pathParams = Object.fromEntries(
|
|
139
|
+
new URL(options.playgroundPath ?? "", "https://example.com").searchParams
|
|
140
|
+
);
|
|
141
|
+
router.push({
|
|
142
|
+
path: options.playgroundPath,
|
|
143
|
+
query: {
|
|
144
|
+
...route.query,
|
|
145
|
+
...pathParams
|
|
146
|
+
}
|
|
147
|
+
});
|
|
148
|
+
}
|
|
135
149
|
if (preview && (route.query.slug || route.query.path)) {
|
|
136
150
|
const path = preview?.path ?? preview?.slug;
|
|
137
151
|
const pathParams = Object.fromEntries(new URL(path ?? "", "https://example.com").searchParams);
|
|
@@ -174,7 +188,7 @@ function setupLivePreview(currentCompositionId, isPreview = false) {
|
|
|
174
188
|
await refreshNuxtData();
|
|
175
189
|
};
|
|
176
190
|
useHead({
|
|
177
|
-
titleTemplate: (title) => enabled ? `\u26A1\uFE0F ${title}` : title
|
|
191
|
+
titleTemplate: (title = "") => enabled ? `\u26A1\uFE0F ${title}` : title
|
|
178
192
|
});
|
|
179
193
|
useCompositionEventEffect({
|
|
180
194
|
compositionIdRef: currentCompositionId,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@uniformdev/uniform-nuxt",
|
|
3
|
-
"version": "19.48.
|
|
3
|
+
"version": "19.48.1-alpha.8+0418d546a",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"exports": {
|
|
@@ -24,11 +24,11 @@
|
|
|
24
24
|
},
|
|
25
25
|
"dependencies": {
|
|
26
26
|
"@nuxt/kit": "3.6.0",
|
|
27
|
-
"@uniformdev/canvas": "19.48.
|
|
28
|
-
"@uniformdev/canvas-vue": "19.48.
|
|
29
|
-
"@uniformdev/context": "19.48.
|
|
30
|
-
"@uniformdev/context-vue": "19.48.
|
|
31
|
-
"@uniformdev/richtext": "19.48.
|
|
27
|
+
"@uniformdev/canvas": "19.48.1-alpha.8+0418d546a",
|
|
28
|
+
"@uniformdev/canvas-vue": "19.48.1-alpha.8+0418d546a",
|
|
29
|
+
"@uniformdev/context": "19.48.1-alpha.8+0418d546a",
|
|
30
|
+
"@uniformdev/context-vue": "19.48.1-alpha.8+0418d546a",
|
|
31
|
+
"@uniformdev/richtext": "19.48.1-alpha.8+0418d546a",
|
|
32
32
|
"vue-demi": "^0.14.0"
|
|
33
33
|
},
|
|
34
34
|
"devDependencies": {
|
|
@@ -38,11 +38,11 @@
|
|
|
38
38
|
"esbuild": "0.19.2",
|
|
39
39
|
"eslint": "^8.31.0",
|
|
40
40
|
"nuxt": "3.6.0",
|
|
41
|
-
"vue": "3.
|
|
41
|
+
"vue": "3.3.4",
|
|
42
42
|
"vue-router": "4.1.6"
|
|
43
43
|
},
|
|
44
44
|
"publishConfig": {
|
|
45
45
|
"access": "public"
|
|
46
46
|
},
|
|
47
|
-
"gitHead": "
|
|
47
|
+
"gitHead": "0418d546ad78898515544d07f095ff03809c611c"
|
|
48
48
|
}
|