react-os-shell 0.7.1 → 0.7.3

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.
@@ -0,0 +1,234 @@
1
+ import { loadAppearance, WidgetSettingsModal } from './chunk-LWVRQWGV.js';
2
+ import { useWidgetSettings } from './chunk-3T6SQ4UO.js';
3
+ import './chunk-UBN4IUDE.js';
4
+ import './chunk-ZF6AYO4G.js';
5
+ import { useState, useCallback, useEffect } from 'react';
6
+ import { jsxs, Fragment, jsx } from 'react/jsx-runtime';
7
+
8
+ var MAX_SYMBOLS = 8;
9
+ var DEFAULT_SYMBOLS = ["AAPL", "MSFT", "GOOGL", "TSLA"];
10
+ var SYMBOLS_KEY = "stock_symbols";
11
+ var APIKEY_KEY = "stock_api_key";
12
+ var SETTINGS_KEY = "stock_appearance";
13
+ var CACHE_KEY = "stock_quotes_cache";
14
+ var CACHE_TTL = 6e4;
15
+ var REFRESH_MS = 6e4;
16
+ function readCache() {
17
+ try {
18
+ return JSON.parse(localStorage.getItem(CACHE_KEY) || "{}");
19
+ } catch {
20
+ return {};
21
+ }
22
+ }
23
+ function writeCache(c) {
24
+ try {
25
+ localStorage.setItem(CACHE_KEY, JSON.stringify(c));
26
+ } catch {
27
+ }
28
+ }
29
+ function loadSymbols() {
30
+ try {
31
+ const s = JSON.parse(localStorage.getItem(SYMBOLS_KEY) || "");
32
+ if (Array.isArray(s) && s.length) return s.slice(0, MAX_SYMBOLS);
33
+ } catch {
34
+ }
35
+ return DEFAULT_SYMBOLS;
36
+ }
37
+ var fmtPrice = (n) => `$${n.toLocaleString(void 0, { minimumFractionDigits: 2, maximumFractionDigits: 2 })}`;
38
+ var fmtSigned = (n) => `${n >= 0 ? "+" : ""}${n.toFixed(2)}`;
39
+ function Stock() {
40
+ const [symbols, setSymbols] = useState(loadSymbols);
41
+ const [apiKey, setApiKey] = useState(() => {
42
+ try {
43
+ return localStorage.getItem(APIKEY_KEY) || "";
44
+ } catch {
45
+ return "";
46
+ }
47
+ });
48
+ const [appearance, setAppearance] = useState(() => loadAppearance(SETTINGS_KEY));
49
+ const [quotes, setQuotes] = useState({});
50
+ const [loading, setLoading] = useState(false);
51
+ const [tick, setTick] = useState(0);
52
+ const [settingsOpen, setSettingsOpen] = useState(false);
53
+ const [configSymbols, setConfigSymbols] = useState([]);
54
+ const [configApiKey, setConfigApiKey] = useState("");
55
+ const [configAppearance, setConfigAppearance] = useState(appearance);
56
+ const [newSymbol, setNewSymbol] = useState("");
57
+ const openSettings = useCallback(() => {
58
+ setConfigSymbols([...symbols]);
59
+ setConfigApiKey(apiKey);
60
+ setConfigAppearance({ ...appearance });
61
+ setNewSymbol("");
62
+ setSettingsOpen(true);
63
+ }, [symbols, apiKey, appearance]);
64
+ useWidgetSettings(openSettings);
65
+ useEffect(() => {
66
+ const t = setInterval(() => setTick((n) => n + 1), REFRESH_MS);
67
+ return () => clearInterval(t);
68
+ }, []);
69
+ useEffect(() => {
70
+ if (!apiKey || symbols.length === 0) {
71
+ setQuotes({});
72
+ return;
73
+ }
74
+ let mounted = true;
75
+ (async () => {
76
+ setLoading(true);
77
+ const cache = readCache();
78
+ const next = {};
79
+ await Promise.all(symbols.map(async (sym) => {
80
+ const hit = cache[sym];
81
+ if (hit && Date.now() - hit.ts < CACHE_TTL) {
82
+ next[sym] = hit.q;
83
+ return;
84
+ }
85
+ try {
86
+ const res = await fetch(`https://finnhub.io/api/v1/quote?symbol=${encodeURIComponent(sym)}&token=${encodeURIComponent(apiKey)}`);
87
+ const d = await res.json();
88
+ if (typeof d.c === "number" && d.c > 0) {
89
+ const q = { price: d.c, change: d.d ?? 0, changePct: d.dp ?? 0 };
90
+ next[sym] = q;
91
+ cache[sym] = { q, ts: Date.now() };
92
+ } else if (hit) {
93
+ next[sym] = hit.q;
94
+ }
95
+ } catch {
96
+ if (hit) next[sym] = hit.q;
97
+ }
98
+ }));
99
+ writeCache(cache);
100
+ if (mounted) {
101
+ setQuotes(next);
102
+ setLoading(false);
103
+ }
104
+ })();
105
+ return () => {
106
+ mounted = false;
107
+ };
108
+ }, [symbols.join(","), apiKey, tick]);
109
+ const addSymbol = () => {
110
+ const s = newSymbol.trim().toUpperCase();
111
+ if (!s || configSymbols.includes(s) || configSymbols.length >= MAX_SYMBOLS) return;
112
+ setConfigSymbols((p) => [...p, s]);
113
+ setNewSymbol("");
114
+ };
115
+ const saveSettings = () => {
116
+ const cleaned = configSymbols.map((s) => s.toUpperCase()).slice(0, MAX_SYMBOLS);
117
+ const key = configApiKey.trim();
118
+ setSymbols(cleaned);
119
+ setApiKey(key);
120
+ setAppearance(configAppearance);
121
+ localStorage.setItem(SYMBOLS_KEY, JSON.stringify(cleaned));
122
+ localStorage.setItem(APIKEY_KEY, key);
123
+ localStorage.setItem(SETTINGS_KEY, JSON.stringify(configAppearance));
124
+ setSettingsOpen(false);
125
+ };
126
+ return /* @__PURE__ */ jsxs(Fragment, { children: [
127
+ /* @__PURE__ */ jsx(
128
+ "div",
129
+ {
130
+ className: "flex flex-col h-full",
131
+ style: { backgroundColor: `rgb(var(--taskbar-bg-rgb, 243 244 246) / ${appearance.activeOpacity / 100})`, backdropFilter: appearance.activeBlur > 0 ? `blur(${appearance.activeBlur}px)` : void 0 },
132
+ children: /* @__PURE__ */ jsx("div", { className: "px-4 py-3 flex-1", children: !apiKey ? /* @__PURE__ */ jsxs("div", { className: "flex flex-col items-center justify-center text-center gap-2 py-6", children: [
133
+ /* @__PURE__ */ jsx("svg", { className: "h-8 w-8 text-gray-400", fill: "none", viewBox: "0 0 24 24", stroke: "currentColor", strokeWidth: 1.5, children: /* @__PURE__ */ jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M2.25 18L9 11.25l4.306 4.306a11.95 11.95 0 015.814-5.518l2.74-1.22m0 0l-5.94-2.281m5.94 2.28l-2.28 5.941" }) }),
134
+ /* @__PURE__ */ jsx("p", { className: "text-sm font-semibold text-gray-700", children: "Track live stock prices" }),
135
+ /* @__PURE__ */ jsx("p", { className: "text-xs text-gray-500 max-w-[15rem]", children: "Add a free API key to get started." }),
136
+ /* @__PURE__ */ jsx("button", { onClick: openSettings, className: "mt-1 text-xs font-medium text-white bg-blue-600 hover:bg-blue-700 rounded-lg px-3 py-1.5 transition-colors", children: "Set up" })
137
+ ] }) : symbols.length === 0 ? /* @__PURE__ */ jsx("div", { className: "text-xs text-gray-500 text-center py-6", children: "No symbols yet \u2014 add some in settings." }) : /* @__PURE__ */ jsxs("div", { className: "space-y-0.5", children: [
138
+ loading && Object.keys(quotes).length === 0 && /* @__PURE__ */ jsx("div", { className: "text-xs text-gray-400 text-center py-4", children: "Loading quotes\u2026" }),
139
+ symbols.map((sym) => {
140
+ const q = quotes[sym];
141
+ const up = (q?.change ?? 0) >= 0;
142
+ const color = !q ? "text-gray-400" : q.change > 0 ? "text-green-600" : q.change < 0 ? "text-red-600" : "text-gray-500";
143
+ return /* @__PURE__ */ jsxs("div", { className: "flex items-center justify-between px-2 py-2 border-b border-gray-200 last:border-0", children: [
144
+ /* @__PURE__ */ jsx("span", { className: "text-sm font-bold text-gray-800 tracking-tight", children: sym }),
145
+ q ? /* @__PURE__ */ jsxs("div", { className: "flex flex-col items-end leading-tight", children: [
146
+ /* @__PURE__ */ jsx("span", { className: "text-sm font-mono font-semibold text-gray-900 tabular-nums", children: fmtPrice(q.price) }),
147
+ /* @__PURE__ */ jsxs("span", { className: `text-[11px] font-medium tabular-nums ${color}`, children: [
148
+ up ? "\u25B2" : "\u25BC",
149
+ " ",
150
+ fmtSigned(q.change),
151
+ " (",
152
+ fmtSigned(q.changePct),
153
+ "%)"
154
+ ] })
155
+ ] }) : /* @__PURE__ */ jsx("span", { className: "text-sm font-mono text-gray-400 tabular-nums", children: "\u2014" })
156
+ ] }, sym);
157
+ })
158
+ ] }) })
159
+ }
160
+ ),
161
+ /* @__PURE__ */ jsxs(
162
+ WidgetSettingsModal,
163
+ {
164
+ open: settingsOpen,
165
+ onClose: () => setSettingsOpen(false),
166
+ title: "Stock Settings",
167
+ appearance: configAppearance,
168
+ onAppearanceChange: setConfigAppearance,
169
+ onSave: saveSettings,
170
+ children: [
171
+ /* @__PURE__ */ jsxs("div", { children: [
172
+ /* @__PURE__ */ jsx("h3", { className: "text-sm font-semibold text-gray-700 mb-2", children: "API Key" }),
173
+ /* @__PURE__ */ jsx(
174
+ "input",
175
+ {
176
+ value: configApiKey,
177
+ onChange: (e) => setConfigApiKey(e.target.value),
178
+ placeholder: "Finnhub API key",
179
+ className: "w-full bg-gray-50 border border-gray-200 rounded px-2 py-1.5 text-sm font-mono focus:outline-none focus:ring-1 focus:ring-blue-500"
180
+ }
181
+ ),
182
+ /* @__PURE__ */ jsxs("p", { className: "text-[11px] text-gray-400 mt-1", children: [
183
+ "Free key from ",
184
+ /* @__PURE__ */ jsx("a", { href: "https://finnhub.io/register", target: "_blank", rel: "noreferrer", className: "text-blue-600 hover:underline", children: "finnhub.io" }),
185
+ " \u2014 quotes update every minute."
186
+ ] })
187
+ ] }),
188
+ /* @__PURE__ */ jsxs("div", { children: [
189
+ /* @__PURE__ */ jsxs("h3", { className: "text-sm font-semibold text-gray-700 mb-2", children: [
190
+ "Symbols ",
191
+ /* @__PURE__ */ jsxs("span", { className: "text-[11px] font-normal text-gray-400", children: [
192
+ "(",
193
+ configSymbols.length,
194
+ "/",
195
+ MAX_SYMBOLS,
196
+ ")"
197
+ ] })
198
+ ] }),
199
+ /* @__PURE__ */ jsxs("div", { className: "space-y-1 mb-2", children: [
200
+ configSymbols.map((s, i) => /* @__PURE__ */ jsxs("div", { className: "flex items-center justify-between py-1 px-2 bg-gray-50 rounded", children: [
201
+ /* @__PURE__ */ jsx("span", { className: "text-sm font-semibold text-gray-700", children: s }),
202
+ /* @__PURE__ */ jsx("button", { onClick: () => setConfigSymbols((p) => p.filter((_, idx) => idx !== i)), className: "text-red-400 hover:text-red-600", children: "\xD7" })
203
+ ] }, i)),
204
+ configSymbols.length === 0 && /* @__PURE__ */ jsx("p", { className: "text-[11px] text-gray-400 italic", children: "No symbols \u2014 add a ticker below." })
205
+ ] }),
206
+ configSymbols.length < MAX_SYMBOLS ? /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2", children: [
207
+ /* @__PURE__ */ jsx(
208
+ "input",
209
+ {
210
+ value: newSymbol,
211
+ onChange: (e) => setNewSymbol(e.target.value),
212
+ onKeyDown: (e) => {
213
+ if (e.key === "Enter") addSymbol();
214
+ },
215
+ placeholder: "e.g. NVDA",
216
+ className: "flex-1 bg-gray-50 border border-gray-200 rounded px-2 py-1 text-sm uppercase focus:outline-none focus:ring-1 focus:ring-blue-500"
217
+ }
218
+ ),
219
+ /* @__PURE__ */ jsx("button", { onClick: addSymbol, className: "text-sm font-medium text-blue-600 hover:text-blue-800 px-2", children: "+ Add" })
220
+ ] }) : /* @__PURE__ */ jsxs("p", { className: "text-[11px] text-gray-400 italic", children: [
221
+ "Max ",
222
+ MAX_SYMBOLS,
223
+ " symbols \u2014 remove one to add another."
224
+ ] })
225
+ ] })
226
+ ]
227
+ }
228
+ )
229
+ ] });
230
+ }
231
+
232
+ export { Stock as default };
233
+ //# sourceMappingURL=Stock-ZXZOCSJD.js.map
234
+ //# sourceMappingURL=Stock-ZXZOCSJD.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/apps/Stock.tsx"],"names":[],"mappings":";;;;;;;AAeA,IAAM,WAAA,GAAc,CAAA;AACpB,IAAM,eAAA,GAAkB,CAAC,MAAA,EAAQ,MAAA,EAAQ,SAAS,MAAM,CAAA;AAExD,IAAM,WAAA,GAAc,eAAA;AACpB,IAAM,UAAA,GAAa,eAAA;AACnB,IAAM,YAAA,GAAe,kBAAA;AACrB,IAAM,SAAA,GAAY,oBAAA;AAClB,IAAM,SAAA,GAAY,GAAA;AAClB,IAAM,UAAA,GAAa,GAAA;AAMnB,SAAS,SAAA,GAAmB;AAAE,EAAA,IAAI;AAAE,IAAA,OAAO,KAAK,KAAA,CAAM,YAAA,CAAa,OAAA,CAAQ,SAAS,KAAK,I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AA,CAAiB,OAAK,CAAA,CAAE,MAAA,CAAO,CAAC,CAAA,EAAG,QAAQ,GAAA,KAAQ,CAAC,CAAC,CAAA,EAAG,SAAA,EAAU,mCAAkC,QAAA,EAAA,MAAA,EAAO;AAAA,eAAA,EAAA,EAF1H,CAGV,CACD,CAAA;AAAA,cACA,cAAc,MAAA,KAAW,CAAA,wBAAM,GAAA,EAAA,EAAE,SAAA,EAAU,oCAAmC,QAAA,EAAA,uCAAA,EAAgC;AAAA,aAAA,EACjH,CAAA;AAAA,YACC,cAAc,MAAA,GAAS,WAAA,mBACtB,IAAA,CAAC,KAAA,EAAA,EAAI,WAAU,yBAAA,EACb,QAAA,EAAA;AAAA,8BAAA,GAAA;AAAA,gBAAC,OAAA;AAAA,gBAAA;AAAA,kBAAM,KAAA,EAAO,SAAA;AAAA,kBAAW,QAAA,EAAU,CAAA,CAAA,KAAK,YAAA,CAAa,CAAA,CAAE,OAAO,KAAK,CAAA;AAAA,kBAAG,WAAW,CAAA,CAAA,KAAK;AAAE,oBAAA,IAAI,CAAA,CAAE,GAAA,KAAQ,OAAA,EAAS,SAAA,EAAU;AAAA,kBAAG,CAAA;AAAA,kBAC1H,WAAA,EAAY,WAAA;AAAA,kBAAY,SAAA,EAAU;AAAA;AAAA,eAAmI;AAAA,kCACtK,QAAA,EAAA,EAAO,OAAA,EAAS,SAAA,EAAW,SAAA,EAAU,8DAA6D,QAAA,EAAA,OAAA,EAAK;AAAA,aAAA,EAC1G,CAAA,mBAEA,IAAA,CAAC,GAAA,EAAA,EAAE,SAAA,EAAU,kCAAA,EAAmC,QAAA,EAAA;AAAA,cAAA,MAAA;AAAA,cAAK,WAAA;AAAA,cAAY;AAAA,aAAA,EAAqC;AAAA,WAAA,EAE1G;AAAA;AAAA;AAAA;AACF,GAAA,EACF,CAAA;AAEJ","file":"Stock-ZXZOCSJD.js","sourcesContent":["import { useState, useEffect, useCallback } from 'react';\nimport { useWidgetSettings } from '../shell/Modal';\nimport WidgetSettingsModal, { loadAppearance, type WidgetAppearance } from '../shell/WidgetSettingsModal';\n\n/**\n * Stock ticker widget — track a watchlist of equities with live prices.\n *\n * Quotes come from Finnhub's keyless-from-the-browser /quote endpoint, which\n * needs a (free) API key the user pastes in settings — there's no reliable\n * keyless + CORS stock feed, so \"setup\" means entering a key + picking\n * symbols. Until a key is set the widget shows a friendly call-to-action.\n */\n\n/** Cap the watchlist — keeps the widget compact and stays well within\n * Finnhub's free tier (one /quote call per symbol, polled each minute). */\nconst MAX_SYMBOLS = 8;\nconst DEFAULT_SYMBOLS = ['AAPL', 'MSFT', 'GOOGL', 'TSLA'];\n\nconst SYMBOLS_KEY = 'stock_symbols';\nconst APIKEY_KEY = 'stock_api_key';\nconst SETTINGS_KEY = 'stock_appearance';\nconst CACHE_KEY = 'stock_quotes_cache';\nconst CACHE_TTL = 60_000; // 1 min — fresh enough for a desktop ticker\nconst REFRESH_MS = 60_000;\n\ninterface Quote { price: number; change: number; changePct: number }\ntype CacheEntry = { q: Quote; ts: number };\ntype Cache = Record<string, CacheEntry>;\n\nfunction readCache(): Cache { try { return JSON.parse(localStorage.getItem(CACHE_KEY) || '{}'); } catch { return {}; } }\nfunction writeCache(c: Cache) { try { localStorage.setItem(CACHE_KEY, JSON.stringify(c)); } catch {} }\n\nfunction loadSymbols(): string[] {\n try { const s = JSON.parse(localStorage.getItem(SYMBOLS_KEY) || ''); if (Array.isArray(s) && s.length) return s.slice(0, MAX_SYMBOLS); } catch {}\n return DEFAULT_SYMBOLS;\n}\n\nconst fmtPrice = (n: number) => `$${n.toLocaleString(undefined, { minimumFractionDigits: 2, maximumFractionDigits: 2 })}`;\nconst fmtSigned = (n: number) => `${n >= 0 ? '+' : ''}${n.toFixed(2)}`;\n\nexport default function Stock() {\n const [symbols, setSymbols] = useState(loadSymbols);\n const [apiKey, setApiKey] = useState(() => { try { return localStorage.getItem(APIKEY_KEY) || ''; } catch { return ''; } });\n const [appearance, setAppearance] = useState(() => loadAppearance(SETTINGS_KEY));\n const [quotes, setQuotes] = useState<Record<string, Quote>>({});\n const [loading, setLoading] = useState(false);\n const [tick, setTick] = useState(0);\n\n const [settingsOpen, setSettingsOpen] = useState(false);\n const [configSymbols, setConfigSymbols] = useState<string[]>([]);\n const [configApiKey, setConfigApiKey] = useState('');\n const [configAppearance, setConfigAppearance] = useState<WidgetAppearance>(appearance);\n const [newSymbol, setNewSymbol] = useState('');\n\n const openSettings = useCallback(() => {\n setConfigSymbols([...symbols]);\n setConfigApiKey(apiKey);\n setConfigAppearance({ ...appearance });\n setNewSymbol('');\n setSettingsOpen(true);\n }, [symbols, apiKey, appearance]);\n\n useWidgetSettings(openSettings);\n\n // Poll on a timer so prices stay current while the widget sits on the desktop.\n useEffect(() => {\n const t = setInterval(() => setTick(n => n + 1), REFRESH_MS);\n return () => clearInterval(t);\n }, []);\n\n useEffect(() => {\n if (!apiKey || symbols.length === 0) { setQuotes({}); return; }\n let mounted = true;\n (async () => {\n setLoading(true);\n const cache = readCache();\n const next: Record<string, Quote> = {};\n await Promise.all(symbols.map(async sym => {\n const hit = cache[sym];\n if (hit && Date.now() - hit.ts < CACHE_TTL) { next[sym] = hit.q; return; }\n try {\n const res = await fetch(`https://finnhub.io/api/v1/quote?symbol=${encodeURIComponent(sym)}&token=${encodeURIComponent(apiKey)}`);\n const d = await res.json();\n if (typeof d.c === 'number' && d.c > 0) {\n const q: Quote = { price: d.c, change: d.d ?? 0, changePct: d.dp ?? 0 };\n next[sym] = q; cache[sym] = { q, ts: Date.now() };\n } else if (hit) { next[sym] = hit.q; } // unknown symbol / rate-limited → keep last good\n } catch { if (hit) next[sym] = hit.q; }\n }));\n writeCache(cache);\n if (mounted) { setQuotes(next); setLoading(false); }\n })();\n return () => { mounted = false; };\n }, [symbols.join(','), apiKey, tick]);\n\n const addSymbol = () => {\n const s = newSymbol.trim().toUpperCase();\n if (!s || configSymbols.includes(s) || configSymbols.length >= MAX_SYMBOLS) return;\n setConfigSymbols(p => [...p, s]);\n setNewSymbol('');\n };\n\n const saveSettings = () => {\n const cleaned = configSymbols.map(s => s.toUpperCase()).slice(0, MAX_SYMBOLS);\n const key = configApiKey.trim();\n setSymbols(cleaned); setApiKey(key); setAppearance(configAppearance);\n localStorage.setItem(SYMBOLS_KEY, JSON.stringify(cleaned));\n localStorage.setItem(APIKEY_KEY, key);\n localStorage.setItem(SETTINGS_KEY, JSON.stringify(configAppearance));\n setSettingsOpen(false);\n };\n\n return (\n <>\n {/* Theme-aware panel — mirrors the taskbar's `--taskbar-bg-rgb` so the\n * widget matches it across themes; gray-* classes auto-invert in dark. */}\n <div className=\"flex flex-col h-full\"\n style={{ backgroundColor: `rgb(var(--taskbar-bg-rgb, 243 244 246) / ${appearance.activeOpacity / 100})`, backdropFilter: appearance.activeBlur > 0 ? `blur(${appearance.activeBlur}px)` : undefined }}>\n <div className=\"px-4 py-3 flex-1\">\n {!apiKey ? (\n <div className=\"flex flex-col items-center justify-center text-center gap-2 py-6\">\n <svg className=\"h-8 w-8 text-gray-400\" fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\" strokeWidth={1.5}><path strokeLinecap=\"round\" strokeLinejoin=\"round\" d=\"M2.25 18L9 11.25l4.306 4.306a11.95 11.95 0 015.814-5.518l2.74-1.22m0 0l-5.94-2.281m5.94 2.28l-2.28 5.941\" /></svg>\n <p className=\"text-sm font-semibold text-gray-700\">Track live stock prices</p>\n <p className=\"text-xs text-gray-500 max-w-[15rem]\">Add a free API key to get started.</p>\n <button onClick={openSettings} className=\"mt-1 text-xs font-medium text-white bg-blue-600 hover:bg-blue-700 rounded-lg px-3 py-1.5 transition-colors\">Set up</button>\n </div>\n ) : symbols.length === 0 ? (\n <div className=\"text-xs text-gray-500 text-center py-6\">No symbols yet — add some in settings.</div>\n ) : (\n <div className=\"space-y-0.5\">\n {loading && Object.keys(quotes).length === 0 && <div className=\"text-xs text-gray-400 text-center py-4\">Loading quotes…</div>}\n {symbols.map(sym => {\n const q = quotes[sym];\n const up = (q?.change ?? 0) >= 0;\n const color = !q ? 'text-gray-400' : q.change > 0 ? 'text-green-600' : q.change < 0 ? 'text-red-600' : 'text-gray-500';\n return (\n <div key={sym} className=\"flex items-center justify-between px-2 py-2 border-b border-gray-200 last:border-0\">\n <span className=\"text-sm font-bold text-gray-800 tracking-tight\">{sym}</span>\n {q ? (\n <div className=\"flex flex-col items-end leading-tight\">\n <span className=\"text-sm font-mono font-semibold text-gray-900 tabular-nums\">{fmtPrice(q.price)}</span>\n <span className={`text-[11px] font-medium tabular-nums ${color}`}>{up ? '▲' : '▼'} {fmtSigned(q.change)} ({fmtSigned(q.changePct)}%)</span>\n </div>\n ) : (\n <span className=\"text-sm font-mono text-gray-400 tabular-nums\">—</span>\n )}\n </div>\n );\n })}\n </div>\n )}\n </div>\n </div>\n\n <WidgetSettingsModal open={settingsOpen} onClose={() => setSettingsOpen(false)} title=\"Stock Settings\"\n appearance={configAppearance} onAppearanceChange={setConfigAppearance} onSave={saveSettings}>\n <div>\n <h3 className=\"text-sm font-semibold text-gray-700 mb-2\">API Key</h3>\n <input value={configApiKey} onChange={e => setConfigApiKey(e.target.value)} placeholder=\"Finnhub API key\"\n className=\"w-full bg-gray-50 border border-gray-200 rounded px-2 py-1.5 text-sm font-mono focus:outline-none focus:ring-1 focus:ring-blue-500\" />\n <p className=\"text-[11px] text-gray-400 mt-1\">Free key from <a href=\"https://finnhub.io/register\" target=\"_blank\" rel=\"noreferrer\" className=\"text-blue-600 hover:underline\">finnhub.io</a> — quotes update every minute.</p>\n </div>\n <div>\n <h3 className=\"text-sm font-semibold text-gray-700 mb-2\">Symbols <span className=\"text-[11px] font-normal text-gray-400\">({configSymbols.length}/{MAX_SYMBOLS})</span></h3>\n <div className=\"space-y-1 mb-2\">\n {configSymbols.map((s, i) => (\n <div key={i} className=\"flex items-center justify-between py-1 px-2 bg-gray-50 rounded\">\n <span className=\"text-sm font-semibold text-gray-700\">{s}</span>\n <button onClick={() => setConfigSymbols(p => p.filter((_, idx) => idx !== i))} className=\"text-red-400 hover:text-red-600\">&times;</button>\n </div>\n ))}\n {configSymbols.length === 0 && <p className=\"text-[11px] text-gray-400 italic\">No symbols — add a ticker below.</p>}\n </div>\n {configSymbols.length < MAX_SYMBOLS ? (\n <div className=\"flex items-center gap-2\">\n <input value={newSymbol} onChange={e => setNewSymbol(e.target.value)} onKeyDown={e => { if (e.key === 'Enter') addSymbol(); }}\n placeholder=\"e.g. NVDA\" className=\"flex-1 bg-gray-50 border border-gray-200 rounded px-2 py-1 text-sm uppercase focus:outline-none focus:ring-1 focus:ring-blue-500\" />\n <button onClick={addSymbol} className=\"text-sm font-medium text-blue-600 hover:text-blue-800 px-2\">+ Add</button>\n </div>\n ) : (\n <p className=\"text-[11px] text-gray-400 italic\">Max {MAX_SYMBOLS} symbols — remove one to add another.</p>\n )}\n </div>\n </WidgetSettingsModal>\n </>\n );\n}\n"]}
@@ -63,6 +63,8 @@ declare function Chess$1(): react_jsx_runtime.JSX.Element;
63
63
 
