@ynput/ayon-frontend-shared 0.6.4 → 0.6.6

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 (55) hide show
  1. package/dist/DetailsPanel.es.js +480 -477
  2. package/dist/ListTable.es.js +24 -25
  3. package/dist/NewEntity.es.js +6 -7
  4. package/dist/ProjectTreeTable.es.js +2018 -2006
  5. package/dist/Views.es.js +28 -28
  6. package/dist/api.es.js +291 -289
  7. package/dist/chunks/Actions.es.js +12 -12
  8. package/dist/chunks/ColumnDropIndicator.es.js +8 -9
  9. package/dist/chunks/DeleteEntitiesConfirmDialog.es.js +31 -25
  10. package/dist/chunks/DeleteEntitiesContextInstance.es.js +1 -1
  11. package/dist/chunks/DetailsDialog.es.js +1 -1
  12. package/dist/chunks/EmptyPlaceholder.es.js +13 -12
  13. package/dist/chunks/EntityPath.es.js +67 -67
  14. package/dist/chunks/EntityPickerDialog.es.js +1 -1
  15. package/dist/chunks/EntityTooltip.es.js +8 -8
  16. package/dist/chunks/Feed.es.js +1742 -1734
  17. package/dist/chunks/Menu.es.js +168 -166
  18. package/dist/chunks/MenuItem.es.js +112 -77
  19. package/dist/chunks/MetaWidget.es.js +1283 -1279
  20. package/dist/chunks/PlayableIcon.es.js +458 -451
  21. package/dist/chunks/ProjectContext.es.js +20 -20
  22. package/dist/chunks/RepresentationsList.es.js +9 -9
  23. package/dist/chunks/ReviewablesSelector.es.js +1504 -1374
  24. package/dist/chunks/SimpleForm.es.js +78 -75
  25. package/dist/chunks/Slicer.es.js +68 -69
  26. package/dist/chunks/ThumbnailSimple.es.js +4 -4
  27. package/dist/chunks/Watchers.es.js +104 -105
  28. package/dist/chunks/activeEntities.es.js +58 -0
  29. package/dist/chunks/columnConfigConverter.es.js +57 -63
  30. package/dist/chunks/getUris.es.js +1014 -960
  31. package/dist/chunks/iconUtils.es.js +151 -0
  32. package/dist/chunks/queryFilterToClientFilter.es.js +90 -81
  33. package/dist/chunks/realtimeUpdatesUtils.es.js +113 -80
  34. package/dist/chunks/searchTerms.es.js +332 -247
  35. package/dist/chunks/useAttributeEnums.es.js +34 -34
  36. package/dist/chunks/viewUpdateHelper.es.js +11 -11
  37. package/dist/components.es.js +340 -337
  38. package/dist/context.es.js +48 -48
  39. package/dist/hooks.es.js +34 -34
  40. package/dist/index.es.js +1 -1
  41. package/dist/types/ContextMenu.d.ts +1 -1
  42. package/dist/types/Feed.d.ts +2 -2
  43. package/dist/types/ListTable.d.ts +1 -1
  44. package/dist/types/ProjectTreeTable.d.ts +7 -6
  45. package/dist/types/SimpleTable.d.ts +1 -1
  46. package/dist/types/Slicer.d.ts +6 -6
  47. package/dist/types/Views.d.ts +6 -6
  48. package/dist/types/api.d.ts +554 -176
  49. package/dist/types/components.d.ts +73 -11
  50. package/dist/types/context.d.ts +7 -7
  51. package/dist/types/util.d.ts +238 -3
  52. package/dist/util.es.js +127 -114
  53. package/package.json +1 -1
  54. package/dist/chunks/extractEntityHierarchyFromParents.es.js +0 -28
  55. package/dist/chunks/parseHtmlToPlainTextWithLinks.es.js +0 -138
@@ -7,11 +7,11 @@ import { c as K } from "./copyToClipboard.es.js";
7
7
  import "uuid";
8
8
  import { aw as ce, aY as De, bh as de, a$ as je, b0 as Fe, b1 as Ce, bj as Ae, bn as Ne, bw as $e, bg as Re, a as B, bo as ze } from "./searchTerms.es.js";
