@powerhousedao/connect 6.2.3-dev.77 → 6.2.3-dev.79
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/README.md +3 -3
- package/dist/{AddDriveModal-BjgmiHJr.js → AddDriveModal-CFi-9FQU.js} +22 -9
- package/dist/AddDriveModal-CFi-9FQU.js.map +1 -0
- package/dist/{ClearStorageModal-i9FKEx_Z.js → ClearStorageModal-CeIUOS3b.js} +4 -4
- package/dist/{ClearStorageModal-i9FKEx_Z.js.map → ClearStorageModal-CeIUOS3b.js.map} +1 -1
- package/dist/{DebugSettingsModal-DZV2fbRB.js → DebugSettingsModal-BPxepTqH.js} +4 -4
- package/dist/{DebugSettingsModal-DZV2fbRB.js.map → DebugSettingsModal-BPxepTqH.js.map} +1 -1
- package/dist/{InspectorModal-B1nrgNqN.js → InspectorModal-C3idQF-2.js} +4 -4
- package/dist/{InspectorModal-B1nrgNqN.js.map → InspectorModal-C3idQF-2.js.map} +1 -1
- package/dist/{OpenFileDocumentsModal-B9c-CsKT.js → OpenFileDocumentsModal-DJsC1oR1.js} +10 -6
- package/dist/OpenFileDocumentsModal-DJsC1oR1.js.map +1 -0
- package/dist/{app-loader-DXgAoCn8.js → app-loader-7OUjO5bP.js} +9 -8
- package/dist/{app-loader-DXgAoCn8.js.map → app-loader-7OUjO5bP.js.map} +1 -1
- package/dist/app-loader-DNAJ-Yy4.js +4 -0
- package/dist/{app-skeleton-WGKR7IBB.js → app-skeleton-CMUP2zaz.js} +4 -4
- package/dist/{app-skeleton-WGKR7IBB.js.map → app-skeleton-CMUP2zaz.js.map} +1 -1
- package/dist/{app-skeleton-CPjpFScH.js → app-skeleton-CdD1m8G3.js} +3 -3
- package/dist/{boot-BsDeQV5C.js → boot-Bj8cb1nU.js} +5 -5
- package/dist/{boot-BsDeQV5C.js.map → boot-Bj8cb1nU.js.map} +1 -1
- package/dist/{build-info-CsorwB_R.js → build-info-DuD57dLW.js} +5 -5
- package/dist/{build-info-CsorwB_R.js.map → build-info-DuD57dLW.js.map} +1 -1
- package/dist/{components-BuJEx-4m.js → components-C_JnePUO.js} +6 -6
- package/dist/{components-BuJEx-4m.js.map → components-C_JnePUO.js.map} +1 -1
- package/dist/generic.d.ts +11 -5
- package/dist/generic.d.ts.map +1 -1
- package/dist/generic.js +3 -3
- package/dist/index-D7c2WAbn.d.ts +4 -0
- package/dist/layout-Dj3_KscE.js +5 -0
- package/dist/layout.d.ts +2 -2
- package/dist/layout.js +4 -4
- package/dist/{load-Pg2jPlQG.js → load-Cx5LF8Oq.js} +6 -6
- package/dist/{load-Pg2jPlQG.js.map → load-Cx5LF8Oq.js.map} +1 -1
- package/dist/{load-runtime-config-DUDmjysn.js → load-runtime-config-Ccr-CSrB.js} +4 -4
- package/dist/{load-runtime-config-DUDmjysn.js.map → load-runtime-config-Ccr-CSrB.js.map} +1 -1
- package/dist/main.js +2 -2
- package/dist/{package-manager-DbsImtAj.js → package-manager-CxeIUE9M.js} +6 -6
- package/dist/{package-manager-DbsImtAj.js.map → package-manager-CxeIUE9M.js.map} +1 -1
- package/dist/{plugins-B6fx4DYq.js → plugins-BPEiqk54.js} +4 -4
- package/dist/{plugins-B6fx4DYq.js.map → plugins-BPEiqk54.js.map} +1 -1
- package/dist/prerender.js +3 -3
- package/dist/{reactor-DzmKoZta.js → reactor-Dz5I-nuF.js} +8 -7
- package/dist/{reactor-DzmKoZta.js.map → reactor-Dz5I-nuF.js.map} +1 -1
- package/dist/route-tree.d.ts +28 -28
- package/dist/route-tree.d.ts.map +1 -1
- package/dist/route-tree.js +1 -1
- package/dist/{route-views-C84NRBou.js → route-views-C-H3ofJW.js} +3 -3
- package/dist/{route-views-DmmQ1DzX.js → route-views-CKBivPxe.js} +4 -4
- package/dist/{route-views-DmmQ1DzX.js.map → route-views-CKBivPxe.js.map} +1 -1
- package/dist/{route-views-zHuBM6Nq.js → route-views-DzgRMAx8.js} +4 -4
- package/dist/{route-views-zHuBM6Nq.js.map → route-views-DzgRMAx8.js.map} +1 -1
- package/dist/route-views.js +3 -3
- package/dist/{router-9jEQB-nr.js → router-CWIsjETx.js} +4 -4
- package/dist/{router-9jEQB-nr.js.map → router-CWIsjETx.js.map} +1 -1
- package/dist/router-CnWkTEey.js +4 -0
- package/dist/{settings-BIDeP8Tk.js → settings-CBZxJ2Q7.js} +6 -8
- package/dist/{settings-BIDeP8Tk.js.map → settings-CBZxJ2Q7.js.map} +1 -1
- package/dist/{settings-tabs-Du7xiSzi.js → settings-tabs-CX9Ui6ph.js} +19 -12
- package/dist/settings-tabs-CX9Ui6ph.js.map +1 -0
- package/dist/shell-core-head.html +1 -1
- package/dist/shell-head.html +1 -1
- package/dist/start-connect.js +2 -2
- package/dist/style.css +85 -0
- package/dist/{ui-Blbu9aQD.js → ui-BMwuUre8.js} +8 -8
- package/dist/{ui-Blbu9aQD.js.map → ui-BMwuUre8.js.map} +1 -1
- package/package.json +16 -18
- package/skills/customize-connect/SKILL.md +22 -19
- package/{docs/customizing → skills/customize-connect/references}/data-and-navigation.md +17 -5
- package/{docs/customizing → skills/customize-connect/references}/drive-apps.md +5 -3
- package/{docs/customizing → skills/customize-connect/references}/layout.md +7 -1
- package/{docs/customizing → skills/customize-connect/references}/modals.md +1 -1
- package/{docs/customizing → skills/customize-connect/references}/overrides.md +10 -1
- package/{docs/customizing → skills/customize-connect/references}/pages.md +9 -1
- package/{RUNTIME-CONFIG.md → skills/customize-connect/references/runtime-config.md} +12 -2
- package/{docs/customizing → skills/customize-connect/references}/styles-and-branding.md +1 -1
- package/{docs/customizing → skills/customize-connect/references}/types-and-troubleshooting.md +0 -1
- package/dist/AddDriveModal-BjgmiHJr.js.map +0 -1
- package/dist/OpenFileDocumentsModal-B9c-CsKT.js.map +0 -1
- package/dist/app-loader-CZUBwD2Y.js +0 -4
- package/dist/index-NyJPEHvw.d.ts +0 -4
- package/dist/layout-wfvkfP4J.js +0 -5
- package/dist/router-D8NyXlh0.js +0 -4
- package/dist/settings-tabs-Du7xiSzi.js.map +0 -1
- /package/{docs/customizing → skills/customize-connect/references}/hosts-and-plugins.md +0 -0
- /package/{docs/customizing → skills/customize-connect/references}/packages.md +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"boot-BsDeQV5C.js","sources":["../src/utils/performance-observer.ts","../src/warm-modules.ts","../src/boot.tsx"],"sourcesContent":["import { track } from \"../services/openpanel/buffer.js\";\nimport type { PHGlobal } from \"@powerhousedao/reactor-browser\";\n\n/**\n * Startup performance measurement.\n *\n * Captures First Contentful Paint (FCP) and Largest Contentful Paint (LCP) via\n * the Performance API and reports each to the OpenPanel analytics buffer (a\n * consent-gated, never-throwing queue). Call {@link initPerformanceObserver}\n * at the very top of the entry module, before the runtime config is fetched,\n * so FCP is caught even if the browser has already painted — a\n * `PerformanceObserver` with `buffered: true` replays entries that fired\n * before `observe()` was called.\n *\n * This module is intentionally dependency-light (only the OpenPanel event\n * buffer, which has no runtime imports of its own) so it is safe to load\n * before the runtime config is fetched. Every API access is guarded: nothing\n * here may throw into the application.\n */\n\nfunction navigationType(): string | undefined {\n try {\n const entry = performance.getEntriesByType(\"navigation\")[0] as\n | PerformanceNavigationTiming\n | undefined;\n return entry?.type; // \"navigate\" | \"reload\" | \"back_forward\" | \"prerender\"\n } catch {\n return undefined;\n }\n}\n\n// window.ph is the app's global bag (PHGlobal). This module owns a\n// `performance` sub-object it writes into; `PhWithPerformance` is a named\n// stand-in for that write so it type-checks without touching the shared\n// PHGlobal definition.\ntype PhWithPerformance = PHGlobal & { performance?: Record<string, number> };\n\n/**\n * Mirror the metric on `window.ph.performance` for devtools inspection. Only\n * writes to an already-existing `window.ph` (owned by the entry module) —\n * never creates or replaces it, so it can't clobber the app's global state.\n */\nfunction storeOnWindow(name: string, value: number): void {\n try {\n const ph = window.ph as PhWithPerformance | undefined;\n if (!ph) return;\n ph.performance = ph.performance ?? {};\n ph.performance[name] = value;\n } catch {\n // devtools mirror is best-effort only\n }\n}\n\nfunction report(name: string, ms: number): void {\n const value = Math.round(ms);\n const props: Record<string, unknown> = { ms: value };\n const navType = navigationType();\n if (navType) props.navigation = navType;\n\n storeOnWindow(name, value);\n\n // The console summary is a developer aid. In a production build it is noise\n // in every user's console and in every support screenshot, so it is gated\n // out of the bundle there.\n if (!import.meta.env.PROD) {\n try {\n console.info(`[connect:performance] ${name}: ${value}ms`, props);\n } catch {\n // console is best-effort only\n }\n }\n\n try {\n track(`performance.${name}`, props);\n } catch {\n // analytics must never throw into the app\n }\n}\n\n/**\n * Starts the observers. Returns a disposer that detaches all of them. The app\n * never needs it — the observers live as long as the page does — but it keeps\n * the module testable and leaves no listener behind.\n */\nexport function initPerformanceObserver(): () => void {\n if (\n typeof window === \"undefined\" ||\n typeof PerformanceObserver === \"undefined\"\n ) {\n return () => undefined;\n }\n\n const teardown: Array<() => void> = [];\n\n /** Registers a listener and queues its removal on dispose. */\n const listen = (\n target: EventTarget,\n type: string,\n handler: () => void,\n once = true,\n ): void => {\n target.addEventListener(type, handler, { once });\n teardown.push(() => target.removeEventListener(type, handler));\n };\n\n // FCP — from the \"paint\" buffer. It fires once, so stop observing after it.\n try {\n const fcpObserver = new PerformanceObserver((list) => {\n for (const entry of list.getEntries()) {\n if (entry.name === \"first-contentful-paint\") {\n fcpObserver.disconnect();\n report(\"first_contentful_paint\", entry.startTime);\n }\n }\n });\n fcpObserver.observe({ type: \"paint\", buffered: true });\n teardown.push(() => fcpObserver.disconnect());\n } catch (err) {\n console.warn(\"[connect:performance] FCP observer failed:\", err);\n }\n\n // LCP — the final value only settles on an interaction or page hide, so latch\n // the latest candidate and report on the first terminal signal.\n let lcpMs = 0;\n let lcpReported = false;\n let lcpObserver: PerformanceObserver | undefined;\n\n /** Latches the newest candidate of a batch. The last entry is the newest. */\n const latch = (entries: ArrayLike<{ startTime: number }>): void => {\n if (entries.length > 0) {\n lcpMs = entries[entries.length - 1].startTime;\n }\n };\n\n const reportLcp = (): void => {\n // Several terminal signals can fire in one session (a click, then the page\n // hiding, then pagehide). The metric is sent for the first one only: every\n // repeat would be a double-count downstream.\n if (lcpReported) return;\n lcpReported = true;\n\n // A PerformanceObserver delivers entries in a task of its own, so a\n // terminal signal early in the page's life arrives while the newest\n // candidate is still buffered. Drain it before disconnecting — otherwise\n // an early click costs the session its LCP entirely.\n try {\n latch(lcpObserver?.takeRecords() ?? []);\n } catch {\n // draining is best-effort; report whatever was already delivered\n }\n\n lcpObserver?.disconnect();\n if (lcpMs > 0) report(\"largest_contentful_paint\", lcpMs);\n };\n\n try {\n lcpObserver = new PerformanceObserver((list) => {\n latch(list.getEntries());\n });\n lcpObserver.observe({ type: \"largest-contentful-paint\", buffered: true });\n teardown.push(() => lcpObserver?.disconnect());\n\n listen(window, \"pagehide\", reportLcp);\n listen(window, \"pointerdown\", reportLcp);\n listen(window, \"keydown\", reportLcp);\n // Not `once`: a page that loads in a background tab, or that the user tabs\n // away from and back, fires visibilitychange more than once, and only the\n // transition to \"hidden\" is terminal. A one-shot listener would be spent\n // on an earlier \"visible\" event and never see the hide.\n listen(\n document,\n \"visibilitychange\",\n () => {\n if (document.visibilityState === \"hidden\") reportLcp();\n },\n false,\n );\n } catch (err) {\n console.warn(\"[connect:performance] LCP observer failed:\", err);\n }\n\n return () => {\n for (const detach of teardown) {\n try {\n detach();\n } catch {\n // teardown is best-effort only\n }\n }\n teardown.length = 0;\n };\n}\n","// The app graph's largest packages; none reads the runtime config when evaluated.\nconst STAGES: (() => Promise<unknown>)[] = [\n () => import(\"@powerhousedao/reactor-browser\"),\n () => import(\"@powerhousedao/design-system/connect\"),\n];\n\nconst nextTask = () => new Promise((resolve) => setTimeout(resolve, 0));\n\n/** Evaluates them one task each; imported with the app they'd be one long task. */\nexport async function warmModules(stages = STAGES) {\n for (const stage of stages) {\n await nextTask();\n // The app's own import reports a failure.\n await stage().catch(() => undefined);\n }\n}\n","// Imported by package name so projects resolve its fonts from Connect's dependencies.\nimport \"@powerhousedao/connect/fonts.css\";\nimport type { ComponentType, PropsWithChildren, ReactNode } from \"react\";\nimport { createRoot } from \"react-dom/client\";\nimport {\n adoptPrerenderedShell,\n hasPrerenderedShell,\n} from \"./components/prerendered-shell.js\";\nimport { loadRuntimeConfig } from \"./load-runtime-config.js\";\nimport { initPerformanceObserver } from \"./utils/performance-observer.js\";\nimport { warmModules } from \"./warm-modules.js\";\n\n/**\n * The two-phase startup shared by both entry points.\n *\n * Phase 1 paints the config-independent skeleton, so first contentful paint\n * does not wait on the `powerhouse.config.json` round-trip. Phase 2 awaits the\n * config and hands the caller back the root to render the config-dependent app\n * into — every module that reads the runtime config at module-evaluation\n * throws if the cache isn't warm, so the app graph may only be imported after\n * this resolves.\n *\n * Kept dependency-light on purpose: it loads before the config is fetched, so\n * nothing in its import graph may read the config.\n */\n\n/** All the bootstrap needs of a React root — and all a test has to stand in for. */\ntype RenderTarget = { render: (node: ReactNode) => void };\n\nexport type BootDeps = {\n loadConfig: () => Promise<unknown>;\n importSkeleton: () => Promise<{ default: ComponentType<PropsWithChildren> }>;\n createRoot: () => RenderTarget;\n initObserver: () => () => void;\n /** True when #root holds a prerendered shell, which stays until the app renders. */\n adoptShell: () => boolean;\n /** Evaluates the app's large packages while the config loads. */\n warmModules: () => Promise<unknown>;\n};\n\nconst defaultDeps: BootDeps = {\n loadConfig: () => loadRuntimeConfig(),\n importSkeleton: () => import(\"./components/app-skeleton.js\"),\n createRoot: () => createRoot(document.getElementById(\"root\")!),\n initObserver: initPerformanceObserver,\n adoptShell: () => {\n adoptPrerenderedShell(document.getElementById(\"root\"));\n return hasPrerenderedShell();\n },\n warmModules: () => warmModules(),\n};\n\n/**\n * Shown when startup cannot proceed. Deliberately built from plain elements:\n * this renders precisely when the runtime config is unavailable, so it must\n * not depend on anything that reads it.\n */\nfunction BootError({ error }: { error: unknown }): ReactNode {\n const message = error instanceof Error ? error.message : String(error);\n return (\n <div\n role=\"alert\"\n className=\"flex h-screen flex-col items-center justify-center gap-3 bg-background p-6 text-center\"\n >\n <h1 className=\"text-lg font-semibold text-foreground\">\n Connect could not start\n </h1>\n <p className=\"max-w-prose text-sm text-foreground\">\n Its runtime configuration could not be loaded. This is usually temporary\n — reloading often resolves it.\n </p>\n <pre className=\"max-w-prose overflow-x-auto rounded-sm bg-card px-3 py-2 text-left text-xs text-foreground\">\n {message}\n </pre>\n <button\n type=\"button\"\n className=\"rounded-sm bg-card px-4 py-2 text-sm font-medium text-foreground shadow-sm\"\n onClick={() => {\n window.location.reload();\n }}\n >\n Reload\n </button>\n </div>\n );\n}\n\n/**\n * Paints the skeleton, then waits for the runtime config.\n *\n * Returns the root to render the app into, or `null` when startup failed — in\n * which case the error state is already painted and the caller must not import\n * the config-dependent app. It resolves rather than rejecting on failure: both\n * entry points await this at their module's top level, where a rejection would\n * surface only as an unhandled rejection behind a skeleton that never goes\n * away.\n */\nexport async function bootConnect(\n overrides: Partial<BootDeps> = {},\n): Promise<RenderTarget | null> {\n const {\n loadConfig,\n importSkeleton,\n createRoot: makeRoot,\n initObserver,\n adoptShell,\n warmModules: warm,\n } = { ...defaultDeps, ...overrides };\n\n if (!window.ph) {\n window.ph = {};\n }\n\n // Before anything else: the observers use `buffered: true`, so they catch\n // the browser's paint even when setup runs a tick after it fired.\n initObserver();\n\n // Started here and awaited at the bottom. The config fetch and the skeleton\n // chunk are independent round-trips, so they overlap; awaiting the chunk\n // first would put the config fetch — and with it everything the app needs —\n // behind it, which measured ~180ms of extra time-to-usable on a 150ms-RTT\n // connection. Mapping the rejection to a value here also means a config\n // failure is handled from the start, never an unhandled rejection.\n const config = loadConfig().then(\n () => ({ ok: true }) as const,\n (error: unknown) => ({ ok: false, error }) as const,\n );\n\n const hasShell = adoptShell();\n const root = makeRoot();\n\n try {\n // The prerendered shell is already painted; the skeleton would replace it.\n if (!hasShell) {\n const { default: AppSkeleton } = await importSkeleton();\n root.render(<AppSkeleton />);\n }\n } catch (error) {\n console.error(\"[connect:boot] the app skeleton failed to load:\", error);\n root.render(<BootError error={error} />);\n return null;\n }\n\n const warmed = warm().catch(() => undefined);\n const result = await config;\n if (!result.ok) {\n console.error(\n \"[connect:boot] the runtime config failed to load:\",\n result.error,\n );\n root.render(<BootError error={result.error} />);\n return null;\n }\n // The app imports these modules anyway; warmed, they evaluate in tasks of their own.\n await warmed;\n\n return root;\n}\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AAoBA,SAAS,iBAAqC;CAC5C,IAAI;EAIF,OAHc,YAAY,iBAAiB,YAAY,CAAC,CAAC,EAG7C,EAAE;CAChB,QAAQ;EACN;CACF;AACF;;;;;;AAaA,SAAS,cAAc,MAAc,OAAqB;CACxD,IAAI;EACF,MAAM,KAAK,OAAO;EAClB,IAAI,CAAC,IAAI;EACT,GAAG,cAAc,GAAG,eAAe,CAAC;EACpC,GAAG,YAAY,QAAQ;CACzB,QAAQ,CAER;AACF;AAEA,SAAS,OAAO,MAAc,IAAkB;CAC9C,MAAM,QAAQ,KAAK,MAAM,EAAE;CAC3B,MAAM,QAAiC,EAAE,IAAI,MAAM;CACnD,MAAM,UAAU,eAAe;CAC/B,IAAI,SAAS,MAAM,aAAa;CAEhC,cAAc,MAAM,KAAK;CAKzB,IAAI,CAAC,YAAY,IAAI,MACnB,IAAI;EACF,QAAQ,KAAK,yBAAyB,KAAK,IAAI,MAAM,KAAK,KAAK;CACjE,QAAQ,CAER;CAGF,IAAI;EACF,MAAM,eAAe,QAAQ,KAAK;CACpC,QAAQ,CAER;AACF;;;;;;AAOA,SAAgB,0BAAsC;CACpD,IACE,OAAO,WAAW,eAClB,OAAO,wBAAwB,aAE/B,aAAa,KAAA;CAGf,MAAM,WAA8B,CAAC;;CAGrC,MAAM,UACJ,QACA,MACA,SACA,OAAO,SACE;EACT,OAAO,iBAAiB,MAAM,SAAS,EAAE,KAAK,CAAC;EAC/C,SAAS,WAAW,OAAO,oBAAoB,MAAM,OAAO,CAAC;CAC/D;CAGA,IAAI;EACF,MAAM,cAAc,IAAI,qBAAqB,SAAS;GACpD,KAAK,MAAM,SAAS,KA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AAgB,MAAM,eAAe;GACtD,KAAK,OAAO,oBAAC,aAAD,CAAc,CAAA,CAAC;EAC7B;CACF,SAAS,OAAO;EACd,QAAQ,MAAM,mDAAmD,KAAK;EACtE,KAAK,OAAO,oBAAC,WAAD,EAAkB,MAAQ,CAAA,CAAC;EACvC,OAAO;CACT;CAEA,MAAM,SAAS,KAAK,CAAC,CAAC,YAAY,KAAA,CAAS;CAC3C,MAAM,SAAS,MAAM;CACrB,IAAI,CAAC,OAAO,IAAI;EACd,QAAQ,MACN,qDACA,OAAO,KACT;EACA,KAAK,OAAO,oBAAC,WAAD,EAAW,OAAO,OAAO,MAAQ,CAAA,CAAC;EAC9C,OAAO;CACT;CAEA,MAAM;CAEN,OAAO;AACT","debug_id":"d99a714e-f500-5457-b725-d856d039036b"}
|
|
1
|
+
{"version":3,"file":"boot-Bj8cb1nU.js","sources":["../src/utils/performance-observer.ts","../src/warm-modules.ts","../src/boot.tsx"],"sourcesContent":["import { track } from \"../services/openpanel/buffer.js\";\nimport type { PHGlobal } from \"@powerhousedao/reactor-browser\";\n\n/**\n * Startup performance measurement.\n *\n * Captures First Contentful Paint (FCP) and Largest Contentful Paint (LCP) via\n * the Performance API and reports each to the OpenPanel analytics buffer (a\n * consent-gated, never-throwing queue). Call {@link initPerformanceObserver}\n * at the very top of the entry module, before the runtime config is fetched,\n * so FCP is caught even if the browser has already painted — a\n * `PerformanceObserver` with `buffered: true` replays entries that fired\n * before `observe()` was called.\n *\n * This module is intentionally dependency-light (only the OpenPanel event\n * buffer, which has no runtime imports of its own) so it is safe to load\n * before the runtime config is fetched. Every API access is guarded: nothing\n * here may throw into the application.\n */\n\nfunction navigationType(): string | undefined {\n try {\n const entry = performance.getEntriesByType(\"navigation\")[0] as\n | PerformanceNavigationTiming\n | undefined;\n return entry?.type; // \"navigate\" | \"reload\" | \"back_forward\" | \"prerender\"\n } catch {\n return undefined;\n }\n}\n\n// window.ph is the app's global bag (PHGlobal). This module owns a\n// `performance` sub-object it writes into; `PhWithPerformance` is a named\n// stand-in for that write so it type-checks without touching the shared\n// PHGlobal definition.\ntype PhWithPerformance = PHGlobal & { performance?: Record<string, number> };\n\n/**\n * Mirror the metric on `window.ph.performance` for devtools inspection. Only\n * writes to an already-existing `window.ph` (owned by the entry module) —\n * never creates or replaces it, so it can't clobber the app's global state.\n */\nfunction storeOnWindow(name: string, value: number): void {\n try {\n const ph = window.ph as PhWithPerformance | undefined;\n if (!ph) return;\n ph.performance = ph.performance ?? {};\n ph.performance[name] = value;\n } catch {\n // devtools mirror is best-effort only\n }\n}\n\nfunction report(name: string, ms: number): void {\n const value = Math.round(ms);\n const props: Record<string, unknown> = { ms: value };\n const navType = navigationType();\n if (navType) props.navigation = navType;\n\n storeOnWindow(name, value);\n\n // The console summary is a developer aid. In a production build it is noise\n // in every user's console and in every support screenshot, so it is gated\n // out of the bundle there.\n if (!import.meta.env.PROD) {\n try {\n console.info(`[connect:performance] ${name}: ${value}ms`, props);\n } catch {\n // console is best-effort only\n }\n }\n\n try {\n track(`performance.${name}`, props);\n } catch {\n // analytics must never throw into the app\n }\n}\n\n/**\n * Starts the observers. Returns a disposer that detaches all of them. The app\n * never needs it — the observers live as long as the page does — but it keeps\n * the module testable and leaves no listener behind.\n */\nexport function initPerformanceObserver(): () => void {\n if (\n typeof window === \"undefined\" ||\n typeof PerformanceObserver === \"undefined\"\n ) {\n return () => undefined;\n }\n\n const teardown: Array<() => void> = [];\n\n /** Registers a listener and queues its removal on dispose. */\n const listen = (\n target: EventTarget,\n type: string,\n handler: () => void,\n once = true,\n ): void => {\n target.addEventListener(type, handler, { once });\n teardown.push(() => target.removeEventListener(type, handler));\n };\n\n // FCP — from the \"paint\" buffer. It fires once, so stop observing after it.\n try {\n const fcpObserver = new PerformanceObserver((list) => {\n for (const entry of list.getEntries()) {\n if (entry.name === \"first-contentful-paint\") {\n fcpObserver.disconnect();\n report(\"first_contentful_paint\", entry.startTime);\n }\n }\n });\n fcpObserver.observe({ type: \"paint\", buffered: true });\n teardown.push(() => fcpObserver.disconnect());\n } catch (err) {\n console.warn(\"[connect:performance] FCP observer failed:\", err);\n }\n\n // LCP — the final value only settles on an interaction or page hide, so latch\n // the latest candidate and report on the first terminal signal.\n let lcpMs = 0;\n let lcpReported = false;\n let lcpObserver: PerformanceObserver | undefined;\n\n /** Latches the newest candidate of a batch. The last entry is the newest. */\n const latch = (entries: ArrayLike<{ startTime: number }>): void => {\n if (entries.length > 0) {\n lcpMs = entries[entries.length - 1].startTime;\n }\n };\n\n const reportLcp = (): void => {\n // Several terminal signals can fire in one session (a click, then the page\n // hiding, then pagehide). The metric is sent for the first one only: every\n // repeat would be a double-count downstream.\n if (lcpReported) return;\n lcpReported = true;\n\n // A PerformanceObserver delivers entries in a task of its own, so a\n // terminal signal early in the page's life arrives while the newest\n // candidate is still buffered. Drain it before disconnecting — otherwise\n // an early click costs the session its LCP entirely.\n try {\n latch(lcpObserver?.takeRecords() ?? []);\n } catch {\n // draining is best-effort; report whatever was already delivered\n }\n\n lcpObserver?.disconnect();\n if (lcpMs > 0) report(\"largest_contentful_paint\", lcpMs);\n };\n\n try {\n lcpObserver = new PerformanceObserver((list) => {\n latch(list.getEntries());\n });\n lcpObserver.observe({ type: \"largest-contentful-paint\", buffered: true });\n teardown.push(() => lcpObserver?.disconnect());\n\n listen(window, \"pagehide\", reportLcp);\n listen(window, \"pointerdown\", reportLcp);\n listen(window, \"keydown\", reportLcp);\n // Not `once`: a page that loads in a background tab, or that the user tabs\n // away from and back, fires visibilitychange more than once, and only the\n // transition to \"hidden\" is terminal. A one-shot listener would be spent\n // on an earlier \"visible\" event and never see the hide.\n listen(\n document,\n \"visibilitychange\",\n () => {\n if (document.visibilityState === \"hidden\") reportLcp();\n },\n false,\n );\n } catch (err) {\n console.warn(\"[connect:performance] LCP observer failed:\", err);\n }\n\n return () => {\n for (const detach of teardown) {\n try {\n detach();\n } catch {\n // teardown is best-effort only\n }\n }\n teardown.length = 0;\n };\n}\n","// The app graph's largest packages; none reads the runtime config when evaluated.\nconst STAGES: (() => Promise<unknown>)[] = [\n () => import(\"@powerhousedao/reactor-browser\"),\n () => import(\"@powerhousedao/design-system/connect\"),\n];\n\nconst nextTask = () => new Promise((resolve) => setTimeout(resolve, 0));\n\n/** Evaluates them one task each; imported with the app they'd be one long task. */\nexport async function warmModules(stages = STAGES) {\n for (const stage of stages) {\n await nextTask();\n // The app's own import reports a failure.\n await stage().catch(() => undefined);\n }\n}\n","// Imported by package name so projects resolve its fonts from Connect's dependencies.\nimport \"@powerhousedao/connect/fonts.css\";\nimport type { ComponentType, PropsWithChildren, ReactNode } from \"react\";\nimport { createRoot } from \"react-dom/client\";\nimport {\n adoptPrerenderedShell,\n hasPrerenderedShell,\n} from \"./components/prerendered-shell.js\";\nimport { loadRuntimeConfig } from \"./load-runtime-config.js\";\nimport { initPerformanceObserver } from \"./utils/performance-observer.js\";\nimport { warmModules } from \"./warm-modules.js\";\n\n/**\n * The two-phase startup shared by both entry points.\n *\n * Phase 1 paints the config-independent skeleton, so first contentful paint\n * does not wait on the `powerhouse.config.json` round-trip. Phase 2 awaits the\n * config and hands the caller back the root to render the config-dependent app\n * into — every module that reads the runtime config at module-evaluation\n * throws if the cache isn't warm, so the app graph may only be imported after\n * this resolves.\n *\n * Kept dependency-light on purpose: it loads before the config is fetched, so\n * nothing in its import graph may read the config.\n */\n\n/** All the bootstrap needs of a React root — and all a test has to stand in for. */\ntype RenderTarget = { render: (node: ReactNode) => void };\n\nexport type BootDeps = {\n loadConfig: () => Promise<unknown>;\n importSkeleton: () => Promise<{ default: ComponentType<PropsWithChildren> }>;\n createRoot: () => RenderTarget;\n initObserver: () => () => void;\n /** True when #root holds a prerendered shell, which stays until the app renders. */\n adoptShell: () => boolean;\n /** Evaluates the app's large packages while the config loads. */\n warmModules: () => Promise<unknown>;\n};\n\nconst defaultDeps: BootDeps = {\n loadConfig: () => loadRuntimeConfig(),\n importSkeleton: () => import(\"./components/app-skeleton.js\"),\n createRoot: () => createRoot(document.getElementById(\"root\")!),\n initObserver: initPerformanceObserver,\n adoptShell: () => {\n adoptPrerenderedShell(document.getElementById(\"root\"));\n return hasPrerenderedShell();\n },\n warmModules: () => warmModules(),\n};\n\n/**\n * Shown when startup cannot proceed. Deliberately built from plain elements:\n * this renders precisely when the runtime config is unavailable, so it must\n * not depend on anything that reads it.\n */\nfunction BootError({ error }: { error: unknown }): ReactNode {\n const message = error instanceof Error ? error.message : String(error);\n return (\n <div\n role=\"alert\"\n className=\"flex h-screen flex-col items-center justify-center gap-3 bg-background p-6 text-center\"\n >\n <h1 className=\"text-lg font-semibold text-foreground\">\n Connect could not start\n </h1>\n <p className=\"max-w-prose text-sm text-foreground\">\n Its runtime configuration could not be loaded. This is usually temporary\n — reloading often resolves it.\n </p>\n <pre className=\"max-w-prose overflow-x-auto rounded-sm bg-card px-3 py-2 text-left text-xs text-foreground\">\n {message}\n </pre>\n <button\n type=\"button\"\n className=\"rounded-sm bg-card px-4 py-2 text-sm font-medium text-foreground shadow-sm\"\n onClick={() => {\n window.location.reload();\n }}\n >\n Reload\n </button>\n </div>\n );\n}\n\n/**\n * Paints the skeleton, then waits for the runtime config.\n *\n * Returns the root to render the app into, or `null` when startup failed — in\n * which case the error state is already painted and the caller must not import\n * the config-dependent app. It resolves rather than rejecting on failure: both\n * entry points await this at their module's top level, where a rejection would\n * surface only as an unhandled rejection behind a skeleton that never goes\n * away.\n */\nexport async function bootConnect(\n overrides: Partial<BootDeps> = {},\n): Promise<RenderTarget | null> {\n const {\n loadConfig,\n importSkeleton,\n createRoot: makeRoot,\n initObserver,\n adoptShell,\n warmModules: warm,\n } = { ...defaultDeps, ...overrides };\n\n if (!window.ph) {\n window.ph = {};\n }\n\n // Before anything else: the observers use `buffered: true`, so they catch\n // the browser's paint even when setup runs a tick after it fired.\n initObserver();\n\n // Started here and awaited at the bottom. The config fetch and the skeleton\n // chunk are independent round-trips, so they overlap; awaiting the chunk\n // first would put the config fetch — and with it everything the app needs —\n // behind it, which measured ~180ms of extra time-to-usable on a 150ms-RTT\n // connection. Mapping the rejection to a value here also means a config\n // failure is handled from the start, never an unhandled rejection.\n const config = loadConfig().then(\n () => ({ ok: true }) as const,\n (error: unknown) => ({ ok: false, error }) as const,\n );\n\n const hasShell = adoptShell();\n const root = makeRoot();\n\n try {\n // The prerendered shell is already painted; the skeleton would replace it.\n if (!hasShell) {\n const { default: AppSkeleton } = await importSkeleton();\n root.render(<AppSkeleton />);\n }\n } catch (error) {\n console.error(\"[connect:boot] the app skeleton failed to load:\", error);\n root.render(<BootError error={error} />);\n return null;\n }\n\n const warmed = warm().catch(() => undefined);\n const result = await config;\n if (!result.ok) {\n console.error(\n \"[connect:boot] the runtime config failed to load:\",\n result.error,\n );\n root.render(<BootError error={result.error} />);\n return null;\n }\n // The app imports these modules anyway; warmed, they evaluate in tasks of their own.\n await warmed;\n\n return root;\n}\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AAoBA,SAAS,iBAAqC;CAC5C,IAAI;EAIF,OAHc,YAAY,iBAAiB,YAAY,CAAC,CAAC,EAG7C,EAAE;CAChB,QAAQ;EACN;CACF;AACF;;;;;;AAaA,SAAS,cAAc,MAAc,OAAqB;CACxD,IAAI;EACF,MAAM,KAAK,OAAO;EAClB,IAAI,CAAC,IAAI;EACT,GAAG,cAAc,GAAG,eAAe,CAAC;EACpC,GAAG,YAAY,QAAQ;CACzB,QAAQ,CAER;AACF;AAEA,SAAS,OAAO,MAAc,IAAkB;CAC9C,MAAM,QAAQ,KAAK,MAAM,EAAE;CAC3B,MAAM,QAAiC,EAAE,IAAI,MAAM;CACnD,MAAM,UAAU,eAAe;CAC/B,IAAI,SAAS,MAAM,aAAa;CAEhC,cAAc,MAAM,KAAK;CAKzB,IAAI,CAAC,YAAY,IAAI,MACnB,IAAI;EACF,QAAQ,KAAK,yBAAyB,KAAK,IAAI,MAAM,KAAK,KAAK;CACjE,QAAQ,CAER;CAGF,IAAI;EACF,MAAM,eAAe,QAAQ,KAAK;CACpC,Q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AAM,EACJ,YACA,gBACA,YAAY,UACZ,cACA,YACA,aAAa,SACX;EAAE,GAAG;EAAa,GAAG;CAAU;CAEnC,IAAI,CAAC,OAAO,IACV,OAAO,KAAK,CAAC;CAKf,aAAa;CAQb,MAAM,SAAS,WAAW,CAAC,CAAC,YACnB,EAAE,IAAI,KAAK,KACjB,WAAoB;EAAE,IAAI;EAAO;CAAM,EAC1C;CAEA,MAAM,WAAW,WAAW;CAC5B,MAAM,OAAO,SAAS;CAEtB,IAAI;EAEF,IAAI,CAAC,UAAU;GACb,MAAM,EAAE,SAAS,gBAAgB,MAAM,eAAe;GACtD,KAAK,OAAO,oBAAC,aAAD,CAAc,CAAA,CAAC;EAC7B;CACF,SAAS,OAAO;EACd,QAAQ,MAAM,mDAAmD,KAAK;EACtE,KAAK,OAAO,oBAAC,WAAD,EAAkB,MAAQ,CAAA,CAAC;EACvC,OAAO;CACT;CAEA,MAAM,SAAS,KAAK,CAAC,CAAC,YAAY,KAAA,CAAS;CAC3C,MAAM,SAAS,MAAM;CACrB,IAAI,CAAC,OAAO,IAAI;EACd,QAAQ,MACN,qDACA,OAAO,KACT;EACA,KAAK,OAAO,oBAAC,WAAD,EAAW,OAAO,OAAO,MAAQ,CAAA,CAAC;EAC9C,OAAO;CACT;CAEA,MAAM;CAEN,OAAO;AACT","debug_id":"26a90949-19d8-58b4-8c8d-bdb62f36dd23"}
|
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
|
|
2
|
-
!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="
|
|
2
|
+
!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="3b6ff1af-9638-5a47-91b9-639a64cf1a0a")}catch(e){}}();
|
|
3
3
|
import { buildTreeUrl, shortGitSha } from "@powerhousedao/shared";
|
|
4
4
|
//#region src/utils/build-info.ts
|
|
5
5
|
function getVersion() {
|
|
6
|
-
return "6.2.3-dev.
|
|
6
|
+
return "6.2.3-dev.79";
|
|
7
7
|
}
|
|
8
8
|
/** True in the tsdown dist projects install; false in the monorepo app, where Vite bundles the worker. */
|
|
9
9
|
function isPackagedConnectDist() {
|
|
10
10
|
return true;
|
|
11
11
|
}
|
|
12
12
|
function getGitSha() {
|
|
13
|
-
return "
|
|
13
|
+
return "e1e361faacfb9bf18a46dcb7a0c5af6033b6b453";
|
|
14
14
|
}
|
|
15
15
|
/**
|
|
16
16
|
* Build identity baked in at build time (define PH_CONNECT_BUILD_HASH —
|
|
@@ -28,5 +28,5 @@ function getGitUrl() {
|
|
|
28
28
|
//#endregion
|
|
29
29
|
export { isPackagedConnectDist as a, getVersion as i, getGitSha as n, shortGitSha as o, getGitUrl as r, getBuildHash as t };
|
|
30
30
|
|
|
31
|
-
//# sourceMappingURL=build-info-
|
|
32
|
-
//# debugId=
|
|
31
|
+
//# sourceMappingURL=build-info-DuD57dLW.js.map
|
|
32
|
+
//# debugId=3b6ff1af-9638-5a47-91b9-639a64cf1a0a
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"build-info-
|
|
1
|
+
{"version":3,"file":"build-info-DuD57dLW.js","sources":["../src/utils/build-info.ts"],"sourcesContent":["import { buildTreeUrl, shortGitSha } from \"@powerhousedao/shared\";\nimport { packageJson } from \"./package-json.js\";\n\nexport { shortGitSha };\n\ndeclare const CONNECT_VERSION: string | undefined;\ndeclare const CONNECT_GIT_SHA: string | undefined;\ndeclare const PH_CONNECT_BUILD_HASH: string | undefined;\ndeclare const CONNECT_PACKAGED_DIST: boolean | undefined;\n\nexport function getVersion(): string {\n if (typeof CONNECT_VERSION !== \"undefined\") return CONNECT_VERSION;\n return (\n process.env.WORKSPACE_VERSION ??\n process.env.npm_package_version ??\n packageJson.version\n );\n}\n\n/** True in the tsdown dist projects install; false in the monorepo app, where Vite bundles the worker. */\nexport function isPackagedConnectDist(): boolean {\n return typeof CONNECT_PACKAGED_DIST !== \"undefined\" && CONNECT_PACKAGED_DIST;\n}\n\nexport function getGitSha(): string {\n if (typeof CONNECT_GIT_SHA !== \"undefined\") return CONNECT_GIT_SHA;\n return process.env.WORKSPACE_GIT_SHA ?? \"unknown\";\n}\n\n/**\n * Build identity baked in at build time (define PH_CONNECT_BUILD_HASH —\n * see builder-tools' connectBuildHashPlugin). Identical builds of the same\n * inputs produce the same hash; any change to the deployed content (Connect\n * version, project config, package list, build options) changes it.\n */\nexport function getBuildHash(): string {\n if (typeof PH_CONNECT_BUILD_HASH !== \"undefined\")\n return PH_CONNECT_BUILD_HASH;\n return \"unknown\";\n}\n\nexport function getGitUrl(): string | null {\n return buildTreeUrl(getGitSha());\n}\n"],"names":[],"mappings":";;;;AAUA,SAAgB,aAAqB;CACS,OAAA;AAM9C;;AAGA,SAAgB,wBAAiC;CAC/C,OAAA;AACF;AAEA,SAAgB,YAAoB;CACU,OAAA;AAE9C;;;;;;;AAQA,SAAgB,eAAuB;CACrC,IAAI,OAAO,0BAA0B,aACnC,OAAO;CACT,OAAO;AACT;AAEA,SAAgB,YAA2B;CACzC,OAAO,aAAa,UAAU,CAAC;AACjC","debug_id":"3b6ff1af-9638-5a47-91b9-639a64cf1a0a"}
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
|
|
2
|
-
!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="
|
|
2
|
+
!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="7f6261c7-71ac-5ee7-8db1-33ac3de2cbc7")}catch(e){}}();
|
|
3
3
|
import { t as DriveIcon } from "./drive-icon-BIpd8edR.js";
|
|
4
|
-
import { n as setPrerenderingCustomShell, t as AppSkeleton } from "./app-skeleton-
|
|
5
|
-
import { i as Analytics, n as App, r as OpenPanel, t as AppLoader } from "./app-loader-
|
|
4
|
+
import { n as setPrerenderingCustomShell, t as AppSkeleton } from "./app-skeleton-CMUP2zaz.js";
|
|
5
|
+
import { i as Analytics, n as App, r as OpenPanel, t as AppLoader } from "./app-loader-7OUjO5bP.js";
|
|
6
6
|
import { t as setBannerShown } from "./preferences-store-DxYAnGCc.js";
|
|
7
7
|
import { t as Root } from "./root-B1Pq9x6S.js";
|
|
8
|
-
import { n as getConnectRouter, t as Router } from "./router-
|
|
8
|
+
import { n as getConnectRouter, t as Router } from "./router-CWIsjETx.js";
|
|
9
9
|
import { useEffect, useState } from "react";
|
|
10
10
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
11
11
|
import { ConnectSearchBar, Footer as Footer$1, FooterLink } from "@powerhousedao/design-system/connect";
|
|
@@ -117,5 +117,5 @@ const SearchBar = () => {
|
|
|
117
117
|
//#endregion
|
|
118
118
|
export { Analytics, App, AppLoader, AppSkeleton, DotsLoader, DriveIcon, Footer, OpenPanel, Root, Router, SearchBar, getConnectRouter, loadLocalPackage, setPrerenderingCustomShell };
|
|
119
119
|
|
|
120
|
-
//# sourceMappingURL=components-
|
|
121
|
-
//# debugId=
|
|
120
|
+
//# sourceMappingURL=components-C_JnePUO.js.map
|
|
121
|
+
//# debugId=7f6261c7-71ac-5ee7-8db1-33ac3de2cbc7
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"components-
|
|
1
|
+
{"version":3,"file":"components-C_JnePUO.js","sources":["../src/utils/openUrl.ts","../src/components/dots-loader.tsx","../src/components/footer.tsx","../src/components/search-bar.tsx"],"sourcesContent":["const openBrowserUrl = (url: string) => window.open(url, \"_blank\");\n\nexport const openUrl = openBrowserUrl;\n","import { useEffect, useState } from \"react\";\n\nexport const DotsLoader = () => {\n const [dots, setDots] = useState(0);\n\n useEffect(() => {\n const id = setInterval(() => {\n setDots((dots) => (dots === 3 ? 0 : dots + 1));\n }, 200);\n return () => {\n clearInterval(id);\n };\n }, []);\n\n return <span>{new Array(dots).fill(\".\").join(\"\")}</span>;\n};\n","import { setBannerShown } from \"../hooks/preferences-store.js\";\nimport { openUrl } from \"@powerhousedao/connect/utils\";\nimport { Icon } from \"@powerhousedao/design-system\";\nimport {\n Footer as DesignSystemFooter,\n FooterLink,\n} from \"@powerhousedao/design-system/connect\";\nimport { showPHModal } from \"@powerhousedao/reactor-browser\";\nimport { Trans } from \"react-i18next\";\n\nexport const Footer = () => {\n return (\n <DesignSystemFooter>\n <FooterLink onClick={() => setBannerShown(true)}>\n <Trans i18nKey=\"footer.cookiePolicy\" />\n </FooterLink>\n <FooterLink onClick={() => showPHModal({ type: \"disclaimer\" })}>\n <Trans i18nKey=\"footer.disclaimer\" />\n </FooterLink>\n <FooterLink\n id=\"ph-logo-link\"\n onClick={() => openUrl(\"https://www.powerhouse.inc/\")}\n >\n <Trans\n i18nKey=\"footer.builtWith\"\n components={{\n icon: (\n <Icon name=\"PowerhouseLogoSmall\" size={16} className=\"mx-1\" />\n ),\n }}\n />\n </FooterLink>\n </DesignSystemFooter>\n );\n};\n","import { Icon } from \"@powerhousedao/design-system\";\nimport type { ConnectSearchBarProps } from \"@powerhousedao/design-system/connect\";\nimport { ConnectSearchBar } from \"@powerhousedao/design-system/connect\";\nimport { useTranslation } from \"react-i18next\";\n\nconst defaultFilterItems: ConnectSearchBarProps[\"filterItems\"] = [\n {\n id: \"project\",\n label: \".project\",\n icon: <Icon name=\"Project\" color=\"#FF6A55\" size={16} />,\n },\n {\n id: \"budget\",\n label: \".budget\",\n icon: <Icon name=\"BarChart\" color=\"#8E55EA\" size={16} />,\n },\n {\n id: \"profile\",\n label: \".profile\",\n icon: <Icon name=\"Person\" color=\"#3E90F0\" size={16} />,\n },\n {\n id: \"legal\",\n label: \".legal\",\n icon: <Icon name=\"Briefcase\" color=\"#4BAB71\" size={16} />,\n },\n {\n id: \"atlas\",\n label: \".Atlas\",\n icon: <Icon name=\"Globe\" color=\"#FF8A00\" size={16} />,\n },\n];\n\nexport const SearchBar = () => {\n const { t } = useTranslation();\n\n return (\n <ConnectSearchBar\n className=\"m-4 shrink-0 bg-muted\"\n placeholder={t(\"searchbar.placeholder\")}\n filterLabel={t(\"searchbar.filterLabel\")}\n filterItems={defaultFilterItems}\n />\n );\n};\n"],"names":["DesignSystemFooter"],"mappings":";;;;;;;;;;;;;;;;AAAA,MAAM,kBAAkB,QAAgB,OAAO,KAAK,KAAK,QAAQ;AAEjE,MAAa,UAAU;;;ACAvB,MAAa,mBAAmB;CAC9B,MAAM,CAAC,MAAM,WAAW,SAAS,CAAC;CAElC,gBAAgB;EACd,MAAM,KAAK,kBAAkB;GAC3B,SAAS,SAAU,SAAS,IAAI,IAAI,OAAO,CAAE;EAC/C,GAAG,GAAG;EACN,aAAa;GACX,cAAc,EAAE;EAClB;CACF,GAAG,CAAC,CAAC;CAEL,OAAO,oBAAC,QAAD,EAAA,UAAO,IAAI,MAAM,IAAI,CAAC,CAAC,KAAK,GAAG,CAAC,CAAC,KAAK,EAAE,EAAQ,CAAA;AACzD;;;ACLA,MAAa,eAAe;CAC1B,OACE,qBAACA,UAAD,EAAA,UAAA;EACE,oBAAC,YAAD;GAAY,eAAe,eAAe,IAAI;GAC5C,UAAA,oBAAC,OAAD,EAAO,SAAQ,sBAAuB,CAAA;EAC5B,CAAA;EACZ,oBAAC,YAAD;GAAY,eAAe,YAAY,EAAE,MAAM,aAAa,CAAC;GAC3D,UAAA,oBAAC,OAAD,EAAO,SAAQ,oBAAqB,CAAA;EAC1B,CAAA;EACZ,oBAAC,YAAD;GACE,IAAG;GACH,eAAe,QAAQ,6BAA6B;GAEpD,UAAA,oBAAC,OAAD;IACE,SAAQ;IACR,YAAY,EACV,MACE,oBAAC,MAAD;KAAM,MAAK;KAAsB,MAAM;KAAI,WAAU;IAAQ,CAAA,EAEjE;GACD,CAAA;EACS,CAAA;CACM,EAAA,CAAA;AAExB;;;AC7BA,MAAM,qBAA2D;CAC/D;EACE,IAAI;EACJ,OAAO;EACP,MAAM,oBAAC,MAAD;GAAM,MAAK;GAAU,OAAM;GAAU,MAAM;EAAK,CAAA;CACxD;CACA;EACE,IAAI;EACJ,OAAO;EACP,MAAM,oBAAC,MAAD;GAAM,MAAK;GAAW,OAAM;GAAU,MAAM;EAAK,CAAA;CACzD;CACA;EACE,IAAI;EACJ,OAAO;EACP,MAAM,oBAAC,MAAD;GAAM,MAAK;GAAS,OAAM;GAAU,MAAM;EAAK,CAAA;CACvD;CACA;EACE,IAAI;EACJ,OAAO;EACP,MAAM,oBAAC,MAAD;GAAM,MAAK;GAAY,OAAM;GAAU,MAAM;EAAK,CAAA;CAC1D;CACA;EACE,IAAI;EACJ,OAAO;EACP,MAAM,oBAAC,MAAD;GAAM,MAAK;GAAQ,OAAM;GAAU,MAAM;EAAK,CAAA;CACtD;AACF;AAEA,MAAa,kBAAkB;CAC7B,MAAM,EAAE,MAAM,eAAe;CAE7B,OACE,oBAAC,kBAAD;EACE,WAAU;EACV,aAAa,EAAE,uBAAuB;EACtC,aAAa,EAAE,uBAAuB;EACtC,aAAa;CACd,CAAA;AAEL","debug_id":"7f6261c7-71ac-5ee7-8db1-33ac3de2cbc7"}
|
package/dist/generic.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { a as
|
|
1
|
+
import { a as SidebarItem, c as useNavRoutes, i as ModalFrameProps, l as useSidebarMode, n as ContentOutlet, o as useConnectChrome, r as ModalDialog, s as useDriveRouteData, t as ConnectChrome } from "./index-D7c2WAbn.js";
|
|
2
2
|
import React$1, { ReactNode } from "react";
|
|
3
3
|
import { ConnectSettingsTab } from "@powerhousedao/connect-core/router";
|
|
4
4
|
import "@powerhousedao/reactor-browser";
|
|
@@ -9,10 +9,16 @@ import { DocumentDriveDocument } from "@powerhousedao/shared/document-drive";
|
|
|
9
9
|
type AppLayoutProps = {
|
|
10
10
|
/** Replaces Connect's sidebar, e.g. `<ConnectSidebar extraItems={...} />`. */
|
|
11
11
|
sidebar?: ReactNode;
|
|
12
|
+
/** Above the matched route, beside the sidebar, e.g. a header bar. */
|
|
13
|
+
header?: ReactNode;
|
|
14
|
+
/** Below the matched route, beside the sidebar. */
|
|
15
|
+
footer?: ReactNode;
|
|
12
16
|
};
|
|
13
|
-
/** The `_app` layout: the sidebar beside the matched route
|
|
14
|
-
*
|
|
15
|
-
|
|
17
|
+
/** The `_app` layout: the sidebar beside the matched route, with an optional
|
|
18
|
+
* header and footer around it. Embedded mode drops all three, and
|
|
19
|
+
* `staticData.sidebar: "hidden"` the sidebar; `useConnectChrome()` tells a
|
|
20
|
+
* replaced layout the same. */
|
|
21
|
+
export declare function AppLayout({ sidebar, header, footer }?: AppLayoutProps): import("react/jsx-runtime").JSX.Element;
|
|
16
22
|
//#endregion
|
|
17
23
|
//#region src/generic/layout/route-views.d.ts
|
|
18
24
|
/** A loader on a cold start; otherwise the open view stays while loading. */
|
|
@@ -129,6 +135,6 @@ export declare const genericSettingsTabs: {
|
|
|
129
135
|
};
|
|
130
136
|
};
|
|
131
137
|
//#endregion
|
|
132
|
-
export { type AppLayoutProps, Sidebar as ConnectSidebar, type SidebarProps as ConnectSidebarProps, ContentOutlet, ModalDialog, type ModalFrameProps, SidebarItem, useDriveRouteData, useNavRoutes, useSidebarMode };
|
|
138
|
+
export { type AppLayoutProps, type ConnectChrome, Sidebar as ConnectSidebar, type SidebarProps as ConnectSidebarProps, ContentOutlet, ModalDialog, type ModalFrameProps, SidebarItem, useConnectChrome, useDriveRouteData, useNavRoutes, useSidebarMode };
|
|
133
139
|
export {};
|
|
134
140
|
//# sourceMappingURL=generic.d.ts.map
|
package/dist/generic.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"generic.d.ts","names":[],"sources":["../src/generic/layout/app-layout.tsx","../src/generic/layout/route-views.tsx","../src/generic/layout/sidebar.tsx","../src/generic/editors/open-document.tsx","../src/generic/pages/content.tsx","../src/generic/pages/use-drive-auth-gate.ts","../src/generic/settings/about.tsx","../src/generic/settings/ai-assistant.tsx","../src/generic/settings/danger-zone.tsx","../src/generic/settings/default-editor.tsx","../src/generic/settings/package-manager.tsx","../src/generic/settings/settings-page.tsx","../src/generic/settings/index.ts","../src/generic/settings/tabs.ts","../src/generic/settings-tabs.ts"],"mappings":";;;;;;;;
|
|
1
|
+
{"version":3,"file":"generic.d.ts","names":[],"sources":["../src/generic/layout/app-layout.tsx","../src/generic/layout/route-views.tsx","../src/generic/layout/sidebar.tsx","../src/generic/editors/open-document.tsx","../src/generic/pages/content.tsx","../src/generic/pages/use-drive-auth-gate.ts","../src/generic/settings/about.tsx","../src/generic/settings/ai-assistant.tsx","../src/generic/settings/danger-zone.tsx","../src/generic/settings/default-editor.tsx","../src/generic/settings/package-manager.tsx","../src/generic/settings/settings-page.tsx","../src/generic/settings/index.ts","../src/generic/settings/tabs.ts","../src/generic/settings-tabs.ts"],"mappings":";;;;;;;;KAOY;;EAEV,UAAU;;EAEV,SAAS;;EAET,SAAS;;;;;;wBAOK,YAAY,SAAS,QAAQ,WAAU,6CAAmB,IAAA;;;;wBCX1D,4CAAY,IAAA;;;;wBC6CZ,iDAAiB,IAAA;;wBAiDjB,+CAAe,IAAA;KAWnB;;EAEV,aAAa;;EAEb;;;iBAIc,UAAU,YAAY,cAAa,2CAAiB,IAAA;;;;;wBC7GpD,4CAAY,IAAA;;;;;wBCgBZ,oCAAI,IAAA;;wBAaJ,oBAAoB;EAAc,WAAW;gCAAW,IAAA;;wBAMxD,gDAAgB,IAAA;;;wBAMhB,2CAAW,IAAA;;wBAoBX,wCAAQ,IAAA;;wBAQR,gBAAgB;EAAW,OAAO;gCAAuB,IAAA;;;;wBCuBzD,oBAAoB;;;cCpFvB,OAAO,MAAM;;;;;;;;;cCGb,aAAa,MAAM;;;cCfnB,YAAY,MAAM;;;cCDlB,eAAe,MAAM;;;cCWrB,uBAAuB,QAAM;;;;iBCgB1B,8CAAY,IAAA;;;;;;;;qBE7Bf;;qBAOA,+CAAY;;wBAGT,YACd,MAAM,qBAAqB,oEAA+B;;;;;qBCJ/C;EACX;;;;;EAMA;;;;;EAKA;;;;;EAKA;;;;;EAMA"}
|
package/dist/generic.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
|
|
2
2
|
!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="a22e7ee3-a1b4-5773-abee-29f7a20f6fb3")}catch(e){}}();
|
|
3
|
-
import { a as
|
|
3
|
+
import { a as useDriveRouteData, i as useConnectChrome, n as ModalDialog, o as useNavRoutes, r as SidebarItem, s as useSidebarMode, t as ContentOutlet } from "./layout-Dj3_KscE.js";
|
|
4
4
|
import { r as ErrorBoundary } from "./error-boundary-BsUBww61.js";
|
|
5
|
-
import { _ as SidebarNavItems, a as settingsTab, c as Home, d as NodeView, f as DrivePending, g as SidebarDriveItems, h as Sidebar, i as aiAssistantEnabled, l as HomeAddDriveItem, m as AppLayout, o as ConnectHomeScreen, r as SettingsPage, s as DriveLayout, t as genericSettingsTabs, u as HomeDriveItem, v as useVisibleDrives } from "./settings-tabs-
|
|
5
|
+
import { _ as SidebarNavItems, a as settingsTab, c as Home, d as NodeView, f as DrivePending, g as SidebarDriveItems, h as Sidebar, i as aiAssistantEnabled, l as HomeAddDriveItem, m as AppLayout, o as ConnectHomeScreen, r as SettingsPage, s as DriveLayout, t as genericSettingsTabs, u as HomeDriveItem, v as useVisibleDrives } from "./settings-tabs-CX9Ui6ph.js";
|
|
6
6
|
import { n as EditorLoader } from "./document-editor-container-FNIEsf8H.js";
|
|
7
7
|
import { Suspense, lazy } from "react";
|
|
8
8
|
import { jsx } from "react/jsx-runtime";
|
|
@@ -25,7 +25,7 @@ function OpenDocument() {
|
|
|
25
25
|
});
|
|
26
26
|
}
|
|
27
27
|
//#endregion
|
|
28
|
-
export { AppLayout, ConnectHomeScreen, Sidebar as ConnectSidebar, ContentOutlet, DriveLayout, DrivePending, Home, HomeAddDriveItem, HomeDriveItem, ModalDialog, NodeView, OpenDocument, SettingsPage, SidebarDriveItems, SidebarItem, SidebarNavItems, aiAssistantEnabled, genericSettingsTabs, settingsTab, useDriveRouteData, useNavRoutes, useSidebarMode, useVisibleDrives };
|
|
28
|
+
export { AppLayout, ConnectHomeScreen, Sidebar as ConnectSidebar, ContentOutlet, DriveLayout, DrivePending, Home, HomeAddDriveItem, HomeDriveItem, ModalDialog, NodeView, OpenDocument, SettingsPage, SidebarDriveItems, SidebarItem, SidebarNavItems, aiAssistantEnabled, genericSettingsTabs, settingsTab, useConnectChrome, useDriveRouteData, useNavRoutes, useSidebarMode, useVisibleDrives };
|
|
29
29
|
|
|
30
30
|
//# sourceMappingURL=generic.js.map
|
|
31
31
|
//# debugId=a22e7ee3-a1b4-5773-abee-29f7a20f6fb3
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { ConnectChrome, ContentOutlet as ContentOutlet$1, ModalDialog, ModalFrameProps, useConnectChrome as useConnectChrome$1, useDriveRouteData as useDriveRouteData$1, useNavRoutes as useNavRoutes$1, useSidebarMode } from "@powerhousedao/connect-core/router";
|
|
2
|
+
import { SidebarItem as SidebarItem$1 } from "@powerhousedao/design-system/connect";
|
|
3
|
+
export { SidebarItem$1 as a, useNavRoutes$1 as c, ModalFrameProps as i, useSidebarMode as l, ContentOutlet$1 as n, useConnectChrome$1 as o, ModalDialog as r, useDriveRouteData$1 as s, ConnectChrome as t };
|
|
4
|
+
export {};
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { ContentOutlet as ContentOutlet$1, ModalDialog, useConnectChrome as useConnectChrome$1, useDriveRouteData as useDriveRouteData$1, useNavRoutes as useNavRoutes$1, useSidebarMode } from "@powerhousedao/connect-core/router";
|
|
2
|
+
import { SidebarItem as SidebarItem$1 } from "@powerhousedao/design-system/connect";
|
|
3
|
+
export { useDriveRouteData$1 as a, useConnectChrome$1 as i, ModalDialog as n, useNavRoutes$1 as o, SidebarItem$1 as r, useSidebarMode as s, ContentOutlet$1 as t };
|
|
4
|
+
!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="f1bd78ef-ea93-5f11-a8c5-0242044e36ec")}catch(e){}}();
|
|
5
|
+
//# debugId=f1bd78ef-ea93-5f11-a8c5-0242044e36ec
|
package/dist/layout.d.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { a as
|
|
2
|
-
export { ContentOutlet, ModalDialog, type ModalFrameProps, SidebarItem, useDriveRouteData, useNavRoutes, useSidebarMode };
|
|
1
|
+
import { a as SidebarItem, c as useNavRoutes, i as ModalFrameProps, l as useSidebarMode, n as ContentOutlet, o as useConnectChrome, r as ModalDialog, s as useDriveRouteData, t as ConnectChrome } from "./index-D7c2WAbn.js";
|
|
2
|
+
export { type ConnectChrome, ContentOutlet, ModalDialog, type ModalFrameProps, SidebarItem, useConnectChrome, useDriveRouteData, useNavRoutes, useSidebarMode };
|
|
3
3
|
export {};
|
package/dist/layout.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { a as
|
|
2
|
-
export { ContentOutlet, ModalDialog, SidebarItem, useDriveRouteData, useNavRoutes, useSidebarMode };
|
|
3
|
-
!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="
|
|
4
|
-
//# debugId=
|
|
1
|
+
import { a as useDriveRouteData, i as useConnectChrome, n as ModalDialog, o as useNavRoutes, r as SidebarItem, s as useSidebarMode, t as ContentOutlet } from "./layout-Dj3_KscE.js";
|
|
2
|
+
export { ContentOutlet, ModalDialog, SidebarItem, useConnectChrome, useDriveRouteData, useNavRoutes, useSidebarMode };
|
|
3
|
+
!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="d8c2bee4-909a-5cec-b0ec-0ebf05616aa7")}catch(e){}}();
|
|
4
|
+
//# debugId=d8c2bee4-909a-5cec-b0ec-0ebf05616aa7
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
|
|
2
|
-
!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="
|
|
3
|
-
import { t as loadRuntimeConfig } from "./load-runtime-config-
|
|
2
|
+
!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="5a63de1a-5ec3-55af-869c-6b19bc5a0b66")}catch(e){}}();
|
|
3
|
+
import { t as loadRuntimeConfig } from "./load-runtime-config-Ccr-CSrB.js";
|
|
4
4
|
import { r as connectConfig } from "./connect.config-DL9nKtlW.js";
|
|
5
|
-
import { t as getBuildHash } from "./build-info-
|
|
5
|
+
import { t as getBuildHash } from "./build-info-DuD57dLW.js";
|
|
6
6
|
import { r as setUser } from "./sentry-Cuc_Nbba.js";
|
|
7
7
|
import "./i18n-D9WYPgk9.js";
|
|
8
8
|
import { a as detectMigrationMajor, o as detectReactorPgMajor } from "./connection-state-Bwm9Agwy.js";
|
|
9
9
|
import { n as seedPendingPgVersion } from "./pglite-seed-QPbGbLB_.js";
|
|
10
|
-
import { n as createReactor } from "./reactor-
|
|
10
|
+
import { n as createReactor } from "./reactor-Dz5I-nuF.js";
|
|
11
11
|
import { useEffect } from "react";
|
|
12
12
|
import { initTheme, useUser } from "@powerhousedao/reactor-browser";
|
|
13
13
|
import { logger } from "document-model";
|
|
@@ -129,5 +129,5 @@ async function loadComponent(localPackage, store) {
|
|
|
129
129
|
//#endregion
|
|
130
130
|
export { loadComponent };
|
|
131
131
|
|
|
132
|
-
//# sourceMappingURL=load-
|
|
133
|
-
//# debugId=
|
|
132
|
+
//# sourceMappingURL=load-Cx5LF8Oq.js.map
|
|
133
|
+
//# debugId=5a63de1a-5ec3-55af-869c-6b19bc5a0b66
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"load-
|
|
1
|
+
{"version":3,"file":"load-Cx5LF8Oq.js","sources":["../src/hooks/utils.ts","../src/hooks/useCheckLatestVersion.ts","../src/store/user.ts","../src/components/load.tsx"],"sourcesContent":["import { getBuildHash } from \"../utils/build-info.js\";\n\nexport const isMac = window.navigator.appVersion.includes(\"Mac\");\n\nexport interface BuildHashStatus {\n /** Hash baked into the running build. */\n currentHash: string;\n /** Hash the server is currently serving. */\n deployedHash: string;\n /** true when the running build matches what the server serves. */\n isCurrent: boolean;\n}\n\n/**\n * Same-origin build-identity probe. The build bakes a hash of the inputs that\n * determine the deployed content into the bundle (define\n * `PH_CONNECT_BUILD_HASH`, see builder-tools' connectBuildHashPlugin) and\n * emits `build-hash.json` next to the app (served no-cache). Comparing the\n * two tells us whether the server is serving a different build than the one\n * this page was loaded from — the reliable \"a new deploy went out\" signal.\n * Unlike the old GitHub-raw version check it works on localhost (it compares\n * against what the origin actually serves, not a remote branch head) and\n * needs no network beyond the app's own origin.\n *\n * Returns null when there is nothing to compare: dev/studio builds (no hash\n * baked), a server predating `build-hash.json`, an offline fetch, or a\n * malformed body.\n */\nexport const getBuildHashStatus = async (): Promise<BuildHashStatus | null> => {\n const currentHash = getBuildHash();\n if (!currentHash || currentHash === \"unknown\") return null;\n try {\n const result = await fetch(`${import.meta.env.BASE_URL}build-hash.json`, {\n cache: \"no-cache\",\n });\n if (!result.ok) return null;\n const data = (await result.json()) as { hash?: unknown };\n if (typeof data.hash !== \"string\" || !data.hash) return null;\n return {\n currentHash,\n deployedHash: data.hash,\n isCurrent: data.hash === currentHash,\n };\n } catch {\n return null;\n }\n};\n","import { connectConfig } from \"@powerhousedao/connect/config\";\nimport { getBuildHashStatus } from \"./utils.js\";\nimport { logger } from \"document-model\";\nimport { useEffect } from \"react\";\n\n// Session-scoped guard: records the deployed hash this tab already reloaded\n// for, so a broken or rolling deploy (server hash keeps changing under us)\n// cannot turn the tab into a reload loop. Cleared implicitly with the tab.\nconst RELOADED_FOR_KEY = \"ph-reloaded-for-build-hash\";\n\n/**\n * Drop the service worker's stale caches (precache + the NetworkFirst shell\n * cache) before reloading onto a new deploy, so the post-reload navigation\n * is answered from the network / fresh build instead of leftovers of the\n * build we are leaving. Best-effort: if the Caches API is unavailable or a\n * delete fails, the reload still picks up the new shell (the navigation\n * route is NetworkFirst).\n */\nasync function clearStaleCaches(): Promise<void> {\n try {\n if (!(\"caches\" in window)) return;\n const keys = await window.caches.keys();\n await Promise.all(\n keys\n .filter((key) => key.includes(\"precache\") || key.includes(\"ph-shell\"))\n .map((key) => window.caches.delete(key)),\n );\n } catch (error) {\n logger.warn(\n \"Failed to clear stale caches before update reload @error\",\n error,\n );\n }\n}\n\n/**\n * Detects that the server is serving a different build than the one this\n * page was loaded from (a new deploy) and reloads onto it — once per session\n * per deployed hash. Checked on mount and whenever the tab returns to the\n * foreground, so a deploy that lands while the tab sits open is picked up on\n * the next focus without a manual reload. The in-tab \"new version available\"\n * service-worker prompt (ServiceWorkerUpdatePrompt) remains the opt-in path\n * for workers that are waiting but not yet controlling.\n */\nexport const useCheckLatestVersion = () => {\n useEffect(() => {\n if (\n import.meta.env.MODE === \"development\" ||\n connectConfig.studioMode ||\n !connectConfig.warnOutdatedApp\n ) {\n return;\n }\n\n const checkBuildHash = async () => {\n const status = await getBuildHashStatus();\n if (!status || status.isCurrent) return;\n\n const reloadedFor = window.sessionStorage.getItem(RELOADED_FOR_KEY);\n if (reloadedFor === status.deployedHash) return;\n window.sessionStorage.setItem(RELOADED_FOR_KEY, status.deployedHash);\n\n logger.info(\n \"New deploy detected — reloading from build @currentHash to @deployedHash\",\n status.currentHash,\n status.deployedHash,\n );\n await clearStaleCaches();\n window.location.reload();\n };\n\n void checkBuildHash();\n const onVisibilityChange = () => {\n if (document.visibilityState === \"visible\") void checkBuildHash();\n };\n document.addEventListener(\"visibilitychange\", onVisibilityChange);\n return () => {\n document.removeEventListener(\"visibilitychange\", onVisibilityChange);\n };\n }, []);\n};\n","import { useUser } from \"@powerhousedao/reactor-browser\";\nimport type { User as SentryUser } from \"@sentry/react\";\nimport { useEffect } from \"react\";\nimport { setUser as setSentryUser } from \"../services/sentry.js\";\n\nexport function useSetSentryUser() {\n const user = useUser();\n useEffect(() => {\n let sentryUser: SentryUser | null = null;\n if (user) {\n // saves the user info except the credential\n const { credential: _credential, ...rest } = user;\n sentryUser = { id: rest.did, username: rest.ens?.name, ...rest };\n }\n setSentryUser(sentryUser);\n }, [user]);\n}\n","import { useCheckLatestVersion } from \"@powerhousedao/connect/hooks\";\nimport \"@powerhousedao/connect/i18n\";\nimport { createReactor, useSetSentryUser } from \"@powerhousedao/connect/store\";\nimport {\n detectMigrationMajor,\n detectReactorPgMajor,\n seedPendingPgVersion,\n} from \"@powerhousedao/connect/utils\";\nimport type { PHStore } from \"@powerhousedao/reactor-browser\";\nimport { initTheme } from \"@powerhousedao/reactor-browser\";\nimport type { DocumentModelLib } from \"document-model\";\nimport { type ReactNode } from \"react\";\nimport { loadRuntimeConfig } from \"../load-runtime-config.js\";\n\nexport async function loadComponent(\n localPackage: DocumentModelLib | Promise<DocumentModelLib> | undefined,\n store: PHStore,\n) {\n await seedPendingPgVersion();\n await Promise.all([detectReactorPgMajor(), detectMigrationMajor()]);\n await loadRuntimeConfig();\n await createReactor(await localPackage, store);\n return {\n default: ({ children }: { children?: ReactNode }) => {\n initTheme();\n // eslint-disable-next-line react-hooks/rules-of-hooks\n useSetSentryUser();\n // eslint-disable-next-line react-hooks/rules-of-hooks\n useCheckLatestVersion();\n return children;\n },\n };\n}\n"],"names":[],"mappings":";;;;;;;;;;;;;AAEqB,OAAO,UAAU,WAAW,SAAS,KAAK;;;;;;;;;;;;;;;;AA0B/D,MAAa,qBAAqB,YAA6C;CAC7E,MAAM,cAAc,aAAa;CACjC,IAAI,CAAC,eAAe,gBAAgB,WAAW,OAAO;CACtD,IAAI;EACF,MAAM,SAAS,MAAM,MAAM,GAAG,YAAY,IAAI,SAAS,kBAAkB,EACvE,OAAO,WACT,CAAC;EACD,IAAI,CAAC,OAAO,IAAI,OAAO;EACvB,MAAM,OAAQ,MAAM,OAAO,KAAK;EAChC,IAAI,OAAO,KAAK,SAAS,YAAY,CAAC,KAAK,MAAM,OAAO;EACxD,OAAO;GACL;GACA,cAAc,KAAK;GACnB,WAAW,KAAK,SAAS;EAC3B;CACF,QAAQ;EACN,OAAO;CACT;AACF;;;ACtCA,MAAM,mBAAmB;;;;;;;;;AAUzB,eAAe,mBAAkC;CAC/C,IAAI;EACF,IAAI,EAAE,YAAY,SAAS;EAC3B,MAAM,OAAO,MAAM,OAAO,OAAO,KAAK;EACtC,MAAM,QAAQ,IACZ,KACG,QAAQ,QAAQ,IAAI,SAAS,UAAU,KAAK,IAAI,SAAS,UAAU,CAAC,CAAC,CACrE,KAAK,QAAQ,OAAO,OAAO,OAAO,GAAG,CAAC,CAC3C;CACF,SAAS,OAAO;EACd,OAAO,KACL,4DACA,KACF;CACF;AACF;;;;;;;;;;AAWA,MAAa,8BA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{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="
|
|
2
|
+
!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="c0e13c2c-38ab-5f1d-8cae-8bc2d4a34855")}catch(e){}}();
|
|
3
3
|
import { loadRuntimeConfig } from "@powerhousedao/connect-core/runtime-config";
|
|
4
4
|
//#region src/load-runtime-config.ts
|
|
5
|
-
const connectPlugins = () => import("./plugins-
|
|
5
|
+
const connectPlugins = () => import("./plugins-BPEiqk54.js").then((m) => m.connectPlugins);
|
|
6
6
|
/** Core's loader, with Connect's built-in plugins for the composition. */
|
|
7
7
|
function loadRuntimeConfig$1() {
|
|
8
8
|
return loadRuntimeConfig({ plugins: connectPlugins });
|
|
@@ -10,5 +10,5 @@ function loadRuntimeConfig$1() {
|
|
|
10
10
|
//#endregion
|
|
11
11
|
export { loadRuntimeConfig$1 as t };
|
|
12
12
|
|
|
13
|
-
//# sourceMappingURL=load-runtime-config-
|
|
14
|
-
//# debugId=
|
|
13
|
+
//# sourceMappingURL=load-runtime-config-Ccr-CSrB.js.map
|
|
14
|
+
//# debugId=c0e13c2c-38ab-5f1d-8cae-8bc2d4a34855
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"load-runtime-config-
|
|
1
|
+
{"version":3,"file":"load-runtime-config-Ccr-CSrB.js","sources":["../src/load-runtime-config.ts"],"sourcesContent":["import { loadRuntimeConfig as loadCoreRuntimeConfig } from \"@powerhousedao/connect-core/runtime-config\";\n\n// The built-ins: a declared composition's transform the config, and the active\n// ones' UI loads (every one's without a composition).\nconst connectPlugins = () =>\n import(\"./plugins/index.js\").then((m) => m.connectPlugins);\n\n/** Core's loader, with Connect's built-in plugins for the composition. */\nexport function loadRuntimeConfig() {\n return loadCoreRuntimeConfig({ plugins: connectPlugins });\n}\n"],"names":["loadRuntimeConfig","loadCoreRuntimeConfig"],"mappings":";;;;AAIA,MAAM,uBACJ,OAAO,wBAAqB,CAAC,MAAM,MAAM,EAAE,cAAc;;AAG3D,SAAgBA,sBAAoB;CAClC,OAAOC,kBAAsB,EAAE,SAAS,eAAe,CAAC;AAC1D","debug_id":"c0e13c2c-38ab-5f1d-8cae-8bc2d4a34855"}
|
package/dist/main.js
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
|
|
2
2
|
!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="1f52a123-ef3c-5452-bdfa-b05d09bb17c0")}catch(e){}}();
|
|
3
|
-
import { t as bootConnect } from "./boot-
|
|
3
|
+
import { t as bootConnect } from "./boot-Bj8cb1nU.js";
|
|
4
4
|
import { jsx } from "react/jsx-runtime";
|
|
5
5
|
//#region main.tsx
|
|
6
6
|
const root = await bootConnect();
|
|
7
7
|
if (root) {
|
|
8
|
-
const { AppLoader } = await import("./app-loader-
|
|
8
|
+
const { AppLoader } = await import("./app-loader-DNAJ-Yy4.js");
|
|
9
9
|
root.render(/* @__PURE__ */ jsx(AppLoader, {}));
|
|
10
10
|
}
|
|
11
11
|
//#endregion
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
|
|
2
|
-
!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="
|
|
2
|
+
!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="d4d4d7dd-90d4-5ea0-9405-4e1ee83297c8")}catch(e){}}();
|
|
3
3
|
import { t as refreshPwaManifestLink } from "./pwa-manifest-link-DQRJpF0r.js";
|
|
4
4
|
import { holdConnectRoutes, registerPackageRoutes } from "@powerhousedao/connect-core/router";
|
|
5
5
|
import { BrowserLocalStorage } from "@powerhousedao/reactor-browser";
|
|
@@ -222,14 +222,14 @@ var BrowserPackageManager = class {
|
|
|
222
222
|
this.addLocalPackage(common.manifest.name, genericChrome ? common : {
|
|
223
223
|
...common,
|
|
224
224
|
editors: []
|
|
225
|
-
}, "6.2.3-dev.
|
|
225
|
+
}, "6.2.3-dev.79");
|
|
226
226
|
if (studioMode) {
|
|
227
227
|
const vetra = await import("@powerhousedao/vetra");
|
|
228
|
-
this.addLocalPackage(vetra.manifest.name, vetra, "6.2.3-dev.
|
|
228
|
+
this.addLocalPackage(vetra.manifest.name, vetra, "6.2.3-dev.79");
|
|
229
229
|
}
|
|
230
230
|
if (workflowsEnabled) {
|
|
231
231
|
const workflow = await import("@powerhousedao/workflow");
|
|
232
|
-
this.addLocalPackage(workflow.manifest.name, workflow, "6.2.3-dev.
|
|
232
|
+
this.addLocalPackage(workflow.manifest.name, workflow, "6.2.3-dev.79");
|
|
233
233
|
}
|
|
234
234
|
if (localPackage) this.updateLocalPackage(localPackage, localPackageVersion);
|
|
235
235
|
for (const packageName of this.#storage.keys()) {
|
|
@@ -539,5 +539,5 @@ var BrowserPackageManager = class {
|
|
|
539
539
|
//#endregion
|
|
540
540
|
export { pageSharedImports as i, sharedDepMismatchWarnings as n, getSharedDeps as r, BrowserPackageManager as t };
|
|
541
541
|
|
|
542
|
-
//# sourceMappingURL=package-manager-
|
|
543
|
-
//# debugId=
|
|
542
|
+
//# sourceMappingURL=package-manager-CxeIUE9M.js.map
|
|
543
|
+
//# debugId=d4d4d7dd-90d4-5ea0-9405-4e1ee83297c8
|