@headless-tree/core 0.0.0-20250818215955 → 0.0.0-20250819205638

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 CHANGED
@@ -1,6 +1,12 @@
1
1
  # @headless-tree/core
2
2
 
3
- ## 0.0.0-20250818215955
3
+ ## 0.0.0-20250819205638
4
+
5
+ ### Patch Changes
6
+
7
+ - 215ab4b: add a new symbol that can be used in hotkey configurations "metaorcontrol" that will trigger if either any windows control key or mac meta key is pressed (#141)
8
+
9
+ ## 1.4.0
4
10
 
5
11
  ### Minor Changes
6
12
 
package/dist/index.d.mts CHANGED
@@ -259,7 +259,12 @@ type SyncDataLoaderFeatureDef<T> = {
259
259
  };
260
260
  treeInstance: {
261
261
  retrieveItemData: (itemId: string) => T;
262
- retrieveChildrenIds: (itemId: string) => string[];
262
+ /** Retrieve children Ids. If an async data loader is used, skipFetch is set to true, and children have not been retrieved
263
+ * yet for this item, this will initiate fetching the children, and return an empty array. Once the children have loaded,
264
+ * a rerender will be triggered.
265
+ * @param skipFetch - Defaults to false.
266
+ */
267
+ retrieveChildrenIds: (itemId: string, skipFetch?: boolean) => string[];
263
268
  };
264
269
  itemInstance: {
265
270
  isLoading: () => boolean;
package/dist/index.d.ts CHANGED
@@ -259,7 +259,12 @@ type SyncDataLoaderFeatureDef<T> = {
259
259
  };
260
260
  treeInstance: {
261
261
  retrieveItemData: (itemId: string) => T;
262
- retrieveChildrenIds: (itemId: string) => string[];
262
+ /** Retrieve children Ids. If an async data loader is used, skipFetch is set to true, and children have not been retrieved
263
+ * yet for this item, this will initiate fetching the children, and return an empty array. Once the children have loaded,
264
+ * a rerender will be triggered.
265
+ * @param skipFetch - Defaults to false.
266
+ */
267
+ retrieveChildrenIds: (itemId: string, skipFetch?: boolean) => string[];
263
268
  };
264
269
  itemInstance: {
265
270
  isLoading: () => boolean;
package/dist/index.js CHANGED
@@ -929,7 +929,8 @@ var specialKeys = {
929
929
  plus: /^(NumpadAdd|Plus)$/,
930
930
  minus: /^(NumpadSubtract|Minus)$/,
931
931
  control: /^(ControlLeft|ControlRight)$/,
932
- shift: /^(ShiftLeft|ShiftRight)$/
932
+ shift: /^(ShiftLeft|ShiftRight)$/,
933
+ metaorcontrol: /^(MetaLeft|MetaRight|ControlLeft|ControlRight)$/
933
934
  };
934
935
  var testHotkeyMatch = (pressedKeys, tree, hotkey) => {
935
936
  const supposedKeys = hotkey.hotkey.toLowerCase().split("+");
package/dist/index.mjs CHANGED
@@ -885,7 +885,8 @@ var specialKeys = {
885
885
  plus: /^(NumpadAdd|Plus)$/,
886
886
  minus: /^(NumpadSubtract|Minus)$/,
887
887
  control: /^(ControlLeft|ControlRight)$/,
888
- shift: /^(ShiftLeft|ShiftRight)$/
888
+ shift: /^(ShiftLeft|ShiftRight)$/,
889
+ metaorcontrol: /^(MetaLeft|MetaRight|ControlLeft|ControlRight)$/
889
890
  };
890
891
  var testHotkeyMatch = (pressedKeys, tree, hotkey) => {
891
892
  const supposedKeys = hotkey.hotkey.toLowerCase().split("+");
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@headless-tree/core",
3
- "version": "0.0.0-20250818215955",
3
+ "version": "0.0.0-20250819205638",
4
4
  "main": "dist/index.d.ts",
5
5
  "module": "dist/index.mjs",
6
6
  "types": "dist/index.d.mts",
@@ -13,6 +13,7 @@ const specialKeys: Record<string, RegExp> = {
13
13
  minus: /^(NumpadSubtract|Minus)$/,
14
14
  control: /^(ControlLeft|ControlRight)$/,
15
15
  shift: /^(ShiftLeft|ShiftRight)$/,
16
+ metaorcontrol: /^(MetaLeft|MetaRight|ControlLeft|ControlRight)$/,
16
17
  };
17
18
 
18
19
  const testHotkeyMatch = (
@@ -18,7 +18,13 @@ export type SyncDataLoaderFeatureDef<T> = {
18
18
  };
19
19
  treeInstance: {
20
20
  retrieveItemData: (itemId: string) => T;
21
- retrieveChildrenIds: (itemId: string) => string[];
21
+
22
+ /** Retrieve children Ids. If an async data loader is used, skipFetch is set to true, and children have not been retrieved
23
+ * yet for this item, this will initiate fetching the children, and return an empty array. Once the children have loaded,
24
+ * a rerender will be triggered.
25
+ * @param skipFetch - Defaults to false.
26
+ */
27
+ retrieveChildrenIds: (itemId: string, skipFetch?: boolean) => string[];
22
28
  };
23
29
  itemInstance: {
24
30
  isLoading: () => boolean;