@hanzo/dev 4.2.1 → 4.2.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 (49) hide show
  1. package/dist/{BinaryViewer-BCDMNW2g.js → BinaryViewer-CeQaKnXQ.js} +3 -3
  2. package/dist/{ChatMarkdown-BUidXqSs.js → ChatMarkdown-DqKVAYd6.js} +9 -9
  3. package/dist/{DiffCommentAnnotation-2HD5qiyt.js → DiffCommentAnnotation-CCtanhmq.js} +4 -4
  4. package/dist/{DiffFileTree-CuWvI5hS.js → DiffFileTree-BhEDIwzm.js} +3 -3
  5. package/dist/{DiffPanel-Z2QVmBzu.js → DiffPanel-BPZ6Ru_G.js} +11 -11
  6. package/dist/{DiffWorkerPoolProvider-CEfiCIGR.js → DiffWorkerPoolProvider-8Qh-Y5iP.js} +1 -1
  7. package/dist/{DocumentPages-glImt2JO.js → DocumentPages-MN1xyIRb.js} +1 -1
  8. package/dist/{ExpandedImageDialog-iqO3LiIj.js → ExpandedImageDialog-tCY2TFXU.js} +2 -2
  9. package/dist/{FileExplorerPane-GwnRmXEh.js → FileExplorerPane-BgJw-BA4.js} +1 -1
  10. package/dist/{FilePreviewPanel-CXWpTlfI.js → FilePreviewPanel-DHteid8j.js} +17 -17
  11. package/dist/{FontFilePreview-CDydHOXg.js → FontFilePreview-COxgoDy5.js} +1 -1
  12. package/dist/{FontViewer-DDt9C5Cb.js → FontViewer-jxARaj1f.js} +1 -1
  13. package/dist/{HanzoConnectAccountPages-_sfrtw9j.js → HanzoConnectAccountPages-BM2mB27b.js} +1 -1
  14. package/dist/{HanzoConnectSidebarSignIn-coFQvyRw.js → HanzoConnectSidebarSignIn-BSOkKAjH.js} +1 -1
  15. package/dist/{LargeTextViewer-D3RklYQB.js → LargeTextViewer-BX5-yWcy.js} +1 -1
  16. package/dist/{MermaidFilePreview-BmPdNxW5.js → MermaidFilePreview-BqB2exZU.js} +1 -1
  17. package/dist/{MermaidViewer-BlKTevTF.js → MermaidViewer-B0WYx1jk.js} +1 -1
  18. package/dist/{NotebookPreview-C0gSEyeO.js → NotebookPreview-B_7pSd7A.js} +3 -3
  19. package/dist/{OfficeFilePreview-Ago_DWEt.js → OfficeFilePreview-BJsNoaju.js} +1 -1
  20. package/dist/{OfficeViewer-DBRqtLet.js → OfficeViewer-TgdFnOtV.js} +1 -1
  21. package/dist/{OpenInPicker-DD_h7VLv.js → OpenInPicker-B3gPcFs6.js} +14 -14
  22. package/dist/{OpenXmlOfficeViewer-B4dxjpba.js → OpenXmlOfficeViewer-C18a0NFP.js} +1 -1
  23. package/dist/{PreviewFaviconIcon-BwYKB-3e.js → PreviewFaviconIcon-Dzjf4QXZ.js} +3 -3
  24. package/dist/{PreviewImage-6UU-M6_B.js → PreviewImage-Ct8eWJb8.js} +1 -1
  25. package/dist/{PreviewImageContent-D-00K-A9.js → PreviewImageContent-Dd8dzt9u.js} +1 -1
  26. package/dist/{PreviewPanel-CiuHdDv8.js → PreviewPanel-BnsoHObW.js} +5 -5
  27. package/dist/{ProviderAuthTerminal-pQXIfodT.js → ProviderAuthTerminal-CYalqlUB.js} +1 -1
  28. package/dist/{PullRequestCodeTab-Cqfh5eN2.js → PullRequestCodeTab-Jt9jdq55.js} +10 -10
  29. package/dist/{PullRequestReviewAnnotation-B4Lp8Ktf.js → PullRequestReviewAnnotation-xg3n0doV.js} +5 -5
  30. package/dist/{ReadOnlySourcePreview-7xXUUySV.js → ReadOnlySourcePreview-BYlRPbKI.js} +4 -4
  31. package/dist/{RelativeTime-B_yprjav.js → RelativeTime-DQhoNsWZ.js} +1 -1
  32. package/dist/{ThreadTerminalDrawer-DCgE3ojz.js → ThreadTerminalDrawer-Cf4l2axO.js} +4 -4
  33. package/dist/{browserLinkTarget-BbVlDQYx.js → browserLinkTarget-CCzAioAu.js} +2 -2
  34. package/dist/{changedFileKind-DrjqPCpz.js → changedFileKind-OIp-fuQd.js} +2 -2
  35. package/dist/core.d.ts +38 -0
  36. package/dist/core.js +1 -1
  37. package/dist/{decodeImagePreview-ZtWU3urU.js → decodeImagePreview-DbkSuh7q.js} +1 -1
  38. package/dist/{embed-CPWZKyIW.js → embed-CzXFS50X.js} +32227 -31944
  39. package/dist/{fileContextMenu-DW94DZj4.js → fileContextMenu-hdALQktP.js} +2 -2
  40. package/dist/{fileExplorerLabel-Cfz-3q1U.js → fileExplorerLabel-DMdkA7jY.js} +2 -2
  41. package/dist/{readBinaryPreview-CjZdBNVR.js → readBinaryPreview-DgDAUfzQ.js} +1 -1
  42. package/dist/{threadSearch-CrtCof6n.js → threadSearch-sHEENLiT.js} +1 -1
  43. package/dist/{useFileMetadata-PesehDX0.js → useFileMetadata-ChvPTfBY.js} +1 -1
  44. package/dist/{useNextRenderData-CNhjWfP0.js → useNextRenderData-Jm142a1q.js} +1 -1
  45. package/dist/{useSettings-B_MtcTyD.js → useSettings-Due4XCTB.js} +1 -1
  46. package/dist/{useTextFieldSpeech-B1wCgLPO.js → useTextFieldSpeech-XN9r-f-r.js} +3 -3
  47. package/dist/useTheme-B9hvAuzL.js +411 -0
  48. package/package.json +17 -17
  49. package/dist/useTheme-WlXpQRKG.js +0 -376