64
64
  declare function TodoList$1(): react_jsx_runtime.JSX.Element;
65
65
 
66
+ declare function Stock$1(): react_jsx_runtime.JSX.Element;
67
+
66
68
  /**
67
69
  * World Clock widget — multi-city list. Each row pairs a tiny analogue
68
70
  * clock (minimal-style: ring, four cardinal dots, two hands) with the
@@ -109,6 +111,7 @@ declare const CurrencyConverter: react.LazyExoticComponent<typeof CurrencyConver
109
111
  declare const PomodoroTimer: react.LazyExoticComponent<typeof PomodoroTimer$1>;
110
112
  declare const Notepad: react.LazyExoticComponent<typeof Notepad$1>;
111
113
  declare const WorldClock: react.LazyExoticComponent<typeof WorldClock$1>;
114
+ declare const Stock: react.LazyExoticComponent<typeof Stock$1>;
112
115
  declare const TodoList: react.LazyExoticComponent<typeof TodoList$1>;
113
116
  declare const Chess: react.LazyExoticComponent<typeof Chess$1>;
114
117
  declare const Checkers: react.LazyExoticComponent<typeof Checkers$1>;
@@ -129,4 +132,4 @@ declare const documentApps: WindowRegistry;
129
132
  declare const webApps: WindowRegistry;
130
133
  declare const bundledApps: WindowRegistry;
131
134
 
132
- export { Browser, Calculator, Calendar, Checkers, Chess, CurrencyConverter, Documents, Email, Files, Game2048, Minesweeper, Notepad, type PdfPreviewData, type PdfPreviewHandle, PomodoroTimer, Preview, Spreadsheet, type SpreadsheetPreviewData, type SpreadsheetPreviewHandle, Sudoku, Tetris, TodoList, Weather, WorldClock, bundledApps, documentApps, gameApps, mailApps, openFilesInTrashMode, setPdfPreview, setSpreadsheetPreview, utilityApps, webApps };
135
+ export { Browser, Calculator, Calendar, Checkers, Chess, CurrencyConverter, Documents, Email, Files, Game2048, Minesweeper, Notepad, type PdfPreviewData, type PdfPreviewHandle, PomodoroTimer, Preview, Spreadsheet, type SpreadsheetPreviewData, type SpreadsheetPreviewHandle, Stock, Sudoku, Tetris, TodoList, Weather, WorldClock, bundledApps, documentApps, gameApps, mailApps, openFilesInTrashMode, setPdfPreview, setSpreadsheetPreview, utilityApps, webApps };
@@ -13,9 +13,10 @@ var Calculator = lazy(() => import('../Calculator-37EIFRDU.js'));
13
13
  var Spreadsheet = lazy(() => import('../Spreadsheet-UZMNMLZH.js'));
14
14
  var Weather = lazy(() => import('../Weather-R6ULA547.js'));
15
15
  var CurrencyConverter = lazy(() => import('../CurrencyConverter-PWX3FKRK.js'));
16
- var PomodoroTimer = lazy(() => import('../PomodoroTimer-VEYXRZWZ.js'));
16
+ var PomodoroTimer = lazy(() => import('../PomodoroTimer-YTV5Z6AC.js'));
17
17
  var Notepad = lazy(() => import('../Notepad-MXEQCIC7.js'));
18
18
  var WorldClock = lazy(() => import('../WorldClock-HHIBQXUR.js'));
19
+ var Stock = lazy(() => import('../Stock-ZXZOCSJD.js'));
19
20
  var TodoList = lazy(() => import('../TodoList-PI4SGVGI.js'));
20
21
  var Chess = lazy(() => import('../Chess-C5BY45NA.js'));
21
22
  var Checkers = lazy(() => import('../Checkers-MIAHIKJH.js'));
@@ -23,7 +24,7 @@ var Sudoku = lazy(() => import('../Sudoku-XHLYCEVT.js'));
23
24
  var Tetris = lazy(() => import('../Tetris-ZHCZYL24.js'));
24
25
  var Game2048 = lazy(() => import('../Game2048-3RH3ELRD.js'));
25
26
  var Minesweeper = lazy(() => import('../Minesweeper-N73MSPJV.js'));
26
- var Email = lazy(() => import('../Email-GTGL7CW5.js'));
27
+ var Email = lazy(() => import('../Email-ZUDCRZKB.js'));
27
28
  var Calendar = lazy(() => import('../Calendar-KCZQJ5CY.js'));
28
29
  var Preview = lazy(() => import('../Preview-VMKMY6SY.js'));
29
30
  var Documents = lazy(() => import('../Documents-W2DABIOW.js'));
@@ -37,6 +38,7 @@ var utilityApps = {
37
38
  "/currency": { component: CurrencyConverter, label: "Currency Converter", size: "sm", utility: true, widget: true, autoHeight: true, dimensions: [320, 480] },
38
39
  "/pomodoro": { component: PomodoroTimer, label: "Pomodoro Timer", size: "sm", utility: true, widget: true, dimensions: [320, 600] },
39
40
  "/world-clock": { component: WorldClock, label: "World Clock", size: "sm", utility: true, widget: true, autoHeight: true, dimensions: [320, 480] },
41
+ "/stock": { component: Stock, label: "Stocks", size: "sm", utility: true, widget: true, autoHeight: true, dimensions: [320, 360] },
40
42
  "/todo": { component: TodoList, label: "Todo List", size: "md", dimensions: [560, 640] }
41
43
  };
42
44
  var gameApps = {
@@ -67,6 +69,6 @@ var bundledApps = {
67
69
  ...webApps
68
70
  };
69
71
 
70
- export { Browser, Calculator, Calendar, Checkers, Chess, CurrencyConverter, Documents, Email, Files, Game2048, Minesweeper, Notepad, PomodoroTimer, Preview, Spreadsheet, Sudoku, Tetris, TodoList, Weather, WorldClock, bundledApps, documentApps, gameApps, mailApps, utilityApps, webApps };
72
+ export { Browser, Calculator, Calendar, Checkers, Chess, CurrencyConverter, Documents, Email, Files, Game2048, Minesweeper, Notepad, PomodoroTimer, Preview, Spreadsheet, Stock, Sudoku, Tetris, TodoList, Weather, WorldClock, bundledApps, documentApps, gameApps, mailApps, utilityApps, webApps };
71
73
  //# sourceMappingURL=index.js.map
72
74
  //# sourceMappingURL=index.js.map
@@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AM,KAAA,EAAO,QAAA,EAAU,IAAA,EAAK;AAAA,EAC1E,aAAa,EAAE,SAAA,EAAW,UAAU,KAAA,EAAO,UAAA,EAAY,MAAM,IAAA;AAC/D;AAEO,IAAM,YAAA,GAA+B;AAAA,EAC1C,UAAA,EAAY,EAAE,SAAA,EAAW,OAAA,EAAS,KAAA,EAAO,SAAA,EAAW,IAAA,EAAM,KAAA,EAAO,QAAA,EAAU,IAAA,EAAM,aAAA,EAAe,IAAA,EAAK;AAAA,EACrG,YAAA,EAAc,EAAE,SAAA,EAAW,SAAA,EAAW,KAAA,EAAO,WAAA,EAAa,IAAA,EAAM,IAAA,EAAM,QAAA,EAAU,IAAA,EAAM,aAAA,EAAe,IAAA,EAAK;AAAA,EAC1G,QAAA,EAAU,EAAE,SAAA,EAAW,KAAA,EAAO,OAAO,OAAA,EAAS,IAAA,EAAM,IAAA,EAAM,QAAA,EAAU,IAAA;AACtE;AAEO,IAAM,OAAA,GAA0B;AAAA,EACrC,UAAA,EAAY,EAAE,SAAA,EAAW,OAAA,EAAS,KAAA,EAAO,SAAA,EAAW,IAAA,EAAM,KAAA,EAAO,QAAA,EAAU,IAAA,EAAM,aAAA,EAAe,IAAA;AAClG;AAEO,IAAM,WAAA,GAA8B;AAAA,EACzC,GAAG,WAAA;AAAA,EACH,GAAG,QAAA;AAAA,EACH,GAAG,QAAA;AAAA,EACH,GAAG,YAAA;AAAA,EACH,GAAG;AACL","file":"index.js","sourcesContent":["/**\n * Bundled apps — pre-built window registry entries for the 16 apps that ship\n * with `react-os-shell`. Consumers compose them into their own registry via\n * `createWindowRegistry`:\n *\n * import { createWindowRegistry } from 'react-os-shell';\n * import { bundledApps } from 'react-os-shell/apps';\n * import { erpEntities } from './shell-config';\n *\n * const windows = createWindowRegistry(bundledApps, erpEntities);\n *\n * Subsets are also exported (`utilityApps`, `gameApps`, `mailApps`) so a\n * consumer can pick-and-choose without importing every component.\n *\n * NOTE: 3 apps require consumer-supplied persistence (Calendar / Notepad for\n * stored content, Minesweeper for leaderboard). They're exported individually\n * but absent from `bundledApps` — wire the prefs provider to opt them in.\n * WorldClock uses `useShellPrefs()` so it lives in `bundledApps`; without a\n * consumer-supplied prefs adapter the city list won't survive a reload.\n */\nimport { lazy } from 'react';\nimport type { WindowRegistry } from '../windowRegistry/types';\n\n// ── Utility apps ──\nconst Calculator = lazy(() => import('./Calculator'));\nconst Spreadsheet = lazy(() => import('./Spreadsheet'));\nconst Weather = lazy(() => import('./Weather'));\nconst CurrencyConverter = lazy(() => import('./CurrencyConverter'));\nconst PomodoroTimer = lazy(() => import('./PomodoroTimer'));\nconst Notepad = lazy(() => import('./Notepad'));\nconst WorldClock = lazy(() => import('./WorldClock'));\nconst TodoList = lazy(() => import('./TodoList'));\n\n// ── Games ──\nconst Chess = lazy(() => import('./Chess'));\nconst Checkers = lazy(() => import('./Checkers'));\nconst Sudoku = lazy(() => import('./Sudoku'));\nconst Tetris = lazy(() => import('./Tetris'));\nconst Game2048 = lazy(() => import('./Game2048'));\nconst Minesweeper = lazy(() => import('./Minesweeper'));\n\n// ── Mail / Calendar (talk to the IMAP/SMTP/CalDAV bridge server) ──\nconst Email = lazy(() => import('./Email'));\nconst Calendar = lazy(() => import('./Calendar'));\n\n// ── Document apps ──\nconst Preview = lazy(() => import('./Preview'));\nconst Documents = lazy(() => import('./Documents'));\nconst Files = lazy(() => import('./Files'));\n\n// ── Web ──\nconst Browser = lazy(() => import('./Browser'));\n\nexport const utilityApps: WindowRegistry = {\n '/calculator': { component: Calculator, label: 'Calculator', size: 'sm', allowPinOnTop: true, utility: true, widget: true, dimensions: [280, 420] },\n '/spreadsheet': { component: Spreadsheet, label: 'Spreadsheets', size: '2xl', appStyle: true, multiInstance: true },\n '/notepad': { component: Notepad, label: 'Notepad', size: 'lg', allowPinOnTop: true },\n '/weather': { component: Weather, label: 'Weather', size: 'sm', utility: true, widget: true, autoHeight: true, dimensions: [320, 400] },\n '/currency': { component: CurrencyConverter, label: 'Currency Converter', size: 'sm', utility: true, widget: true, autoHeight: true, dimensions: [320, 480] },\n '/pomodoro': { component: PomodoroTimer, label: 'Pomodoro Timer', size: 'sm', utility: true, widget: true, dimensions: [320, 600] },\n '/world-clock': { component: WorldClock, label: 'World Clock', size: 'sm', utility: true, widget: true, autoHeight: true, dimensions: [320, 480] },\n '/todo': { component: TodoList, label: 'Todo List', size: 'md', dimensions: [560, 640] },\n};\n\nexport const gameApps: WindowRegistry = {\n '/chess': { component: Chess, label: 'Chess', size: 'lg', compact: true },\n '/checkers': { component: Checkers, label: 'Checkers', size: 'lg', compact: true },\n '/sudoku': { component: Sudoku, label: 'Sudoku', size: 'sm', compact: true, dimensions: [360, 535] },\n '/tetris': { component: Tetris, label: 'Tetris', size: 'md', compact: true, dimensions: [452, 618] },\n '/2048': { component: Game2048, label: '2048', size: 'sm', compact: true },\n '/minesweeper': { component: Minesweeper, label: 'Minesweeper', size: 'sm', compact: true },\n};\n\nexport const mailApps: WindowRegistry = {\n '/email': { component: Email, label: 'Email', size: '2xl', appStyle: true },\n '/calendar': { component: Calendar, label: 'Calendar', size: 'xl' },\n};\n\nexport const documentApps: WindowRegistry = {\n '/preview': { component: Preview, label: 'Preview', size: '2xl', appStyle: true, multiInstance: true },\n '/documents': { component: Documents, label: 'Documents', size: 'xl', appStyle: true, multiInstance: true },\n '/files': { component: Files, label: 'Files', size: 'xl', appStyle: true },\n};\n\nexport const webApps: WindowRegistry = {\n '/browser': { component: Browser, label: 'Browser', size: '2xl', appStyle: true, multiInstance: true },\n};\n\nexport const bundledApps: WindowRegistry = {\n ...utilityApps,\n ...gameApps,\n ...mailApps,\n ...documentApps,\n ...webApps,\n};\n\nexport {\n Calculator,\n Spreadsheet,\n Notepad,\n Weather,\n CurrencyConverter,\n PomodoroTimer,\n WorldClock,\n TodoList,\n Chess,\n Checkers,\n Sudoku,\n Tetris,\n Game2048,\n Minesweeper,\n Email,\n Calendar,\n Preview,\n Documents,\n Files,\n Browser,\n};\n\nexport { setPdfPreview } from './Preview';\nexport { setSpreadsheetPreview } from './Spreadsheet';\nexport { openFilesInTrashMode } from './Files';\nexport type { PdfPreviewData, PdfPreviewHandle } from './Preview';\nexport type { SpreadsheetPreviewData, SpreadsheetPreviewHandle } from './Spreadsheet';\n"]}
1
+ {"version":3,"sources":["../../src/apps/index.ts"],"names":[],"mappings":";;;;;;;;;;;AAwBA,IAAM,UAAA,GAAa,IAAA,CAAK,MAAM,OAAO,2BAAc,CAAC;AACpD,IAAM,WAAA,GAAc,IAAA,CAAK,MAAM,OAAO,4BAAe,CAAC;AACtD,IAAM,OAAA,GAAU,IAAA,CAAK,MAAM,OAAO,wBAAW,CAAC;AAC9C,IAAM,iBAAA,GAAoB,IAAA,CAAK,MAAM,OAAO,kCAAqB,CAAC;AAClE,IAAM,aAAA,GAAgB,IAAA,CAAK,MAAM,OAAO,8BAAiB,CAAC;AAC1D,IAAM,OAAA,GAAU,IAAA,CAAK,MAAM,OAAO,wBAAW,CAAC;AAC9C,IAAM,UAAA,GAAa,IAAA,CAAK,MAAM,OAAO,2BAAc,CAAC;AACpD,IAAM,KAAA,GAAQ,IAAA,CAAK,MAAM,OAAO,sBAAS,CAAC;AAC1C,IAAM,QAAA,GAAW,IAAA,CAAK,MAAM,OAAO,yBAAY,CAAC;AAGhD,IAAM,KAAA,GAAQ,IAAA,CAAK,MAAM,OAAO,sBAAS,CAAC;AAC1C,IAAM,QAAA,GAAW,IAAA,CAAK,MAAM,OAAO,yBAAY,CAAC;AAChD,IAAM,MAAA,GAAS,IAAA,CAAK,MAAM,OAAO,uBAAU,CAAC;AAC5C,IAAM,MAAA,GAAS,IAAA,CAAK,MAAM,OAAO,uBAAU,CAAC;AAC5C,IAAM,QAAA,GAAW,IAAA,CAAK,MAAM,OAAO,yBAAY,CAAC;AAChD,IAAM,WAAA,GAAc,IAAA,CAAK,MAAM,OAAO,4BAAe,CAAC;AAGtD,IAAM,KAAA,GAAQ,IAAA,CAAK,MAAM,OAAO,sBAAS,CAAC;AAC1C,IAAM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,EACH,GAAG,QAAA;AAAA,EACH,GAAG,YAAA;AAAA,EACH,GAAG;AACL","file":"index.js","sourcesContent":["/**\n * Bundled apps — pre-built window registry entries for the 16 apps that ship\n * with `react-os-shell`. Consumers compose them into their own registry via\n * `createWindowRegistry`:\n *\n * import { createWindowRegistry } from 'react-os-shell';\n * import { bundledApps } from 'react-os-shell/apps';\n * import { erpEntities } from './shell-config';\n *\n * const windows = createWindowRegistry(bundledApps, erpEntities);\n *\n * Subsets are also exported (`utilityApps`, `gameApps`, `mailApps`) so a\n * consumer can pick-and-choose without importing every component.\n *\n * NOTE: 3 apps require consumer-supplied persistence (Calendar / Notepad for\n * stored content, Minesweeper for leaderboard). They're exported individually\n * but absent from `bundledApps` — wire the prefs provider to opt them in.\n * WorldClock uses `useShellPrefs()` so it lives in `bundledApps`; without a\n * consumer-supplied prefs adapter the city list won't survive a reload.\n */\nimport { lazy } from 'react';\nimport type { WindowRegistry } from '../windowRegistry/types';\n\n// ── Utility apps ──\nconst Calculator = lazy(() => import('./Calculator'));\nconst Spreadsheet = lazy(() => import('./Spreadsheet'));\nconst Weather = lazy(() => import('./Weather'));\nconst CurrencyConverter = lazy(() => import('./CurrencyConverter'));\nconst PomodoroTimer = lazy(() => import('./PomodoroTimer'));\nconst Notepad = lazy(() => import('./Notepad'));\nconst WorldClock = lazy(() => import('./WorldClock'));\nconst Stock = lazy(() => import('./Stock'));\nconst TodoList = lazy(() => import('./TodoList'));\n\n// ── Games ──\nconst Chess = lazy(() => import('./Chess'));\nconst Checkers = lazy(() => import('./Checkers'));\nconst Sudoku = lazy(() => import('./Sudoku'));\nconst Tetris = lazy(() => import('./Tetris'));\nconst Game2048 = lazy(() => import('./Game2048'));\nconst Minesweeper = lazy(() => import('./Minesweeper'));\n\n// ── Mail / Calendar (talk to the IMAP/SMTP/CalDAV bridge server) ──\nconst Email = lazy(() => import('./Email'));\nconst Calendar = lazy(() => import('./Calendar'));\n\n// ── Document apps ──\nconst Preview = lazy(() => import('./Preview'));\nconst Documents = lazy(() => import('./Documents'));\nconst Files = lazy(() => import('./Files'));\n\n// ── Web ──\nconst Browser = lazy(() => import('./Browser'));\n\nexport const utilityApps: WindowRegistry = {\n '/calculator': { component: Calculator, label: 'Calculator', size: 'sm', allowPinOnTop: true, utility: true, widget: true, dimensions: [280, 420] },\n '/spreadsheet': { component: Spreadsheet, label: 'Spreadsheets', size: '2xl', appStyle: true, multiInstance: true },\n '/notepad': { component: Notepad, label: 'Notepad', size: 'lg', allowPinOnTop: true },\n '/weather': { component: Weather, label: 'Weather', size: 'sm', utility: true, widget: true, autoHeight: true, dimensions: [320, 400] },\n '/currency': { component: CurrencyConverter, label: 'Currency Converter', size: 'sm', utility: true, widget: true, autoHeight: true, dimensions: [320, 480] },\n '/pomodoro': { component: PomodoroTimer, label: 'Pomodoro Timer', size: 'sm', utility: true, widget: true, dimensions: [320, 600] },\n '/world-clock': { component: WorldClock, label: 'World Clock', size: 'sm', utility: true, widget: true, autoHeight: true, dimensions: [320, 480] },\n '/stock': { component: Stock, label: 'Stocks', size: 'sm', utility: true, widget: true, autoHeight: true, dimensions: [320, 360] },\n '/todo': { component: TodoList, label: 'Todo List', size: 'md', dimensions: [560, 640] },\n};\n\nexport const gameApps: WindowRegistry = {\n '/chess': { component: Chess, label: 'Chess', size: 'lg', compact: true },\n '/checkers': { component: Checkers, label: 'Checkers', size: 'lg', compact: true },\n '/sudoku': { component: Sudoku, label: 'Sudoku', size: 'sm', compact: true, dimensions: [360, 535] },\n '/tetris': { component: Tetris, label: 'Tetris', size: 'md', compact: true, dimensions: [452, 618] },\n '/2048': { component: Game2048, label: '2048', size: 'sm', compact: true },\n '/minesweeper': { component: Minesweeper, label: 'Minesweeper', size: 'sm', compact: true },\n};\n\nexport const mailApps: WindowRegistry = {\n '/email': { component: Email, label: 'Email', size: '2xl', appStyle: true },\n '/calendar': { component: Calendar, label: 'Calendar', size: 'xl' },\n};\n\nexport const documentApps: WindowRegistry = {\n '/preview': { component: Preview, label: 'Preview', size: '2xl', appStyle: true, multiInstance: true },\n '/documents': { component: Documents, label: 'Documents', size: 'xl', appStyle: true, multiInstance: true },\n '/files': { component: Files, label: 'Files', size: 'xl', appStyle: true },\n};\n\nexport const webApps: WindowRegistry = {\n '/browser': { component: Browser, label: 'Browser', size: '2xl', appStyle: true, multiInstance: true },\n};\n\nexport const bundledApps: WindowRegistry = {\n ...utilityApps,\n ...gameApps,\n ...mailApps,\n ...documentApps,\n ...webApps,\n};\n\nexport {\n Calculator,\n Spreadsheet,\n Notepad,\n Weather,\n CurrencyConverter,\n PomodoroTimer,\n WorldClock,\n Stock,\n TodoList,\n Chess,\n Checkers,\n Sudoku,\n Tetris,\n Game2048,\n Minesweeper,\n Email,\n Calendar,\n Preview,\n Documents,\n Files,\n Browser,\n};\n\nexport { setPdfPreview } from './Preview';\nexport { setSpreadsheetPreview } from './Spreadsheet';\nexport { openFilesInTrashMode } from './Files';\nexport type { PdfPreviewData, PdfPreviewHandle } from './Preview';\nexport type { SpreadsheetPreviewData, SpreadsheetPreviewHandle } from './Spreadsheet';\n"]}
package/dist/index.d.ts CHANGED
@@ -622,6 +622,46 @@ interface StatusBadgeProps {
622
622
  }
