@ishibashi0112/spreadsheet-grid-core 1.0.2 → 1.2.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.
Files changed (152) hide show
  1. package/dist/controllers/activeRowFollowController.cjs +1 -0
  2. package/dist/controllers/activeRowFollowController.d.ts +18 -0
  3. package/dist/controllers/activeRowFollowController.js +68 -0
  4. package/dist/controllers/autoHeightMeasurer.cjs +1 -1
  5. package/dist/controllers/autoHeightMeasurer.js +17 -17
  6. package/dist/controllers/clipboardController.cjs +1 -1
  7. package/dist/controllers/clipboardController.d.ts +4 -0
  8. package/dist/controllers/clipboardController.js +82 -54
  9. package/dist/controllers/columnAutosizeRunner.cjs +1 -1
  10. package/dist/controllers/columnAutosizeRunner.d.ts +1 -0
  11. package/dist/controllers/columnAutosizeRunner.js +17 -16
  12. package/dist/controllers/columnHeaderDragController.cjs +1 -1
  13. package/dist/controllers/columnHeaderDragController.js +169 -168
  14. package/dist/controllers/columnMenuController.cjs +1 -1
  15. package/dist/controllers/columnMenuController.js +71 -69
  16. package/dist/controllers/contextMenuController.cjs +1 -1
  17. package/dist/controllers/contextMenuController.d.ts +5 -1
  18. package/dist/controllers/contextMenuController.js +62 -40
  19. package/dist/controllers/editController.cjs +1 -1
  20. package/dist/controllers/editController.d.ts +1 -0
  21. package/dist/controllers/editController.js +106 -99
  22. package/dist/controllers/fillHandleController.cjs +1 -1
  23. package/dist/controllers/fillHandleController.d.ts +1 -0
  24. package/dist/controllers/fillHandleController.js +157 -157
  25. package/dist/controllers/filterPopoverController.cjs +1 -1
  26. package/dist/controllers/filterPopoverController.js +6 -6
  27. package/dist/controllers/findController.cjs +1 -1
  28. package/dist/controllers/findController.d.ts +1 -0
  29. package/dist/controllers/findController.js +16 -15
  30. package/dist/controllers/historyController.cjs +1 -1
  31. package/dist/controllers/historyController.d.ts +6 -0
  32. package/dist/controllers/historyController.js +79 -37
  33. package/dist/controllers/imeInputController.cjs +1 -1
  34. package/dist/controllers/imeInputController.js +65 -54
  35. package/dist/controllers/keyboardController.cjs +1 -1
  36. package/dist/controllers/keyboardController.d.ts +1 -0
  37. package/dist/controllers/keyboardController.js +46 -42
  38. package/dist/controllers/pointerInteractionsController.cjs +1 -1
  39. package/dist/controllers/pointerInteractionsController.d.ts +1 -0
  40. package/dist/controllers/pointerInteractionsController.js +172 -172
  41. package/dist/controllers/popoverSupport.cjs +1 -1
  42. package/dist/controllers/popoverSupport.d.ts +1 -0
  43. package/dist/controllers/popoverSupport.js +9 -4
  44. package/dist/controllers/rowDragController.cjs +1 -1
  45. package/dist/controllers/rowDragController.d.ts +2 -0
  46. package/dist/controllers/rowDragController.js +160 -146
  47. package/dist/controllers/scrollSyncController.cjs +1 -1
  48. package/dist/controllers/scrollSyncController.js +45 -43
  49. package/dist/controllers/serverSideRowModel.cjs +1 -1
  50. package/dist/controllers/serverSideRowModel.js +19 -19
  51. package/dist/controllers/toolPanelController.cjs +1 -1
  52. package/dist/controllers/toolPanelController.js +26 -14
  53. package/dist/controllers/tooltipController.cjs +1 -1
  54. package/dist/controllers/tooltipController.js +74 -72
  55. package/dist/controllers/viewportSyncController.cjs +1 -1
  56. package/dist/controllers/viewportSyncController.d.ts +4 -1
  57. package/dist/controllers/viewportSyncController.js +66 -28
  58. package/dist/engine/columnCommands.cjs +1 -1
  59. package/dist/engine/columnCommands.js +113 -113
  60. package/dist/engine/createGridEngine.cjs +3 -3
  61. package/dist/engine/createGridEngine.d.ts +2 -0
  62. package/dist/engine/createGridEngine.js +72 -70
  63. package/dist/engine/exportCommands.cjs +1 -1
  64. package/dist/engine/exportCommands.js +18 -9
  65. package/dist/engine/fullFeatures.cjs +1 -1
  66. package/dist/engine/fullFeatures.js +6 -6
  67. package/dist/engine/gridApi.cjs +6 -6
  68. package/dist/engine/gridApi.d.ts +8 -2
  69. package/dist/engine/gridApi.js +197 -187
  70. package/dist/engine/notifiers.cjs +1 -1
  71. package/dist/engine/notifiers.d.ts +4 -0
  72. package/dist/engine/notifiers.js +7 -7
  73. package/dist/index.cjs +1 -1
  74. package/dist/index.d.ts +3 -1
  75. package/dist/index.js +7 -6
  76. package/dist/locales/en.cjs +1 -1
  77. package/dist/locales/en.js +5 -0
  78. package/dist/logic/autoScrollGeometry.cjs +1 -1
  79. package/dist/logic/autoScrollGeometry.d.ts +2 -0
  80. package/dist/logic/autoScrollGeometry.js +3 -3
  81. package/dist/logic/editorValues.cjs +1 -1
  82. package/dist/logic/editorValues.js +37 -34
  83. package/dist/logic/exportCsv.cjs +3 -3
  84. package/dist/logic/exportCsv.d.ts +4 -1
  85. package/dist/logic/exportCsv.js +22 -20
  86. package/dist/logic/exportData.cjs +1 -1
  87. package/dist/logic/exportData.d.ts +4 -1
  88. package/dist/logic/exportData.js +40 -36
  89. package/dist/logic/filtering.cjs +1 -1
  90. package/dist/logic/filtering.d.ts +2 -1
  91. package/dist/logic/filtering.js +16 -3
  92. package/dist/logic/geometry.cjs +1 -1
  93. package/dist/logic/geometry.d.ts +2 -0
  94. package/dist/logic/geometry.js +41 -20
  95. package/dist/logic/gridState.cjs +1 -1
  96. package/dist/logic/gridState.d.ts +3 -2
  97. package/dist/logic/gridState.js +32 -23
  98. package/dist/logic/groupExport.cjs +1 -1
  99. package/dist/logic/groupExport.js +28 -27
  100. package/dist/logic/grouping.cjs +1 -1
  101. package/dist/logic/grouping.d.ts +1 -0
  102. package/dist/logic/grouping.js +52 -41
  103. package/dist/logic/historyRebase.cjs +1 -0
  104. package/dist/logic/historyRebase.d.ts +5 -0
  105. package/dist/logic/historyRebase.js +36 -0
  106. package/dist/logic/imeInput.cjs +1 -1
  107. package/dist/logic/imeInput.js +6 -4
  108. package/dist/logic/localeTextFeatures.cjs +1 -1
  109. package/dist/logic/localeTextFeatures.d.ts +8 -0
  110. package/dist/logic/localeTextFeatures.js +11 -5
  111. package/dist/logic/localeTextPopups.cjs +1 -1
  112. package/dist/logic/localeTextPopups.d.ts +1 -0
  113. package/dist/logic/localeTextPopups.js +1 -0
  114. package/dist/logic/pasteFill.cjs +1 -0
  115. package/dist/logic/pasteFill.d.ts +2 -0
  116. package/dist/logic/pasteFill.js +25 -0
  117. package/dist/logic/selectEditorState.cjs +1 -1
  118. package/dist/logic/selectEditorState.d.ts +4 -1
  119. package/dist/logic/selectEditorState.js +14 -14
  120. package/dist/logic/selectLabels.cjs +1 -0
  121. package/dist/logic/selectLabels.d.ts +3 -0
  122. package/dist/logic/selectLabels.js +41 -0
  123. package/dist/logic/selectionAggregates.cjs +1 -1
  124. package/dist/logic/selectionAggregates.js +2 -3
  125. package/dist/logic/validation.cjs +1 -1
  126. package/dist/logic/validation.d.ts +1 -1
  127. package/dist/logic/validation.js +21 -21
  128. package/dist/logic/valueParsers.cjs +1 -0
  129. package/dist/logic/valueParsers.d.ts +14 -0
  130. package/dist/logic/valueParsers.js +23 -0
  131. package/dist/model/gridActions.cjs +1 -1
  132. package/dist/model/gridActions.d.ts +13 -0
  133. package/dist/model/gridActions.js +11 -0
  134. package/dist/model/gridReducer.cjs +1 -1
  135. package/dist/model/gridReducer.js +128 -65
  136. package/dist/model/gridTypes.core.d.ts +345 -43
  137. package/dist/utils/clipboard.cjs +4 -4
  138. package/dist/utils/clipboard.d.ts +14 -2
  139. package/dist/utils/clipboard.js +101 -49
  140. package/dist/utils/gridVisibleBand.cjs +1 -0
  141. package/dist/utils/gridVisibleBand.d.ts +4 -0
  142. package/dist/utils/gridVisibleBand.js +24 -0
  143. package/dist/utils/popupContainer.cjs +1 -0
  144. package/dist/utils/popupContainer.d.ts +8 -0
  145. package/dist/utils/popupContainer.js +60 -0
  146. package/dist/utils/scrollBottom.cjs +1 -0
  147. package/dist/utils/scrollBottom.d.ts +1 -0
  148. package/dist/utils/scrollBottom.js +4 -0
  149. package/dist/utils/topAlignedInput.cjs +1 -0
  150. package/dist/utils/topAlignedInput.d.ts +3 -0
  151. package/dist/utils/topAlignedInput.js +23 -0
  152. package/package.json +1 -1