@@ -3,11 +3,11 @@ import { Bd as t, Gd as n, Jh as r, Kh as i, Ld as a, Md as o, S_ as s, Xh as c,
3
3
  import { Wt as d, fy as f } from "./keybindings-D0pBlT1k.js";
4
4
  import { bt as p } from "./themePalette-C-GtwwqV.js";
5
5
  import { x as m } from "./mediaReference-3wc4ZfY8.js";
6
- import { ln as h } from "./threadSearch-CrtCof6n.js";
6
+ import { ln as h } from "./threadSearch-sHEENLiT.js";
7
7
  import { T as g, s as _ } from "./presentation-68y8EAuH.js";
8
8
  import { t as v } from "./use-atom-command-XemtT1Gv.js";
9
9
  import { F as y } from "./workspaceFocus-MR1plm6A.js";
10
- import { n as b, r as x } from "./fileExplorerLabel-Cfz-3q1U.js";
10
+ import { n as b, r as x } from "./fileExplorerLabel-DMdkA7jY.js";
11
11
  import { c as S } from "react/compiler-runtime";
12
12
  // src/state/revisionedQuery.ts
13
13
  var C = /* @__PURE__ */ new WeakMap(), w = (e, t) => e.getNodes().has(c(t) ? t[r].key : t), T = (e, t) => w(e, t) || t.initialValueTarget !== void 0 && w(e, t.initialValueTarget), E = (e) => l((t) => u((n) => {
@@ -5,7 +5,7 @@ import { $ as H, $p as ne, Ed as U, Fa as re, Ga as ie, Gd as ae, Ht as oe, Ih a
5
5
  import { Kt as et, zt as tt } from "./themePalette-C-GtwwqV.js";
6
6
  import { C as nt, T as rt, j as it, k as at, t as ot } from "./mediaReference-3wc4ZfY8.js";
7
7
  import { a as st, f as K, p as ct, r as lt } from "./network-wuXD7-is.js";
8
- import { $ as ut, Cn as dt, D as ft, O as pt, Q as mt, T as ht, b as gt, o as _t } from "./threadSearch-CrtCof6n.js";
8
+ import { $ as ut, Cn as dt, D as ft, O as pt, Q as mt, T as ht, b as gt, o as _t } from "./threadSearch-sHEENLiT.js";
9
9
  import { n as vt } from "./unlink-2-CRzwRyat.js";
10
10
  import { t as yt } from "./circle-alert-DVvR-XZ_.js";
11
11
  import { t as bt } from "./refresh-cw-DsOTMnYT.js";
@@ -13,7 +13,7 @@ import { t as xt } from "./square-VsbLWtSJ.js";
13
13
  import { t as St } from "./x-Bjr9Dwvl.js";
14
14
  import { a as Ct, c as wt, o as Tt, s as Et, t as Dt } from "./select-DLFnkZsI.js";
15
15
  import "./errors-D8_Zn8KN.js";
16
- import { a as Ot, f as kt, j as At, m as jt, p as Mt, r as Nt, v as Pt } from "./useSettings-B_MtcTyD.js";
16
+ import { a as Ot, f as kt, j as At, m as jt, p as Mt, r as Nt, v as Pt } from "./useSettings-Due4XCTB.js";
17
17
  import { s as Ft } from "./presentation-68y8EAuH.js";
18
18
  import { t as It } from "./useStableCallback-kf0xbSaG.js";
19
19
  import { l as Lt } from "./assetUrls-D8lRk7Xd.js";
@@ -1,5 +1,5 @@
1
1
  import "./rolldown-runtime-CwxnZyOB.js";
2
- import { f as e } from "./embed-CPWZKyIW.js";
2
+ import { g as e } from "./embed-CzXFS50X.js";
3
3
  import { r as t } from "./previewFailureMessages-CFguipaK.js";
4
4
  e();
5
5
  // src/components/files/binaryPreviewProtocol.ts
@@ -4,7 +4,7 @@ import { Ag as _, Bd as oe, Bm as se, Cg as ce, Ed as le, Eg as ue, F as de, Gs
4
4
  import { Ad as Me, Br as Ne, Ed as Pe, I as Fe, Jd as Ie, P as Le, Pa as Re, Pc as ze, Pd as Be, Qu as Ve, Z as O, _r as k, ad as He, bd as Ue, cd as We, cy as Ge, dy as Ke, ef as qe, ey as Je, ff as Ye, fy as A, gy as Xe, hd as Ze, id as Qe, kd as $e, nf as et, oo as tt, pf as nt, py as rt, qu as it, so as at, vr as j, wd as ot, xd as st } from "./keybindings-D0pBlT1k.js";
5
5
  import { $t as M, Zt as ct, bt as lt, ut } from "./themePalette-C-GtwwqV.js";
6
6
  import { L as dt, R as ft } from "./mediaReference-3wc4ZfY8.js";
7
- import { a as pt, k as mt, n as ht, p as gt, r as _t, z as vt } from "./useSettings-B_MtcTyD.js";
7
+ import { a as pt, k as mt, n as ht, p as gt, r as _t, z as vt } from "./useSettings-Due4XCTB.js";
8
8
  import { t as yt } from "./presentation-68y8EAuH.js";
9
9
  import { c as N } from "react/compiler-runtime";
10
10
  // ../../packages/client-runtime/src/state/snapshots.ts
@@ -2,7 +2,7 @@ import { c as e } from "./session-Decc4Fo5.js";
2
2
  import { Bd as t, Fd as n, Kh as r, Md as i, Qh as a, Ud as o } from "./utils-DtKQl-D3.js";
3
3
  import { G as s, go as c } from "./keybindings-D0pBlT1k.js";
4
4
  import { S as l, b as u, h as d, x as f } from "./mediaReference-3wc4ZfY8.js";
5
- import { an as p } from "./threadSearch-CrtCof6n.js";
5
+ import { an as p } from "./threadSearch-sHEENLiT.js";
6
6
  import { t as m } from "./use-atom-command-XemtT1Gv.js";
7
7
  import { n as h } from "./query-BPk2W3QN.js";
8
8
  import { createContext as g, useContext as _, useEffect as v, useRef as y } from "react";
@@ -1,4 +1,4 @@
1
- import { cn as e, p as t, qt as n, sn as r } from "./DiffWorkerPoolProvider-CEfiCIGR.js";
1
+ import { cn as e, p as t, qt as n, sn as r } from "./DiffWorkerPoolProvider-8Qh-Y5iP.js";
2
2
  import { createContext as i, useCallback as a, useContext as o, useMemo as s, useRef as c, useState as l, useSyncExternalStore as u } from "react";
3
3
  import { Fragment as d, jsx as f, jsxs as p } from "react/jsx-runtime";
4
4
  // ../../node_modules/.pnpm/@pierre+diffs@1.7.0-beta.4_patch_hash=b24b206d14c79de95be10322b96490b82e41cc13c8a02c737_31f9dca5c277eb0b5b13f052c5640fbe/node_modules/@pierre/diffs/dist/utils/areVirtualWindowSpecsEqual.js
@@ -7,7 +7,7 @@ import { u as je } from "./network-wuXD7-is.js";
7
7
  import "./errors-D8_Zn8KN.js";
8
8
  import { E as Me, n as C, r as Ne, s as w, t as T, w as E } from "./presentation-68y8EAuH.js";
9
9
  import { t as D } from "./use-atom-command-XemtT1Gv.js";
10
- import { p as Pe } from "./useTheme-WlXpQRKG.js";
10
+ import { p as Pe } from "./useTheme-B9hvAuzL.js";
11
11
  import { use as Fe, useRef as Ie, useSyncExternalStore as O } from "react";
12
12
  import { c as k } from "react/compiler-runtime";
13
13
  import { useSyncExternalStoreWithSelector as Le } from "use-sync-external-store/with-selector";
@@ -5,15 +5,15 @@ import { C_ as d, Dr as f, Ef as p, Fp as m, Kh as h, Kr as g, Nc as _, Qh as v,
5
5
  import { $p as Fe, Bc as Ie, Ca as Le, Jd as Re, Sh as ze, Ti as F, Tt as Be, Z as Ve, Zd as He, _f as Ue, _h as We, cy as Ge, da as Ke, dg as qe, ef as Je, ey as Ye, fu as Xe, fy as Ze, gy as Qe, id as $e, im as et, ja as tt, ka as nt, km as rt, lo as it, nf as at, pp as ot, sl as st, sm as ct, sy as lt, uc as ut, wd as dt, xd as ft, xg as pt, ya as mt, yh as ht } from "./keybindings-D0pBlT1k.js";
6
6
  import { mt as gt } from "./themePalette-C-GtwwqV.js";
7
7
  import { p as _t } from "./network-wuXD7-is.js";
8
- import { M as vt, On as yt, Xt as bt, _ as xt, sn as St } from "./threadSearch-CrtCof6n.js";
8
+ import { M as vt, On as yt, Xt as bt, _ as xt, sn as St } from "./threadSearch-sHEENLiT.js";
9
9
  import { r as Ct, t as wt } from "./unlink-2-CRzwRyat.js";
10
10
  import { i as Tt, t as Et } from "./triangle-alert-CpJvcOXh.js";
11
11
  import { a as Dt, c as Ot, d as kt, f as At, l as jt, m as Mt, n as Nt, o as Pt, p as Ft, r as It, s as Lt, t as Rt, u as zt } from "./user-round-DXjpOTSK.js";
12
12
  import { T as Bt } from "./presentation-68y8EAuH.js";
13
13
  import { t as Vt } from "./use-atom-command-XemtT1Gv.js";
14
14
  import { t as Ht } from "./query-BPk2W3QN.js";
15
- import { In as Ut, Rn as Wt, V as Gt, b as Kt, i as qt, nt as Jt, tt as Yt } from "./fileExplorerLabel-Cfz-3q1U.js";
16
- import { l as Xt, n as Zt, r as Qt, t as $t } from "./browserLinkTarget-BbVlDQYx.js";
15
+ import { In as Ut, Rn as Wt, V as Gt, b as Kt, i as qt, nt as Jt, tt as Yt } from "./fileExplorerLabel-DMdkA7jY.js";
16
+ import { l as Xt, n as Zt, r as Qt, t as $t } from "./browserLinkTarget-CCzAioAu.js";
17
17
  import { n as en, r as tn, t as nn } from "./micromark-util-decode-string-C-5AXkOV.js";
18
18
  import { Children as rn, isValidElement as an, useEffect as on, useRef as sn, useState as cn } from "react";
19
19
  import { c as I } from "react/compiler-runtime";
@@ -0,0 +1,411 @@
1
+ import { nr as e } from "./session-Decc4Fo5.js";
2
+ import { pp as t } from "./utils-DtKQl-D3.js";
3
+ import { cd as n, ff as r, hd as i, kd as a, nf as o, rb as s, wd as ee } from "./keybindings-D0pBlT1k.js";
4
+ import { F as c, H as l, I as u, L as te, T as ne, b as d, c as re, i as f, k as ie, l as ae, n as p, o as m, r as oe, w as se, x as h } from "./themePalette-C-GtwwqV.js";
5
+ import "./errors-D8_Zn8KN.js";
6
+ import { useSyncExternalStore as g } from "react";
7
+ import { c as ce } from "react/compiler-runtime";
8
+ // src/hooks/useTheme.ts
9
+ var _ = "hanzodev:theme", v = "(prefers-color-scheme: dark)", y = {
10
+ theme: "dark",
11
+ resolvedTheme: "dark",
12
+ systemDark: !0,
13
+ followSystem: !1,
14
+ appearanceMode: "dark",
15
+ themeHalves: null
16
+ };
17
+ function le() {
18
+ return b();
19
+ }
20
+ function ue() {
21
+ return typeof window > "u" ? {} : x();
22
+ }
23
+ function b() {
24
+ if (typeof window > "u") return null;
25
+ try {
26
+ return ie(window.localStorage.getItem(f));
27
+ } catch {
28
+ return null;
29
+ }
30
+ }
31
+ function x() {
32
+ try {
33
+ let e = JSON.parse(window.localStorage.getItem("hanzodev:theme-halves:v1") ?? "null");
34
+ if (typeof e != "object" || !e) return {};
35
+ let t = {};
36
+ for (let n of ["light", "dark"]) {
37
+ let r = e[n];
38
+ typeof r == "string" && (t[n] = r);
39
+ }
40
+ return t;
41
+ } catch {
42
+ return {};
43
+ }
44
+ }
45
+ function S(e) {
46
+ return `${e?.light ?? ""}|${e?.dark ?? ""}`;
47
+ }
48
+ var C = "theme-color", de = `meta[name="${C}"][data-dynamic-theme-color="true"]`, w = class extends a()("ThemeStorageError", {
49
+ operation: i(["read", "write"]),
50
+ storageKey: ee,
51
+ theme: r(m),
52
+ cause: n()
53
+ }) {
54
+ get message() {
55
+ return `Failed to ${this.operation} theme preference for ${this.storageKey}.`;
56
+ }
57
+ }, T = o(w), E = class extends a()("DesktopThemeSyncError", {
58
+ theme: m,
59
+ cause: n()
60
+ }) {
61
+ get message() {
62
+ return `Failed to sync the ${this.theme} theme to the desktop shell.`;
63
+ }
64
+ }, fe = o(E), D = [], O = null, k = !0, A = null, j = null, M = null;
65
+ function N() {
66
+ k = !0;
67
+ for (let e of D) e();
68
+ }
69
+ function P() {
70
+ return typeof window < "u" && typeof window.matchMedia == "function" && window.matchMedia(v).matches;
71
+ }
72
+ function pe(e) {
73
+ if (typeof window > "u") return e === "system";
74
+ try {
75
+ let e = window.localStorage.getItem(oe);
76
+ if (e === "true") return !0;
77
+ if (e === "false") return !1;
78
+ } catch {}
79
+ return e === "system";
80
+ }
81
+ function me(e) {
82
+ return e === "light" || e === "dark" || e === "system";
83
+ }
84
+ function F(e) {
85
+ if (typeof window < "u") try {
86
+ let e = window.localStorage.getItem(p);
87
+ if (me(e)) return e;
88
+ } catch {}
89
+ return pe(e) ? "system" : d(e) ?? "light";
90
+ }
91
+ function I(e) {
92
+ if (typeof window < "u") try {
93
+ window.localStorage.setItem(p, e);
94
+ } catch (e) {
95
+ throw new w({
96
+ operation: "write",
97
+ storageKey: p,
98
+ cause: e
99
+ });
100
+ }
101
+ }
102
+ function he() {
103
+ if (typeof window > "u" || !e()) return null;
104
+ try {
105
+ let e = window.localStorage.getItem("hanzo.appearance");
106
+ if (e) {
107
+ let t = JSON.parse(e);
108
+ if (t.theme === "light" || t.theme === "dark" || t.theme === "system") return t.theme;
109
+ if (t.profile === "light") return "light";
110
+ if (t.profile === "zen" || t.profile === "clay" || t.profile === "lelouch") return "dark";
111
+ }
112
+ } catch {}
113
+ return typeof document < "u" && (document.documentElement.classList.contains("light") || document.documentElement.classList.contains("t_light")) ? "light" : null;
114
+ }
115
+ function L(t, n) {
116
+ if (typeof window > "u" || typeof document > "u" || !e()) return;
117
+ let r = document.documentElement;
118
+ r.classList.toggle("light", n === "light"), r.classList.toggle("dark", n === "dark"), r.classList.toggle("t_light", n === "light"), r.classList.toggle("t_dark", n === "dark"), r.dataset.theme = n, r.style.colorScheme = n;
119
+ try {
120
+ let e = window.localStorage.getItem("hanzo.appearance"), r = e ? JSON.parse(e) : {}, i = {
121
+ ...r,
122
+ theme: t,
123
+ profile: n === "light" ? "light" : r.profile === "clay" ? "clay" : "zen",
124
+ userSelected: !0
125
+ };
126
+ window.localStorage.setItem("hanzo.appearance", JSON.stringify(i)), window.dispatchEvent(new CustomEvent("hanzo:appearance-change", { detail: {
127
+ theme: t,
128
+ profile: i.profile
129
+ } })), window.dispatchEvent(new Event("hanzo:appearance"));
130
+ } catch {}
131
+ }
132
+ function R() {
133
+ if (typeof window > "u") return y.theme;
134
+ let e;
135
+ try {
136
+ e = window.localStorage.getItem(_);
137
+ } catch (e) {
138
+ throw new w({
139
+ operation: "read",
140
+ storageKey: _,
141
+ cause: e
142
+ });
143
+ }
144
+ return e !== null && ne(e) ? ae(e) : he() ?? y.theme;
145
+ }
146
+ function ge(e) {
147
+ if (typeof window < "u") try {
148
+ window.localStorage.setItem(_, e), M = null;
149
+ } catch (t) {
150
+ throw new w({
151
+ operation: "write",
152
+ storageKey: _,
153
+ theme: e,
154
+ cause: t
155
+ });
156
+ }
157
+ }
158
+ function z() {
159
+ if (M !== null) return y.theme;
160
+ try {
161
+ return R();
162
+ } catch (e) {
163
+ let n = T(e) ? e : new w({
164
+ operation: "read",
165
+ storageKey: _,
166
+ cause: e
167
+ });
168
+ return M = n, console.error(n.message, {
169
+ operation: n.operation,
170
+ storageKey: n.storageKey,
171
+ ...t(n)
172
+ }), y.theme;
173
+ }
174
+ }
175
+ function B() {
176
+ let e = document.querySelector(de);
177
+ return e || (e = document.createElement("meta"), e.name = C, e.setAttribute("data-dynamic-theme-color", "true"), document.head.append(e), e);
178
+ }
179
+ function V(e) {
180
+ let t = e?.trim().toLowerCase();
181
+ return !t || t === "transparent" || t === "rgba(0, 0, 0, 0)" || t === "rgba(0 0 0 / 0)" ? null : e?.trim() ?? null;
182
+ }
183
+ function _e() {
184
+ return document.querySelector("main[data-slot='sidebar-inset']") ?? document.querySelector("[data-slot='sidebar-inner']") ?? document.body;
185
+ }
186
+ function H() {
187
+ if (typeof document > "u" || typeof getComputedStyle > "u") return;
188
+ let e = getComputedStyle(document.documentElement), t = document.documentElement.dataset.themeId ? V(e.getPropertyValue("--app-chrome-background")) : null, n = V(getComputedStyle(_e()).backgroundColor), r = V(getComputedStyle(document.body).backgroundColor), i = t ?? n ?? r;
189
+ if (!i) return;
190
+ document.documentElement.style.backgroundColor = i, document.body.style.backgroundColor = i;
191
+ let a = document.querySelectorAll(`meta[name="${C}"]`);
192
+ if (a.length === 0) B().setAttribute("content", i);
193
+ else for (let e of a) e.setAttribute("content", i);
194
+ }
195
+ function U(e, { suppressTransitions: t = !1, preservePreview: n = !0 } = {}) {
196
+ if (typeof document > "u" || typeof window > "u" || n && document.documentElement.dataset?.themeId === "__preview") return;
197
+ let r = F(e), i = r === "system", a = i ? P() : !1, o = b();
198
+ if (j?.theme === e && j.systemDark === a && j.followSystem === i && j.appearanceMode === r && S(j.themeHalves) === S(o)) {
199
+ W(e, i, r);
200
+ return;
201
+ }
202
+ t && document.documentElement.classList.add("no-transitions");
203
+ let s = u(e, a, i, r, o);
204
+ re(te(e, o, s), s), document.documentElement.classList.toggle("dark", s === "dark"), j = {
205
+ theme: e,
206
+ systemDark: a,
207
+ followSystem: i,
208
+ appearanceMode: r,
209
+ themeHalves: o
210
+ }, H(), W(e, i, r), t && (document.documentElement.offsetHeight, requestAnimationFrame(() => {
211
+ document.documentElement.classList.remove("no-transitions");
212
+ }));
213
+ }
214
+ async function ve(e, t, n, r, i = b()) {
215
+ try {
216
+ await e.setTheme(c(t, n, r, i));
217
+ } catch (e) {
218
+ throw new E({
219
+ theme: t,
220
+ cause: e
221
+ });
222
+ }
223
+ }
224
+ function W(e, n, r) {
225
+ if (typeof window > "u") return;
226
+ let i = window.desktopBridge, a = b(), o = c(e, n, r, a);
227
+ i && typeof i.setTheme == "function" && A !== o && (A = o, ve(i, e, n, r, a).catch((n) => {
228
+ let r = fe(n) ? n : new E({
229
+ theme: e,
230
+ cause: n
231
+ });
232
+ console.error(r.message, {
233
+ theme: r.theme,
234
+ ...t(r)
235
+ }), A === o && (A = null);
236
+ }));
237
+ }
238
+ typeof document < "u" && typeof window < "u" && U(z());
239
+ function G() {
240
+ if (typeof window > "u") return y;
241
+ if (!k && O) return O;
242
+ k = !1;
243
+ let e = z(), t = F(e), n = t === "system", r = n ? P() : !1, i = b(), a = u(e, r, n, t, i);
244
+ return O && O.theme === e && O.resolvedTheme === a && O.systemDark === r && O.followSystem === n && O.appearanceMode === t && S(O.themeHalves) === S(i) || (O = {
245
+ theme: e,
246
+ resolvedTheme: a,
247
+ systemDark: r,
248
+ followSystem: n,
249
+ appearanceMode: t,
250
+ themeHalves: i
251
+ }), O;
252
+ }
253
+ function K() {
254
+ return y;
255
+ }
256
+ function q() {
257
+ let e = z();
258
+ F(e) === "system" && U(e, { suppressTransitions: !0 }), N();
259
+ }
260
+ function J(e) {
261
+ e.key === _ ? (M = null, U(z(), { suppressTransitions: !0 }), N()) : e.key === "hanzodev:theme-follow-system" || e.key === "hanzodev:theme-appearance-mode" || e.key === "hanzodev:theme-halves:v1" ? (U(z(), { suppressTransitions: !0 }), N()) : (e.key === "hanzodev:themes:v1" || e.key === null) && (e.key === null && (M = null), se(), j = null, U(z(), { suppressTransitions: !0 }), N());
262
+ }
263
+ var Y = null;
264
+ function X(e) {
265
+ if (typeof window > "u") return () => {};
266
+ if (D.push(e), !Y) {
267
+ let e = typeof window.matchMedia == "function" ? window.matchMedia(v) : null;
268
+ e?.addEventListener("change", q), window.addEventListener("storage", J), Y = () => {
269
+ e?.removeEventListener("change", q), window.removeEventListener("storage", J);
270
+ };
271
+ }
272
+ return () => {
273
+ D = D.filter((t) => t !== e), D.length === 0 && (Y?.(), Y = null);
274
+ };
275
+ }
276
+ function ye() {
277
+ return G();
278
+ }
279
+ function be(e) {
280
+ let t = X(e), n = l(e);
281
+ return () => {
282
+ t(), n();
283
+ };
284
+ }
285
+ function xe() {
286
+ return h() ?? G().resolvedTheme;
287
+ }
288
+ function Se() {
289
+ let { resolvedTheme: e } = g(X, G, K);
290
+ return g(l, h, Ce) ?? e;
291
+ }
292
+ function Ce() {
293
+ return null;
294
+ }
295
+ function Z(e) {
296
+ if (typeof window > "u") return !1;
297
+ try {
298
+ s(z(), F, I);
299
+ let t = window.localStorage.getItem(f);
300
+ window.localStorage.removeItem(f);
301
+ try {
302
+ ge(e);
303
+ } catch (e) {
304
+ if (t !== null) try {
305
+ window.localStorage.setItem(f, t);
306
+ } catch {}
307
+ throw e;
308
+ }
309
+ } catch (n) {
310
+ let r = T(n) ? n : new w({
311
+ operation: "write",
312
+ storageKey: _,
313
+ theme: e,
314
+ cause: n
315
+ });
316
+ return console.error(r.message, {
317
+ operation: r.operation,
318
+ storageKey: r.storageKey,
319
+ theme: e,
320
+ ...t(r)
321
+ }), !1;
322
+ }
323
+ U(e, { suppressTransitions: !0 });
324
+ let n = F(e);
325
+ return L(n, u(e, n === "system" && P(), n === "system", n, b())), N(), !0;
326
+ }
327
+ function Q(e) {
328
+ if (typeof window > "u") return !1;
329
+ try {
330
+ I(e);
331
+ } catch (e) {
332
+ let n = T(e) ? e : new w({
333
+ operation: "write",
334
+ storageKey: p,
335
+ cause: e
336
+ });
337
+ return console.error(n.message, {
338
+ operation: n.operation,
339
+ storageKey: n.storageKey,
340
+ ...t(n)
341
+ }), !1;
342
+ }
343
+ M = null;
344
+ let n = z();
345
+ return U(n, { suppressTransitions: !0 }), L(e, u(n, e === "system" && P(), e === "system", e, b())), N(), !0;
346
+ }
347
+ function we(e, n) {
348
+ if (typeof window > "u") return !1;
349
+ try {
350
+ let t = { ...x() };
351
+ n === null ? delete t[e] : t[e] = n, t.light === void 0 && t.dark === void 0 ? window.localStorage.removeItem(f) : window.localStorage.setItem(f, JSON.stringify(t));
352
+ } catch (e) {
353
+ let n = new w({
354
+ operation: "write",
355
+ storageKey: f,
356
+ cause: e
357
+ });
358
+ return console.error(n.message, {
359
+ operation: n.operation,
360
+ storageKey: n.storageKey,
361
+ ...t(n)
362
+ }), !1;
363
+ }
364
+ return U(z(), { suppressTransitions: !0 }), N(), !0;
365
+ }
366
+ function Te() {
367
+ if (typeof window > "u") return !1;
368
+ try {
369
+ window.localStorage.removeItem(f);
370
+ } catch (e) {
371
+ let n = new w({
372
+ operation: "write",
373
+ storageKey: f,
374
+ cause: e
375
+ });
376
+ return console.error(n.message, {
377
+ operation: n.operation,
378
+ storageKey: n.storageKey,
379
+ ...t(n)
380
+ }), !1;
381
+ }
382
+ return U(z(), { suppressTransitions: !0 }), N(), !0;
383
+ }
384
+ function $({ preservePreview: e = !1 } = {}) {
385
+ typeof window < "u" && (j = null, U(z(), {
386
+ suppressTransitions: !0,
387
+ preservePreview: e
388
+ }), N());
389
+ }
390
+ function Ee() {
391
+ let e = ce(9), t = g(X, G, K), { theme: n, resolvedTheme: r } = t, i;
392
+ e[0] === n ? i = e[1] : (i = (e) => {
393
+ let t = F(n);
394
+ return Q(e ? "system" : t === "system" ? d(n) ?? "light" : t);
395
+ }, e[0] = n, e[1] = i);
396
+ let a = i, o;
397
+ return e[2] !== r || e[3] !== a || e[4] !== t.appearanceMode || e[5] !== t.followSystem || e[6] !== t.themeHalves || e[7] !== n ? (o = {
398
+ theme: n,
399
+ setTheme: Z,
400
+ setAppearanceMode: Q,
401
+ setFollowSystem: a,
402
+ setThemeHalf: we,
403
+ clearThemeHalves: Te,
404
+ refreshTheme: $,
405
+ followSystem: t.followSystem,
406
+ appearanceMode: t.appearanceMode,
407
+ resolvedTheme: r,
408
+ themeHalves: t.themeHalves
409
+ }, e[2] = r, e[3] = a, e[4] = t.appearanceMode, e[5] = t.followSystem, e[6] = t.themeHalves, e[7] = n, e[8] = o) : o = e[8], o;
410
+ }
411
+ export { ue as a, Q as c, H as d, Se as f, le as i, Z as l, ye as n, R as o, Ee as p, F as r, $ as s, xe as t, be as u };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hanzo/dev",
3
- "version": "4.2.1",
3
+ "version": "4.2.2",
4
4
  "description": "The unified Hanzo Dev & Builder library (Dev core threads/composer/runtime + Builder workspace, sessions, routes, plans, and host providers).",
5
5
  "license": "MIT",
6
6
  "repository": {
@@ -77,6 +77,22 @@
77
77
  "@tanstack/react-store": "^0.8.1",
78
78
  "use-sync-external-store": "^1.6.0"
79
79
  },
80
+ "devDependencies": {
81
+ "@hanzo/composer": "0.2.0",
82
+ "@hanzo/gui": "8.3.5",
83
+ "@hanzo/i18n": "0.5.5",
84
+ "@hanzo/ui": "8.30.3",
85
+ "@hanzo/voice": "0.1.19",
86
+ "@hanzogui/lucide-icons-2": "8.3.5",
87
+ "@types/node": "24.12.4",
88
+ "@types/react": "~19.3.0",
89
+ "@types/react-dom": "~19.3.0",
90
+ "react": "19.3.0",
91
+ "react-dom": "19.3.0",
92
+ "react-hook-form": "^7.87.0",
93
+ "react-native-svg": "15.16.1",
94
+ "typescript": "7.0.2"
95
+ },
80
96
  "peerDependencies": {
81
97
  "@hanzo/composer": ">=0.2.0",
82
98
  "@hanzo/gui": ">=8.3.5",
@@ -107,22 +123,6 @@
107
123
  "optional": true
108
124
  }
109
125
  },
110
- "devDependencies": {
111
- "@hanzo/composer": "0.2.0",
112
- "@hanzo/gui": "8.3.5",
113
- "@hanzo/i18n": "0.5.5",
114
- "@hanzo/ui": "8.30.3",
115
- "@hanzo/voice": "0.1.19",
116
- "@hanzogui/lucide-icons-2": "8.3.5",
117
- "@types/node": "24.12.4",
118
- "@types/react": "~19.3.0",
119
- "@types/react-dom": "~19.3.0",
120
- "react": "19.3.0",
121
- "react-dom": "19.3.0",
122
- "react-hook-form": "^7.87.0",
123
- "react-native-svg": "15.16.1",
124
- "typescript": "7.0.2"
125
- },
126
126
  "scripts": {
127
127
  "build:builder": "rm -rf dist/builder && tsc -p tsconfig.builder.json",
128
128
  "build:assemble": "node scripts/assemble.mjs",