623
623
  declare function StatusBadge({ status }: StatusBadgeProps): react_jsx_runtime.JSX.Element;
624
624
 
625
+ /**
626
+ * System-tray badge shown only when the app is served from a developer's own
627
+ * machine (localhost / 127.0.0.1). Drop it into the host's `taskbarTrayLeft`
628
+ * slot — it renders nothing off-localhost, so it's safe to leave wired on every
629
+ * build. Visibility is gated on the runtime hostname; see utils/env.ts.
630
+ */
631
+ declare function DevIndicator(): react_jsx_runtime.JSX.Element | null;
632
+
633
+ /**
634
+ * Dev-environment detection + browser chrome.
635
+ *
636
+ * A deployed bundle is byte-identical across hosts (CI builds once and promotes
637
+ * the same image between environments), so build-time signals like
638
+ * `import.meta.env.MODE` can't tell a developer's machine from a deployed site —
639
+ * only the runtime hostname can. `isDevEnv()` is therefore gated on
640
+ * `localhost`/`127.0.0.1`, and everything dev-only (the <DevIndicator/> tray
641
+ * badge, the `[DEV]` tab-title prefix) keys off it so it never leaks onto a
642
+ * deployed host.
643
+ */
644
+ /** Tooltip/banner copy for the dev indicator. */
645
+ declare const DEV_BANNER_TEXT = "LOCAL DEV ENVIRONMENT \u2014 running against your local backend; not connected to the live system";
646
+ /**
647
+ * True only when served from a developer's own machine.
648
+ *
649
+ * Gated on `localhost`/`127.0.0.1` only (not `*.local` mDNS names), so a
650
+ * teammate reaching a dev server over the LAN doesn't get the dev chrome.
651
+ */
652
+ declare function isDevEnv(): boolean;
653
+ /**
654
+ * Apply local-dev browser chrome: prefix the tab title with `[DEV]` and,
655
+ * optionally, swap the favicon. No-op outside localhost. Idempotent — safe to
656
+ * call at startup and again whenever a route overwrites `document.title`.
657
+ *
658
+ * Call before React mounts (e.g. in `main.tsx`) so the title is correct on the
659
+ * first paint. Pass `faviconHref` only if the host actually ships that asset.
660
+ */
661
+ declare function applyDevTitle(opts?: {
662
+ faviconHref?: string;
663
+ }): void;
664
+
625
665
  interface SavedBox {
626
666
  x: number;
627
667
  y: number;
@@ -1309,4 +1349,4 @@ declare function useNewHotkey(callback: () => void): void;
1309
1349
  */
1310
1350
  declare function useEditHotkey(callback: (() => void) | null): void;
1311
1351
 
1312
- export { ALT, ALT_SHIFT_D, ALT_SHIFT_E, ALT_SHIFT_N, BehaviorPanel, type BugReport, type BugReportConfig, BugReportConfigProvider, BugReportDetail, type BugReportExtraField, type BugReportExtraSelectField, BugReportProvider, type BugReportSubmission, type BugReportSubmitPayload, CMD_A, CMD_DOT, CMD_ENTER, CMD_K, CMD_S, CancelButton, type CellStyle, type ChangelogEntry, type ColumnDef, ConfirmProvider, CopyButton, Customization, type CustomizationOmitSection, type CustomizationProps, Desktop, type DesktopHostConfig, DesktopHostProvider, DocFavStar, ENTER, EditableGrid, type EditableGridProps, type EntityFetcher, EntityList, type EntityListColumn, type EntityListProps, GLASS_DIVIDER, GLASS_INPUT_BG, GlobalSearch, type GridColumn, HelpCenter, type HelpCenterDoc, type HelpCenterProps, Layout, type LayoutProps, ListFooter, type LoginPayload, MOD, type MailCapabilities, MailConnectModal, type MailUser, Markdown, type MarkdownProps, Modal, ModalActions, NotificationBell, type NotificationsConfig, type PaginatedResponse, PopupMenu, PopupMenuDivider, PopupMenuItem, PopupMenuLabel, type ReportType, ResizableTable, SHIFT, type SearchConfig, type SearchProvider, type SearchResult, type SemanticGroup, type ShellAuth, ShellAuthProvider, ShellEntityFetcherProvider, type ShellNotification, type ShellPrefsAdapter, ShellPrefsProvider, ShortcutHelp, type SortState, SoundsPanel, StartMenu, StatusBadge, StatusBadgeProvider, type StickyEntityRef, type StickyResolver, SystemPreferences, type SystemPreferencesProps, type SystemPreferencesSection, VERSION, WidgetManager, WindowManagerProvider, WindowRegistry, WindowTitle, commitExposeHighlight, confirm, confirmDestructive, createWindowRegistry, exitExposeMode, formatDate, getActiveWindowRoute, getExposeHighlight, getWindowPosition, glassStyle, isMac, openBugReportDialog, prompt, reportBug, setExposeHighlight, setShellApiClient, setShellAuthBridge, setShellMailServer, setShellNavIcons, setWindowDefaultPosition, setWindowPosition, subscribeExposeHighlight, toast, toggleExposeMode, useBugReport, useClickOutside, useColumnConfig, useDesktopHost, useEditHotkey, useInfiniteScroll, useLocalStoragePrefs, useMailAuth, useModalActive, useNewHotkey, useShellAuth, useShellEntityFetcher, useShellPrefs, useSort, useTableNav, useWidgetSettings, useWindowManager, useWindowMenuItem, useWindowTitle };
1352
+ export { ALT, ALT_SHIFT_D, ALT_SHIFT_E, ALT_SHIFT_N, BehaviorPanel, type BugReport, type BugReportConfig, BugReportConfigProvider, BugReportDetail, type BugReportExtraField, type BugReportExtraSelectField, BugReportProvider, type BugReportSubmission, type BugReportSubmitPayload, CMD_A, CMD_DOT, CMD_ENTER, CMD_K, CMD_S, CancelButton, type CellStyle, type ChangelogEntry, type ColumnDef, ConfirmProvider, CopyButton, Customization, type CustomizationOmitSection, type CustomizationProps, DEV_BANNER_TEXT, Desktop, type DesktopHostConfig, DesktopHostProvider, DevIndicator, DocFavStar, ENTER, EditableGrid, type EditableGridProps, type EntityFetcher, EntityList, type EntityListColumn, type EntityListProps, GLASS_DIVIDER, GLASS_INPUT_BG, GlobalSearch, type GridColumn, HelpCenter, type HelpCenterDoc, type HelpCenterProps, Layout, type LayoutProps, ListFooter, type LoginPayload, MOD, type MailCapabilities, MailConnectModal, type MailUser, Markdown, type MarkdownProps, Modal, ModalActions, NotificationBell, type NotificationsConfig, type PaginatedResponse, PopupMenu, PopupMenuDivider, PopupMenuItem, PopupMenuLabel, type ReportType, ResizableTable, SHIFT, type SearchConfig, type SearchProvider, type SearchResult, type SemanticGroup, type ShellAuth, ShellAuthProvider, ShellEntityFetcherProvider, type ShellNotification, type ShellPrefsAdapter, ShellPrefsProvider, ShortcutHelp, type SortState, SoundsPanel, StartMenu, StatusBadge, StatusBadgeProvider, type StickyEntityRef, type StickyResolver, SystemPreferences, type SystemPreferencesProps, type SystemPreferencesSection, VERSION, WidgetManager, WindowManagerProvider, WindowRegistry, WindowTitle, applyDevTitle, commitExposeHighlight, confirm, confirmDestructive, createWindowRegistry, exitExposeMode, formatDate, getActiveWindowRoute, getExposeHighlight, getWindowPosition, glassStyle, isDevEnv, isMac, openBugReportDialog, prompt, reportBug, setExposeHighlight, setShellApiClient, setShellAuthBridge, setShellMailServer, setShellNavIcons, setWindowDefaultPosition, setWindowPosition, subscribeExposeHighlight, toast, toggleExposeMode, useBugReport, useClickOutside, useColumnConfig, useDesktopHost, useEditHotkey, useInfiniteScroll, useLocalStoragePrefs, useMailAuth, useModalActive, useNewHotkey, useShellAuth, useShellEntityFetcher, useShellPrefs, useSort, useTableNav, useWidgetSettings, useWindowManager, useWindowMenuItem, useWindowTitle };
package/dist/index.js CHANGED
@@ -1,8 +1,8 @@
1
1
  import { useEmailUnreadCount } from './chunk-PDFQNHW7.js';
2
- import { formatDate } from './chunk-NSU7OHPC.js';
3
- export { formatDate } from './chunk-NSU7OHPC.js';
4
2
  import { useMailAuth } from './chunk-VBFB3ZIN.js';
5
3
  export { setShellMailServer, useMailAuth } from './chunk-VBFB3ZIN.js';
4
+ import { formatDate } from './chunk-NSU7OHPC.js';
5
+ export { formatDate } from './chunk-NSU7OHPC.js';
6
6
  import { subscribePomo, getPomoSnapshot } from './chunk-MK3HLUO4.js';
7
7
  import { useShellPrefs } from './chunk-36VM54SC.js';
8
8
  export { ShellPrefsProvider, useLocalStoragePrefs, useShellPrefs } from './chunk-36VM54SC.js';
@@ -1219,6 +1219,37 @@ function StatusBadge({ status }) {
1219
1219
  const label = status.replace(/_/g, " ").replace(/\b\w/g, (c) => c.toUpperCase());
1220
1220
  return /* @__PURE__ */ jsx("span", { className: `inline-flex items-center rounded-full px-2.5 py-0.5 text-xs font-medium ${color}`, children: label });
1221
1221
  }
1222
+
1223
+ // src/utils/env.ts
1224
+ var DEV_BANNER_TEXT = "LOCAL DEV ENVIRONMENT \u2014 running against your local backend; not connected to the live system";
1225
+ function isDevEnv() {
1226
+ const host = window.location.hostname;
1227
+ return host === "localhost" || host === "127.0.0.1";
1228
+ }
1229
+ function applyDevTitle(opts) {
1230
+ if (!isDevEnv()) return;
1231
+ if (!document.title.startsWith("[DEV]")) {
1232
+ document.title = `[DEV] ${document.title}`;
1233
+ }
1234
+ if (opts?.faviconHref) {
1235
+ const icon = document.querySelector('link[rel="icon"]');
1236
+ if (icon) icon.href = opts.faviconHref;
1237
+ }
1238
+ }
1239
+ function DevIndicator() {
1240
+ if (!isDevEnv()) return null;
1241
+ return /* @__PURE__ */ jsxs(
1242
+ "div",
1243
+ {
1244
+ className: "shrink-0 inline-flex items-center gap-1 rounded-md bg-blue-600 px-1.5 py-0.5 text-[10px] font-semibold uppercase tracking-wide text-blue-50 select-none",
1245
+ title: DEV_BANNER_TEXT,
1246
+ children: [
1247
+ /* @__PURE__ */ jsx("svg", { className: "h-3 w-3 shrink-0", fill: "none", viewBox: "0 0 24 24", stroke: "currentColor", strokeWidth: 2.5, children: /* @__PURE__ */ jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M10 20l4-16m4 4l4 4-4 4M6 16l-4-4 4-4" }) }),
1248
+ /* @__PURE__ */ jsx("span", { children: "Dev" })
1249
+ ]
1250
+ }
1251
+ );
1252
+ }
1222
1253
  function FallbackIcon() {
1223
1254
  return /* @__PURE__ */ jsxs("svg", { className: "h-5 w-5", fill: "none", viewBox: "0 0 24 24", stroke: "currentColor", strokeWidth: 1.5, children: [
1224
1255
  /* @__PURE__ */ jsx("rect", { x: "3.5", y: "3.5", width: "7", height: "7", rx: "1.5" }),
@@ -1371,7 +1402,7 @@ function WidgetManager({ open, onClose }) {
1371
1402
  }
1372
1403
 
1373
1404
  // src/version.ts
1374
- var VERSION = "0.7.1" ;
1405
+ var VERSION = "0.7.3" ;
1375
1406
  var APP_VERSION = VERSION;
1376
1407
 
1377
1408
  // src/changelog.ts
@@ -3289,19 +3320,17 @@ function LogoutAnimation({ onComplete, subtitle }) {
3289
3320
  const [phase, setPhase] = useState("show");
3290
3321
  useEffect(() => {
3291
3322
  playLogout();
3292
- const t1 = setTimeout(() => setPhase("shrink"), 800);
3293
- const t2 = setTimeout(() => setPhase("fade"), 1800);
3294
- const t3 = setTimeout(onComplete, 2300);
3323
+ const t1 = setTimeout(() => setPhase("out"), 800);
3324
+ const t2 = setTimeout(onComplete, 2300);
3295
3325
  return () => {
3296
3326
  clearTimeout(t1);
3297
3327
  clearTimeout(t2);
3298
- clearTimeout(t3);
3299
3328
  };
3300
3329
  }, [onComplete]);
3301
3330
  return /* @__PURE__ */ jsxs(
3302
3331
  "div",
3303
3332
  {
3304
- className: `fixed inset-0 z-[9999] flex flex-col items-center justify-center transition-opacity duration-500 ${phase === "fade" ? "opacity-0" : "opacity-100"}`,
3333
+ className: "fixed inset-0 z-[9999] flex flex-col items-center justify-center",
3305
3334
  style: { background: "linear-gradient(135deg, #0f0c29 0%, #302b63 50%, #24243e 100%)" },
3306
3335
  children: [
3307
3336
  /* @__PURE__ */ jsx("div", { className: "absolute inset-0 overflow-hidden", children: /* @__PURE__ */ jsx(
@@ -3311,7 +3340,7 @@ function LogoutAnimation({ onComplete, subtitle }) {
3311
3340
  style: {
3312
3341
  background: "radial-gradient(circle, rgba(124,58,237,0.4) 0%, transparent 70%)",
3313
3342
  animation: "logout-glow 2s ease-in-out infinite",
3314
- opacity: phase === "shrink" ? 0 : 0.2,
3343
+ opacity: phase === "show" ? 0.2 : 0,
3315
3344
  transition: "opacity 1s"
3316
3345
  }
3317
3346
  }
@@ -3319,8 +3348,8 @@ function LogoutAnimation({ onComplete, subtitle }) {
3319
3348
  /* @__PURE__ */ jsx(
3320
3349
  "div",
3321
3350
  {
3322
- className: `relative transition-all duration-1000 ease-in ${phase === "shrink" ? "scale-0 opacity-0" : "scale-100 opacity-100"}`,
3323
- style: phase === "shrink" ? { transform: "scale(0) rotate(180deg)" } : void 0,
3351
+ className: `relative transition-all duration-1000 ease-in ${phase === "out" ? "scale-0 opacity-0" : "scale-100 opacity-100"}`,
3352
+ style: phase === "out" ? { transform: "scale(0) rotate(180deg)" } : void 0,
3324
3353
  children: /* @__PURE__ */ jsx("img", { src: "/favicon.svg", alt: "", className: "h-20 w-20 drop-shadow-[0_0_30px_rgba(124,58,237,0.5)]" })
3325
3354
  }
3326
3355
  ),
@@ -6603,6 +6632,6 @@ function useEditHotkey(callback) {
6603
6632
  }, [callback, isActive]);
6604
6633
  }
6605
6634
 
6606
- export { ALT, ALT_SHIFT_D, ALT_SHIFT_E, ALT_SHIFT_N, BehaviorPanel, BugReportConfigProvider, BugReportDetail, BugReportProvider, CMD_A, CMD_DOT, CMD_ENTER, CMD_K, CMD_S, Customization, Desktop, DesktopHostProvider, ENTER, EntityList, GlobalSearch, HelpCenter, Layout, ListFooter, MOD, MailConnectModal, Markdown, NotificationBell, ResizableTable, SHIFT, ShellEntityFetcherProvider, ShortcutHelp, SoundsPanel, StartMenu, StatusBadge, StatusBadgeProvider, SystemPreferences, VERSION, WidgetManager, createWindowRegistry, isMac, openBugReportDialog, reportBug, useBugReport, useClickOutside, useColumnConfig, useDesktopHost, useEditHotkey, useInfiniteScroll, useNewHotkey, useShellEntityFetcher, useSort, useTableNav };
6635
+ export { ALT, ALT_SHIFT_D, ALT_SHIFT_E, ALT_SHIFT_N, BehaviorPanel, BugReportConfigProvider, BugReportDetail, BugReportProvider, CMD_A, CMD_DOT, CMD_ENTER, CMD_K, CMD_S, Customization, DEV_BANNER_TEXT, Desktop, DesktopHostProvider, DevIndicator, ENTER, EntityList, GlobalSearch, HelpCenter, Layout, ListFooter, MOD, MailConnectModal, Markdown, NotificationBell, ResizableTable, SHIFT, ShellEntityFetcherProvider, ShortcutHelp, SoundsPanel, StartMenu, StatusBadge, StatusBadgeProvider, SystemPreferences, VERSION, WidgetManager, applyDevTitle, createWindowRegistry, isDevEnv, isMac, openBugReportDialog, reportBug, useBugReport, useClickOutside, useColumnConfig, useDesktopHost, useEditHotkey, useInfiniteScroll, useNewHotkey, useShellEntityFetcher, useSort, useTableNav };
6607
6636
  //# sourceMappingURL=index.js.map
6608
6637
  //# sourceMappingURL=index.js.map