9
9
  import p, { keyframes as pe, css as ue } from "styled-components";
10
- import M from "clsx";
11
- import { BorderedSection as H, Button as O, StatusSelect as Ue, AssigneeSelect as Me, TagsSelect as Le, EnumDropdown as Pe, Icon as P, getMimeTypeIcon as We, theme as Oe, getFileSizeString as Ie, WatcherSelect as Ve } from "@ynput/ayon-react-components";
12
- import { m as Be, M as He, T as _e, l as Qe, B as qe, D as Ge } from "./MetaWidget.es.js";
10
+ import U from "clsx";
11
+ import { BorderedSection as H, Button as O, StatusSelect as Me, AssigneeSelect as Ue, TagsSelect as Le, EnumDropdown as Pe, Icon as P, getMimeTypeIcon as We, theme as Oe, getFileSizeString as Ie, WatcherSelect as Ve } from "@ynput/ayon-react-components";
12
+ import { o as Be, M as He, T as _e, n as Qe, B as qe, D as Ge } from "./MetaWidget.es.js";
13
13
  import "./PlayableIcon.es.js";
14
- import { df as Ke, bU as Ye, c6 as me, bf as Ze, an as Je, bu as Xe, d3 as et } from "./getUris.es.js";
14
+ import { dh as Ke, bW as Ye, c8 as me, bg as Ze, ao as Je, bv as Xe, d5 as et } from "./getUris.es.js";
15
15
  import "@module-federation/enhanced/runtime";
16
16
  import { v as Y, d as tt, x as ot, T as rt } from "./DeleteEntitiesContextInstance.es.js";
17
17
  import "semver";
@@ -29,7 +29,6 @@ import "@lexical/list";
29
29
  import "@lexical/rich-text";
30
30
  import "@lexical/selection";
31
31
  import "@lexical/utils";
32
- import "react-router-dom";
33
32
  import "@tanstack/react-table";
34
33
  import { g as nt, h as X } from "./humanizeFieldName.es.js";
35
34
  import { a as it, A as st } from "./ThumbnailSimple.es.js";
@@ -48,7 +47,7 @@ const ee = [], pt = (e) => {
48
47
  }),
49
48
  [t, r, e]
50
49
  );
