@uniformdev/uniform-nuxt 20.50.2-alpha.167 → 20.50.2-alpha.180

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
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "nuxt-uniform",
3
3
  "configKey": "uniform",
4
- "version": "20.50.2-alpha.167+74e60d5bb7",
4
+ "version": "20.50.2-alpha.180+0be2307590",
5
5
  "builder": {
6
6
  "@nuxt/module-builder": "1.0.2",
7
7
  "unbuild": "unknown"
@@ -636,116 +636,7 @@ export declare const useUniformComposition: (options: (CompositionGetByNodePathP
636
636
  _name: string;
637
637
  type: string;
638
638
  } | undefined;
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
- } & {
639
+ fullResponse: {
749
640
  state: number;
750
641
  uiStatus?: "Draft" | "Modified" | "Published" | "Orphan" | "Previous" | "Unknown";
751
642
  projectId: string;
@@ -1427,7 +1318,7 @@ export declare const useUniformComposition: (options: (CompositionGetByNodePathP
1427
1318
  editionId?: string;
1428
1319
  editionName?: string;
1429
1320
  editionPriority?: number;
1430
- }) | undefined;
1321
+ } | undefined;
1431
1322
  pending: import("vue").Ref<boolean, boolean>;
1432
1323
  error: import("vue").Ref<import("#app").NuxtError<unknown> | undefined, import("#app").NuxtError<unknown> | undefined>;
1433
1324
  }>;
@@ -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.get({
26
+ response = await canvasClient.getCompositionBySlug({
27
27
  ...parameters,
28
28
  state
29
29
  });
30
30
  } else if ("compositionId" in parameters) {
31
- response = await canvasClient.get({
31
+ response = await canvasClient.getCompositionById({
32
32
  ...parameters,
33
33
  state
34
34
  });
35
35
  } else if ("projectMapNodeId" in parameters) {
36
- response = await canvasClient.get({
36
+ response = await canvasClient.getCompositionByNodeId({
37
37
  ...parameters,
38
38
  state
39
39
  });
40
40
  } else if ("projectMapNodePath" in parameters) {
41
- response = await canvasClient.get({
41
+ response = await canvasClient.getCompositionByNodePath({
42
42
  ...parameters,
43
43
  state
44
44
  });
@@ -1,4 +1,4 @@
1
- import { CompositionDeliveryClient, CompositionGetParameters } from '@uniformdev/canvas';
1
+ import { CanvasClient, 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: CompositionDeliveryClient;
15
+ uniformCanvasClient: CanvasClient;
16
16
  uniformContext: Context;
17
17
  useComposition: (options: Pick<CompositionGetParameters, "compositionId" | "slug" | "state">) => Promise<{
18
18
  data: Ref<({
@@ -1605,7 +1605,7 @@ declare const _default: import("#app").Plugin<{
1605
1605
  uniformIsSetup: boolean;
1606
1606
  useUniformContext: () => import("@uniformdev/context-vue").UniformContextProps;
1607
1607
  preview: PreviewState | undefined;
1608
- uniformCanvasClient: CompositionDeliveryClient;
1608
+ uniformCanvasClient: CanvasClient;
1609
1609
  uniformContext: Context;
1610
1610
  useComposition: (options: Pick<CompositionGetParameters, "compositionId" | "slug" | "state">) => Promise<{
1611
1611
  data: Ref<({
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  CANVAS_DRAFT_STATE,
3
3
  CANVAS_PUBLISHED_STATE,
4
- CompositionDeliveryClient,
4
+ CanvasClient,
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 CompositionDeliveryClient({
112
+ const uniformCanvasClient = new CanvasClient({
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.get({ slug, state });
190
+ return await uniformCanvasClient.getCompositionBySlug({ slug, state });
191
191
  } else if (compositionId) {
192
- return await uniformCanvasClient.get({ compositionId, state });
192
+ return await uniformCanvasClient.getCompositionById({ 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.167+74e60d5bb7",
3
+ "version": "20.50.2-alpha.180+0be2307590",
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.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"
32
+ "@uniformdev/canvas": "20.50.2-alpha.180+0be2307590",
33
+ "@uniformdev/canvas-vue": "20.50.2-alpha.180+0be2307590",
34
+ "@uniformdev/context": "20.50.2-alpha.180+0be2307590",
35
+ "@uniformdev/context-vue": "20.50.2-alpha.180+0be2307590",
36
+ "@uniformdev/richtext": "20.50.2-alpha.180+0be2307590"
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": "74e60d5bb79fe1c4d446e4d3e6edf9f08850be4f"
50
+ "gitHead": "0be23075901a6fd0acd8166a2bea65fbd5589789"
51
51
  }