@ynput/ayon-frontend-shared 0.4.7 → 0.6.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 (77) hide show
  1. package/dist/DetailsPanel.es.js +684 -649
  2. package/dist/Feed.es.js +22 -22
  3. package/dist/ListTable.es.js +78 -67
  4. package/dist/ProjectTreeTable.es.js +2185 -2132
  5. package/dist/Slicer.es.js +152 -120
  6. package/dist/Views.es.js +1 -1
  7. package/dist/api.es.js +332 -329
  8. package/dist/chunks/Actions.es.js +7 -7
  9. package/dist/chunks/ColumnDropIndicator.es.js +127 -241
  10. package/dist/chunks/DeleteEntitiesContext.es.js +109 -109
  11. package/dist/chunks/DetailsDialog.es.js +3 -3
  12. package/dist/chunks/DetailsPanelContext.es.js +155 -0
  13. package/dist/chunks/EntityPath.es.js +40 -40
  14. package/dist/chunks/EntityPickerDialog.es.js +1 -1
  15. package/dist/chunks/EntityTooltip.es.js +3 -3
  16. package/dist/chunks/EntityUpdatesContext.es.js +1 -1
  17. package/dist/chunks/Feed.es.js +2208 -2611
  18. package/dist/chunks/FilterErrorActions.es.js +5 -5
  19. package/dist/chunks/GlobalContext.es.js +21 -21
  20. package/dist/chunks/InfoMessage.es.js +146 -0
  21. package/dist/chunks/Menu.es.js +6 -6
  22. package/dist/chunks/MenuContext.es.js +51 -240
  23. package/dist/chunks/MenuItem.es.js +1 -1
  24. package/dist/chunks/MetaWidget.es.js +3211 -3761
  25. package/dist/chunks/NewEntityContext.es.js +539 -544
  26. package/dist/chunks/PlayableIcon.es.js +4261 -1163
  27. package/dist/chunks/ProjectContext.es.js +2 -2
  28. package/dist/chunks/ProjectFoldersContext.es.js +84 -76
  29. package/dist/chunks/RepresentationsList.es.js +3 -3
  30. package/dist/chunks/ReviewablesSelector.es.js +396 -384
  31. package/dist/chunks/SimpleForm.es.js +9 -9
  32. package/dist/chunks/SimpleTable.es.js +286 -283
  33. package/dist/chunks/Slicer.es.js +1129 -689
  34. package/dist/chunks/TableSettingsFallback.es.js +6 -6
  35. package/dist/chunks/ThumbnailSimple.es.js +410 -61
  36. package/dist/chunks/VersionUploadContext.es.js +30 -30
  37. package/dist/chunks/ViewsContext.es.js +97 -97
  38. package/dist/chunks/Watchers.es.js +628 -598
  39. package/dist/chunks/entityDefinitions.es.js +276 -134
  40. package/dist/chunks/expandRelativeDates.es.js +27 -0
  41. package/dist/chunks/getBundleMode.es.js +16 -61
  42. package/dist/chunks/getUris.es.js +329 -322
  43. package/dist/chunks/queryFilterToClientFilter.es.js +11 -10
  44. package/dist/chunks/searchTerms.es.js +186 -173
  45. package/dist/chunks/uriUtils.es.js +48 -0
  46. package/dist/chunks/useAttributeEnums.es.js +69 -61
  47. package/dist/chunks/useColumnDragRestriction.es.js +37 -27
  48. package/dist/chunks/useDateRangeFilter.es.js +3 -3
  49. package/dist/chunks/useLocalStorage.es.js +8 -8
  50. package/dist/chunks/useSessionStorage.es.js +61 -0
  51. package/dist/chunks/viewUpdateHelper.es.js +8 -8
  52. package/dist/components.es.js +199 -194
  53. package/dist/context.es.js +60 -58
  54. package/dist/hooks.es.js +108 -101
  55. package/dist/index.es.js +20 -14
  56. package/dist/types/Actions.d.ts +16 -16
  57. package/dist/types/ContextMenu.d.ts +16 -16
  58. package/dist/types/DetailsPanel.d.ts +22 -16
  59. package/dist/types/EntityPickerDialog.d.ts +16 -16
  60. package/dist/types/Feed.d.ts +16 -16
  61. package/dist/types/ListTable.d.ts +16 -16
  62. package/dist/types/NewEntity.d.ts +16 -16
  63. package/dist/types/ProjectTreeTable.d.ts +48 -22
  64. package/dist/types/RepresentationsList.d.ts +19 -16
  65. package/dist/types/SimpleTable.d.ts +17 -16
  66. package/dist/types/Slicer.d.ts +119 -34
  67. package/dist/types/Views.d.ts +17 -17
  68. package/dist/types/api.d.ts +404 -95
  69. package/dist/types/components.d.ts +86 -25
  70. package/dist/types/context.d.ts +60 -17
  71. package/dist/types/hooks.d.ts +16 -16
  72. package/dist/types/index.d.ts +16 -16
  73. package/dist/types/util.d.ts +16 -16
  74. package/dist/util.es.js +108 -97
  75. package/package.json +26 -13
  76. package/dist/chunks/mentionTypeOptions.es.js +0 -15
  77. package/dist/chunks/useSlicerSplitter.es.js +0 -18
