@ishibashi0112/spreadsheet-grid-core 1.0.0 → 1.0.2

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