@1771technologies/lytenyte-pro 1.0.15 → 1.0.16

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.
Files changed (129) hide show
  1. package/dist/__play__/filter-select/filter-select.play.d.ts +4 -0
  2. package/dist/__play__/filter-select/filter-select.play.js +76 -0
  3. package/dist/__play__/test-utils/row-handler.js +3 -4
  4. package/dist/cell-selection/bound-selection-rect.js +1 -1
  5. package/dist/cell-selection/cell-selection-driver.js +7 -6
  6. package/dist/column-manager/branch.d.ts +1 -1
  7. package/dist/column-manager/branch.js +1 -1
  8. package/dist/column-manager/label.d.ts +1 -1
  9. package/dist/column-manager/label.js +1 -1
  10. package/dist/column-manager/leaf.js +1 -1
  11. package/dist/column-manager/move-handle.d.ts +1 -1
  12. package/dist/column-manager/move-handle.js +1 -2
  13. package/dist/column-manager/visibility-checkbox.d.ts +1 -1
  14. package/dist/column-manager/visibility-checkbox.js +1 -1
  15. package/dist/filter-selects/apply.d.ts +7 -0
  16. package/dist/filter-selects/apply.js +22 -0
  17. package/dist/filter-selects/context.d.ts +12 -0
  18. package/dist/filter-selects/context.js +3 -0
  19. package/dist/filter-selects/filter-combinator.d.ts +10 -0
  20. package/dist/filter-selects/filter-combinator.js +19 -0
  21. package/dist/filter-selects/filter-row-context.d.ts +30 -0
  22. package/dist/filter-selects/filter-row-context.js +3 -0
  23. package/dist/filter-selects/filter-row.d.ts +13 -0
  24. package/dist/filter-selects/filter-row.js +118 -0
  25. package/dist/filter-selects/index.d.ts +20 -0
  26. package/dist/filter-selects/index.js +18 -0
  27. package/dist/filter-selects/is-complete-filter.d.ts +2 -0
  28. package/dist/filter-selects/is-complete-filter.js +5 -0
  29. package/dist/filter-selects/operator-select.d.ts +14 -0
  30. package/dist/filter-selects/operator-select.js +25 -0
  31. package/dist/filter-selects/options.d.ts +9 -0
  32. package/dist/filter-selects/options.js +100 -0
  33. package/dist/filter-selects/reset.d.ts +7 -0
  34. package/dist/filter-selects/reset.js +22 -0
  35. package/dist/filter-selects/root.d.ts +13 -0
  36. package/dist/filter-selects/root.js +5 -0
  37. package/dist/filter-selects/to-filter-item.d.ts +3 -0
  38. package/dist/filter-selects/to-filter-item.js +7 -0
  39. package/dist/filter-selects/use-filter-select.d.ts +37 -0
  40. package/dist/filter-selects/use-filter-select.js +158 -0
  41. package/dist/filter-selects/value-input.d.ts +12 -0
  42. package/dist/filter-selects/value-input.js +27 -0
  43. package/dist/filter-tree/branch.d.ts +1 -1
  44. package/dist/filter-tree/branch.js +1 -1
  45. package/dist/filter-tree/hooks/use-filter-tree.js +1 -1
  46. package/dist/filter-tree/inclusion-checkbox.d.ts +1 -1
  47. package/dist/filter-tree/inclusion-checkbox.js +1 -1
  48. package/dist/filter-tree/label.d.ts +1 -1
  49. package/dist/filter-tree/label.js +1 -1
  50. package/dist/filter-tree/root.d.ts +1 -1
  51. package/dist/filter-tree/root.js +1 -1
  52. package/dist/grid/header-cell.d.ts +1 -1
  53. package/dist/grid/header-cell.js +1 -2
  54. package/dist/grid/header.d.ts +1 -1
  55. package/dist/grid/row-full-width.d.ts +1 -1
  56. package/dist/grid/row-full-width.js +1 -2
  57. package/dist/grid/row.d.ts +1 -1
  58. package/dist/grid/row.js +0 -1
  59. package/dist/grid/rows-container.d.ts +1 -1
  60. package/dist/grid-box/item.d.ts +1 -1
  61. package/dist/grid-box/item.js +1 -2
  62. package/dist/grid-box/panel.js +1 -1
  63. package/dist/grid-box/use-aggregation-box-items.js +1 -1
  64. package/dist/grid-box/use-column-box-items.js +1 -1
  65. package/dist/grid-box/use-row-group-box-items.js +1 -1
  66. package/dist/grid.d.ts +2 -2
  67. package/dist/index.d.ts +2 -1
  68. package/dist/index.js +2 -1
  69. package/dist/license/index.d.ts +1 -0
  70. package/dist/license/index.js +1 -0
  71. package/dist/license/license.d.ts +3 -0
  72. package/dist/license/license.js +215 -0
  73. package/dist/license/md5-hash.d.ts +9 -0
  74. package/dist/license/md5-hash.js +167 -0
  75. package/dist/license.js +1 -1
  76. package/dist/listbox/item.js +1 -1
  77. package/dist/listbox/panel.js +2 -2
  78. package/dist/row-data-source-client/filter/compute-filtered-rows.js +1 -1
  79. package/dist/row-data-source-client/pivots/create-pivot-columns-from-paths.js +1 -1
  80. package/dist/row-data-source-client/use-client-data-source-paginated.js +3 -2
  81. package/dist/row-data-source-client/use-client-data-source.js +3 -2
  82. package/dist/row-data-source-client/use-client-tree-data-source.js +3 -2
  83. package/dist/row-data-source-server/server-data.js +1 -1
  84. package/dist/row-data-source-server/use-server-data-source.js +2 -2
  85. package/dist/sort-manager/hooks/use-sort-manager.js +2 -2
  86. package/dist/sort-manager/hooks/use-sort-row-item.js +1 -1
  87. package/dist/sort-manager/sort-add.d.ts +1 -1
  88. package/dist/sort-manager/sort-add.js +1 -1
  89. package/dist/sort-manager/sort-apply.d.ts +1 -1
  90. package/dist/sort-manager/sort-apply.js +2 -2
  91. package/dist/sort-manager/sort-cancel.d.ts +1 -1
  92. package/dist/sort-manager/sort-cancel.js +2 -2
  93. package/dist/sort-manager/sort-clear.d.ts +1 -1
  94. package/dist/sort-manager/sort-clear.js +1 -1
  95. package/dist/sort-manager/sort-column-select.d.ts +1 -1
  96. package/dist/sort-manager/sort-column-select.js +1 -1
  97. package/dist/sort-manager/sort-direction-select.d.ts +1 -1
  98. package/dist/sort-manager/sort-direction-select.js +1 -1
  99. package/dist/sort-manager/sort-remove.d.ts +1 -1
  100. package/dist/sort-manager/sort-remove.js +1 -1
  101. package/dist/sort-manager/sort-value-select.d.ts +1 -1
  102. package/dist/sort-manager/sort-value-select.js +1 -1
  103. package/dist/state/+types.d.ts +2 -1
  104. package/dist/state/api/column-field.js +1 -1
  105. package/dist/state/api/edit-begin.js +1 -1
  106. package/dist/state/api/focus-cell.js +1 -1
  107. package/dist/state/api/position-from-element.d.ts +5 -2
  108. package/dist/state/api/position-from-element.js +3 -3
  109. package/dist/state/api/row-handle-select.js +1 -1
  110. package/dist/state/api/use-row-drag.js +3 -2
  111. package/dist/state/helpers/column-add-row-group.js +1 -1
  112. package/dist/state/helpers/column-marker.js +1 -1
  113. package/dist/state/use-lytenyte.js +18 -3
  114. package/dist/tree-view/branch/branch.d.ts +1 -1
  115. package/dist/tree-view/branch/branch.js +1 -1
  116. package/dist/tree-view/branch/use-branch-keys.js +2 -2
  117. package/dist/tree-view/leaf.js +1 -1
  118. package/dist/tree-view/panel/make-handle-navigation.js +1 -1
  119. package/dist/tree-view/panel/make-handle-selection.js +1 -1
  120. package/dist/tree-view/panel/panel.js +2 -2
  121. package/dist/tree-view/panel/use-tree-navigation.js +1 -1
  122. package/dist/tree-view/root.js +1 -1
  123. package/dist/tree-view/utils/get-focusable-nodes.js +1 -1
  124. package/dist/tree-view/utils/get-focused-node.js +1 -1
  125. package/dist/tree-view/utils/get-sibling-branches.js +1 -1
  126. package/dist/tree-view/virtualized/use-row-start-and-end.d.ts +1 -1
  127. package/dist/tree-view/virtualized/use-row-start-and-end.js +1 -1
  128. package/dist/tree-view/virtualized/use-virtualized-tree.js +1 -1
  129. package/package.json +3 -7
