@ynput/ayon-frontend-shared 0.8.0 → 0.9.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 (43) hide show
  1. package/dist/DetailsPanel.es.js +2 -2
  2. package/dist/ListTable.es.js +1 -1
  3. package/dist/NewEntity.es.js +5 -3
  4. package/dist/ProjectTreeTable.es.js +4153 -4130
  5. package/dist/ProjectsTable.es.js +5 -4
  6. package/dist/Slicer.es.js +326 -293
  7. package/dist/Views.es.js +724 -714
  8. package/dist/chunks/ColumnDropIndicator.es.js +10 -10
  9. package/dist/chunks/DeleteEntitiesConfirmDialog.es.js +44 -38
  10. package/dist/chunks/EntityPickerDialog.es.js +1 -1
  11. package/dist/chunks/Feed.es.js +41 -39
  12. package/dist/chunks/FilmstripEntityCard.es.js +1 -1
  13. package/dist/chunks/GroupSettingsFallback.es.js +3 -2
  14. package/dist/chunks/MetaWidget.es.js +425 -411
  15. package/dist/chunks/NewEntityContextInstance.es.js +6 -5
  16. package/dist/chunks/ReviewablesSelector.es.js +76 -76
  17. package/dist/chunks/SimpleTable.es.js +151 -149
  18. package/dist/chunks/Slicer.es.js +637 -617
  19. package/dist/chunks/TableExportContextInstance.es.js +141 -136
  20. package/dist/chunks/ThumbnailSimple.es.js +11 -11
  21. package/dist/chunks/Watchers.es.js +46 -46
  22. package/dist/chunks/getUris.es.js +1 -1
  23. package/dist/chunks/searchTerms.es.js +618 -581
  24. package/dist/chunks/useCreateContextMenu.es.js +15 -13
  25. package/dist/components.es.js +1393 -1314
  26. package/dist/context.es.js +1 -1
  27. package/dist/hooks.es.js +2 -2
  28. package/dist/index.es.js +11 -10
  29. package/dist/types/ContextMenu.d.ts +1 -1
  30. package/dist/types/Feed.d.ts +1 -1
  31. package/dist/types/ListTable.d.ts +1 -1
  32. package/dist/types/NewEntity.d.ts +2 -0
  33. package/dist/types/ProjectTreeTable.d.ts +121 -3
  34. package/dist/types/ProjectsTable.d.ts +1 -1
  35. package/dist/types/SimpleTable.d.ts +1 -1
  36. package/dist/types/Slicer.d.ts +7 -1
  37. package/dist/types/Views.d.ts +5 -0
  38. package/dist/types/api.d.ts +1 -0
  39. package/dist/types/components.d.ts +164 -1
  40. package/dist/types/context.d.ts +2 -1
  41. package/dist/types/util.d.ts +21 -0
  42. package/dist/util.es.js +116 -113
  43. package/package.json +2 -2
@@ -1,18 +1,18 @@
1
1
  import { jsxs as C, jsx as p } from "react/jsx-runtime";
2
- import ne, { createContext as y, useContext as f, useState as I, useEffect as E, useRef as P, useCallback as V, useMemo as G, forwardRef as Z } from "react";
3
- import { debounce as re, isEqual as Ee } from "lodash";
2
+ import re, { createContext as y, useContext as f, useState as I, useEffect as E, useRef as P, useCallback as V, useMemo as G, forwardRef as Z } from "react";
3
+ import { debounce as se, isEqual as Ee } from "lodash";
4
4
  import { confirmDialog as Ie } from "primereact/confirmdialog";
5
- import { toast as B } from "react-toastify";
5
+ import { toast as F } from "react-toastify";
6
6
  import { v4 as Pe } from "uuid";
7
7
  import { bv as D, a as Ve } from "./searchTerms.es.js";
8
8
  import { f as ke } from "./realtimeUpdatesUtils.es.js";
9
9
  import "axios";
10
- import { cV as Ae, aU as Te, dD as De, dG as se } from "./getUris.es.js";
10
+ import { cV as Ae, aU as Te, dD as De, dG as ae } from "./getUris.es.js";
11
11
  import { useStore as Re } from "react-redux";
12
- import { Button as q, Icon as K, theme as le, Dialog as $e, InputText as ue } from "@ynput/ayon-react-components";
12
+ import { Button as J, Icon as K, theme as ue, Dialog as $e, InputText as pe } from "@ynput/ayon-react-components";
13
13
  import v from "styled-components";
14
- import O from "clsx";
15
- import { a as Ne, K as ae } from "./platform.es.js";
14
+ import L from "clsx";
15
+ import { a as Ne, K as ie } from "./platform.es.js";
16
16
  import "@module-federation/enhanced/runtime";
17
17
  import "@ynput/ayon-addon/host";
18
18
  import "./ContextMenuContextInstance.es.js";
@@ -23,7 +23,7 @@ import "react-router-dom";
23
23
  import "semver";
