efficient-shell 4.134.0 → 4.137.1
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.
- package/LICENSE +6 -17
- package/README.md +84 -8
- package/dist/Browser-ZX5OTOKK.js +43 -0
- package/dist/Calculator-4SQGOQFQ.js +29 -0
- package/dist/ConfirmDialog-NPKW2XHM.js +1 -0
- package/dist/CurrencyConverter-2KOM7L6V.js +21 -0
- package/dist/Documents-IZTIQYPG.js +52 -0
- package/dist/Files-B63KKXGZ.js +89 -0
- package/dist/Notepad-WA77V45J.js +25 -0
- package/dist/PdfViewer-RBRGEKWF.js +1 -0
- package/dist/PomodoroTimer-SDUBKXUS.js +99 -0
- package/dist/Preview-D4KOA4OI.js +187 -0
- package/dist/Sidebar-Y57LYXXI.js +23 -0
- package/dist/Spreadsheet-JX5E6WH6.js +37 -0
- package/dist/Stock-XAQ5WMUZ.js +16 -0
- package/dist/Weather-HLAGJ5LV.js +60 -0
- package/dist/WorldClock-IRI4VCTA.js +32 -0
- package/dist/apps/index.js +1 -151
- package/dist/brand.css +1 -1
- package/dist/chunk-3A46NCXK.js +29 -0
- package/dist/chunk-44UO7FYU.js +11 -0
- package/dist/chunk-466CM2TJ.js +1 -0
- package/dist/chunk-57MIENLJ.js +1 -0
- package/dist/chunk-5CRAF2AD.js +2 -0
- package/dist/chunk-A2OQLLYK.js +6 -0
- package/dist/chunk-B43AGQET.js +4 -0
- package/dist/chunk-BR22X7E5.js +1 -0
- package/dist/chunk-BUTSU7FO.js +1 -0
- package/dist/chunk-D65T4H6J.js +1 -0
- package/dist/chunk-ESL5TDNA.js +1 -0
- package/dist/chunk-FBDZGO3V.js +1 -0
- package/dist/chunk-FHTLC7HH.js +1 -0
- package/dist/chunk-FQLMX3IE.js +948 -0
- package/dist/chunk-H562R4GX.js +34 -0
- package/dist/chunk-JN4WXTWJ.js +106 -0
- package/dist/chunk-LVDRBRYU.js +1 -0
- package/dist/chunk-LWLCNQY7.js +1 -0
- package/dist/chunk-MAIHBBWT.js +1 -0
- package/dist/chunk-NPJH5MD7.js +13 -0
- package/dist/chunk-OCSOMMY2.js +1 -0
- package/dist/chunk-OQDWLHZI.js +1 -0
- package/dist/chunk-OWSAMA3I.js +23 -0
- package/dist/chunk-PH3PRIFP.js +5 -0
- package/dist/chunk-TAWKWSPN.js +9 -0
- package/dist/chunk-U4GTZPXP.js +1 -0
- package/dist/chunk-UB4JIOLD.js +2 -0
- package/dist/chunk-UZAJ5BF6.js +9 -0
- package/dist/chunk-VEGMDXT4.js +1 -0
- package/dist/chunk-VTVSMRFX.js +1 -0
- package/dist/chunk-VVAGSKW7.js +1 -0
- package/dist/chunk-XO43FJRM.js +19 -0
- package/dist/chunk-Y7BOLDRM.js +69 -0
- package/dist/file-intake/index.js +1 -4
- package/dist/{index-DZ7E7bCl.d.ts → index-DVI9DMSu.d.ts} +189 -18
- package/dist/index.d.ts +2 -2
- package/dist/index.js +639 -7473
- package/dist/map/index.js +20 -540
- package/dist/markdown/index.js +6 -184
- package/dist/markup/index.js +1 -135
- package/dist/page-tabs/index.js +21 -709
- package/dist/sounds-OMHXVVQ4.js +1 -0
- package/dist/ui/index.d.ts +1 -1
- package/dist/ui/index.js +1 -19
- package/dist/ui.css +78 -10
- package/package.json +4 -3
- package/dist/Browser-O3QZGUF2.js +0 -482
- package/dist/Browser-O3QZGUF2.js.map +0 -1
- package/dist/Calculator-L6N5X3KU.js +0 -192
- package/dist/Calculator-L6N5X3KU.js.map +0 -1
- package/dist/ConfirmDialog-LYSSZSUD.js +0 -4
- package/dist/ConfirmDialog-LYSSZSUD.js.map +0 -1
- package/dist/CurrencyConverter-64MKXB3D.js +0 -236
- package/dist/CurrencyConverter-64MKXB3D.js.map +0 -1
- package/dist/Documents-5WXXYCLI.js +0 -441
- package/dist/Documents-5WXXYCLI.js.map +0 -1
- package/dist/Files-AUURUUDN.js +0 -805
- package/dist/Files-AUURUUDN.js.map +0 -1
- package/dist/Notepad-GPXJVPB7.js +0 -410
- package/dist/Notepad-GPXJVPB7.js.map +0 -1
- package/dist/PdfViewer-HKO6P4SR.js +0 -5
- package/dist/PdfViewer-HKO6P4SR.js.map +0 -1
- package/dist/PomodoroTimer-4TQBWLP2.js +0 -633
- package/dist/PomodoroTimer-4TQBWLP2.js.map +0 -1
- package/dist/Preview-FOZYPKM2.js +0 -2959
- package/dist/Preview-FOZYPKM2.js.map +0 -1
- package/dist/Sidebar-BPU7RCZP.js +0 -291
- package/dist/Sidebar-BPU7RCZP.js.map +0 -1
- package/dist/Spreadsheet-3C66BBBF.js +0 -519
- package/dist/Spreadsheet-3C66BBBF.js.map +0 -1
- package/dist/Stock-IF4IHYLU.js +0 -158
- package/dist/Stock-IF4IHYLU.js.map +0 -1
- package/dist/Weather-725PFR7T.js +0 -431
- package/dist/Weather-725PFR7T.js.map +0 -1
- package/dist/WorldClock-UU4NZIQ7.js +0 -202
- package/dist/WorldClock-UU4NZIQ7.js.map +0 -1
- package/dist/apps/index.js.map +0 -1
- package/dist/chunk-2TPTHAKI.js +0 -316
- package/dist/chunk-2TPTHAKI.js.map +0 -1
- package/dist/chunk-4P44JXDS.js +0 -195
- package/dist/chunk-4P44JXDS.js.map +0 -1
- package/dist/chunk-5O42JXQE.js +0 -26
- package/dist/chunk-5O42JXQE.js.map +0 -1
- package/dist/chunk-72CQWN7O.js +0 -547
- package/dist/chunk-72CQWN7O.js.map +0 -1
- package/dist/chunk-7CCHEEYC.js +0 -94
- package/dist/chunk-7CCHEEYC.js.map +0 -1
- package/dist/chunk-BE7FZOFU.js +0 -17
- package/dist/chunk-BE7FZOFU.js.map +0 -1
- package/dist/chunk-D276EMXS.js +0 -57
- package/dist/chunk-D276EMXS.js.map +0 -1
- package/dist/chunk-D7PYW2QS.js +0 -265
- package/dist/chunk-D7PYW2QS.js.map +0 -1
- package/dist/chunk-DVZWYWSD.js +0 -26
- package/dist/chunk-DVZWYWSD.js.map +0 -1
- package/dist/chunk-ET6ID4LP.js +0 -102
- package/dist/chunk-ET6ID4LP.js.map +0 -1
- package/dist/chunk-GA35NEND.js +0 -56
- package/dist/chunk-GA35NEND.js.map +0 -1
- package/dist/chunk-GIGV2ZRW.js +0 -70
- package/dist/chunk-GIGV2ZRW.js.map +0 -1
- package/dist/chunk-IPXN646P.js +0 -14
- package/dist/chunk-IPXN646P.js.map +0 -1
- package/dist/chunk-IRWSRJ4K.js +0 -48
- package/dist/chunk-IRWSRJ4K.js.map +0 -1
- package/dist/chunk-IULP5BCD.js +0 -79
- package/dist/chunk-IULP5BCD.js.map +0 -1
- package/dist/chunk-MGGY74RY.js +0 -14
- package/dist/chunk-MGGY74RY.js.map +0 -1
- package/dist/chunk-OLJDJYSU.js +0 -13678
- package/dist/chunk-OLJDJYSU.js.map +0 -1
- package/dist/chunk-PIGDNN5F.js +0 -46
- package/dist/chunk-PIGDNN5F.js.map +0 -1
- package/dist/chunk-Q2MJVSJT.js +0 -7
- package/dist/chunk-Q2MJVSJT.js.map +0 -1
- package/dist/chunk-Q3LT745N.js +0 -3710
- package/dist/chunk-Q3LT745N.js.map +0 -1
- package/dist/chunk-QAGQRNKI.js +0 -145
- package/dist/chunk-QAGQRNKI.js.map +0 -1
- package/dist/chunk-QRL64J5F.js +0 -503
- package/dist/chunk-QRL64J5F.js.map +0 -1
- package/dist/chunk-QSKCQUZE.js +0 -1103
- package/dist/chunk-QSKCQUZE.js.map +0 -1
- package/dist/chunk-R4OQIQYX.js +0 -153
- package/dist/chunk-R4OQIQYX.js.map +0 -1
- package/dist/chunk-RT6DSB5Y.js +0 -143
- package/dist/chunk-RT6DSB5Y.js.map +0 -1
- package/dist/chunk-SHQM5CK3.js +0 -549
- package/dist/chunk-SHQM5CK3.js.map +0 -1
- package/dist/chunk-T4VQHMG4.js +0 -822
- package/dist/chunk-T4VQHMG4.js.map +0 -1
- package/dist/chunk-TRCWINHF.js +0 -105
- package/dist/chunk-TRCWINHF.js.map +0 -1
- package/dist/chunk-TW7LPMVR.js +0 -16
- package/dist/chunk-TW7LPMVR.js.map +0 -1
- package/dist/chunk-W622KQTD.js +0 -465
- package/dist/chunk-W622KQTD.js.map +0 -1
- package/dist/chunk-X4Q6G253.js +0 -416
- package/dist/chunk-X4Q6G253.js.map +0 -1
- package/dist/chunk-YNKK7NE3.js +0 -171
- package/dist/chunk-YNKK7NE3.js.map +0 -1
- package/dist/chunk-YPO6RDMX.js +0 -20
- package/dist/chunk-YPO6RDMX.js.map +0 -1
- package/dist/file-intake/index.js.map +0 -1
- package/dist/index.js.map +0 -1
- package/dist/map/index.js.map +0 -1
- package/dist/markdown/index.js.map +0 -1
- package/dist/markup/index.js.map +0 -1
- package/dist/page-tabs/index.js.map +0 -1
- package/dist/sounds-NT4DEZGD.js +0 -3
- package/dist/sounds-NT4DEZGD.js.map +0 -1
- package/dist/ui/index.js.map +0 -1
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/shell/Breadcrumbs.tsx"],"names":[],"mappings":";;;;AAmDA,IAAM,iBAAA,mBACJ,GAAA,CAAC,KAAA,EAAA,EAAI,SAAA,EAAU,oCAAA,EAAqC,SAAQ,WAAA,EAAY,IAAA,EAAK,cAAA,EAAe,aAAA,EAAW,IAAA,EACrG,QAAA,kBAAA,GAAA;AAAA,EAAC,MAAA;AAAA,EAAA;AAAA,IACC,QAAA,EAAS,SAAA;AAAA,IACT,CAAA,EAAE,4IAAA;AAAA,IACF,QAAA,EAAS;AAAA;AACX,CAAA,EACF,CAAA;AAIF,IAAM,UAAA,GACJ,qOAAA;AAKa,SAAR,YAA6B,EAAE,KAAA,EAAO,WAAW,QAAA,GAAW,CAAA,EAAG,WAAU,EAAqB;AACnG,EAAA,MAAM,OAAA,GAAU,iBAAgB,CAAE,WAAA;AAClC,EAAA,IAAI,KAAA,CAAM,MAAA,KAAW,CAAA,EAAG,OAAO,IAAA;AAC/B,EAAA,MAAM,MAAM,SAAA,IAAa,iBAAA;AAGzB,EAAA,MAAM,SAAkB,EAAC;AACzB,EAAA,MAAM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ACC,IAAA,EAAK,QAAA;AAAA,QACL,OAAA,EAAS,MAAM,IAAA,CAAK,OAAA;AAAA,QACpB,SAAA,EAAW,UAAA;AAAA,QAEV,QAAA,EAAA;AAAA,UAAA,KAAA,CAAM,IAAA,CAAK,IAAA;AAAA,8BACX,MAAA,EAAA,EAAK,SAAA,EAAU,UAAA,EAAY,QAAA,EAAA,KAAA,CAAM,KAAK,KAAA,EAAM;AAAA;AAAA;AAAA,KAC/C,EAEJ;AAAA,GAAA,EAAA,EAlCa,CAmCf,CACD,CAAA,EACH,CAAA,EACF,CAAA;AAEJ","file":"chunk-GIGV2ZRW.js","sourcesContent":["import { Fragment } from 'react';\nimport type { MouseEvent, ReactNode } from 'react';\nimport { useShellStrings } from './strings';\n\n/**\n * Generic breadcrumb trail. Self-contained and styled with the same Tailwind\n * utilities the shell already ships, so consumers get it for free.\n *\n * Pass an ordered list of `items` from root → current. Every crumb except the\n * last renders as a button when it has an `onClick`; the last crumb is treated\n * as the current location — rendered inert with `aria-current=\"page\"`. When the\n * trail is long, set `maxItems` to collapse the middle into an ellipsis\n * (`first … last-n` ), keeping the first and the tail visible.\n */\nexport interface BreadcrumbItem {\n /** Visible label. */\n label: ReactNode;\n /** Optional leading icon (typically a 3.5×3.5 svg). */\n icon?: ReactNode;\n /**\n * Navigate to this crumb. Omitted on the current (last) crumb.\n *\n * Receives the event, which is what makes `href` usable from a routed app:\n * the handler calls `preventDefault()` on a plain click and hands the\n * navigation to its router, while ctrl/middle/right clicks fall through to\n * the browser untouched. Without the argument an anchor could only ever do a\n * full page load, which is the thing a single-page app is avoiding.\n */\n onClick?: (event: MouseEvent<HTMLAnchorElement | HTMLButtonElement>) => void;\n /**\n * Where this crumb goes, when it is a real destination.\n *\n * A routed app needs this rather than `onClick` alone: an `<a href>` can be\n * middle-clicked into a new tab, copied, and read off the status bar before\n * committing to it — none of which a button offers, however well it behaves\n * once pressed. Given both, the anchor still calls `onClick`, so a client-side\n * router can intercept the plain-click case and leave the rest to the browser.\n */\n href?: string;\n}\n\nexport interface BreadcrumbsProps {\n items: BreadcrumbItem[];\n /** Node rendered between crumbs. Defaults to a chevron. */\n separator?: ReactNode;\n /** Collapse the middle to an ellipsis when there are more than this many\n * crumbs. `0` (default) never collapses. */\n maxItems?: number;\n className?: string;\n}\n\nconst DEFAULT_SEPARATOR = (\n <svg className=\"h-3.5 w-3.5 shrink-0 text-gray-300\" viewBox=\"0 0 20 20\" fill=\"currentColor\" aria-hidden>\n <path\n fillRule=\"evenodd\"\n d=\"M7.21 14.77a.75.75 0 0 1 .02-1.06L11.168 10 7.23 6.29a.75.75 0 1 1 1.04-1.08l4.5 4.25a.75.75 0 0 1 0 1.08l-4.5 4.25a.75.75 0 0 1-1.06-.02Z\"\n clipRule=\"evenodd\"\n />\n </svg>\n);\n\n/** Shared by the anchor and the button forms so the two cannot drift apart. */\nconst CRUMB_LINK =\n 'inline-flex min-w-0 items-center gap-1 truncate rounded px-1 -mx-1 text-gray-500 ' +\n 'transition-colors hover:text-gray-900 hover:underline rosh-focus-ring focus-visible:ring-2 focus-visible:ring-[color:var(--rosh-focus-ring-solid)]';\n\ntype Crumb = { kind: 'item'; item: BreadcrumbItem; isLast: boolean } | { kind: 'ellipsis' };\n\nexport default function Breadcrumbs({ items, separator, maxItems = 0, className }: BreadcrumbsProps) {\n const strings = useShellStrings().breadcrumbs;\n if (items.length === 0) return null;\n const sep = separator ?? DEFAULT_SEPARATOR;\n\n // Build the display list, collapsing the middle if `maxItems` is exceeded.\n const crumbs: Crumb[] = [];\n const lastIndex = items.length - 1;\n if (maxItems > 0 && items.length > maxItems && maxItems >= 2) {\n const tailCount = Math.max(1, maxItems - 1); // keep the first + this many from the end\n crumbs.push({ kind: 'item', item: items[0], isLast: false });\n crumbs.push({ kind: 'ellipsis' });\n for (let i = items.length - tailCount; i <= lastIndex; i++) {\n crumbs.push({ kind: 'item', item: items[i], isLast: i === lastIndex });\n }\n } else {\n items.forEach((item, i) => crumbs.push({ kind: 'item', item, isLast: i === lastIndex }));\n }\n\n return (\n <nav aria-label={strings.label} className={`min-w-0 ${className ?? ''}`}>\n <ol className=\"flex items-center gap-1.5 text-sm\">\n {crumbs.map((crumb, i) => (\n <Fragment key={i}>\n {i > 0 && <li aria-hidden className=\"flex items-center\">{sep}</li>}\n <li className=\"flex min-w-0 items-center\">\n {crumb.kind === 'ellipsis' ? (\n <span className=\"px-0.5 text-gray-400 select-none\" aria-label={strings.hidden}>…</span>\n ) : crumb.isLast || !(crumb.item.href || crumb.item.onClick) ? (\n <span\n aria-current={crumb.isLast ? 'page' : undefined}\n className={`inline-flex min-w-0 items-center gap-1 truncate ${\n crumb.isLast ? 'font-medium text-gray-900' : 'text-gray-500'\n }`}\n >\n {crumb.item.icon}\n <span className=\"truncate\">{crumb.item.label}</span>\n </span>\n ) : crumb.item.href ? (\n <a\n href={crumb.item.href}\n onClick={crumb.item.onClick}\n className={CRUMB_LINK}\n >\n {crumb.item.icon}\n <span className=\"truncate\">{crumb.item.label}</span>\n </a>\n ) : (\n <button\n type=\"button\"\n onClick={crumb.item.onClick}\n className={CRUMB_LINK}\n >\n {crumb.item.icon}\n <span className=\"truncate\">{crumb.item.label}</span>\n </button>\n )}\n </li>\n </Fragment>\n ))}\n </ol>\n </nav>\n );\n}\n"]}
|
package/dist/chunk-IPXN646P.js
DELETED
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
// src/utils/rootTheme.ts
|
|
2
|
-
function rootIsDark() {
|
|
3
|
-
try {
|
|
4
|
-
const root = document.documentElement;
|
|
5
|
-
return root.getAttribute("data-theme") === "dark" || root.classList.contains("dark");
|
|
6
|
-
} catch {
|
|
7
|
-
return false;
|
|
8
|
-
}
|
|
9
|
-
}
|
|
10
|
-
var ROOT_THEME_ATTRIBUTES = ["data-theme", "class"];
|
|
11
|
-
|
|
12
|
-
export { ROOT_THEME_ATTRIBUTES, rootIsDark };
|
|
13
|
-
//# sourceMappingURL=chunk-IPXN646P.js.map
|
|
14
|
-
//# sourceMappingURL=chunk-IPXN646P.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/utils/rootTheme.ts"],"names":[],"mappings":";AAYO,SAAS,UAAA,GAAsB;AACpC,EAAA,IAAI;AACF,IAAA,MAAM,OAAO,QAAA,CAAS,eAAA;AACtB,IAAA,OAAO,IAAA,CAAK,aAAa,YAAY,CAAA,KAAM,UAAU,IAAA,CAAK,SAAA,CAAU,SAAS,MAAM,CAAA;AAAA,EACrF,CAAA,CAAA,MAAQ;AACN,IAAA,OAAO,KAAA;AAAA,EACT;AACF;AAGO,IAAM,qBAAA,GAAwB,CAAC,YAAA,EAAc,OAAO","file":"chunk-IPXN646P.js","sourcesContent":["/**\n * Whether the document is in its dark theme, read off `<html>` the same way\n * ui.css reads it: `data-theme=\"dark\"` (what `useTheme()` stamps, and what the\n * EFFICIENT portals' own toggles stamp) OR a `dark` class (next-themes,\n * shadcn/ui, Tailwind's class strategy). Every dark rule in the stylesheet is\n * scoped by `:is([data-theme=\"dark\"], .dark)`; a component that decides in\n * script — a canvas, an inline glass tint — must agree with it, or it paints\n * light inside a page the stylesheet has already turned dark.\n *\n * Never throws: a document without a root (a server render, a detached test)\n * is light, which is also what the stylesheet would say.\n */\nexport function rootIsDark(): boolean {\n try {\n const root = document.documentElement;\n return root.getAttribute('data-theme') === 'dark' || root.classList.contains('dark');\n } catch {\n return false;\n }\n}\n\n/** The `<html>` attributes a theme change can arrive on — for a MutationObserver's `attributeFilter`. */\nexport const ROOT_THEME_ATTRIBUTES = ['data-theme', 'class'];\n"]}
|
package/dist/chunk-IRWSRJ4K.js
DELETED
|
@@ -1,48 +0,0 @@
|
|
|
1
|
-
import { useLayoutEffect, useEffect, useSyncExternalStore, useRef, useState, useCallback } from 'react';
|
|
2
|
-
|
|
3
|
-
// src/shell/hydration.ts
|
|
4
|
-
var IN_BROWSER = typeof window !== "undefined" && typeof document !== "undefined";
|
|
5
|
-
var useBrowserLayoutEffect = IN_BROWSER ? useLayoutEffect : useEffect;
|
|
6
|
-
var NO_SUBSCRIPTION = () => () => {
|
|
7
|
-
};
|
|
8
|
-
var ALWAYS = () => true;
|
|
9
|
-
var NEVER = () => false;
|
|
10
|
-
function useHydrated() {
|
|
11
|
-
return useSyncExternalStore(NO_SUBSCRIPTION, ALWAYS, NEVER);
|
|
12
|
-
}
|
|
13
|
-
function useBrowserValue(read, serverValue, subscribe = NO_SUBSCRIPTION) {
|
|
14
|
-
return useSyncExternalStore(subscribe, read, () => serverValue);
|
|
15
|
-
}
|
|
16
|
-
function useBrowserValueOnce(read, serverValue) {
|
|
17
|
-
const held = useRef(null);
|
|
18
|
-
return useSyncExternalStore(
|
|
19
|
-
NO_SUBSCRIPTION,
|
|
20
|
-
() => (held.current ??= { value: read() }).value,
|
|
21
|
-
() => serverValue
|
|
22
|
-
);
|
|
23
|
-
}
|
|
24
|
-
function useBrowserState(read, serverValue) {
|
|
25
|
-
const hydrated = useHydrated();
|
|
26
|
-
const [value, setValue] = useState(() => hydrated ? read() : serverValue);
|
|
27
|
-
const restored = useRef(hydrated);
|
|
28
|
-
const latestRead = useRef(read);
|
|
29
|
-
latestRead.current = read;
|
|
30
|
-
useBrowserLayoutEffect(() => {
|
|
31
|
-
if (!hydrated || restored.current) return;
|
|
32
|
-
restored.current = true;
|
|
33
|
-
setValue(latestRead.current());
|
|
34
|
-
}, [hydrated]);
|
|
35
|
-
const set = useCallback((next) => {
|
|
36
|
-
if (restored.current) {
|
|
37
|
-
setValue(next);
|
|
38
|
-
return;
|
|
39
|
-
}
|
|
40
|
-
restored.current = true;
|
|
41
|
-
setValue(typeof next === "function" ? next(latestRead.current()) : next);
|
|
42
|
-
}, []);
|
|
43
|
-
return [value, set];
|
|
44
|
-
}
|
|
45
|
-
|
|
46
|
-
export { useBrowserLayoutEffect, useBrowserState, useBrowserValue, useBrowserValueOnce, useHydrated };
|
|
47
|
-
//# sourceMappingURL=chunk-IRWSRJ4K.js.map
|
|
48
|
-
//# sourceMappingURL=chunk-IR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AA,IAAY,QAAA,CAAS,OAAA,EAAS;AACnC,IAAA,QAAA,CAAS,OAAA,GAAU,IAAA;AACnB,IAAA,QAAA,CAAS,UAAA,CAAW,SAAS,CAAA;AAAA,EAC/B,CAAA,EAAG,CAAC,QAAQ,CAAC,CAAA;AAEb,EAAA,MAAM,GAAA,GAAM,WAAA,CAAyC,CAAC,IAAA,KAAS;AAC7D,IAAA,IAAI,SAAS,OAAA,EAAS;AACpB,MAAA,QAAA,CAAS,IAAI,CAAA;AACb,MAAA;AAAA,IACF;AACA,IAAA,QAAA,CAAS,OAAA,GAAU,IAAA;AACnB,IAAA,QAAA,CAAS,OAAO,SAAS,UAAA,GAAc,IAAA,CAAwB,WAAW,OAAA,EAAS,IAAI,IAAI,CAAA;AAAA,EAC7F,CAAA,EAAG,EAAE,CAAA;AAEL,EAAA,OAAO,CAAC,OAAO,GAAG,CAAA;AACpB","file":"chunk-IRWSRJ4K.js","sourcesContent":["/**\n * Rendering on a server, and hydrating what it sent.\n *\n * Every consumer this package had until now mounted it in the browser and\n * nowhere else — the portals are static exports that load the app behind\n * `dynamic(…, { ssr: false })`, so the first render always ran with a window, a\n * clock and the reader's storage in reach. A Next.js App Router consumer renders\n * on a SERVER first and then hydrates that HTML in the browser, and hydration\n * has one rule nothing here ever had to keep: the browser's first render must\n * produce exactly the HTML the server did. A component that reads the platform,\n * a stored width, today's date or a media query while it renders draws one thing\n * on the server and another in the browser, and React either logs a mismatch\n * and leaves the wrong attribute in place, or throws the server HTML away.\n *\n * So the rule for anything only a browser knows: the server — and the hydration\n * pass that has to agree with it — renders a fixed SERVER value, and the\n * browser's value arrives in the render after. The other half matters as much,\n * because the browser-only consumers are the ones this package has: a root that\n * was NOT server-rendered (`createRoot`, a dialog mounted later, a client-only\n * page) reads the browser's value on its very first render, exactly as before,\n * with no frame of the server value and no extra render.\n *\n * `useSyncExternalStore` is what tells the two apart. React calls its\n * `getServerSnapshot` on the server AND while hydrating, and `getSnapshot`\n * everywhere else, then re-renders with `getSnapshot` once hydration commits if\n * the two disagree. That is the whole mechanism; the hooks below are that one\n * call shaped for the three ways the kit needs it.\n */\nimport {\n useCallback, useEffect, useLayoutEffect, useRef, useState, useSyncExternalStore,\n type Dispatch, type SetStateAction,\n} from 'react';\n\n/**\n * A browser, as opposed to a server. Read once, at module scope, because it\n * cannot change for the life of the module: a server never turns into a browser.\n *\n * `window` rather than `navigator`: Node has had a global `navigator` since 21,\n * and its `platform` is the SERVER's — a guard on it reads a Mac build machine\n * as a Mac reader.\n */\nexport const IN_BROWSER = typeof window !== 'undefined' && typeof document !== 'undefined';\n\n/**\n * `useLayoutEffect` in a browser, `useEffect` where there is no DOM.\n *\n * Neither runs on a server, but React 18's server renderer warns about every\n * `useLayoutEffect` it meets, once per component per render. Chosen at module\n * scope, so the hook order is the same on every render either way.\n */\nexport const useBrowserLayoutEffect = IN_BROWSER ? useLayoutEffect : useEffect;\n\n/** Nothing to subscribe to: the value is read again on the next render. */\nconst NO_SUBSCRIPTION = () => () => {};\nconst ALWAYS = () => true;\nconst NEVER = () => false;\n\n/**\n * False while React renders on a server or hydrates the HTML it sent; true\n * otherwise — including the very FIRST render of a root that was never\n * server-rendered, which is what keeps a client-only consumer exactly as it was.\n */\nexport function useHydrated(): boolean {\n return useSyncExternalStore(NO_SUBSCRIPTION, ALWAYS, NEVER);\n}\n\n/**\n * A value only the browser knows, read on every render, with `serverValue` in\n * its place on a server and while hydrating.\n *\n * `read` must return the same value for the same state of the world — a\n * primitive, or a cached object — because React compares consecutive reads to\n * decide whether anything changed. Pass `subscribe` to re-render when it does\n * (a media query); without one the value is simply read again on the next\n * render, which is what the code this replaced did by calling it inline.\n */\nexport function useBrowserValue<T>(\n read: () => T,\n serverValue: T,\n subscribe: (onChange: () => void) => () => void = NO_SUBSCRIPTION,\n): T {\n return useSyncExternalStore(subscribe, read, () => serverValue);\n}\n\n/**\n * A browser value read ONCE per mounted component — the moment it mounted, or\n * the moment hydration ended — and held for its lifetime.\n *\n * For what the kit used to capture with `useState(() => Date.now())`: \"now\" as\n * a timeline's coordinate, which must not drift while the reader looks at it.\n * The state initialiser runs during hydration as well, so it put the browser's\n * clock into a render that had to match the server's; this holds the server\n * value until hydration ends and reads the clock then.\n */\nexport function useBrowserValueOnce<T>(read: () => T, serverValue: T): T {\n const held = useRef<{ value: T } | null>(null);\n return useSyncExternalStore(\n NO_SUBSCRIPTION,\n () => (held.current ??= { value: read() }).value,\n () => serverValue,\n );\n}\n\n/**\n * `useState` whose initial value comes from the browser — a stored width, the\n * saved prefs — and starts as `serverValue` when the HTML came from a server.\n *\n * A client-only root reads the browser on its first render, as the\n * `useState(() => localStorage…)` this replaces did, so nothing about it\n * changes. A hydrating root renders `serverValue`, then reads the browser in a\n * layout effect the moment hydration ends — before that render is painted.\n *\n * An update made in between is applied to the BROWSER's value, not to the\n * placeholder, and counts as the restore. The window is real: the children's\n * effects run when hydration commits, before the restore, and a `save(patch)`\n * from one of them would otherwise merge the patch into the defaults and write\n * that over everything the reader had stored.\n */\nexport function useBrowserState<T>(read: () => T, serverValue: T): [T, Dispatch<SetStateAction<T>>] {\n const hydrated = useHydrated();\n const [value, setValue] = useState<T>(() => (hydrated ? read() : serverValue));\n // True once the state holds the browser's value: from the start on a\n // client-only root, after the restore below on a hydrated one.\n const restored = useRef(hydrated);\n const latestRead = useRef(read);\n latestRead.current = read;\n\n useBrowserLayoutEffect(() => {\n if (!hydrated || restored.current) return;\n restored.current = true;\n setValue(latestRead.current());\n }, [hydrated]);\n\n const set = useCallback<Dispatch<SetStateAction<T>>>((next) => {\n if (restored.current) {\n setValue(next);\n return;\n }\n restored.current = true;\n setValue(typeof next === 'function' ? (next as (prev: T) => T)(latestRead.current()) : next);\n }, []);\n\n return [value, set];\n}\n"]}
|
package/dist/chunk-IULP5BCD.js
DELETED
|
@@ -1,79 +0,0 @@
|
|
|
1
|
-
import { useWindowMenuItem, Modal } from './chunk-Q3LT745N.js';
|
|
2
|
-
import { navIcons } from './chunk-GA35NEND.js';
|
|
3
|
-
import { VERSION } from './chunk-Q2MJVSJT.js';
|
|
4
|
-
import { useState, useCallback, isValidElement, cloneElement } from 'react';
|
|
5
|
-
import { jsx, jsxs } from 'react/jsx-runtime';
|
|
6
|
-
|
|
7
|
-
var BUILTIN_APP_INFO = {
|
|
8
|
-
spreadsheet: {
|
|
9
|
-
name: "Spreadsheets",
|
|
10
|
-
version: "1.1.3",
|
|
11
|
-
route: "/spreadsheet",
|
|
12
|
-
description: "Multi-sheet spreadsheet editor with CSV / TSV import and export."
|
|
13
|
-
},
|
|
14
|
-
notepad: {
|
|
15
|
-
name: "Notepad",
|
|
16
|
-
version: "1.0.0",
|
|
17
|
-
route: "/notepad",
|
|
18
|
-
description: "Color-coded notes with checklists, desktop stickies and entity autolinking."
|
|
19
|
-
},
|
|
20
|
-
documents: {
|
|
21
|
-
name: "Documents",
|
|
22
|
-
version: "1.1.0",
|
|
23
|
-
route: "/documents",
|
|
24
|
-
description: "Letter-page editor for Word documents and plain-text files \u2014 images, lists, alignment."
|
|
25
|
-
},
|
|
26
|
-
preview: {
|
|
27
|
-
name: "Preview",
|
|
28
|
-
version: "1.3.2",
|
|
29
|
-
route: "/preview",
|
|
30
|
-
description: "Viewer for PDF documents, images, DXF drawings and 3D models \u2014 CAD-style measuring with object snap and an AutoCAD-like command bar."
|
|
31
|
-
},
|
|
32
|
-
files: {
|
|
33
|
-
name: "Files",
|
|
34
|
-
version: "1.1.0",
|
|
35
|
-
route: "/files",
|
|
36
|
-
description: "Personal file manager with folders, uploads, quota, trash and desktop shortcut folders."
|
|
37
|
-
},
|
|
38
|
-
browser: {
|
|
39
|
-
name: "Browser",
|
|
40
|
-
version: "1.0.1",
|
|
41
|
-
route: "/browser",
|
|
42
|
-
description: "Minimal web browser with bookmarks, history and navigation bar."
|
|
43
|
-
}
|
|
44
|
-
};
|
|
45
|
-
var ABOUT_MENU_ICON = /* @__PURE__ */ jsx("svg", { className: "h-4 w-4 text-gray-400", fill: "none", viewBox: "0 0 24 24", stroke: "currentColor", strokeWidth: 1.5, children: /* @__PURE__ */ jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M11.25 11.25l.041-.02a.75.75 0 011.063.852l-.708 2.836a.75.75 0 001.063.853l.041-.021M21 12a9 9 0 11-18 0 9 9 0 0118 0zm-9-3.75h.008v.008H12V8.25z" }) });
|
|
46
|
-
var FALLBACK_APP_ICON = /* @__PURE__ */ jsx("svg", { className: "h-9 w-9", fill: "none", viewBox: "0 0 24 24", stroke: "currentColor", strokeWidth: 1.5, children: /* @__PURE__ */ jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M3.75 6.75A2.25 2.25 0 016 4.5h12a2.25 2.25 0 012.25 2.25v10.5A2.25 2.25 0 0118 19.5H6a2.25 2.25 0 01-2.25-2.25V6.75z M3.75 9h16.5" }) });
|
|
47
|
-
function AboutApp({ app }) {
|
|
48
|
-
const info = BUILTIN_APP_INFO[app];
|
|
49
|
-
const [open, setOpen] = useState(false);
|
|
50
|
-
const openDialog = useCallback(() => setOpen(true), []);
|
|
51
|
-
useWindowMenuItem(`About ${info.name}`, openDialog, ABOUT_MENU_ICON);
|
|
52
|
-
if (!open) return null;
|
|
53
|
-
const registered = navIcons[info.route];
|
|
54
|
-
const appIcon = isValidElement(registered) ? cloneElement(registered, { className: "h-9 w-9" }) : FALLBACK_APP_ICON;
|
|
55
|
-
return /* @__PURE__ */ jsx(Modal, { open: true, onClose: () => setOpen(false), title: `About ${info.name}`, size: "sm", compact: true, bodyScroll: false, autoHeight: true, dimensions: [320, 320], children: /* @__PURE__ */ jsxs("div", { className: "flex flex-col items-center text-center px-5 pt-5 pb-4", children: [
|
|
56
|
-
/* @__PURE__ */ jsx("div", { className: "flex h-16 w-16 items-center justify-center rounded-2xl bg-gray-100 text-gray-600 shrink-0", children: appIcon }),
|
|
57
|
-
/* @__PURE__ */ jsx("h2", { className: "mt-3 text-lg font-bold text-gray-900", children: info.name }),
|
|
58
|
-
/* @__PURE__ */ jsxs("p", { className: "text-[11px] font-mono text-gray-400", children: [
|
|
59
|
-
"Version ",
|
|
60
|
-
info.version
|
|
61
|
-
] }),
|
|
62
|
-
/* @__PURE__ */ jsx("p", { className: "mt-2 text-xs text-gray-500 leading-relaxed", children: info.description }),
|
|
63
|
-
/* @__PURE__ */ jsxs("div", { className: "mt-4 pt-3 border-t border-gray-200 w-full", children: [
|
|
64
|
-
/* @__PURE__ */ jsxs("p", { className: "text-[11px] text-gray-500", children: [
|
|
65
|
-
"Part of the ",
|
|
66
|
-
/* @__PURE__ */ jsx("span", { className: "font-medium text-gray-700", children: "efficient-shell" }),
|
|
67
|
-
" desktop environment"
|
|
68
|
-
] }),
|
|
69
|
-
VERSION && /* @__PURE__ */ jsxs("p", { className: "mt-0.5 text-[10px] font-mono text-gray-400", children: [
|
|
70
|
-
"shell v",
|
|
71
|
-
VERSION
|
|
72
|
-
] })
|
|
73
|
-
] })
|
|
74
|
-
] }) });
|
|
75
|
-
}
|
|
76
|
-
|
|
77
|
-
export { AboutApp, BUILTIN_APP_INFO };
|
|
78
|
-
//# sourceMappingURL=chunk-IULP5BCD.js.map
|
|
79
|
-
//# sourceMappingURL=chunk-IULP5BCD.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/apps/_about.tsx"],"names":[],"mappings":";;;;;;AA4BO,IAAM,gBAAA,GAAmB;AAAA,EAC9B,WAAA,EAAa;AAAA,IACX,IAAA,EAAM,cAAA;AAAA,IACN,OAAA,EAAS,OAAA;AAAA,IACT,KAAA,EAAO,cAAA;AAAA,IACP,WAAA,EAAa;AAAA,GACf;AAAA,EACA,OAAA,EAAS;AAAA,IACP,IAAA,EAAM,SAAA;AAAA,IACN,OAAA,EAAS,OAAA;AAAA,IACT,KAAA,EAAO,UAAA;AAAA,IACP,WAAA,EAAa;AAAA,GACf;AAAA,EACA,SAAA,EAAW;AAAA,IACT,IAAA,EAAM,WAAA;AAAA,IACN,OAAA,EAAS,OAAA;AAAA,IACT,KAAA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AAC,KAAA,EAAA,EAAI,SAAA,EAAU,2CAAA,EACb,QAAA,EAAA;AAAA,sBAAA,IAAA,CAAC,GAAA,EAAA,EAAE,WAAU,2BAAA,EAA4B,QAAA,EAAA;AAAA,QAAA,cAAA;AAAA,wBAC3B,GAAA,CAAC,MAAA,EAAA,EAAK,SAAA,EAAU,2BAAA,EAA4B,QAAA,EAAA,iBAAA,EAAe,CAAA;AAAA,QAAO;AAAA,OAAA,EAChF,CAAA;AAAA,MACC,OAAA,oBAAW,IAAA,CAAC,GAAA,EAAA,EAAE,SAAA,EAAU,4CAAA,EAA6C,QAAA,EAAA;AAAA,QAAA,SAAA;AAAA,QAAQ;AAAA,OAAA,EAAQ;AAAA,KAAA,EACxF;AAAA,GAAA,EACF,CAAA,EACF,CAAA;AAEJ","file":"chunk-IULP5BCD.js","sourcesContent":["/**\n * Shared \"About\" dialog for the bundled apps.\n *\n * Each bundled app carries its own version (independent of the package\n * version) so app-level changes can be tracked without bumping every app at\n * once. `<AboutApp app=\"…\" />` registers an \"About <Name>\" item in the\n * window title menu and renders the dialog: app icon, name, app version and\n * the efficient-shell attribution + shell version.\n *\n * Bump an app's version in `BUILTIN_APP_INFO` whenever that app's behaviour\n * changes, alongside the package-level CHANGELOG entry.\n */\nimport { useCallback, useState, isValidElement, cloneElement, type ReactElement } from 'react';\nimport Modal, { useWindowMenuItem } from '../shell/Modal';\nimport { navIcons } from '../shell-config/nav';\nimport { VERSION } from '../version';\n\nexport interface BuiltinAppInfo {\n /** Display name — matches the window-registry label. */\n name: string;\n /** App version, independent of the package version. */\n version: string;\n /** One-line summary shown in the About dialog. */\n description: string;\n /** Registry route — used to look up the consumer-registered nav icon. */\n route: string;\n}\n\nexport const BUILTIN_APP_INFO = {\n spreadsheet: {\n name: 'Spreadsheets',\n version: '1.1.3',\n route: '/spreadsheet',\n description: 'Multi-sheet spreadsheet editor with CSV / TSV import and export.',\n },\n notepad: {\n name: 'Notepad',\n version: '1.0.0',\n route: '/notepad',\n description: 'Color-coded notes with checklists, desktop stickies and entity autolinking.',\n },\n documents: {\n name: 'Documents',\n version: '1.1.0',\n route: '/documents',\n description: 'Letter-page editor for Word documents and plain-text files — images, lists, alignment.',\n },\n preview: {\n name: 'Preview',\n version: '1.3.2',\n route: '/preview',\n description: 'Viewer for PDF documents, images, DXF drawings and 3D models — CAD-style measuring with object snap and an AutoCAD-like command bar.',\n },\n files: {\n name: 'Files',\n version: '1.1.0',\n route: '/files',\n description: 'Personal file manager with folders, uploads, quota, trash and desktop shortcut folders.',\n },\n browser: {\n name: 'Browser',\n version: '1.0.1',\n route: '/browser',\n description: 'Minimal web browser with bookmarks, history and navigation bar.',\n },\n} satisfies Record<string, BuiltinAppInfo>;\n\nexport type BuiltinAppId = keyof typeof BUILTIN_APP_INFO;\n\nconst ABOUT_MENU_ICON = (\n <svg className=\"h-4 w-4 text-gray-400\" fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\" strokeWidth={1.5}>\n <path strokeLinecap=\"round\" strokeLinejoin=\"round\" d=\"M11.25 11.25l.041-.02a.75.75 0 011.063.852l-.708 2.836a.75.75 0 001.063.853l.041-.021M21 12a9 9 0 11-18 0 9 9 0 0118 0zm-9-3.75h.008v.008H12V8.25z\" />\n </svg>\n);\n\n// Generic window glyph shown when the consumer hasn't registered a nav icon\n// for the app's route (same fallback shape as the Modal title bar).\nconst FALLBACK_APP_ICON = (\n <svg className=\"h-9 w-9\" fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\" strokeWidth={1.5}>\n <path strokeLinecap=\"round\" strokeLinejoin=\"round\" d=\"M3.75 6.75A2.25 2.25 0 016 4.5h12a2.25 2.25 0 012.25 2.25v10.5A2.25 2.25 0 0118 19.5H6a2.25 2.25 0 01-2.25-2.25V6.75z M3.75 9h16.5\" />\n </svg>\n);\n\n/** Registers \"About <Name>\" in the window title menu and renders the dialog.\n * Render anywhere inside the app's window. */\nexport default function AboutApp({ app }: { app: BuiltinAppId }) {\n const info = BUILTIN_APP_INFO[app];\n const [open, setOpen] = useState(false);\n const openDialog = useCallback(() => setOpen(true), []);\n useWindowMenuItem(`About ${info.name}`, openDialog, ABOUT_MENU_ICON);\n\n if (!open) return null;\n\n const registered = navIcons[info.route];\n const appIcon = isValidElement(registered)\n ? cloneElement(registered as ReactElement, { className: 'h-9 w-9' } as any)\n : FALLBACK_APP_ICON;\n\n return (\n <Modal open onClose={() => setOpen(false)} title={`About ${info.name}`} size=\"sm\" compact bodyScroll={false} autoHeight dimensions={[320, 320]}>\n <div className=\"flex flex-col items-center text-center px-5 pt-5 pb-4\">\n <div className=\"flex h-16 w-16 items-center justify-center rounded-2xl bg-gray-100 text-gray-600 shrink-0\">\n {appIcon}\n </div>\n <h2 className=\"mt-3 text-lg font-bold text-gray-900\">{info.name}</h2>\n <p className=\"text-[11px] font-mono text-gray-400\">Version {info.version}</p>\n <p className=\"mt-2 text-xs text-gray-500 leading-relaxed\">{info.description}</p>\n <div className=\"mt-4 pt-3 border-t border-gray-200 w-full\">\n <p className=\"text-[11px] text-gray-500\">\n Part of the <span className=\"font-medium text-gray-700\">efficient-shell</span> desktop environment\n </p>\n {VERSION && <p className=\"mt-0.5 text-[10px] font-mono text-gray-400\">shell v{VERSION}</p>}\n </div>\n </div>\n </Modal>\n );\n}\n"]}
|
package/dist/chunk-MGGY74RY.js
DELETED
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
// src/utils/escapeHtml.ts
|
|
2
|
-
function escapeHtml(s) {
|
|
3
|
-
return s.replace(/[&<>"']/g, (c) => ({
|
|
4
|
-
"&": "&",
|
|
5
|
-
"<": "<",
|
|
6
|
-
">": ">",
|
|
7
|
-
'"': """,
|
|
8
|
-
"'": "'"
|
|
9
|
-
})[c] || c);
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
export { escapeHtml };
|
|
13
|
-
//# sourceMappingURL=chunk-MGGY74RY.js.map
|
|
14
|
-
//# sourceMappingURL=chunk-MGGY74RY.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/utils/escapeHtml.ts"],"names":[],"mappings":";AAWO,SAAS,WAAW,CAAA,EAAmB;AAC5C,EAAA,OAAO,CAAA,CAAE,OAAA,CAAQ,UAAA,EAAY,CAAA,CAAA,KAAA,CAAM;AAAA,IACjC,GAAA,EAAK,OAAA;AAAA,IAAS,GAAA,EAAK,MAAA;AAAA,IAAQ,GAAA,EAAK,MAAA;AAAA,IAAQ,GAAA,EAAK,QAAA;AAAA,IAAU,GAAA,EAAK;AAAA,GAC9D,EAAE,CAAC,CAAA,IAAK,CAAE,CAAA;AACZ","file":"chunk-MGGY74RY.js","sourcesContent":["/** Escape a string for safe injection as HTML text.\n *\n * The shell has two places that must put a plain string inside a\n * `contentEditable` node. React cannot own the children of a `contentEditable`\n * element without fighting the caret, so both set `innerHTML` instead — which\n * means an unescaped value is executed as markup rather than shown as text.\n *\n * Escaping round-trips exactly: the browser decodes the entities back when the\n * value is read with `textContent`, so a caller that writes `a < b` reads\n * `a < b` again.\n */\nexport function escapeHtml(s: string): string {\n return s.replace(/[&<>\"']/g, c => ({\n '&': '&', '<': '<', '>': '>', '\"': '"', \"'\": ''',\n }[c] || c));\n}\n"]}
|