@@ -1,5 +1,5 @@
1
- import { type SlotComponent } from "@1771technologies/lytenyte-react-hooks";
2
1
  import type { Option } from "./+types";
2
+ import { type SlotComponent } from "@1771technologies/lytenyte-core/yinternal";
3
3
  export interface SortDirectionSelectProps {
4
4
  readonly as?: SlotComponent<{
5
5
  options: Option[];
@@ -1,7 +1,7 @@
1
1
  import { jsx as _jsx } from "react/jsx-runtime";
2
- import { useSlot } from "@1771technologies/lytenyte-react-hooks";
3
2
  import { forwardRef } from "react";
4
3
  import { useSortRowCtx } from "./context.js";
4
+ import { useSlot } from "@1771technologies/lytenyte-core/yinternal";
5
5
  export const SortDirectionSelect = forwardRef(function SortDirectionSelect({ as, ...props }, forwarded) {
6
6
  const row = useSortRowCtx();
7
7
  const el = (_jsx("select", { "aria-label": "Select sort direction", value: row.sortDirectionSelected?.value ?? "", onChange: (e) => {
@@ -1,4 +1,4 @@
1
- import { type SlotComponent } from "@1771technologies/lytenyte-react-hooks";
1
+ import { type SlotComponent } from "@1771technologies/lytenyte-core/yinternal";
2
2
  export interface SortRemoveProps {
3
3
  readonly as?: SlotComponent<{
4
4
  onRemove: () => void;
@@ -1,7 +1,7 @@
1
1
  import { jsx as _jsx } from "react/jsx-runtime";
2
- import { useSlot } from "@1771technologies/lytenyte-react-hooks";
3
2
  import { forwardRef } from "react";
4
3
  import { useSortRowCtx } from "./context.js";
4
+ import { useSlot } from "@1771technologies/lytenyte-core/yinternal";
5
5
  export const SortRemove = forwardRef(function SortRemove({ as, ...props }, forwarded) {
6
6
  const row = useSortRowCtx();
7
7
  const renderer = useSlot({
@@ -1,5 +1,5 @@
1
- import { type SlotComponent } from "@1771technologies/lytenyte-react-hooks";
2
1
  import type { Option } from "./+types";
2
+ import { type SlotComponent } from "@1771technologies/lytenyte-core/yinternal";
3
3
  export interface SortValueSelectProps {
4
4
  readonly as?: SlotComponent<{
5
5
  options: Option[];
@@ -1,7 +1,7 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
- import { useSlot } from "@1771technologies/lytenyte-react-hooks";
3
2
  import { forwardRef } from "react";
4
3
  import { useSortRowCtx } from "./context.js";
4
+ import { useSlot } from "@1771technologies/lytenyte-core/yinternal";
5
5
  export const SortValueSelect = forwardRef(function SortValueSelect({ as, ...props }, forwarded) {
6
6
  const row = useSortRowCtx();
7
7
  const el = (_jsxs("select", { "aria-label": "Select sort value", value: row.sortSelected?.value ?? "", onChange: (e) => {
@@ -1,6 +1,7 @@
1
- import type { LayoutState, WriteSignal } from "@1771technologies/lytenyte-shared";
1
+ import type { LayoutState } from "@1771technologies/lytenyte-shared";
2
2
  import type { Column, EditActivePosition, GridAtom, GridAtomReadonly, HeaderGroupCellLayout, PositionUnion, VirtualTarget } from "../+types";
3
3
  import type { DataRectSplit } from "../cell-selection/split-cell-selection-rect";
4
+ import type { WriteSignal } from "@1771technologies/lytenyte-core/yinternal";
4
5
  export interface InternalAtoms {
5
6
  readonly headerRows: GridAtomReadonly<number>;
6
7
  readonly headerCols: GridAtomReadonly<number>;
@@ -1,4 +1,4 @@
1
- import { get } from "@1771technologies/lytenyte-js-utils";
1
+ import { get } from "@1771technologies/lytenyte-shared";
2
2
  export const makeColumnField = (grid) => {
3
3
  return (c, d) => {
4
4
  const meta = grid.state.columnMeta.get();
@@ -1,5 +1,5 @@
1
1
  import { focusCell } from "@1771technologies/lytenyte-shared";
2
- import { runWithBackoff } from "@1771technologies/lytenyte-js-utils";
2
+ import { runWithBackoff } from "@1771technologies/lytenyte-shared";
3
3
  import { editOnChange } from "../helpers/edit-on-change.js";
4
4
  export const makeEditBegin = (grid) => {
5
5
  return (params) => {
@@ -1,5 +1,5 @@
1
1
  import { focusCell, getHeaderRows, handleNavigation, isColumnFloatingHeader, } from "@1771technologies/lytenyte-shared";
2
- import { clamp } from "@1771technologies/lytenyte-js-utils";
2
+ import { clamp } from "@1771technologies/lytenyte-shared";
3
3
  export const makeFocusCell = (grid) => {
4
4
  return (position) => {
5
5
  const vp = grid.state.viewport.get();
@@ -1,2 +1,5 @@
1
- import type { GridApi } from "../../+types";
2
- export declare const makePositionFromElement: () => GridApi<any>["positionFromElement"];
1
+ import type { Grid, GridApi } from "../../+types";
2
+ import type { InternalAtoms } from "../+types";
3
+ export declare const makePositionFromElement: (grid: Grid<any> & {
4
+ internal: InternalAtoms;
5
+ }) => GridApi<any>["positionFromElement"];
@@ -1,9 +1,9 @@
1
1
  import { getNearestFocusable, getPositionFromFocusable } from "@1771technologies/lytenyte-shared";
2
- export const makePositionFromElement = () => {
2
+ export const makePositionFromElement = (grid) => {
3
3
  return (el) => {
4
- const focusable = getNearestFocusable(el);
4
+ const focusable = getNearestFocusable(grid.state.gridId.get(), el);
5
5
  if (!focusable)
6
6
  return null;
7
- return getPositionFromFocusable(focusable);
7
+ return getPositionFromFocusable(focusable, grid.state.gridId.get());
8
8
  };
9
9
  };
@@ -4,7 +4,7 @@ export const makeRowHandleSelect = (grid) => {
4
4
  const mode = grid.state.rowSelectionMode.get();
5
5
  if (mode === "none")
6
6
  return;
7
- const rowEl = getNearestRow(e.target);
7
+ const rowEl = getNearestRow(grid.state.gridId.get(), e.target);
8
8
  if (!rowEl)
9
9
  return;
10
10
  const row = grid.api.rowByIndex(getRowIndexFromEl(rowEl));
@@ -1,10 +1,11 @@
1
- import { getNearestRow, getRowIndexFromEl, useDraggable } from "@1771technologies/lytenyte-shared";
1
+ import { getNearestRow, getRowIndexFromEl } from "@1771technologies/lytenyte-shared";
2
+ import { useDraggable } from "@1771technologies/lytenyte-core/yinternal";
2
3
  export const makeUseRowDrag = (grid) => {
3
4
  return (params) => {
4
5
  const c = useDraggable({
5
6
  ...params,
6
7
  getItems: (el) => {
7
- const nearestRow = getNearestRow(el);
8
+ const nearestRow = getNearestRow(grid.state.gridId.get(), el);
8
9
  if (!nearestRow)
9
10
  return {};
10
11
  const rowIndex = getRowIndexFromEl(nearestRow);
@@ -1,5 +1,5 @@
1
1
  import { GROUP_COLUMN_MULTI_PREFIX, GROUP_COLUMN_PREFIX, GROUP_COLUMN_SINGLE_ID, } from "@1771technologies/lytenyte-shared";
2
- import { itemsWithIdToMap } from "@1771technologies/lytenyte-js-utils";
2
+ import { itemsWithIdToMap } from "@1771technologies/lytenyte-shared";
3
3
  import { CellRowGroup } from "./cell-row-group.js";
4
4
  const baseGroup = {
5
5
  name: "Group",
@@ -1,6 +1,6 @@
1
1
  import { jsx as _jsx, Fragment as _Fragment } from "react/jsx-runtime";
2
2
  import { COLUMN_MARKER_ID } from "@1771technologies/lytenyte-shared";
3
- import { itemsWithIdToMap } from "@1771technologies/lytenyte-js-utils";
3
+ import { itemsWithIdToMap } from "@1771technologies/lytenyte-shared";
4
4
  export function columnHandleMarker({ columns, marker, markerEnabled, }) {
5
5
  const lookup = itemsWithIdToMap(columns);
6
6
  if (markerEnabled && !lookup.has(COLUMN_MARKER_ID)) {
@@ -1,9 +1,10 @@
1
1
  import {} from "../+types.js";
2
2
  import { useRef } from "react";
3
3
  import { makeColumnView } from "./helpers/column-view.js";
4
- import { computeBounds, computeColumnPositions, computed, computeRowPositions, effect, makeAtom, makeLayoutState, makeRowStore, signal, updateFull, } from "@1771technologies/lytenyte-shared";
4
+ import { computeBounds, computeColumnPositions, computeRowPositions, makeLayoutState, updateFull, } from "@1771technologies/lytenyte-shared";
5
+ import { computed, effect, makeAtom, signal } from "@1771technologies/lytenyte-core/yinternal";
5
6
  import { makeRowLayout } from "./helpers/row-layout/row-layout.js";
6
- import { equal, rangesOverlap } from "@1771technologies/lytenyte-js-utils";
7
+ import { equal, rangesOverlap } from "@1771technologies/lytenyte-shared";
7
8
  import { makeColumnLayout } from "./helpers/column-layout.js";
8
9
  import { emptyRowDataSource } from "./helpers/empty-row-data-source.js";
9
10
  import { getFullWidthCallback } from "./helpers/get-full-width-callback.js";
@@ -50,6 +51,7 @@ import { splitCellSelectionRect, } from "../cell-selection/split-cell-selection-
50
51
  import { boundSelectionRect } from "../cell-selection/bound-selection-rect.js";
51
52
  import { makeCellRoot } from "./api/cell-root.js";
52
53
  import { splitOnPivot } from "../cell-selection/split-on-pivot.js";
54
+ import { makeRowStore } from "@1771technologies/lytenyte-core/yinternal";
53
55
  const EMPTY_POSITION_ARRAY = new Uint32Array();
54
56
  const DEFAULT_HEADER_HEIGHT = 40;
55
57
  const COLUMN_GROUP_JOIN_DELIMITER = "-->";
@@ -142,7 +144,9 @@ export function makeLyteNyte(p) {
142
144
  const internal_cellSelectionAdditive = signal(null);
143
145
  const internal_cellSelectionSplits = computed(() => {
144
146
  const selections = cellSelections();
147
+ // @ts-expect-error the $() is defined but not typed.
145
148
  const topCount = rowDataStore.rowTopCount.$();
149
+ // @ts-expect-error the $() is defined but not typed.
146
150
  const centerCount = rowDataStore.rowCenterCount.$();
147
151
  const meta = columnMeta();
148
152
  const p = internal_cellSelectionPivot();
@@ -190,8 +194,11 @@ export function makeLyteNyte(p) {
190
194
  });
191
195
  const layoutState = makeLayoutState(0);
192
196
  const layoutState$ = computed(() => {
197
+ // @ts-expect-error the $() is defined but not typed.
193
198
  rowDataStore.rowBottomCount.$();
199
+ // @ts-expect-error the $() is defined but not typed.
194
200
  rowDataStore.rowCenterCount.$();
201
+ // @ts-expect-error the $() is defined but not typed.
195
202
  rowDataStore.rowTopCount.$();
196
203
  rowDataSource();
197
204
  rowDetailExpansions();
@@ -203,6 +210,7 @@ export function makeLyteNyte(p) {
203
210
  columnPivotModel();
204
211
  columns();
205
212
  columnPivotColumns();
213
+ // @ts-expect-error the $() is defined but not typed.
206
214
  const rowCount = rowDataStore.rowCount.$();
207
215
  const columnCount = columnCount$();
208
216
  if (rowCount > layoutState.computed.length || columnCount != layoutState.base.length) {
@@ -225,7 +233,9 @@ export function makeLyteNyte(p) {
225
233
  const scrollLeft = xScroll();
226
234
  const xPos = xPositions();
227
235
  const yPos = yPositions();
236
+ // @ts-expect-error the $() is defined but not typed.
228
237
  const topCount = rowDataStore.rowTopCount.$();
238
+ // @ts-expect-error the $() is defined but not typed.
229
239
  const bottomCount = rowDataStore.rowBottomCount.$();
230
240
  const start = startCount();
231
241
  const end = endCount();
@@ -382,6 +392,7 @@ export function makeLyteNyte(p) {
382
392
  filterModel();
383
393
  rowGroupModel();
384
394
  columnPivotModel();
395
+ // @ts-expect-error the $() is defined but not typed.
385
396
  const rowCount = rowDataStore.rowCount.$();
386
397
  const innerHeight = viewportHeightInner();
387
398
  const detailExpansions = rowDetailExpansions();
@@ -428,8 +439,11 @@ export function makeLyteNyte(p) {
428
439
  const columns = columnMeta().columnsVisible;
429
440
  const rds = rowDataSource();
430
441
  const { layout, cache } = layoutState$();
442
+ // @ts-expect-error the $() is defined but not typed.
431
443
  const topCount = rowDataStore.rowTopCount.$();
444
+ // @ts-expect-error the $() is defined but not typed.
432
445
  const botCount = rowDataStore.rowBottomCount.$();
446
+ // @ts-expect-error the $() is defined but not typed.
433
447
  const rowCount = rowDataStore.rowCount.$();
434
448
  const expansions = rowDetailExpansions();
435
449
  const fullWidthPredicate = rowFullWidthPredicate().fn;
@@ -615,7 +629,7 @@ export function makeLyteNyte(p) {
615
629
  dialogFrameOpen: makeDialogFrameOpen(grid),
616
630
  popoverFrameClose: makePopoverFrameClose(grid),
617
631
  popoverFrameOpen: makePopoverFrameOpen(grid),
618
- positionFromElement: makePositionFromElement(),
632
+ positionFromElement: makePositionFromElement(grid),
619
633
  });
620
634
  Object.assign(grid, {
621
635
  internal: {
@@ -654,6 +668,7 @@ export function makeLyteNyte(p) {
654
668
  rowDataSource.set(p.rowDataSource ?? emptyRowDataSource);
655
669
  // Ensure cell selections are bounded.
656
670
  effect(() => {
671
+ // @ts-expect-error the $() is defined but not typed.
657
672
  rowDataStore.rowCount.$();
658
673
  columnMeta();
659
674
  const selections = cellSelections();
@@ -1,4 +1,4 @@
1
- import { type SlotComponent } from "@1771technologies/lytenyte-react-hooks";
1
+ import { type SlotComponent } from "@1771technologies/lytenyte-core/yinternal";
2
2
  export interface TreeBranchProps {
3
3
  readonly itemId: string;
4
4
  readonly labelWrap?: SlotComponent;
@@ -1,9 +1,9 @@
1
1
  import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import { forwardRef, useEffect } from "react";
3
3
  import { depthContext, useDepth } from "../depth-provider.js";
4
- import { useEvent, useSlot, useTransitionedOpen, } from "@1771technologies/lytenyte-react-hooks";
5
4
  import { useTreeRoot } from "../context.js";
6
5
  import { useBranchKeys } from "./use-branch-keys.js";
6
+ import { useEvent, useSlot, useTransitionedOpen, } from "@1771technologies/lytenyte-core/yinternal";
7
7
  export const TreeBranch = forwardRef(function TreeBranch({ itemId, label, expander, transitionEnterMs, transitionExitMs, gridWrapped, labelWrap, ...props }, forwarded) {
8
8
  const depth = useDepth();
9
9
  const root = useTreeRoot();
@@ -1,4 +1,3 @@
1
- import { useEvent } from "@1771technologies/lytenyte-react-hooks";
2
1
  import { useTreeRoot } from "../context.js";
3
2
  import { getFocusableNodes } from "../utils/get-focusable-nodes.js";
4
3
  import { getFocusedNode } from "../utils/get-focused-node.js";
@@ -6,7 +5,8 @@ import { isBranchNode } from "../utils/is-branch-node.js";
6
5
  import { getTreeNodeId } from "../utils/get-tree-node-id.js";
7
6
  import { getParentNode } from "../utils/get-parent-node.js";
8
7
  import { getSiblingBranches } from "../utils/get-sibling-branches.js";
9
- import { getFocusables } from "@1771technologies/lytenyte-dom-utils";
8
+ import { getFocusables } from "@1771technologies/lytenyte-shared";
9
+ import { useEvent } from "@1771technologies/lytenyte-core/yinternal";
10
10
  const accepted = ["ArrowRight", "ArrowLeft", "Enter", "*"];
11
11
  export function useBranchKeys(id, defaultExpansion, current) {
12
12
  const ctx = useTreeRoot();
@@ -2,7 +2,7 @@ import { jsx as _jsx } from "react/jsx-runtime";
2
2
  import { forwardRef } from "react";
3
3
  import { useDepth } from "./depth-provider.js";
4
4
  import { useTreeRoot } from "./context.js";
5
- import { getFocusables } from "@1771technologies/lytenyte-dom-utils";
5
+ import { getFocusables } from "@1771technologies/lytenyte-shared";
6
6
  export const TreeLeaf = forwardRef(function TreeLeaf({ itemId, ...props }, forwarded) {
7
7
  const depth = useDepth();
8
8
  const root = useTreeRoot();
@@ -1,4 +1,4 @@
1
- import { isInView } from "@1771technologies/lytenyte-dom-utils";
1
+ import { isInView } from "@1771technologies/lytenyte-shared";
2
2
  import { getFirstNode } from "../navigation/get-first-node.js";
3
3
  import { getLastNode } from "../navigation/get-last-node.js";
4
4
  import { getNextNode } from "../navigation/get-next-node.js";
@@ -1,4 +1,4 @@
1
- import { isInView } from "@1771technologies/lytenyte-dom-utils";
1
+ import { isInView } from "@1771technologies/lytenyte-shared";
2
2
  import { getFirstNode } from "../navigation/get-first-node.js";
3
3
  import { getLastNode } from "../navigation/get-last-node.js";
4
4
  import { getNextNode } from "../navigation/get-next-node.js";
@@ -2,13 +2,13 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import { forwardRef, useRef } from "react";
3
3
  import { depthContext } from "../depth-provider.js";
4
4
  import { useTreeRoot } from "../context.js";
5
- import { useForkRef } from "@1771technologies/lytenyte-react-hooks";
6
5
  import { useTreeNavigation } from "./use-tree-navigation.js";
7
6
  import { getFocusedNode } from "../utils/get-focused-node.js";
8
7
  import { getFirstNode } from "../navigation/get-first-node.js";
8
+ import { useCombinedRefs } from "@1771technologies/lytenyte-core/yinternal";
9
9
  export const TreePanel = forwardRef(function TreePanel(props, forwarded) {
10
10
  const ctx = useTreeRoot();
11
- const ref = useForkRef(ctx.panelRef, forwarded);
11
+ const ref = useCombinedRefs(ctx.panelRef, forwarded);
12
12
  const focused = useTreeNavigation();
13
13
  const focusTime = useRef(null);
14
14
  return (_jsxs(depthContext.Provider, { value: 0, children: [_jsx("ul", { ...props, role: "tree", ref: ref, tabIndex: focused ? -1 : 0, "aria-multiselectable": ctx.selectionMode === "multiple", "aria-orientation": "vertical", "data-ln-tree-panel": true, onFocus: () => {
@@ -5,7 +5,7 @@ import { makeHandleTypeahead } from "./make-handle-typeahead.js";
5
5
  import { makeHandleNavigation } from "./make-handle-navigation.js";
6
6
  import { makeHandleSelection } from "./make-handle-selection.js";
7
7
  import { getTreeNodeId } from "../utils/get-tree-node-id.js";
8
- import { getTabbables } from "@1771technologies/lytenyte-dom-utils";
8
+ import { getTabbables } from "@1771technologies/lytenyte-shared";
9
9
  export function useTreeNavigation() {
10
10
  const ctx = useTreeRoot();
11
11
  const [focused, setFocused] = useState(false);
@@ -1,9 +1,9 @@
1
1
  import { jsx as _jsx } from "react/jsx-runtime";
2
2
  import { forwardRef, useMemo, useRef, useState } from "react";
3
3
  import { context } from "./context.js";
4
- import { useCombinedRefs, useEvent } from "@1771technologies/lytenyte-react-hooks";
5
4
  import { getAllIds } from "./navigation/get-all-ids.js";
6
5
  import { getIdsBetweenNodes } from "./utils/get-ids-between-nodes.js";
6
+ import { useCombinedRefs, useEvent } from "@1771technologies/lytenyte-core/yinternal";
7
7
  export const TreeRoot = forwardRef((p, forwarded) => {
8
8
  const [panel, setPanel] = useState(null);
9
9
  const [expansions, onExpansionChange] = useState({});
@@ -1,4 +1,4 @@
1
- import { getFocusables, isHTMLElement } from "@1771technologies/lytenyte-dom-utils";
1
+ import { getFocusables, isHTMLElement } from "@1771technologies/lytenyte-shared";
2
2
  export function getFocusableNodes(panel) {
3
3
  const focusNodes = getFocusables(panel).filter((c) => isHTMLElement(c) && c.getAttribute("data-ln-tree-node") === "true");
4
4
  return focusNodes;
@@ -1,4 +1,4 @@
1
- import { isLastTraversableNode } from "@1771technologies/lytenyte-dom-utils";
1
+ import { isLastTraversableNode } from "@1771technologies/lytenyte-shared";
2
2
  export function getFocusedNode() {
3
3
  if (!document.activeElement)
4
4
  return null;
@@ -1,4 +1,4 @@
1
- import { isHTMLElement } from "@1771technologies/lytenyte-dom-utils";
1
+ import { isHTMLElement } from "@1771technologies/lytenyte-shared";
2
2
  import { isBranchNode } from "./is-branch-node.js";
3
3
  export function getSiblingBranches(el) {
4
4
  const children = el.parentElement?.children;
@@ -1,2 +1,2 @@
1
- import type { RectReadOnly } from "@1771technologies/lytenyte-react-hooks";
1
+ import type { RectReadOnly } from "@1771technologies/lytenyte-core/yinternal";
2
2
  export declare function useRowStartAndEnd(panel: HTMLElement | null | undefined, itemHeight: number, bounds: RectReadOnly, size: number): number[];
@@ -1,4 +1,4 @@
1
- import { clamp } from "@1771technologies/lytenyte-js-utils";
1
+ import { clamp } from "@1771technologies/lytenyte-shared";
2
2
  import { useEffect, useMemo, useState } from "react";
3
3
  export function useRowStartAndEnd(panel, itemHeight, bounds, size) {
4
4
  const [startOffset, setStartOffset] = useState(0);
@@ -1,12 +1,12 @@
1
1
  import { jsx as _jsx } from "react/jsx-runtime";
2
2
  import {} from "@1771technologies/lytenyte-shared";
3
- import { useEvent, useMeasure } from "@1771technologies/lytenyte-react-hooks";
4
3
  import { useMemo, useState } from "react";
5
4
  import { buildVirtualTreePartial } from "./get-virtual-tree-paths.js";
6
5
  import { makeVirtualTree } from "./make-virtual-tree.js";
7
6
  import { useFlattenedTree } from "./use-flattened-tree.js";
8
7
  import { useRowStartAndEnd } from "./use-row-start-and-end.js";
9
8
  import { getTreeNodeId } from "../utils/get-tree-node-id.js";
9
+ import { useEvent, useMeasure } from "@1771technologies/lytenyte-core/yinternal";
10
10
  export function useVirtualizedTree({ itemHeight, expansions, expansionDefault = false, nonAdjacentPathTrees, paths, }) {
11
11
  const [ref, bounds, _, panel] = useMeasure({ scroll: true });
12
12
  const { flat, nodeToIndex, indexToId, allIds, idToNode, root } = useFlattenedTree(paths, expansions, expansionDefault, nonAdjacentPathTrees);
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@1771technologies/lytenyte-pro",
3
3
  "description": "Blazingly fast headless React data grid with 100s of features.",
4
- "version": "1.0.15",
4
+ "version": "1.0.16",
5
5
  "type": "module",
6
6
  "license": "COMMERCIAL",
7
7
  "files": [
@@ -48,12 +48,8 @@
48
48
  "access": "public"
49
49
  },
50
50
  "dependencies": {
51
- "@1771technologies/lytenyte-dragon": "1.0.15",
52
- "@1771technologies/lytenyte-core": "1.0.15",
53
- "@1771technologies/lytenyte-shared": "1.0.15",
54
- "@1771technologies/lytenyte-dom-utils": "1.0.15",
55
- "@1771technologies/lytenyte-js-utils": "1.0.15",
56
- "@1771technologies/lytenyte-react-hooks": "1.0.15"
51
+ "@1771technologies/lytenyte-core": "1.0.16",
52
+ "@1771technologies/lytenyte-shared": "1.0.16"
57
53
  },
58
54
  "peerDependencies": {
59
55
  "react": "^18.0.0 || ^19.0.0",