@uniformdev/canvas 19.90.1-alpha.8 → 19.92.2

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/index.d.mts CHANGED
@@ -3103,6 +3103,8 @@ interface components$4 {
3103
3103
  _slug?: string;
3104
3104
  /** @description Name of the author of the most recent change. */
3105
3105
  _author?: string;
3106
+ /** @description Name of the original creator. */
3107
+ _creator?: string;
3106
3108
  /** @description Indicates this content entry should be sourced from a pattern library pattern. */
3107
3109
  _pattern?: string;
3108
3110
  /** @description Array of locales which have data defined on the entry. If empty, the current default locale implicitly has data. */
@@ -11015,6 +11017,8 @@ interface external$3 {
11015
11017
  _slug?: string;
11016
11018
  /** @description Name of the author of the most recent change. */
11017
11019
  _author?: string;
11020
+ /** @description Name of the original creator. */
11021
+ _creator?: string;
11018
11022
  /** @description Indicates this content entry should be sourced from a pattern library pattern. */
11019
11023
  _pattern?: string;
11020
11024
  /** @description Array of locales which have data defined on the entry. If empty, the current default locale implicitly has data. */
@@ -13335,9 +13339,11 @@ type RouteGetResponseEdgehancedComposition = Omit<RouteGetResponseComposition, '
13335
13339
 
13336
13340
  type CanvasClientOptions = ClientOptions & {
13337
13341
  edgeApiHost?: string;
13342
+ disableSWR?: boolean;
13338
13343
  };
13339
13344
  declare class CanvasClient extends ApiClient<CanvasClientOptions> {
13340
13345
  private edgeApiHost;
13346
+ private edgeApiRequestInit?;
13341
13347
  constructor(options: CanvasClientOptions);
13342
13348
  /** Fetches lists of Canvas compositions, optionally by type */
13343
13349
  getCompositionList(params?: Omit<CompositionGetParameters, 'projectId' | 'componentId' | 'compositionId' | 'slug'> & ({
@@ -13393,6 +13399,7 @@ declare class CanvasClient extends ApiClient<CanvasClientOptions> {
13393
13399
  canBeComposition?: boolean | undefined;
13394
13400
  parameters?: {
13395
13401
  id: string;
13402
+ /** Fetches a component definition's composition defaults */
13396
13403
  name: string;
13397
13404
  helpText?: string | undefined;
13398
13405
  type: string;
@@ -14028,6 +14035,7 @@ type RichTextParamValue = SerializedEditorState | undefined | null;
14028
14035
 
14029
14036
  type ContentClientOptions = ClientOptions & {
14030
14037
  edgeApiHost?: string;
14038
+ disableSWR?: boolean;
14031
14039
  };
14032
14040
  declare class ContentClient extends ApiClient<ContentClientOptions> {
14033
14041
  #private;
@@ -14709,6 +14717,7 @@ declare class PromptClient extends ApiClient {
14709
14717
 
14710
14718
  type RouteClientOptions = Omit<ClientOptions, 'apiHost'> & {
14711
14719
  edgeApiHost?: string;
14720
+ disableSWR?: boolean;
14712
14721
  };
14713
14722
  /** A route API response with edgehancer composition result */
14714
14723
  type ResolvedRouteGetResponse = RouteGetResponseNotFound | RouteGetResponseRedirect | RouteGetResponseEdgehancedComposition;
package/dist/index.d.ts CHANGED
@@ -3103,6 +3103,8 @@ interface components$4 {
3103
3103
  _slug?: string;
3104
3104
  /** @description Name of the author of the most recent change. */
3105
3105
  _author?: string;
3106
+ /** @description Name of the original creator. */
3107
+ _creator?: string;
3106
3108
  /** @description Indicates this content entry should be sourced from a pattern library pattern. */
3107
3109
  _pattern?: string;
3108
3110
  /** @description Array of locales which have data defined on the entry. If empty, the current default locale implicitly has data. */
@@ -11015,6 +11017,8 @@ interface external$3 {
11015
11017
  _slug?: string;
11016
11018
  /** @description Name of the author of the most recent change. */
11017
11019
  _author?: string;
11020
+ /** @description Name of the original creator. */
11021
+ _creator?: string;
11018
11022
  /** @description Indicates this content entry should be sourced from a pattern library pattern. */
11019
11023
  _pattern?: string;
11020
11024
  /** @description Array of locales which have data defined on the entry. If empty, the current default locale implicitly has data. */
@@ -13335,9 +13339,11 @@ type RouteGetResponseEdgehancedComposition = Omit<RouteGetResponseComposition, '
13335
13339
 
13336
13340
  type CanvasClientOptions = ClientOptions & {
13337
13341
  edgeApiHost?: string;
13342
+ disableSWR?: boolean;
13338
13343
  };
13339
13344
  declare class CanvasClient extends ApiClient<CanvasClientOptions> {
13340
13345
  private edgeApiHost;
13346
+ private edgeApiRequestInit?;
13341
13347
  constructor(options: CanvasClientOptions);
13342
13348
  /** Fetches lists of Canvas compositions, optionally by type */
13343
13349
  getCompositionList(params?: Omit<CompositionGetParameters, 'projectId' | 'componentId' | 'compositionId' | 'slug'> & ({
@@ -13393,6 +13399,7 @@ declare class CanvasClient extends ApiClient<CanvasClientOptions> {
13393
13399
  canBeComposition?: boolean | undefined;
13394
13400
  parameters?: {
13395
13401
  id: string;
13402
+ /** Fetches a component definition's composition defaults */
13396
13403
  name: string;
13397
13404
  helpText?: string | undefined;
13398
13405
  type: string;
@@ -14028,6 +14035,7 @@ type RichTextParamValue = SerializedEditorState | undefined | null;
14028
14035
 
14029
14036
  type ContentClientOptions = ClientOptions & {
14030
14037
  edgeApiHost?: string;
14038
+ disableSWR?: boolean;
14031
14039
  };
14032
14040
  declare class ContentClient extends ApiClient<ContentClientOptions> {
14033
14041
  #private;
@@ -14709,6 +14717,7 @@ declare class PromptClient extends ApiClient {
14709
14717
 
14710
14718
  type RouteClientOptions = Omit<ClientOptions, 'apiHost'> & {
14711
14719
  edgeApiHost?: string;
14720
+ disableSWR?: boolean;
14712
14721
  };
14713
14722
  /** A route API response with edgehancer composition result */
14714
14723
  type ResolvedRouteGetResponse = RouteGetResponseNotFound | RouteGetResponseRedirect | RouteGetResponseEdgehancedComposition;
package/dist/index.esm.js CHANGED
@@ -476,6 +476,7 @@ var CanvasClient = class extends ApiClient {
476
476
  }
477
477
  super(options);
478
478
  this.edgeApiHost = (_a = options.edgeApiHost) != null ? _a : "https://uniform.global";
479
+ this.edgeApiRequestInit = options.disableSWR ? { headers: { "x-disable-swr": "true" } } : void 0;
479
480
  }
480
481
  /** Fetches lists of Canvas compositions, optionally by type */
481
482
  async getCompositionList(params = {}) {
@@ -491,7 +492,7 @@ var CanvasClient = class extends ApiClient {
491
492
  ...params.diagnostics ? { diagnostics: "true" } : {}
492
493
  };
493
494
  const edgeUrl = this.createUrl("/api/v1/compositions", edgeParams, this.edgeApiHost);
494
- return this.apiClient(edgeUrl);
495
+ return this.apiClient(edgeUrl, this.edgeApiRequestInit);
495
496
  }
496
497
  getCompositionByNodePath(options) {
497
498
  return this.getOneComposition(options);
@@ -531,7 +532,7 @@ var CanvasClient = class extends ApiClient {
531
532
  ...diagnostics ? { diagnostics: "true" } : {}
532
533
  };
533
534
  const edgeUrl = this.createUrl("/api/v1/composition", edgeParams, this.edgeApiHost);
534
- return this.apiClient(edgeUrl);
535
+ return this.apiClient(edgeUrl, this.edgeApiRequestInit);
535
536
  }
536
537
  /** Updates or creates a Canvas component definition */
537
538
  async updateComposition(body) {
@@ -708,8 +709,15 @@ var _ContentClient = class _ContentClient extends ApiClient4 {
708
709
  getEntries(options) {
709
710
  const { projectId } = this.options;
710
711
  const { skipDataResolution, ...params } = options;
711
- const fetchUri = skipDataResolution ? this.createUrl(__privateGet(_ContentClient, _entriesUrl), { ...params, projectId }) : this.createUrl(__privateGet(_ContentClient, _entriesUrl), this.getEdgeOptions(params), this.edgeApiHost);
712
- return this.apiClient(fetchUri);
712
+ if (skipDataResolution) {
713
+ const url = this.createUrl(__privateGet(_ContentClient, _entriesUrl), { ...params, projectId });
714
+ return this.apiClient(url);
715
+ }
716
+ const edgeUrl = this.createUrl(__privateGet(_ContentClient, _entriesUrl), this.getEdgeOptions(params), this.edgeApiHost);
717
+ return this.apiClient(
718
+ edgeUrl,
719
+ this.options.disableSWR ? { headers: { "x-disable-swr": "true" } } : void 0
720
+ );
713
721
  }
714
722
  /** Fetches historical versions of an entry */
715
723
  async getEntryHistory(options) {
@@ -2296,7 +2304,10 @@ var RouteClient = class extends ApiClient9 {
2296
2304
  async getRoute(options) {
2297
2305
  const { projectId } = this.options;
2298
2306
  const fetchUri = this.createUrl(ROUTE_URL, { ...options, projectId }, this.edgeApiHost);
2299
- return await this.apiClient(fetchUri);
2307
+ return await this.apiClient(
2308
+ fetchUri,
2309
+ this.options.disableSWR ? { headers: { "x-disable-swr": "true" } } : void 0
2310
+ );
2300
2311
  }
2301
2312
  };
2302
2313
 
package/dist/index.js CHANGED
@@ -603,6 +603,7 @@ var CanvasClient = class extends import_api2.ApiClient {
603
603
  }
604
604
  super(options);
605
605
  this.edgeApiHost = (_a = options.edgeApiHost) != null ? _a : "https://uniform.global";
606
+ this.edgeApiRequestInit = options.disableSWR ? { headers: { "x-disable-swr": "true" } } : void 0;
606
607
  }
607
608
  /** Fetches lists of Canvas compositions, optionally by type */
608
609
  async getCompositionList(params = {}) {
@@ -618,7 +619,7 @@ var CanvasClient = class extends import_api2.ApiClient {
618
619
  ...params.diagnostics ? { diagnostics: "true" } : {}
619
620
  };
620
621
  const edgeUrl = this.createUrl("/api/v1/compositions", edgeParams, this.edgeApiHost);
621
- return this.apiClient(edgeUrl);
622
+ return this.apiClient(edgeUrl, this.edgeApiRequestInit);
622
623
  }
623
624
  getCompositionByNodePath(options) {
624
625
  return this.getOneComposition(options);
@@ -658,7 +659,7 @@ var CanvasClient = class extends import_api2.ApiClient {
658
659
  ...diagnostics ? { diagnostics: "true" } : {}
659
660
  };
660
661
  const edgeUrl = this.createUrl("/api/v1/composition", edgeParams, this.edgeApiHost);
661
- return this.apiClient(edgeUrl);
662
+ return this.apiClient(edgeUrl, this.edgeApiRequestInit);
662
663
  }
663
664
  /** Updates or creates a Canvas component definition */
664
665
  async updateComposition(body) {
@@ -835,8 +836,15 @@ var _ContentClient = class _ContentClient extends import_api5.ApiClient {
835
836
  getEntries(options) {
836
837
  const { projectId } = this.options;
837
838
  const { skipDataResolution, ...params } = options;
838
- const fetchUri = skipDataResolution ? this.createUrl(__privateGet(_ContentClient, _entriesUrl), { ...params, projectId }) : this.createUrl(__privateGet(_ContentClient, _entriesUrl), this.getEdgeOptions(params), this.edgeApiHost);
839
- return this.apiClient(fetchUri);
839
+ if (skipDataResolution) {
840
+ const url = this.createUrl(__privateGet(_ContentClient, _entriesUrl), { ...params, projectId });
841
+ return this.apiClient(url);
842
+ }
843
+ const edgeUrl = this.createUrl(__privateGet(_ContentClient, _entriesUrl), this.getEdgeOptions(params), this.edgeApiHost);
844
+ return this.apiClient(
845
+ edgeUrl,
846
+ this.options.disableSWR ? { headers: { "x-disable-swr": "true" } } : void 0
847
+ );
840
848
  }
841
849
  /** Fetches historical versions of an entry */
842
850
  async getEntryHistory(options) {
@@ -2423,7 +2431,10 @@ var RouteClient = class extends import_api10.ApiClient {
2423
2431
  async getRoute(options) {
2424
2432
  const { projectId } = this.options;
2425
2433
  const fetchUri = this.createUrl(ROUTE_URL, { ...options, projectId }, this.edgeApiHost);
2426
- return await this.apiClient(fetchUri);
2434
+ return await this.apiClient(
2435
+ fetchUri,
2436
+ this.options.disableSWR ? { headers: { "x-disable-swr": "true" } } : void 0
2437
+ );
2427
2438
  }
2428
2439
  };
2429
2440
 
package/dist/index.mjs CHANGED
@@ -476,6 +476,7 @@ var CanvasClient = class extends ApiClient {
476
476
  }
477
477
  super(options);
478
478
  this.edgeApiHost = (_a = options.edgeApiHost) != null ? _a : "https://uniform.global";
479
+ this.edgeApiRequestInit = options.disableSWR ? { headers: { "x-disable-swr": "true" } } : void 0;
479
480
  }
480
481
  /** Fetches lists of Canvas compositions, optionally by type */
481
482
  async getCompositionList(params = {}) {
@@ -491,7 +492,7 @@ var CanvasClient = class extends ApiClient {
491
492
  ...params.diagnostics ? { diagnostics: "true" } : {}
492
493
  };
493
494
  const edgeUrl = this.createUrl("/api/v1/compositions", edgeParams, this.edgeApiHost);
494
- return this.apiClient(edgeUrl);
495
+ return this.apiClient(edgeUrl, this.edgeApiRequestInit);
495
496
  }
496
497
  getCompositionByNodePath(options) {
497
498
  return this.getOneComposition(options);
@@ -531,7 +532,7 @@ var CanvasClient = class extends ApiClient {
531
532
  ...diagnostics ? { diagnostics: "true" } : {}
532
533
  };
533
534
  const edgeUrl = this.createUrl("/api/v1/composition", edgeParams, this.edgeApiHost);
534
- return this.apiClient(edgeUrl);
535
+ return this.apiClient(edgeUrl, this.edgeApiRequestInit);
535
536
  }
536
537
  /** Updates or creates a Canvas component definition */
537
538
  async updateComposition(body) {
@@ -708,8 +709,15 @@ var _ContentClient = class _ContentClient extends ApiClient4 {
708
709
  getEntries(options) {
709
710
  const { projectId } = this.options;
710
711
  const { skipDataResolution, ...params } = options;
711
- const fetchUri = skipDataResolution ? this.createUrl(__privateGet(_ContentClient, _entriesUrl), { ...params, projectId }) : this.createUrl(__privateGet(_ContentClient, _entriesUrl), this.getEdgeOptions(params), this.edgeApiHost);
712
- return this.apiClient(fetchUri);
712
+ if (skipDataResolution) {
713
+ const url = this.createUrl(__privateGet(_ContentClient, _entriesUrl), { ...params, projectId });
714
+ return this.apiClient(url);
715
+ }
716
+ const edgeUrl = this.createUrl(__privateGet(_ContentClient, _entriesUrl), this.getEdgeOptions(params), this.edgeApiHost);
717
+ return this.apiClient(
718
+ edgeUrl,
719
+ this.options.disableSWR ? { headers: { "x-disable-swr": "true" } } : void 0
720
+ );
713
721
  }
714
722
  /** Fetches historical versions of an entry */
715
723
  async getEntryHistory(options) {
@@ -2296,7 +2304,10 @@ var RouteClient = class extends ApiClient9 {
2296
2304
  async getRoute(options) {
2297
2305
  const { projectId } = this.options;
2298
2306
  const fetchUri = this.createUrl(ROUTE_URL, { ...options, projectId }, this.edgeApiHost);
2299
- return await this.apiClient(fetchUri);
2307
+ return await this.apiClient(
2308
+ fetchUri,
2309
+ this.options.disableSWR ? { headers: { "x-disable-swr": "true" } } : void 0
2310
+ );
2300
2311
  }
2301
2312
  };
2302
2313
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@uniformdev/canvas",
3
- "version": "19.90.1-alpha.8+b7a030f80",
3
+ "version": "19.92.2",
4
4
  "description": "Common functionality and types for Uniform Canvas",
5
5
  "license": "SEE LICENSE IN LICENSE.txt",
6
6
  "main": "./dist/index.js",
@@ -38,8 +38,8 @@
38
38
  "pusher-js": "8.2.0"
39
39
  },
40
40
  "dependencies": {
41
- "@uniformdev/assets": "19.90.1-alpha.8+b7a030f80",
42
- "@uniformdev/context": "19.90.1-alpha.8+b7a030f80",
41
+ "@uniformdev/assets": "19.92.2",
42
+ "@uniformdev/context": "19.92.2",
43
43
  "immer": "10.0.3"
44
44
  },
45
45
  "files": [
@@ -48,5 +48,5 @@
48
48
  "publishConfig": {
49
49
  "access": "public"
50
50
  },
51
- "gitHead": "b7a030f80fb1ba2389f8d9e1f34329da488dcf4c"
51
+ "gitHead": "8a0bea83eef2d7353758902ed61920b39187c00a"
52
52
  }