@uniformdev/canvas 19.55.2-alpha.46 → 19.55.2-alpha.52

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.mts CHANGED
@@ -13309,6 +13309,8 @@ type ContextualEditingComponentReference = {
13309
13309
  name?: string;
13310
13310
  isReadOnly?: boolean;
13311
13311
  }>;
13312
+ /** The ID of the pattern if the component is actually a pattern node. */
13313
+ patternId?: string;
13312
13314
  parentId?: string;
13313
13315
  parentType?: string;
13314
13316
  parentSlot?: {
@@ -13316,7 +13318,16 @@ type ContextualEditingComponentReference = {
13316
13318
  componentIndex?: number;
13317
13319
  totalComponents?: number;
13318
13320
  };
13319
- childIdsBySlot?: Record<string, string[]>;
13321
+ slotsById?: Record<string, {
13322
+ id: string;
13323
+ name: string;
13324
+ children: string[];
13325
+ }>;
13326
+ canBePersonalized?: boolean;
13327
+ canBeTested?: boolean;
13328
+ canBeLocalized?: boolean;
13329
+ isPersonalized?: boolean;
13330
+ isTested?: boolean;
13320
13331
  isLocalized?: boolean;
13321
13332
  isReadOnly?: boolean | undefined;
13322
13333
  };
@@ -13843,8 +13854,9 @@ type ReadyMessage = {
13843
13854
  };
13844
13855
  type TriggerComponentActionMessage = {
13845
13856
  type: 'trigger-component-action';
13846
- actionType: 'insert-before' | 'insert-after' | 'duplicate' | 'delete';
13857
+ actionType: 'insertBefore' | 'insertAfter' | 'insertInto' | 'duplicate' | 'delete' | 'editPattern' | 'unlinkPattern' | 'convertToPattern' | 'personalize' | 'test' | 'localize';
13847
13858
  componentReference: Omit<ContextualEditingComponentReference, 'elements'>;
13859
+ extraData?: Record<string, any>;
13848
13860
  };