51
- }, Bo = () => {
50
+ }, Vo = () => {
52
51
  const [e] = je(), [t] = Fe();
53
52
  return Q(
54
53
  async (r, o) => {
@@ -386,7 +385,7 @@ const ee = [], pt = (e) => {
386
385
  o = le(o, n, "name");
387
386
  }
388
387
  return o;
389
- }, Ho = (e, t) => {
388
+ }, Bo = (e, t) => {
390
389
  let r = Object.values(e || {});
391
390
  return r.length == 0 || r[0].scope === void 0 ? r : r.filter(
392
391
  (o) => t.every((l) => o.scope === void 0 || o.scope.includes(l))
@@ -695,7 +694,7 @@ const ee = [], pt = (e) => {
695
694
  return /* @__PURE__ */ z(
696
695
  fe,
697
696
  {
698
- className: M("field-row", { "multi-line": y.data.widget === "markdown" }),
697
+ className: U("field-row", { "multi-line": y.data.widget === "markdown" }),
699
698
  children: [
700
699
  /* @__PURE__ */ m(
701
700
  he,
@@ -709,7 +708,7 @@ const ee = [], pt = (e) => {
709
708
  /* @__PURE__ */ m(
710
709
  St,
711
710
  {
712
- className: M("field-value", {
711
+ className: U("field-value", {
713
712
  editing: F,
714
713
  readonly: T
715
714
  }),
@@ -859,7 +858,7 @@ const ee = [], pt = (e) => {
859
858
  padding-right: 8px;
860
859
  padding-left: 8px;
861
860
  margin-top: 16px;
862
- `, _o = ({ entities: e = [], isLoading: t }) => {
861
+ `, Ho = ({ entities: e = [], isLoading: t }) => {
863
862
  const { formData: r, mixedFields: o, updateFormData: l, clearMixedField: n } = ft(
864
863
  e,
865
864
  t
@@ -891,18 +890,18 @@ const ee = [], pt = (e) => {
891
890
  entityType: r?.entityType,
892
891
  folderHasVersions: y,
893
892
  attribAccess: T
894
- }), { writableAttributes: d } = T, D = !d || d.includes("description"), N = (R, U) => {
895
- R === "tags" && (Array.isArray(U) || (U == null || U === "" ? U = [] : U = [String(U)])), R.startsWith("attrib.") && (U = {
896
- [R.replace("attrib.", "")]: U
897
- }, R = "attrib"), l(R, U), A(R, U);
893
+ }), { writableAttributes: d } = T, D = !d || d.includes("description"), N = (R, M) => {
894
+ R === "tags" && (Array.isArray(M) || (M == null || M === "" ? M = [] : M = [String(M)])), R.startsWith("attrib.") && (M = {
895
+ [R.replace("attrib.", "")]: M
896
+ }, R = "attrib"), l(R, M), A(R, M);
898
897
  }, C = r?.projectName || e[0]?.projectName, $ = e[0]?.id, b = W(
899
898
  () => C && $ ? { projectName: C, entityType: x, entityId: $, productTypes: i, taskTypes: g } : void 0,
900
899
  [C, x, $, i, g]
901
- ), E = ({ type: R, id: U }) => {
902
- R === "user" || R === "team" || !C || h({ entityId: U, entityType: R, projectName: C });
903
- }, j = ({ type: R, id: U, label: ye }, be) => {
900
+ ), E = ({ type: R, id: M }) => {
901
+ R === "user" || R === "team" || !C || h({ entityId: M, entityType: R, projectName: C });
902
+ }, j = ({ type: R, id: M, label: ye }, be) => {
904
903
  const { x: xe, y: we, width: ke } = be.getBoundingClientRect();
905
- v({ id: U, name: U, type: R, label: ye, pos: { left: xe + ke / 2, top: we } });
904
+ v({ id: M, name: M, type: R, label: ye, pos: { left: xe + ke / 2, top: we } });
906
905
  }, ve = (R) => {
907
906
  l("description", R), n("description"), A("attrib", { description: R });
908
907
  };
@@ -944,9 +943,9 @@ const ee = [], pt = (e) => {
944
943
  }
945
944
  )
946
945
  ] });
947
- }, Qo = p.div`
946
+ }, _o = p.div`
948
947
  position: relative;
949
- `, qo = p.div`
948
+ `, Qo = p.div`
950
949
  position: relative;
951
950
  padding: 8px;
952
951
  border-bottom: 1px solid var(--md-sys-color-outline-variant);
@@ -978,13 +977,13 @@ const ee = [], pt = (e) => {
978
977
  /* align center */
979
978
  align-items: center;
980
979
  }
981
- `, Go = p(O)`
980
+ `, qo = p(O)`
982
981
  position: absolute;
983
982
  right: 4px;
984
983
  top: 4px;
985
984
  width: fit-content;
986
985
  z-index: 50;
987
- `, Ko = p.header`
986
+ `, Go = p.header`
988
987
  display: flex;
989
988
  align-items: center;
990
989
  gap: var(--base-gap-large);
@@ -999,7 +998,7 @@ const ee = [], pt = (e) => {
999
998
  display: none;
1000
999
  }
1001
1000
  }
1002
- `, Yo = p.div`
1001
+ `, Ko = p.div`
1003
1002
  display: flex;
1004
1003
  align-items: center;
1005
1004
  gap: var(--base-gap-small);
@@ -1007,7 +1006,7 @@ const ee = [], pt = (e) => {
1007
1006
  h2 {
1008
1007
  min-width: fit-content;
1009
1008
  }
1010
- `, Zo = p.div`
1009
+ `, Yo = p.div`
1011
1010
  position: relative;
1012
1011
  height: 100%;
1013
1012
 
@@ -1022,7 +1021,7 @@ const ee = [], pt = (e) => {
1022
1021
  flex-direction: column;
1023
1022
  gap: var(--base-gap-small);
1024
1023
  }
1025
- `, Jo = p.div`
1024
+ `, Zo = p.div`
1026
1025
  display: flex;
1027
1026
  flex-direction: column;
1028
1027
  height: 100%;
@@ -1060,7 +1059,7 @@ const ee = [], pt = (e) => {
1060
1059
  align-items: center;
1061
1060
  gap: var(--base-gap-medium);
1062
1061
  }
1063
- `, Xo = p.div`
1062
+ `, Jo = p.div`
1064
1063
  display: flex;
1065
1064
  justify-content: space-between;
1066
1065
  align-items: flex-start;
@@ -1069,10 +1068,10 @@ const ee = [], pt = (e) => {
1069
1068
  label {
1070
1069
  color: var(--md-sys-color-outline);
1071
1070
  }
1072
- `, er = p.div`
1071
+ `, Xo = p.div`
1073
1072
  display: flex;
1074
1073
  flex-direction: column;
1075
- `, tr = p(Ue)`
1074
+ `, er = p(Me)`
1076
1075
  width: fit-content;
1077
1076
  .status-field.value {
1078
1077
  position: relative;
@@ -1083,11 +1082,11 @@ const ee = [], pt = (e) => {
1083
1082
  margin-bottom: 2px;
1084
1083
  color: ${(e) => e.$textColor};
1085
1084
  }
1086
- `, or = p(Me)`
1085
+ `, tr = p(Ue)`
1087
1086
  width: fit-content;
1088
1087
  justify-self: end;
1089
1088
  max-width: 100%;
1090
- `, rr = p(Le)`
1089
+ `, or = p(Le)`
1091
1090
  height: 24px;
1092
1091
  .template-value {
1093
1092
  padding: 0 2px;
@@ -1101,7 +1100,7 @@ const ee = [], pt = (e) => {
1101
1100
  display: none;
1102
1101
  }
1103
1102
  }
1104
- `, ar = p.div`
1103
+ `, rr = p.div`
1105
1104
  display: flex;
1106
1105
  align-items: center;
1107
1106
  gap: 4px;
@@ -1121,7 +1120,7 @@ const ee = [], pt = (e) => {
1121
1120
  border-radius: 3px;
1122
1121
  padding: 0 4px;
1123
1122
  }
1124
- `, nr = p(Pe)`
1123
+ `, ar = p(Pe)`
1125
1124
  width: max-content;
1126
1125
  justify-self: end;
1127
1126
  /* remove text and dropdown icon */
@@ -1145,12 +1144,12 @@ const ee = [], pt = (e) => {
1145
1144
  background-color: var(--md-sys-color-surface-container-low-hover);
1146
1145
  }
1147
1146
  }
1148
- `, ir = p.footer`
1147
+ `, nr = p.footer`
1149
1148
  display: flex;
1150
1149
  align-items: center;
1151
1150
  gap: var(--base-gap-small);
1152
1151
  justify-content: space-between;
1153
- `, sr = p.div`
1152
+ `, ir = p.div`
1154
1153
  height: 100%;
1155
1154
 
1156
1155
  > input[type='file'] {
@@ -1161,7 +1160,7 @@ const ee = [], pt = (e) => {
1161
1160
  input[type='file'] {
1162
1161
  display: none;
1163
1162
  }
1164
- `, lr = p.div`
1163
+ `, sr = p.div`
1165
1164
  z-index: 100;
1166
1165
  position: absolute;
1167
1166
  inset: 0;
@@ -1173,7 +1172,7 @@ const ee = [], pt = (e) => {
1173
1172
  display: flex;
1174
1173
  align-items: center;
1175
1174
  justify-content: center;
1176
- `, cr = p.div`
1175
+ `, lr = p.div`
1177
1176
  flex: 1;
1178
1177
  height: 100%;
1179
1178
  border-radius: var(--border-radius-l);
@@ -1202,11 +1201,11 @@ const ee = [], pt = (e) => {
1202
1201
  /* show children */
1203
1202
  opacity: 1;
1204
1203
  }
1205
- `, dr = p(O)`
1204
+ `, cr = p(O)`
1206
1205
  position: absolute;
1207
1206
  top: 4px;
1208
1207
  right: 4px;
1209
- `, pr = p.div`
1208
+ `, dr = p.div`
1210
1209
  display: flex;
1211
1210
  flex-direction: column;
1212
1211
  align-items: center;
@@ -1219,7 +1218,7 @@ const ee = [], pt = (e) => {
1219
1218
  top: 12px;
1220
1219
  position: relative;
1221
1220
  }
1222
- `, ur = p.div`
1221
+ `, pr = p.div`
1223
1222
  height: 8px;
1224
1223
  position: absolute;
1225
1224
  border-radius: 4px;
@@ -1247,7 +1246,7 @@ const ee = [], pt = (e) => {
1247
1246
  `, zt = p(P)`
1248
1247
  animation: ${$t} 1s linear infinite;
1249
1248
  opacity: 0.6;
1250
- `, Ut = p.img`
1249
+ `, Mt = p.img`
1251
1250
  position: absolute;
1252
1251
  inset: 0;
1253
1252
  object-fit: cover;
@@ -1259,7 +1258,7 @@ const ee = [], pt = (e) => {
1259
1258
  &.hidden {
1260
1259
  opacity: 0;
1261
1260
  }
1262
- `, Mt = ({ mimetype: e = "", src: t, ...r }) => {
1261
+ `, Ut = ({ mimetype: e = "", src: t, ...r }) => {
1263
1262
  const [o, l] = L(!1), [n, a] = L(!1), c = J(null), g = J(0);
1264
1263
  return V(() => {
1265
1264
  const s = g.current + 1;
@@ -1290,10 +1289,10 @@ const ee = [], pt = (e) => {
1290
1289
  }, 1e4), () => {
1291
1290
  cancelAnimationFrame(h), window.clearInterval(v), window.clearTimeout(f), u && (u.removeEventListener("load", x), u.removeEventListener("error", F));
1292
1291
  };
1293
- }, [t]), /* @__PURE__ */ z(Rt, { ...r, className: M("file-thumbnail", r.className), children: [
1292
+ }, [t]), /* @__PURE__ */ z(Rt, { ...r, className: U("file-thumbnail", r.className), children: [
1294
1293
  n ? /* @__PURE__ */ m(P, { icon: We(e) }) : /* @__PURE__ */ m(zt, { icon: "progress_activity" }),
1295
1294
  /* @__PURE__ */ m(
1296
- Ut,
1295
+ Mt,
1297
1296
  {
1298
1297
  ref: c,
1299
1298
  src: t,
@@ -1304,7 +1303,7 @@ const ee = [], pt = (e) => {
1304
1303
  onLoad: (s) => {
1305
1304
  s.currentTarget === c.current && (a(!0), l(!1));
1306
1305
  },
1307
- className: M({ hidden: !n || o })
1306
+ className: U({ hidden: !n || o })
1308
1307
  }
1309
1308
  )
1310
1309
  ] });
@@ -1420,7 +1419,7 @@ const ee = [], pt = (e) => {
1420
1419
  }
1421
1420
 
1422
1421
  margin: -2px;
1423
- `, It = p(Mt)`
1422
+ `, It = p(Ut)`
1424
1423
  width: 71px;
1425
1424
  height: 40px;
1426
1425
 
@@ -1434,7 +1433,7 @@ const ee = [], pt = (e) => {
1434
1433
 
1435
1434
  /* default hidden */
1436
1435
  opacity: 0;
1437
- `, mr = q(
1436
+ `, ur = q(
1438
1437
  ({
1439
1438
  availability: e,
1440
1439
  projectName: t,
@@ -1461,7 +1460,7 @@ const ee = [], pt = (e) => {
1461
1460
  {
1462
1461
  id: r,
1463
1462
  ref: w,
1464
- className: M({
1463
+ className: U({
1465
1464
  draggable: y,
1466
1465
  "drop-placeholder": g,
1467
1466
  "drag-overlay": c,
@@ -1644,13 +1643,13 @@ const ee = [], pt = (e) => {
1644
1643
  return /* @__PURE__ */ z(
1645
1644
  Ht,
1646
1645
  {
1647
- className: M({ finished: t === 100, error: !!a, [o]: !0 }),
1646
+ className: U({ finished: t === 100, error: !!a, [o]: !0 }),
1648
1647
  id: l,
1649
1648
  ...s,
1650
1649
  children: [
1651
1650
  /* @__PURE__ */ z(Qt, { children: [
1652
1651
  n && /* @__PURE__ */ m("img", { src: n }),
1653
- h && /* @__PURE__ */ m(P, { icon: h, className: M({ spinning: i }) })
1652
+ h && /* @__PURE__ */ m(P, { icon: h, className: U({ spinning: i }) })
1654
1653
  ] }),
1655
1654
  /* @__PURE__ */ z("span", { className: "content", children: [
1656
1655
  /* @__PURE__ */ m("span", { className: "name", children: e }),
@@ -1672,13 +1671,13 @@ p.div`
1672
1671
  min-height: 100%;
1673
1672
  padding-bottom: var(--padding-m);
1674
1673
  `;
1675
- const gr = p.div`
1674
+ const mr = p.div`
1676
1675
  position: relative;
1677
1676
  overflow: hidden;
1678
1677
  border-radius: var(--border-radius-m);
1679
1678
  width: 100%;
1680
1679
  min-height: 50px;
1681
- `, hr = p.div`
1680
+ `, gr = p.div`
1682
1681
  word-break: break-all;
1683
1682
  `, qt = p.div`
1684
1683
  display: flex;
@@ -1858,7 +1857,7 @@ const gr = p.div`
1858
1857
  handleRemoveUpload: u,
1859
1858
  uploading: g
1860
1859
  };
1861
- }, fr = ({
1860
+ }, hr = ({
1862
1861
  projectName: e,
1863
1862
  taskId: t,
1864
1863
  folderId: r,
@@ -1919,7 +1918,7 @@ const gr = p.div`
1919
1918
  /* @__PURE__ */ m(
1920
1919
  qt,
1921
1920
  {
1922
- className: M(h, s, { dragging: y }),
1921
+ className: U(h, s, { dragging: y }),
1923
1922
  ...w,
1924
1923
  onDragEnter: () => !v && x(!0),
1925
1924
  onDragOver: (b) => b.preventDefault(),
@@ -1954,7 +1953,7 @@ const gr = p.div`
1954
1953
  Gt,
1955
1954
  {
1956
1955
  id: "upload",
1957
- className: M("upload", s),
1956
+ className: U("upload", s),
1958
1957
  style: $,
1959
1958
  ...f?.upload,
1960
1959
  children: [
@@ -1980,7 +1979,7 @@ const gr = p.div`
1980
1979
  }
1981
1980
  )
1982
1981
  ] });
1983
- }, vr = p.div`
1982
+ }, fr = p.div`
1984
1983
  position: relative;
1985
1984
  border-radius: var(--border-radius-m);
1986
1985
  display: flex;
@@ -1995,9 +1994,9 @@ const gr = p.div`
1995
1994
  }
1996
1995
 
1997
1996
  flex: 1;
1998
- `, yr = p.div`
1997
+ `, vr = p.div`
1999
1998
  position: relative;
2000
- `, br = p.span`
1999
+ `, yr = p.span`
2001
2000
  position: relative;
2002
2001
  padding: 0px 2px;
2003
2002
  border-radius: var(--border-radius-m);
@@ -2019,7 +2018,7 @@ const gr = p.div`
2019
2018
  color: var(--md-sys-color-on-surface);
2020
2019
  }
2021
2020
  }
2022
- `, xr = p.span`
2021
+ `, br = p.span`
2023
2022
  text-overflow: ellipsis;
2024
2023
  overflow: hidden;
2025
2024
  display: inline-block;
@@ -2053,7 +2052,7 @@ const gr = p.div`
2053
2052
  }
2054
2053
  }
2055
2054
  }
2056
- `, wr = p.div`
2055
+ `, xr = p.div`
2057
2056
  position: absolute;
2058
2057
  top: 100%;
2059
2058
  left: 0px;
@@ -2062,7 +2061,7 @@ const gr = p.div`
2062
2061
 
2063
2062
  z-index: 200;
2064
2063
  padding-top: 4px;
2065
- `, kr = p.ul`
2064
+ `, wr = p.ul`
2066
2065
  display: flex;
2067
2066
  flex-direction: column;
2068
2067
  gap: var(--base-gap-small);
@@ -2077,13 +2076,13 @@ const gr = p.div`
2077
2076
 
2078
2077
  max-height: 500px;
2079
2078
  overflow: auto;
2080
- `, Er = p.li`
2079
+ `, kr = p.li`
2081
2080
  padding: var(--base-gap-small);
2082
2081
  border-radius: var(--border-radius-m);
2083
2082
  color: var(--md-sys-color-on-surface);
2084
2083
  min-width: max-content;
2085
2084
  width: 100%;
2086
- `, Tr = q(
2085
+ `, Er = q(
2087
2086
  ({ children: e, segment: t, isOpen: r, scope: o, projectName: l, ...n }, a) => {
2088
2087
  const { openSlideOut: c } = Y(), g = t?.type !== "product" && t?.type !== "project", s = () => {
2089
2088
  if (!g) return;
@@ -2247,7 +2246,7 @@ const gr = p.div`
2247
2246
  }, [x]), /* @__PURE__ */ z(
2248
2247
  Jt,
2249
2248
  {
2250
- className: M(g, "thumbnail", {
2249
+ className: U(g, "thumbnail", {
2251
2250
  loading: c && (a || !A),
2252
2251
  loaded: A,
2253
2252
  error: F,
@@ -2311,7 +2310,7 @@ const gr = p.div`
2311
2310
  object-fit: cover;
2312
2311
  }
2313
2312
  }
2314
- `, Sr = ({
2313
+ `, Tr = ({
2315
2314
  thumbnails: e = [],
2316
2315
  isLoading: t,
2317
2316
  className: r,
@@ -2325,7 +2324,7 @@ const gr = p.div`
2325
2324
  to,
2326
2325
  {
2327
2326
  $length: e.length,
2328
- className: M("stacked-thumbnails", r, { stacking: a }),
2327
+ className: U("stacked-thumbnails", r, { stacking: a }),
2329
2328
  children: e.map(
2330
2329
  (c, g) => c ? /* @__PURE__ */ m(
2331
2330
  eo,
@@ -2347,7 +2346,7 @@ const gr = p.div`
2347
2346
  )
2348
2347
  }
2349
2348
  ) : null;
2350
- }, Dr = q(
2349
+ }, Sr = q(
2351
2350
  ({ entities: e, entityType: t, onWatchersUpdate: r, userName: o, ...l }, n) => {
2352
2351
  const a = e.map((i) => ({
2353
2352
  entityId: i.id,
@@ -2388,54 +2387,54 @@ const gr = p.div`
2388
2387
  }
2389
2388
  );
2390
2389
  export {
2391
- Jo as A,
2392
- Yo as B,
2393
- dr as C,
2394
- cr as D,
2395
- rr as E,
2396
- xr as F,
2397
- qo as G,
2398
- Qo as H,
2399
- ar as I,
2400
- tr as J,
2401
- or as K,
2402
- gr as L,
2403
- wr as M,
2404
- nr as N,
2405
- Go as O,
2406
- ur as P,
2407
- Xo as Q,
2408
- mr as R,
2409
- br as S,
2410
- Zo as T,
2411
- pr as U,
2412
- ir as V,
2413
- Dr as W,
2414
- er as X,
2390
+ Zo as A,
2391
+ Ko as B,
2392
+ cr as C,
2393
+ lr as D,
2394
+ or as E,
2395
+ br as F,
2396
+ Qo as G,
2397
+ _o as H,
2398
+ rr as I,
2399
+ er as J,
2400
+ tr as K,
2401
+ mr as L,
2402
+ xr as M,
2403
+ ar as N,
2404
+ qo as O,
2405
+ pr as P,
2406
+ Jo as Q,
2407
+ ur as R,
2408
+ yr as S,
2409
+ Yo as T,
2410
+ dr as U,
2411
+ nr as V,
2412
+ Sr as W,
2413
+ Xo as X,
2415
2414
  yt as a,
2416
- Bo as b,
2415
+ Vo as b,
2417
2416
  xt as c,
2418
2417
  wt as d,
2419
- hr as e,
2420
- Ho as f,
2421
- fr as g,
2418
+ gr as e,
2419
+ Bo as f,
2420
+ hr as g,
2422
2421
  ne as h,
2423
2422
  Yt as i,
2424
- sr as j,
2425
- lr as k,
2426
- vr as l,
2427
- kr as m,
2428
- Tr as n,
2429
- Er as o,
2430
- yr as p,
2423
+ ir as j,
2424
+ sr as k,
2425
+ fr as l,
2426
+ wr as m,
2427
+ Er as n,
2428
+ kr as o,
2429
+ vr as p,
2431
2430
  Ft as q,
2432
2431
  At as r,
2433
- _o as s,
2432
+ Ho as s,
2434
2433
  he as t,
2435
2434
  mt as u,
2436
- Mt as v,
2437
- Sr as w,
2435
+ Ut as v,
2436
+ Tr as w,
2438
2437
  eo as x,
2439
2438
  bt as y,
2440
- Ko as z
2439
+ Go as z
2441
2440
  };
@@ -0,0 +1,58 @@
1
+ import { useSyncExternalStore as g, useId as f, useEffect as l } from "react";
2
+ const k = (e, t) => {
3
+ if (!(!e?.scope?.includes(t) || e?.name !== "priority"))
4
+ return e.data.enum || [];
5
+ }, T = (e, t, i) => {
6
+ let s = "", o, n, r;
7
+ switch (t) {
8
+ case "folder":
9
+ s = [...e, i].join("/");
10
+ break;
11
+ case "task":
12
+ s = e.join("/"), o = i;
13
+ break;
14
+ case "product":
15
+ s = e.join("/"), n = i;
16
+ break;
17
+ case "version":
18
+ e.length > 0 && (s = e.slice(0, -1).join("/"), n = e[e.length - 1]), r = i;
19
+ break;
20
+ case "representation":
21
+ e.length > 1 && (s = e.slice(0, -2).join("/"), n = e[e.length - 2], r = e[e.length - 1]);
22
+ break;
23
+ }
24
+ return { folderPath: s, taskName: o, productName: n, versionName: r };
25
+ }, h = {
26
+ page: 0,
27
+ detailsPanel: 1,
28
+ slideOut: 2
29
+ }, c = /* @__PURE__ */ new Map(), a = /* @__PURE__ */ new Set();
30
+ let u = [], p = 0;
31
+ const d = () => {
32
+ let e;
33
+ for (const t of c.values())
34
+ t.entities.length && (!e || t.priority > e.priority || t.priority === e.priority && t.updatedAt > e.updatedAt) && (e = t);
35
+ u = e?.entities ?? [], a.forEach((t) => t());
36
+ }, E = (e, t) => e.length === t.length && e.every(
37
+ (i, s) => i.id === t[s].id && i.entityType === t[s].entityType && i.projectName === t[s].projectName
38
+ ), m = (e, t, i = 0) => {
39
+ const s = c.get(e);
40
+ s && s.priority === i && E(s.entities, t) || (c.set(e, { entities: t, priority: i, updatedAt: ++p }), d());
41
+ }, v = (e) => {
42
+ c.delete(e) && d();
43
+ }, y = () => u, A = (e) => (a.add(e), () => a.delete(e)), b = () => g(A, y), I = (e, t = h.page) => {
44
+ const i = f(), s = (e || []).map((o) => `${o.projectName}/${o.entityType}/${o.id}`).join(",");
45
+ l(() => {
46
+ m(i, e || [], t);
47
+ }, [i, s, t]), l(() => () => v(i), [i]);
48
+ };
49
+ export {
50
+ h as A,
51
+ k as a,
52
+ I as b,
53
+ v as c,
54
+ T as e,
55
+ y as g,
56
+ m as s,
57
+ b as u
58
+ };