@uniformdev/uniform-nuxt 20.50.2-alpha.149 → 20.50.2-alpha.167
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,7 +636,116 @@ 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;
|
|
@@ -1318,7 +1427,7 @@ export declare const useUniformComposition: (options: (CompositionGetByNodePathP
|
|
|
1318
1427
|
editionId?: string;
|
|
1319
1428
|
editionName?: string;
|
|
1320
1429
|
editionPriority?: number;
|
|
1321
|
-
} | undefined;
|
|
1430
|
+
}) | undefined;
|
|
1322
1431
|
pending: import("vue").Ref<boolean, boolean>;
|
|
1323
1432
|
error: import("vue").Ref<import("#app").NuxtError<unknown> | undefined, import("#app").NuxtError<unknown> | undefined>;
|
|
1324
1433
|
}>;
|
|
@@ -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<({
|
|
@@ -51,6 +51,7 @@ declare const _default: import("#app").Plugin<{
|
|
|
51
51
|
sourceCache?: string;
|
|
52
52
|
statusCodes: number[];
|
|
53
53
|
};
|
|
54
|
+
projection?: string;
|
|
54
55
|
data: unknown;
|
|
55
56
|
}[];
|
|
56
57
|
};
|
|
@@ -841,6 +842,7 @@ declare const _default: import("#app").Plugin<{
|
|
|
841
842
|
sourceCache?: string;
|
|
842
843
|
statusCodes: number[];
|
|
843
844
|
};
|
|
845
|
+
projection?: string;
|
|
844
846
|
data: unknown;
|
|
845
847
|
}[];
|
|
846
848
|
};
|
|
@@ -1603,7 +1605,7 @@ declare const _default: import("#app").Plugin<{
|
|
|
1603
1605
|
uniformIsSetup: boolean;
|
|
1604
1606
|
useUniformContext: () => import("@uniformdev/context-vue").UniformContextProps;
|
|
1605
1607
|
preview: PreviewState | undefined;
|
|
1606
|
-
uniformCanvasClient:
|
|
1608
|
+
uniformCanvasClient: CompositionDeliveryClient;
|
|
1607
1609
|
uniformContext: Context;
|
|
1608
1610
|
useComposition: (options: Pick<CompositionGetParameters, "compositionId" | "slug" | "state">) => Promise<{
|
|
1609
1611
|
data: Ref<({
|
|
@@ -1642,6 +1644,7 @@ declare const _default: import("#app").Plugin<{
|
|
|
1642
1644
|
sourceCache?: string;
|
|
1643
1645
|
statusCodes: number[];
|
|
1644
1646
|
};
|
|
1647
|
+
projection?: string;
|
|
1645
1648
|
data: unknown;
|
|
1646
1649
|
}[];
|
|
1647
1650
|
};
|
|
@@ -2432,6 +2435,7 @@ declare const _default: import("#app").Plugin<{
|
|
|
2432
2435
|
sourceCache?: string;
|
|
2433
2436
|
statusCodes: number[];
|
|
2434
2437
|
};
|
|
2438
|
+
projection?: string;
|
|
2435
2439
|
data: unknown;
|
|
2436
2440
|
}[];
|
|
2437
2441
|
};
|
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.50.2-alpha.
|
|
3
|
+
"version": "20.50.2-alpha.167+74e60d5bb7",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"exports": {
|
|
@@ -28,24 +28,24 @@
|
|
|
28
28
|
"apidocs-extract": "api-extractor run --local"
|
|
29
29
|
},
|
|
30
30
|
"dependencies": {
|
|
31
|
-
"@nuxt/kit": "4.
|
|
32
|
-
"@uniformdev/canvas": "20.50.2-alpha.
|
|
33
|
-
"@uniformdev/canvas-vue": "20.50.2-alpha.
|
|
34
|
-
"@uniformdev/context": "20.50.2-alpha.
|
|
35
|
-
"@uniformdev/context-vue": "20.50.2-alpha.
|
|
36
|
-
"@uniformdev/richtext": "20.50.2-alpha.
|
|
31
|
+
"@nuxt/kit": "4.4.8",
|
|
32
|
+
"@uniformdev/canvas": "20.50.2-alpha.167+74e60d5bb7",
|
|
33
|
+
"@uniformdev/canvas-vue": "20.50.2-alpha.167+74e60d5bb7",
|
|
34
|
+
"@uniformdev/context": "20.50.2-alpha.167+74e60d5bb7",
|
|
35
|
+
"@uniformdev/context-vue": "20.50.2-alpha.167+74e60d5bb7",
|
|
36
|
+
"@uniformdev/richtext": "20.50.2-alpha.167+74e60d5bb7"
|
|
37
37
|
},
|
|
38
38
|
"devDependencies": {
|
|
39
39
|
"@nuxt/module-builder": "1.0.2",
|
|
40
|
-
"@nuxt/schema": "4.
|
|
40
|
+
"@nuxt/schema": "4.4.8",
|
|
41
41
|
"@nuxtjs/eslint-config-typescript": "12.1.0",
|
|
42
|
-
"esbuild": "0.
|
|
43
|
-
"nuxt": "4.
|
|
44
|
-
"vue": "3.5.
|
|
42
|
+
"esbuild": "0.28.1",
|
|
43
|
+
"nuxt": "4.4.8",
|
|
44
|
+
"vue": "3.5.38",
|
|
45
45
|
"vue-router": "4.5.1"
|
|
46
46
|
},
|
|
47
47
|
"publishConfig": {
|
|
48
48
|
"access": "public"
|
|
49
49
|
},
|
|
50
|
-
"gitHead": "
|
|
50
|
+
"gitHead": "74e60d5bb79fe1c4d446e4d3e6edf9f08850be4f"
|
|
51
51
|
}
|