@powerhousedao/connect 6.2.3-dev.67 → 6.2.3-dev.69
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/dist/{ClearStorageModal-_03VgDb5.js → ClearStorageModal-tBOi6FhW.js} +4 -4
- package/dist/{ClearStorageModal-_03VgDb5.js.map → ClearStorageModal-tBOi6FhW.js.map} +1 -1
- package/dist/{DebugSettingsModal-CGScJ_r2.js → DebugSettingsModal-BBGE669G.js} +4 -4
- package/dist/{DebugSettingsModal-CGScJ_r2.js.map → DebugSettingsModal-BBGE669G.js.map} +1 -1
- package/dist/{InspectorModal-DA_TGmM6.js → InspectorModal-ClrhUznk.js} +4 -4
- package/dist/{InspectorModal-DA_TGmM6.js.map → InspectorModal-ClrhUznk.js.map} +1 -1
- package/dist/app-loader-BImUNqTK.js +4 -0
- package/dist/{app-loader-CEN_4I3I.js → app-loader-Ctuh_wUx.js} +4 -4
- package/dist/{app-loader-CEN_4I3I.js.map → app-loader-Ctuh_wUx.js.map} +1 -1
- package/dist/{boot-JTGLJtmJ.js → boot-BhAEKTca.js} +4 -4
- package/dist/{boot-JTGLJtmJ.js.map → boot-BhAEKTca.js.map} +1 -1
- package/dist/{build-info-DkY9PU7c.js → build-info-D1Gpyvek.js} +5 -5
- package/dist/{build-info-DkY9PU7c.js.map → build-info-D1Gpyvek.js.map} +1 -1
- package/dist/{components-2wvJ3_Ho.js → components-Dan37g4U.js} +4 -4
- package/dist/{components-2wvJ3_Ho.js.map → components-Dan37g4U.js.map} +1 -1
- package/dist/generic.js +1 -1
- package/dist/{load-CCCHqC0d.js → load-4y9lctgm.js} +6 -6
- package/dist/{load-CCCHqC0d.js.map → load-4y9lctgm.js.map} +1 -1
- package/dist/{load-runtime-config-Dhy-b5wT.js → load-runtime-config-BvMss48m.js} +4 -4
- package/dist/{load-runtime-config-Dhy-b5wT.js.map → load-runtime-config-BvMss48m.js.map} +1 -1
- package/dist/main.js +2 -2
- package/dist/{plugins-B9VBgzio.js → plugins-Yr4sDuPn.js} +4 -4
- package/dist/{plugins-B9VBgzio.js.map → plugins-Yr4sDuPn.js.map} +1 -1
- package/dist/prerender.js +1 -1
- package/dist/{reactor-BmI-D8O-.js → reactor-CHUe2JgO.js} +4 -4
- package/dist/{reactor-BmI-D8O-.js.map → reactor-CHUe2JgO.js.map} +1 -1
- package/dist/{settings-DjQfTrBe.js → settings-C1Pb6U4P.js} +5 -5
- package/dist/{settings-DjQfTrBe.js.map → settings-C1Pb6U4P.js.map} +1 -1
- package/dist/{settings-tabs-iTlo2pYz.js → settings-tabs-CyzuB1lF.js} +4 -4
- package/dist/{settings-tabs-iTlo2pYz.js.map → settings-tabs-CyzuB1lF.js.map} +1 -1
- package/dist/start-connect.js +2 -2
- package/dist/{ui-b6sMhi5V.js → ui-C06Mxkd-.js} +7 -7
- package/dist/{ui-b6sMhi5V.js.map → ui-C06Mxkd-.js.map} +1 -1
- package/package.json +16 -16
- package/dist/app-loader-Cj2p8L1I.js +0 -4
|
@@ -1,8 +1,8 @@
|
|
|
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]="c9f54830-7a88-5034-a6d7-5051b9183fce")}catch(e){}}();
|
|
3
3
|
import { t as DriveIcon } from "./drive-icon-BiVP8yJc.js";
|
|
4
4
|
import { t as AppSkeleton } from "./app-skeleton-BFjvlTWd.js";
|
|
5
|
-
import { i as Analytics, n as App, r as OpenPanel, t as AppLoader } from "./app-loader-
|
|
5
|
+
import { i as Analytics, n as App, r as OpenPanel, t as AppLoader } from "./app-loader-Ctuh_wUx.js";
|
|
6
6
|
import { t as setBannerShown } from "./preferences-store-CSqauT9V.js";
|
|
7
7
|
import { t as Root } from "./root-B1Pq9x6S.js";
|
|
8
8
|
import { n as getConnectRouter, t as Router } from "./router-L9X9U-97.js";
|
|
@@ -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 };
|
|
119
119
|
|
|
120
|
-
//# sourceMappingURL=components-
|
|
121
|
-
//# debugId=
|
|
120
|
+
//# sourceMappingURL=components-Dan37g4U.js.map
|
|
121
|
+
//# debugId=c9f54830-7a88-5034-a6d7-5051b9183fce
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"components-
|
|
1
|
+
{"version":3,"file":"components-Dan37g4U.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,C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,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":"c9f54830-7a88-5034-a6d7-5051b9183fce"}
|
package/dist/generic.js
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
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]="f49f081b-fe19-5076-a0f7-06facd312df2")}catch(e){}}();
|
|
3
3
|
import { a as useDriveRouteData, i as SidebarItem, n as ModalDialog, o as useNavRoutes, r as RouteSelection, s as useSidebarMode, t as ContentOutlet } from "./layout-BOX6fL5v.js";
|
|
4
4
|
import { r as ErrorBoundary } from "./error-boundary-BsUBww61.js";
|
|
5
|
-
import { a as settingsTab, c as NodeView, d as AppLayout, f as Sidebar, i as aiAssistantEnabled, l as DrivePending, m as SidebarNavItems, o as DriveLayout, p as SidebarDriveItems, r as SettingsPage, s as Home, t as genericSettingsTabs } from "./settings-tabs-
|
|
5
|
+
import { a as settingsTab, c as NodeView, d as AppLayout, f as Sidebar, i as aiAssistantEnabled, l as DrivePending, m as SidebarNavItems, o as DriveLayout, p as SidebarDriveItems, r as SettingsPage, s as Home, t as genericSettingsTabs } from "./settings-tabs-CyzuB1lF.js";
|
|
6
6
|
import { n as EditorLoader } from "./document-editor-container-BnEjlmaN.js";
|
|
7
7
|
import { Suspense, lazy } from "react";
|
|
8
8
|
import { jsx } from "react/jsx-runtime";
|
|
@@ -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]="c1587918-7ba1-5943-9e5d-60987ab80370")}catch(e){}}();
|
|
3
|
+
import { t as loadRuntimeConfig } from "./load-runtime-config-BvMss48m.js";
|
|
4
4
|
import { r as connectConfig } from "./connect.config-D1pGNmaF.js";
|
|
5
|
-
import { t as getBuildHash } from "./build-info-
|
|
5
|
+
import { t as getBuildHash } from "./build-info-D1Gpyvek.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-B6fleM37.js";
|
|
9
9
|
import { n as seedPendingPgVersion } from "./pglite-seed-eGzXMld2.js";
|
|
10
|
-
import { n as createReactor } from "./reactor-
|
|
10
|
+
import { n as createReactor } from "./reactor-CHUe2JgO.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-4y9lctgm.js.map
|
|
133
|
+
//# debugId=c1587918-7ba1-5943-9e5d-60987ab80370
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"load-
|
|
1
|
+
{"version":3,"file":"load-4y9lctgm.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,I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AkB;EACrE;CACF,GAAG,CAAC,CAAC;AACP;;;AC3EA,SAAgB,mBAAmB;CACjC,MAAM,OAAO,QAAQ;CACrB,gBAAgB;EACd,IAAI,aAAgC;EACpC,IAAI,MAAM;GAER,MAAM,EAAE,YAAY,aAAa,GAAG,SAAS;GAC7C,aAAa;IAAE,IAAI,KAAK;IAAK,UAAU,KAAK,KAAK;IAAM,GAAG;GAAK;EACjE;EACA,QAAc,UAAU;CAC1B,GAAG,CAAC,IAAI,CAAC;AACX;;;ACFA,eAAsB,cACpB,cACA,OACA;CACA,MAAM,qBAAqB;CAC3B,MAAM,QAAQ,IAAI,CAAC,qBAAqB,GAAG,qBAAqB,CAAC,CAAC;CAClE,MAAM,kBAAkB;CACxB,MAAM,cAAc,MAAM,cAAc,KAAK;CAC7C,OAAO,EACL,UAAU,EAAE,eAAyC;EACnD,UAAU;EAEV,iBAAiB;EAEjB,sBAAsB;EACtB,OAAO;CACT,EACF;AACF","debug_id":"c1587918-7ba1-5943-9e5d-60987ab80370"}
|
|
@@ -1,8 +1,8 @@
|
|
|
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]="705762a3-e36a-50c5-a7bd-88256da80595")}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-Yr4sDuPn.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-BvMss48m.js.map
|
|
14
|
+
//# debugId=705762a3-e36a-50c5-a7bd-88256da80595
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"load-runtime-config-
|
|
1
|
+
{"version":3,"file":"load-runtime-config-BvMss48m.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":"705762a3-e36a-50c5-a7bd-88256da80595"}
|
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-BhAEKTca.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-BImUNqTK.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]="afccaa93-3a1c-542f-84c1-647e88cc5741")}catch(e){}}();
|
|
3
3
|
import { DEFAULT_CONNECT_CONFIG } from "@powerhousedao/shared/connect";
|
|
4
4
|
import { z } from "zod";
|
|
5
5
|
//#region src/plugins/assistant.ts
|
|
@@ -180,7 +180,7 @@ const driveSectionOff = {
|
|
|
180
180
|
const connectPlugins = {
|
|
181
181
|
[GENERIC_PLUGIN]: {
|
|
182
182
|
create: createGenericPlugin,
|
|
183
|
-
ui: () => import("./ui-
|
|
183
|
+
ui: () => import("./ui-C06Mxkd-.js").then((m) => m.default),
|
|
184
184
|
shell: "generic",
|
|
185
185
|
whenAbsent: (config) => ({
|
|
186
186
|
...config,
|
|
@@ -242,5 +242,5 @@ const connectPlugins = {
|
|
|
242
242
|
//#endregion
|
|
243
243
|
export { connectPlugins };
|
|
244
244
|
|
|
245
|
-
//# sourceMappingURL=plugins-
|
|
246
|
-
//# debugId=
|
|
245
|
+
//# sourceMappingURL=plugins-Yr4sDuPn.js.map
|
|
246
|
+
//# debugId=afccaa93-3a1c-542f-84c1-647e88cc5741
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"plugins-B9VBgzio.js","sources":["../src/plugins/assistant.ts","../src/plugins/generic.ts","../src/plugins/openpanel.ts","../src/plugins/sentry.ts","../src/plugins/ids.ts","../src/plugins/vetra-studio.ts","../src/plugins/index.ts"],"sourcesContent":["import type { PHConnectRuntimeConfig } from \"@powerhousedao/shared/clis\";\nimport type {\n ConnectPlugin,\n ConnectPluginFactory,\n} from \"@powerhousedao/connect-core/plugins\";\n\n/**\n * The Connect AI assistant (`@powerhousedao/connect/plugins/assistant`).\n * Presence flips `ai.assistantEnabled` on and merges the entry config\n * (endpoint, agent, defaultOpen, …); absence forces it off. The assistant FAB\n * in app.tsx already renders on `ai.assistantEnabled`, so this plugin's\n * config shuffle is immediately visible in the UI.\n */\nexport const createAssistantPlugin: ConnectPluginFactory = (config) => {\n const plugin: ConnectPlugin = {\n name: \"connect-assistant\",\n appliesTo: \"connect\",\n hooks: {\n transformConnectConfig(served: PHConnectRuntimeConfig) {\n return {\n ...served,\n ai: { ...served.ai, assistantEnabled: true, ...config } as never,\n };\n },\n },\n };\n return plugin;\n};\n\nexport default createAssistantPlugin;\n","import { DEFAULT_CONNECT_CONFIG } from \"@powerhousedao/shared/connect\";\nimport type { PHConnectRuntimeConfig } from \"@powerhousedao/shared/clis\";\nimport { z } from \"zod\";\nimport type {\n ConnectPlugin,\n ConnectPluginFactory,\n} from \"@powerhousedao/connect-core/plugins\";\n\n/**\n * The generic Connect shell plugin (`@powerhousedao/connect/plugins/generic`).\n *\n * It OWNS the drive-chrome UI toggles — `allowAddDrive` and the per-section\n * `sections.{remote,local}` switches (enabled / allowAdd / allowDelete). These\n * describe nothing outside the generic chrome (connect.config.ts reads them to\n * decide whether the add-drive affordance and the drive sections render), so\n * under uniform runners they are configured HERE, through this plugin's entry\n * config, not as free-standing top-level connect.drives values:\n *\n * - present + entry provides a value -> that value\n * - present + entry omits it -> inherit DEFAULT_CONNECT_CONFIG\n * - absent from the composition -> zeroed off (see plugin-host's\n * zeroAbsentSlices — no chrome, no\n * toggles)\n *\n * The top-level served value is deliberately NOT a fallback: ownership means a\n * single source. `branding` is intentionally NOT handled here — it has reach\n * beyond the chrome (e.g. document.title), so it stays a Connect-level config\n * value that survives this plugin's absence.\n */\n\nconst sectionSchema = z\n .object({\n enabled: z.boolean().optional(),\n allowAdd: z.boolean().optional(),\n allowDelete: z.boolean().optional(),\n })\n .optional();\n\nconst genericConfigSchema = z\n .object({\n allowAddDrive: z.boolean().optional(),\n sections: z\n .object({ remote: sectionSchema, local: sectionSchema })\n .optional(),\n })\n .partial();\n\ntype GenericConfig = z.infer<typeof genericConfigSchema>;\n\nconst DEFAULT_DRIVES = DEFAULT_CONNECT_CONFIG.drives;\n\nexport const createGenericPlugin: ConnectPluginFactory = (rawConfig) => {\n const config = genericConfigSchema.parse(rawConfig ?? {}) as GenericConfig;\n const plugin: ConnectPlugin = {\n name: \"connect-generic\",\n appliesTo: \"connect\",\n configSchema: genericConfigSchema,\n hooks: {\n transformConnectConfig(served: PHConnectRuntimeConfig) {\n const entrySections = config.sections ?? {};\n return {\n ...served,\n drives: {\n ...served.drives,\n // Owned: entry value, else the single-source default — never the\n // served top-level value.\n allowAddDrive:\n config.allowAddDrive ?? DEFAULT_DRIVES?.allowAddDrive,\n sections: {\n remote: {\n ...DEFAULT_DRIVES?.sections?.remote,\n ...entrySections.remote,\n },\n local: {\n ...DEFAULT_DRIVES?.sections?.local,\n ...entrySections.local,\n },\n },\n } as never,\n };\n },\n },\n };\n return plugin;\n};\n\nexport default createGenericPlugin;\n","import type { PHConnectRuntimeConfig } from \"@powerhousedao/shared/clis\";\nimport type {\n ConnectPlugin,\n ConnectPluginFactory,\n} from \"@powerhousedao/connect-core/plugins\";\n\n/**\n * OpenPanel analytics (`@powerhousedao/connect/plugins/openpanel`). Presence\n * is activation: the entry config (clientId, trackUiEvents, trackOperations)\n * merges into the served `openPanel` block; absence clears the clientId and\n * turns tracking off. Config shuffle today; the Analytics/OpenPanel\n * components that consume it already live in the app tree.\n */\nexport const createOpenPanelPlugin: ConnectPluginFactory = (config) => {\n const plugin: ConnectPlugin = {\n name: \"connect-openpanel\",\n appliesTo: \"connect\",\n hooks: {\n transformConnectConfig(served: PHConnectRuntimeConfig) {\n return {\n ...served,\n openPanel: { ...served.openPanel, ...config } as never,\n };\n },\n },\n };\n return plugin;\n};\n\nexport default createOpenPanelPlugin;\n","import type { PHConnectRuntimeConfig } from \"@powerhousedao/shared/clis\";\nimport type {\n ConnectPlugin,\n ConnectPluginFactory,\n} from \"@powerhousedao/connect-core/plugins\";\n\n/**\n * Sentry error reporting (`@powerhousedao/connect/plugins/sentry`). Presence\n * is activation: listing it merges the entry config (dsn, env, tracing) into\n * the served `sentry` block; omitting it nulls the dsn (see the absence\n * zeroing in plugin-host). A thin config shuffle today — the SentryProvider\n * that reads this slice already exists in the app.\n */\nexport const createSentryPlugin: ConnectPluginFactory = (config) => {\n const plugin: ConnectPlugin = {\n name: \"connect-sentry\",\n appliesTo: \"connect\",\n hooks: {\n transformConnectConfig(served: PHConnectRuntimeConfig) {\n return {\n ...served,\n sentry: { ...served.sentry, ...config } as never,\n };\n },\n },\n };\n return plugin;\n};\n\nexport default createSentryPlugin;\n","/** The generic shell: Connect's sidebar, home screen and settings tabs. */\nexport const GENERIC_PLUGIN = \"@powerhousedao/connect/plugins/generic\";\n","import type { PHConnectRuntimeConfig } from \"@powerhousedao/shared/clis\";\nimport type {\n ConnectPlugin,\n ConnectPluginFactory,\n} from \"@powerhousedao/connect-core/plugins\";\n\n/**\n * Vetra Studio, browser side (`@powerhousedao/vetra-studio/connect`). Its\n * presence turns Connect's studio mode on; the classic `app.studioMode`\n * consumer paths run unchanged, and absence forces studio off (the zeroing in\n * plugin-host). Lives here, in Connect's own source, because the studio-mode\n * behaviour is Connect browser behaviour — the published vetra-studio/connect\n * module is only the server-resolvable identity of the same plugin.\n */\nexport const createVetraStudioPlugin: ConnectPluginFactory = (config) => {\n const plugin: ConnectPlugin = {\n name: \"vetra-studio-connect\",\n appliesTo: \"connect\",\n hooks: {\n transformConnectConfig(served: PHConnectRuntimeConfig) {\n return {\n ...served,\n app: { ...served.app, studioMode: true, ...config } as never,\n };\n },\n },\n };\n return plugin;\n};\n\nexport default createVetraStudioPlugin;\n","import type { ConnectPluginDefinition } from \"@powerhousedao/connect-core/plugins\";\nimport createAssistantPlugin from \"./assistant.js\";\nimport createGenericPlugin from \"./generic.js\";\nimport createOpenPanelPlugin from \"./openpanel.js\";\nimport createSentryPlugin from \"./sentry.js\";\nimport { GENERIC_PLUGIN } from \"./ids.js\";\nimport createVetraStudioPlugin from \"./vetra-studio.js\";\n\nexport { GENERIC_PLUGIN };\n\n// Sentry and OpenPanel start only once the viewer accepts analytics cookies.\nconst ANALYTICS_CONSENT = { consent: true };\n\n// Each built-in zeroes the config slice it owns when a composition leaves it out.\nconst driveSectionOff = { enabled: false, allowAdd: false, allowDelete: false };\n\n/** Connect's built-in plugins, by the specifier a composition names. */\nexport const connectPlugins: Record<string, ConnectPluginDefinition> = {\n [GENERIC_PLUGIN]: {\n create: createGenericPlugin,\n ui: () => import(\"../generic/ui.js\").then((m) => m.default),\n shell: \"generic\",\n // Branding is not zeroed: it is Connect-level and outlives the plugin.\n whenAbsent: (config) => ({\n ...config,\n drives: {\n ...config.drives,\n allowAddDrive: false,\n sections: { remote: driveSectionOff, local: driveSectionOff },\n } as never,\n }),\n },\n \"@powerhousedao/connect/plugins/sentry\": {\n create: createSentryPlugin,\n ui: () => Promise.resolve(ANALYTICS_CONSENT),\n whenAbsent: (config) => ({\n ...config,\n sentry: { ...config.sentry, dsn: null } as never,\n }),\n },\n \"@powerhousedao/connect/plugins/openpanel\": {\n create: createOpenPanelPlugin,\n ui: () => Promise.resolve(ANALYTICS_CONSENT),\n whenAbsent: (config) => ({\n ...config,\n openPanel: {\n ...config.openPanel,\n clientId: \"\",\n trackUiEvents: false,\n trackOperations: false,\n } as never,\n }),\n },\n \"@powerhousedao/connect/plugins/assistant\": {\n create: createAssistantPlugin,\n whenAbsent: (config) => ({\n ...config,\n ai: { ...config.ai, assistantEnabled: false } as never,\n }),\n },\n \"@powerhousedao/vetra-studio/connect\": {\n create: createVetraStudioPlugin,\n whenAbsent: (config) => ({\n ...config,\n app: { ...config.app, studioMode: false } as never,\n }),\n },\n};\n"],"names":[],"mappings":";;;;;;;;;;;;AAaA,MAAa,yBAA+C,WAAW;CAarE,OAAO;EAXL,MAAM;EACN,WAAW;EACX,OAAO,EACL,uBAAuB,QAAgC;GACrD,OAAO;IACL,GAAG;IACH,IAAI;KAAE,GAAG,OAAO;KAAI,kBAAkB;KAAM,GAAG;IAAO;GACxD;EACF,EACF;CAEU;AACd;;;;;;;;;;;;;;;;;;;;;;;;ACGA,MAAM,gBAAgB,EACnB,OAAO;CACN,SAAS,EAAE,QAAQ,CAAC,CAAC,SAAS;CAC9B,UAAU,EAAE,QAAQ,CAAC,CAAC,SAAS;CAC/B,aAAa,EAAE,QAAQ,CAAC,CAAC,SAAS;AACpC,CAAC,CAAC,CACD,SAAS;AAEZ,MAAM,sBAAsB,EACzB,OAAO;CACN,eAAe,EAAE,QAAQ,CAAC,CAAC,SAAS;CACpC,UAAU,EACP,OAAO;EAAE,QAAQ;EAAe,OAAO;CAAc,CAAC,CAAC,CACvD,SAAS;AACd,CAAC,CAAC,CACD,QAAQ;AAIX,MAAM,iBAAiB,uBAAuB;AAE9C,MAAa,uBAA6C,cAAc;CACtE,MAAM,SAAS,oBAAoB,MAAM,aAAa,CAAC,CAAC;CA+BxD,OAAO;EA7BL,MAAM;EACN,WAAW;EACX,cAAc;EACd,OAAO,EACL,uBAAuB,QAAgC;GACrD,MAAM,gBAAgB,OAAO,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;KAAiB,OAAO;IAAgB;GAC9D;EACF;CACF;CACA,yCAAyC;EACvC,QAAQ;EACR,UAAU,QAAQ,QAAQ,iBAAiB;EAC3C,aAAa,YAAY;GACvB,GAAG;GACH,QAAQ;IAAE,GAAG,OAAO;IAAQ,KAAK;GAAK;EACxC;CACF;CACA,4CAA4C;EAC1C,QAAQ;EACR,UAAU,QAAQ,QAAQ,iBAAiB;EAC3C,aAAa,YAAY;GACvB,GAAG;GACH,WAAW;IACT,GAAG,OAAO;IACV,UAAU;IACV,eAAe;IACf,iBAAiB;GACnB;EACF;CACF;CACA,4CAA4C;EAC1C,QAAQ;EACR,aAAa,YAAY;GACvB,GAAG;GACH,IAAI;IAAE,GAAG,OAAO;IAAI,kBAAkB;GAAM;EAC9C;CACF;CACA,uCAAuC;EACrC,QAAQ;EACR,aAAa,YAAY;GACvB,GAAG;GACH,KAAK;IAAE,GAAG,OAAO;IAAK,YAAY;GAAM;EAC1C;CACF;AACF","debug_id":"f98cb0ba-ef84-5bf8-b16a-90ce5faeeba0"}
|
|
1
|
+
{"version":3,"file":"plugins-Yr4sDuPn.js","sources":["../src/plugins/assistant.ts","../src/plugins/generic.ts","../src/plugins/openpanel.ts","../src/plugins/sentry.ts","../src/plugins/ids.ts","../src/plugins/vetra-studio.ts","../src/plugins/index.ts"],"sourcesContent":["import type { PHConnectRuntimeConfig } from \"@powerhousedao/shared/clis\";\nimport type {\n ConnectPlugin,\n ConnectPluginFactory,\n} from \"@powerhousedao/connect-core/plugins\";\n\n/**\n * The Connect AI assistant (`@powerhousedao/connect/plugins/assistant`).\n * Presence flips `ai.assistantEnabled` on and merges the entry config\n * (endpoint, agent, defaultOpen, …); absence forces it off. The assistant FAB\n * in app.tsx already renders on `ai.assistantEnabled`, so this plugin's\n * config shuffle is immediately visible in the UI.\n */\nexport const createAssistantPlugin: ConnectPluginFactory = (config) => {\n const plugin: ConnectPlugin = {\n name: \"connect-assistant\",\n appliesTo: \"connect\",\n hooks: {\n transformConnectConfig(served: PHConnectRuntimeConfig) {\n return {\n ...served,\n ai: { ...served.ai, assistantEnabled: true, ...config } as never,\n };\n },\n },\n };\n return plugin;\n};\n\nexport default createAssistantPlugin;\n","import { DEFAULT_CONNECT_CONFIG } from \"@powerhousedao/shared/connect\";\nimport type { PHConnectRuntimeConfig } from \"@powerhousedao/shared/clis\";\nimport { z } from \"zod\";\nimport type {\n ConnectPlugin,\n ConnectPluginFactory,\n} from \"@powerhousedao/connect-core/plugins\";\n\n/**\n * The generic Connect shell plugin (`@powerhousedao/connect/plugins/generic`).\n *\n * It OWNS the drive-chrome UI toggles — `allowAddDrive` and the per-section\n * `sections.{remote,local}` switches (enabled / allowAdd / allowDelete). These\n * describe nothing outside the generic chrome (connect.config.ts reads them to\n * decide whether the add-drive affordance and the drive sections render), so\n * under uniform runners they are configured HERE, through this plugin's entry\n * config, not as free-standing top-level connect.drives values:\n *\n * - present + entry provides a value -> that value\n * - present + entry omits it -> inherit DEFAULT_CONNECT_CONFIG\n * - absent from the composition -> zeroed off (see plugin-host's\n * zeroAbsentSlices — no chrome, no\n * toggles)\n *\n * The top-level served value is deliberately NOT a fallback: ownership means a\n * single source. `branding` is intentionally NOT handled here — it has reach\n * beyond the chrome (e.g. document.title), so it stays a Connect-level config\n * value that survives this plugin's absence.\n */\n\nconst sectionSchema = z\n .object({\n enabled: z.boolean().optional(),\n allowAdd: z.boolean().optional(),\n allowDelete: z.boolean().optional(),\n })\n .optional();\n\nconst genericConfigSchema = z\n .object({\n allowAddDrive: z.boolean().optional(),\n sections: z\n .object({ remote: sectionSchema, local: sectionSchema })\n .optional(),\n })\n .partial();\n\ntype GenericConfig = z.infer<typeof genericConfigSchema>;\n\nconst DEFAULT_DRIVES = DEFAULT_CONNECT_CONFIG.drives;\n\nexport const createGenericPlugin: ConnectPluginFactory = (rawConfig) => {\n const config = genericConfigSchema.parse(rawConfig ?? {}) as GenericConfig;\n const plugin: ConnectPlugin = {\n name: \"connect-generic\",\n appliesTo: \"connect\",\n configSchema: genericConfigSchema,\n hooks: {\n transformConnectConfig(served: PHConnectRuntimeConfig) {\n const entrySections = config.sections ?? {};\n return {\n ...served,\n drives: {\n ...served.drives,\n // Owned: entry value, else the single-source default — never the\n // served top-level value.\n allowAddDrive:\n config.allowAddDrive ?? DEFAULT_DRIVES?.allowAddDrive,\n sections: {\n remote: {\n ...DEFAULT_DRIVES?.sections?.remote,\n ...entrySections.remote,\n },\n local: {\n ...DEFAULT_DRIVES?.sections?.local,\n ...entrySections.local,\n },\n },\n } as never,\n };\n },\n },\n };\n return plugin;\n};\n\nexport default createGenericPlugin;\n","import type { PHConnectRuntimeConfig } from \"@powerhousedao/shared/clis\";\nimport type {\n ConnectPlugin,\n ConnectPluginFactory,\n} from \"@powerhousedao/connect-core/plugins\";\n\n/**\n * OpenPanel analytics (`@powerhousedao/connect/plugins/openpanel`). Presence\n * is activation: the entry config (clientId, trackUiEvents, trackOperations)\n * merges into the served `openPanel` block; absence clears the clientId and\n * turns tracking off. Config shuffle today; the Analytics/OpenPanel\n * components that consume it already live in the app tree.\n */\nexport const createOpenPanelPlugin: ConnectPluginFactory = (config) => {\n const plugin: ConnectPlugin = {\n name: \"connect-openpanel\",\n appliesTo: \"connect\",\n hooks: {\n transformConnectConfig(served: PHConnectRuntimeConfig) {\n return {\n ...served,\n openPanel: { ...served.openPanel, ...config } as never,\n };\n },\n },\n };\n return plugin;\n};\n\nexport default createOpenPanelPlugin;\n","import type { PHConnectRuntimeConfig } from \"@powerhousedao/shared/clis\";\nimport type {\n ConnectPlugin,\n ConnectPluginFactory,\n} from \"@powerhousedao/connect-core/plugins\";\n\n/**\n * Sentry error reporting (`@powerhousedao/connect/plugins/sentry`). Presence\n * is activation: listing it merges the entry config (dsn, env, tracing) into\n * the served `sentry` block; omitting it nulls the dsn (see the absence\n * zeroing in plugin-host). A thin config shuffle today — the SentryProvider\n * that reads this slice already exists in the app.\n */\nexport const createSentryPlugin: ConnectPluginFactory = (config) => {\n const plugin: ConnectPlugin = {\n name: \"connect-sentry\",\n appliesTo: \"connect\",\n hooks: {\n transformConnectConfig(served: PHConnectRuntimeConfig) {\n return {\n ...served,\n sentry: { ...served.sentry, ...config } as never,\n };\n },\n },\n };\n return plugin;\n};\n\nexport default createSentryPlugin;\n","/** The generic shell: Connect's sidebar, home screen and settings tabs. */\nexport const GENERIC_PLUGIN = \"@powerhousedao/connect/plugins/generic\";\n","import type { PHConnectRuntimeConfig } from \"@powerhousedao/shared/clis\";\nimport type {\n ConnectPlugin,\n ConnectPluginFactory,\n} from \"@powerhousedao/connect-core/plugins\";\n\n/**\n * Vetra Studio, browser side (`@powerhousedao/vetra-studio/connect`). Its\n * presence turns Connect's studio mode on; the classic `app.studioMode`\n * consumer paths run unchanged, and absence forces studio off (the zeroing in\n * plugin-host). Lives here, in Connect's own source, because the studio-mode\n * behaviour is Connect browser behaviour — the published vetra-studio/connect\n * module is only the server-resolvable identity of the same plugin.\n */\nexport const createVetraStudioPlugin: ConnectPluginFactory = (config) => {\n const plugin: ConnectPlugin = {\n name: \"vetra-studio-connect\",\n appliesTo: \"connect\",\n hooks: {\n transformConnectConfig(served: PHConnectRuntimeConfig) {\n return {\n ...served,\n app: { ...served.app, studioMode: true, ...config } as never,\n };\n },\n },\n };\n return plugin;\n};\n\nexport default createVetraStudioPlugin;\n","import type { ConnectPluginDefinition } from \"@powerhousedao/connect-core/plugins\";\nimport createAssistantPlugin from \"./assistant.js\";\nimport createGenericPlugin from \"./generic.js\";\nimport createOpenPanelPlugin from \"./openpanel.js\";\nimport createSentryPlugin from \"./sentry.js\";\nimport { GENERIC_PLUGIN } from \"./ids.js\";\nimport createVetraStudioPlugin from \"./vetra-studio.js\";\n\nexport { GENERIC_PLUGIN };\n\n// Sentry and OpenPanel start only once the viewer accepts analytics cookies.\nconst ANALYTICS_CONSENT = { consent: true };\n\n// Each built-in zeroes the config slice it owns when a composition leaves it out.\nconst driveSectionOff = { enabled: false, allowAdd: false, allowDelete: false };\n\n/** Connect's built-in plugins, by the specifier a composition names. */\nexport const connectPlugins: Record<string, ConnectPluginDefinition> = {\n [GENERIC_PLUGIN]: {\n create: createGenericPlugin,\n ui: () => import(\"../generic/ui.js\").then((m) => m.default),\n shell: \"generic\",\n // Branding is not zeroed: it is Connect-level and outlives the plugin.\n whenAbsent: (config) => ({\n ...config,\n drives: {\n ...config.drives,\n allowAddDrive: false,\n sections: { remote: driveSectionOff, local: driveSectionOff },\n } as never,\n }),\n },\n \"@powerhousedao/connect/plugins/sentry\": {\n create: createSentryPlugin,\n ui: () => Promise.resolve(ANALYTICS_CONSENT),\n whenAbsent: (config) => ({\n ...config,\n sentry: { ...config.sentry, dsn: null } as never,\n }),\n },\n \"@powerhousedao/connect/plugins/openpanel\": {\n create: createOpenPanelPlugin,\n ui: () => Promise.resolve(ANALYTICS_CONSENT),\n whenAbsent: (config) => ({\n ...config,\n openPanel: {\n ...config.openPanel,\n clientId: \"\",\n trackUiEvents: false,\n trackOperations: false,\n } as never,\n }),\n },\n \"@powerhousedao/connect/plugins/assistant\": {\n create: createAssistantPlugin,\n whenAbsent: (config) => ({\n ...config,\n ai: { ...config.ai, assistantEnabled: false } as never,\n }),\n },\n \"@powerhousedao/vetra-studio/connect\": {\n create: createVetraStudioPlugin,\n whenAbsent: (config) => ({\n ...config,\n app: { ...config.app, studioMode: false } as never,\n }),\n },\n};\n"],"names":[],"mappings":";;;;;;;;;;;;AAaA,MAAa,yBAA+C,WAAW;CAarE,OAAO;EAXL,MAAM;EACN,WAAW;EACX,OAAO,EACL,uBAAuB,QAAgC;GACrD,OAAO;IACL,GAAG;IACH,IAAI;KAAE,GAAG,OAAO;KAAI,kBAAkB;KAAM,GAAG;IAAO;GACxD;EACF,EACF;CAEU;AACd;;;;;;;;;;;;;;;;;;;;;;;;ACGA,MAAM,gBAAgB,EACnB,OAAO;CACN,SAAS,EAAE,QAAQ,CAAC,CAAC,SAAS;CAC9B,UAAU,EAAE,QAAQ,CAAC,CAAC,SAAS;CAC/B,aAAa,EAAE,QAAQ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EACL,uBAAuB,QAAgC;GACrD,OAAO;IACL,GAAG;IACH,KAAK;KAAE,GAAG,OAAO;KAAK,YAAY;KAAM,GAAG;IAAO;GACpD;EACF,EACF;CAEU;AACd;;;ACjBA,MAAM,oBAAoB,EAAE,SAAS,KAAK;AAG1C,MAAM,kBAAkB;CAAE,SAAS;CAAO,UAAU;CAAO,aAAa;AAAM;;AAG9E,MAAa,iBAA0D;EACpE,iBAAiB;EAChB,QAAQ;EACR,UAAU,OAAO,mBAAmB,CAAC,MAAM,MAAM,EAAE,OAAO;EAC1D,OAAO;EAEP,aAAa,YAAY;GACvB,GAAG;GACH,QAAQ;IACN,GAAG,OAAO;IACV,eAAe;IACf,UAAU;KAAE,QAAQ;KAAiB,OAAO;IAAgB;GAC9D;EACF;CACF;CACA,yCAAyC;EACvC,QAAQ;EACR,UAAU,QAAQ,QAAQ,iBAAiB;EAC3C,aAAa,YAAY;GACvB,GAAG;GACH,QAAQ;IAAE,GAAG,OAAO;IAAQ,KAAK;GAAK;EACxC;CACF;CACA,4CAA4C;EAC1C,QAAQ;EACR,UAAU,QAAQ,QAAQ,iBAAiB;EAC3C,aAAa,YAAY;GACvB,GAAG;GACH,WAAW;IACT,GAAG,OAAO;IACV,UAAU;IACV,eAAe;IACf,iBAAiB;GACnB;EACF;CACF;CACA,4CAA4C;EAC1C,QAAQ;EACR,aAAa,YAAY;GACvB,GAAG;GACH,IAAI;IAAE,GAAG,OAAO;IAAI,kBAAkB;GAAM;EAC9C;CACF;CACA,uCAAuC;EACrC,QAAQ;EACR,aAAa,YAAY;GACvB,GAAG;GACH,KAAK;IAAE,GAAG,OAAO;IAAK,YAAY;GAAM;EAC1C;CACF;AACF","debug_id":"afccaa93-3a1c-542f-84c1-647e88cc5741"}
|
package/dist/prerender.js
CHANGED
|
@@ -116,7 +116,7 @@ async function loadDefaultConfig(variant) {
|
|
|
116
116
|
const plugin = (await shellPlugins())[variant];
|
|
117
117
|
await loadConnectPluginUi(plugin ? [{ module: plugin }] : []);
|
|
118
118
|
}
|
|
119
|
-
const connectPlugins = () => import("./plugins-
|
|
119
|
+
const connectPlugins = () => import("./plugins-Yr4sDuPn.js").then((m) => m.connectPlugins);
|
|
120
120
|
/** Each prerendered shell's plugin, whose presence in a composition picks it; core's has none. */
|
|
121
121
|
async function shellPlugins() {
|
|
122
122
|
return Object.fromEntries(Object.entries(await connectPlugins()).flatMap(([module, definition]) => definition.shell ? [[definition.shell, module]] : []));
|
|
@@ -1,7 +1,7 @@
|
|
|
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]="8d114295-8fab-5f3a-bce8-57611460d8bf")}catch(e){}}();
|
|
3
3
|
import { n as buildPHGlobalConfig, o as phGlobalConfig, r as connectConfig } from "./connect.config-D1pGNmaF.js";
|
|
4
|
-
import { a as isPackagedConnectDist, i as getVersion, n as getGitSha } from "./build-info-
|
|
4
|
+
import { a as isPackagedConnectDist, i as getVersion, n as getGitSha } from "./build-info-D1Gpyvek.js";
|
|
5
5
|
import { r as getSharedDeps, t as BrowserPackageManager } from "./package-manager-x_fK8Hzm.js";
|
|
6
6
|
import { r as toast } from "./toast-C6WW-_O-.js";
|
|
7
7
|
import { a as closeWithin, n as watchStoreLockWait, o as configureConnectChannelScheme, s as createConnectSignerConfig } from "./store-lock-Bi3B9VJD.js";
|
|
@@ -1407,5 +1407,5 @@ function getDriveUrl() {
|
|
|
1407
1407
|
//#endregion
|
|
1408
1408
|
export { createReactor as n, clearReactorStorage as t };
|
|
1409
1409
|
|
|
1410
|
-
//# sourceMappingURL=reactor-
|
|
1411
|
-
//# debugId=
|
|
1410
|
+
//# sourceMappingURL=reactor-CHUe2JgO.js.map
|
|
1411
|
+
//# debugId=8d114295-8fab-5f3a-bce8-57611460d8bf
|