@witchcraft/layout 0.5.12 → 0.5.13
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/module.json +1 -1
- package/dist/runtime/types/index.d.ts +8 -6
- package/package.json +1 -1
- package/src/runtime/types/index.ts +14 -11
package/dist/module.json
CHANGED
|
@@ -1844,12 +1844,14 @@ export type LayoutChange<TInfo = never> = {
|
|
|
1844
1844
|
window?: Partial<LayoutWindow>;
|
|
1845
1845
|
info?: TInfo;
|
|
1846
1846
|
};
|
|
1847
|
-
export type ExtendedMoveTypes = Flatten<OrToAnd<
|
|
1848
|
-
|
|
1849
|
-
|
|
1850
|
-
|
|
1851
|
-
|
|
1852
|
-
|
|
1847
|
+
export type ExtendedMoveTypes = Flatten<OrToAnd<{
|
|
1848
|
+
[K in keyof Register]: K extends `LayoutMove${string}` ? Register[K] extends {
|
|
1849
|
+
type: string;
|
|
1850
|
+
context: any;
|
|
1851
|
+
resolve: any;
|
|
1852
|
+
moveType: "edge" | "frame" | "other";
|
|
1853
|
+
} ? Record<Register[K]["type"], Register[K]> : never : never;
|
|
1854
|
+
}[keyof Register]>>;
|
|
1853
1855
|
export type MoveState = {
|
|
1854
1856
|
/** The current directions in the corresponding orientations that the user is dragging in. */
|
|
1855
1857
|
moveDirections: Record<Orientation, Direction | undefined>;
|
package/package.json
CHANGED
|
@@ -445,18 +445,21 @@ export type LayoutChange<TInfo = never> = {
|
|
|
445
445
|
|
|
446
446
|
|
|
447
447
|
// #todo we also need to change how the normal types are extended to this pattern
|
|
448
|
-
export type ExtendedMoveTypes = Flatten<OrToAnd<
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
448
|
+
export type ExtendedMoveTypes = Flatten<OrToAnd<
|
|
449
|
+
{
|
|
450
|
+
[K in keyof Register]: K extends `LayoutMove${string}`
|
|
451
|
+
? Register[K] extends {
|
|
452
|
+
type: string
|
|
453
|
+
context: any
|
|
454
|
+
resolve: any
|
|
455
|
+
moveType: "edge" | "frame" | "other"
|
|
456
|
+
}
|
|
457
|
+
? Record<Register[K]["type"], Register[K]>
|
|
458
|
+
: never
|
|
457
459
|
: never
|
|
458
|
-
|
|
459
|
-
|
|
460
|
+
}[keyof Register]
|
|
461
|
+
>>
|
|
462
|
+
|
|
460
463
|
|
|
461
464
|
export type MoveState = {
|
|
462
465
|
/** The current directions in the corresponding orientations that the user is dragging in. */
|