@uniformdev/canvas 20.34.3-alpha.70 → 20.35.1-alpha.58

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.esm.js CHANGED
@@ -1091,6 +1091,9 @@ var CANVAS_PERSONALIZATION_ALGORITHM_TYPE = "pzAlgorithm";
1091
1091
  var CANVAS_PERSONALIZATION_TAKE_PARAM = "count";
1092
1092
  var CANVAS_TEST_VARIANT_PARAM = "$tstVrnt";
1093
1093
  var CANVAS_ENRICHMENT_TAG_PARAM = "$enr";
1094
+ var CANVAS_INTERNAL_PARAM_PREFIX = "$internal_";
1095
+ var CANVAS_COMPONENT_DISPLAY_NAME_PARAM = `${CANVAS_INTERNAL_PARAM_PREFIX}displayName`;
1096
+ var CANVAS_HYPOTHESIS_PARAM = `${CANVAS_INTERNAL_PARAM_PREFIX}hypothesis`;
1094
1097
  var CANVAS_CONTEXTUAL_EDITING_PARAM = "$contextualEditing";
1095
1098
  var SECRET_QUERY_STRING_PARAM = "secret";
1096
1099
  var IN_CONTEXT_EDITOR_QUERY_STRING_PARAM = "is_incontext_editing_mode";
@@ -2513,10 +2516,55 @@ var EntityReleasesClient = class extends ApiClient6 {
2513
2516
  }
2514
2517
  };
2515
2518
 
2516
- // src/LocaleClient.ts
2519
+ // src/IntegrationPropertyEditorsClient.ts
2517
2520
  import { ApiClient as ApiClient7 } from "@uniformdev/context/api";
2521
+ var _baseUrl;
2522
+ var _IntegrationPropertyEditorsClient = class _IntegrationPropertyEditorsClient extends ApiClient7 {
2523
+ constructor(options) {
2524
+ super(options);
2525
+ this.teamId = options.teamId;
2526
+ }
2527
+ /**
2528
+ * Gets a list of property type and hook names for the current team, including public integrations' hooks.
2529
+ */
2530
+ get(options) {
2531
+ const fetchUri = this.createUrl(__privateGet(_IntegrationPropertyEditorsClient, _baseUrl), {
2532
+ ...options,
2533
+ teamId: this.teamId
2534
+ });
2535
+ return this.apiClient(fetchUri);
2536
+ }
2537
+ /**
2538
+ * Creates or updates a custom AI property editor on a Mesh app.
2539
+ */
2540
+ async deploy(body) {
2541
+ const fetchUri = this.createUrl(__privateGet(_IntegrationPropertyEditorsClient, _baseUrl));
2542
+ await this.apiClient(fetchUri, {
2543
+ method: "PUT",
2544
+ body: JSON.stringify({ ...body, teamId: this.teamId }),
2545
+ expectNoContent: true
2546
+ });
2547
+ }
2548
+ /**
2549
+ * Removes a custom AI property editor from a Mesh app.
2550
+ */
2551
+ async delete(body) {
2552
+ const fetchUri = this.createUrl(__privateGet(_IntegrationPropertyEditorsClient, _baseUrl));
2553
+ await this.apiClient(fetchUri, {
2554
+ method: "DELETE",
2555
+ body: JSON.stringify({ ...body, teamId: this.teamId }),
2556
+ expectNoContent: true
2557
+ });
2558
+ }
2559
+ };
2560
+ _baseUrl = new WeakMap();
2561
+ __privateAdd(_IntegrationPropertyEditorsClient, _baseUrl, "/api/v1/integration-property-editors");
2562
+ var IntegrationPropertyEditorsClient = _IntegrationPropertyEditorsClient;
2563
+
2564
+ // src/LocaleClient.ts
2565
+ import { ApiClient as ApiClient8 } from "@uniformdev/context/api";
2518
2566
  var localesUrl = "/api/v1/locales";
