@uniformdev/canvas 20.7.1-alpha.81 → 20.7.1-alpha.83

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
@@ -2513,10 +2513,55 @@ var EntityReleasesClient = class extends ApiClient6 {
2513
2513
  }
2514
2514
  };
2515
2515
 
2516
- // src/LocaleClient.ts
2516
+ // src/IntegrationPropertyEditorsClient.ts
2517
2517
  import { ApiClient as ApiClient7 } from "@uniformdev/context/api";
2518
+ var _baseUrl;
2519
+ var _IntegrationPropertyEditorsClient = class _IntegrationPropertyEditorsClient extends ApiClient7 {
2520
+ constructor(options) {
2521
+ super(options);
2522
+ this.teamId = options.teamId;
2523
+ }
2524
+ /**
2525
+ * Gets a list of property type and hook names for the current team, including public integrations' hooks.
2526
+ */
2527
+ get(options) {
2528
+ const fetchUri = this.createUrl(__privateGet(_IntegrationPropertyEditorsClient, _baseUrl), {
2529
+ ...options,
2530
+ teamId: this.teamId
2531
+ });
2532
+ return this.apiClient(fetchUri);
2533
+ }
2534
+ /**
2535
+ * Creates or updates a custom AI property editor on a Mesh app.
2536
+ */
2537
+ async deploy(body) {
2538
+ const fetchUri = this.createUrl(__privateGet(_IntegrationPropertyEditorsClient, _baseUrl));
2539
+ await this.apiClient(fetchUri, {
2540
+ method: "PUT",
2541
+ body: JSON.stringify({ ...body, teamId: this.teamId }),
2542
+ expectNoContent: true
2543
+ });
2544
+ }
2545
+ /**
2546
+ * Removes a custom AI property editor from a Mesh app.
2547
+ */
2548
+ async delete(body) {
2549
+ const fetchUri = this.createUrl(__privateGet(_IntegrationPropertyEditorsClient, _baseUrl));
2550
+ await this.apiClient(fetchUri, {
2551
+ method: "DELETE",
2552
+ body: JSON.stringify({ ...body, teamId: this.teamId }),
2553
+ expectNoContent: true
2554
+ });
2555
+ }
2556
+ };
2557
+ _baseUrl = new WeakMap();
2558
+ __privateAdd(_IntegrationPropertyEditorsClient, _baseUrl, "/api/v1/integration-property-editors");
2559
+ var IntegrationPropertyEditorsClient = _IntegrationPropertyEditorsClient;
2560
+
2561
+ // src/LocaleClient.ts
2562
+ import { ApiClient as ApiClient8 } from "@uniformdev/context/api";
2518
2563
  var localesUrl = "/api/v1/locales";
