@uniformdev/uniform-nuxt 20.73.1-alpha.13 → 20.74.2-alpha.26
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
CHANGED
|
@@ -636,12 +636,122 @@ export declare const useUniformComposition: (options: (CompositionGetByNodePathP
|
|
|
636
636
|
_name: string;
|
|
637
637
|
type: string;
|
|
638
638
|
} | undefined;
|
|
639
|
-
fullResponse: {
|
|
639
|
+
fullResponse: ({
|
|
640
|
+
wholeResponseCacheDiagnostics?: {
|
|
641
|
+
info: string;
|
|
642
|
+
cacheTtl: number;
|
|
643
|
+
cachedAt: string;
|
|
644
|
+
edgeLocation?: string;
|
|
645
|
+
requestId: string;
|
|
646
|
+
};
|
|
647
|
+
diagnostics?: {
|
|
648
|
+
edgeLocation?: string;
|
|
649
|
+
originFetch?: {
|
|
650
|
+
duration: number;
|
|
651
|
+
cacheHit: boolean;
|
|
652
|
+
isValid: boolean;
|
|
653
|
+
sourceCache?: "edge-cdn-cache" | "long-term-cache" | "api-cache";
|
|
654
|
+
cacheLocation?: string;
|
|
655
|
+
requestId?: string;
|
|
656
|
+
ignoredQueryParams?: string[];
|
|
657
|
+
};
|
|
658
|
+
configRetrieval?: {
|
|
659
|
+
duration: number;
|
|
660
|
+
dataTypeCount: number;
|
|
661
|
+
};
|
|
662
|
+
} & {
|
|
663
|
+
data?: {
|
|
664
|
+
componentPath: string;
|
|
665
|
+
dataType: string;
|
|
666
|
+
dataName: string;
|
|
667
|
+
performance: {
|
|
668
|
+
cacheHit: boolean;
|
|
669
|
+
total: number;
|
|
670
|
+
retryCount: number;
|
|
671
|
+
retryDelay: number;
|
|
672
|
+
sourceCache?: string;
|
|
673
|
+
statusCodes: number[];
|
|
674
|
+
};
|
|
675
|
+
projection?: string;
|
|
676
|
+
data: unknown;
|
|
677
|
+
}[];
|
|
678
|
+
};
|
|
679
|
+
errors?: {
|
|
680
|
+
componentId?: string;
|
|
681
|
+
componentPath?: string;
|
|
682
|
+
componentType?: string;
|
|
683
|
+
message: string;
|
|
684
|
+
type: string;
|
|
685
|
+
parameterName?: string;
|
|
686
|
+
expression?: {
|
|
687
|
+
pointer: string;
|
|
688
|
+
syntax: "jptr";
|
|
689
|
+
failureAction?: "t" | "p" | "c" | "a";
|
|
690
|
+
failureLogLevel?: "e" | "w" | "i";
|
|
691
|
+
failureDefault?: string;
|
|
692
|
+
};
|
|
693
|
+
dataName?: string;
|
|
694
|
+
dataType?: string;
|
|
695
|
+
inputName?: string;
|
|
696
|
+
code?: string;
|
|
697
|
+
locale?: string;
|
|
698
|
+
conditionIndex?: number;
|
|
699
|
+
clauseIndex?: number;
|
|
700
|
+
statusCode?: number;
|
|
701
|
+
}[];
|
|
702
|
+
warnings?: {
|
|
703
|
+
componentId?: string;
|
|
704
|
+
componentPath?: string;
|
|
705
|
+
componentType?: string;
|
|
706
|
+
message: string;
|
|
707
|
+
type: string;
|
|
708
|
+
parameterName?: string;
|
|
709
|
+
expression?: {
|
|
710
|
+
pointer: string;
|
|
711
|
+
syntax: "jptr";
|
|
712
|
+
failureAction?: "t" | "p" | "c" | "a";
|
|
713
|
+
failureLogLevel?: "e" | "w" | "i";
|
|
714
|
+
failureDefault?: string;
|
|
715
|
+
};
|
|
716
|
+
dataName?: string;
|
|
717
|
+
dataType?: string;
|
|
718
|
+
inputName?: string;
|
|
719
|
+
code?: string;
|
|
720
|
+
locale?: string;
|
|
721
|
+
conditionIndex?: number;
|
|
722
|
+
clauseIndex?: number;
|
|
723
|
+
statusCode?: number;
|
|
724
|
+
}[];
|
|
725
|
+
infos?: {
|
|
726
|
+
componentId?: string;
|
|
727
|
+
componentPath?: string;
|
|
728
|
+
componentType?: string;
|
|
729
|
+
message: string;
|
|
730
|
+
type: string;
|
|
731
|
+
parameterName?: string;
|
|
732
|
+
expression?: {
|
|
733
|
+
pointer: string;
|
|
734
|
+
syntax: "jptr";
|
|
735
|
+
failureAction?: "t" | "p" | "c" | "a";
|
|
736
|
+
failureLogLevel?: "e" | "w" | "i";
|
|
737
|
+
failureDefault?: string;
|
|
738
|
+
};
|
|
739
|
+
dataName?: string;
|
|
740
|
+
dataType?: string;
|
|
741
|
+
inputName?: string;
|
|
742
|
+
code?: string;
|
|
743
|
+
locale?: string;
|
|
744
|
+
conditionIndex?: number;
|
|
745
|
+
clauseIndex?: number;
|
|
746
|
+
statusCode?: number;
|
|
747
|
+
}[];
|
|
748
|
+
} & {
|
|
640
749
|
state: number;
|
|
641
750
|
uiStatus?: "Draft" | "Modified" | "Published" | "Orphan" | "Previous" | "Unknown";
|
|
642
751
|
projectId: string;
|
|
643
752
|
created: string;
|
|
644
753
|
modified: string;
|
|
754
|
+
deletedAt?: string;
|
|
645
755
|
creator?: string;
|
|
646
756
|
author?: string;
|
|
647
757
|
categoryId?: string;
|
|
@@ -1318,7 +1428,7 @@ export declare const useUniformComposition: (options: (CompositionGetByNodePathP
|
|
|
1318
1428
|
editionId?: string;
|
|
1319
1429
|
editionName?: string;
|
|
1320
1430
|
editionPriority?: number;
|
|
1321
|
-
} | undefined;
|
|
1431
|
+
}) | undefined;
|
|
1322
1432
|
pending: import("vue").Ref<boolean, boolean>;
|
|
1323
1433
|
error: import("vue").Ref<import("#app").NuxtError<unknown> | undefined, import("#app").NuxtError<unknown> | undefined>;
|
|
1324
1434
|
}>;
|
|
@@ -23,22 +23,22 @@ export const useUniformComposition = async (options) => {
|
|
|
23
23
|
const state = previewState ? CANVAS_DRAFT_STATE : CANVAS_PUBLISHED_STATE;
|
|
24
24
|
let response = void 0;
|
|
25
25
|
if ("slug" in parameters) {
|
|
26
|
-
response = await canvasClient.
|
|
26
|
+
response = await canvasClient.get({
|
|
27
27
|
...parameters,
|
|
28
28
|
state
|
|
29
29
|
});
|
|
30
30
|
} else if ("compositionId" in parameters) {
|
|
31
|
-
response = await canvasClient.
|
|
31
|
+
response = await canvasClient.get({
|
|
32
32
|
...parameters,
|
|
33
33
|
state
|
|
34
34
|
});
|
|
35
35
|
} else if ("projectMapNodeId" in parameters) {
|
|
36
|
-
response = await canvasClient.
|
|
36
|
+
response = await canvasClient.get({
|
|
37
37
|
...parameters,
|
|
38
38
|
state
|
|
39
39
|
});
|
|
40
40
|
} else if ("projectMapNodePath" in parameters) {
|
|
41
|
-
response = await canvasClient.
|
|
41
|
+
response = await canvasClient.get({
|
|
42
42
|
...parameters,
|
|
43
43
|
state
|
|
44
44
|
});
|
package/dist/runtime/plugin.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { CompositionDeliveryClient, CompositionGetParameters } from '@uniformdev/canvas';
|
|
2
2
|
import { Context } from '@uniformdev/context';
|
|
3
3
|
import { type Ref } from 'vue';
|
|
4
4
|
export type PreviewState = {
|
|
@@ -12,7 +12,7 @@ declare const _default: import("#app").Plugin<{
|
|
|
12
12
|
uniformIsSetup: boolean;
|
|
13
13
|
useUniformContext: () => import("@uniformdev/context-vue").UniformContextProps;
|
|
14
14
|
preview: PreviewState | undefined;
|
|
15
|
-
uniformCanvasClient:
|
|
15
|
+
uniformCanvasClient: CompositionDeliveryClient;
|
|
16
16
|
uniformContext: Context;
|
|
17
17
|
useComposition: (options: Pick<CompositionGetParameters, "compositionId" | "slug" | "state">) => Promise<{
|
|
18
18
|
data: Ref<({
|
|
@@ -130,6 +130,7 @@ declare const _default: import("#app").Plugin<{
|
|
|
130
130
|
projectId: string;
|
|
131
131
|
created: string;
|
|
132
132
|
modified: string;
|
|
133
|
+
deletedAt?: string;
|
|
133
134
|
creator?: string;
|
|
134
135
|
author?: string;
|
|
135
136
|
categoryId?: string;
|
|
@@ -921,6 +922,7 @@ declare const _default: import("#app").Plugin<{
|
|
|
921
922
|
projectId: string;
|
|
922
923
|
created: string;
|
|
923
924
|
modified: string;
|
|
925
|
+
deletedAt?: string;
|
|
924
926
|
creator?: string;
|
|
925
927
|
author?: string;
|
|
926
928
|
categoryId?: string;
|
|
@@ -1605,7 +1607,7 @@ declare const _default: import("#app").Plugin<{
|
|
|
1605
1607
|
uniformIsSetup: boolean;
|
|
1606
1608
|
useUniformContext: () => import("@uniformdev/context-vue").UniformContextProps;
|
|
1607
1609
|
preview: PreviewState | undefined;
|
|
1608
|
-
uniformCanvasClient:
|
|
1610
|
+
uniformCanvasClient: CompositionDeliveryClient;
|
|
1609
1611
|
uniformContext: Context;
|
|
1610
1612
|
useComposition: (options: Pick<CompositionGetParameters, "compositionId" | "slug" | "state">) => Promise<{
|
|
1611
1613
|
data: Ref<({
|
|
@@ -1723,6 +1725,7 @@ declare const _default: import("#app").Plugin<{
|
|
|
1723
1725
|
projectId: string;
|
|
1724
1726
|
created: string;
|
|
1725
1727
|
modified: string;
|
|
1728
|
+
deletedAt?: string;
|
|
1726
1729
|
creator?: string;
|
|
1727
1730
|
author?: string;
|
|
1728
1731
|
categoryId?: string;
|
|
@@ -2514,6 +2517,7 @@ declare const _default: import("#app").Plugin<{
|
|
|
2514
2517
|
projectId: string;
|
|
2515
2518
|
created: string;
|
|
2516
2519
|
modified: string;
|
|
2520
|
+
deletedAt?: string;
|
|
2517
2521
|
creator?: string;
|
|
2518
2522
|
author?: string;
|
|
2519
2523
|
categoryId?: string;
|
package/dist/runtime/plugin.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import {
|
|
2
2
|
CANVAS_DRAFT_STATE,
|
|
3
3
|
CANVAS_PUBLISHED_STATE,
|
|
4
|
-
|
|
4
|
+
CompositionDeliveryClient,
|
|
5
5
|
IN_CONTEXT_EDITOR_PLAYGROUND_QUERY_STRING_PARAM,
|
|
6
6
|
IN_CONTEXT_EDITOR_QUERY_STRING_PARAM
|
|
7
7
|
} from "@uniformdev/canvas";
|
|
@@ -109,7 +109,7 @@ function setupCanvas(nuxtApp) {
|
|
|
109
109
|
const options = getModuleOptions();
|
|
110
110
|
nuxtApp.vueApp.component("Composition", UniformComposition);
|
|
111
111
|
nuxtApp.vueApp.component("SlotContent", UniformSlot);
|
|
112
|
-
const uniformCanvasClient = new
|
|
112
|
+
const uniformCanvasClient = new CompositionDeliveryClient({
|
|
113
113
|
projectId: options.projectId,
|
|
114
114
|
apiKey: options.readOnlyApiKey,
|
|
115
115
|
apiHost: options.apiHost,
|
|
@@ -187,9 +187,9 @@ function setupUseComposition(uniformCanvasClient, currentCompositionId, preview)
|
|
|
187
187
|
const state = preview ? CANVAS_DRAFT_STATE : CANVAS_PUBLISHED_STATE;
|
|
188
188
|
const { data, pending, error } = await useAsyncData(`composition-${slug || compositionId}`, async () => {
|
|
189
189
|
if (slug) {
|
|
190
|
-
return await uniformCanvasClient.
|
|
190
|
+
return await uniformCanvasClient.get({ slug, state });
|
|
191
191
|
} else if (compositionId) {
|
|
192
|
-
return await uniformCanvasClient.
|
|
192
|
+
return await uniformCanvasClient.get({ compositionId, state });
|
|
193
193
|
}
|
|
194
194
|
log(
|
|
195
195
|
"uniform-nuxt: `useComposition` requires either a `slug` or a `compositionId`, but none were provided."
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@uniformdev/uniform-nuxt",
|
|
3
|
-
"version": "20.
|
|
3
|
+
"version": "20.74.2-alpha.26+464c3f6dc2",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"exports": {
|
|
@@ -29,11 +29,11 @@
|
|
|
29
29
|
},
|
|
30
30
|
"dependencies": {
|
|
31
31
|
"@nuxt/kit": "4.4.8",
|
|
32
|
-
"@uniformdev/canvas": "20.
|
|
33
|
-
"@uniformdev/canvas-vue": "20.
|
|
34
|
-
"@uniformdev/context": "20.
|
|
35
|
-
"@uniformdev/context-vue": "20.
|
|
36
|
-
"@uniformdev/richtext": "20.
|
|
32
|
+
"@uniformdev/canvas": "20.74.2-alpha.26+464c3f6dc2",
|
|
33
|
+
"@uniformdev/canvas-vue": "20.74.2-alpha.26+464c3f6dc2",
|
|
34
|
+
"@uniformdev/context": "20.74.2-alpha.26+464c3f6dc2",
|
|
35
|
+
"@uniformdev/context-vue": "20.74.2-alpha.26+464c3f6dc2",
|
|
36
|
+
"@uniformdev/richtext": "20.74.2-alpha.26+464c3f6dc2"
|
|
37
37
|
},
|
|
38
38
|
"devDependencies": {
|
|
39
39
|
"@nuxt/module-builder": "1.0.2",
|
|
@@ -47,5 +47,5 @@
|
|
|
47
47
|
"publishConfig": {
|
|
48
48
|
"access": "public"
|
|
49
49
|
},
|
|
50
|
-
"gitHead": "
|
|
50
|
+
"gitHead": "464c3f6dc27746f5e89e2f61542ed2c458c35cc5"
|
|
51
51
|
}
|