@@ -5,8 +5,9 @@ import { resolveElementScale as l } from "../logic/elementScale.js";
5
5
  import { beginEscapeCancelableDrag as u } from "./escapeClaimController.js";
6
6
  import { applySlotToElement as d } from "../logic/slotDom.js";
7
7
  import { syncPortalTokens as f } from "../utils/portalTokens.js";
8
+ import { appendToPopupContainer as p, getPopupContainerFor as m } from "../utils/popupContainer.js";
8
9
  //#region src/controllers/columnHeaderDragController.ts
9
- function p(e, t, n, i) {
10
+ function h(e, t, n, i) {
10
11
  let a = e.find((e) => e.key === t);
11
12
  if (!a) return null;
12
13
  let o = r(a), s = {
@@ -29,7 +30,7 @@ function p(e, t, n, i) {
29
30
  ...s.right
30
31
  ];
31
32
  }
32
- function m(e, n, i, a) {
33
+ function g(e, n, i, a) {
33
34
  let o = e.filter((e) => r(e) === i && e.visible !== !1).map((e) => e.key), { entries: s } = n;
34
35
  for (let e = Math.max(a, 0); e < s.length; e += 1) {
35
36
  let n = s[e].column.key;
@@ -39,7 +40,7 @@ function m(e, n, i, a) {
39
40
  }
40
41
  return o.length;
41
42
  }
42
- function h(e, n) {
43
+ function _(e, n) {
43
44
  let i = new Map(e.map((e) => [e.key, r(e)])), { entries: a } = n, o = 0;
44
45
  for (; o < a.length;) {
45
46
  let e = a[o].column.key;
@@ -53,22 +54,22 @@ function h(e, n) {
53
54
  max: s
54
55
  };
55
56
  }
56
- var g = (e) => {
57
+ var v = (e) => {
57
58
  let n = 0;
58
59
  for (; n < e.entries.length && t(e.entries[n].column.key);) n += 1;
59
60
  return n;
60
- }, _ = 32, v = 2, y = 14, b = 12, x = 14, ee = (e) => "<svg viewBox=\"0 0 24 24\" width=\"" + e + "\" height=\"" + e + "\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\"><polyline points=\"5 9 2 12 5 15\"/><polyline points=\"9 5 12 2 15 5\"/><polyline points=\"15 19 12 22 9 19\"/><polyline points=\"19 9 22 12 19 15\"/><line x1=\"2\" y1=\"12\" x2=\"22\" y2=\"12\"/><line x1=\"12\" y1=\"2\" x2=\"12\" y2=\"22\"/></svg>", te = (e) => "<svg viewBox=\"0 0 24 24\" width=\"" + e + "\" height=\"" + e + "\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\"><line x1=\"12\" y1=\"17\" x2=\"12\" y2=\"22\"/><path d=\"M5 17h14v-1.76a2 2 0 0 0-1.11-1.79l-1.78-.9A2 2 0 0 1 15 10.76V6h1a2 2 0 0 0 0-4H8a2 2 0 0 0 0 4h1v4.76a2 2 0 0 1-1.11 1.79l-1.78.9A2 2 0 0 0 5 15.24Z\"/></svg>", ne = ee(x), re = te(x), ie = "<svg viewBox=\"0 0 24 24\" width=\"14\" height=\"14\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\"><circle cx=\"12\" cy=\"12\" r=\"10\"/><line x1=\"4.9\" y1=\"4.9\" x2=\"19.1\" y2=\"19.1\"/></svg>", ae = "0.5", oe = 200, S = "cubic-bezier(0.2, 0.7, 0.3, 1)", se = (e) => e?.closest(".ssg-motion-off") != null, ce = 160, le = `transform ${ce}ms ${S}`, C = "data-ssg-col-dragging", ue = "4", de = "9", fe = "ssg-col-drag-float", pe = "ssg-col-drag-pin", me = 12, he = "ssg-col-drop-indicator", ge = "ssg-header-cell", _e = [
61
+ }, ee = 32, te = 2, ne = 14, re = 12, y = 14, ie = (e) => "<svg viewBox=\"0 0 24 24\" width=\"" + e + "\" height=\"" + e + "\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\"><polyline points=\"5 9 2 12 5 15\"/><polyline points=\"9 5 12 2 15 5\"/><polyline points=\"15 19 12 22 9 19\"/><polyline points=\"19 9 22 12 19 15\"/><line x1=\"2\" y1=\"12\" x2=\"22\" y2=\"12\"/><line x1=\"12\" y1=\"2\" x2=\"12\" y2=\"22\"/></svg>", ae = (e) => "<svg viewBox=\"0 0 24 24\" width=\"" + e + "\" height=\"" + e + "\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\"><line x1=\"12\" y1=\"17\" x2=\"12\" y2=\"22\"/><path d=\"M5 17h14v-1.76a2 2 0 0 0-1.11-1.79l-1.78-.9A2 2 0 0 1 15 10.76V6h1a2 2 0 0 0 0-4H8a2 2 0 0 0 0 4h1v4.76a2 2 0 0 1-1.11 1.79l-1.78.9A2 2 0 0 0 5 15.24Z\"/></svg>", oe = ie(y), se = ae(y), ce = "<svg viewBox=\"0 0 24 24\" width=\"14\" height=\"14\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\"><circle cx=\"12\" cy=\"12\" r=\"10\"/><line x1=\"4.9\" y1=\"4.9\" x2=\"19.1\" y2=\"19.1\"/></svg>", le = "0.5", ue = 200, b = "cubic-bezier(0.2, 0.7, 0.3, 1)", de = (e) => e?.closest(".ssg-motion-off") != null, fe = 160, pe = `transform ${fe}ms ${b}`, x = "data-ssg-col-dragging", me = "4", he = "9", ge = "ssg-col-drag-float", _e = "ssg-col-drag-pin", ve = 12, ye = "ssg-col-drop-indicator", be = "ssg-header-cell", xe = [
61
62
  "data-ssg-col-key",
62
63
  "data-ssg-tooltip",
63
64
  "data-autoheight-cell",
64
65
  "id",
65
66
  "tabindex"
66
- ], ve = 180, ye = 400, w = (t) => {
67
+ ], Se = 180, Ce = 400, S = (t) => {
67
68
  let n = [];
68
69
  return t.querySelectorAll("[data-ssg-col-key]").forEach((r) => {
69
70
  e(t, r) || n.push(r);
70
71
  }), n;
71
- }, be = (t) => {
72
+ }, we = (t) => {
72
73
  if (!t) return null;
73
74
  let n = /* @__PURE__ */ new Map();
74
75
  return t.querySelectorAll("[data-ssg-col-key]").forEach((r) => {
@@ -76,23 +77,23 @@ var g = (e) => {
76
77
  let i = r.dataset.ssgColKey;
77
78
  i && !n.has(i) && n.set(i, r.getBoundingClientRect().left);
78
79
  }), n;
79
- }, xe = (e) => {
80
+ }, Te = (e) => {
80
81
  let t = getComputedStyle(e).transform, n = /^matrix(3d)?\(([^)]*)\)$/.exec(t);
81
82
  if (n === null) return 0;
82
83
  let r = Number(n[2].split(",")[n[1] === "3d" ? 12 : 4]);
83
84
  return Number.isFinite(r) ? r : 0;
84
- }, T = () => {
85
- let t = null, x = null, T = null, E = null, D = {
85
+ }, C = () => {
86
+ let t = null, y = null, C = null, w = null, T = {
86
87
  x: 0,
87
88
  y: 0
88
- }, O = null, k = 1, A = !1, j = null, M = null, N = null, P = null, F = null, I = null, L = null, R = null, Se = 0, z = null, B = null, V = "", H = null, Ce = 0, U = null, W = null, we = () => t?.motion === "live", G = () => ({
89
+ }, E = null, D = 1, O = !1, k = null, A = null, j = null, M = null, N = null, P = null, F = null, I = null, Ee = 0, L = null, R = null, z = "", B = null, V = 0, H = null, U = null, De = () => t?.motion === "live", W = () => ({
89
90
  left: t?.leftIndicatorRef.current ?? null,
90
91
  center: t?.centerIndicatorRef.current ?? null,
91
92
  right: t?.rightIndicatorRef.current ?? null
92
- }), K = () => {
93
- for (let e of Object.values(G())) e && (e.style.display = "none");
94
- }, Te = (e) => {
95
- if (F) return;
93
+ }), G = () => {
94
+ for (let e of Object.values(W())) e && (e.style.display = "none");
95
+ }, Oe = (e) => {
96
+ if (N) return;
96
97
  let n = document.createElement("div");
97
98
  n.setAttribute("data-grid-drag-ghost", ""), t?.scrollContainerRef.current?.closest(".ssg-theme-dark") != null && n.classList.add("ssg-theme-dark"), t?.scrollContainerRef.current?.closest(".ssg-theme-class") != null && n.classList.add("ssg-theme-class"), t?.scrollContainerRef.current?.closest(".ssg-motion-off") != null && n.classList.add("ssg-motion-off"), n.style.cssText = [
98
99
  "position:fixed",
@@ -120,35 +121,35 @@ var g = (e) => {
120
121
  let r = document.createElement("span");
121
122
  r.style.cssText = "display:inline-flex;align-items:center;justify-content:center;width:14px;height:14px;flex:none";
122
123
  let i = document.createElement("span");
123
- i.textContent = e, n.appendChild(r), n.appendChild(i), document.body.appendChild(n), f(t?.scrollContainerRef.current, n), F = n, I = r, L = null;
124
- }, Ee = (e) => {
125
- let t = F;
124
+ i.textContent = e, n.appendChild(r), n.appendChild(i), p(n, m(t?.scrollContainerRef.current)), f(t?.scrollContainerRef.current, n), N = n, P = r, F = null;
125
+ }, ke = (e) => {
126
+ let t = N;
126
127
  if (!t) return;
127
- t.style.transform = "translate(" + (D.x + y) + "px," + (D.y + b) + "px)";
128
+ t.style.transform = "translate(" + (T.x + ne) + "px," + (T.y + re) + "px)";
128
129
  let n = e ?? "out";
129
- if (L === n) return;
130
- L = n;
131
- let r = I;
132
- n === "out" ? (t.style.opacity = ae, r && (r.innerHTML = ie)) : (t.style.opacity = "1", r && (r.innerHTML = n === "center" ? ne : re));
133
- }, q = () => {
134
- F && F.parentNode && F.parentNode.removeChild(F), F = null, I = null, L = null;
135
- }, De = (e, r) => {
130
+ if (F === n) return;
131
+ F = n;
132
+ let r = P;
133
+ n === "out" ? (t.style.opacity = le, r && (r.innerHTML = ce)) : (t.style.opacity = "1", r && (r.innerHTML = n === "center" ? oe : se));
134
+ }, K = () => {
135
+ N && N.parentNode && N.parentNode.removeChild(N), N = null, P = null, F = null;
136
+ }, Ae = (e, r) => {
136
137
  if (t === null) return null;
137
138
  let { paneLayout: a, leftPaneScrollRef: o, rightPaneScrollRef: s, bodyScrollRef: c, scrollContainerRef: l, leftLeadingWidth: u, centerLeadingWidth: d, rightLeadingWidth: f } = t, p = l.current;
138
139
  if (p) {
139
140
  let t = p.getBoundingClientRect();
140
141
  if (e < t.left || e > t.right || r < t.top || r > t.bottom) return null;
141
142
  }
142
- let m = o.current, y = s.current;
143
- if (m && a.left.entries.length === 0 && e <= m.getBoundingClientRect().left + Math.max(u, _) * k) return {
143
+ let m = o.current, h = s.current;
144
+ if (m && a.left.entries.length === 0 && e <= m.getBoundingClientRect().left + Math.max(u, ee) * D) return {
144
145
  pane: "left",
145
146
  slot: 0,
146
- leftPx: u > 0 ? u : v
147
+ leftPx: u > 0 ? u : te
147
148
  };
148
149
  if (m && a.left.entries.length > 0) {
149
150
  let t = m.getBoundingClientRect();
150
151
  if (e < t.right) {
151
- let r = (e - t.left) / k - u, o = Math.max(n(a.left, r), g(a.left));
152
+ let r = (e - t.left) / D - u, o = Math.max(n(a.left, r), v(a.left));
152
153
  return {
153
154
  pane: "left",
154
155
  slot: o,
@@ -156,15 +157,15 @@ var g = (e) => {
156
157
  };
157
158
  }
158
159
  }
159
- if (y && a.right.entries.length === 0 && e >= y.getBoundingClientRect().left - _ * k) return {
160
+ if (h && a.right.entries.length === 0 && e >= h.getBoundingClientRect().left - ee * D) return {
160
161
  pane: "right",
161
162
  slot: 0,
162
163
  leftPx: -2
163
164
  };
164
- if (y && a.right.entries.length > 0) {
165
- let t = y.getBoundingClientRect();
165
+ if (h && a.right.entries.length > 0) {
166
+ let t = h.getBoundingClientRect();
166
167
  if (e >= t.left) {
167
- let r = (e - t.left) / k - f, o = Math.max(n(a.right, r), g(a.right));
168
+ let r = (e - t.left) / D - f, o = Math.max(n(a.right, r), v(a.right));
168
169
  return {
169
170
  pane: "right",
170
171
  slot: o,
@@ -172,9 +173,9 @@ var g = (e) => {
172
173
  };
173
174
  }
174
175
  }
175
- let b = c.current;
176
- if (b && a.center.entries.length > 0) {
177
- let r = b.getBoundingClientRect(), o = b.scrollLeft + (e - r.left) / k - d, s = h(t.columns, a.center), c = Math.min(Math.max(n(a.center, Math.max(o, 0)), s.min), s.max);
176
+ let g = c.current;
177
+ if (g && a.center.entries.length > 0) {
178
+ let r = g.getBoundingClientRect(), o = g.scrollLeft + (e - r.left) / D - d, s = _(t.columns, a.center), c = Math.min(Math.max(n(a.center, Math.max(o, 0)), s.min), s.max);
178
179
  return {
179
180
  pane: "center",
180
181
  slot: c,
@@ -182,8 +183,8 @@ var g = (e) => {
182
183
  };
183
184
  }
184
185
  return null;
185
- }, Oe = (e) => {
186
- let t = G();
186
+ }, je = (e) => {
187
+ let t = W();
187
188
  for (let n of [
188
189
  "left",
189
190
  "center",
@@ -192,14 +193,14 @@ var g = (e) => {
192
193
  let r = t[n];
193
194
  r && (n === e.pane ? (r.style.left = `${e.leftPx}px`, r.style.display = "block") : r.style.display = "none");
194
195
  }
195
- }, ke = (e, t) => {
196
- let n = B?.get(t);
197
- n !== void 0 && B?.delete(t), e.set(t, n ?? {
196
+ }, Me = (e, t) => {
197
+ let n = R?.get(t);
198
+ n !== void 0 && R?.delete(t), e.set(t, n ?? {
198
199
  zIndex: t.style.zIndex,
199
200
  visibility: t.style.visibility
200
201
  });
201
- }, J = (e, n) => {
202
- let r = [], i = z, a = x, o = R;
202
+ }, q = (e, n) => {
203
+ let r = [], i = L, a = y, o = I;
203
204
  if (!i || a === null || o === null || t === null) return r;
204
205
  let s = t.scrollContainerRef.current;
205
206
  if (!s) return r;
@@ -207,44 +208,44 @@ var g = (e) => {
207
208
  if (l < 0) return r;
208
209
  let u = c[l].paneLocalSize, d = n === "lift-out" ? c.length - 1 : n === "rest" || e === null ? l : e > l ? e - 1 : e, f = /* @__PURE__ */ new Map();
209
210
  for (let e = Math.min(l, d); e <= Math.max(l, d); e += 1) e !== l && f.set(c[e].column.key, e > l ? -u : u);
210
- let p = o === "center" ? s.scrollLeft - Se : 0, m = (O ? (D.x - O.x) / k : 0) + p, h = W, g = /* @__PURE__ */ new WeakSet();
211
- W = g;
212
- for (let e of w(s)) {
211
+ let p = o === "center" ? s.scrollLeft - Ee : 0, m = (E ? (T.x - E.x) / D : 0) + p, h = U, g = /* @__PURE__ */ new WeakSet();
212
+ U = g;
213
+ for (let e of S(s)) {
213
214
  let t = e.dataset.ssgColKey;
214
215
  if (t === void 0) continue;
215
216
  g.add(e);
216
- let o = h !== null && !h.has(e) ? "none" : le;
217
+ let o = h !== null && !h.has(e) ? "none" : pe;
217
218
  if (t === a) {
218
- r.push(e), i.has(e) || (ke(i, e), e.style.zIndex = ue, e.style.willChange = "transform");
219
+ r.push(e), i.has(e) || (Me(i, e), e.style.zIndex = me, e.style.willChange = "transform");
219
220
  let t = i.get(e);
220
- n === "follow" ? (e.style.visibility = t?.visibility ?? "", e.setAttribute(C, "live"), e.style.transition = "none", e.style.transform = `translateX(${m}px)`) : n === "lift-out" ? (e.style.visibility = "hidden", e.removeAttribute(C), e.style.transition = "none", e.style.transform = "translateX(0px)") : (e.style.visibility = t?.visibility ?? "", e.removeAttribute(C), e.style.transition = o, e.style.transform = "translateX(0px)");
221
+ n === "follow" ? (e.style.visibility = t?.visibility ?? "", e.setAttribute(x, "live"), e.style.transition = "none", e.style.transform = `translateX(${m}px)`) : n === "lift-out" ? (e.style.visibility = "hidden", e.removeAttribute(x), e.style.transition = "none", e.style.transform = "translateX(0px)") : (e.style.visibility = t?.visibility ?? "", e.removeAttribute(x), e.style.transition = o, e.style.transform = "translateX(0px)");
221
222
  continue;
222
223
  }
223
224
  let s = f.get(t) ?? 0;
224
225
  if (s === 0 && !i.has(e)) continue;
225
- i.has(e) || ke(i, e);
226
+ i.has(e) || Me(i, e);
226
227
  let c = `translateX(${s}px)`;
227
228
  e.style.transform !== c && (e.style.transition = o, e.style.transform = c);
228
229
  }
229
230
  return r;
230
- }, Y = (e) => {
231
+ }, J = (e) => {
231
232
  e.forEach((e, t) => {
232
- t.style.transition = "", t.style.transform = "", t.style.willChange = "", t.style.zIndex = e.zIndex, t.style.visibility = e.visibility, t.removeAttribute(C);
233
+ t.style.transition = "", t.style.transform = "", t.style.willChange = "", t.style.zIndex = e.zIndex, t.style.visibility = e.visibility, t.removeAttribute(x);
233
234
  });
234
- }, Ae = (e) => {
235
+ }, Ne = (e) => {
235
236
  let t = (e) => {
236
- for (let t of _e) e.removeAttribute(t);
237
+ for (let t of xe) e.removeAttribute(t);
237
238
  };
238
239
  t(e), e.querySelectorAll("*").forEach(t), e.querySelectorAll(".ssg-header-actions").forEach((e) => e.remove());
239
- }, je = (e, t, n) => {
240
- let r = H;
240
+ }, Pe = (e, t, n) => {
241
+ let r = B;
241
242
  if (r === null) {
242
243
  let e = document.createElement("div");
243
- e.className = fe, e.setAttribute("aria-hidden", "true"), e.setAttribute("inert", "");
244
+ e.className = ge, e.setAttribute("aria-hidden", "true"), e.setAttribute("inert", "");
244
245
  let n = document.createElement("div");
245
246
  n.style.cssText = "position:absolute;top:0;left:0;height:100%;will-change:transform";
246
247
  let i = document.createElement("div");
247
- i.className = he, i.style.cssText = "position:absolute;display:none", e.append(n, i), t.appendChild(e), r = {
248
+ i.className = ye, i.style.cssText = "position:absolute;display:none", e.append(n, i), t.appendChild(e), r = {
248
249
  layer: e,
249
250
  column: n,
250
251
  guide: i,
@@ -254,129 +255,129 @@ var g = (e) => {
254
255
  columnWidth: 0,
255
256
  scrollTop: 0,
256
257
  cellCount: 0
257
- }, H = r;
258
+ }, B = r;
258
259
  }
259
- let i = t.getBoundingClientRect(), a = e.getBoundingClientRect(), o = a.left + e.clientLeft * k, s = a.top + e.clientTop * k;
260
+ let i = t.getBoundingClientRect(), a = e.getBoundingClientRect(), o = a.left + e.clientLeft * D, s = a.top + e.clientTop * D;
260
261
  r.layer.style.cssText = [
261
262
  "position:absolute",
262
- `left:${(o - i.left) / k - t.clientLeft + t.scrollLeft}px`,
263
- `top:${(s - i.top) / k - t.clientTop + t.scrollTop}px`,
263
+ `left:${(o - i.left) / D - t.clientLeft + t.scrollLeft}px`,
264
+ `top:${(s - i.top) / D - t.clientTop + t.scrollTop}px`,
264
265
  `width:${e.clientWidth}px`,
265
266
  `height:${e.clientHeight}px`,
266
267
  "overflow:hidden",
267
268
  "pointer-events:none",
268
- `z-index:${de}`
269
+ `z-index:${he}`
269
270
  ].join(";");
270
271
  let c = [], l = [], u = 0;
271
272
  for (let e of n) {
272
273
  let t = e.getBoundingClientRect(), n = {
273
- top: (t.top - s) / k,
274
- width: t.width / k,
275
- height: t.height / k
274
+ top: (t.top - s) / D,
275
+ width: t.width / D,
276
+ height: t.height / D
276
277
  }, r = e.cloneNode(!0);
277
- Ae(r), r.setAttribute(C, "live");
278
+ Ne(r), r.setAttribute(x, "live");
278
279
  let i = r.style;
279
- i.position = "absolute", i.left = "0px", i.top = `${n.top}px`, i.width = `${n.width}px`, i.minWidth = `${n.width}px`, i.height = `${n.height}px`, i.transform = "", i.transition = "", i.visibility = "", i.willChange = "", i.zIndex = "", u = Math.max(u, n.width), (r.classList.contains(ge) ? l : c).push(r);
280
+ i.position = "absolute", i.left = "0px", i.top = `${n.top}px`, i.width = `${n.width}px`, i.minWidth = `${n.width}px`, i.height = `${n.height}px`, i.transform = "", i.transition = "", i.visibility = "", i.willChange = "", i.zIndex = "", u = Math.max(u, n.width), (r.classList.contains(be) ? l : c).push(r);
280
281
  }
281
282
  let d = null;
282
- for (let e of l) e.style.zIndex = "1", d === null && (d = document.createElement("span"), d.className = pe, e.insertBefore(d, e.firstChild));
283
+ for (let e of l) e.style.zIndex = "1", d === null && (d = document.createElement("span"), d.className = _e, e.insertBefore(d, e.firstChild));
283
284
  return r.column.replaceChildren(...c, ...l), r.column.style.width = `${u}px`, r.badge = d, r.badgeKind = null, r.layerWidth = e.clientWidth, r.columnWidth = u, r.scrollTop = e.scrollTop, r.cellCount = n.length, r;
284
- }, Me = (e) => {
285
+ }, Fe = (e) => {
285
286
  let n = t?.scrollContainerRef.current ?? null, r = n?.parentElement ?? null;
286
- return !n || !r ? null : e.length === 0 || H !== null && H.scrollTop === n.scrollTop && H.cellCount === e.length ? H : je(n, r, e);
287
- }, Ne = (e) => {
287
+ return !n || !r ? null : e.length === 0 || B !== null && B.scrollTop === n.scrollTop && B.cellCount === e.length ? B : Pe(n, r, e);
288
+ }, Ie = (e) => {
288
289
  if (t === null) return !1;
289
290
  let n = t.leftPaneScrollRef.current;
290
291
  if (n) {
291
292
  let r = n.getBoundingClientRect();
292
- if (e < (t.paneLayout.left.entries.length > 0 ? r.right : r.left + t.leftLeadingWidth * k) - .5) return !0;
293
+ if (e < (t.paneLayout.left.entries.length > 0 ? r.right : r.left + t.leftLeadingWidth * D) - .5) return !0;
293
294
  }
294
295
  let r = t.rightPaneScrollRef.current;
295
296
  return !!(r && t.paneLayout.right.entries.length > 0 && e > r.getBoundingClientRect().left + .5);
296
- }, Pe = (e, t, n) => {
297
- let r = e.guide, i = t === null ? null : G()[t];
297
+ }, Le = (e, t, n) => {
298
+ let r = e.guide, i = t === null ? null : W()[t];
298
299
  if (!i || i.style.display !== "block") {
299
300
  r.style.display = "none";
300
301
  return;
301
302
  }
302
303
  let a = i.getBoundingClientRect();
303
- if (t === "center" && Ne(a.left + a.width / 2)) {
304
+ if (t === "center" && Ie(a.left + a.width / 2)) {
304
305
  r.style.display = "none";
305
306
  return;
306
307
  }
307
- r.style.left = `${(a.left - n.left) / k}px`, r.style.top = `${(a.top - n.top) / k}px`, r.style.height = `${a.height / k}px`, r.style.display = "block";
308
- }, Fe = (e, t) => {
309
- let n = e.layer.getBoundingClientRect(), r = Math.max(e.layerWidth - e.columnWidth, 0), i = Math.min(Math.max((D.x - Ce - n.left) / k, 0), r);
308
+ r.style.left = `${(a.left - n.left) / D}px`, r.style.top = `${(a.top - n.top) / D}px`, r.style.height = `${a.height / D}px`, r.style.display = "block";
309
+ }, Re = (e, t) => {
310
+ let n = e.layer.getBoundingClientRect(), r = Math.max(e.layerWidth - e.columnWidth, 0), i = Math.min(Math.max((T.x - V - n.left) / D, 0), r);
310
311
  e.column.style.transition = "none", e.column.style.transform = `translateX(${i}px)`;
311
312
  let a = t === null ? "none" : t === "center" ? "move" : "pin";
312
- e.badge !== null && e.badgeKind !== a && (e.badgeKind = a, e.badge.innerHTML = a === "none" ? "" : a === "move" ? ee(me) : te(me), e.badge.style.display = a === "none" ? "none" : ""), Pe(e, t, n);
313
- }, X = () => {
314
- H?.layer.remove(), H = null;
315
- }, Ie = (e, t, n) => {
313
+ e.badge !== null && e.badgeKind !== a && (e.badgeKind = a, e.badge.innerHTML = a === "none" ? "" : a === "move" ? ie(ve) : ae(ve), e.badge.style.display = a === "none" ? "none" : ""), Le(e, t, n);
314
+ }, Y = () => {
315
+ B?.layer.remove(), B = null;
316
+ }, ze = (e, t, n) => {
316
317
  let r = e.layer.getBoundingClientRect();
317
- e.column.style.transition = `transform ${n}ms ${S}`, e.column.style.transform = `translateX(${(t - r.left) / k}px)`, e.badge?.remove(), e.guide.style.display = "none";
318
- }, Z = () => {
319
- let e = U;
320
- if (U = null, e !== null) {
318
+ e.column.style.transition = `transform ${n}ms ${b}`, e.column.style.transform = `translateX(${(t - r.left) / D}px)`, e.badge?.remove(), e.guide.style.display = "none";
319
+ }, X = () => {
320
+ let e = H;
321
+ if (H = null, e !== null) {
321
322
  e.timer !== null && window.clearTimeout(e.timer);
322
323
  for (let [t, n] of e.hiddenCells) t.style.visibility = n;
323
324
  e.float.layer.remove();
324
325
  }
325
- }, Le = () => {
326
- let e = U;
326
+ }, Be = () => {
327
+ let e = H;
327
328
  if (e === null || e.key === null) return;
328
329
  let n = e.key;
329
330
  if (e.pane !== null && !t?.paneLayout[e.pane].entries.some((e) => e.column.key === n)) return;
330
331
  e.key = null;
331
- let r = t?.scrollContainerRef.current ?? null, i = r ? w(r).filter((e) => e.dataset.ssgColKey === n) : [];
332
+ let r = t?.scrollContainerRef.current ?? null, i = r ? S(r).filter((e) => e.dataset.ssgColKey === n) : [];
332
333
  if (i.length === 0) {
333
- Z();
334
+ X();
334
335
  return;
335
336
  }
336
337
  let a = i[0].getBoundingClientRect().left;
337
338
  for (let t of i) e.hiddenCells.push([t, t.style.visibility]), t.style.visibility = "hidden";
338
- Ie(e.float, a, ve), e.timer !== null && window.clearTimeout(e.timer), e.timer = window.setTimeout(Z, 220);
339
- }, Q = () => {
340
- let e = De(D.x, D.y);
341
- if (we()) {
342
- e && (T = {
339
+ ze(e.float, a, Se), e.timer !== null && window.clearTimeout(e.timer), e.timer = window.setTimeout(X, 220);
340
+ }, Z = () => {
341
+ let e = Ae(T.x, T.y);
342
+ if (De()) {
343
+ e && (C = {
343
344
  pane: e.pane,
344
345
  slot: e.slot
345
346
  });
346
- let n = T;
347
- if (n !== null && n.pane !== R) {
348
- if (e && Oe(e), (t?.scrollContainerRef.current ?? null)?.parentElement != null) {
349
- let e = Me(J(null, "lift-out"));
347
+ let n = C;
348
+ if (n !== null && n.pane !== I) {
349
+ if (e && je(e), (t?.scrollContainerRef.current ?? null)?.parentElement != null) {
350
+ let e = Fe(q(null, "lift-out"));
350
351
  if (e !== null) {
351
- q(), Fe(e, n.pane);
352
+ K(), Re(e, n.pane);
352
353
  return;
353
354
  }
354
355
  }
355
- X(), Te(V), Ee(n.pane), J(null, "rest");
356
+ Y(), Oe(z), ke(n.pane), q(null, "rest");
356
357
  return;
357
358
  }
358
- if (q(), K(), J(n === null ? null : n.slot, "follow").length === 0 && H !== null) {
359
- Fe(H, null);
359
+ if (K(), G(), q(n === null ? null : n.slot, "follow").length === 0 && B !== null) {
360
+ Re(B, null);
360
361
  return;
361
362
  }
362
- X();
363
+ Y();
363
364
  return;
364
365
  }
365
- if (Ee(e ? e.pane : null), !e) {
366
- T = null, K();
366
+ if (ke(e ? e.pane : null), !e) {
367
+ C = null, G();
367
368
  return;
368
369
  }
369
- T = {
370
+ C = {
370
371
  pane: e.pane,
371
372
  slot: e.slot
372
- }, Oe(e);
373
- }, Re = () => {
374
- if (x === null) {
375
- N = null;
373
+ }, je(e);
374
+ }, Ve = () => {
375
+ if (y === null) {
376
+ j = null;
376
377
  return;
377
378
  }
378
379
  let e = t?.scrollContainerRef.current ?? null;
379
- if (e && (A || (!O || o(O, D, 6)) && (A = !0), A)) {
380
+ if (e && (O || (!E || o(E, T, 6)) && (O = !0), O)) {
380
381
  let t = e.getBoundingClientRect(), n = c({
381
382
  rectLeft: t.left,
382
383
  rectTop: t.top,
@@ -385,23 +386,23 @@ var g = (e) => {
385
386
  clientWidth: e.clientWidth,
386
387
  clientHeight: e.clientHeight,
387
388
  scale: l(e, t)
388
- }), r = s(D.x, n.left, n.right, 24), i = a(e.scrollLeft, r, 18, e.scrollWidth - e.clientWidth);
389
+ }), r = s(T.x, n.left, n.right, 24), i = a(e.scrollLeft, r, 18, e.scrollWidth - e.clientWidth);
389
390
  i !== e.scrollLeft && e.scrollTo({
390
391
  left: i,
391
392
  behavior: "auto"
392
393
  });
393
394
  }
394
- Q(), N = requestAnimationFrame(Re);
395
- }, $ = (e) => {
396
- N !== null && (cancelAnimationFrame(N), N = null), document.body.style.cursor = "", K(), q();
397
- let n = x, i = T;
398
- x = null, M = null, W = null, T = null, O = null;
399
- let a = z;
400
- z = null, R = null;
401
- let o = n !== null && i !== null && t !== null ? t.paneLayout[i.pane].entries.findIndex((e) => e.column.key === n) : -1, s = i !== null && o >= 0 && (i.slot === o || i.slot === o + 1), c = e && n && i && t !== null && !s ? p(t.columns, n, i.pane, m(t.columns, t.paneLayout[i.pane], i.pane, i.slot)) : null, l = H;
402
- if (H = null, a && !c) {
395
+ Z(), j = requestAnimationFrame(Ve);
396
+ }, Q = (e) => {
397
+ j !== null && (cancelAnimationFrame(j), j = null), document.body.style.cursor = "", G(), K();
398
+ let n = y, i = C;
399
+ y = null, A = null, U = null, C = null, E = null;
400
+ let a = L;
401
+ L = null, I = null;
402
+ let o = n !== null && i !== null && t !== null ? t.paneLayout[i.pane].entries.findIndex((e) => e.column.key === n) : -1, s = i !== null && o >= 0 && (i.slot === o || i.slot === o + 1), c = e && n && i && t !== null && !s ? h(t.columns, n, i.pane, g(t.columns, t.paneLayout[i.pane], i.pane, i.slot)) : null, l = B;
403
+ if (B = null, a && !c) {
403
404
  a.forEach((e, t) => {
404
- t.isConnected && (t.style.transition = le, t.style.transform = "translateX(0px)");
405
+ t.isConnected && (t.style.transition = pe, t.style.transform = "translateX(0px)");
405
406
  });
406
407
  let e = null;
407
408
  if (l !== null) {
@@ -410,35 +411,35 @@ var g = (e) => {
410
411
  t = e;
411
412
  break;
412
413
  }
413
- t === null ? l.layer.remove() : (Ie(l, t.getBoundingClientRect().left, ce), e = {
414
+ t === null ? l.layer.remove() : (ze(l, t.getBoundingClientRect().left, fe), e = {
414
415
  float: l,
415
416
  key: null,
416
417
  pane: null,
417
418
  timer: null,
418
419
  hiddenCells: []
419
- }, U = e);
420
+ }, H = e);
420
421
  }
421
- B = a, window.setTimeout(() => {
422
- Y(a), B === a && (B = null), e !== null && U === e && Z();
422
+ R = a, window.setTimeout(() => {
423
+ J(a), R === a && (R = null), e !== null && H === e && X();
423
424
  }, 200);
424
425
  } else l !== null && !c && l.layer.remove();
425
426
  if (!c || !n || !i || t === null) return;
426
- let { columns: u, applyColumnOrderAndPin: d, scrollContainerRef: f } = t, h = u.find((e) => e.key === n), g = h ? r(h) : null;
427
- E = g !== null && g === i.pane && !se(f.current) ? be(f.current) : null, a && Y(a), l !== null && (l.badge?.remove(), l.guide.style.display = "none", U = {
427
+ let { columns: u, applyColumnOrderAndPin: d, scrollContainerRef: f } = t, p = u.find((e) => e.key === n), m = p ? r(p) : null;
428
+ w = m !== null && m === i.pane && !de(f.current) ? we(f.current) : null, a && J(a), l !== null && (l.badge?.remove(), l.guide.style.display = "none", H = {
428
429
  float: l,
429
430
  key: n,
430
431
  pane: i.pane,
431
- timer: window.setTimeout(Z, ye),
432
+ timer: window.setTimeout(X, Ce),
432
433
  hiddenCells: []
433
434
  });
434
- let _ = /* @__PURE__ */ new Map([[n, i.pane === "center" ? void 0 : i.pane]]), v = E;
435
+ let _ = /* @__PURE__ */ new Map([[n, i.pane === "center" ? void 0 : i.pane]]), v = w;
435
436
  d(c, _), v !== null && requestAnimationFrame(() => {
436
- E === v && (E = null);
437
+ w === v && (w = null);
437
438
  });
438
- }, ze = () => {
439
- Le();
440
- let n = E;
441
- if (E = null, !n) return;
439
+ }, He = () => {
440
+ Be();
441
+ let n = w;
442
+ if (w = null, !n) return;
442
443
  let r = t?.scrollContainerRef.current ?? null;
443
444
  if (!r) return;
444
445
  let i = /* @__PURE__ */ new Map(), a = /* @__PURE__ */ new Map();
@@ -453,24 +454,24 @@ var g = (e) => {
453
454
  if (i.forEach((e, t) => {
454
455
  let r = n.get(t), i = a.get(t);
455
456
  if (r === void 0 || i === void 0) return;
456
- let s = (r - i) / k;
457
+ let s = (r - i) / D;
457
458
  if (!(Math.abs(s) < .5)) for (let t of e) t.style.transition = "none", t.style.transform = `translateX(${s}px)`, t.style.willChange = "transform", o.push(t);
458
459
  }), o.length === 0) return;
459
460
  r.getBoundingClientRect();
460
- for (let e of o) e.style.transition = `transform ${oe}ms ${S}`, e.style.transform = "translateX(0)";
461
- Be();
461
+ for (let e of o) e.style.transition = `transform ${ue}ms ${b}`, e.style.transform = "translateX(0)";
462
+ $();
462
463
  let s = () => {
463
464
  for (let e of o) e.style.transition = "", e.style.transform = "", e.style.willChange = "";
464
465
  }, c = {
465
466
  run: s,
466
467
  timer: window.setTimeout(() => {
467
- P === c && (P = null), s();
468
+ M === c && (M = null), s();
468
469
  }, 280)
469
470
  };
470
- P = c;
471
- }, Be = () => {
472
- let e = P;
473
- P = null, e !== null && (window.clearTimeout(e.timer), e.run());
471
+ M = c;
472
+ }, $ = () => {
473
+ let e = M;
474
+ M = null, e !== null && (window.clearTimeout(e.timer), e.run());
474
475
  };
475
476
  return {
476
477
  update: (e) => {
@@ -478,58 +479,58 @@ var g = (e) => {
478
479
  },
479
480
  onColumnDragHandlePointerDown: (e, n) => {
480
481
  if (t === null || !t.enabled || n.button !== 0) return;
481
- if (n.stopPropagation(), n.preventDefault(), x !== null) {
482
- if (n.pointerId !== M) return;
483
- j?.(), $(!1);
482
+ if (n.stopPropagation(), n.preventDefault(), y !== null) {
483
+ if (n.pointerId !== A) return;
484
+ k?.(), Q(!1);
484
485
  }
485
- if (Be(), Z(), X(), B?.forEach((e, t) => {
486
+ if ($(), X(), Y(), R?.forEach((e, t) => {
486
487
  t.style.visibility = e.visibility;
487
- }), x = e.key, M = n.pointerId, T = null, W = null, D = {
488
+ }), y = e.key, A = n.pointerId, C = null, U = null, T = {
488
489
  x: n.clientX,
489
490
  y: n.clientY
490
- }, O = {
491
+ }, E = {
491
492
  x: n.clientX,
492
493
  y: n.clientY
493
- }, k = l(t.scrollContainerRef.current).x, A = !1, document.body.style.cursor = "grabbing", V = e.title || e.key, we()) {
494
+ }, D = l(t.scrollContainerRef.current).x, O = !1, document.body.style.cursor = "grabbing", z = e.title || e.key, De()) {
494
495
  let i = t.scrollContainerRef.current;
495
- R = r(e), Se = i?.scrollLeft ?? 0, z = /* @__PURE__ */ new Map();
496
- let a = i ? w(i).find((t) => t.dataset.ssgColKey === e.key) : void 0;
497
- Ce = a ? n.clientX - (a.getBoundingClientRect().left - xe(a) * k) : (t.paneLayout[R].entries.find((t) => t.column.key === e.key)?.paneLocalSize ?? 0) / 2 * k;
498
- } else Te(V);
496
+ I = r(e), Ee = i?.scrollLeft ?? 0, L = /* @__PURE__ */ new Map();
497
+ let a = i ? S(i).find((t) => t.dataset.ssgColKey === e.key) : void 0;
498
+ V = a ? n.clientX - (a.getBoundingClientRect().left - Te(a) * D) : (t.paneLayout[I].entries.find((t) => t.column.key === e.key)?.paneLocalSize ?? 0) / 2 * D;
499
+ } else Oe(z);
499
500
  let i = n.currentTarget, a = n.pointerId;
500
501
  try {
501
502
  i.setPointerCapture(a);
502
503
  } catch {}
503
504
  let o = (e) => {
504
- e.pointerId === a && (D = {
505
+ e.pointerId === a && (T = {
505
506
  x: e.clientX,
506
507
  y: e.clientY
507
- }, Q());
508
+ }, Z());
508
509
  }, s = u(), c = () => {
509
- window.removeEventListener("pointermove", o), window.removeEventListener("pointerup", d), window.removeEventListener("pointercancel", f), window.removeEventListener("keydown", p, !0), window.removeEventListener("blur", m), s(), j = null;
510
+ window.removeEventListener("pointermove", o), window.removeEventListener("pointerup", d), window.removeEventListener("pointercancel", f), window.removeEventListener("keydown", p, !0), window.removeEventListener("blur", m), s(), k = null;
510
511
  try {
511
512
  i.releasePointerCapture(a);
512
513
  } catch {}
513
514
  };
514
515
  function d(e) {
515
- e.pointerId === a && (c(), $(!0));
516
+ e.pointerId === a && (c(), Q(!0));
516
517
  }
517
518
  function f(e) {
518
- e.pointerId === a && (c(), $(!1));
519
+ e.pointerId === a && (c(), Q(!1));
519
520
  }
520
521
  function p(e) {
521
- e.key === "Escape" && (c(), $(!1));
522
+ e.key === "Escape" && (c(), Q(!1));
522
523
  }
523
524
  function m() {
524
- c(), $(!1);
525
+ c(), Q(!1);
525
526
  }
526
- window.addEventListener("pointermove", o), window.addEventListener("pointerup", d), window.addEventListener("pointercancel", f), window.addEventListener("keydown", p, !0), window.addEventListener("blur", m), j = c, Q(), N = requestAnimationFrame(Re);
527
+ window.addEventListener("pointermove", o), window.addEventListener("pointerup", d), window.addEventListener("pointercancel", f), window.addEventListener("keydown", p, !0), window.addEventListener("blur", m), k = c, Z(), j = requestAnimationFrame(Ve);
527
528
  },
528
- applyReorderSettle: ze,
529
+ applyReorderSettle: He,
529
530
  dispose: () => {
530
- j?.(), j = null, N !== null && (cancelAnimationFrame(N), N = null), x = null, M = null, T = null, document.body.style.cursor = "", q(), z && Y(z), z = null, R = null, X(), Z();
531
+ k?.(), k = null, j !== null && (cancelAnimationFrame(j), j = null), y = null, A = null, C = null, document.body.style.cursor = "", K(), L && J(L), L = null, I = null, Y(), X();
531
532
  }
532
533
  };
533
534
  };
534
535
  //#endregion
535
- export { p as computeHeaderReorderedKeys, T as createColumnHeaderDragController, h as resolveCenterDropSlotRange, m as resolveConsumerDropSlot };
536
+ export { h as computeHeaderReorderedKeys, C as createColumnHeaderDragController, _ as resolveCenterDropSlotRange, g as resolveConsumerDropSlot };