@uniformdev/canvas 17.4.1-alpha.0 → 17.4.1-alpha.230

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.
@@ -423,12 +423,16 @@ interface external$4 {
423
423
  ttl?: number;
424
424
  /** @description A key for the resource data cache purging. */
425
425
  purgeKey?: string;
426
+ /** @description URL to a custom badge icon for the Uniform dashboard for this data type. If not set falls back to the data connector or integration icons. */
427
+ badgeIconUrl?: string;
428
+ /** @description HTTP headers to pass with requests to the data type. Merged with headers from the data source, overriding identical keys. */
426
429
  headers?: {
427
430
  [key: string]: string;
428
431
  } | {
429
432
  key: string;
430
433
  value: string;
431
434
  }[];
435
+ /** @description Query String parameters to pass with requests to the data type. Merged with parameters from the data source, overriding identical keys. */
432
436
  parameters?: {
433
437
  [key: string]: string;
434
438
  } | {
@@ -454,23 +458,20 @@ interface external$4 {
454
458
  };
455
459
  /**
456
460
  * @deprecated
457
- * @description Defines the shape of a data variable on a Data Connector or Data Type
461
+ * @description Defines the shape of a data variable on a Data Source or Data Type
458
462
  */
459
463
  DataVariableDefinition: {
460
464
  /** @description Display name of the data variable */
461
465
  displayName?: string;
466
+ /** @description Explanatory text that is provided to the data resource editor to explain what this variable does. */
467
+ helpText?: string;
462
468
  /**
463
- * @description Type of the data variable
469
+ * @description Type of the data variable. Optionally used as a point of reference for custom integrations to decide how to render an editor for a variable.
464
470
  * @default text
465
471
  */
466
- type: string;
472
+ type?: string;
467
473
  /** @description Default value of the data variable */
468
474
  default: string;
469
- /**
470
- * @description Where the variable value is set. Static = set to static value by the author. Dynamic = set to a dynamic value by a runtime API request from the frontend (default is used in the editor).
471
- * @enum {string}
472
- */
473
- setBy: "static" | "dynamic";
474
475
  /** @description Sets the order of the variable when displayed in a list with other variables. If not set, the order defaults to alphabetical with any explicitly set orders first in the list. */
475
476
  order?: number;
476
477
  };
@@ -788,12 +789,16 @@ interface components$1 {
788
789
  ttl?: number;
789
790
  /** @description A key for the resource data cache purging. */
790
791
  purgeKey?: string;
792
+ /** @description URL to a custom badge icon for the Uniform dashboard for this data type. If not set falls back to the data connector or integration icons. */
793
+ badgeIconUrl?: string;
794
+ /** @description HTTP headers to pass with requests to the data type. Merged with headers from the data source, overriding identical keys. */
791
795
  headers?: {
792
796
  [key: string]: string;
793
797
  } | {
794
798
  key: string;
795
799
  value: string;
796
800
  }[];
801
+ /** @description Query String parameters to pass with requests to the data type. Merged with parameters from the data source, overriding identical keys. */
797
802
  parameters?: {
798
803
  [key: string]: string;
799
804
  } | {
@@ -819,23 +824,20 @@ interface components$1 {
819
824
  };
820
825
  /**
821
826
  * @deprecated
822
- * @description Defines the shape of a data variable on a Data Connector or Data Type
827
+ * @description Defines the shape of a data variable on a Data Source or Data Type
823
828
  */
824
829
  DataVariableDefinition: {
825
830
  /** @description Display name of the data variable */
826
831
  displayName?: string;
832
+ /** @description Explanatory text that is provided to the data resource editor to explain what this variable does. */
833
+ helpText?: string;
827
834
  /**
828
- * @description Type of the data variable
835
+ * @description Type of the data variable. Optionally used as a point of reference for custom integrations to decide how to render an editor for a variable.
829
836
  * @default text
830
837
  */
831
- type: string;
838
+ type?: string;
832
839
  /** @description Default value of the data variable */
833
840
  default: string;
834
- /**
835
- * @description Where the variable value is set. Static = set to static value by the author. Dynamic = set to a dynamic value by a runtime API request from the frontend (default is used in the editor).
836
- * @enum {string}
837
- */
838
- setBy: "static" | "dynamic";
839
841
  /** @description Sets the order of the variable when displayed in a list with other variables. If not set, the order defaults to alphabetical with any explicitly set orders first in the list. */
840
842
  order?: number;
841
843
  };
@@ -1444,12 +1446,16 @@ interface external$3 {
1444
1446
  ttl?: number;
1445
1447
  /** @description A key for the resource data cache purging. */
1446
1448
  purgeKey?: string;
1449
+ /** @description URL to a custom badge icon for the Uniform dashboard for this data type. If not set falls back to the data connector or integration icons. */
1450
+ badgeIconUrl?: string;
1451
+ /** @description HTTP headers to pass with requests to the data type. Merged with headers from the data source, overriding identical keys. */
1447
1452
  headers?: {
1448
1453
  [key: string]: string;
1449
1454
  } | {
1450
1455
  key: string;
1451
1456
  value: string;
1452
1457
  }[];
1458
+ /** @description Query String parameters to pass with requests to the data type. Merged with parameters from the data source, overriding identical keys. */
1453
1459
  parameters?: {
1454
1460
  [key: string]: string;
1455
1461
  } | {
@@ -1475,23 +1481,20 @@ interface external$3 {
1475
1481
  };
1476
1482
  /**
1477
1483
  * @deprecated
1478
- * @description Defines the shape of a data variable on a Data Connector or Data Type
1484
+ * @description Defines the shape of a data variable on a Data Source or Data Type
1479
1485
  */
1480
1486
  DataVariableDefinition: {
1481
1487
  /** @description Display name of the data variable */
1482
1488
  displayName?: string;
1489
+ /** @description Explanatory text that is provided to the data resource editor to explain what this variable does. */
1490
+ helpText?: string;
1483
1491
  /**
1484
- * @description Type of the data variable
1492
+ * @description Type of the data variable. Optionally used as a point of reference for custom integrations to decide how to render an editor for a variable.
1485
1493
  * @default text
1486
1494
  */
1487
- type: string;
1495
+ type?: string;
1488
1496
  /** @description Default value of the data variable */
1489
1497
  default: string;
1490
- /**
1491
- * @description Where the variable value is set. Static = set to static value by the author. Dynamic = set to a dynamic value by a runtime API request from the frontend (default is used in the editor).
1492
- * @enum {string}
1493
- */
1494
- setBy: "static" | "dynamic";
1495
1498
  /** @description Sets the order of the variable when displayed in a list with other variables. If not set, the order defaults to alphabetical with any explicitly set orders first in the list. */
1496
1499
  order?: number;
1497
1500
  };
@@ -1612,7 +1615,7 @@ declare type DataResolutionParameters = {
1612
1615
  unstable_dynamicVariables?: Record<string, string>;
1613
1616
  };
1614
1617
  /** Types of issue that can occur when fetching composition data */
1615
- declare type CompositionIssue = CompositionPatternIssue | DataResourceIssue | DataElementBindingIssue | DataResourceVariableIssue;
1618
+ declare type CompositionIssue = CompositionPatternIssue | DataResourceIssue | DataElementBindingIssue | DataResourceVariableIssue | DataResolutionConfigIssue;
1616
1619
  declare type CompositionIssueCore = {
1617
1620
  componentPath: string;
1618
1621
  componentType: string;
@@ -1639,6 +1642,10 @@ declare type DataResourceVariableIssue = CompositionIssueCore & {
1639
1642
  type: 'variable';
1640
1643
  variableName: string;
1641
1644
  };
1645
+ declare type DataResolutionConfigIssue = {
1646
+ message: string;
1647
+ type: 'config';
1648
+ };
1642
1649
  /** Diagnostic data about the load performance of attached composition datas */
1643
1650
  declare type CompositionDataDiagnostic = {
1644
1651
  componentPath: string;
@@ -2071,12 +2078,16 @@ interface external$2 {
2071
2078
  ttl?: number;
2072
2079
  /** @description A key for the resource data cache purging. */
2073
2080
  purgeKey?: string;
2081
+ /** @description URL to a custom badge icon for the Uniform dashboard for this data type. If not set falls back to the data connector or integration icons. */
2082
+ badgeIconUrl?: string;
2083
+ /** @description HTTP headers to pass with requests to the data type. Merged with headers from the data source, overriding identical keys. */
2074
2084
  headers?: {
2075
2085
  [key: string]: string;
2076
2086
  } | {
2077
2087
  key: string;
2078
2088
  value: string;
2079
2089
  }[];
2090
+ /** @description Query String parameters to pass with requests to the data type. Merged with parameters from the data source, overriding identical keys. */
2080
2091
  parameters?: {
2081
2092
  [key: string]: string;
2082
2093
  } | {
@@ -2102,23 +2113,20 @@ interface external$2 {
2102
2113
  };
2103
2114
  /**
2104
2115
  * @deprecated
2105
- * @description Defines the shape of a data variable on a Data Connector or Data Type
2116
+ * @description Defines the shape of a data variable on a Data Source or Data Type
2106
2117
  */
2107
2118
  DataVariableDefinition: {
2108
2119
  /** @description Display name of the data variable */
2109
2120
  displayName?: string;
2121
+ /** @description Explanatory text that is provided to the data resource editor to explain what this variable does. */
2122
+ helpText?: string;
2110
2123
  /**
2111
- * @description Type of the data variable
2124
+ * @description Type of the data variable. Optionally used as a point of reference for custom integrations to decide how to render an editor for a variable.
2112
2125
  * @default text
2113
2126
  */
2114
- type: string;
2127
+ type?: string;
2115
2128
  /** @description Default value of the data variable */
2116
2129
  default: string;
2117
- /**
2118
- * @description Where the variable value is set. Static = set to static value by the author. Dynamic = set to a dynamic value by a runtime API request from the frontend (default is used in the editor).
2119
- * @enum {string}
2120
- */
2121
- setBy: "static" | "dynamic";
2122
2130
  /** @description Sets the order of the variable when displayed in a list with other variables. If not set, the order defaults to alphabetical with any explicitly set orders first in the list. */
2123
2131
  order?: number;
2124
2132
  };
@@ -2554,12 +2562,16 @@ interface external$1 {
2554
2562
  ttl?: number;
2555
2563
  /** @description A key for the resource data cache purging. */
2556
2564
  purgeKey?: string;
2565
+ /** @description URL to a custom badge icon for the Uniform dashboard for this data type. If not set falls back to the data connector or integration icons. */
2566
+ badgeIconUrl?: string;
2567
+ /** @description HTTP headers to pass with requests to the data type. Merged with headers from the data source, overriding identical keys. */
2557
2568
  headers?: {
2558
2569
  [key: string]: string;
2559
2570
  } | {
2560
2571
  key: string;
2561
2572
  value: string;
2562
2573
  }[];
2574
+ /** @description Query String parameters to pass with requests to the data type. Merged with parameters from the data source, overriding identical keys. */
2563
2575
  parameters?: {
2564
2576
  [key: string]: string;
2565
2577
  } | {
@@ -2585,23 +2597,20 @@ interface external$1 {
2585
2597
  };
2586
2598
  /**
2587
2599
  * @deprecated
2588
- * @description Defines the shape of a data variable on a Data Connector or Data Type
2600
+ * @description Defines the shape of a data variable on a Data Source or Data Type
2589
2601
  */
2590
2602
  DataVariableDefinition: {
2591
2603
  /** @description Display name of the data variable */
2592
2604
  displayName?: string;
2605
+ /** @description Explanatory text that is provided to the data resource editor to explain what this variable does. */
2606
+ helpText?: string;
2593
2607
  /**
2594
- * @description Type of the data variable
2608
+ * @description Type of the data variable. Optionally used as a point of reference for custom integrations to decide how to render an editor for a variable.
2595
2609
  * @default text
2596
2610
  */
2597
- type: string;
2611
+ type?: string;
2598
2612
  /** @description Default value of the data variable */
2599
2613
  default: string;
2600
- /**
2601
- * @description Where the variable value is set. Static = set to static value by the author. Dynamic = set to a dynamic value by a runtime API request from the frontend (default is used in the editor).
2602
- * @enum {string}
2603
- */
2604
- setBy: "static" | "dynamic";
2605
2614
  /** @description Sets the order of the variable when displayed in a list with other variables. If not set, the order defaults to alphabetical with any explicitly set orders first in the list. */
2606
2615
  order?: number;
2607
2616
  };
@@ -2994,12 +3003,16 @@ interface external {
2994
3003
  ttl?: number;
2995
3004
  /** @description A key for the resource data cache purging. */
2996
3005
  purgeKey?: string;
3006
+ /** @description URL to a custom badge icon for the Uniform dashboard for this data type. If not set falls back to the data connector or integration icons. */
3007
+ badgeIconUrl?: string;
3008
+ /** @description HTTP headers to pass with requests to the data type. Merged with headers from the data source, overriding identical keys. */
2997
3009
  headers?: {
2998
3010
  [key: string]: string;
2999
3011
  } | {
3000
3012
  key: string;
3001
3013
  value: string;
3002
3014
  }[];
3015
+ /** @description Query String parameters to pass with requests to the data type. Merged with parameters from the data source, overriding identical keys. */
3003
3016
  parameters?: {
3004
3017
  [key: string]: string;
3005
3018
  } | {
@@ -3025,23 +3038,20 @@ interface external {
3025
3038
  };
3026
3039
  /**
3027
3040
  * @deprecated
3028
- * @description Defines the shape of a data variable on a Data Connector or Data Type
3041
+ * @description Defines the shape of a data variable on a Data Source or Data Type
3029
3042
  */
3030
3043
  DataVariableDefinition: {
3031
3044
  /** @description Display name of the data variable */
3032
3045
  displayName?: string;
3046
+ /** @description Explanatory text that is provided to the data resource editor to explain what this variable does. */
3047
+ helpText?: string;
3033
3048
  /**
3034
- * @description Type of the data variable
3049
+ * @description Type of the data variable. Optionally used as a point of reference for custom integrations to decide how to render an editor for a variable.
3035
3050
  * @default text
3036
3051
  */
3037
- type: string;
3052
+ type?: string;
3038
3053
  /** @description Default value of the data variable */
3039
3054
  default: string;
3040
- /**
3041
- * @description Where the variable value is set. Static = set to static value by the author. Dynamic = set to a dynamic value by a runtime API request from the frontend (default is used in the editor).
3042
- * @enum {string}
3043
- */
3044
- setBy: "static" | "dynamic";
3045
3055
  /** @description Sets the order of the variable when displayed in a list with other variables. If not set, the order defaults to alphabetical with any explicitly set orders first in the list. */
3046
3056
  order?: number;
3047
3057
  };
@@ -3130,4 +3140,4 @@ declare global {
3130
3140
  */
3131
3141
  declare function createEventBus(): Promise<PreviewEventBus | undefined>;
3132
3142
 
3133
- export { CompositionIssue as $, ComponentDefinitionAPIResponse as A, ComponentDefinitionAPIPutRequest as B, ComponentInstance as C, DataResolutionOptionNegative as D, ComponentDefinitionAPIDeleteRequest as E, ComponentDefinitionListAPIOptions as F, ComponentDefinitionParameter as G, ComponentDefinitionVariant as H, ComponentDefinitionSlugSettings as I, ComponentDefinitionSlot as J, ComponentDefinitionPermission as K, ComponentDefinition as L, CreatingComponentDefinition as M, CompositionGetOrderBy as N, CompositionUIStatus as O, PreviewEventBus as P, CompositionGetListResponse as Q, RootComponentInstance as R, CompositionAPIResponse as S, CompositionAPIDeleteRequest as T, CompositionListAPIResponse as U, CompositionAPIOptions as V, DataElementConnectionDefinition as W, DataResourceVariables as X, DataResourceDefinitions as Y, DataResourceDefinition as Z, CanvasDefinitions as _, ComponentParameter as a, CompositionPatternIssue as a0, DataElementBindingIssue as a1, DataResourceIssue as a2, DataResourceVariableIssue as a3, CompositionDataDiagnostic as a4, DataSourceGetResponse as a5, DataSourcesGetResponse as a6, DataType as a7, DataSource as a8, DataSourceInfo as a9, DataVariableDefinition as aa, ChannelSubscription as ab, createEventBus as ac, CompositionGetParameters as b, CompositionGetByNodePathParameters as c, CompositionGetResponse as d, DataResolutionOptionPositive as e, DataResolutionParameters as f, CompositionResolvedGetResponse as g, CompositionGetValidResponses as h, DataResolutionOption as i, CompositionGetByNodeIdParameters as j, CompositionGetBySlugParameters as k, CompositionGetByIdParameters as l, CompositionPutParameters as m, CompositionDeleteParameters as n, ComponentDefinitionGetParameters as o, ComponentDefinitionPutParameters as p, ComponentDefinitionDeleteParameters as q, DataSourceGetParameters as r, DataSourcesGetParameters as s, DataSourcePutParameters as t, DataSourceDeleteParameters as u, DataTypeGetParameters as v, DataTypeGetResponse as w, DataTypePutParameters as x, DataTypeDeleteParameters as y, ComponentDefinitionGetResponse as z };
3143
+ export { CompositionIssue as $, ComponentDefinitionAPIResponse as A, ComponentDefinitionAPIPutRequest as B, ComponentInstance as C, DataResolutionOptionNegative as D, ComponentDefinitionAPIDeleteRequest as E, ComponentDefinitionListAPIOptions as F, ComponentDefinitionParameter as G, ComponentDefinitionVariant as H, ComponentDefinitionSlugSettings as I, ComponentDefinitionSlot as J, ComponentDefinitionPermission as K, ComponentDefinition as L, CreatingComponentDefinition as M, CompositionGetOrderBy as N, CompositionUIStatus as O, PreviewEventBus as P, CompositionGetListResponse as Q, RootComponentInstance as R, CompositionAPIResponse as S, CompositionAPIDeleteRequest as T, CompositionListAPIResponse as U, CompositionAPIOptions as V, DataElementConnectionDefinition as W, DataResourceVariables as X, DataResourceDefinitions as Y, DataResourceDefinition as Z, CanvasDefinitions as _, ComponentParameter as a, CompositionPatternIssue as a0, DataElementBindingIssue as a1, DataResourceIssue as a2, DataResourceVariableIssue as a3, DataResolutionConfigIssue as a4, CompositionDataDiagnostic as a5, DataSourceGetResponse as a6, DataSourcesGetResponse as a7, DataType as a8, DataSource as a9, DataSourceInfo as aa, DataVariableDefinition as ab, ChannelSubscription as ac, createEventBus as ad, CompositionGetParameters as b, CompositionGetByNodePathParameters as c, CompositionGetResponse as d, DataResolutionOptionPositive as e, DataResolutionParameters as f, CompositionResolvedGetResponse as g, CompositionGetValidResponses as h, DataResolutionOption as i, CompositionGetByNodeIdParameters as j, CompositionGetBySlugParameters as k, CompositionGetByIdParameters as l, CompositionPutParameters as m, CompositionDeleteParameters as n, ComponentDefinitionGetParameters as o, ComponentDefinitionPutParameters as p, ComponentDefinitionDeleteParameters as q, DataSourceGetParameters as r, DataSourcesGetParameters as s, DataSourcePutParameters as t, DataSourceDeleteParameters as u, DataTypeGetParameters as v, DataTypeGetResponse as w, DataTypePutParameters as x, DataTypeDeleteParameters as y, ComponentDefinitionGetResponse as z };
package/dist/index.d.ts CHANGED
@@ -1,5 +1,5 @@
1
- import { C as ComponentInstance, a as ComponentParameter, b as CompositionGetParameters, c as CompositionGetByNodePathParameters, D as DataResolutionOptionNegative, d as CompositionGetResponse, e as DataResolutionOptionPositive, f as DataResolutionParameters, g as CompositionResolvedGetResponse, h as CompositionGetValidResponses, i as DataResolutionOption, j as CompositionGetByNodeIdParameters, k as CompositionGetBySlugParameters, l as CompositionGetByIdParameters, m as CompositionPutParameters, n as CompositionDeleteParameters, o as ComponentDefinitionGetParameters, p as ComponentDefinitionPutParameters, q as ComponentDefinitionDeleteParameters, r as DataSourceGetParameters, s as DataSourcesGetParameters, t as DataSourcePutParameters, u as DataSourceDeleteParameters, v as DataTypeGetParameters, w as DataTypeGetResponse, x as DataTypePutParameters, y as DataTypeDeleteParameters, R as RootComponentInstance, P as PreviewEventBus } from './createEventBus-f298dcef.js';
2
- export { _ as CanvasDefinitions, ab as ChannelSubscription, L as ComponentDefinition, E as ComponentDefinitionAPIDeleteRequest, B as ComponentDefinitionAPIPutRequest, A as ComponentDefinitionAPIResponse, q as ComponentDefinitionDeleteParameters, o as ComponentDefinitionGetParameters, z as ComponentDefinitionGetResponse, F as ComponentDefinitionListAPIOptions, G as ComponentDefinitionParameter, K as ComponentDefinitionPermission, p as ComponentDefinitionPutParameters, J as ComponentDefinitionSlot, I as ComponentDefinitionSlugSettings, H as ComponentDefinitionVariant, C as ComponentInstance, a as ComponentParameter, T as CompositionAPIDeleteRequest, V as CompositionAPIOptions, S as CompositionAPIResponse, a4 as CompositionDataDiagnostic, n as CompositionDeleteParameters, l as CompositionGetByIdParameters, j as CompositionGetByNodeIdParameters, c as CompositionGetByNodePathParameters, k as CompositionGetBySlugParameters, Q as CompositionGetListResponse, N as CompositionGetOrderBy, b as CompositionGetParameters, d as CompositionGetResponse, h as CompositionGetValidResponses, $ as CompositionIssue, U as CompositionListAPIResponse, a0 as CompositionPatternIssue, m as CompositionPutParameters, g as CompositionResolvedGetResponse, O as CompositionUIStatus, M as CreatingComponentDefinition, a1 as DataElementBindingIssue, W as DataElementConnectionDefinition, i as DataResolutionOption, D as DataResolutionOptionNegative, e as DataResolutionOptionPositive, f as DataResolutionParameters, Z as DataResourceDefinition, Y as DataResourceDefinitions, a2 as DataResourceIssue, a3 as DataResourceVariableIssue, X as DataResourceVariables, a8 as DataSource, u as DataSourceDeleteParameters, r as DataSourceGetParameters, a5 as DataSourceGetResponse, a9 as DataSourceInfo, t as DataSourcePutParameters, s as DataSourcesGetParameters, a6 as DataSourcesGetResponse, a7 as DataType, y as DataTypeDeleteParameters, v as DataTypeGetParameters, w as DataTypeGetResponse, x as DataTypePutParameters, aa as DataVariableDefinition, P as PreviewEventBus, R as RootComponentInstance, ac as createEventBus } from './createEventBus-f298dcef.js';
1
+ import { C as ComponentInstance, a as ComponentParameter, b as CompositionGetParameters, c as CompositionGetByNodePathParameters, D as DataResolutionOptionNegative, d as CompositionGetResponse, e as DataResolutionOptionPositive, f as DataResolutionParameters, g as CompositionResolvedGetResponse, h as CompositionGetValidResponses, i as DataResolutionOption, j as CompositionGetByNodeIdParameters, k as CompositionGetBySlugParameters, l as CompositionGetByIdParameters, m as CompositionPutParameters, n as CompositionDeleteParameters, o as ComponentDefinitionGetParameters, p as ComponentDefinitionPutParameters, q as ComponentDefinitionDeleteParameters, r as DataSourceGetParameters, s as DataSourcesGetParameters, t as DataSourcePutParameters, u as DataSourceDeleteParameters, v as DataTypeGetParameters, w as DataTypeGetResponse, x as DataTypePutParameters, y as DataTypeDeleteParameters, R as RootComponentInstance, P as PreviewEventBus } from './createEventBus-ab14af4c.js';
2
+ export { _ as CanvasDefinitions, ac as ChannelSubscription, L as ComponentDefinition, E as ComponentDefinitionAPIDeleteRequest, B as ComponentDefinitionAPIPutRequest, A as ComponentDefinitionAPIResponse, q as ComponentDefinitionDeleteParameters, o as ComponentDefinitionGetParameters, z as ComponentDefinitionGetResponse, F as ComponentDefinitionListAPIOptions, G as ComponentDefinitionParameter, K as ComponentDefinitionPermission, p as ComponentDefinitionPutParameters, J as ComponentDefinitionSlot, I as ComponentDefinitionSlugSettings, H as ComponentDefinitionVariant, C as ComponentInstance, a as ComponentParameter, T as CompositionAPIDeleteRequest, V as CompositionAPIOptions, S as CompositionAPIResponse, a5 as CompositionDataDiagnostic, n as CompositionDeleteParameters, l as CompositionGetByIdParameters, j as CompositionGetByNodeIdParameters, c as CompositionGetByNodePathParameters, k as CompositionGetBySlugParameters, Q as CompositionGetListResponse, N as CompositionGetOrderBy, b as CompositionGetParameters, d as CompositionGetResponse, h as CompositionGetValidResponses, $ as CompositionIssue, U as CompositionListAPIResponse, a0 as CompositionPatternIssue, m as CompositionPutParameters, g as CompositionResolvedGetResponse, O as CompositionUIStatus, M as CreatingComponentDefinition, a1 as DataElementBindingIssue, W as DataElementConnectionDefinition, a4 as DataResolutionConfigIssue, i as DataResolutionOption, D as DataResolutionOptionNegative, e as DataResolutionOptionPositive, f as DataResolutionParameters, Z as DataResourceDefinition, Y as DataResourceDefinitions, a2 as DataResourceIssue, a3 as DataResourceVariableIssue, X as DataResourceVariables, a9 as DataSource, u as DataSourceDeleteParameters, r as DataSourceGetParameters, a6 as DataSourceGetResponse, aa as DataSourceInfo, t as DataSourcePutParameters, s as DataSourcesGetParameters, a7 as DataSourcesGetResponse, a8 as DataType, y as DataTypeDeleteParameters, v as DataTypeGetParameters, w as DataTypeGetResponse, x as DataTypePutParameters, ab as DataVariableDefinition, P as PreviewEventBus, R as RootComponentInstance, ad as createEventBus } from './createEventBus-ab14af4c.js';
3
3
  import { Options } from 'p-throttle';
4
4
  import { Options as Options$1 } from 'p-retry';
5
5
  import { ApiClient, ClientOptions, ExceptProject, ApiClientError } from '@uniformdev/context/api';
@@ -402,7 +402,7 @@ declare class CanvasClient extends ApiClient<ClientOptions> {
402
402
  }[] | undefined;
403
403
  slugSettings?: {
404
404
  required?: "no" | "yes" | "disabled" | undefined;
405
- unique?: "no" | "local" | "global" | undefined;
405
+ unique?: "global" | "no" | "local" | undefined;
406
406
  regularExpression?: string | undefined;
407
407
  regularExpressionMessage?: string | undefined;
408
408
  } | undefined;
@@ -489,9 +489,9 @@ declare class DataSourceClient extends ApiClient {
489
489
  variables?: {
490
490
  [key: string]: {
491
491
  displayName?: string | undefined;
492
- type: string;
492
+ helpText?: string | undefined;
493
+ type?: string | undefined;
493
494
  default: string;
494
- setBy: "static" | "dynamic";
495
495
  order?: number | undefined;
496
496
  };
497
497
  } | undefined;
@@ -557,8 +557,10 @@ declare const CANVAS_TEST_VARIANT_PARAM = "$tstVrnt";
557
557
  declare const CANVAS_ENRICHMENT_TAG_PARAM = "$enr";
558
558
  /** The name of the query string used to detect if we are in in-context editing mode */
559
559
  declare const IN_CONTEXT_EDITOR_QUERY_STRING_PARAM = "is_incontext_editing_mode";
560
- /** The name of the query string used to detect if we are in in-context editing mode */
560
+ /** The value of "data-role" in the component start <script> tag */
561
561
  declare const IN_CONTEXT_EDITOR_COMPONENT_START_ROLE = "uniform-component-start";
562
+ /** The ID we give to placeholder components */
563
+ declare const PLACEHOLDER_ID = "placeholder";
562
564
 
563
565
  /** Determines if a given Canvas component type is a system-defined type */
564
566
  declare const isSystemComponentDefinition: (componentType: string) => boolean;
@@ -661,4 +663,4 @@ declare const createCanvasChannel: ({ listenTo, broadcastTo, }: {
661
663
 
662
664
  declare const CanvasClientError: typeof ApiClientError;
663
665
 
664
- export { AddComponentMessage, BatchEnhancer, BatchEntry, CANVAS_DRAFT_STATE, CANVAS_ENRICHMENT_TAG_PARAM, CANVAS_INTENT_TAG_PARAM, CANVAS_LOCALE_TAG_PARAM, CANVAS_LOCALIZATION_SLOT, CANVAS_LOCALIZATION_TYPE, CANVAS_PERSONALIZATION_PARAM, CANVAS_PERSONALIZE_SLOT, CANVAS_PERSONALIZE_TYPE, CANVAS_PUBLISHED_STATE, CANVAS_TEST_SLOT, CANVAS_TEST_TYPE, CANVAS_TEST_VARIANT_PARAM, CanvasClient, CanvasClientError, Channel, ChannelMessage, ChildEnhancerBuilder, ComponentEnhancer, ComponentEnhancerFunction, ComponentEnhancerOptions, ComponentLocationReference, ComponentParameterEnhancer, ComponentParameterEnhancerFunction, ComponentParameterEnhancerOptions, DataSourceClient, DataTypeClient, DismissPlaceholderMessage, EnhancerBuilder, EnhancerContext, EnhancerError, EventNames, IN_CONTEXT_EDITOR_COMPONENT_START_ROLE, IN_CONTEXT_EDITOR_QUERY_STRING_PARAM, LimitPolicy, MessageHandler, MoveComponentMessage, ReadyMessage, SelectComponentMessage, SubscribeToCompositionOptions, UncachedCanvasClient, UniqueBatchEntries, UnsubscribeCallback, UpdateCompositionMessage, WalkComponentTreeActions, compose, createBatchEnhancer, createCanvasChannel, createLimitPolicy, enhance, extractLocales, generateHash, getChannelName, getComponentJsonPointer, getComponentPath, isAddComponentMessage, isDismissPlaceholderMessage, isMovingComponentMessage, isReadyMessage, isSelectComponentMessage, isSystemComponentDefinition, isUpdateCompositionMessage, localize, mapSlotToPersonalizedVariations, mapSlotToTestVariations, nullLimitPolicy, subscribeToComposition, walkComponentTree };
666
+ export { AddComponentMessage, BatchEnhancer, BatchEntry, CANVAS_DRAFT_STATE, CANVAS_ENRICHMENT_TAG_PARAM, CANVAS_INTENT_TAG_PARAM, CANVAS_LOCALE_TAG_PARAM, CANVAS_LOCALIZATION_SLOT, CANVAS_LOCALIZATION_TYPE, CANVAS_PERSONALIZATION_PARAM, CANVAS_PERSONALIZE_SLOT, CANVAS_PERSONALIZE_TYPE, CANVAS_PUBLISHED_STATE, CANVAS_TEST_SLOT, CANVAS_TEST_TYPE, CANVAS_TEST_VARIANT_PARAM, CanvasClient, CanvasClientError, Channel, ChannelMessage, ChildEnhancerBuilder, ComponentEnhancer, ComponentEnhancerFunction, ComponentEnhancerOptions, ComponentLocationReference, ComponentParameterEnhancer, ComponentParameterEnhancerFunction, ComponentParameterEnhancerOptions, DataSourceClient, DataTypeClient, DismissPlaceholderMessage, EnhancerBuilder, EnhancerContext, EnhancerError, EventNames, IN_CONTEXT_EDITOR_COMPONENT_START_ROLE, IN_CONTEXT_EDITOR_QUERY_STRING_PARAM, LimitPolicy, MessageHandler, MoveComponentMessage, PLACEHOLDER_ID, ReadyMessage, SelectComponentMessage, SubscribeToCompositionOptions, UncachedCanvasClient, UniqueBatchEntries, UnsubscribeCallback, UpdateCompositionMessage, WalkComponentTreeActions, compose, createBatchEnhancer, createCanvasChannel, createLimitPolicy, enhance, extractLocales, generateHash, getChannelName, getComponentJsonPointer, getComponentPath, isAddComponentMessage, isDismissPlaceholderMessage, isMovingComponentMessage, isReadyMessage, isSelectComponentMessage, isSystemComponentDefinition, isUpdateCompositionMessage, localize, mapSlotToPersonalizedVariations, mapSlotToTestVariations, nullLimitPolicy, subscribeToComposition, walkComponentTree };
package/dist/index.esm.js CHANGED
@@ -1 +1 @@
1
- import{$ as Q,A as p,B as q,C as r,D as s,E as t,F as u,G as v,H as w,I as x,J as y,K as z,L as A,M as B,N as C,O as D,P as E,Q as F,R as G,S as H,T as I,U as J,V as K,W as L,X as M,Y as N,Z as O,_ as P,aa as R,ba as S,ca as T,da as U,ea as V,fa as W,l as a,m as b,n as c,o as d,p as e,q as f,r as g,s as h,t as i,u as j,v as k,w as l,x as m,y as n,z as o}from"./chunk-YWIQN37J.mjs";export{V as ApiClientError,g as BatchEntry,y as CANVAS_DRAFT_STATE,C as CANVAS_ENRICHMENT_TAG_PARAM,t as CANVAS_INTENT_TAG_PARAM,u as CANVAS_LOCALE_TAG_PARAM,x as CANVAS_LOCALIZATION_SLOT,s as CANVAS_LOCALIZATION_TYPE,A as CANVAS_PERSONALIZATION_PARAM,v as CANVAS_PERSONALIZE_SLOT,q as CANVAS_PERSONALIZE_TYPE,z as CANVAS_PUBLISHED_STATE,w as CANVAS_TEST_SLOT,r as CANVAS_TEST_TYPE,B as CANVAS_TEST_VARIANT_PARAM,m as CanvasClient,W as CanvasClientError,e as ChildEnhancerBuilder,o as DataSourceClient,p as DataTypeClient,f as EnhancerBuilder,E as IN_CONTEXT_EDITOR_COMPONENT_START_ROLE,D as IN_CONTEXT_EDITOR_QUERY_STRING_PARAM,n as UncachedCanvasClient,d as UniqueBatchEntries,l as compose,h as createBatchEnhancer,U as createCanvasChannel,J as createEventBus,i as createLimitPolicy,k as enhance,M as extractLocales,I as generateHash,K as getChannelName,c as getComponentJsonPointer,b as getComponentPath,R as isAddComponentMessage,T as isDismissPlaceholderMessage,S as isMovingComponentMessage,P as isReadyMessage,O as isSelectComponentMessage,F as isSystemComponentDefinition,Q as isUpdateCompositionMessage,N as localize,G as mapSlotToPersonalizedVariations,H as mapSlotToTestVariations,j as nullLimitPolicy,L as subscribeToComposition,a as walkComponentTree};
1
+ import{$ as Q,A as p,B as q,C as r,D as s,E as t,F as u,G as v,H as w,I as x,J as y,K as z,L as A,M as B,N as C,O as D,P as E,Q as F,R as G,S as H,T as I,U as J,V as K,W as L,X as M,Y as N,Z as O,_ as P,aa as R,ba as S,ca as T,da as U,ea as V,fa as W,ga as X,l as a,m as b,n as c,o as d,p as e,q as f,r as g,s as h,t as i,u as j,v as k,w as l,x as m,y as n,z as o}from"./chunk-XNRQ574R.mjs";export{W as ApiClientError,g as BatchEntry,y as CANVAS_DRAFT_STATE,C as CANVAS_ENRICHMENT_TAG_PARAM,t as CANVAS_INTENT_TAG_PARAM,u as CANVAS_LOCALE_TAG_PARAM,x as CANVAS_LOCALIZATION_SLOT,s as CANVAS_LOCALIZATION_TYPE,A as CANVAS_PERSONALIZATION_PARAM,v as CANVAS_PERSONALIZE_SLOT,q as CANVAS_PERSONALIZE_TYPE,z as CANVAS_PUBLISHED_STATE,w as CANVAS_TEST_SLOT,r as CANVAS_TEST_TYPE,B as CANVAS_TEST_VARIANT_PARAM,m as CanvasClient,X as CanvasClientError,e as ChildEnhancerBuilder,o as DataSourceClient,p as DataTypeClient,f as EnhancerBuilder,E as IN_CONTEXT_EDITOR_COMPONENT_START_ROLE,D as IN_CONTEXT_EDITOR_QUERY_STRING_PARAM,F as PLACEHOLDER_ID,n as UncachedCanvasClient,d as UniqueBatchEntries,l as compose,h as createBatchEnhancer,V as createCanvasChannel,K as createEventBus,i as createLimitPolicy,k as enhance,N as extractLocales,J as generateHash,L as getChannelName,c as getComponentJsonPointer,b as getComponentPath,S as isAddComponentMessage,U as isDismissPlaceholderMessage,T as isMovingComponentMessage,Q as isReadyMessage,P as isSelectComponentMessage,G as isSystemComponentDefinition,R as isUpdateCompositionMessage,O as localize,H as mapSlotToPersonalizedVariations,I as mapSlotToTestVariations,j as nullLimitPolicy,M as subscribeToComposition,a as walkComponentTree};
package/dist/index.js CHANGED
@@ -1,4 +1,4 @@
1
- "use strict";var le=Object.create;var _=Object.defineProperty;var ue=Object.getOwnPropertyDescriptor;var de=Object.getOwnPropertyNames;var he=Object.getPrototypeOf,fe=Object.prototype.hasOwnProperty;var D=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports),ye=(t,e)=>{for(var n in e)_(t,n,{get:e[n],enumerable:!0})},Q=(t,e,n,o)=>{if(e&&typeof e=="object"||typeof e=="function")for(let r of de(e))!fe.call(t,r)&&r!==n&&_(t,r,{get:()=>e[r],enumerable:!(o=ue(e,r))||o.enumerable});return t};var Ce=(t,e,n)=>(n=t!=null?le(he(t)):{},Q(e||!t||!t.__esModule?_(n,"default",{value:t,enumerable:!0}):n,t)),ge=t=>Q(_({},"__esModule",{value:!0}),t);var Pe=(t,e,n)=>{if(!e.has(t))throw TypeError("Cannot "+n)};var R=(t,e,n)=>(Pe(t,e,"read from private field"),n?n.call(t):e.get(t)),K=(t,e,n)=>{if(e.has(t))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(t):e.set(t,n)};var ee=D((pt,X)=>{function g(t,e){typeof e=="boolean"&&(e={forever:e}),this._originalTimeouts=JSON.parse(JSON.stringify(t)),this._timeouts=t,this._options=e||{},this._maxRetryTime=e&&e.maxRetryTime||1/0,this._fn=null,this._errors=[],this._attempts=1,this._operationTimeout=null,this._operationTimeoutCb=null,this._timeout=null,this._operationStart=null,this._timer=null,this._options.forever&&(this._cachedTimeouts=this._timeouts.slice(0))}X.exports=g;g.prototype.reset=function(){this._attempts=1,this._timeouts=this._originalTimeouts.slice(0)};g.prototype.stop=function(){this._timeout&&clearTimeout(this._timeout),this._timer&&clearTimeout(this._timer),this._timeouts=[],this._cachedTimeouts=null};g.prototype.retry=function(t){if(this._timeout&&clearTimeout(this._timeout),!t)return!1;var e=new Date().getTime();if(t&&e-this._operationStart>=this._maxRetryTime)return this._errors.push(t),this._errors.unshift(new Error("RetryOperation timeout occurred")),!1;this._errors.push(t);var n=this._timeouts.shift();if(n===void 0)if(this._cachedTimeouts)this._errors.splice(0,this._errors.length-1),n=this._cachedTimeouts.slice(-1);else return!1;var o=this;return this._timer=setTimeout(function(){o._attempts++,o._operationTimeoutCb&&(o._timeout=setTimeout(function(){o._operationTimeoutCb(o._attempts)},o._operationTimeout),o._options.unref&&o._timeout.unref()),o._fn(o._attempts)},n),this._options.unref&&this._timer.unref(),!0};g.prototype.attempt=function(t,e){this._fn=t,e&&(e.timeout&&(this._operationTimeout=e.timeout),e.cb&&(this._operationTimeoutCb=e.cb));var n=this;this._operationTimeoutCb&&(this._timeout=setTimeout(function(){n._operationTimeoutCb()},n._operationTimeout)),this._operationStart=new Date().getTime(),this._fn(this._attempts)};g.prototype.try=function(t){console.log("Using RetryOperation.try() is deprecated"),this.attempt(t)};g.prototype.start=function(t){console.log("Using RetryOperation.start() is deprecated"),this.attempt(t)};g.prototype.start=g.prototype.try;g.prototype.errors=function(){return this._errors};g.prototype.attempts=function(){return this._attempts};g.prototype.mainError=function(){if(this._errors.length===0)return null;for(var t={},e=null,n=0,o=0;o<this._errors.length;o++){var r=this._errors[o],s=r.message,i=(t[s]||0)+1;t[s]=i,i>=n&&(e=r,n=i)}return e}});var te=D(E=>{var xe=ee();E.operation=function(t){var e=E.timeouts(t);return new xe(e,{forever:t&&(t.forever||t.retries===1/0),unref:t&&t.unref,maxRetryTime:t&&t.maxRetryTime})};E.timeouts=function(t){if(t instanceof Array)return[].concat(t);var e={retries:10,factor:2,minTimeout:1*1e3,maxTimeout:1/0,randomize:!1};for(var n in t)e[n]=t[n];if(e.minTimeout>e.maxTimeout)throw new Error("minTimeout is greater than maxTimeout");for(var o=[],r=0;r<e.retries;r++)o.push(this.createTimeout(r,e));return t&&t.forever&&!o.length&&o.push(this.createTimeout(r,e)),o.sort(function(s,i){return s-i}),o};E.createTimeout=function(t,e){var n=e.randomize?Math.random()+1:1,o=Math.round(n*Math.max(e.minTimeout,1)*Math.pow(e.factor,t));return o=Math.min(o,e.maxTimeout),o};E.wrap=function(t,e,n){if(e instanceof Array&&(n=e,e=null),!n){n=[];for(var o in t)typeof t[o]=="function"&&n.push(o)}for(var r=0;r<n.length;r++){var s=n[r],i=t[s];t[s]=function(a){var d=E.operation(e),l=Array.prototype.slice.call(arguments,1),c=l.pop();l.push(function(u){d.retry(u)||(u&&(arguments[0]=d.mainError()),c.apply(this,arguments))}),d.attempt(function(){a.apply(t,l)})}.bind(t,i),t[s].options=e}}});var oe=D((mt,ne)=>{ne.exports=te()});var tt={};ye(tt,{ApiClientError:()=>Y.ApiClientError,BatchEntry:()=>w,CANVAS_DRAFT_STATE:()=>bt,CANVAS_ENRICHMENT_TAG_PARAM:()=>Le,CANVAS_INTENT_TAG_PARAM:()=>Ne,CANVAS_LOCALE_TAG_PARAM:()=>k,CANVAS_LOCALIZATION_SLOT:()=>J,CANVAS_LOCALIZATION_TYPE:()=>F,CANVAS_PERSONALIZATION_PARAM:()=>z,CANVAS_PERSONALIZE_SLOT:()=>Be,CANVAS_PERSONALIZE_TYPE:()=>be,CANVAS_PUBLISHED_STATE:()=>Mt,CANVAS_TEST_SLOT:()=>Ge,CANVAS_TEST_TYPE:()=>Me,CANVAS_TEST_VARIANT_PARAM:()=>H,CanvasClient:()=>S,CanvasClientError:()=>et,ChildEnhancerBuilder:()=>v,DataSourceClient:()=>$,DataTypeClient:()=>O,EnhancerBuilder:()=>M,IN_CONTEXT_EDITOR_COMPONENT_START_ROLE:()=>je,IN_CONTEXT_EDITOR_QUERY_STRING_PARAM:()=>Ue,UncachedCanvasClient:()=>j,UniqueBatchEntries:()=>b,compose:()=>Se,createBatchEnhancer:()=>Te,createCanvasChannel:()=>Xe,createEventBus:()=>Je,createLimitPolicy:()=>U,enhance:()=>Re,extractLocales:()=>me,generateHash:()=>W,getChannelName:()=>Z,getComponentJsonPointer:()=>Ee,getComponentPath:()=>I,isAddComponentMessage:()=>qe,isDismissPlaceholderMessage:()=>Ke,isMovingComponentMessage:()=>Qe,isReadyMessage:()=>Ze,isSelectComponentMessage:()=>We,isSystemComponentDefinition:()=>Ve,isUpdateCompositionMessage:()=>Ye,localize:()=>He,mapSlotToPersonalizedVariations:()=>$e,mapSlotToTestVariations:()=>Fe,nullLimitPolicy:()=>P,subscribeToComposition:()=>ze,walkComponentTree:()=>x});module.exports=ge(tt);function x(t,e,n){var s;let o=[{ancestorsAndSelf:[{component:t,parentSlot:void 0,parentSlotIndex:void 0}],context:n}],r=new Map;do{let i=o.pop();if(!i)continue;let p=i.ancestorsAndSelf[0],a=!0,d=(s=r.get(p.component))!=null?s:i.context;e(p.component,i.ancestorsAndSelf,{replaceComponent:c=>{Object.assign(p.component,c),["parameters","variant","slots","data","_pattern","_patternError"].forEach(f=>{c[f]||delete p.component[f]})},removeComponent:()=>{let{parentSlot:c,parentSlotIndex:u}=i.ancestorsAndSelf[0],f=i.ancestorsAndSelf[1];if(c&&typeof u!="undefined")f.component.slots[c].splice(u,1);else throw new Error("Unable to delete composition.")},insertAfter:c=>{let u=Array.isArray(c)?c:[c],{parentSlot:f,parentSlotIndex:C}=i.ancestorsAndSelf[0],m=i.ancestorsAndSelf[1];if(f&&typeof C!="undefined")m.component.slots[f].splice(C+1,0,...u),o.unshift(...u.map(h=>({ancestorsAndSelf:[{component:h,parentSlot:f,get parentSlotIndex(){return m.component.slots[f].findIndex(y=>y===h)}},...i.ancestorsAndSelf],context:d})));else throw new Error("Unable to insert after a component not in a slot.")},stopProcessingDescendants(){a=!1},setDescendantsContext(c){d=c},setChildContext(c,u){r.set(c,u)}},d);let l=p.component.slots;if(a&&l){let c=Object.keys(l);for(let u=c.length-1;u>=0;u--){let f=c[u],C=l[f];for(let m=C.length-1;m>=0;m--){let h=C[m];o.push({ancestorsAndSelf:[{component:h,parentSlot:f,get parentSlotIndex(){return p.component.slots[f].findIndex(y=>y===h)}},...i.ancestorsAndSelf],context:d})}}}}while(o.length>0)}function I(t){let e=[];for(let n=t.length-1;n>=0;n--){let{parentSlot:o,parentSlotIndex:r}=t[n];o&&r!==void 0&&e.push(`${o}[${r}]`)}return`.${e.join(".")}`}function Ee(t,{withSlots:e=!1}={}){let n=[];for(let o=t.length-1;o>=0;o--){let{parentSlot:r,parentSlotIndex:s}=t[o];r&&s!==void 0&&n.push(`${r}/${s}`)}return e?`/slots/${n.join("/slots/")}`:`/${n.join("/")}`}var b=class{constructor(e,n){this.groups=e.reduce((o,r)=>{var i;let s=n(r.args);return o[s]=(i=o[s])!=null?i:[],o[s].push(r),o},{})}resolveKey(e,n){this.groups[e].forEach(o=>o.resolve(n))}resolveRemaining(e){Object.keys(this.groups).forEach(n=>{this.groups[n].forEach(o=>{o.isCompleted||o.resolve(e)})})}};var v=class{constructor(){this._paramMatches=Array();this._dataMatches=new Map}parameter(e){return this._paramMatches.push({enhancer:this._resolveParameterEnhancer(e)}),this}parameterName(e,n){return(Array.isArray(e)?e:[e]).forEach(r=>this._paramMatches.push({name:r,enhancer:this._resolveParameterEnhancer(n)})),this}parameterType(e,n){return(Array.isArray(e)?e:[e]).forEach(r=>this._paramMatches.push({type:r,enhancer:this._resolveParameterEnhancer(n)})),this}data(e,n){if(this._dataMatches.has(e))throw new Error(`${e} enhancer data key has been used more than once. This will cause data loss.`);return this._dataMatches.set(e,typeof n=="function"?{enhanceOne:n}:n),this}resolveParameterEnhancer(e,n){var o;return(o=this._paramMatches.find(r=>r.name&&r.name===e||r.type&&r.type===n.type||!r.type&&!r.name))==null?void 0:o.enhancer}resolveComponentEnhancers(){return this._dataMatches}_resolveParameterEnhancer(e){return typeof e=="function"?{enhanceOne:e}:e}},M=class{constructor(){this._componentIndex={};this._rootBuilder=new v}parameter(e){return this._rootBuilder.parameter(e),this}parameterName(e,n){return this._rootBuilder.parameterName(e,n),this}parameterType(e,n){return this._rootBuilder.parameterType(e,n),this}data(e,n){return this._rootBuilder.data(e,n),this}component(e,n){return(Array.isArray(e)?e:[e]).forEach(r=>{this._componentIndex[r]=this._componentIndex[r]||new v,n(this._componentIndex[r])}),this}resolveParameterEnhancer(e,n,o){let r=this._componentIndex[e.type];if(r){let s=r.resolveParameterEnhancer(n,o);if(s)return s}return this._rootBuilder.resolveParameterEnhancer(n,o)}resolveComponentEnhancers(e){let n=this._rootBuilder.resolveComponentEnhancers(),o=this._componentIndex[e.type];if(o){n=new Map(n);for(let[r,s]of o.resolveComponentEnhancers())n.set(r,s)}return n}};var w=class{constructor(e,n,o){this._resolve=e;this._reject=n;this.args=o;this._isCompleted=!1}resolve(e){this._resolve(e),this._isCompleted=!0}reject(e){this._reject(e),this._isCompleted=!0}get isCompleted(){return this._isCompleted}};function Te({handleBatch:t,shouldQueue:e,limitPolicy:n}){let o=[];return{enhanceOne:async i=>{if(!e||e(i))return new Promise((p,a)=>{o.push(new w(p,a,i))})},completeAll:async()=>{if(o.length>0){try{await t(o)}catch(p){o.forEach(a=>a.reject(p))}if(o.some(p=>!p.isCompleted))throw new Error("The completeAll() function failed to resolve or reject all promises in the batch!")}let i=o.length;return o=[],i},limitPolicy:n}}var N=class extends Error{constructor(){super("Throttled function aborted"),this.name="AbortError"}};function B({limit:t,interval:e,strict:n}){if(!Number.isFinite(t))throw new TypeError("Expected `limit` to be a finite number");if(!Number.isFinite(e))throw new TypeError("Expected `interval` to be a finite number");let o=new Map,r=0,s=0;function i(){let l=Date.now();return l-r>e?(s=1,r=l,0):(s<t?s++:(r+=e,s=1),r-l)}let p=[];function a(){let l=Date.now();if(p.length<t)return p.push(l),0;let c=p.shift()+e;return l>=c?(p.push(l),0):(p.push(c),c-l)}let d=n?a:i;return l=>{let c=function(...u){if(!c.isEnabled)return(async()=>l.apply(this,u))();let f;return new Promise((C,m)=>{f=setTimeout(()=>{C(l.apply(this,u)),o.delete(f)},d()),o.set(f,m)})};return c.abort=()=>{for(let u of o.keys())clearTimeout(u),o.get(u)(new N);o.clear(),p.splice(0,p.length)},c.isEnabled=!0,c}}var se=Ce(oe(),1),ve=new Set(["Failed to fetch","NetworkError when attempting to fetch resource.","The Internet connection appears to be offline.","Network request failed"]),G=class extends Error{constructor(e){super(),e instanceof Error?(this.originalError=e,{message:e}=e):(this.originalError=new Error(e),this.originalError.stack=this.stack),this.name="AbortError",this.message=e}},Ae=(t,e,n)=>{let o=n.retries-(e-1);return t.attemptNumber=e,t.retriesLeft=o,t},_e=t=>ve.has(t),re=t=>globalThis.DOMException===void 0?new Error(t):new DOMException(t);async function L(t,e){return new Promise((n,o)=>{e={onFailedAttempt(){},retries:10,...e};let r=se.default.operation(e);r.attempt(async s=>{try{n(await t(s))}catch(i){if(!(i instanceof Error)){o(new TypeError(`Non-error was thrown: "${i}". You should only throw errors.`));return}if(i instanceof G)r.stop(),o(i.originalError);else if(i instanceof TypeError&&!_e(i.message))r.stop(),o(i);else{Ae(i,s,e);try{await e.onFailedAttempt(i)}catch(p){o(p);return}r.retry(i)||o(r.mainError())}}}),e.signal&&!e.signal.aborted&&e.signal.addEventListener("abort",()=>{r.stop();let s=e.signal.reason===void 0?re("The operation was aborted."):e.signal.reason;o(s instanceof Error?s:re(s))},{once:!0})})}function U({throttle:t={interval:1e3,limit:10},retry:e={retries:1,factor:1.66}}){let n=t?B(t):null;return function(r){let s=async()=>await r();if(n&&(s=n(s)),e){let i=s;s=()=>L(i,e)}return s()}}var P=async t=>await t();async function Re({composition:t,enhancers:e,context:n,onErrors:o=r=>{throw new Error(r.map(s=>`${s.message}
1
+ "use strict";var le=Object.create;var _=Object.defineProperty;var ue=Object.getOwnPropertyDescriptor;var de=Object.getOwnPropertyNames;var he=Object.getPrototypeOf,fe=Object.prototype.hasOwnProperty;var D=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports),ye=(t,e)=>{for(var n in e)_(t,n,{get:e[n],enumerable:!0})},Q=(t,e,n,o)=>{if(e&&typeof e=="object"||typeof e=="function")for(let r of de(e))!fe.call(t,r)&&r!==n&&_(t,r,{get:()=>e[r],enumerable:!(o=ue(e,r))||o.enumerable});return t};var Ce=(t,e,n)=>(n=t!=null?le(he(t)):{},Q(e||!t||!t.__esModule?_(n,"default",{value:t,enumerable:!0}):n,t)),ge=t=>Q(_({},"__esModule",{value:!0}),t);var Pe=(t,e,n)=>{if(!e.has(t))throw TypeError("Cannot "+n)};var R=(t,e,n)=>(Pe(t,e,"read from private field"),n?n.call(t):e.get(t)),K=(t,e,n)=>{if(e.has(t))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(t):e.set(t,n)};var ee=D((ct,X)=>{function g(t,e){typeof e=="boolean"&&(e={forever:e}),this._originalTimeouts=JSON.parse(JSON.stringify(t)),this._timeouts=t,this._options=e||{},this._maxRetryTime=e&&e.maxRetryTime||1/0,this._fn=null,this._errors=[],this._attempts=1,this._operationTimeout=null,this._operationTimeoutCb=null,this._timeout=null,this._operationStart=null,this._timer=null,this._options.forever&&(this._cachedTimeouts=this._timeouts.slice(0))}X.exports=g;g.prototype.reset=function(){this._attempts=1,this._timeouts=this._originalTimeouts.slice(0)};g.prototype.stop=function(){this._timeout&&clearTimeout(this._timeout),this._timer&&clearTimeout(this._timer),this._timeouts=[],this._cachedTimeouts=null};g.prototype.retry=function(t){if(this._timeout&&clearTimeout(this._timeout),!t)return!1;var e=new Date().getTime();if(t&&e-this._operationStart>=this._maxRetryTime)return this._errors.push(t),this._errors.unshift(new Error("RetryOperation timeout occurred")),!1;this._errors.push(t);var n=this._timeouts.shift();if(n===void 0)if(this._cachedTimeouts)this._errors.splice(0,this._errors.length-1),n=this._cachedTimeouts.slice(-1);else return!1;var o=this;return this._timer=setTimeout(function(){o._attempts++,o._operationTimeoutCb&&(o._timeout=setTimeout(function(){o._operationTimeoutCb(o._attempts)},o._operationTimeout),o._options.unref&&o._timeout.unref()),o._fn(o._attempts)},n),this._options.unref&&this._timer.unref(),!0};g.prototype.attempt=function(t,e){this._fn=t,e&&(e.timeout&&(this._operationTimeout=e.timeout),e.cb&&(this._operationTimeoutCb=e.cb));var n=this;this._operationTimeoutCb&&(this._timeout=setTimeout(function(){n._operationTimeoutCb()},n._operationTimeout)),this._operationStart=new Date().getTime(),this._fn(this._attempts)};g.prototype.try=function(t){console.log("Using RetryOperation.try() is deprecated"),this.attempt(t)};g.prototype.start=function(t){console.log("Using RetryOperation.start() is deprecated"),this.attempt(t)};g.prototype.start=g.prototype.try;g.prototype.errors=function(){return this._errors};g.prototype.attempts=function(){return this._attempts};g.prototype.mainError=function(){if(this._errors.length===0)return null;for(var t={},e=null,n=0,o=0;o<this._errors.length;o++){var r=this._errors[o],s=r.message,i=(t[s]||0)+1;t[s]=i,i>=n&&(e=r,n=i)}return e}});var te=D(E=>{var xe=ee();E.operation=function(t){var e=E.timeouts(t);return new xe(e,{forever:t&&(t.forever||t.retries===1/0),unref:t&&t.unref,maxRetryTime:t&&t.maxRetryTime})};E.timeouts=function(t){if(t instanceof Array)return[].concat(t);var e={retries:10,factor:2,minTimeout:1*1e3,maxTimeout:1/0,randomize:!1};for(var n in t)e[n]=t[n];if(e.minTimeout>e.maxTimeout)throw new Error("minTimeout is greater than maxTimeout");for(var o=[],r=0;r<e.retries;r++)o.push(this.createTimeout(r,e));return t&&t.forever&&!o.length&&o.push(this.createTimeout(r,e)),o.sort(function(s,i){return s-i}),o};E.createTimeout=function(t,e){var n=e.randomize?Math.random()+1:1,o=Math.round(n*Math.max(e.minTimeout,1)*Math.pow(e.factor,t));return o=Math.min(o,e.maxTimeout),o};E.wrap=function(t,e,n){if(e instanceof Array&&(n=e,e=null),!n){n=[];for(var o in t)typeof t[o]=="function"&&n.push(o)}for(var r=0;r<n.length;r++){var s=n[r],i=t[s];t[s]=function(a){var d=E.operation(e),l=Array.prototype.slice.call(arguments,1),c=l.pop();l.push(function(u){d.retry(u)||(u&&(arguments[0]=d.mainError()),c.apply(this,arguments))}),d.attempt(function(){a.apply(t,l)})}.bind(t,i),t[s].options=e}}});var oe=D((lt,ne)=>{ne.exports=te()});var nt={};ye(nt,{ApiClientError:()=>Y.ApiClientError,BatchEntry:()=>w,CANVAS_DRAFT_STATE:()=>Mt,CANVAS_ENRICHMENT_TAG_PARAM:()=>Le,CANVAS_INTENT_TAG_PARAM:()=>Ne,CANVAS_LOCALE_TAG_PARAM:()=>k,CANVAS_LOCALIZATION_SLOT:()=>J,CANVAS_LOCALIZATION_TYPE:()=>F,CANVAS_PERSONALIZATION_PARAM:()=>z,CANVAS_PERSONALIZE_SLOT:()=>Be,CANVAS_PERSONALIZE_TYPE:()=>be,CANVAS_PUBLISHED_STATE:()=>Nt,CANVAS_TEST_SLOT:()=>Ge,CANVAS_TEST_TYPE:()=>Me,CANVAS_TEST_VARIANT_PARAM:()=>H,CanvasClient:()=>S,CanvasClientError:()=>tt,ChildEnhancerBuilder:()=>v,DataSourceClient:()=>$,DataTypeClient:()=>O,EnhancerBuilder:()=>M,IN_CONTEXT_EDITOR_COMPONENT_START_ROLE:()=>je,IN_CONTEXT_EDITOR_QUERY_STRING_PARAM:()=>Ue,PLACEHOLDER_ID:()=>Ve,UncachedCanvasClient:()=>j,UniqueBatchEntries:()=>b,compose:()=>Se,createBatchEnhancer:()=>Te,createCanvasChannel:()=>et,createEventBus:()=>ze,createLimitPolicy:()=>U,enhance:()=>Re,extractLocales:()=>me,generateHash:()=>W,getChannelName:()=>Z,getComponentJsonPointer:()=>Ee,getComponentPath:()=>I,isAddComponentMessage:()=>Qe,isDismissPlaceholderMessage:()=>Xe,isMovingComponentMessage:()=>Ke,isReadyMessage:()=>Ye,isSelectComponentMessage:()=>Ze,isSystemComponentDefinition:()=>$e,isUpdateCompositionMessage:()=>qe,localize:()=>We,mapSlotToPersonalizedVariations:()=>Fe,mapSlotToTestVariations:()=>ke,nullLimitPolicy:()=>P,subscribeToComposition:()=>He,walkComponentTree:()=>x});module.exports=ge(nt);function x(t,e,n){var s;let o=[{ancestorsAndSelf:[{component:t,parentSlot:void 0,parentSlotIndex:void 0}],context:n}],r=new Map;do{let i=o.pop();if(!i)continue;let p=i.ancestorsAndSelf[0],a=!0,d=(s=r.get(p.component))!=null?s:i.context;e(p.component,i.ancestorsAndSelf,{replaceComponent:c=>{Object.assign(p.component,c),["parameters","variant","slots","data","_pattern","_patternError"].forEach(f=>{c[f]||delete p.component[f]})},removeComponent:()=>{let{parentSlot:c,parentSlotIndex:u}=i.ancestorsAndSelf[0],f=i.ancestorsAndSelf[1];if(c&&typeof u!="undefined")f.component.slots[c].splice(u,1);else throw new Error("Unable to delete composition.")},insertAfter:c=>{let u=Array.isArray(c)?c:[c],{parentSlot:f,parentSlotIndex:C}=i.ancestorsAndSelf[0],m=i.ancestorsAndSelf[1];if(f&&typeof C!="undefined")m.component.slots[f].splice(C+1,0,...u),o.unshift(...u.map(h=>({ancestorsAndSelf:[{component:h,parentSlot:f,get parentSlotIndex(){return m.component.slots[f].findIndex(y=>y===h)}},...i.ancestorsAndSelf],context:d})));else throw new Error("Unable to insert after a component not in a slot.")},stopProcessingDescendants(){a=!1},setDescendantsContext(c){d=c},setChildContext(c,u){r.set(c,u)}},d);let l=p.component.slots;if(a&&l){let c=Object.keys(l);for(let u=c.length-1;u>=0;u--){let f=c[u],C=l[f];for(let m=C.length-1;m>=0;m--){let h=C[m];o.push({ancestorsAndSelf:[{component:h,parentSlot:f,get parentSlotIndex(){return p.component.slots[f].findIndex(y=>y===h)}},...i.ancestorsAndSelf],context:d})}}}}while(o.length>0)}function I(t){let e=[];for(let n=t.length-1;n>=0;n--){let{parentSlot:o,parentSlotIndex:r}=t[n];o&&r!==void 0&&e.push(`${o}[${r}]`)}return`.${e.join(".")}`}function Ee(t,{withSlots:e=!1}={}){let n=[];for(let o=t.length-1;o>=0;o--){let{parentSlot:r,parentSlotIndex:s}=t[o];r&&s!==void 0&&n.push(`${r}/${s}`)}return e?`/slots/${n.join("/slots/")}`:`/${n.join("/")}`}var b=class{constructor(e,n){this.groups=e.reduce((o,r)=>{var i;let s=n(r.args);return o[s]=(i=o[s])!=null?i:[],o[s].push(r),o},{})}resolveKey(e,n){this.groups[e].forEach(o=>o.resolve(n))}resolveRemaining(e){Object.keys(this.groups).forEach(n=>{this.groups[n].forEach(o=>{o.isCompleted||o.resolve(e)})})}};var v=class{constructor(){this._paramMatches=Array();this._dataMatches=new Map}parameter(e){return this._paramMatches.push({enhancer:this._resolveParameterEnhancer(e)}),this}parameterName(e,n){return(Array.isArray(e)?e:[e]).forEach(r=>this._paramMatches.push({name:r,enhancer:this._resolveParameterEnhancer(n)})),this}parameterType(e,n){return(Array.isArray(e)?e:[e]).forEach(r=>this._paramMatches.push({type:r,enhancer:this._resolveParameterEnhancer(n)})),this}data(e,n){if(this._dataMatches.has(e))throw new Error(`${e} enhancer data key has been used more than once. This will cause data loss.`);return this._dataMatches.set(e,typeof n=="function"?{enhanceOne:n}:n),this}resolveParameterEnhancer(e,n){var o;return(o=this._paramMatches.find(r=>r.name&&r.name===e||r.type&&r.type===n.type||!r.type&&!r.name))==null?void 0:o.enhancer}resolveComponentEnhancers(){return this._dataMatches}_resolveParameterEnhancer(e){return typeof e=="function"?{enhanceOne:e}:e}},M=class{constructor(){this._componentIndex={};this._rootBuilder=new v}parameter(e){return this._rootBuilder.parameter(e),this}parameterName(e,n){return this._rootBuilder.parameterName(e,n),this}parameterType(e,n){return this._rootBuilder.parameterType(e,n),this}data(e,n){return this._rootBuilder.data(e,n),this}component(e,n){return(Array.isArray(e)?e:[e]).forEach(r=>{this._componentIndex[r]=this._componentIndex[r]||new v,n(this._componentIndex[r])}),this}resolveParameterEnhancer(e,n,o){let r=this._componentIndex[e.type];if(r){let s=r.resolveParameterEnhancer(n,o);if(s)return s}return this._rootBuilder.resolveParameterEnhancer(n,o)}resolveComponentEnhancers(e){let n=this._rootBuilder.resolveComponentEnhancers(),o=this._componentIndex[e.type];if(o){n=new Map(n);for(let[r,s]of o.resolveComponentEnhancers())n.set(r,s)}return n}};var w=class{constructor(e,n,o){this._resolve=e;this._reject=n;this.args=o;this._isCompleted=!1}resolve(e){this._resolve(e),this._isCompleted=!0}reject(e){this._reject(e),this._isCompleted=!0}get isCompleted(){return this._isCompleted}};function Te({handleBatch:t,shouldQueue:e,limitPolicy:n}){let o=[];return{enhanceOne:async i=>{if(!e||e(i))return new Promise((p,a)=>{o.push(new w(p,a,i))})},completeAll:async()=>{if(o.length>0){try{await t(o)}catch(p){o.forEach(a=>a.reject(p))}if(o.some(p=>!p.isCompleted))throw new Error("The completeAll() function failed to resolve or reject all promises in the batch!")}let i=o.length;return o=[],i},limitPolicy:n}}var N=class extends Error{constructor(){super("Throttled function aborted"),this.name="AbortError"}};function B({limit:t,interval:e,strict:n}){if(!Number.isFinite(t))throw new TypeError("Expected `limit` to be a finite number");if(!Number.isFinite(e))throw new TypeError("Expected `interval` to be a finite number");let o=new Map,r=0,s=0;function i(){let l=Date.now();return l-r>e?(s=1,r=l,0):(s<t?s++:(r+=e,s=1),r-l)}let p=[];function a(){let l=Date.now();if(p.length<t)return p.push(l),0;let c=p.shift()+e;return l>=c?(p.push(l),0):(p.push(c),c-l)}let d=n?a:i;return l=>{let c=function(...u){if(!c.isEnabled)return(async()=>l.apply(this,u))();let f;return new Promise((C,m)=>{f=setTimeout(()=>{C(l.apply(this,u)),o.delete(f)},d()),o.set(f,m)})};return c.abort=()=>{for(let u of o.keys())clearTimeout(u),o.get(u)(new N);o.clear(),p.splice(0,p.length)},c.isEnabled=!0,c}}var se=Ce(oe(),1),ve=new Set(["Failed to fetch","NetworkError when attempting to fetch resource.","The Internet connection appears to be offline.","Network request failed"]),G=class extends Error{constructor(e){super(),e instanceof Error?(this.originalError=e,{message:e}=e):(this.originalError=new Error(e),this.originalError.stack=this.stack),this.name="AbortError",this.message=e}},Ae=(t,e,n)=>{let o=n.retries-(e-1);return t.attemptNumber=e,t.retriesLeft=o,t},_e=t=>ve.has(t),re=t=>globalThis.DOMException===void 0?new Error(t):new DOMException(t);async function L(t,e){return new Promise((n,o)=>{e={onFailedAttempt(){},retries:10,...e};let r=se.default.operation(e);r.attempt(async s=>{try{n(await t(s))}catch(i){if(!(i instanceof Error)){o(new TypeError(`Non-error was thrown: "${i}". You should only throw errors.`));return}if(i instanceof G)r.stop(),o(i.originalError);else if(i instanceof TypeError&&!_e(i.message))r.stop(),o(i);else{Ae(i,s,e);try{await e.onFailedAttempt(i)}catch(p){o(p);return}r.retry(i)||o(r.mainError())}}}),e.signal&&!e.signal.aborted&&e.signal.addEventListener("abort",()=>{r.stop();let s=e.signal.reason===void 0?re("The operation was aborted."):e.signal.reason;o(s instanceof Error?s:re(s))},{once:!0})})}function U({throttle:t={interval:1e3,limit:10},retry:e={retries:1,factor:1.66}}){let n=t?B(t):null;return function(r){let s=async()=>await r();if(n&&(s=n(s)),e){let i=s;s=()=>L(i,e)}return s()}}var P=async t=>await t();async function Re({composition:t,enhancers:e,context:n,onErrors:o=r=>{throw new Error(r.map(s=>`${s.message}
2
2
  ${typeof s.error=="object"&&"stack"in s.error?s.error.stack:s.error}`).join(`
3
3
 
4
- `))}}){let r=[],s=new Set,i=new Set;x(t,(a,d)=>{var c;Object.entries((c=a.parameters)!=null?c:{}).forEach(([u,f])=>{let C=e.resolveParameterEnhancer(a,u,f);C&&(i.add(C),r.push(we(a,d,u,f,C,n)))});let l=e.resolveComponentEnhancers(a);r.push(Ie(a,d,l,n)),s.add(l)}),r.push(...Array.from(s).flatMap(a=>Array.from(a).map(async([,d])=>{var l;try{d.completeAll&&await((l=d.limitPolicy)!=null?l:P)(()=>d.completeAll())}catch(c){return{error:c,message:"Batch component enhancer failed. Individual failed components should receive their own rejections."}}}))),r.push(...Array.from(i).map(async a=>{var d;try{a.completeAll&&await((d=a.limitPolicy)!=null?d:P)(()=>a.completeAll())}catch(l){return{error:l,message:"Batch parameter enhancer failed. Individual failed parameters should receive their own rejections."}}}));let p=(await Promise.all(r)).flatMap(a=>Array.isArray(a)?a:[a]).filter(a=>a);p.length&&o(p)}async function Ie(t,e,n,o){return n.size&&(t.data={}),await Promise.all(Array.from(n).map(async([r,s])=>{var i;try{let a=await(s.completeAll?P:(i=s.limitPolicy)!=null?i:P)(async()=>s.enhanceOne({component:t,context:o}));a!=null&&(t.data[r]=a)}catch(p){let a=`Component ${I(e)} (type: ${t.type}): data.${r} enhancer threw exception. Data key will not be present.`;return delete t.data[r],{message:a,error:p}}}))}async function we(t,e,n,o,r,s){var i;try{let a=await(r.completeAll?P:(i=r.limitPolicy)!=null?i:P)(async()=>r.enhanceOne({parameter:o,parameterName:n,component:t,context:s}));a===null?delete t.parameters[n]:typeof a=="undefined"?t.parameters[n]={...o,value:o.value}:t.parameters[n]={...o,value:a}}catch(p){let a=`Component ${I(e)} (type: ${t.type}): enhancing parameter ${n} (type: ${o.type}) threw exception. Parameter will be removed.`;return delete t.parameters[n],{message:a,error:p}}}var Se=(t,...e)=>({enhanceOne:o=>{let r="enhanceOne"in t?t.enhanceOne(o):t(o);for(let s of e){let i=Oe(r)?r:Promise.resolve(r),p="enhanceOne"in s?s.enhanceOne:s;r=i.then(a=>p({...o,parameter:{type:o.parameter.type,value:a}}))}return r},completeAll:async()=>{var o,r;for(let s of e)if("completeAll"in s)throw new Error("Only the first enhancer in a compose chain can use the completeAll function (batching)");return(r="completeAll"in t?(o=t.completeAll)==null?void 0:o.call(t):0)!=null?r:0}});function Oe(t){return!!t&&(typeof t=="object"||typeof t=="function")&&typeof t.then=="function"}var ie=require("@uniformdev/context/api"),S=class extends ie.ApiClient{constructor(n){n.limitPolicy||(n.limitPolicy=U({}));super(n);this.canvasUrl="/api/v1/canvas"}async getCompositionList(n){let{projectId:o}=this.options,r=this.createUrl(this.canvasUrl,{...n,projectId:o});return await this.apiClient(r)}getCompositionByNodePath(n){return this.getOneComposition(n)}getCompositionByNodeId(n){return this.getOneComposition(n)}getCompositionBySlug(n){return this.getOneComposition(n)}getCompositionById(n){return this.getOneComposition(n)}getOneComposition({unstable_resolveData:n,unstable_dynamicVariables:o,unstable_dataDiagnostics:r,...s}){let{projectId:i}=this.options,p=n?"/api/edge/v1/composition":this.canvasUrl,a={};return n&&(o&&(a.dynamicVariables=JSON.stringify(o)),r&&(a.dataDiagnostics="true")),this.apiClient(this.createUrl(p,{...s,...a,projectId:i}))}async updateComposition(n){let o=this.createUrl("/api/v1/canvas");await this.apiClient(o,{method:"PUT",body:JSON.stringify({...n,projectId:this.options.projectId}),expectNoContent:!0})}async removeComposition(n){let o=this.createUrl("/api/v1/canvas"),{projectId:r}=this.options;await this.apiClient(o,{method:"DELETE",body:JSON.stringify({...n,projectId:r}),expectNoContent:!0})}async getComponentDefinitions(n){let{projectId:o}=this.options,r=this.createUrl("/api/v1/canvas-definitions",{...n,projectId:o});return await this.apiClient(r)}async updateComponentDefinition(n){let o=this.createUrl("/api/v1/canvas-definitions");await this.apiClient(o,{method:"PUT",body:JSON.stringify({...n,projectId:this.options.projectId}),expectNoContent:!0})}async removeComponentDefinition(n){let o=this.createUrl("/api/v1/canvas-definitions");await this.apiClient(o,{method:"DELETE",body:JSON.stringify({...n,projectId:this.options.projectId}),expectNoContent:!0})}},j=class extends S{constructor(e){super({...e,bypassCache:!0})}};var ae=require("@uniformdev/context/api"),V="/api/v1/data-source",De="/api/v1/data-sources",$=class extends ae.ApiClient{constructor(e){super(e)}async get(e){let{projectId:n}=this.options,o=this.createUrl(V,{...e,projectId:n});return await this.apiClient(o)}async getList(e){let{projectId:n}=this.options,o=this.createUrl(De,{...e,projectId:n});return await this.apiClient(o)}async upsert(e){let n=this.createUrl(V);await this.apiClient(n,{method:"PUT",body:JSON.stringify({...e,projectId:this.options.projectId}),expectNoContent:!0})}async remove(e){let n=this.createUrl(V);await this.apiClient(n,{method:"DELETE",body:JSON.stringify({...e,projectId:this.options.projectId}),expectNoContent:!0})}};var pe=require("@uniformdev/context/api");var T,A=class extends pe.ApiClient{constructor(e){super(e)}async get(e){let{projectId:n}=this.options,o=this.createUrl(R(A,T),{...e,projectId:n});return await this.apiClient(o)}async upsert(e){let n=this.createUrl(R(A,T));await this.apiClient(n,{method:"PUT",body:JSON.stringify({...e,projectId:this.options.projectId}),expectNoContent:!0})}async remove(e){let n=this.createUrl(R(A,T));await this.apiClient(n,{method:"DELETE",body:JSON.stringify({...e,projectId:this.options.projectId}),expectNoContent:!0})}},O=A;T=new WeakMap,K(O,T,"/api/v1/data-types");var be="$personalization",Me="$test",F="$localization",Ne="intentTag",k="locale",Be="pz",Ge="test",J="localized",bt=0,Mt=64,z="$pzCrit",H="$tstVrnt",Le="$enr",Ue="is_incontext_editing_mode",je="uniform-component-start";var Ve=t=>t.startsWith("$");function $e(t){return t?t.map((e,n)=>{var s,i;let o=(i=(s=e.parameters)==null?void 0:s[z])==null?void 0:i.value,r=(o==null?void 0:o.name)||`pz-${n}-${e.type}`;return{...e,id:r,pz:o}}):[]}function Fe(t){return t?t.map((e,n)=>{var s,i,p;let o=(i=(s=e.parameters)==null?void 0:s[H])==null?void 0:i.value,r=(p=o==null?void 0:o.id)!=null?p:"testId"in e?e.testId:`ab-${n}-${e.type}`;return{...e,id:r}}):[]}var W=({composition:t,secret:e})=>{if(!e)return;let n=`${JSON.stringify(t)}-${e}`,o=0;for(let r=0;r<n.length;r++){let s=n.charCodeAt(r);o=(o<<5)-o+s,o|=0}return o};var ce="https://js.pusher.com/7.0.3/pusher.min.js";async function ke(){if(!(typeof document=="undefined"||typeof window=="undefined"))return window.Pusher?window.Pusher:new Promise((t,e)=>{let n=setTimeout(()=>{window.Pusher&&t(window.Pusher),e(`Unable to load pusher.js; Uniform Canvas live preview disabled. Consider adding <script src="${ce}"><\/script> manually.`)},5e3),o=document.createElement("script");o.src=ce,o.addEventListener("load",()=>{clearTimeout(n),t(window.Pusher)}),document.head.appendChild(o)})}async function Je(){let t=await ke();if(!t)return;let e=window.__UNIFORM_EVENT_BUS__;if(!e){let n=new t("7b5f5abd160fea549ffe",{cluster:"mt1"});n.connect(),console.log("[canvas] \u{1F525} preview connected"),e=window.__UNIFORM_EVENT_BUS__={subscribe:o=>{let r=n.subscribe(o);return{unsubscribe:()=>n.unsubscribe(o),addEventHandler:(s,i)=>(r.bind(s,i),()=>r.unbind(s,i))}}}}return e}function Z(t,e,n){return`${t}.${e}@${n}`}function ze({projectId:t,compositionId:e,compositionState:n=0,eventBus:{subscribe:o},callback:r,event:s="updated"}){let i=Z(t,e,n),p=o(i),a=p.addEventHandler(s,r);return()=>{a(),p.unsubscribe()}}function me({component:t}){var o;let e={},n=(o=t.slots)==null?void 0:o[J];return n==null||n.forEach(r=>{var i;let s=(i=r.parameters)==null?void 0:i[k];(s==null?void 0:s.value)&&typeof s.value=="string"&&(e[s.value]=e[s.value]||[],e[s.value].push(r))}),e}function He({composition:t,locale:e}){x(t,(n,o,r)=>{if(n.type===F){let s=me({component:n}),i=typeof e=="string"?e:e({component:n,locales:s}),p;if(i&&(p=s[i]),p!=null&&p.length){let[a,...d]=p;r.replaceComponent(a),d.length&&r.insertAfter(d)}else r.removeComponent()}})}var We=t=>t.type==="select-component"&&t.id!==void 0,Ze=t=>t.type==="ready",Ye=t=>t.type==="update-composition",qe=t=>t.type==="add-component",Qe=t=>t.type==="move-component",Ke=t=>t.type==="dismiss-placeholder",Xe=({listenTo:t,broadcastTo:e})=>{let n=0,o={},r=[...e],s=m=>{r.forEach(h=>h.postMessage(JSON.stringify(m),"*"))},i=m=>{s({type:"select-component",id:m})},p=()=>{s({type:"ready"})},a=(m,h)=>{let y=++n;return o[y]={types:Array.isArray(m)?m:[m],handler:h},()=>{delete o[y]}},d=(m,h)=>{let y={type:"update-composition",composition:m,hash:W({composition:m,secret:h})};s(y)},l=m=>{let h={...m,type:"add-component"};s(h)},c=m=>{let h={...m,type:"move-component"};s(h)},u=m=>{let h={...m,type:"dismiss-placeholder"};s(h)},f=m=>{if(typeof m.data!="string"||m.source===window)return;let h=null;try{let y=JSON.parse(m.data);Object.hasOwn(y,"type")&&(h=y)}catch(y){}if(!!h)for(let y in o){let q=o[y];q.types.includes(h.type)&&q.handler(h,m)}};return t.forEach(m=>m.addEventListener("message",f)),{ready:p,destroy:()=>{t.forEach(m=>m.removeEventListener("message",f))},selectComponent:i,updateComposition:d,on:a,addComponent:l,moveComponent:c,dismissPlaceholder:u}};var Y=require("@uniformdev/context/api"),et=Y.ApiClientError;0&&(module.exports={ApiClientError,BatchEntry,CANVAS_DRAFT_STATE,CANVAS_ENRICHMENT_TAG_PARAM,CANVAS_INTENT_TAG_PARAM,CANVAS_LOCALE_TAG_PARAM,CANVAS_LOCALIZATION_SLOT,CANVAS_LOCALIZATION_TYPE,CANVAS_PERSONALIZATION_PARAM,CANVAS_PERSONALIZE_SLOT,CANVAS_PERSONALIZE_TYPE,CANVAS_PUBLISHED_STATE,CANVAS_TEST_SLOT,CANVAS_TEST_TYPE,CANVAS_TEST_VARIANT_PARAM,CanvasClient,CanvasClientError,ChildEnhancerBuilder,DataSourceClient,DataTypeClient,EnhancerBuilder,IN_CONTEXT_EDITOR_COMPONENT_START_ROLE,IN_CONTEXT_EDITOR_QUERY_STRING_PARAM,UncachedCanvasClient,UniqueBatchEntries,compose,createBatchEnhancer,createCanvasChannel,createEventBus,createLimitPolicy,enhance,extractLocales,generateHash,getChannelName,getComponentJsonPointer,getComponentPath,isAddComponentMessage,isDismissPlaceholderMessage,isMovingComponentMessage,isReadyMessage,isSelectComponentMessage,isSystemComponentDefinition,isUpdateCompositionMessage,localize,mapSlotToPersonalizedVariations,mapSlotToTestVariations,nullLimitPolicy,subscribeToComposition,walkComponentTree});
4
+ `))}}){let r=[],s=new Set,i=new Set;x(t,(a,d)=>{var c;Object.entries((c=a.parameters)!=null?c:{}).forEach(([u,f])=>{let C=e.resolveParameterEnhancer(a,u,f);C&&(i.add(C),r.push(we(a,d,u,f,C,n)))});let l=e.resolveComponentEnhancers(a);r.push(Ie(a,d,l,n)),s.add(l)}),r.push(...Array.from(s).flatMap(a=>Array.from(a).map(async([,d])=>{var l;try{d.completeAll&&await((l=d.limitPolicy)!=null?l:P)(()=>d.completeAll())}catch(c){return{error:c,message:"Batch component enhancer failed. Individual failed components should receive their own rejections."}}}))),r.push(...Array.from(i).map(async a=>{var d;try{a.completeAll&&await((d=a.limitPolicy)!=null?d:P)(()=>a.completeAll())}catch(l){return{error:l,message:"Batch parameter enhancer failed. Individual failed parameters should receive their own rejections."}}}));let p=(await Promise.all(r)).flatMap(a=>Array.isArray(a)?a:[a]).filter(a=>a);p.length&&o(p)}async function Ie(t,e,n,o){return n.size&&(t.data={}),await Promise.all(Array.from(n).map(async([r,s])=>{var i;try{let a=await(s.completeAll?P:(i=s.limitPolicy)!=null?i:P)(async()=>s.enhanceOne({component:t,context:o}));a!=null&&(t.data[r]=a)}catch(p){let a=`Component ${I(e)} (type: ${t.type}): data.${r} enhancer threw exception. Data key will not be present.`;return delete t.data[r],{message:a,error:p}}}))}async function we(t,e,n,o,r,s){var i;try{let a=await(r.completeAll?P:(i=r.limitPolicy)!=null?i:P)(async()=>r.enhanceOne({parameter:o,parameterName:n,component:t,context:s}));a===null?delete t.parameters[n]:typeof a=="undefined"?t.parameters[n]={...o,value:o.value}:t.parameters[n]={...o,value:a}}catch(p){let a=`Component ${I(e)} (type: ${t.type}): enhancing parameter ${n} (type: ${o.type}) threw exception. Parameter will be removed.`;return delete t.parameters[n],{message:a,error:p}}}var Se=(t,...e)=>({enhanceOne:o=>{let r="enhanceOne"in t?t.enhanceOne(o):t(o);for(let s of e){let i=Oe(r)?r:Promise.resolve(r),p="enhanceOne"in s?s.enhanceOne:s;r=i.then(a=>p({...o,parameter:{type:o.parameter.type,value:a}}))}return r},completeAll:async()=>{var o,r;for(let s of e)if("completeAll"in s)throw new Error("Only the first enhancer in a compose chain can use the completeAll function (batching)");return(r="completeAll"in t?(o=t.completeAll)==null?void 0:o.call(t):0)!=null?r:0}});function Oe(t){return!!t&&(typeof t=="object"||typeof t=="function")&&typeof t.then=="function"}var ie=require("@uniformdev/context/api"),S=class extends ie.ApiClient{constructor(n){n.limitPolicy||(n.limitPolicy=U({}));super(n);this.canvasUrl="/api/v1/canvas"}async getCompositionList(n){let{projectId:o}=this.options,r=this.createUrl(this.canvasUrl,{...n,projectId:o});return await this.apiClient(r)}getCompositionByNodePath(n){return this.getOneComposition(n)}getCompositionByNodeId(n){return this.getOneComposition(n)}getCompositionBySlug(n){return this.getOneComposition(n)}getCompositionById(n){return this.getOneComposition(n)}getOneComposition({unstable_resolveData:n,unstable_dynamicVariables:o,unstable_dataDiagnostics:r,...s}){let{projectId:i}=this.options,p=n?"/api/edge/v1/composition":this.canvasUrl,a={};return n&&(o&&(a.dynamicVariables=JSON.stringify(o)),r&&(a.dataDiagnostics="true")),this.apiClient(this.createUrl(p,{...s,...a,projectId:i}))}async updateComposition(n){let o=this.createUrl("/api/v1/canvas");await this.apiClient(o,{method:"PUT",body:JSON.stringify({...n,projectId:this.options.projectId}),expectNoContent:!0})}async removeComposition(n){let o=this.createUrl("/api/v1/canvas"),{projectId:r}=this.options;await this.apiClient(o,{method:"DELETE",body:JSON.stringify({...n,projectId:r}),expectNoContent:!0})}async getComponentDefinitions(n){let{projectId:o}=this.options,r=this.createUrl("/api/v1/canvas-definitions",{...n,projectId:o});return await this.apiClient(r)}async updateComponentDefinition(n){let o=this.createUrl("/api/v1/canvas-definitions");await this.apiClient(o,{method:"PUT",body:JSON.stringify({...n,projectId:this.options.projectId}),expectNoContent:!0})}async removeComponentDefinition(n){let o=this.createUrl("/api/v1/canvas-definitions");await this.apiClient(o,{method:"DELETE",body:JSON.stringify({...n,projectId:this.options.projectId}),expectNoContent:!0})}},j=class extends S{constructor(e){super({...e,bypassCache:!0})}};var ae=require("@uniformdev/context/api"),V="/api/v1/data-source",De="/api/v1/data-sources",$=class extends ae.ApiClient{constructor(e){super(e)}async get(e){let{projectId:n}=this.options,o=this.createUrl(V,{...e,projectId:n});return await this.apiClient(o)}async getList(e){let{projectId:n}=this.options,o=this.createUrl(De,{...e,projectId:n});return await this.apiClient(o)}async upsert(e){let n=this.createUrl(V);await this.apiClient(n,{method:"PUT",body:JSON.stringify({...e,projectId:this.options.projectId}),expectNoContent:!0})}async remove(e){let n=this.createUrl(V);await this.apiClient(n,{method:"DELETE",body:JSON.stringify({...e,projectId:this.options.projectId}),expectNoContent:!0})}};var pe=require("@uniformdev/context/api");var T,A=class extends pe.ApiClient{constructor(e){super(e)}async get(e){let{projectId:n}=this.options,o=this.createUrl(R(A,T),{...e,projectId:n});return await this.apiClient(o)}async upsert(e){let n=this.createUrl(R(A,T));await this.apiClient(n,{method:"PUT",body:JSON.stringify({...e,projectId:this.options.projectId}),expectNoContent:!0})}async remove(e){let n=this.createUrl(R(A,T));await this.apiClient(n,{method:"DELETE",body:JSON.stringify({...e,projectId:this.options.projectId}),expectNoContent:!0})}},O=A;T=new WeakMap,K(O,T,"/api/v1/data-types");var be="$personalization",Me="$test",F="$localization",Ne="intentTag",k="locale",Be="pz",Ge="test",J="localized",Mt=0,Nt=64,z="$pzCrit",H="$tstVrnt",Le="$enr",Ue="is_incontext_editing_mode",je="uniform-component-start",Ve="placeholder";var $e=t=>t.startsWith("$");function Fe(t){return t?t.map((e,n)=>{var s,i;let o=(i=(s=e.parameters)==null?void 0:s[z])==null?void 0:i.value,r=(o==null?void 0:o.name)||`pz-${n}-${e.type}`;return{...e,id:r,pz:o}}):[]}function ke(t){return t?t.map((e,n)=>{var s,i,p;let o=(i=(s=e.parameters)==null?void 0:s[H])==null?void 0:i.value,r=(p=o==null?void 0:o.id)!=null?p:"testId"in e?e.testId:`ab-${n}-${e.type}`;return{...e,id:r}}):[]}var W=({composition:t,secret:e})=>{if(!e)return;let n=`${JSON.stringify(t)}-${e}`,o=0;for(let r=0;r<n.length;r++){let s=n.charCodeAt(r);o=(o<<5)-o+s,o|=0}return o};var ce="https://js.pusher.com/7.0.3/pusher.min.js";async function Je(){if(!(typeof document=="undefined"||typeof window=="undefined"))return window.Pusher?window.Pusher:new Promise((t,e)=>{let n=setTimeout(()=>{window.Pusher&&t(window.Pusher),e(`Unable to load pusher.js; Uniform Canvas live preview disabled. Consider adding <script src="${ce}"><\/script> manually.`)},5e3),o=document.createElement("script");o.src=ce,o.addEventListener("load",()=>{clearTimeout(n),t(window.Pusher)}),document.head.appendChild(o)})}async function ze(){let t=await Je();if(!t)return;let e=window.__UNIFORM_EVENT_BUS__;if(!e){let n=new t("7b5f5abd160fea549ffe",{cluster:"mt1"});n.connect(),console.log("[canvas] \u{1F525} preview connected"),e=window.__UNIFORM_EVENT_BUS__={subscribe:o=>{let r=n.subscribe(o);return{unsubscribe:()=>n.unsubscribe(o),addEventHandler:(s,i)=>(r.bind(s,i),()=>r.unbind(s,i))}}}}return e}function Z(t,e,n){return`${t}.${e}@${n}`}function He({projectId:t,compositionId:e,compositionState:n=0,eventBus:{subscribe:o},callback:r,event:s="updated"}){let i=Z(t,e,n),p=o(i),a=p.addEventHandler(s,r);return()=>{a(),p.unsubscribe()}}function me({component:t}){var o;let e={},n=(o=t.slots)==null?void 0:o[J];return n==null||n.forEach(r=>{var i;let s=(i=r.parameters)==null?void 0:i[k];(s==null?void 0:s.value)&&typeof s.value=="string"&&(e[s.value]=e[s.value]||[],e[s.value].push(r))}),e}function We({composition:t,locale:e}){x(t,(n,o,r)=>{if(n.type===F){let s=me({component:n}),i=typeof e=="string"?e:e({component:n,locales:s}),p;if(i&&(p=s[i]),p!=null&&p.length){let[a,...d]=p;r.replaceComponent(a),d.length&&r.insertAfter(d)}else r.removeComponent()}})}var Ze=t=>t.type==="select-component"&&t.id!==void 0,Ye=t=>t.type==="ready",qe=t=>t.type==="update-composition",Qe=t=>t.type==="add-component",Ke=t=>t.type==="move-component",Xe=t=>t.type==="dismiss-placeholder",et=({listenTo:t,broadcastTo:e})=>{let n=0,o={},r=[...e],s=m=>{r.forEach(h=>h.postMessage(JSON.stringify(m),"*"))},i=m=>{s({type:"select-component",id:m})},p=()=>{s({type:"ready"})},a=(m,h)=>{let y=++n;return o[y]={types:Array.isArray(m)?m:[m],handler:h},()=>{delete o[y]}},d=(m,h)=>{let y={type:"update-composition",composition:m,hash:W({composition:m,secret:h})};s(y)},l=m=>{let h={...m,type:"add-component"};s(h)},c=m=>{let h={...m,type:"move-component"};s(h)},u=m=>{let h={...m,type:"dismiss-placeholder"};s(h)},f=m=>{if(typeof m.data!="string"||m.source===window)return;let h=null;try{let y=JSON.parse(m.data);Object.hasOwn(y,"type")&&(h=y)}catch(y){}if(!!h)for(let y in o){let q=o[y];q.types.includes(h.type)&&q.handler(h,m)}};return t.forEach(m=>m.addEventListener("message",f)),{ready:p,destroy:()=>{t.forEach(m=>m.removeEventListener("message",f))},selectComponent:i,updateComposition:d,on:a,addComponent:l,moveComponent:c,dismissPlaceholder:u}};var Y=require("@uniformdev/context/api"),tt=Y.ApiClientError;0&&(module.exports={ApiClientError,BatchEntry,CANVAS_DRAFT_STATE,CANVAS_ENRICHMENT_TAG_PARAM,CANVAS_INTENT_TAG_PARAM,CANVAS_LOCALE_TAG_PARAM,CANVAS_LOCALIZATION_SLOT,CANVAS_LOCALIZATION_TYPE,CANVAS_PERSONALIZATION_PARAM,CANVAS_PERSONALIZE_SLOT,CANVAS_PERSONALIZE_TYPE,CANVAS_PUBLISHED_STATE,CANVAS_TEST_SLOT,CANVAS_TEST_TYPE,CANVAS_TEST_VARIANT_PARAM,CanvasClient,CanvasClientError,ChildEnhancerBuilder,DataSourceClient,DataTypeClient,EnhancerBuilder,IN_CONTEXT_EDITOR_COMPONENT_START_ROLE,IN_CONTEXT_EDITOR_QUERY_STRING_PARAM,PLACEHOLDER_ID,UncachedCanvasClient,UniqueBatchEntries,compose,createBatchEnhancer,createCanvasChannel,createEventBus,createLimitPolicy,enhance,extractLocales,generateHash,getChannelName,getComponentJsonPointer,getComponentPath,isAddComponentMessage,isDismissPlaceholderMessage,isMovingComponentMessage,isReadyMessage,isSelectComponentMessage,isSystemComponentDefinition,isUpdateCompositionMessage,localize,mapSlotToPersonalizedVariations,mapSlotToTestVariations,nullLimitPolicy,subscribeToComposition,walkComponentTree});
package/dist/index.mjs CHANGED
@@ -1 +1 @@
1
- import{$ as Q,A as p,B as q,C as r,D as s,E as t,F as u,G as v,H as w,I as x,J as y,K as z,L as A,M as B,N as C,O as D,P as E,Q as F,R as G,S as H,T as I,U as J,V as K,W as L,X as M,Y as N,Z as O,_ as P,aa as R,ba as S,ca as T,da as U,ea as V,fa as W,l as a,m as b,n as c,o as d,p as e,q as f,r as g,s as h,t as i,u as j,v as k,w as l,x as m,y as n,z as o}from"./chunk-YWIQN37J.mjs";export{V as ApiClientError,g as BatchEntry,y as CANVAS_DRAFT_STATE,C as CANVAS_ENRICHMENT_TAG_PARAM,t as CANVAS_INTENT_TAG_PARAM,u as CANVAS_LOCALE_TAG_PARAM,x as CANVAS_LOCALIZATION_SLOT,s as CANVAS_LOCALIZATION_TYPE,A as CANVAS_PERSONALIZATION_PARAM,v as CANVAS_PERSONALIZE_SLOT,q as CANVAS_PERSONALIZE_TYPE,z as CANVAS_PUBLISHED_STATE,w as CANVAS_TEST_SLOT,r as CANVAS_TEST_TYPE,B as CANVAS_TEST_VARIANT_PARAM,m as CanvasClient,W as CanvasClientError,e as ChildEnhancerBuilder,o as DataSourceClient,p as DataTypeClient,f as EnhancerBuilder,E as IN_CONTEXT_EDITOR_COMPONENT_START_ROLE,D as IN_CONTEXT_EDITOR_QUERY_STRING_PARAM,n as UncachedCanvasClient,d as UniqueBatchEntries,l as compose,h as createBatchEnhancer,U as createCanvasChannel,J as createEventBus,i as createLimitPolicy,k as enhance,M as extractLocales,I as generateHash,K as getChannelName,c as getComponentJsonPointer,b as getComponentPath,R as isAddComponentMessage,T as isDismissPlaceholderMessage,S as isMovingComponentMessage,P as isReadyMessage,O as isSelectComponentMessage,F as isSystemComponentDefinition,Q as isUpdateCompositionMessage,N as localize,G as mapSlotToPersonalizedVariations,H as mapSlotToTestVariations,j as nullLimitPolicy,L as subscribeToComposition,a as walkComponentTree};
1
+ import{$ as Q,A as p,B as q,C as r,D as s,E as t,F as u,G as v,H as w,I as x,J as y,K as z,L as A,M as B,N as C,O as D,P as E,Q as F,R as G,S as H,T as I,U as J,V as K,W as L,X as M,Y as N,Z as O,_ as P,aa as R,ba as S,ca as T,da as U,ea as V,fa as W,ga as X,l as a,m as b,n as c,o as d,p as e,q as f,r as g,s as h,t as i,u as j,v as k,w as l,x as m,y as n,z as o}from"./chunk-XNRQ574R.mjs";export{W as ApiClientError,g as BatchEntry,y as CANVAS_DRAFT_STATE,C as CANVAS_ENRICHMENT_TAG_PARAM,t as CANVAS_INTENT_TAG_PARAM,u as CANVAS_LOCALE_TAG_PARAM,x as CANVAS_LOCALIZATION_SLOT,s as CANVAS_LOCALIZATION_TYPE,A as CANVAS_PERSONALIZATION_PARAM,v as CANVAS_PERSONALIZE_SLOT,q as CANVAS_PERSONALIZE_TYPE,z as CANVAS_PUBLISHED_STATE,w as CANVAS_TEST_SLOT,r as CANVAS_TEST_TYPE,B as CANVAS_TEST_VARIANT_PARAM,m as CanvasClient,X as CanvasClientError,e as ChildEnhancerBuilder,o as DataSourceClient,p as DataTypeClient,f as EnhancerBuilder,E as IN_CONTEXT_EDITOR_COMPONENT_START_ROLE,D as IN_CONTEXT_EDITOR_QUERY_STRING_PARAM,F as PLACEHOLDER_ID,n as UncachedCanvasClient,d as UniqueBatchEntries,l as compose,h as createBatchEnhancer,V as createCanvasChannel,K as createEventBus,i as createLimitPolicy,k as enhance,N as extractLocales,J as generateHash,L as getChannelName,c as getComponentJsonPointer,b as getComponentPath,S as isAddComponentMessage,U as isDismissPlaceholderMessage,T as isMovingComponentMessage,Q as isReadyMessage,P as isSelectComponentMessage,G as isSystemComponentDefinition,R as isUpdateCompositionMessage,O as localize,H as mapSlotToPersonalizedVariations,I as mapSlotToTestVariations,j as nullLimitPolicy,M as subscribeToComposition,a as walkComponentTree};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@uniformdev/canvas",
3
- "version": "17.4.1-alpha.0+59ecbc3",
3
+ "version": "17.4.1-alpha.230+663c9dab3",
4
4
  "description": "Common functionality and types for Uniform Canvas",
5
5
  "license": "SEE LICENSE IN LICENSE.txt",
6
6
  "main": "./dist/index.js",
@@ -49,7 +49,7 @@
49
49
  "devDependencies": {
50
50
  "@types/retry": "0.12.1",
51
51
  "@types/yargs": "17.0.13",
52
- "@uniformdev/cli": "^17.4.1-alpha.0+59ecbc3",
52
+ "@uniformdev/cli": "^17.4.1-alpha.230+663c9dab3",
53
53
  "p-limit": "4.0.0",
54
54
  "p-retry": "5.1.1",
55
55
  "p-throttle": "5.0.0",
@@ -57,7 +57,7 @@
57
57
  "yargs": "17.6.2"
58
58
  },
59
59
  "dependencies": {
60
- "@uniformdev/context": "^17.4.1-alpha.0+59ecbc3"
60
+ "@uniformdev/context": "^17.4.1-alpha.230+663c9dab3"
61
61
  },
62
62
  "files": [
63
63
  "/dist"
@@ -65,5 +65,5 @@
65
65
  "publishConfig": {
66
66
  "access": "public"
67
67
  },
68
- "gitHead": "59ecbc39bc240b9e2e5312a7cc0a5bb565508612"
68
+ "gitHead": "663c9dab33e3560a1bab56c5ea082817e9e54418"
69
69
  }