13849
13861
  type UpdateComponentReferencesMessage = {
13850
13862
  type: 'update-component-references';
@@ -14257,7 +14269,7 @@ declare function mapSlotToPersonalizedVariations(slot: ComponentInstance[] | und
14257
14269
  */
14258
14270
  declare function mapSlotToTestVariations(slot: ComponentInstance[] | undefined): Array<ComponentInstance & TestVariant>;
14259
14271
 
14260
- declare const isComponentPlaceholderId: (id: string | undefined) => boolean | undefined;
14272
+ declare const isComponentPlaceholderId: (id: string | undefined) => boolean;
14261
14273
  declare const generateComponentPlaceholderId: (randomId: string, sdkVersion: number | undefined) => string;
14262
14274
 
14263
14275
  type BindVariablesResult<TValue> = {
package/dist/index.d.ts CHANGED
@@ -13309,6 +13309,8 @@ type ContextualEditingComponentReference = {
13309
13309
  name?: string;
13310
13310
  isReadOnly?: boolean;
13311
13311
  }>;
13312
+ /** The ID of the pattern if the component is actually a pattern node. */
13313
+ patternId?: string;
13312
13314
  parentId?: string;
13313
13315
  parentType?: string;
13314
13316
  parentSlot?: {
@@ -13316,7 +13318,16 @@ type ContextualEditingComponentReference = {
13316
13318
  componentIndex?: number;
13317
13319
  totalComponents?: number;
13318
13320
  };
13319
- childIdsBySlot?: Record<string, string[]>;
13321
+ slotsById?: Record<string, {
13322
+ id: string;
13323
+ name: string;
13324
+ children: string[];
13325
+ }>;
13326
+ canBePersonalized?: boolean;
13327
+ canBeTested?: boolean;
13328
+ canBeLocalized?: boolean;
13329
+ isPersonalized?: boolean;
13330
+ isTested?: boolean;
13320
13331
  isLocalized?: boolean;
13321
13332
  isReadOnly?: boolean | undefined;
13322
13333
  };
@@ -13843,8 +13854,9 @@ type ReadyMessage = {
13843
13854
  };
13844
13855
  type TriggerComponentActionMessage = {
13845
13856
  type: 'trigger-component-action';
13846
- actionType: 'insert-before' | 'insert-after' | 'duplicate' | 'delete';
13857
+ actionType: 'insertBefore' | 'insertAfter' | 'insertInto' | 'duplicate' | 'delete' | 'editPattern' | 'unlinkPattern' | 'convertToPattern' | 'personalize' | 'test' | 'localize';
13847
13858
  componentReference: Omit<ContextualEditingComponentReference, 'elements'>;
13859
+ extraData?: Record<string, any>;
13848
13860
  };
13849
13861
  type UpdateComponentReferencesMessage = {
13850
13862
  type: 'update-component-references';
@@ -14257,7 +14269,7 @@ declare function mapSlotToPersonalizedVariations(slot: ComponentInstance[] | und
14257
14269
  */
14258
14270
  declare function mapSlotToTestVariations(slot: ComponentInstance[] | undefined): Array<ComponentInstance & TestVariant>;
14259
14271
 
14260
- declare const isComponentPlaceholderId: (id: string | undefined) => boolean | undefined;
14272
+ declare const isComponentPlaceholderId: (id: string | undefined) => boolean;
14261
14273
  declare const generateComponentPlaceholderId: (randomId: string, sdkVersion: number | undefined) => string;
14262
14274
 
14263
14275
  type BindVariablesResult<TValue> = {
package/dist/index.esm.js CHANGED
@@ -2254,6 +2254,9 @@ var isComponentPlaceholderId = (id) => {
2254
2254
  if (id === PLACEHOLDER_ID) {
2255
2255
  return true;
2256
2256
  }
2257
+ if (typeof id !== "string") {
2258
+ return false;
2259
+ }
2257
2260
  return id == null ? void 0 : id.startsWith(PLACEHOLDER_ID);
2258
2261
  };
2259
2262
  var generateComponentPlaceholderId = (randomId, sdkVersion) => {
package/dist/index.js CHANGED
@@ -2366,6 +2366,9 @@ var isComponentPlaceholderId = (id) => {
2366
2366
  if (id === PLACEHOLDER_ID) {
2367
2367
  return true;
2368
2368
  }
2369
+ if (typeof id !== "string") {
2370
+ return false;
2371
+ }
2369
2372
  return id == null ? void 0 : id.startsWith(PLACEHOLDER_ID);
2370
2373
  };
2371
2374
  var generateComponentPlaceholderId = (randomId, sdkVersion) => {
package/dist/index.mjs CHANGED
@@ -2254,6 +2254,9 @@ var isComponentPlaceholderId = (id) => {
2254
2254
  if (id === PLACEHOLDER_ID) {
2255
2255
  return true;
2256
2256
  }
2257
+ if (typeof id !== "string") {
2258
+ return false;
2259
+ }
2257
2260
  return id == null ? void 0 : id.startsWith(PLACEHOLDER_ID);
2258
2261
  };
2259
2262
  var generateComponentPlaceholderId = (randomId, sdkVersion) => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@uniformdev/canvas",
3
- "version": "19.55.2-alpha.46+7e4af0d56",
3
+ "version": "19.55.2-alpha.52+12f0e007e",
4
4
  "description": "Common functionality and types for Uniform Canvas",
5
5
  "license": "SEE LICENSE IN LICENSE.txt",
6
6
  "main": "./dist/index.js",
@@ -38,8 +38,8 @@
38
38
  "pusher-js": "8.2.0"
39
39
  },
40
40
  "dependencies": {
41
- "@uniformdev/assets": "19.55.2-alpha.46+7e4af0d56",
42
- "@uniformdev/context": "19.55.2-alpha.46+7e4af0d56",
41
+ "@uniformdev/assets": "19.55.2-alpha.52+12f0e007e",
42
+ "@uniformdev/context": "19.55.2-alpha.52+12f0e007e",
43
43
  "immer": "9.0.21"
44
44
  },
45
45
  "files": [
@@ -48,5 +48,5 @@
48
48
  "publishConfig": {
49
49
  "access": "public"
50
50
  },
51
- "gitHead": "7e4af0d56a1f13233f4dc1b2b926a5be4ca8636e"
51
+ "gitHead": "12f0e007e1b47387c6422a52d7a8473f8bae0969"
52
52
  }