@@ -5,7 +5,7 @@ import { useRef as fe, useMemo as f, useState as $, useEffect as me } from "reac
5
5
  import B from "clsx";
6
6
  import { toast as w } from "react-toastify";
7
7
  import { be as he } from "./searchTerms.es.js";
8
- import { c_ as be, ba as ve, cN as ye, bb as xe, b6 as Ae } from "./getUris.es.js";
8
+ import { d0 as be, bb as ve, cP as ye, bc as xe, b7 as Ae } from "./getUris.es.js";
9
9
  import "primereact/confirmdialog";
10
10
  import { upperFirst as Q } from "lodash";
11
11
  import { u as we } from "./useActionTriggers.es.js";
@@ -302,9 +302,9 @@ const Se = x.div`
302
302
  )
303
303
  ],
304
304
  [h]
305
- ), _ = [...L, ...P], ee = f(() => {
305
+ ), T = [...L, ...P], ee = f(() => {
306
306
  const e = [];
307
- return _.forEach((n) => {
307
+ return T.forEach((n) => {
308
308
  if (!h[n] || !h[n].length) return;
309
309
  e.push({
310
310
  label: n,
@@ -328,7 +328,7 @@ const Se = x.div`
328
328
  }), e;
329
329
  }, [h, P, L]), oe = f(() => {
330
330
  let e = A.filter((n) => n.featured).sort((n, t) => (n.order || 0) - (t.order || 0)).slice(0, c);
331
- return e.length < c && _.forEach((n) => {
331
+ return e.length < c && T.forEach((n) => {
332
332
  if (e.length >= c) return;
333
333
  const t = h[n];
334
334
  if (!(!t || !t.length))
@@ -350,11 +350,11 @@ const Se = x.div`
350
350
  addonVersion: i.addonVersion,
351
351
  variant: i.variant,
352
352
  identifier: i.identifier
353
- }, T = { ...C };
354
- t && (T.formData = t);
353
+ }, _ = { ...C };
354
+ t && (_.formData = t);
355
355
  let l = null;
356
356
  try {
357
- l = await ne({ actionContext: T, ...v }).unwrap();
357
+ l = await ne({ actionContext: _, ...v }).unwrap();
358
358
  } catch (y) {
359
359
  w.error(he(y) || "Error executing action");
360
360
  return;
@@ -1,146 +1,33 @@
1
- import { jsxs as m, jsx as s, Fragment as x } from "react/jsx-runtime";
2
- import { forwardRef as C, createContext as M, useRef as S, useState as N, useEffect as P } from "react";
1
+ import { createContext as I, forwardRef as S, useRef as _, useState as M, useEffect as R } from "react";
2
+ import { jsxs as g, jsx as i, Fragment as y } from "react/jsx-runtime";
3
+ import { Button as v, Icon as D } from "@ynput/ayon-react-components";
4
+ import h from "clsx";
3
5
  import c from "styled-components";
4
- import g from "clsx";
5
- import { Icon as w, Button as y } from "@ynput/ayon-react-components";
6
- import { u as R } from "./MenuContext.es.js";
7
- import { d as z, c as D } from "./Menu.es.js";
6
+ import { u as O } from "./MenuContext.es.js";
7
+ import { M as P, a as z } from "./Menu.es.js";
8
8
  import "./MenuItem.es.js";
9
9
  import "./useLocalStorage.es.js";
10
10
  import "@module-federation/enhanced/runtime";
11
11
  import "semver";
12
- import { R as b, D as k } from "./realtimeUpdatesUtils.es.js";
12
+ import { R as C, D as w } from "./realtimeUpdatesUtils.es.js";
13
13
  import "lodash";
14
14
  import "primereact/confirmdialog";
15
15
  import "react-toastify";
16
- import { c as O } from "./copyToClipboard.es.js";
16
+ import { c as A } from "./copyToClipboard.es.js";
17
17
  import "uuid";
18
18
  import "./searchTerms.es.js";
19
- import { createPortal as A } from "react-dom";
20
- import { useDndContext as E } from "@dnd-kit/core";
21
- const F = c.div`
22
- display: flex;
23
- align-items: center;
24
- justify-content: space-between;
25
- gap: 16px;
26
- padding: var(--padding-m) var(--padding-l);
27
- border-radius: var(--border-radius-m);
28
- font-weight: 600;
29
-
30
- .content {
31
- display: flex;
32
- align-items: center;
33
- gap: 16px;
34
- }
35
-
36
- .icon {
37
- font-size: 24px;
38
- }
39
-
40
- /* default background */
41
- &.info {
42
- --message-background-color: var(--md-sys-color-secondary-container);
43
- --message-color: var(--md-sys-color-on-secondary-container);
44
- --button-background-color: var(--md-sys-color-secondary);
45
- --button-background-color-hover: var(--md-sys-color-secondary-hover);
46
- --button-color: var(--md-sys-color-on-secondary);
47
- }
48
-
49
- /* warning background */
50
- &.warning {
51
- --message-background-color: var(--md-sys-color-warning-container);
52
- --message-color: var(--md-sys-color-on-warning-container);
53
- --button-background-color: var(--md-sys-color-warning);
54
- --button-background-color-hover: hsl(25, 100%, 80%);
55
- --button-color: var(--md-sys-color-on-warning);
56
- }
57
-
58
- /* error background */
59
- &.error {
60
- --message-background-color: var(--md-sys-color-error-container);
61
- --message-color: var(--md-sys-color-on-error-container);
62
- --button-background-color: var(--md-sys-color-error);
63
- --button-background-color-hover: var(--md-sys-color-error-hover);
64
- --button-color: var(--md-sys-color-on-error);
65
- }
66
-
67
- /* success background */
68
- &.success {
69
- --message-background-color: var(--md-sys-color-tertiary-container);
70
- --message-color: var(--md-sys-color-on-tertiary-container);
71
- --button-background-color: var(--md-sys-color-tertiary);
72
- --button-background-color-hover: var(--md-sys-color-tertiary-hover);
73
- --button-color: var(--md-sys-color-on-tertiary);
74
- }
75
-
76
- background-color: var(--message-background-color);
77
- &,
78
- .icon {
79
- color: var(--message-color);
80
- }
81
-
82
- button {
83
- &,
84
- &.hasIcon {
85
- padding: 4px;
86
- }
87
- background-color: var(--button-background-color);
88
- &,
89
- .icon {
90
- color: var(--button-color);
91
- }
92
- &:hover {
93
- background-color: var(--button-background-color-hover);
94
- }
95
- }
96
- `, yo = C(
97
- ({ variant: o = "info", message: t, icon: r, action: n, ...l }, a) => /* @__PURE__ */ m(
98
- F,
99
- {
100
- ...l,
101
- className: g("message", l.className, o),
102
- ref: a,
103
- children: [
104
- /* @__PURE__ */ m("div", { className: "content", children: [
105
- /* @__PURE__ */ s(w, { icon: r || B(o) }),
106
- t
107
- ] }),
108
- n && /* @__PURE__ */ s(
109
- y,
110
- {
111
- icon: n.icon,
112
- onClick: (u) => {
113
- u.stopPropagation(), n.callback();
114
- },
115
- children: n.label
116
- }
117
- )
118
- ]
119
- }
120
- )
121
- ), B = (o) => {
122
- switch (o) {
123
- case "info":
124
- return "info";
125
- case "warning":
126
- return "warning";
127
- case "error":
128
- return "error";
129
- case "success":
130
- return "done_all";
131
- default:
132
- return "info";
133
- }
134
- }, T = (o) => {
135
- const t = o.getIsPinned(), r = o.id !== b && o.id !== k ? -30 : 0;
19
+ import { createPortal as E } from "react-dom";
20
+ import { useDndContext as N } from "@dnd-kit/core";
21
+ const F = (t) => {
22
+ const o = t.getIsPinned(), n = t.id !== C && t.id !== w ? -30 : 0;
136
23
  return {
137
- left: t === "left" ? `${o.getStart("left") + r}px` : void 0,
138
- right: t === "right" ? `${o.getAfter("right")}px` : void 0,
139
- position: t ? "sticky" : "relative",
140
- width: o.getSize(),
141
- zIndex: t ? 100 : 0
24
+ left: o === "left" ? `${t.getStart("left") + n}px` : void 0,
25
+ right: o === "right" ? `${t.getAfter("right")}px` : void 0,
26
+ position: o ? "sticky" : "relative",
27
+ width: t.getSize(),
28
+ zIndex: o ? 100 : 0
142
29
  };
143
- }, H = (o) => `calc(var(--col-${o}-size) * 1px)`, bo = M(void 0), xo = C(({ ...o }, t) => /* @__PURE__ */ m(
30
+ }, B = (t) => `calc(var(--col-${t}-size) * 1px)`, ht = I(void 0), gt = S(({ ...t }, o) => /* @__PURE__ */ g(
144
31
  "svg",
145
32
  {
146
33
  width: "25",
@@ -148,10 +35,10 @@ const F = c.div`
148
35
  viewBox: "0 0 25 22",
149
36
  fill: "none",
150
37
  xmlns: "http://www.w3.org/2000/svg",
151
- ...o,
152
- ref: t,
38
+ ...t,
39
+ ref: o,
153
40
  children: [
154
- /* @__PURE__ */ s(
41
+ /* @__PURE__ */ i(
155
42
  "path",
156
43
  {
157
44
  d: "M0.938178 10.6543C0.816721 5.48877 5.1207 1.23771 10.4975 1.11128C15.8743 0.98486 20.3734 5.02894 20.4948 10.1945C20.6163 15.36 16.3122 19.6111 10.9354 19.7376C9.75118 19.7654 8.61022 19.5914 7.5495 19.2479C7.33438 19.1783 7.0983 19.1794 6.88174 19.2638L5.242 19.9017C4.31715 20.2614 3.35776 19.4629 3.54364 18.4881L3.72118 17.557C3.78241 17.2359 3.67515 16.9129 3.45681 16.6832C1.94083 15.0885 0.992941 12.9834 0.938178 10.6543Z",
@@ -159,7 +46,7 @@ const F = c.div`
159
46
  strokeWidth: "1.5"
160
47
  }
161
48
  ),
162
- /* @__PURE__ */ s(
49
+ /* @__PURE__ */ i(
163
50
  "path",
164
51
  {
165
52
  d: "M15.3853 4.70168C19.9873 4.59348 23.892 8.06066 23.9977 12.5556C24.0445 14.5475 23.3301 16.3832 22.121 17.8111C22.0428 17.9034 22.0185 18.0146 22.041 18.108L22.2908 19.1496C22.5495 20.2281 21.5204 21.1699 20.469 20.8169L18.8159 20.2617C18.7509 20.2398 18.6726 20.2401 18.5934 20.2693C17.7115 20.5946 16.7586 20.7823 15.764 20.8057C11.1621 20.9139 7.2573 17.4467 7.1516 12.9517C7.04592 8.45675 10.7834 4.80988 15.3853 4.70168Z",
@@ -168,7 +55,7 @@ const F = c.div`
168
55
  strokeWidth: "1.5"
169
56
  }
170
57
  ),
171
- /* @__PURE__ */ s(
58
+ /* @__PURE__ */ i(
172
59
  "path",
173
60
  {
174
61
  d: "M20.1373 12.6133C19.942 15.1992 17.8037 17.2074 15.2107 17.2402L14.7621 17.2459",
@@ -179,7 +66,7 @@ const F = c.div`
179
66
  )
180
67
  ]
181
68
  }
182
- )), U = c(y)`
69
+ )), T = c(v)`
183
70
  width: 24px;
184
71
  height: 24px;
185
72
  padding: 2px;
@@ -201,16 +88,16 @@ const F = c.div`
201
88
  &.selected {
202
89
  display: flex !important;
203
90
  }
204
- `, Co = ({ selected: o, style: t, ...r }) => /* @__PURE__ */ s(
205
- U,
91
+ `, xt = ({ selected: t, style: o, ...n }) => /* @__PURE__ */ i(
92
+ T,
206
93
  {
207
- ...r,
208
- selected: o,
209
- className: g(r.className, "action", { selected: o }),
94
+ ...n,
95
+ selected: t,
96
+ className: h(n.className, "action", { selected: t }),
210
97
  variant: "text",
211
- style: { ...t }
98
+ style: { ...o }
212
99
  }
213
- ), V = c(y)`
100
+ ), H = c(v)`
214
101
  background-color: unset !important;
215
102
  z-index: 110;
216
103
  position: relative;
@@ -227,52 +114,52 @@ const F = c.div`
227
114
  background-color: var(--md-sys-color-surface-container-hover) !important;
228
115
  }
229
116
 
230
- ${({ $isOpen: o }) => o && `
117
+ ${({ $isOpen: t }) => t && `
231
118
  background-color: var(--md-sys-color-surface-container-hover) !important;
232
119
  `}
233
- `, wo = ({ menuItems: o, menuId: t, className: r }) => {
234
- const { toggleMenuOpen: n, menuOpen: l } = R(), a = S(null), u = l === t;
235
- return o.length === 0 ? null : /* @__PURE__ */ m(x, { children: [
236
- /* @__PURE__ */ s(
237
- V,
120
+ `, Ct = ({ menuItems: t, menuId: o, className: n }) => {
121
+ const { toggleMenuOpen: r, menuOpen: d } = O(), a = _(null), p = d === o;
122
+ return t.length === 0 ? null : /* @__PURE__ */ g(y, { children: [
123
+ /* @__PURE__ */ i(
124
+ H,
238
125
  {
239
126
  ref: a,
240
- className: r,
241
- onClick: (i) => {
242
- i.stopPropagation(), n(t);
127
+ className: n,
128
+ onClick: (s) => {
129
+ s.stopPropagation(), r(o);
243
130
  },
244
- onPointerDown: (i) => i.stopPropagation(),
131
+ onPointerDown: (s) => s.stopPropagation(),
245
132
  icon: "more_horiz",
246
- $isOpen: u
133
+ $isOpen: p
247
134
  }
248
135
  ),
249
- /* @__PURE__ */ s(
250
- z,
136
+ /* @__PURE__ */ i(
137
+ P,
251
138
  {
252
139
  target: a.current,
253
- id: t,
140
+ id: o,
254
141
  align: "left",
255
- onClose: (i) => {
256
- i.stopPropagation(), n(!1);
142
+ onClose: (s) => {
143
+ s.stopPropagation(), r(!1);
257
144
  },
258
- children: /* @__PURE__ */ s(D, { menu: o, onClose: () => n(!1) })
145
+ children: /* @__PURE__ */ i(z, { menu: t, onClose: () => r(!1) })
259
146
  }
260
147
  )
261
148
  ] });
262
- }, W = c.tfoot`
149
+ }, U = c.tfoot`
263
150
  display: grid !important;
264
151
  position: sticky;
265
152
  bottom: 0;
266
153
  z-index: 10;
267
154
  background-color: var(--md-sys-color-surface-container-lowest);
268
- `, $ = c.tr`
155
+ `, W = c.tr`
269
156
  display: flex;
270
157
  background-color: var(--md-sys-color-surface-container-low);
271
158
 
272
159
  &.clickable {
273
160
  cursor: pointer;
274
161
  }
275
- `, j = c.td`
162
+ `, $ = c.td`
276
163
  position: relative;
277
164
  box-shadow: inset 1px 1px 0 0 var(--md-sys-color-surface-container);
278
165
  background-color: var(--md-sys-color-surface-container-lowest);
@@ -296,7 +183,7 @@ const F = c.div`
296
183
  width: 24px !important;
297
184
  min-width: unset;
298
185
  }
299
- `, q = c.div`
186
+ `, V = c.div`
300
187
  display: flex;
301
188
  align-items: center;
302
189
  gap: var(--base-gap-small);
@@ -315,7 +202,7 @@ const F = c.div`
315
202
  font-weight: 600;
316
203
  color: var(--md-sys-color-on-surface);
317
204
  }
318
- `, L = c.div`
205
+ `, b = c.div`
319
206
  width: calc(100% - 1px);
320
207
  height: calc(100% - 3px);
321
208
  margin-left: 1px;
@@ -324,135 +211,134 @@ const F = c.div`
324
211
  width: calc(100% - 3px);
325
212
  margin-left: 1px;
326
213
  }
327
- `, G = c(L)`
214
+ `, j = c(b)`
328
215
  position: absolute;
329
216
  inset: 1px 0 2px 1px;
330
217
  width: auto;
331
218
  height: auto;
332
219
  margin: 0;
333
220
  pointer-events: none;
334
- `, ko = ({
335
- columnVirtualizer: o,
336
- table: t,
337
- virtualPaddingLeft: r,
338
- virtualPaddingRight: n,
339
- renderCellContent: l,
221
+ `, vt = ({
222
+ columnVirtualizer: t,
223
+ table: o,
224
+ virtualPaddingLeft: n,
225
+ virtualPaddingRight: r,
226
+ renderCellContent: d,
340
227
  onClick: a,
341
- isLoading: u,
342
- statsLoading: i,
343
- error: d
228
+ isLoading: p,
229
+ statsLoading: s,
230
+ error: l
344
231
  }) => {
345
- const f = [
346
- ...t.getLeftVisibleLeafColumns(),
347
- ...t.getCenterVisibleLeafColumns(),
348
- ...t.getRightVisibleLeafColumns()
349
- ], h = o.getVirtualItems(), v = d instanceof Error ? d.message : typeof d == "string" ? d : "";
350
- return /* @__PURE__ */ s(W, { children: /* @__PURE__ */ m(
351
- $,
232
+ const u = [
233
+ ...o.getLeftVisibleLeafColumns(),
234
+ ...o.getCenterVisibleLeafColumns(),
235
+ ...o.getRightVisibleLeafColumns()
236
+ ], f = t.getVirtualItems(), x = l instanceof Error ? l.message : typeof l == "string" ? l : "";
237
+ return /* @__PURE__ */ i(U, { children: /* @__PURE__ */ g(
238
+ W,
352
239
  {
353
- className: g({ clickable: !!a }),
240
+ className: h({ clickable: !!a }),
354
241
  onClick: a,
355
242
  "data-tooltip": a ? "Power feature" : void 0,
356
243
  children: [
357
- r ? /* @__PURE__ */ s("td", { style: { display: "flex", width: r } }) : null,
358
- h.map((p) => {
359
- const e = f[p.index];
244
+ n ? /* @__PURE__ */ i("td", { style: { display: "flex", width: n } }) : null,
245
+ f.map((m) => {
246
+ const e = u[m.index];
360
247
  if (!e) return null;
361
- const I = e.id === k || e.id === b, _ = e.getIsPinned() === "left" && e.getIsLastColumn("left");
362
- return /* @__PURE__ */ s(
363
- j,
248
+ const k = e.id === w || e.id === C, L = e.getIsPinned() === "left" && e.getIsLastColumn("left");
249
+ return /* @__PURE__ */ i(
250
+ $,
364
251
  {
365
- className: g(e.id, { "last-pinned-left": _ }),
366
- style: { ...T(e), width: H(e.id) },
367
- children: u ? /* @__PURE__ */ s(
368
- L,
252
+ className: h(e.id, { "last-pinned-left": L }),
253
+ style: { ...F(e), width: B(e.id) },
254
+ children: p ? /* @__PURE__ */ i(
255
+ b,
369
256
  {
370
- className: g("loading", "shimmer-dark", {
371
- selection: e.id === b
257
+ className: h("loading", "shimmer-dark", {
258
+ selection: e.id === C
372
259
  })
373
260
  }
374
- ) : d ? e.id === "name" ? /* @__PURE__ */ m(q, { style: { color: "var(--md-sys-color-error)" }, children: [
261
+ ) : l ? e.id === "name" ? /* @__PURE__ */ g(V, { style: { color: "var(--md-sys-color-error)" }, children: [
375
262
  "Error loading stats",
376
- /* @__PURE__ */ s(
377
- w,
263
+ /* @__PURE__ */ i(
264
+ D,
378
265
  {
379
266
  icon: "info",
380
267
  style: { fontSize: 16, cursor: "help" },
381
- "data-tooltip": v,
268
+ "data-tooltip": x,
382
269
  "data-tooltip-as": "markdown"
383
270
  }
384
271
  ),
385
- /* @__PURE__ */ s(
386
- y,
272
+ /* @__PURE__ */ i(
273
+ v,
387
274
  {
388
275
  icon: "content_copy",
389
276
  "data-tooltip": "Copy error message",
390
- onClick: () => O(v),
277
+ onClick: () => A(x),
391
278
  iconProps: { style: { fontSize: 16 } },
392
279
  style: { padding: 2 },
393
280
  variant: "text"
394
281
  }
395
282
  )
396
- ] }) : null : !I && /* @__PURE__ */ m(x, { children: [
397
- l?.(e.id),
398
- i && /* @__PURE__ */ s(G, { className: g("loading", "shimmer-dark") })
283
+ ] }) : null : !k && /* @__PURE__ */ g(y, { children: [
284
+ d?.(e.id),
285
+ s && /* @__PURE__ */ i(j, { className: h("loading", "shimmer-dark") })
399
286
  ] })
400
287
  },
401
288
  e.id
402
289
  );
403
290
  }),
404
- n ? /* @__PURE__ */ s("td", { style: { display: "flex", width: n } }) : null
291
+ r ? /* @__PURE__ */ i("td", { style: { display: "flex", width: r } }) : null
405
292
  ]
406
293
  }
407
294
  ) });
408
- }, Z = "th[data-column-id]", J = c.div`
295
+ }, q = "th[data-column-id]", G = c.div`
409
296
  position: fixed;
410
297
  z-index: 2000;
411
298
  pointer-events: none;
412
299
  width: 2px;
413
300
  background-color: var(--md-sys-color-primary);
414
- `, K = (o, t) => {
415
- const r = o.getBoundingClientRect(), n = o.closest("table")?.getBoundingClientRect() ?? r;
301
+ `, Z = (t, o) => {
302
+ const n = t.getBoundingClientRect(), r = t.closest("table")?.getBoundingClientRect() ?? n;
416
303
  return {
417
- left: t === "left" ? r.left - 1 : r.right - 1,
418
- top: n.top,
419
- height: n.height
304
+ left: o === "left" ? n.left - 1 : n.right - 1,
305
+ top: r.top,
306
+ height: r.height
420
307
  };
421
- }, Lo = () => {
422
- const { active: o, over: t } = E(), r = o?.data?.current?.type === "column" ? String(o.id) : null, n = t ? String(t.id) : null, [l, a] = N(null);
423
- return P(() => {
424
- if (!r || !n || r === n) {
308
+ }, yt = () => {
309
+ const { active: t, over: o } = N(), n = t?.data?.current?.type === "column" ? String(t.id) : null, r = o ? String(o.id) : null, [d, a] = M(null);
310
+ return R(() => {
311
+ if (!n || !r || n === r) {
425
312
  a(null);
426
313
  return;
427
314
  }
428
- let u = 0;
429
- const i = () => {
430
- const d = Array.from(
431
- document.querySelectorAll(Z)
432
- ), f = d.find((h) => h.dataset.columnId === n);
433
- if (f) {
434
- const h = d.findIndex((e) => e.dataset.columnId === r), v = d.indexOf(f), p = K(f, h < v ? "right" : "left");
315
+ let p = 0;
316
+ const s = () => {
317
+ const l = Array.from(
318
+ document.querySelectorAll(q)
319
+ ), u = l.find((f) => f.dataset.columnId === r);
320
+ if (u) {
321
+ const f = l.findIndex((e) => e.dataset.columnId === n), x = l.indexOf(u), m = Z(u, f < x ? "right" : "left");
435
322
  a(
436
- (e) => e && e.left === p.left && e.top === p.top && e.height === p.height ? e : p
323
+ (e) => e && e.left === m.left && e.top === m.top && e.height === m.height ? e : m
437
324
  );
438
325
  }
439
- u = requestAnimationFrame(i);
326
+ p = requestAnimationFrame(s);
440
327
  };
441
- return i(), () => cancelAnimationFrame(u);
442
- }, [r, n]), l ? A(/* @__PURE__ */ s(J, { style: l }), document.body) : null;
328
+ return s(), () => cancelAnimationFrame(p);
329
+ }, [n, r]), d ? E(/* @__PURE__ */ i(G, { style: d }), document.body) : null;
443
330
  };
444
331
  export {
445
- wo as C,
446
- bo as F,
447
- Co as H,
448
- yo as I,
449
- xo as S,
450
- ko as T,
451
- V as a,
452
- T as b,
453
- Lo as c,
454
- J as d,
455
- Z as e,
456
- K as f,
457
- H as g
332
+ Ct as C,
333
+ ht as F,
334
+ xt as H,
335
+ gt as S,
336
+ vt as T,
337
+ H as a,
338
+ F as b,
339
+ yt as c,
340
+ G as d,
341
+ q as e,
342
+ Z as f,
343
+ B as g
458
344
  };