@uniformdev/uniform-nuxt 19.214.0 → 19.214.1-alpha.10
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.json +1 -1
- package/dist/runtime/plugin.js +1 -19
- package/package.json +7 -7
package/dist/module.json
CHANGED
package/dist/runtime/plugin.js
CHANGED
|
@@ -5,7 +5,7 @@ import {
|
|
|
5
5
|
IN_CONTEXT_EDITOR_PLAYGROUND_QUERY_STRING_PARAM,
|
|
6
6
|
IN_CONTEXT_EDITOR_QUERY_STRING_PARAM
|
|
7
7
|
} from "@uniformdev/canvas";
|
|
8
|
-
import { UniformComposition, UniformSlot
|
|
8
|
+
import { UniformComposition, UniformSlot } from "@uniformdev/canvas-vue";
|
|
9
9
|
import {
|
|
10
10
|
Context,
|
|
11
11
|
CookieTransitionDataStore,
|
|
@@ -21,7 +21,6 @@ import {
|
|
|
21
21
|
import { toRaw, watch } from "vue";
|
|
22
22
|
import {
|
|
23
23
|
defineNuxtPlugin,
|
|
24
|
-
refreshNuxtData,
|
|
25
24
|
useAsyncData,
|
|
26
25
|
useCookie,
|
|
27
26
|
useHead,
|
|
@@ -45,7 +44,6 @@ export default defineNuxtPlugin((nuxtApp) => {
|
|
|
45
44
|
const preview = setupPreview(nuxtApp);
|
|
46
45
|
const uniformContextData = setupContext(nuxtApp);
|
|
47
46
|
const uniformCanvasClient = setupCanvas(nuxtApp);
|
|
48
|
-
setupLivePreview(currentCompositionId, Boolean(preview));
|
|
49
47
|
const useComposition = setupUseComposition(uniformCanvasClient, currentCompositionId, preview);
|
|
50
48
|
return {
|
|
51
49
|
provide: {
|
|
@@ -182,22 +180,6 @@ function setupPreview(nuxtApp) {
|
|
|
182
180
|
});
|
|
183
181
|
return preview;
|
|
184
182
|
}
|
|
185
|
-
function setupLivePreview(currentCompositionId, isPreview = false) {
|
|
186
|
-
const { projectId } = getModuleOptions();
|
|
187
|
-
const enabled = isPreview;
|
|
188
|
-
const onCompositionChange = async () => {
|
|
189
|
-
await refreshNuxtData();
|
|
190
|
-
};
|
|
191
|
-
useHead({
|
|
192
|
-
titleTemplate: (title = "") => enabled ? `\u26A1\uFE0F ${title}` : title
|
|
193
|
-
});
|
|
194
|
-
useCompositionEventEffect({
|
|
195
|
-
compositionIdRef: currentCompositionId,
|
|
196
|
-
projectId,
|
|
197
|
-
enabled,
|
|
198
|
-
effect: onCompositionChange
|
|
199
|
-
});
|
|
200
|
-
}
|
|
201
183
|
function setupUseComposition(uniformCanvasClient, currentCompositionId, preview) {
|
|
202
184
|
const useComposition = async (options) => {
|
|
203
185
|
const slug = preview?.slug ?? options.slug;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@uniformdev/uniform-nuxt",
|
|
3
|
-
"version": "19.214.
|
|
3
|
+
"version": "19.214.1-alpha.10+98dac3377a",
|
|
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.13.2",
|
|
27
|
-
"@uniformdev/canvas": "19.214.
|
|
28
|
-
"@uniformdev/canvas-vue": "19.214.
|
|
29
|
-
"@uniformdev/context": "19.214.
|
|
30
|
-
"@uniformdev/context-vue": "19.214.
|
|
31
|
-
"@uniformdev/richtext": "19.214.
|
|
27
|
+
"@uniformdev/canvas": "19.214.1-alpha.10+98dac3377a",
|
|
28
|
+
"@uniformdev/canvas-vue": "19.214.1-alpha.10+98dac3377a",
|
|
29
|
+
"@uniformdev/context": "19.214.1-alpha.10+98dac3377a",
|
|
30
|
+
"@uniformdev/context-vue": "19.214.1-alpha.10+98dac3377a",
|
|
31
|
+
"@uniformdev/richtext": "19.214.1-alpha.10+98dac3377a"
|
|
32
32
|
},
|
|
33
33
|
"devDependencies": {
|
|
34
34
|
"@nuxt/module-builder": "0.8.4",
|
|
@@ -43,5 +43,5 @@
|
|
|
43
43
|
"publishConfig": {
|
|
44
44
|
"access": "public"
|
|
45
45
|
},
|
|
46
|
-
"gitHead": "
|
|
46
|
+
"gitHead": "98dac3377a8313b1d70d0b02632a6a7192f2409c"
|
|
47
47
|
}
|