@headless-tree/core 0.0.0-20250921152257 → 0.0.0-20250928101953
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/CHANGELOG.md +1 -1
- package/dist/index.d.mts +5 -5
- package/dist/index.d.ts +5 -5
- package/package.json +1 -1
- package/src/types/core.ts +5 -5
package/CHANGELOG.md
CHANGED
package/dist/index.d.mts
CHANGED
|
@@ -527,11 +527,11 @@ type HotkeyName = MergedFeatures<RegisteredFeatures<any>>["hotkeys"];
|
|
|
527
527
|
type HotkeysConfig<T> = Record<HotkeyName, HotkeyConfig<T>>;
|
|
528
528
|
type CustomHotkeysConfig<T> = Partial<Record<HotkeyName | `custom${string}`, Partial<HotkeyConfig<T>>>>;
|
|
529
529
|
type MayReturnNull<T extends (...x: any[]) => any> = (...args: Parameters<T>) => ReturnType<T> | null;
|
|
530
|
-
type ItemInstanceOpts<Key extends keyof ItemInstance<any>> = {
|
|
531
|
-
item: ItemInstance<
|
|
532
|
-
tree: TreeInstance<
|
|
530
|
+
type ItemInstanceOpts<T, Key extends keyof ItemInstance<any>> = {
|
|
531
|
+
item: ItemInstance<T>;
|
|
532
|
+
tree: TreeInstance<T>;
|
|
533
533
|
itemId: string;
|
|
534
|
-
prev?: MayReturnNull<ItemInstance<
|
|
534
|
+
prev?: MayReturnNull<ItemInstance<T>[Key]>;
|
|
535
535
|
};
|
|
536
536
|
type TreeInstanceOpts<Key extends keyof TreeInstance<any>> = {
|
|
537
537
|
tree: TreeInstance<any>;
|
|
@@ -548,7 +548,7 @@ type FeatureImplementation<T = any> = {
|
|
|
548
548
|
[key in keyof TreeInstance<T>]?: (opts: TreeInstanceOpts<key>, ...args: Parameters<TreeInstance<T>[key]>) => void;
|
|
549
549
|
};
|
|
550
550
|
itemInstance?: {
|
|
551
|
-
[key in keyof ItemInstance<T>]?: (opts: ItemInstanceOpts<key>, ...args: Parameters<ItemInstance<T>[key]>) => void;
|
|
551
|
+
[key in keyof ItemInstance<T>]?: (opts: ItemInstanceOpts<T, key>, ...args: Parameters<ItemInstance<T>[key]>) => void;
|
|
552
552
|
};
|
|
553
553
|
onTreeMount?: (instance: TreeInstance<T>, treeElement: HTMLElement) => void;
|
|
554
554
|
onTreeUnmount?: (instance: TreeInstance<T>, treeElement: HTMLElement) => void;
|
package/dist/index.d.ts
CHANGED
|
@@ -527,11 +527,11 @@ type HotkeyName = MergedFeatures<RegisteredFeatures<any>>["hotkeys"];
|
|
|
527
527
|
type HotkeysConfig<T> = Record<HotkeyName, HotkeyConfig<T>>;
|
|
528
528
|
type CustomHotkeysConfig<T> = Partial<Record<HotkeyName | `custom${string}`, Partial<HotkeyConfig<T>>>>;
|
|
529
529
|
type MayReturnNull<T extends (...x: any[]) => any> = (...args: Parameters<T>) => ReturnType<T> | null;
|
|
530
|
-
type ItemInstanceOpts<Key extends keyof ItemInstance<any>> = {
|
|
531
|
-
item: ItemInstance<
|
|
532
|
-
tree: TreeInstance<
|
|
530
|
+
type ItemInstanceOpts<T, Key extends keyof ItemInstance<any>> = {
|
|
531
|
+
item: ItemInstance<T>;
|
|
532
|
+
tree: TreeInstance<T>;
|
|
533
533
|
itemId: string;
|
|
534
|
-
prev?: MayReturnNull<ItemInstance<
|
|
534
|
+
prev?: MayReturnNull<ItemInstance<T>[Key]>;
|
|
535
535
|
};
|
|
536
536
|
type TreeInstanceOpts<Key extends keyof TreeInstance<any>> = {
|
|
537
537
|
tree: TreeInstance<any>;
|
|
@@ -548,7 +548,7 @@ type FeatureImplementation<T = any> = {
|
|
|
548
548
|
[key in keyof TreeInstance<T>]?: (opts: TreeInstanceOpts<key>, ...args: Parameters<TreeInstance<T>[key]>) => void;
|
|
549
549
|
};
|
|
550
550
|
itemInstance?: {
|
|
551
|
-
[key in keyof ItemInstance<T>]?: (opts: ItemInstanceOpts<key>, ...args: Parameters<ItemInstance<T>[key]>) => void;
|
|
551
|
+
[key in keyof ItemInstance<T>]?: (opts: ItemInstanceOpts<T, key>, ...args: Parameters<ItemInstance<T>[key]>) => void;
|
|
552
552
|
};
|
|
553
553
|
onTreeMount?: (instance: TreeInstance<T>, treeElement: HTMLElement) => void;
|
|
554
554
|
onTreeUnmount?: (instance: TreeInstance<T>, treeElement: HTMLElement) => void;
|
package/package.json
CHANGED
package/src/types/core.ts
CHANGED
|
@@ -93,11 +93,11 @@ type MayReturnNull<T extends (...x: any[]) => any> = (
|
|
|
93
93
|
...args: Parameters<T>
|
|
94
94
|
) => ReturnType<T> | null;
|
|
95
95
|
|
|
96
|
-
export type ItemInstanceOpts<Key extends keyof ItemInstance<any>> = {
|
|
97
|
-
item: ItemInstance<
|
|
98
|
-
tree: TreeInstance<
|
|
96
|
+
export type ItemInstanceOpts<T, Key extends keyof ItemInstance<any>> = {
|
|
97
|
+
item: ItemInstance<T>;
|
|
98
|
+
tree: TreeInstance<T>;
|
|
99
99
|
itemId: string;
|
|
100
|
-
prev?: MayReturnNull<ItemInstance<
|
|
100
|
+
prev?: MayReturnNull<ItemInstance<T>[Key]>;
|
|
101
101
|
};
|
|
102
102
|
|
|
103
103
|
export type TreeInstanceOpts<Key extends keyof TreeInstance<any>> = {
|
|
@@ -131,7 +131,7 @@ export type FeatureImplementation<T = any> = {
|
|
|
131
131
|
|
|
132
132
|
itemInstance?: {
|
|
133
133
|
[key in keyof ItemInstance<T>]?: (
|
|
134
|
-
opts: ItemInstanceOpts<key>,
|
|
134
|
+
opts: ItemInstanceOpts<T, key>,
|
|
135
135
|
...args: Parameters<ItemInstance<T>[key]>
|
|
136
136
|
) => void;
|
|
137
137
|
};
|