@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.
- package/lib/slots/slots.js +6 -2
- package/lib/xstate-tree.d.ts +2 -2
- package/package.json +1 -1
package/lib/slots/slots.js
CHANGED
|
@@ -16,7 +16,9 @@ function singleSlot(name) {
|
|
|
16
16
|
return {
|
|
17
17
|
type: SlotType.SingleSlot,
|
|
18
18
|
name,
|
|
19
|
-
getId: () =>
|
|
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) =>
|
|
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;
|
package/lib/xstate-tree.d.ts
CHANGED
|
@@ -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