@koordinates/xstate-tree 5.4.0 → 5.5.0

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.
@@ -16,7 +16,9 @@ function singleSlot(name) {
16
16
  return {
17
17
  type: SlotType.SingleSlot,
18
18
  name,
19
- getId: () => `${name.toLowerCase()}-slot`,
19
+ getId: (suffix) => suffix
20
+ ? `${name.toLowerCase()}-${suffix}-slot`
21
+ : `${name.toLowerCase()}-slot`,
20
22
  };
21
23
  }
22
24
  exports.singleSlot = singleSlot;
@@ -27,7 +29,9 @@ function multiSlot(name) {
27
29
  return {
28
30
  type: SlotType.MultiSlot,
29
31
  name: `${name}Multi`,
30
- getId: (id) => `${id}-${name.toLowerCase()}multi-slots`,
32
+ getId: (id, suffix) => suffix
33
+ ? `${id}-${name.toLowerCase()}multi-slots-${suffix}`
34
+ : `${id}-${name.toLowerCase()}multi-slots`,
31
35
  };
32
36
  }
33
37
  exports.multiSlot = multiSlot;
@@ -320,7 +320,7 @@ export declare type Meta<T> = T extends {
320
320
  export declare type MultiSlot<T extends string> = {
321
321
  type: SlotType.MultiSlot;
322
322
  name: `${T}Multi`;
323
- getId(id: string): string;
323
+ getId(id: string, suffix?: string): string;
324
324
  };
325
325
 
326
326
  /**
@@ -621,7 +621,7 @@ export declare type SharedMeta = {
621
621
  export declare type SingleSlot<T extends string> = {
622
622
  type: SlotType.SingleSlot;
623
623
  name: T;
624
- getId(): string;
624
+ getId(suffix?: string): string;
625
625
  };
626
626
 
627
627
  /**
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "@koordinates/xstate-tree",
3
3
  "main": "lib/index.js",
4
4
  "types": "lib/xstate-tree.d.ts",
5
- "version": "5.4.0",
5
+ "version": "5.5.0",
6
6
  "license": "MIT",
7
7
  "description": "Build UIs with Actors using xstate and React",
8
8
  "keywords": [