2519
- var LocaleClient = class extends ApiClient7 {
2564
+ var LocaleClient = class extends ApiClient8 {
2520
2565
  constructor(options) {
2521
2566
  super(options);
2522
2567
  }
@@ -2601,6 +2646,9 @@ var isUpdatePreviewSettingsMessage = (message) => {
2601
2646
  var isUpdateFeatureFlagsMessage = (message) => {
2602
2647
  return message.type === "update-feature-flags";
2603
2648
  };
2649
+ var isUpdateAiActionsMessage = (message) => {
2650
+ return message.type === "update-ai-actions";
2651
+ };
2604
2652
  var isUpdateContextualEditingStateInternalMessage = (message) => {
2605
2653
  return message.type === "update-contextual-editing-state-internal";
2606
2654
  };
@@ -2821,6 +2869,13 @@ var createCanvasChannel = ({
2821
2869
  };
2822
2870
  postMessage(message);
2823
2871
  };
2872
+ const updateAiActions = (options) => {
2873
+ const message = {
2874
+ ...options,
2875
+ type: "update-ai-actions"
2876
+ };
2877
+ postMessage(message);
2878
+ };
2824
2879
  const contextStorageUpdated = (options) => {
2825
2880
  const message = {
2826
2881
  ...options,
@@ -2870,6 +2925,7 @@ var createCanvasChannel = ({
2870
2925
  triggerCompositionAction,
2871
2926
  updatePreviewSettings,
2872
2927
  updateFeatureFlags,
2928
+ updateAiActions,
2873
2929
  updateContextualEditingStateInternal,
2874
2930
  selectParameter,
2875
2931
  openParameterEditor,
@@ -2885,10 +2941,10 @@ var createCanvasChannel = ({
2885
2941
  };
2886
2942
 
2887
2943
  // src/PreviewClient.ts
2888
- import { ApiClient as ApiClient8 } from "@uniformdev/context/api";
2944
+ import { ApiClient as ApiClient9 } from "@uniformdev/context/api";
2889
2945
  var previewUrlsUrl = "/api/v1/preview-urls";
2890
2946
  var previewViewportsUrl = "/api/v1/preview-viewports";
2891
- var PreviewClient = class extends ApiClient8 {
2947
+ var PreviewClient = class extends ApiClient9 {
2892
2948
  constructor(options) {
2893
2949
  super(options);
2894
2950
  }
@@ -2951,9 +3007,9 @@ var PreviewClient = class extends ApiClient8 {
2951
3007
  };
2952
3008
 
2953
3009
  // src/ProjectClient.ts
2954
- import { ApiClient as ApiClient9 } from "@uniformdev/context/api";
3010
+ import { ApiClient as ApiClient10 } from "@uniformdev/context/api";
2955
3011
  var _url2;
2956
- var _ProjectClient = class _ProjectClient extends ApiClient9 {
3012
+ var _ProjectClient = class _ProjectClient extends ApiClient10 {
2957
3013
  constructor(options) {
2958
3014
  super({ ...options, bypassCache: true });
2959
3015
  }
@@ -2985,9 +3041,9 @@ __privateAdd(_ProjectClient, _url2, "/api/v1/project");
2985
3041
  var ProjectClient = _ProjectClient;
2986
3042
 
2987
3043
  // src/PromptClient.ts
2988
- import { ApiClient as ApiClient10 } from "@uniformdev/context/api";
3044
+ import { ApiClient as ApiClient11 } from "@uniformdev/context/api";
2989
3045
  var PromptsUrl = "/api/v1/prompts";
2990
- var PromptClient = class extends ApiClient10 {
3046
+ var PromptClient = class extends ApiClient11 {
2991
3047
  constructor(options) {
2992
3048
  super(options);
2993
3049
  }
@@ -3018,9 +3074,9 @@ var PromptClient = class extends ApiClient10 {
3018
3074
  };
3019
3075
 
3020
3076
  // src/RelationshipClient.ts
3021
- import { ApiClient as ApiClient11 } from "@uniformdev/context/api";
3077
+ import { ApiClient as ApiClient12 } from "@uniformdev/context/api";
3022
3078
  var RELATIONSHIPS_URL = "/api/v1/relationships";
3023
- var RelationshipClient = class extends ApiClient11 {
3079
+ var RelationshipClient = class extends ApiClient12 {
3024
3080
  constructor(options) {
3025
3081
  super(options);
3026
3082
  this.get = async (options) => {
@@ -3032,9 +3088,9 @@ var RelationshipClient = class extends ApiClient11 {
3032
3088
  };
3033
3089
 
3034
3090
  // src/ReleaseClient.ts
3035
- import { ApiClient as ApiClient12 } from "@uniformdev/context/api";
3091
+ import { ApiClient as ApiClient13 } from "@uniformdev/context/api";
3036
3092
  var releasesUrl = "/api/v1/releases";
3037
- var ReleaseClient = class extends ApiClient12 {
3093
+ var ReleaseClient = class extends ApiClient13 {
3038
3094
  constructor(options) {
3039
3095
  super(options);
3040
3096
  }
@@ -3074,9 +3130,9 @@ var ReleaseClient = class extends ApiClient12 {
3074
3130
  };
3075
3131
 
3076
3132
  // src/ReleaseContentsClient.ts
3077
- import { ApiClient as ApiClient13 } from "@uniformdev/context/api";
3133
+ import { ApiClient as ApiClient14 } from "@uniformdev/context/api";
3078
3134
  var releaseContentsUrl2 = "/api/v1/release-contents";
3079
- var ReleaseContentsClient = class extends ApiClient13 {
3135
+ var ReleaseContentsClient = class extends ApiClient14 {
3080
3136
  constructor(options) {
3081
3137
  super(options);
3082
3138
  }
@@ -3098,9 +3154,9 @@ var ReleaseContentsClient = class extends ApiClient13 {
3098
3154
  };
3099
3155
 
3100
3156
  // src/RouteClient.ts
3101
- import { ApiClient as ApiClient14 } from "@uniformdev/context/api";
3157
+ import { ApiClient as ApiClient15 } from "@uniformdev/context/api";
3102
3158
  var ROUTE_URL = "/api/v1/route";
3103
- var RouteClient = class extends ApiClient14 {
3159
+ var RouteClient = class extends ApiClient15 {
3104
3160
  constructor(options) {
3105
3161
  var _a;
3106
3162
  if (!options.limitPolicy) {
@@ -3123,6 +3179,63 @@ var RouteClient = class extends ApiClient14 {
3123
3179
  // src/types/locales.ts
3124
3180
  var LOCALE_DYNAMIC_INPUT_NAME = "locale";
3125
3181
 
3182
+ // src/utils/assetConfig.ts
3183
+ var mergeAssetConfigWithDefaults = (config) => {
3184
+ var _a;
3185
+ return {
3186
+ ...config,
3187
+ // For backwards compatibility reasons undefined represents restriction to
3188
+ // image types
3189
+ allowedTypes: (_a = config.allowedTypes) != null ? _a : ["image"]
3190
+ };
3191
+ };
3192
+
3193
+ // src/utils/autoFixParameterGroups.ts
3194
+ function autoFixParameterGroups(properties) {
3195
+ var _a;
3196
+ const remainingGroups = (_a = properties.filter((param) => param.type === "group")) != null ? _a : [];
3197
+ if (remainingGroups.length === 0) {
3198
+ return false;
3199
+ }
3200
+ let result = false;
3201
+ while (remainingGroups.length > 0) {
3202
+ const group = remainingGroups.shift();
3203
+ const groupParamsConfig = group.typeConfig && typeof group.typeConfig === "object" && "childrenParams" in group.typeConfig && Array.isArray(group.typeConfig.childrenParams) ? group.typeConfig.childrenParams : [];
3204
+ const expectedParamsToFindFollowingGroup = new Set(groupParamsConfig);
3205
+ const groupStartIndex = properties.findIndex((param) => param.id === group.id);
3206
+ const groupItemsCount = expectedParamsToFindFollowingGroup.size;
3207
+ for (let i = groupStartIndex + 1; i <= groupStartIndex + groupItemsCount; i++) {
3208
+ const param = properties[i];
3209
+ if (!param) {
3210
+ continue;
3211
+ }
3212
+ if (expectedParamsToFindFollowingGroup.has(param.id)) {
3213
+ expectedParamsToFindFollowingGroup.delete(param.id);
3214
+ } else {
3215
+ break;
3216
+ }
3217
+ }
3218
+ if (expectedParamsToFindFollowingGroup.size > 0) {
3219
+ const paramsToMove = Array.from(expectedParamsToFindFollowingGroup);
3220
+ let leadingGroupIndex = groupStartIndex + groupItemsCount - expectedParamsToFindFollowingGroup.size;
3221
+ for (const paramId of paramsToMove) {
3222
+ const paramIndex = properties.findIndex((param) => param.id === paramId);
3223
+ if (paramIndex !== -1) {
3224
+ const [param] = properties.splice(paramIndex, 1);
3225
+ if (paramIndex > leadingGroupIndex) {
3226
+ leadingGroupIndex++;
3227
+ }
3228
+ properties.splice(leadingGroupIndex, 0, param);
3229
+ } else {
3230
+ groupParamsConfig.splice(groupParamsConfig.indexOf(paramId), 1);
3231
+ }
3232
+ }
3233
+ result = true;
3234
+ }
3235
+ }
3236
+ return result;
3237
+ }
3238
+
3126
3239
  // src/utils/createApiEnhancer.ts
3127
3240
  var createUniformApiEnhancer = ({ apiUrl }) => {
3128
3241
  return async (message) => {
@@ -3252,7 +3365,8 @@ function mapSlotToTestVariations(slot) {
3252
3365
  return {
3253
3366
  ...v,
3254
3367
  id,
3255
- testDistribution: contextTag == null ? void 0 : contextTag.testDistribution
3368
+ testDistribution: contextTag == null ? void 0 : contextTag.testDistribution,
3369
+ control: contextTag == null ? void 0 : contextTag.control
3256
3370
  };
3257
3371
  });
3258
3372
  }
@@ -3417,12 +3531,12 @@ function handleRichTextNodeBinding(object, options) {
3417
3531
  import { ApiClientError as ApiClientError2 } from "@uniformdev/context/api";
3418
3532
 
3419
3533
  // src/.version.ts
3420
- var version = "20.31.0";
3534
+ var version = "20.39.1";
3421
3535
 
3422
3536
  // src/WorkflowClient.ts
3423
- import { ApiClient as ApiClient15 } from "@uniformdev/context/api";
3537
+ import { ApiClient as ApiClient16 } from "@uniformdev/context/api";
3424
3538
  var workflowsUrl = "/api/v1/workflows";
3425
- var WorkflowClient = class extends ApiClient15 {
3539
+ var WorkflowClient = class extends ApiClient16 {
3426
3540
  constructor(options) {
3427
3541
  super(options);
3428
3542
  }
@@ -3516,6 +3630,7 @@ export {
3516
3630
  IN_CONTEXT_EDITOR_PLAYGROUND_QUERY_STRING_PARAM,
3517
3631
  IN_CONTEXT_EDITOR_QUERY_STRING_PARAM,
3518
3632
  IS_RENDERED_BY_UNIFORM_ATTRIBUTE,
3633
+ IntegrationPropertyEditorsClient,
3519
3634
  LOCALE_DYNAMIC_INPUT_NAME,
3520
3635
  LocaleClient,
3521
3636
  PLACEHOLDER_ID,
@@ -3532,6 +3647,7 @@ export {
3532
3647
  UncachedContentClient,
3533
3648
  UniqueBatchEntries,
3534
3649
  WorkflowClient,
3650
+ autoFixParameterGroups,
3535
3651
  bindExpressionEscapeChars,
3536
3652
  bindExpressionPrefix,
3537
3653
  bindVariables,
@@ -3593,6 +3709,7 @@ export {
3593
3709
  isSuggestComponentMessage,
3594
3710
  isSystemComponentDefinition,
3595
3711
  isTriggerCompositionActionMessage,
3712
+ isUpdateAiActionsMessage,
3596
3713
  isUpdateComponentParameterMessage,
3597
3714
  isUpdateComponentReferencesMessage,
3598
3715
  isUpdateCompositionInternalMessage,
@@ -3603,6 +3720,7 @@ export {
3603
3720
  localize,
3604
3721
  mapSlotToPersonalizedVariations,
3605
3722
  mapSlotToTestVariations,
3723
+ mergeAssetConfigWithDefaults,
3606
3724
  nullLimitPolicy,
3607
3725
  parseComponentPlaceholderId,
3608
3726
  parseVariableExpression,
package/dist/index.js CHANGED
@@ -397,7 +397,7 @@ __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,
@@ -449,6 +449,7 @@ __export(src_exports, {
449
449
  IN_CONTEXT_EDITOR_PLAYGROUND_QUERY_STRING_PARAM: () => IN_CONTEXT_EDITOR_PLAYGROUND_QUERY_STRING_PARAM,
450
450
  IN_CONTEXT_EDITOR_QUERY_STRING_PARAM: () => IN_CONTEXT_EDITOR_QUERY_STRING_PARAM,
451
451
  IS_RENDERED_BY_UNIFORM_ATTRIBUTE: () => IS_RENDERED_BY_UNIFORM_ATTRIBUTE,
452
+ IntegrationPropertyEditorsClient: () => IntegrationPropertyEditorsClient,
452
453
  LOCALE_DYNAMIC_INPUT_NAME: () => LOCALE_DYNAMIC_INPUT_NAME,
453
454
  LocaleClient: () => LocaleClient,
454
455
  PLACEHOLDER_ID: () => PLACEHOLDER_ID,
@@ -465,6 +466,7 @@ __export(src_exports, {
465
466
  UncachedContentClient: () => UncachedContentClient,
466
467
  UniqueBatchEntries: () => UniqueBatchEntries,
467
468
  WorkflowClient: () => WorkflowClient,
469
+ autoFixParameterGroups: () => autoFixParameterGroups,
468
470
  bindExpressionEscapeChars: () => bindExpressionEscapeChars,
469
471
  bindExpressionPrefix: () => bindExpressionPrefix,
470
472
  bindVariables: () => bindVariables,
@@ -526,6 +528,7 @@ __export(src_exports, {
526
528
  isSuggestComponentMessage: () => isSuggestComponentMessage,
527
529
  isSystemComponentDefinition: () => isSystemComponentDefinition,
528
530
  isTriggerCompositionActionMessage: () => isTriggerCompositionActionMessage,
531
+ isUpdateAiActionsMessage: () => isUpdateAiActionsMessage,
529
532
  isUpdateComponentParameterMessage: () => isUpdateComponentParameterMessage,
530
533
  isUpdateComponentReferencesMessage: () => isUpdateComponentReferencesMessage,
531
534
  isUpdateCompositionInternalMessage: () => isUpdateCompositionInternalMessage,
@@ -536,6 +539,7 @@ __export(src_exports, {
536
539
  localize: () => localize,
537
540
  mapSlotToPersonalizedVariations: () => mapSlotToPersonalizedVariations,
538
541
  mapSlotToTestVariations: () => mapSlotToTestVariations,
542
+ mergeAssetConfigWithDefaults: () => mergeAssetConfigWithDefaults,
539
543
  nullLimitPolicy: () => nullLimitPolicy,
540
544
  parseComponentPlaceholderId: () => parseComponentPlaceholderId,
541
545
  parseVariableExpression: () => parseVariableExpression,
@@ -2679,10 +2683,55 @@ var EntityReleasesClient = class extends import_api7.ApiClient {
2679
2683
  }
2680
2684
  };
2681
2685
 
2682
- // src/LocaleClient.ts
2686
+ // src/IntegrationPropertyEditorsClient.ts
2683
2687
  var import_api8 = require("@uniformdev/context/api");
2688
+ var _baseUrl;
2689
+ var _IntegrationPropertyEditorsClient = class _IntegrationPropertyEditorsClient extends import_api8.ApiClient {
2690
+ constructor(options) {
2691
+ super(options);
2692
+ this.teamId = options.teamId;
2693
+ }
2694
+ /**
2695
+ * Gets a list of property type and hook names for the current team, including public integrations' hooks.
2696
+ */
2697
+ get(options) {
2698
+ const fetchUri = this.createUrl(__privateGet(_IntegrationPropertyEditorsClient, _baseUrl), {
2699
+ ...options,
2700
+ teamId: this.teamId
2701
+ });
2702
+ return this.apiClient(fetchUri);
2703
+ }
2704
+ /**
2705
+ * Creates or updates a custom AI property editor on a Mesh app.
2706
+ */
2707
+ async deploy(body) {
2708
+ const fetchUri = this.createUrl(__privateGet(_IntegrationPropertyEditorsClient, _baseUrl));
2709
+ await this.apiClient(fetchUri, {
2710
+ method: "PUT",
2711
+ body: JSON.stringify({ ...body, teamId: this.teamId }),
2712
+ expectNoContent: true
2713
+ });
2714
+ }
2715
+ /**
2716
+ * Removes a custom AI property editor from a Mesh app.
2717
+ */
2718
+ async delete(body) {
2719
+ const fetchUri = this.createUrl(__privateGet(_IntegrationPropertyEditorsClient, _baseUrl));
2720
+ await this.apiClient(fetchUri, {
2721
+ method: "DELETE",
2722
+ body: JSON.stringify({ ...body, teamId: this.teamId }),
2723
+ expectNoContent: true
2724
+ });
2725
+ }
2726
+ };
2727
+ _baseUrl = new WeakMap();
2728
+ __privateAdd(_IntegrationPropertyEditorsClient, _baseUrl, "/api/v1/integration-property-editors");
2729
+ var IntegrationPropertyEditorsClient = _IntegrationPropertyEditorsClient;
2730
+
2731
+ // src/LocaleClient.ts
2732
+ var import_api9 = require("@uniformdev/context/api");
2684
2733
  var localesUrl = "/api/v1/locales";
2685
- var LocaleClient = class extends import_api8.ApiClient {
2734
+ var LocaleClient = class extends import_api9.ApiClient {
2686
2735
  constructor(options) {
2687
2736
  super(options);
2688
2737
  }
@@ -2767,6 +2816,9 @@ var isUpdatePreviewSettingsMessage = (message) => {
2767
2816
  var isUpdateFeatureFlagsMessage = (message) => {
2768
2817
  return message.type === "update-feature-flags";
2769
2818
  };
2819
+ var isUpdateAiActionsMessage = (message) => {
2820
+ return message.type === "update-ai-actions";
2821
+ };
2770
2822
  var isUpdateContextualEditingStateInternalMessage = (message) => {
2771
2823
  return message.type === "update-contextual-editing-state-internal";
2772
2824
  };
@@ -2987,6 +3039,13 @@ var createCanvasChannel = ({
2987
3039
  };
2988
3040
  postMessage(message);
2989
3041
  };
3042
+ const updateAiActions = (options) => {
3043
+ const message = {
3044
+ ...options,
3045
+ type: "update-ai-actions"
3046
+ };
3047
+ postMessage(message);
3048
+ };
2990
3049
  const contextStorageUpdated = (options) => {
2991
3050
  const message = {
2992
3051
  ...options,
@@ -3036,6 +3095,7 @@ var createCanvasChannel = ({
3036
3095
  triggerCompositionAction,
3037
3096
  updatePreviewSettings,
3038
3097
  updateFeatureFlags,
3098
+ updateAiActions,
3039
3099
  updateContextualEditingStateInternal,
3040
3100
  selectParameter,
3041
3101
  openParameterEditor,
@@ -3051,10 +3111,10 @@ var createCanvasChannel = ({
3051
3111
  };
3052
3112
 
3053
3113
  // src/PreviewClient.ts
3054
- var import_api9 = require("@uniformdev/context/api");
3114
+ var import_api10 = require("@uniformdev/context/api");
3055
3115
  var previewUrlsUrl = "/api/v1/preview-urls";
3056
3116
  var previewViewportsUrl = "/api/v1/preview-viewports";
3057
- var PreviewClient = class extends import_api9.ApiClient {
3117
+ var PreviewClient = class extends import_api10.ApiClient {
3058
3118
  constructor(options) {
3059
3119
  super(options);
3060
3120
  }
@@ -3117,9 +3177,9 @@ var PreviewClient = class extends import_api9.ApiClient {
3117
3177
  };
3118
3178
 
3119
3179
  // src/ProjectClient.ts
3120
- var import_api10 = require("@uniformdev/context/api");
3180
+ var import_api11 = require("@uniformdev/context/api");
3121
3181
  var _url2;
3122
- var _ProjectClient = class _ProjectClient extends import_api10.ApiClient {
3182
+ var _ProjectClient = class _ProjectClient extends import_api11.ApiClient {
3123
3183
  constructor(options) {
3124
3184
  super({ ...options, bypassCache: true });
3125
3185
  }
@@ -3151,9 +3211,9 @@ __privateAdd(_ProjectClient, _url2, "/api/v1/project");
3151
3211
  var ProjectClient = _ProjectClient;
3152
3212
 
3153
3213
  // src/PromptClient.ts
3154
- var import_api11 = require("@uniformdev/context/api");
3214
+ var import_api12 = require("@uniformdev/context/api");
3155
3215
  var PromptsUrl = "/api/v1/prompts";
3156
- var PromptClient = class extends import_api11.ApiClient {
3216
+ var PromptClient = class extends import_api12.ApiClient {
3157
3217
  constructor(options) {
3158
3218
  super(options);
3159
3219
  }
@@ -3184,9 +3244,9 @@ var PromptClient = class extends import_api11.ApiClient {
3184
3244
  };
3185
3245
 
3186
3246
  // src/RelationshipClient.ts
3187
- var import_api12 = require("@uniformdev/context/api");
3247
+ var import_api13 = require("@uniformdev/context/api");
3188
3248
  var RELATIONSHIPS_URL = "/api/v1/relationships";
3189
- var RelationshipClient = class extends import_api12.ApiClient {
3249
+ var RelationshipClient = class extends import_api13.ApiClient {
3190
3250
  constructor(options) {
3191
3251
  super(options);
3192
3252
  this.get = async (options) => {
@@ -3198,9 +3258,9 @@ var RelationshipClient = class extends import_api12.ApiClient {
3198
3258
  };
3199
3259
 
3200
3260
  // src/ReleaseClient.ts
3201
- var import_api13 = require("@uniformdev/context/api");
3261
+ var import_api14 = require("@uniformdev/context/api");
3202
3262
  var releasesUrl = "/api/v1/releases";
3203
- var ReleaseClient = class extends import_api13.ApiClient {
3263
+ var ReleaseClient = class extends import_api14.ApiClient {
3204
3264
  constructor(options) {
3205
3265
  super(options);
3206
3266
  }
@@ -3240,9 +3300,9 @@ var ReleaseClient = class extends import_api13.ApiClient {
3240
3300
  };
3241
3301
 
3242
3302
  // src/ReleaseContentsClient.ts
3243
- var import_api14 = require("@uniformdev/context/api");
3303
+ var import_api15 = require("@uniformdev/context/api");
3244
3304
  var releaseContentsUrl2 = "/api/v1/release-contents";
3245
- var ReleaseContentsClient = class extends import_api14.ApiClient {
3305
+ var ReleaseContentsClient = class extends import_api15.ApiClient {
3246
3306
  constructor(options) {
3247
3307
  super(options);
3248
3308
  }
@@ -3264,9 +3324,9 @@ var ReleaseContentsClient = class extends import_api14.ApiClient {
3264
3324
  };
3265
3325
 
3266
3326
  // src/RouteClient.ts
3267
- var import_api15 = require("@uniformdev/context/api");
3327
+ var import_api16 = require("@uniformdev/context/api");
3268
3328
  var ROUTE_URL = "/api/v1/route";
3269
- var RouteClient = class extends import_api15.ApiClient {
3329
+ var RouteClient = class extends import_api16.ApiClient {
3270
3330
  constructor(options) {
3271
3331
  var _a;
3272
3332
  if (!options.limitPolicy) {
@@ -3289,6 +3349,63 @@ var RouteClient = class extends import_api15.ApiClient {
3289
3349
  // src/types/locales.ts
3290
3350
  var LOCALE_DYNAMIC_INPUT_NAME = "locale";
3291
3351
 
3352
+ // src/utils/assetConfig.ts
3353
+ var mergeAssetConfigWithDefaults = (config) => {
3354
+ var _a;
3355
+ return {
3356
+ ...config,
3357
+ // For backwards compatibility reasons undefined represents restriction to
3358
+ // image types
3359
+ allowedTypes: (_a = config.allowedTypes) != null ? _a : ["image"]
3360
+ };
3361
+ };
3362
+
3363
+ // src/utils/autoFixParameterGroups.ts
3364
+ function autoFixParameterGroups(properties) {
3365
+ var _a;
3366
+ const remainingGroups = (_a = properties.filter((param) => param.type === "group")) != null ? _a : [];
3367
+ if (remainingGroups.length === 0) {
3368
+ return false;
3369
+ }
3370
+ let result = false;
3371
+ while (remainingGroups.length > 0) {
3372
+ const group = remainingGroups.shift();
3373
+ const groupParamsConfig = group.typeConfig && typeof group.typeConfig === "object" && "childrenParams" in group.typeConfig && Array.isArray(group.typeConfig.childrenParams) ? group.typeConfig.childrenParams : [];
3374
+ const expectedParamsToFindFollowingGroup = new Set(groupParamsConfig);
3375
+ const groupStartIndex = properties.findIndex((param) => param.id === group.id);
3376
+ const groupItemsCount = expectedParamsToFindFollowingGroup.size;
3377
+ for (let i = groupStartIndex + 1; i <= groupStartIndex + groupItemsCount; i++) {
3378
+ const param = properties[i];
3379
+ if (!param) {
3380
+ continue;
3381
+ }
3382
+ if (expectedParamsToFindFollowingGroup.has(param.id)) {
3383
+ expectedParamsToFindFollowingGroup.delete(param.id);
3384
+ } else {
3385
+ break;
3386
+ }
3387
+ }
3388
+ if (expectedParamsToFindFollowingGroup.size > 0) {
3389
+ const paramsToMove = Array.from(expectedParamsToFindFollowingGroup);
3390
+ let leadingGroupIndex = groupStartIndex + groupItemsCount - expectedParamsToFindFollowingGroup.size;
3391
+ for (const paramId of paramsToMove) {
3392
+ const paramIndex = properties.findIndex((param) => param.id === paramId);
3393
+ if (paramIndex !== -1) {
3394
+ const [param] = properties.splice(paramIndex, 1);
3395
+ if (paramIndex > leadingGroupIndex) {
3396
+ leadingGroupIndex++;
3397
+ }
3398
+ properties.splice(leadingGroupIndex, 0, param);
3399
+ } else {
3400
+ groupParamsConfig.splice(groupParamsConfig.indexOf(paramId), 1);
3401
+ }
3402
+ }
3403
+ result = true;
3404
+ }
3405
+ }
3406
+ return result;
3407
+ }
3408
+
3292
3409
  // src/utils/createApiEnhancer.ts
3293
3410
  var createUniformApiEnhancer = ({ apiUrl }) => {
3294
3411
  return async (message) => {
@@ -3418,7 +3535,8 @@ function mapSlotToTestVariations(slot) {
3418
3535
  return {
3419
3536
  ...v,
3420
3537
  id,
3421
- testDistribution: contextTag == null ? void 0 : contextTag.testDistribution
3538
+ testDistribution: contextTag == null ? void 0 : contextTag.testDistribution,
3539
+ control: contextTag == null ? void 0 : contextTag.control
3422
3540
  };
3423
3541
  });
3424
3542
  }
@@ -3580,15 +3698,15 @@ function handleRichTextNodeBinding(object, options) {
3580
3698
  }
3581
3699
 
3582
3700
  // src/index.ts
3583
- var import_api17 = require("@uniformdev/context/api");
3701
+ var import_api18 = require("@uniformdev/context/api");
3584
3702
 
3585
3703
  // src/.version.ts
3586
- var version = "20.31.0";
3704
+ var version = "20.39.1";
3587
3705
 
3588
3706
  // src/WorkflowClient.ts
3589
- var import_api16 = require("@uniformdev/context/api");
3707
+ var import_api17 = require("@uniformdev/context/api");
3590
3708
  var workflowsUrl = "/api/v1/workflows";
3591
- var WorkflowClient = class extends import_api16.ApiClient {
3709
+ var WorkflowClient = class extends import_api17.ApiClient {
3592
3710
  constructor(options) {
3593
3711
  super(options);
3594
3712
  }
@@ -3619,7 +3737,7 @@ var WorkflowClient = class extends import_api16.ApiClient {
3619
3737
  };
3620
3738
 
3621
3739
  // src/index.ts
3622
- var CanvasClientError = import_api17.ApiClientError;
3740
+ var CanvasClientError = import_api18.ApiClientError;
3623
3741
  // Annotate the CommonJS export names for ESM import in node:
3624
3742
  0 && (module.exports = {
3625
3743
  ASSETS_SOURCE_CUSTOM_URL,
@@ -3683,6 +3801,7 @@ var CanvasClientError = import_api17.ApiClientError;
3683
3801
  IN_CONTEXT_EDITOR_PLAYGROUND_QUERY_STRING_PARAM,
3684
3802
  IN_CONTEXT_EDITOR_QUERY_STRING_PARAM,
3685
3803
  IS_RENDERED_BY_UNIFORM_ATTRIBUTE,
3804
+ IntegrationPropertyEditorsClient,
3686
3805
  LOCALE_DYNAMIC_INPUT_NAME,
3687
3806
  LocaleClient,
3688
3807
  PLACEHOLDER_ID,
@@ -3699,6 +3818,7 @@ var CanvasClientError = import_api17.ApiClientError;
3699
3818
  UncachedContentClient,
3700
3819
  UniqueBatchEntries,
3701
3820
  WorkflowClient,
3821
+ autoFixParameterGroups,
3702
3822
  bindExpressionEscapeChars,
3703
3823
  bindExpressionPrefix,
3704
3824
  bindVariables,
@@ -3760,6 +3880,7 @@ var CanvasClientError = import_api17.ApiClientError;
3760
3880
  isSuggestComponentMessage,
3761
3881
  isSystemComponentDefinition,
3762
3882
  isTriggerCompositionActionMessage,
3883
+ isUpdateAiActionsMessage,
3763
3884
  isUpdateComponentParameterMessage,
3764
3885
  isUpdateComponentReferencesMessage,
3765
3886
  isUpdateCompositionInternalMessage,
@@ -3770,6 +3891,7 @@ var CanvasClientError = import_api17.ApiClientError;
3770
3891
  localize,
3771
3892
  mapSlotToPersonalizedVariations,
3772
3893
  mapSlotToTestVariations,
3894
+ mergeAssetConfigWithDefaults,
3773
3895
  nullLimitPolicy,
3774
3896
  parseComponentPlaceholderId,
3775
3897
  parseVariableExpression,