24
24
  const Me = ({ message: e = "Refresh to see latest changes." }) => /* @__PURE__ */ C("div", { style: { display: "flex", gap: 8, alignItems: "center" }, children: [
25
25
  e,
26
- /* @__PURE__ */ p(q, { onClick: () => window.location.reload(), variant: "filled", children: "Refresh" })
26
+ /* @__PURE__ */ p(J, { onClick: () => window.location.reload(), variant: "filled", children: "Refresh" })
27
27
  ] }), Ue = y(void 0), co = () => f(Ue) || {}, We = y({
28
28
  isLoading: !0,
29
29
  modules: [],
@@ -34,7 +34,7 @@ const Me = ({ message: e = "Refresh to see latest changes." }) => /* @__PURE__ *
34
34
  if (e === void 0)
35
35
  throw new Error("useRemoteModules must be used within a RemoteModulesProvider");
36
36
  return e;
37
- }, J = "addonDev", M = "ayon-addon-dev", Fe = ["localhost", "127.0.0.1", "[::1]"], H = `use ?${J}=<addon>@http://localhost:<port>`, pe = (e) => {
37
+ }, B = "addonDev", O = "ayon-addon-dev", Fe = ["localhost", "127.0.0.1", "[::1]"], H = `use ?${B}=<addon>@http://localhost:<port>`, ge = (e) => {
38
38
  try {
39
39
  const { protocol: t, hostname: o } = new URL(e);
40
40
  return ["http:", "https:"].includes(t) && Fe.includes(o);
@@ -51,29 +51,29 @@ const Me = ({ message: e = "Refresh to see latest changes." }) => /* @__PURE__ *
51
51
  } catch {
52
52
  return { request: e, reason: `"${r}" is not a URL: ${H}` };
53
53
  }
54
- return ["http:", "https:"].includes(n.protocol) ? pe(r) ? { override: { addon: o, url: r } } : {
54
+ return ["http:", "https:"].includes(n.protocol) ? ge(r) ? { override: { addon: o, url: r } } : {
55
55
  request: e,
56
56
  reason: `${n.hostname} is not this machine: only dev servers on localhost, 127.0.0.1 or [::1] can be loaded`
57
57
  } : { request: e, reason: `the dev server URL must be http(s): ${H}` };
58
58
  }, uo = () => {
59
- const e = new URLSearchParams(window.location.search).get(J);
59
+ const e = new URLSearchParams(window.location.search).get(B);
60
60
  if (e === "off" || e === "")
61
- return localStorage.removeItem(M), null;
61
+ return localStorage.removeItem(O), null;
62
62
  if (e) {
63
63
  const t = Be(e);
64
- return "override" in t ? localStorage.setItem(M, JSON.stringify(t.override)) : console.warn(`[addon dev] ignored ?${J}=${e}: ${t.reason}`), t;
64
+ return "override" in t ? localStorage.setItem(O, JSON.stringify(t.override)) : console.warn(`[addon dev] ignored ?${B}=${e}: ${t.reason}`), t;
65
65
  }
66
66
  try {
67
- const t = JSON.parse(localStorage.getItem(M) || "null");
68
- return t && pe(t.url) ? { override: t } : null;
67
+ const t = JSON.parse(localStorage.getItem(O) || "null");
68
+ return t && ge(t.url) ? { override: t } : null;
69
69
  } catch {
70
70
  return null;
71
71
  }
72
- }, Je = () => localStorage.removeItem(M), qe = (e, { addon: t, url: o }) => {
72
+ }, Je = () => localStorage.removeItem(O), qe = (e, { addon: t, url: o }) => {
73
73
  const r = e ?? {}, n = ["name", "version", "remote", "buildId"].filter(
74
74
  (a) => typeof r[a] != "string" || !r[a]
75
75
  );
76
- return (!Array.isArray(r.modules) || r.modules.some((a) => typeof a != "string" || !a)) && n.push("modules"), typeof e != "object" || !e || n.length ? `${o}/ayon-addon.json is invalid (no ${n.join(", ")}): is it served by \`ayon-addon dev --ayon\`?` : r.name !== t ? `the dev server at ${o} serves "${r.name}", not "${t}": open ?${J}=${r.name}@${o}` : null;
76
+ return (!Array.isArray(r.modules) || r.modules.some((a) => typeof a != "string" || !a)) && n.push("modules"), typeof e != "object" || !e || n.length ? `${o}/ayon-addon.json is invalid (no ${n.join(", ")}): is it served by \`ayon-addon dev --ayon\`?` : r.name !== t ? `the dev server at ${o} serves "${r.name}", not "${t}": open ?${B}=${r.name}@${o}` : null;
77
77
  }, He = async (e) => {
78
78
  const { url: t } = e;
79
79
  let o;
@@ -96,7 +96,7 @@ const Me = ({ message: e = "Refresh to see latest changes." }) => /* @__PURE__ *
96
96
  const n = qe(r, e);
97
97
  if (n) throw new Error(n);
98
98
  return r;
99
- }, po = (e) => e?.attrib?.developerMode || e?.data?.isService ? null : e?.data?.isDeveloper ? "only users in developer mode can load addons from a dev server: turn on Developer Mode in the header, then reload" : "only users in developer mode can load addons from a dev server, and this user is not a developer: an admin can turn on Developer in Studio settings > Users", ie = v.div`
99
+ }, po = (e) => e?.attrib?.developerMode || e?.data?.isService ? null : e?.data?.isDeveloper ? "only users in developer mode can load addons from a dev server: turn on Developer Mode in the header, then reload" : "only users in developer mode can load addons from a dev server, and this user is not a developer: an admin can turn on Developer in Studio settings > Users", ce = v.div`
100
100
  position: fixed;
101
101
  left: 8px;
102
102
  bottom: 8px;
@@ -132,13 +132,13 @@ const Me = ({ message: e = "Refresh to see latest changes." }) => /* @__PURE__ *
132
132
  }, ze);
133
133
  return () => clearInterval(d);
134
134
  }, [e, r]);
135
- const a = /* @__PURE__ */ p(q, { variant: "text", icon: "close", onClick: () => {
135
+ const a = /* @__PURE__ */ p(J, { variant: "text", icon: "close", onClick: () => {
136
136
  Je();
137
137
  const d = new URL(window.location.href);
138
138
  d.searchParams.delete("addonDev"), window.location.href = d.toString();
139
139
  }, "data-tooltip": "Stop: load the installed addon" });
140
140
  if (e.status === "rejected")
141
- return /* @__PURE__ */ C(ie, { className: "error", "data-addon-dev-rejected": e.request, children: [
141
+ return /* @__PURE__ */ C(ce, { className: "error", "data-addon-dev-rejected": e.request, children: [
142
142
  /* @__PURE__ */ p(K, { icon: "error" }),
143
143
  /* @__PURE__ */ C("span", { children: [
144
144
  "Addon dev: ignored ?addonDev=",
@@ -149,7 +149,7 @@ const Me = ({ message: e = "Refresh to see latest changes." }) => /* @__PURE__ *
149
149
  a
150
150
  ] });
151
151
  const { addon: i, url: s } = e.override, c = "error" in e ? e.error : void 0;
152
- return /* @__PURE__ */ C(ie, { className: c ? "error" : void 0, "data-addon-dev": i, children: [
152
+ return /* @__PURE__ */ C(ce, { className: c ? "error" : void 0, "data-addon-dev": i, children: [
153
153
  /* @__PURE__ */ p(K, { icon: c ? "error" : "code" }),
154
154
  e.status === "error" ? /* @__PURE__ */ C("span", { children: [
155
155
  "Addon dev: ",
@@ -179,7 +179,7 @@ const Me = ({ message: e = "Refresh to see latest changes." }) => /* @__PURE__ *
179
179
  if (e === void 0)
180
180
  throw new Error("useURIContext must be used within a URIProvider");
181
181
  return e;
182
- }, U = (e, t = null) => {
182
+ }, M = (e, t = null) => {
183
183
  if (!e) return t;
184
184
  try {
185
185
  return JSON.parse(e);
@@ -189,7 +189,7 @@ const Me = ({ message: e = "Refresh to see latest changes." }) => /* @__PURE__ *
189
189
  }, ho = (e, t) => {
190
190
  if (typeof window > "u") return t;
191
191
  try {
192
- return U(sessionStorage.getItem(e), t);
192
+ return M(sessionStorage.getItem(e), t);
193
193
  } catch {
194
194
  return t;
195
195
  }
@@ -204,16 +204,16 @@ const Me = ({ message: e = "Refresh to see latest changes." }) => /* @__PURE__ *
204
204
  function Ye(e, t) {
205
205
  const o = P(t);
206
206
  o.current = t;
207
- const [r, n] = I(() => typeof window > "u" ? t : U(sessionStorage.getItem(e), t));
207
+ const [r, n] = I(() => typeof window > "u" ? t : M(sessionStorage.getItem(e), t));
208
208
  E(() => {
209
209
  const i = sessionStorage.getItem(e);
210
- n(U(i, o.current)), i || sessionStorage.setItem(e, JSON.stringify(o.current));
210
+ n(M(i, o.current)), i || sessionStorage.setItem(e, JSON.stringify(o.current));
211
211
  function s(c) {
212
212
  if ("key" in c && c.key && c.key !== e) return;
213
213
  const d = c.detail?.key;
214
214
  if (d && d !== e) return;
215
215
  const g = sessionStorage.getItem(e);
216
- n(U(g, o.current));
216
+ n(M(g, o.current));
217
217
  }
218
218
  return window.addEventListener("session-storage", s), window.addEventListener("storage", s), () => {
219
219
  window.removeEventListener("session-storage", s), window.removeEventListener("storage", s);
@@ -234,7 +234,7 @@ function Ye(e, t) {
234
234
  );
235
235
  return [r, a];
236
236
  }
237
- const W = (e, t = null) => {
237
+ const U = (e, t = null) => {
238
238
  if (!e) return t;
239
239
  try {
240
240
  return JSON.parse(e);
@@ -244,7 +244,7 @@ const W = (e, t = null) => {
244
244
  }, Xe = (e, t) => {
245
245
  if (typeof window > "u") return t;
246
246
  try {
247
- return W(localStorage.getItem(e), t);
247
+ return U(localStorage.getItem(e), t);
248
248
  } catch {
249
249
  return t;
250
250
  }
@@ -261,15 +261,15 @@ function mo(e, t) {
261
261
  o.current = t;
262
262
  const [r, n] = I(() => {
263
263
  const i = localStorage.getItem(e);
264
- return W(i, t);
264
+ return U(i, t);
265
265
  });
266
266
  E(() => {
267
267
  const i = localStorage.getItem(e);
268
- n(W(i, o.current)), i || localStorage.setItem(e, JSON.stringify(o.current));
268
+ n(U(i, o.current)), i || localStorage.setItem(e, JSON.stringify(o.current));
269
269
  function s(c) {
270
270
  if (c.key && c.key !== e) return;
271
271
  const d = localStorage.getItem(e);
272
- n(W(d, o.current));
272
+ n(U(d, o.current));
273
273
  }
274
274
  return window.addEventListener("storage", s), () => {
275
275
  window.removeEventListener("storage", s);
@@ -359,7 +359,7 @@ const ut = v(je)`
359
359
  opacity: 1;
360
360
  }
361
361
  }
362
- `, pt = v(q)`
362
+ `, pt = v(J)`
363
363
  width: 26px;
364
364
  height: 26px;
365
365
  margin-left: auto;
@@ -376,7 +376,7 @@ const ut = v(je)`
376
376
  background-color: #3d3e40;
377
377
  }
378
378
  `, Io = ({ children: e }) => {
379
- const { pipWindow: t, pipId: o, isSupported: r, closePipWindow: n } = dt(), a = o && ne.isValidElement(e) ? ne.cloneElement(e, { id: o }) : e;
379
+ const { pipWindow: t, pipId: o, isSupported: r, closePipWindow: n } = dt(), a = o && re.isValidElement(e) ? re.cloneElement(e, { id: o }) : e;
380
380
  return !r && o ? /* @__PURE__ */ p(
381
381
  ut,
382
382
  {
@@ -419,8 +419,8 @@ const ut = v(je)`
419
419
  if (e === void 0)
420
420
  throw new Error("useMenuContext must be used within a MenuProvider");
421
421
  return e;
422
- }, ge = y(void 0), Ao = () => {
423
- const e = f(ge);
422
+ }, we = y(void 0), Ao = () => {
423
+ const e = f(we);
424
424
  if (e === void 0)
425
425
  throw new Error("useSocketContext must be used within a SocketProvider");
426
426
  return e;
@@ -456,58 +456,58 @@ const ut = v(je)`
456
456
  const x = P(i);
457
457
  x.current = i;
458
458
  const h = G(
459
- () => re((b) => {
460
- Ee(x.current, b) || (console.log("WS: Subscriptions changed"), s(b));
459
+ () => se((S) => {
460
+ Ee(x.current, S) || (console.log("WS: Subscriptions changed"), s(S));
461
461
  }, 200),
462
462
  []
463
463
  );
464
- E(() => (D.setOnSubscriptionsChange((b) => h(b)), h(D.getSubscriptions("")), () => {
464
+ E(() => (D.setOnSubscriptionsChange((S) => h(S)), h(D.getSubscriptions("")), () => {
465
465
  D.setOnSubscriptionsChange(null), h.cancel();
466
466
  }), [h]);
467
- const [S, $] = I(!1), [R, j] = I(!1);
467
+ const [b, _] = I(!1), [R, $] = I(!1);
468
468
  E(() => {
469
- S && !R && (B.warning(/* @__PURE__ */ p(Me, {}), {
469
+ b && !R && (F.warning(/* @__PURE__ */ p(Me, {}), {
470
470
  autoClose: !1,
471
471
  closeButton: !1
472
- }), j(!0));
473
- }, [S, R]);
474
- const k = P({ callCount: 0, windowStart: Date.now() }), N = re(() => {
472
+ }), $(!0));
473
+ }, [b, R]);
474
+ const k = P({ callCount: 0, windowStart: Date.now() }), j = se(() => {
475
475
  console.log("Resetting API state due to server restart"), a(!1), r(Ve.util.resetApiState());
476
- }, 1e3), A = V(
477
- (b) => {
478
- const L = Date.now();
479
- if (L - k.current.windowStart >= 1e3 && (k.current.windowStart = L, k.current.callCount = 0), k.current.callCount > 1e3)
480
- return $(!0), console.log(
476
+ }, 1e3), N = V(
477
+ (S) => {
478
+ const q = Date.now();
479
+ if (q - k.current.windowStart >= 1e3 && (k.current.windowStart = q, k.current.callCount = 0), k.current.callCount > 1e3)
480
+ return _(!0), console.log(
481
481
  "Overload: Over 1000 messages per second. Ignoring subsequent messages."
482
482
  );
483
- let _;
483
+ let A;
484
484
  try {
485
- _ = JSON.parse(b.data);
485
+ A = JSON.parse(S.data);
486
486
  } catch (Ce) {
487
- console.error("Failed to parse websocket message:", Ce, b.data);
487
+ console.error("Failed to parse websocket message:", Ce, S.data);
488
488
  return;
489
489
  }
490
- const { topic: T, sender: oe, summary: Se, status: be } = _ || {};
490
+ const { topic: T, sender: ne, summary: Se, status: be } = A || {};
491
491
  if (d.current && (T === "heartbeat" || T === "server.started" && be === "finished")) {
492
- console.log("Server replica booted"), N();
492
+ console.log("Server replica booted"), j();
493
493
  return;
494
494
  }
495
495
  if (T !== "heartbeat") {
496
496
  if (T === "server.restart_requested" && (console.log("Server restart requested"), a(!0)), ["import.data"].includes(T)) {
497
- if (oe !== window.senderId) return;
498
- } else if (oe === window.senderId)
497
+ if (ne !== window.senderId) return;
498
+ } else if (ne === window.senderId)
499
499
  return;
500
- k.current.callCount += 1, console.log("Event RX", _), T === "shout" && _?.summary?.text && B.info(Se.text), D.publish(T, _);
500
+ k.current.callCount += 1, console.log("Event RX", A), T === "shout" && A?.summary?.text && F.info(Se.text), D.publish(T, A);
501
501
  }
502
502
  },
503
503
  [a]
504
504
  );
505
505
  return E(() => {
506
- m === Oe.OPEN && (u().onmessage = A, l(), D.publish("client.connected", {
506
+ m === Oe.OPEN && (u().onmessage = N, l(), D.publish("client.connected", {
507
507
  topic: "client.connected"
508
508
  }));
509
509
  }, [m, u]), /* @__PURE__ */ p(
510
- ge.Provider,
510
+ we.Provider,
511
511
  {
512
512
  value: {
513
513
  getWebSocket: u,
@@ -517,19 +517,19 @@ const ut = v(je)`
517
517
  children: e
518
518
  }
519
519
  );
520
- }, we = y(void 0), Do = () => {
521
- const e = f(we);
520
+ }, fe = y(void 0), Do = () => {
521
+ const e = f(fe);
522
522
  if (e === void 0)
523
523
  throw new Error("useProjectContext must be used within a ProjectContextProvider");
524
524
  return e;
525
- }, Ro = () => f(we), fe = y(
525
+ }, Ro = () => f(fe), he = y(
526
526
  void 0
527
527
  ), $o = () => {
528
- const e = f(fe);
528
+ const e = f(he);
529
529
  if (e === void 0)
530
530
  throw new Error("useProjectFoldersContext must be used within a ProjectFoldersContextProvider");
531
531
  return e;
532
- }, No = () => f(fe), Q = y(void 0), ee = (e) => ({
532
+ }, No = () => f(he), Q = y(void 0), ee = (e) => ({
533
533
  created: e,
534
534
  label_changed: e,
535
535
  renamed: e,
@@ -538,7 +538,7 @@ const ut = v(je)`
538
538
  tags_changed: e,
539
539
  attrib_changed: e,
540
540
  deleted: e
541
- }), he = (e, t) => e === t || e.startsWith(`${t}.`), X = (e, t) => t.length === 0 ? !0 : t.includes(e || ""), ve = (e) => {
541
+ }), ve = (e, t) => e === t || e.startsWith(`${t}.`), X = (e, t) => t.length === 0 ? !0 : t.includes(e || ""), me = (e) => {
542
542
  const t = e.split(".").pop();
543
543
  if (t && [
544
544
  "created",
@@ -561,7 +561,7 @@ const ut = v(je)`
561
561
  if (!n)
562
562
  throw new Error("useSyncUpdates must be used within an EntityUpdatesProvider");
563
563
  const a = e || n.projectNames, i = P(0), s = P(!1), c = n.updates.filter(
564
- (d) => X(d.project, a) && t.some((g) => he(d.topic, g)) && (r?.(d) ?? !0)
564
+ (d) => X(d.project, a) && t.some((g) => ve(d.topic, g)) && (r?.(d) ?? !0)
565
565
  );
566
566
  return E(() => {
567
567
  o && !s.current ? i.current = n.getLatestId() : !o && s.current && n.acknowledge(t, a, i.current), s.current = o;
@@ -581,7 +581,7 @@ const ut = v(je)`
581
581
  }];
582
582
  }, Lo = (e, t) => {
583
583
  if (!t) return !1;
584
- const o = ve(e);
584
+ const o = me(e);
585
585
  return o ? t[o] : !1;
586
586
  }, mt = () => Pe().replace(/-/g, ""), yt = (e = {}) => ({
587
587
  id: mt(),
@@ -641,7 +641,7 @@ const ut = v(je)`
641
641
  display: flex;
642
642
  }
643
643
  }
644
- `, z = v(q)`
644
+ `, z = v(J)`
645
645
  &.hasIcon {
646
646
  padding: 2px;
647
647
  }
@@ -675,8 +675,8 @@ const ut = v(je)`
675
675
  className: w,
676
676
  ...m
677
677
  }, u) => {
678
- const { viewAlias: l } = te(), x = (h, S) => {
679
- h.stopPropagation(), S ? Ie({
678
+ const { viewAlias: l } = te(), x = (h, b) => {
679
+ h.stopPropagation(), b ? Ie({
680
680
  message: `Save current ${l} settings and overwrite this ${l}?`,
681
681
  header: "Confirm save",
682
682
  accept: () => d && d(h, e)
@@ -687,7 +687,7 @@ const ut = v(je)`
687
687
  {
688
688
  ...m,
689
689
  id: e,
690
- className: O(w, { selected: n }),
690
+ className: L(w, { selected: n }),
691
691
  ref: u,
692
692
  children: [
693
693
  o && o,
@@ -700,7 +700,7 @@ const ut = v(je)`
700
700
  className: "reset",
701
701
  onClick: g,
702
702
  "data-tooltip": "Reset to Default",
703
- "data-shortcut": Ne("0", [ae.Shift, ae.Ctrl])
703
+ "data-shortcut": Ne("0", [ie.Shift, ie.Ctrl])
704
704
  }
705
705
  ),
706
706
  a && i && !n && /* @__PURE__ */ p(
@@ -708,7 +708,7 @@ const ut = v(je)`
708
708
  {
709
709
  icon: "save",
710
710
  variant: "text",
711
- className: O("save", { active: s === "save" }),
711
+ className: L("save", { active: s === "save" }),
712
712
  onClick: (h) => x(h, s !== "save"),
713
713
  "data-tooltip": `Save ${l} settings from current ${l}`
714
714
  }
@@ -718,7 +718,7 @@ const ut = v(je)`
718
718
  {
719
719
  variant: "text",
720
720
  icon: "more_horiz",
721
- className: O("more", { active: s === "edit" }),
721
+ className: L("more", { active: s === "edit" }),
722
722
  onClick: (h) => c(h, e),
723
723
  "data-tooltip": `Edit ${l}`
724
724
  }
@@ -747,11 +747,11 @@ const ut = v(je)`
747
747
  margin: 4px 0;
748
748
  `;
749
749
  v.li`
750
- ${le.labelSmall}
750
+ ${ue.labelSmall}
751
751
  color: var(--md-sys-color-outline);
752
752
  `;
753
753
  const It = v.li`
754
- ${le.labelSmall}
754
+ ${ue.labelSmall}
755
755
  color: var(--md-sys-color-outline);
756
756
  user-select: none;
757
757
  border-radius: var(--border-radius-m);
@@ -791,7 +791,7 @@ const It = v.li`
791
791
  It,
792
792
  {
793
793
  ...r,
794
- className: O("views-section-header", { collapsed: t }, o),
794
+ className: L("views-section-header", { collapsed: t }, o),
795
795
  ref: n,
796
796
  children: [
797
797
  /* @__PURE__ */ p("span", { children: e }),
@@ -826,10 +826,10 @@ const It = v.li`
826
826
  throw new Error("useViewsContext must be used within a ViewsProvider");
827
827
  return e;
828
828
  };
829
- let F = !1;
830
- const ce = () => {
831
- F || (F = !0, queueMicrotask(() => {
832
- F = !1;
829
+ let W = !1;
830
+ const de = () => {
831
+ W || (W = !0, queueMicrotask(() => {
832
+ W = !1;
833
833
  }));
834
834
  }, At = async (e, t, o, r = {}, n, a, i, s) => {
835
835
  const {
@@ -840,34 +840,39 @@ const ce = () => {
840
840
  setSelectedView: m,
841
841
  workingView: u,
842
842
  onSettingsChanged: l,
843
- isErrorWorkingView: x
843
+ isErrorWorkingView: x,
844
+ updateControlledSettings: h
844
845
  } = n;
846
+ if (h) {
847
+ h(e);
848
+ return;
849
+ }
845
850
  if (!d) throw new Error("No view type provided for updating view settings");
846
- const h = w?.id, S = w?.working;
851
+ const b = w?.id, _ = w?.working;
847
852
  try {
848
853
  t(o);
849
- const { settings: $, workingViewId: R } = i(), j = $ ?? c;
850
- if (j === void 0 && !x) {
854
+ const { settings: R, workingViewId: $ } = i(), k = R ?? c;
855
+ if (k === void 0 && !x) {
851
856
  console.warn(
852
857
  "updateViewSettings: no settings baseline available, aborting to prevent data loss."
853
858
  );
854
859
  return;
855
860
  }
856
- const k = { ...j, ...e }, N = yt(k), A = R ?? u?.id;
857
- A && (N.id = A);
858
- const b = N.id, L = a(
861
+ const j = { ...k, ...e }, N = yt(j), S = $ ?? u?.id;
862
+ S && (N.id = S);
863
+ const oe = N.id, A = a(
859
864
  {
860
- payload: A ? { settings: k } : N,
865
+ payload: S ? { settings: j } : N,
861
866
  viewType: d,
862
867
  projectName: g
863
868
  },
864
- A
869
+ S
865
870
  );
866
- s(), (!S || w?.id !== A) && (w && l(!0), m(b)), await L, t(null), r.successMessage && B.success(r.successMessage);
867
- } catch ($) {
868
- t(null), h && m(h), w && !S && l(!1);
869
- const R = r.errorMessage || `Failed to update view settings: ${$}`;
870
- B.error(R);
871
+ s(), (!_ || w?.id !== S) && (w && l(!0), m(oe)), await A, t(null), r.successMessage && F.success(r.successMessage);
872
+ } catch (R) {
873
+ t(null), b && m(b), w && !_ && l(!1);
874
+ const $ = r.errorMessage || `Failed to update view settings: ${R}`;
875
+ F.error($);
871
876
  }
872
877
  }, Tt = () => {
873
878
  const [e] = Te(), [t] = De(), o = te(), r = Re(), n = V(
@@ -893,14 +898,14 @@ const ce = () => {
893
898
  ), a = V(() => {
894
899
  const { viewType: s, projectName: c, selectedView: d, workingView: g } = o;
895
900
  if (!s) return {};
896
- const w = r.getState(), m = se.endpoints.getWorkingView.select({
901
+ const w = r.getState(), m = ae.endpoints.getWorkingView.select({
897
902
  viewType: s,
898
903
  projectName: c
899
- })(w), l = m?.data?.id || g?.id, x = se.endpoints.getDefaultView.select({
904
+ })(w), l = m?.data?.id || g?.id, x = ae.endpoints.getDefaultView.select({
900
905
  viewType: s,
901
906
  projectName: c
902
907
  })(w), h = x?.data?.id || d?.id;
903
- return (!!l && h === l || F) && m?.data?.settings ? {
908
+ return (!!l && h === l || W) && m?.data?.settings ? {
904
909
  settings: m.data.settings,
905
910
  workingViewId: l
906
911
  } : x?.data?.settings ? {
@@ -910,30 +915,30 @@ const ce = () => {
910
915
  }, [r, o]);
911
916
  return {
912
917
  updateViewSettings: V(
913
- async (...s) => await At(...s, o, n, a, ce),
918
+ async (...s) => await At(...s, o, n, a, de),
914
919
  [o, n, a]
915
920
  ),
916
921
  onCreateView: n,
917
922
  getLatestSettings: a,
918
- markCacheDirty: ce
923
+ markCacheDirty: de
919
924
  };
920
- }, de = (e, t) => t.split(".").reduce((o, r) => o?.[r], e), me = (e, t, o) => {
925
+ }, le = (e, t) => t.split(".").reduce((o, r) => o?.[r], e), ye = (e, t, o) => {
921
926
  const [r, ...n] = t.split(".");
922
927
  return r ? {
923
928
  ...e,
924
- [r]: n.length ? me(e[r] || {}, n.join("."), o) : o
929
+ [r]: n.length ? ye(e[r] || {}, n.join("."), o) : o
925
930
  } : e;
926
931
  }, Dt = (e, t) => {
927
- const { viewSettings: o, isLoadingViews: r } = te(), { updateViewSettings: n, getLatestSettings: a } = Tt(), [i, s] = I(null), c = P(null), d = o, g = i !== null ? i : de(d, e) ?? t, w = V((u) => {
932
+ const { viewSettings: o, isLoadingViews: r } = te(), { updateViewSettings: n, getLatestSettings: a } = Tt(), [i, s] = I(null), c = P(null), d = o, g = i !== null ? i : le(d, e) ?? t, w = V((u) => {
928
933
  c.current = u, s(u);
929
934
  }, []), m = V(
930
935
  (u) => {
931
936
  if (r) return;
932
- const l = a().settings ?? d ?? {}, x = c.current !== null ? c.current : de(l, e) ?? t, h = typeof u == "function" ? u(
937
+ const l = a().settings ?? d ?? {}, x = c.current !== null ? c.current : le(l, e) ?? t, h = typeof u == "function" ? u(
933
938
  x
934
939
  ) : u;
935
940
  n(
936
- me(l, e, h),
941
+ ye(l, e, h),
937
942
  w,
938
943
  h,
939
944
  {}
@@ -959,13 +964,13 @@ const ce = () => {
959
964
  let d = 0;
960
965
  const g = ke(
961
966
  (m) => {
962
- const u = m.map(({ project: l, topic: x, updateType: h, message: S }) => ({
967
+ const u = m.map(({ project: l, topic: x, updateType: h, message: b }) => ({
963
968
  id: ++o.current,
964
969
  project: l,
965
970
  topic: x,
966
971
  updateType: h,
967
- entityId: S.summary?.entityId,
968
- message: S
972
+ entityId: b.summary?.entityId,
973
+ message: b
969
974
  }));
970
975
  i((l) => [...l, ...u]);
971
976
  },
@@ -973,7 +978,7 @@ const ce = () => {
973
978
  0
974
979
  ), w = D.subscribeAll((m, u) => {
975
980
  if (!u?.topic || !X(u.project, t)) return;
976
- const l = ve(u.topic);
981
+ const l = me(u.topic);
977
982
  !l || s[l] || l === "created" && ![
978
983
  "entity.folder.created",
979
984
  "entity.task.created",
@@ -998,7 +1003,7 @@ const ce = () => {
998
1003
  acknowledge: (d, g, w) => {
999
1004
  i(
1000
1005
  (m) => m.filter(
1001
- (u) => u.id > w || !d.some((l) => he(u.topic, l)) || !X(u.project, g)
1006
+ (u) => u.id > w || !d.some((l) => ve(u.topic, l)) || !X(u.project, g)
1002
1007
  )
1003
1008
  );
1004
1009
  },
@@ -1061,9 +1066,9 @@ const ce = () => {
1061
1066
  align-items: center;
1062
1067
  justify-content: space-between;
1063
1068
  gap: 12px;
1064
- `, Yo = v(ue)`
1069
+ `, Yo = v(pe)`
1065
1070
  width: 180px;
1066
- `, Xo = v(ue)`
1071
+ `, Xo = v(pe)`
1067
1072
  width: 100%;
1068
1073
  /* room for the 2px focus outline */
1069
1074
  margin: 2px 0;
@@ -1074,12 +1079,12 @@ const ce = () => {
1074
1079
  "version",
1075
1080
  "representation",
1076
1081
  "workfile"
1077
- ]), Zo = (e) => !!e && Lt.has(e), ye = y(null), Qo = () => {
1078
- const e = f(ye);
1082
+ ]), Zo = (e) => !!e && Lt.has(e), xe = y(null), Qo = () => {
1083
+ const e = f(xe);
1079
1084
  if (!e)
1080
1085
  throw new Error("useDeleteEntitiesContext must be used within a DeleteEntitiesProvider");
1081
1086
  return e;
1082
- }, en = () => f(ye), tn = "tableExport", Ot = y(null), on = () => f(Ot);
1087
+ }, en = () => f(xe), tn = "tableExport", Ot = y(null), on = () => f(Ot);
1083
1088
  export {
1084
1089
  Io as $,
1085
1090
  go as A,
@@ -1097,28 +1102,28 @@ export {
1097
1102
  ft as M,
1098
1103
  wt as N,
1099
1104
  Ge as O,
1100
- we as P,
1105
+ fe as P,
1101
1106
  Ue as Q,
1102
1107
  We as R,
1103
1108
  Jo as S,
1104
1109
  at as T,
1105
1110
  Ke as U,
1106
- ye as V,
1111
+ xe as V,
1107
1112
  tn as W,
1108
1113
  Ot as X,
1109
1114
  Q as Y,
1110
1115
  Wo as Z,
1111
1116
  Uo as _,
1112
1117
  lo as a,
1113
- ge as a0,
1118
+ we as a0,
1114
1119
  To as a1,
1115
1120
  yo as a2,
1116
1121
  Lo as a3,
1117
- ve as a4,
1122
+ me as a4,
1118
1123
  ot as a5,
1119
1124
  Zo as a6,
1120
1125
  X as a7,
1121
- he as a8,
1126
+ ve as a8,
1122
1127
  xo as a9,
1123
1128
  ee as aa,
1124
1129
  Vo as ab,
@@ -1134,16 +1139,16 @@ export {
1134
1139
  _o as al,
1135
1140
  on as am,
1136
1141
  Co as an,
1137
- te as ao,
1138
- Tt as ap,
1139
- At as aq,
1140
- yt as ar,
1141
- Oo as as,
1142
- kt as at,
1143
- Pt as au,
1144
- Mo as av,
1145
- St as aw,
1146
- mt as ax,
1142
+ yt as ao,
1143
+ Oo as ap,
1144
+ kt as aq,
1145
+ te as ar,
1146
+ Pt as as,
1147
+ Mo as at,
1148
+ St as au,
1149
+ Tt as av,
1150
+ mt as aw,
1151
+ At as ax,
1147
1152
  Dt as ay,
1148
1153
  wo as b,
1149
1154
  co as c,
@@ -1153,20 +1158,20 @@ export {
1153
1158
  Ko as g,
1154
1159
  Yo as h,
1155
1160
  zo as i,
1156
- fe as j,
1161
+ he as j,
1157
1162
  Ro as k,
1158
1163
  Ye as l,
1159
1164
  rt as m,
1160
- Xe as n,
1165
+ ho as n,
1161
1166
  mo as o,
1162
- Ze as p,
1163
- Do as q,
1164
- ho as r,
1165
- $o as s,
1167
+ vo as p,
1168
+ $o as q,
1169
+ Xe as r,
1170
+ Do as s,
1166
1171
  No as t,
1167
1172
  ko as u,
1168
1173
  uo as v,
1169
- vo as w,
1174
+ Ze as w,
1170
1175
  po as x,
1171
1176
  He as y,
1172
1177
  Me as z