2519
- var LocaleClient = class extends ApiClient7 {
2567
+ var LocaleClient = class extends ApiClient8 {
2520
2568
  constructor(options) {
2521
2569
  super(options);
2522
2570
  }
@@ -2601,6 +2649,9 @@ var isUpdatePreviewSettingsMessage = (message) => {
2601
2649
  var isUpdateFeatureFlagsMessage = (message) => {
2602
2650
  return message.type === "update-feature-flags";
2603
2651
  };
2652
+ var isUpdateAiActionsMessage = (message) => {
2653
+ return message.type === "update-ai-actions";
2654
+ };
2604
2655
  var isUpdateContextualEditingStateInternalMessage = (message) => {
2605
2656
  return message.type === "update-contextual-editing-state-internal";
2606
2657
  };
@@ -2821,6 +2872,13 @@ var createCanvasChannel = ({
2821
2872
  };
2822
2873
  postMessage(message);
2823
2874
  };
2875
+ const updateAiActions = (options) => {
2876
+ const message = {
2877
+ ...options,
2878
+ type: "update-ai-actions"
2879
+ };
2880
+ postMessage(message);
2881
+ };
2824
2882
  const contextStorageUpdated = (options) => {
2825
2883
  const message = {
2826
2884
  ...options,
@@ -2870,6 +2928,7 @@ var createCanvasChannel = ({
2870
2928
  triggerCompositionAction,
2871
2929
  updatePreviewSettings,
2872
2930
  updateFeatureFlags,
2931
+ updateAiActions,
2873
2932
  updateContextualEditingStateInternal,
2874
2933
  selectParameter,
2875
2934
  openParameterEditor,
@@ -2885,10 +2944,10 @@ var createCanvasChannel = ({
2885
2944
  };
2886
2945
 
2887
2946
  // src/PreviewClient.ts
2888
- import { ApiClient as ApiClient8 } from "@uniformdev/context/api";
2947
+ import { ApiClient as ApiClient9 } from "@uniformdev/context/api";
2889
2948
  var previewUrlsUrl = "/api/v1/preview-urls";
2890
2949
  var previewViewportsUrl = "/api/v1/preview-viewports";
2891
- var PreviewClient = class extends ApiClient8 {
2950
+ var PreviewClient = class extends ApiClient9 {
2892
2951
  constructor(options) {
2893
2952
  super(options);
2894
2953
  }
@@ -2951,9 +3010,9 @@ var PreviewClient = class extends ApiClient8 {
2951
3010
  };
2952
3011
 
2953
3012
  // src/ProjectClient.ts
2954
- import { ApiClient as ApiClient9 } from "@uniformdev/context/api";
3013
+ import { ApiClient as ApiClient10 } from "@uniformdev/context/api";
2955
3014
  var _url2;
2956
- var _ProjectClient = class _ProjectClient extends ApiClient9 {
3015
+ var _ProjectClient = class _ProjectClient extends ApiClient10 {
2957
3016
  constructor(options) {
2958
3017
  super({ ...options, bypassCache: true });
2959
3018
  }
@@ -2985,9 +3044,9 @@ __privateAdd(_ProjectClient, _url2, "/api/v1/project");
2985
3044
  var ProjectClient = _ProjectClient;
2986
3045
 
2987
3046
  // src/PromptClient.ts
2988
- import { ApiClient as ApiClient10 } from "@uniformdev/context/api";
3047
+ import { ApiClient as ApiClient11 } from "@uniformdev/context/api";
2989
3048
  var PromptsUrl = "/api/v1/prompts";
2990
- var PromptClient = class extends ApiClient10 {
3049
+ var PromptClient = class extends ApiClient11 {
2991
3050
  constructor(options) {
2992
3051
  super(options);
2993
3052
  }
@@ -3018,9 +3077,9 @@ var PromptClient = class extends ApiClient10 {
3018
3077
  };
3019
3078
 
3020
3079
  // src/RelationshipClient.ts
3021
- import { ApiClient as ApiClient11 } from "@uniformdev/context/api";
3080
+ import { ApiClient as ApiClient12 } from "@uniformdev/context/api";
3022
3081
  var RELATIONSHIPS_URL = "/api/v1/relationships";
3023
- var RelationshipClient = class extends ApiClient11 {
3082
+ var RelationshipClient = class extends ApiClient12 {
3024
3083
  constructor(options) {
3025
3084
  super(options);
3026
3085
  this.get = async (options) => {
@@ -3032,9 +3091,9 @@ var RelationshipClient = class extends ApiClient11 {
3032
3091
  };
3033
3092
 
3034
3093
  // src/ReleaseClient.ts
3035
- import { ApiClient as ApiClient12 } from "@uniformdev/context/api";
3094
+ import { ApiClient as ApiClient13 } from "@uniformdev/context/api";
3036
3095
  var releasesUrl = "/api/v1/releases";
3037
- var ReleaseClient = class extends ApiClient12 {
3096
+ var ReleaseClient = class extends ApiClient13 {
3038
3097
  constructor(options) {
3039
3098
  super(options);
3040
3099
  }
@@ -3074,9 +3133,9 @@ var ReleaseClient = class extends ApiClient12 {
3074
3133
  };
3075
3134
 
3076
3135
  // src/ReleaseContentsClient.ts
3077
- import { ApiClient as ApiClient13 } from "@uniformdev/context/api";
3136
+ import { ApiClient as ApiClient14 } from "@uniformdev/context/api";
3078
3137
  var releaseContentsUrl2 = "/api/v1/release-contents";
3079
- var ReleaseContentsClient = class extends ApiClient13 {
3138
+ var ReleaseContentsClient = class extends ApiClient14 {
3080
3139
  constructor(options) {
3081
3140
  super(options);
3082
3141
  }
@@ -3098,9 +3157,9 @@ var ReleaseContentsClient = class extends ApiClient13 {
3098
3157
  };
3099
3158
 
3100
3159
  // src/RouteClient.ts
3101
- import { ApiClient as ApiClient14 } from "@uniformdev/context/api";
3160
+ import { ApiClient as ApiClient15 } from "@uniformdev/context/api";
3102
3161
  var ROUTE_URL = "/api/v1/route";
3103
- var RouteClient = class extends ApiClient14 {
3162
+ var RouteClient = class extends ApiClient15 {
3104
3163
  constructor(options) {
3105
3164
  var _a;
3106
3165
  if (!options.limitPolicy) {
@@ -3123,6 +3182,52 @@ var RouteClient = class extends ApiClient14 {
3123
3182
  // src/types/locales.ts
3124
3183
  var LOCALE_DYNAMIC_INPUT_NAME = "locale";
3125
3184
 
3185
+ // src/utils/autoFixParameterGroups.ts
3186
+ function autoFixParameterGroups(properties) {
3187
+ var _a;
3188
+ const remainingGroups = (_a = properties.filter((param) => param.type === "group")) != null ? _a : [];
3189
+ if (remainingGroups.length === 0) {
3190
+ return false;
3191
+ }
3192
+ let result = false;
3193
+ while (remainingGroups.length > 0) {
3194
+ const group = remainingGroups.shift();
3195
+ const groupParamsConfig = group.typeConfig && typeof group.typeConfig === "object" && "childrenParams" in group.typeConfig && Array.isArray(group.typeConfig.childrenParams) ? group.typeConfig.childrenParams : [];
3196
+ const expectedParamsToFindFollowingGroup = new Set(groupParamsConfig);
3197
+ const groupStartIndex = properties.findIndex((param) => param.id === group.id);
3198
+ const groupItemsCount = expectedParamsToFindFollowingGroup.size;
3199
+ for (let i = groupStartIndex + 1; i <= groupStartIndex + groupItemsCount; i++) {
3200
+ const param = properties[i];
3201
+ if (!param) {
3202
+ continue;
3203
+ }
3204
+ if (expectedParamsToFindFollowingGroup.has(param.id)) {
3205
+ expectedParamsToFindFollowingGroup.delete(param.id);
3206
+ } else {
3207
+ break;
3208
+ }
3209
+ }
3210
+ if (expectedParamsToFindFollowingGroup.size > 0) {
3211
+ const paramsToMove = Array.from(expectedParamsToFindFollowingGroup);
3212
+ let leadingGroupIndex = groupStartIndex + groupItemsCount - expectedParamsToFindFollowingGroup.size;
3213
+ for (const paramId of paramsToMove) {
3214
+ const paramIndex = properties.findIndex((param) => param.id === paramId);
3215
+ if (paramIndex !== -1) {
3216
+ const [param] = properties.splice(paramIndex, 1);
3217
+ if (paramIndex > leadingGroupIndex) {
3218
+ leadingGroupIndex++;
3219
+ }
3220
+ properties.splice(leadingGroupIndex, 0, param);
3221
+ } else {
3222
+ groupParamsConfig.splice(groupParamsConfig.indexOf(paramId), 1);
3223
+ }
3224
+ }
3225
+ result = true;
3226
+ }
3227
+ }
3228
+ return result;
3229
+ }
3230
+
3126
3231
  // src/utils/createApiEnhancer.ts
3127
3232
  var createUniformApiEnhancer = ({ apiUrl }) => {
3128
3233
  return async (message) => {
@@ -3252,7 +3357,8 @@ function mapSlotToTestVariations(slot) {
3252
3357
  return {
3253
3358
  ...v,
3254
3359
  id,
3255
- testDistribution: contextTag == null ? void 0 : contextTag.testDistribution
3360
+ testDistribution: contextTag == null ? void 0 : contextTag.testDistribution,
3361
+ control: contextTag == null ? void 0 : contextTag.control
3256
3362
  };
3257
3363
  });
3258
3364
  }
@@ -3417,12 +3523,12 @@ function handleRichTextNodeBinding(object, options) {
3417
3523
  import { ApiClientError as ApiClientError2 } from "@uniformdev/context/api";
3418
3524
 
3419
3525
  // src/.version.ts
3420
- var version = "20.34.2";
3526
+ var version = "20.38.1";
3421
3527
 
3422
3528
  // src/WorkflowClient.ts
3423
- import { ApiClient as ApiClient15 } from "@uniformdev/context/api";
3529
+ import { ApiClient as ApiClient16 } from "@uniformdev/context/api";
3424
3530
  var workflowsUrl = "/api/v1/workflows";
3425
- var WorkflowClient = class extends ApiClient15 {
3531
+ var WorkflowClient = class extends ApiClient16 {
3426
3532
  constructor(options) {
3427
3533
  super(options);
3428
3534
  }
@@ -3468,11 +3574,14 @@ export {
3468
3574
  BatchEntry,
3469
3575
  BlockFormatError,
3470
3576
  CANVAS_BLOCK_PARAM_TYPE,
3577
+ CANVAS_COMPONENT_DISPLAY_NAME_PARAM,
3471
3578
  CANVAS_CONTEXTUAL_EDITING_PARAM,
3472
3579
  CANVAS_DRAFT_STATE,
3473
3580
  CANVAS_EDITOR_STATE,
3474
3581
  CANVAS_ENRICHMENT_TAG_PARAM,
3582
+ CANVAS_HYPOTHESIS_PARAM,
3475
3583
  CANVAS_INTENT_TAG_PARAM,
3584
+ CANVAS_INTERNAL_PARAM_PREFIX,
3476
3585
  CANVAS_LOCALE_TAG_PARAM,
3477
3586
  CANVAS_LOCALIZATION_SLOT,
3478
3587
  CANVAS_LOCALIZATION_TYPE,
@@ -3516,6 +3625,7 @@ export {
3516
3625
  IN_CONTEXT_EDITOR_PLAYGROUND_QUERY_STRING_PARAM,
3517
3626
  IN_CONTEXT_EDITOR_QUERY_STRING_PARAM,
3518
3627
  IS_RENDERED_BY_UNIFORM_ATTRIBUTE,
3628
+ IntegrationPropertyEditorsClient,
3519
3629
  LOCALE_DYNAMIC_INPUT_NAME,
3520
3630
  LocaleClient,
3521
3631
  PLACEHOLDER_ID,
@@ -3532,6 +3642,7 @@ export {
3532
3642
  UncachedContentClient,
3533
3643
  UniqueBatchEntries,
3534
3644
  WorkflowClient,
3645
+ autoFixParameterGroups,
3535
3646
  bindExpressionEscapeChars,
3536
3647
  bindExpressionPrefix,
3537
3648
  bindVariables,
@@ -3593,6 +3704,7 @@ export {
3593
3704
  isSuggestComponentMessage,
3594
3705
  isSystemComponentDefinition,
3595
3706
  isTriggerCompositionActionMessage,
3707
+ isUpdateAiActionsMessage,
3596
3708
  isUpdateComponentParameterMessage,
3597
3709
  isUpdateComponentReferencesMessage,
3598
3710
  isUpdateCompositionInternalMessage,
package/dist/index.js CHANGED
@@ -397,15 +397,18 @@ __export(src_exports, {
397
397
  ATTRIBUTE_PARAMETER_TYPE: () => ATTRIBUTE_PARAMETER_TYPE,
398
398
  ATTRIBUTE_PARAMETER_VALUE: () => ATTRIBUTE_PARAMETER_VALUE,
399
399
  ATTRIBUTE_PLACEHOLDER: () => ATTRIBUTE_PLACEHOLDER,
400
- ApiClientError: () => import_api17.ApiClientError,
400
+ ApiClientError: () => import_api18.ApiClientError,
401
401
  BatchEntry: () => BatchEntry,
402
402
  BlockFormatError: () => BlockFormatError,
403
403
  CANVAS_BLOCK_PARAM_TYPE: () => CANVAS_BLOCK_PARAM_TYPE,
404
+ CANVAS_COMPONENT_DISPLAY_NAME_PARAM: () => CANVAS_COMPONENT_DISPLAY_NAME_PARAM,
404
405
  CANVAS_CONTEXTUAL_EDITING_PARAM: () => CANVAS_CONTEXTUAL_EDITING_PARAM,
405
406
  CANVAS_DRAFT_STATE: () => CANVAS_DRAFT_STATE,
406
407
  CANVAS_EDITOR_STATE: () => CANVAS_EDITOR_STATE,
407
408
  CANVAS_ENRICHMENT_TAG_PARAM: () => CANVAS_ENRICHMENT_TAG_PARAM,
409
+ CANVAS_HYPOTHESIS_PARAM: () => CANVAS_HYPOTHESIS_PARAM,
408
410
  CANVAS_INTENT_TAG_PARAM: () => CANVAS_INTENT_TAG_PARAM,
411
+ CANVAS_INTERNAL_PARAM_PREFIX: () => CANVAS_INTERNAL_PARAM_PREFIX,
409
412
  CANVAS_LOCALE_TAG_PARAM: () => CANVAS_LOCALE_TAG_PARAM,
410
413
  CANVAS_LOCALIZATION_SLOT: () => CANVAS_LOCALIZATION_SLOT,
411
414
  CANVAS_LOCALIZATION_TYPE: () => CANVAS_LOCALIZATION_TYPE,
@@ -449,6 +452,7 @@ __export(src_exports, {
449
452
  IN_CONTEXT_EDITOR_PLAYGROUND_QUERY_STRING_PARAM: () => IN_CONTEXT_EDITOR_PLAYGROUND_QUERY_STRING_PARAM,
450
453
  IN_CONTEXT_EDITOR_QUERY_STRING_PARAM: () => IN_CONTEXT_EDITOR_QUERY_STRING_PARAM,
451
454
  IS_RENDERED_BY_UNIFORM_ATTRIBUTE: () => IS_RENDERED_BY_UNIFORM_ATTRIBUTE,
455
+ IntegrationPropertyEditorsClient: () => IntegrationPropertyEditorsClient,
452
456
  LOCALE_DYNAMIC_INPUT_NAME: () => LOCALE_DYNAMIC_INPUT_NAME,
453
457
  LocaleClient: () => LocaleClient,
454
458
  PLACEHOLDER_ID: () => PLACEHOLDER_ID,
@@ -465,6 +469,7 @@ __export(src_exports, {
465
469
  UncachedContentClient: () => UncachedContentClient,
466
470
  UniqueBatchEntries: () => UniqueBatchEntries,
467
471
  WorkflowClient: () => WorkflowClient,
472
+ autoFixParameterGroups: () => autoFixParameterGroups,
468
473
  bindExpressionEscapeChars: () => bindExpressionEscapeChars,
469
474
  bindExpressionPrefix: () => bindExpressionPrefix,
470
475
  bindVariables: () => bindVariables,
@@ -526,6 +531,7 @@ __export(src_exports, {
526
531
  isSuggestComponentMessage: () => isSuggestComponentMessage,
527
532
  isSystemComponentDefinition: () => isSystemComponentDefinition,
528
533
  isTriggerCompositionActionMessage: () => isTriggerCompositionActionMessage,
534
+ isUpdateAiActionsMessage: () => isUpdateAiActionsMessage,
529
535
  isUpdateComponentParameterMessage: () => isUpdateComponentParameterMessage,
530
536
  isUpdateComponentReferencesMessage: () => isUpdateComponentReferencesMessage,
531
537
  isUpdateCompositionInternalMessage: () => isUpdateCompositionInternalMessage,
@@ -1257,6 +1263,9 @@ var CANVAS_PERSONALIZATION_ALGORITHM_TYPE = "pzAlgorithm";
1257
1263
  var CANVAS_PERSONALIZATION_TAKE_PARAM = "count";
1258
1264
  var CANVAS_TEST_VARIANT_PARAM = "$tstVrnt";
1259
1265
  var CANVAS_ENRICHMENT_TAG_PARAM = "$enr";
1266
+ var CANVAS_INTERNAL_PARAM_PREFIX = "$internal_";
1267
+ var CANVAS_COMPONENT_DISPLAY_NAME_PARAM = `${CANVAS_INTERNAL_PARAM_PREFIX}displayName`;
1268
+ var CANVAS_HYPOTHESIS_PARAM = `${CANVAS_INTERNAL_PARAM_PREFIX}hypothesis`;
1260
1269
  var CANVAS_CONTEXTUAL_EDITING_PARAM = "$contextualEditing";
1261
1270
  var SECRET_QUERY_STRING_PARAM = "secret";
1262
1271
  var IN_CONTEXT_EDITOR_QUERY_STRING_PARAM = "is_incontext_editing_mode";
@@ -2679,10 +2688,55 @@ var EntityReleasesClient = class extends import_api7.ApiClient {
2679
2688
  }
2680
2689
  };
2681
2690
 
2682
- // src/LocaleClient.ts
2691
+ // src/IntegrationPropertyEditorsClient.ts
2683
2692
  var import_api8 = require("@uniformdev/context/api");
2693
+ var _baseUrl;
2694
+ var _IntegrationPropertyEditorsClient = class _IntegrationPropertyEditorsClient extends import_api8.ApiClient {
2695
+ constructor(options) {
2696
+ super(options);
2697
+ this.teamId = options.teamId;
2698
+ }
2699
+ /**
2700
+ * Gets a list of property type and hook names for the current team, including public integrations' hooks.
2701
+ */
2702
+ get(options) {
2703
+ const fetchUri = this.createUrl(__privateGet(_IntegrationPropertyEditorsClient, _baseUrl), {
2704
+ ...options,
2705
+ teamId: this.teamId
2706
+ });
2707
+ return this.apiClient(fetchUri);
2708
+ }
2709
+ /**
2710
+ * Creates or updates a custom AI property editor on a Mesh app.
2711
+ */
2712
+ async deploy(body) {
2713
+ const fetchUri = this.createUrl(__privateGet(_IntegrationPropertyEditorsClient, _baseUrl));
2714
+ await this.apiClient(fetchUri, {
2715
+ method: "PUT",
2716
+ body: JSON.stringify({ ...body, teamId: this.teamId }),
2717
+ expectNoContent: true
2718
+ });
2719
+ }
2720
+ /**
2721
+ * Removes a custom AI property editor from a Mesh app.
2722
+ */
2723
+ async delete(body) {
2724
+ const fetchUri = this.createUrl(__privateGet(_IntegrationPropertyEditorsClient, _baseUrl));
2725
+ await this.apiClient(fetchUri, {
2726
+ method: "DELETE",
2727
+ body: JSON.stringify({ ...body, teamId: this.teamId }),
2728
+ expectNoContent: true
2729
+ });
2730
+ }
2731
+ };
2732
+ _baseUrl = new WeakMap();
2733
+ __privateAdd(_IntegrationPropertyEditorsClient, _baseUrl, "/api/v1/integration-property-editors");
2734
+ var IntegrationPropertyEditorsClient = _IntegrationPropertyEditorsClient;
2735
+
2736
+ // src/LocaleClient.ts
2737
+ var import_api9 = require("@uniformdev/context/api");
2684
2738
  var localesUrl = "/api/v1/locales";
2685
- var LocaleClient = class extends import_api8.ApiClient {
2739
+ var LocaleClient = class extends import_api9.ApiClient {
2686
2740
  constructor(options) {
2687
2741
  super(options);
2688
2742
  }
@@ -2767,6 +2821,9 @@ var isUpdatePreviewSettingsMessage = (message) => {
2767
2821
  var isUpdateFeatureFlagsMessage = (message) => {
2768
2822
  return message.type === "update-feature-flags";
2769
2823
  };
2824
+ var isUpdateAiActionsMessage = (message) => {
2825
+ return message.type === "update-ai-actions";
2826
+ };
2770
2827
  var isUpdateContextualEditingStateInternalMessage = (message) => {
2771
2828
  return message.type === "update-contextual-editing-state-internal";
2772
2829
  };
@@ -2987,6 +3044,13 @@ var createCanvasChannel = ({
2987
3044
  };
2988
3045
  postMessage(message);
2989
3046
  };
3047
+ const updateAiActions = (options) => {
3048
+ const message = {
3049
+ ...options,
3050
+ type: "update-ai-actions"
3051
+ };
3052
+ postMessage(message);
3053
+ };
2990
3054
  const contextStorageUpdated = (options) => {
2991
3055
  const message = {
2992
3056
  ...options,
@@ -3036,6 +3100,7 @@ var createCanvasChannel = ({
3036
3100
  triggerCompositionAction,
3037
3101
  updatePreviewSettings,
3038
3102
  updateFeatureFlags,
3103
+ updateAiActions,
3039
3104
  updateContextualEditingStateInternal,
3040
3105
  selectParameter,
3041
3106
  openParameterEditor,
@@ -3051,10 +3116,10 @@ var createCanvasChannel = ({
3051
3116
  };
3052
3117
 
3053
3118
  // src/PreviewClient.ts
3054
- var import_api9 = require("@uniformdev/context/api");
3119
+ var import_api10 = require("@uniformdev/context/api");
3055
3120
  var previewUrlsUrl = "/api/v1/preview-urls";
3056
3121
  var previewViewportsUrl = "/api/v1/preview-viewports";
3057
- var PreviewClient = class extends import_api9.ApiClient {
3122
+ var PreviewClient = class extends import_api10.ApiClient {
3058
3123
  constructor(options) {
3059
3124
  super(options);
3060
3125
  }
@@ -3117,9 +3182,9 @@ var PreviewClient = class extends import_api9.ApiClient {
3117
3182
  };
3118
3183
 
3119
3184
  // src/ProjectClient.ts
3120
- var import_api10 = require("@uniformdev/context/api");
3185
+ var import_api11 = require("@uniformdev/context/api");
3121
3186
  var _url2;
3122
- var _ProjectClient = class _ProjectClient extends import_api10.ApiClient {
3187
+ var _ProjectClient = class _ProjectClient extends import_api11.ApiClient {
3123
3188
  constructor(options) {
3124
3189
  super({ ...options, bypassCache: true });
3125
3190
  }
@@ -3151,9 +3216,9 @@ __privateAdd(_ProjectClient, _url2, "/api/v1/project");
3151
3216
  var ProjectClient = _ProjectClient;
3152
3217
 
3153
3218
  // src/PromptClient.ts
3154
- var import_api11 = require("@uniformdev/context/api");
3219
+ var import_api12 = require("@uniformdev/context/api");
3155
3220
  var PromptsUrl = "/api/v1/prompts";
3156
- var PromptClient = class extends import_api11.ApiClient {
3221
+ var PromptClient = class extends import_api12.ApiClient {
3157
3222
  constructor(options) {
3158
3223
  super(options);
3159
3224
  }
@@ -3184,9 +3249,9 @@ var PromptClient = class extends import_api11.ApiClient {
3184
3249
  };
3185
3250
 
3186
3251
  // src/RelationshipClient.ts
3187
- var import_api12 = require("@uniformdev/context/api");
3252
+ var import_api13 = require("@uniformdev/context/api");
3188
3253
  var RELATIONSHIPS_URL = "/api/v1/relationships";
3189
- var RelationshipClient = class extends import_api12.ApiClient {
3254
+ var RelationshipClient = class extends import_api13.ApiClient {
3190
3255
  constructor(options) {
3191
3256
  super(options);
3192
3257
  this.get = async (options) => {
@@ -3198,9 +3263,9 @@ var RelationshipClient = class extends import_api12.ApiClient {
3198
3263
  };
3199
3264
 
3200
3265
  // src/ReleaseClient.ts
3201
- var import_api13 = require("@uniformdev/context/api");
3266
+ var import_api14 = require("@uniformdev/context/api");
3202
3267
  var releasesUrl = "/api/v1/releases";
3203
- var ReleaseClient = class extends import_api13.ApiClient {
3268
+ var ReleaseClient = class extends import_api14.ApiClient {
3204
3269
  constructor(options) {
3205
3270
  super(options);
3206
3271
  }
@@ -3240,9 +3305,9 @@ var ReleaseClient = class extends import_api13.ApiClient {
3240
3305
  };
3241
3306
 
3242
3307
  // src/ReleaseContentsClient.ts
3243
- var import_api14 = require("@uniformdev/context/api");
3308
+ var import_api15 = require("@uniformdev/context/api");
3244
3309
  var releaseContentsUrl2 = "/api/v1/release-contents";
3245
- var ReleaseContentsClient = class extends import_api14.ApiClient {
3310
+ var ReleaseContentsClient = class extends import_api15.ApiClient {
3246
3311
  constructor(options) {
3247
3312
  super(options);
3248
3313
  }
@@ -3264,9 +3329,9 @@ var ReleaseContentsClient = class extends import_api14.ApiClient {
3264
3329
  };
3265
3330
 
3266
3331
  // src/RouteClient.ts
3267
- var import_api15 = require("@uniformdev/context/api");
3332
+ var import_api16 = require("@uniformdev/context/api");
3268
3333
  var ROUTE_URL = "/api/v1/route";
3269
- var RouteClient = class extends import_api15.ApiClient {
3334
+ var RouteClient = class extends import_api16.ApiClient {
3270
3335
  constructor(options) {
3271
3336
  var _a;
3272
3337
  if (!options.limitPolicy) {
@@ -3289,6 +3354,52 @@ var RouteClient = class extends import_api15.ApiClient {
3289
3354
  // src/types/locales.ts
3290
3355
  var LOCALE_DYNAMIC_INPUT_NAME = "locale";
3291
3356
 
3357
+ // src/utils/autoFixParameterGroups.ts
3358
+ function autoFixParameterGroups(properties) {
3359
+ var _a;
3360
+ const remainingGroups = (_a = properties.filter((param) => param.type === "group")) != null ? _a : [];
3361
+ if (remainingGroups.length === 0) {
3362
+ return false;
3363
+ }
3364
+ let result = false;
3365
+ while (remainingGroups.length > 0) {
3366
+ const group = remainingGroups.shift();
3367
+ const groupParamsConfig = group.typeConfig && typeof group.typeConfig === "object" && "childrenParams" in group.typeConfig && Array.isArray(group.typeConfig.childrenParams) ? group.typeConfig.childrenParams : [];
3368
+ const expectedParamsToFindFollowingGroup = new Set(groupParamsConfig);
3369
+ const groupStartIndex = properties.findIndex((param) => param.id === group.id);
3370
+ const groupItemsCount = expectedParamsToFindFollowingGroup.size;
3371
+ for (let i = groupStartIndex + 1; i <= groupStartIndex + groupItemsCount; i++) {
3372
+ const param = properties[i];
3373
+ if (!param) {
3374
+ continue;
3375
+ }
3376
+ if (expectedParamsToFindFollowingGroup.has(param.id)) {
3377
+ expectedParamsToFindFollowingGroup.delete(param.id);
3378
+ } else {
3379
+ break;
3380
+ }
3381
+ }
3382
+ if (expectedParamsToFindFollowingGroup.size > 0) {
3383
+ const paramsToMove = Array.from(expectedParamsToFindFollowingGroup);
3384
+ let leadingGroupIndex = groupStartIndex + groupItemsCount - expectedParamsToFindFollowingGroup.size;
3385
+ for (const paramId of paramsToMove) {
3386
+ const paramIndex = properties.findIndex((param) => param.id === paramId);
3387
+ if (paramIndex !== -1) {
3388
+ const [param] = properties.splice(paramIndex, 1);
3389
+ if (paramIndex > leadingGroupIndex) {
3390
+ leadingGroupIndex++;
3391
+ }
3392
+ properties.splice(leadingGroupIndex, 0, param);
3393
+ } else {
3394
+ groupParamsConfig.splice(groupParamsConfig.indexOf(paramId), 1);
3395
+ }
3396
+ }
3397
+ result = true;
3398
+ }
3399
+ }
3400
+ return result;
3401
+ }
3402
+
3292
3403
  // src/utils/createApiEnhancer.ts
3293
3404
  var createUniformApiEnhancer = ({ apiUrl }) => {
3294
3405
  return async (message) => {
@@ -3418,7 +3529,8 @@ function mapSlotToTestVariations(slot) {
3418
3529
  return {
3419
3530
  ...v,
3420
3531
  id,
3421
- testDistribution: contextTag == null ? void 0 : contextTag.testDistribution
3532
+ testDistribution: contextTag == null ? void 0 : contextTag.testDistribution,
3533
+ control: contextTag == null ? void 0 : contextTag.control
3422
3534
  };
3423
3535
  });
3424
3536
  }
@@ -3580,15 +3692,15 @@ function handleRichTextNodeBinding(object, options) {
3580
3692
  }
3581
3693
 
3582
3694
  // src/index.ts
3583
- var import_api17 = require("@uniformdev/context/api");
3695
+ var import_api18 = require("@uniformdev/context/api");
3584
3696
 
3585
3697
  // src/.version.ts
3586
- var version = "20.34.2";
3698
+ var version = "20.38.1";
3587
3699
 
3588
3700
  // src/WorkflowClient.ts
3589
- var import_api16 = require("@uniformdev/context/api");
3701
+ var import_api17 = require("@uniformdev/context/api");
3590
3702
  var workflowsUrl = "/api/v1/workflows";
3591
- var WorkflowClient = class extends import_api16.ApiClient {
3703
+ var WorkflowClient = class extends import_api17.ApiClient {
3592
3704
  constructor(options) {
3593
3705
  super(options);
3594
3706
  }
@@ -3619,7 +3731,7 @@ var WorkflowClient = class extends import_api16.ApiClient {
3619
3731
  };
3620
3732
 
3621
3733
  // src/index.ts
3622
- var CanvasClientError = import_api17.ApiClientError;
3734
+ var CanvasClientError = import_api18.ApiClientError;
3623
3735
  // Annotate the CommonJS export names for ESM import in node:
3624
3736
  0 && (module.exports = {
3625
3737
  ASSETS_SOURCE_CUSTOM_URL,
@@ -3635,11 +3747,14 @@ var CanvasClientError = import_api17.ApiClientError;
3635
3747
  BatchEntry,
3636
3748
  BlockFormatError,
3637
3749
  CANVAS_BLOCK_PARAM_TYPE,
3750
+ CANVAS_COMPONENT_DISPLAY_NAME_PARAM,
3638
3751
  CANVAS_CONTEXTUAL_EDITING_PARAM,
3639
3752
  CANVAS_DRAFT_STATE,
3640
3753
  CANVAS_EDITOR_STATE,
3641
3754
  CANVAS_ENRICHMENT_TAG_PARAM,
3755
+ CANVAS_HYPOTHESIS_PARAM,
3642
3756
  CANVAS_INTENT_TAG_PARAM,
3757
+ CANVAS_INTERNAL_PARAM_PREFIX,
3643
3758
  CANVAS_LOCALE_TAG_PARAM,
3644
3759
  CANVAS_LOCALIZATION_SLOT,
3645
3760
  CANVAS_LOCALIZATION_TYPE,
@@ -3683,6 +3798,7 @@ var CanvasClientError = import_api17.ApiClientError;
3683
3798
  IN_CONTEXT_EDITOR_PLAYGROUND_QUERY_STRING_PARAM,
3684
3799
  IN_CONTEXT_EDITOR_QUERY_STRING_PARAM,
3685
3800
  IS_RENDERED_BY_UNIFORM_ATTRIBUTE,
3801
+ IntegrationPropertyEditorsClient,
3686
3802
  LOCALE_DYNAMIC_INPUT_NAME,
3687
3803
  LocaleClient,
3688
3804
  PLACEHOLDER_ID,
@@ -3699,6 +3815,7 @@ var CanvasClientError = import_api17.ApiClientError;
3699
3815
  UncachedContentClient,
3700
3816
  UniqueBatchEntries,
3701
3817
  WorkflowClient,
3818
+ autoFixParameterGroups,
3702
3819
  bindExpressionEscapeChars,
3703
3820
  bindExpressionPrefix,
3704
3821
  bindVariables,
@@ -3760,6 +3877,7 @@ var CanvasClientError = import_api17.ApiClientError;
3760
3877
  isSuggestComponentMessage,
3761
3878
  isSystemComponentDefinition,
3762
3879
  isTriggerCompositionActionMessage,
3880
+ isUpdateAiActionsMessage,
3763
3881
  isUpdateComponentParameterMessage,
3764
3882
  isUpdateComponentReferencesMessage,
3765
3883
  isUpdateCompositionInternalMessage,