@powerhousedao/connect-core 6.2.3-dev.78 → 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/dist/{index-Cm8rYUhs.d.ts → index-Bfl1VYdj.d.ts} +21 -2
- package/dist/index-Bfl1VYdj.d.ts.map +1 -0
- package/dist/{index-q4bHCPoJ.d.ts → index-r46ba0Kx.d.ts} +9 -6
- package/dist/index-r46ba0Kx.d.ts.map +1 -0
- package/dist/index.d.ts +3 -3
- package/dist/index.js +9 -9
- package/dist/{multi-reactor-CCMzwoMi.js → multi-reactor-D_2B4jmu.js} +2 -2
- package/dist/multi-reactor-D_2B4jmu.js.map +1 -0
- package/dist/{plugin-host-HhfxwUZN.js → plugin-host-D_EW56IQ.js} +2 -2
- package/dist/{plugin-host-HhfxwUZN.js.map → plugin-host-D_EW56IQ.js.map} +1 -1
- package/dist/{plugin-ui-W0ma6oKJ.js → plugin-ui-fDXhKTCK.js} +3 -3
- package/dist/{plugin-ui-W0ma6oKJ.js.map → plugin-ui-fDXhKTCK.js.map} +1 -1
- package/dist/plugins.js +2 -2
- package/dist/route-tree.d.ts +16 -16
- package/dist/route-tree.d.ts.map +1 -1
- package/dist/{router-DHL9GT3P.js → router-wVNdTI-Y.js} +10 -4
- package/dist/router-wVNdTI-Y.js.map +1 -0
- package/dist/router.d.ts +2 -2
- package/dist/router.js +4 -4
- package/dist/routes/__root.d.ts +3 -3
- package/dist/routes/__root.d.ts.map +1 -1
- package/dist/routes/__root.js +3 -3
- package/dist/routes/__root.js.map +1 -1
- package/dist/routes/_app/$.d.ts +3 -3
- package/dist/routes/_app/$.d.ts.map +1 -1
- package/dist/routes/_app/$.js +3 -3
- package/dist/routes/_app/$.js.map +1 -1
- package/dist/routes/_app/d/$driveSlug/{-$nodeSlug}.d.ts +5 -5
- package/dist/routes/_app/d/$driveSlug/{-$nodeSlug}.d.ts.map +1 -1
- package/dist/routes/_app/d/$driveSlug/{-$nodeSlug}.js +3 -3
- package/dist/routes/_app/d/$driveSlug/{-$nodeSlug}.js.map +1 -1
- package/dist/routes/_app/d/$driveSlug.d.ts +4 -4
- package/dist/routes/_app/d/$driveSlug.d.ts.map +1 -1
- package/dist/routes/_app/d/$driveSlug.js +3 -3
- package/dist/routes/_app/d/$driveSlug.js.map +1 -1
- package/dist/routes/_app/index.d.ts +41 -2
- package/dist/routes/_app/index.d.ts.map +1 -1
- package/dist/routes/_app/index.js +2 -2
- package/dist/routes/_app/index.js.map +1 -1
- package/dist/routes/_app/settings/appearance.d.ts +3 -3
- package/dist/routes/_app/settings/appearance.d.ts.map +1 -1
- package/dist/routes/_app/settings/appearance.js +3 -3
- package/dist/routes/_app/settings/appearance.js.map +1 -1
- package/dist/routes/_app/settings/packages.d.ts +3 -3
- package/dist/routes/_app/settings/packages.d.ts.map +1 -1
- package/dist/routes/_app/settings/packages.js +3 -3
- package/dist/routes/_app/settings/packages.js.map +1 -1
- package/dist/routes/_app/settings.d.ts +3 -3
- package/dist/routes/_app/settings.d.ts.map +1 -1
- package/dist/routes/_app/settings.js +3 -3
- package/dist/routes/_app/settings.js.map +1 -1
- package/dist/routes/_app.d.ts +41 -2
- package/dist/routes/_app.d.ts.map +1 -1
- package/dist/routes/_app.js +2 -2
- package/dist/routes/_app.js.map +1 -1
- package/dist/{runtime-D5hpzfgT.js → runtime-BUG9vT2E.js} +20 -8
- package/dist/runtime-BUG9vT2E.js.map +1 -0
- package/dist/runtime-config.js +4 -4
- package/dist/{runtime-flag-U8y14Nth.js → runtime-flag-Bp6QasS8.js} +2 -2
- package/dist/{runtime-flag-U8y14Nth.js.map → runtime-flag-Bp6QasS8.js.map} +1 -1
- package/dist/runtime.d.ts +2 -2
- package/dist/runtime.js +4 -4
- package/dist/{sidebar-CRv_DvBV.js → sidebar-C2y4mZnX.js} +13 -2
- package/dist/{sidebar-CRv_DvBV.js.map → sidebar-C2y4mZnX.js.map} +1 -1
- package/dist/{views-anOyTI7u.js → views-Ba9OeN3c.js} +2 -2
- package/dist/{views-anOyTI7u.js.map → views-Ba9OeN3c.js.map} +1 -1
- package/dist/views.js +1 -1
- package/package.json +8 -8
- package/src/router/index.ts +14 -2
- package/src/router/route-options.ts +16 -0
- package/src/router/sidebar.ts +22 -0
- package/src/routes/__root.tsx +3 -2
- package/src/routes/_app/$.tsx +3 -2
- package/src/routes/_app/d/$driveSlug/{-$nodeSlug}.tsx +3 -2
- package/src/routes/_app/d/$driveSlug.tsx +3 -2
- package/src/routes/_app/index.tsx +2 -2
- package/src/routes/_app/settings/appearance.tsx +3 -3
- package/src/routes/_app/settings/packages.tsx +3 -3
- package/src/routes/_app/settings.tsx +3 -2
- package/src/routes/_app.tsx +2 -2
- package/src/runtime/graphql-routable-backend.ts +2 -2
- package/src/runtime/index.ts +5 -1
- package/src/runtime/reactor-client-mode.ts +26 -9
- package/dist/index-Cm8rYUhs.d.ts.map +0 -1
- package/dist/index-q4bHCPoJ.d.ts.map +0 -1
- package/dist/multi-reactor-CCMzwoMi.js.map +0 -1
- package/dist/router-DHL9GT3P.js.map +0 -1
- package/dist/runtime-D5hpzfgT.js.map +0 -1
|
@@ -105,6 +105,14 @@ declare function ModalDialog(props: {
|
|
|
105
105
|
children: ReactNode;
|
|
106
106
|
}): import("react/jsx-runtime").JSX.Element;
|
|
107
107
|
//#endregion
|
|
108
|
+
//#region src/router/route-options.d.ts
|
|
109
|
+
type RouteOptionKey = keyof AnyRoute["options"];
|
|
110
|
+
/** A core route's `options`: what it sets, as it sets it, and every other
|
|
111
|
+
* route option, unset. */
|
|
112
|
+
type CoreRouteOptions<T extends object> = T & { [K in Exclude<RouteOptionKey, keyof T>]?: undefined; };
|
|
113
|
+
/** Types a core route file's exported `options` as {@link CoreRouteOptions}. */
|
|
114
|
+
declare function coreRouteOptions<T extends object>(options: T): CoreRouteOptions<T>;
|
|
115
|
+
//#endregion
|
|
108
116
|
//#region src/router/scroll.d.ts
|
|
109
117
|
type ScrollRouter = Pick<AnyRouter, "subscribe" | "_scroll" | "options"> & {
|
|
110
118
|
history: RouterHistory;
|
|
@@ -162,6 +170,17 @@ declare function navRoutes(router: AnyRouter): NavRouteEntry[];
|
|
|
162
170
|
declare function useNavRoutes(): NavRouteEntry[];
|
|
163
171
|
/** The deepest match's `staticData.sidebar`, if any declares one. */
|
|
164
172
|
declare function useSidebarMode(): SidebarMode | undefined;
|
|
173
|
+
/** What a layout shows of Connect's chrome on the matched route. */
|
|
174
|
+
type ConnectChrome = {
|
|
175
|
+
/** Connect runs inside another app (`?embed=1`): no sidebar, header or footer. */
|
|
176
|
+
embedded: boolean;
|
|
177
|
+
/** No sidebar: embedded, or the route's `staticData.sidebar` is "hidden". */
|
|
178
|
+
sidebarHidden: boolean;
|
|
179
|
+
/** The route's `staticData.sidebar` is "collapsed". */
|
|
180
|
+
sidebarCollapsed: boolean;
|
|
181
|
+
};
|
|
182
|
+
/** The chrome Connect's `_app` layout shows, for a layout that replaces it. */
|
|
183
|
+
declare function useConnectChrome(): ConnectChrome;
|
|
165
184
|
//#endregion
|
|
166
185
|
//#region src/router/settings.d.ts
|
|
167
186
|
/** A settings tab, as a child route of /settings declares it in `staticData`. */
|
|
@@ -225,6 +244,6 @@ declare function notFoundTitle(appName?: string): string;
|
|
|
225
244
|
/** `<node> · <drive> · <app>`, from the store so renames show. */
|
|
226
245
|
declare function driveTitle(store: PHStore, data: DriveRouteData | undefined, appName?: string): string;
|
|
227
246
|
//#endregion
|
|
228
|
-
export {
|
|
247
|
+
export { disposeConnectAppRouter as $, stringifyConnectSearch as A, ConnectCoreApp as B, useSidebarMode as C, connectSearchMiddlewares as D, GLOBAL_SEARCH_PARAMS as E, CoreRouteOptions as F, isCoreView as G, CoreNotFound as H, coreRouteOptions as I, markNavigationClick as J, PERF_STORAGE_KEY as K, ModalDialog as L, validateDriveSearch as M, bindConnectScroll as N, definedSearch as O, connectScrollRestoration as P, ConnectAppRouterOptions as Q, ModalFrameProps as R, useNavRoutes as S, FEATURE_FLAG_PARAM_PREFIX as T, coreModals as U, CoreError as V, coreView as W, routerPerfEnabled as X, markRouterNavigations as Y, createConnectNavigation as Z, ConnectNavItem as _, SETTINGS_ROUTE_ID as a, navRoutes as b, redirectToSettingsTab as c, settingsTabsOf as d, getConnectAppRouter as et, settingsTitle as f, ConnectChrome as g, useSettingsTabs as h, ConnectSettingsTab as i, validateConnectSearch as j, parseConnectSearch as k, setSettingsRoute as l, useForgetSettingsOpenedFrom as m, driveTitle as n, CreateDocumentTarget as nt, SettingsTabEntry as o, showsSettingsTab as p, ROUTER_MEASURES as q, notFoundTitle as r, useCreateDocumentTarget as rt, keepOpenedFrom as s, appTitle as t, useIsColdStart as tt, settingsTabs as u, NavRouteEntry as v, ConnectSearch as w, useConnectChrome as x, SidebarMode as y, useModalFrame as z };
|
|
229
248
|
export {};
|
|
230
|
-
//# sourceMappingURL=index-
|
|
249
|
+
//# sourceMappingURL=index-Bfl1VYdj.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index-Bfl1VYdj.d.ts","names":[],"sources":["../src/router/create-target.ts","../src/router/cold-start.ts","../src/router/app-router.ts","../src/router/navigation.ts","../src/router/perf-marks.ts","../src/router/core-views.tsx","../src/router/core-app.tsx","../src/router/modal-frame.tsx","../src/router/route-options.ts","../src/router/scroll.ts","../src/router/search.ts","../src/router/sidebar.ts","../src/router/settings.ts","../src/router/titles.ts"],"mappings":";;;;;;;KAKY;;EAEV,OAAO;;EAEP,SAAS;EACT,OAAO;;EAEP;;;;iBAKc,wBACd,8BACC;;;;iBChBa;;;KCQJ,0BAA0B,KACpC;;;iBAMc,oBACd,OAAO,SACP,eAAe,0BACd;;iBA8Ba;;;;;iBClBA,wBACd,eAAe,sBACd;EAAiB;;;;;cChCP;;cAGA;;WAEX;;WAEA;;WAEA;;WAEA;;;iBAYc,kBAAkB;;iBAalB;;iBAYA,sBACd,QAAQ,KAAK,yBACb;;;cCvCI,aAAK;;iBAKK,SAAS,YAAY,QAAQ,kB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AUK,iBAAiB,QAAQ;;iBAKzB,wBACd,SACA;EAEA,kBAAkB;EAClB,SAAS;;;iBAYK,cAAc,8BAA8B;;;iBAM5C,qCAA2B;;iBAc3B,eAAe,gBAE0B;;;;iBC3IzC,SAAS;;iBAKT,cAAc;;iBAKd,WACd,OAAO,SACP,MAAM,4BACN"}
|
|
@@ -38,16 +38,19 @@ declare function isReactorWorkerEnabled(): boolean;
|
|
|
38
38
|
*
|
|
39
39
|
* in-process | worker | remote | router
|
|
40
40
|
*
|
|
41
|
-
* Precedence: an explicit `?reactorClient=` query override (
|
|
42
|
-
*
|
|
43
|
-
*
|
|
44
|
-
*
|
|
41
|
+
* Precedence: an explicit `?reactorClient=` query override (kept in
|
|
42
|
+
* localStorage so it survives a reload), then a stored override, then the
|
|
43
|
+
* served `connect.instance.reactorClient` (projected from the host's reactor
|
|
44
|
+
* backends), then the LEGACY booleans — so a config that only sets
|
|
45
|
+
* reactorWorker/multiReactor behaves exactly as before.
|
|
45
46
|
*
|
|
46
47
|
* `remote` is the only mode that builds NO local reactor (no PGlite): it is a
|
|
47
48
|
* pure client to a remote Switchboard. `router` keeps the local reactor and
|
|
48
49
|
* adds remote backends; `worker`/`in-process` are the local reactor alone.
|
|
49
50
|
*/
|
|
50
51
|
type ReactorClientMode = PHReactorClientMode;
|
|
52
|
+
declare const REACTOR_CLIENT_QUERY_KEY = "reactorClient";
|
|
53
|
+
declare const REACTOR_CLIENT_STORAGE_KEY = "ph:reactorClient";
|
|
51
54
|
declare function resolveReactorClientMode(): ReactorClientMode;
|
|
52
55
|
//#endregion
|
|
53
56
|
//#region src/runtime/graphql-routable-backend.d.ts
|
|
@@ -171,6 +174,6 @@ type LocalPackageSource = LocalPackage | (() => Promise<LocalPackage>);
|
|
|
171
174
|
/** Starts loading the project's package; a loader runs once, here. */
|
|
172
175
|
declare function loadLocalPackage(source: LocalPackageSource | undefined): DocumentModelLib | Promise<DocumentModelLib> | undefined;
|
|
173
176
|
//#endregion
|
|
174
|
-
export {
|
|
177
|
+
export { resolveRuntimeFlag as A, ReactorWorkerFlagInput as C, RuntimeFlagInput as D, isMultiReactorEnabled as E, RuntimeFlagKeys as O, REACTOR_WORKER_STORAGE_KEY as S, resolveReactorWorkerEnabled as T, REACTOR_CLIENT_QUERY_KEY as _, getConnectPHStore as a, resolveReactorClientMode as b, LocalReactorFactory as c, getAppDrives as d, planReactorClient as f, LocalReactorModule as g, LoadedDocumentModels as h, loadLocalPackage as i, isRuntimeFlagEnabled as k, ReactorClientPlan as l, selectAppReactorClient as m, LocalPackageSource as n, AppReactorClientParams as o, refreshAppDrives as p, ModuleNamespace as r, CreateAppReactorClientOptions as s, LocalPackage as t, createAppReactorClient as u, REACTOR_CLIENT_STORAGE_KEY as v, isReactorWorkerEnabled as w, REACTOR_WORKER_QUERY_KEY as x, ReactorClientMode as y };
|
|
175
178
|
export {};
|
|
176
|
-
//# sourceMappingURL=index-
|
|
179
|
+
//# sourceMappingURL=index-r46ba0Kx.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index-r46ba0Kx.d.ts","names":[],"sources":["../src/runtime/runtime-flag.ts","../src/runtime/multi-reactor-flag.ts","../src/runtime/reactor-worker-flag.ts","../src/runtime/reactor-client-mode.ts","../src/runtime/graphql-routable-backend.ts","../src/runtime/multi-reactor.ts","../src/runtime/app-reactor-client.ts","../src/runtime/ph-store.ts","../src/runtime/local-package.ts"],"mappings":";;;;;;;;;;KAAY;EACV;EACA;EACA;;iBAIc,mBAAmB,OAAO;KAY9B;EACV;EACA;EACA;;iBAKc,qBAAqB,MAAM;;;iBCxB3B;;;cCIH;cACA;KAED,yBAAyB;iBAErB,4BACd,OAAO;iBAKO;;;;;;;;;;;;;;;;;;;KCGJ,oBAAoB;cASnB;cACA;iBA2BG,4BAA4B;;;KC2BhC,gCAAgC,KAC1C;KAIU;WACD,SAAS;;EAElB,QAAQ,QAAQ;;EAEhB;;;iBAIc,6BACd,SAAS,gCACR;;;;cCnEU;cACA;KAED,qBACR,6BACA;;cAQS,gBAAgB;iBAIb,WAAW,MAAM,6BAA6B;;iBAO9C,WACd,QAAQ,2BACD,QAAQ;;iBAcD,4BACd;;KAaU,gCACC,wCACO;KAER;;;EAGV,QAAQ;EACR;;EAEA,SAAS;;EAET,sBAAsB;EACtB,eAAe;;;;;cAMJ,iBAAiB;;cAwBjB,6BAA6B;mBACvB;EAEjB,YACE,mBAAmB,yBACnB,SAAS,sBACT,QAAQ,wBACR;;EAYF;;;;;;;;;iBAmBoB,wBACpB,QAAQ,qBACP,QAAQ;;;KCvJN,4BAA4B;KAErB;EACV,MAAM;;;EAGN,QAAQ;EACR;;EAEA,SAAS;EACT,sBAAsB;EACtB,mBAAmB,QAAQ;;;KAOjB;EACV,MAAM;;EAEN;EACA;;EAEA;;iBAGc,kBACd,OAAM,oBACL;;KAaS,uBACV,MAAM,sBACH,QAAQ;KAED,gCAAgC,KAC1C;EAGA,OAAO;;EAEP,eAAe;;;iBAIK,uBACpB,SAAS,gCAA6B;;;;;;;;;;;;iBA4BlB,uBACpB,QAAQ,yBACP,QAAQ;;iBA6BW,aACpB,QAAQ,gBACR,OAAO,iBACN,QAAQ;iBAeW,iBACpB,QAAQ,gBACR,OAAO,iBACN;;;;;iBCpJa,qBAAqB;;;;KCNzB,kBAAkB;GAC3B,OAAO;;KAGE,eAAe,wBAAwB;;KAGvC,qBAAqB,sBAAsB,QAAQ;;iBAG/C,iBACd,QAAQ,iCACP,mBAAmB,QAAQ"}
|
package/dist/index.d.ts
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { C as
|
|
1
|
+
import { A as resolveRuntimeFlag, C as ReactorWorkerFlagInput, D as RuntimeFlagInput, E as isMultiReactorEnabled, O as RuntimeFlagKeys, S as REACTOR_WORKER_STORAGE_KEY, T as resolveReactorWorkerEnabled, _ as REACTOR_CLIENT_QUERY_KEY, a as getConnectPHStore, b as resolveReactorClientMode, c as LocalReactorFactory, d as getAppDrives, f as planReactorClient, g as LocalReactorModule, h as LoadedDocumentModels, i as loadLocalPackage, k as isRuntimeFlagEnabled, l as ReactorClientPlan, m as selectAppReactorClient, n as LocalPackageSource, o as AppReactorClientParams, p as refreshAppDrives, r as ModuleNamespace, s as CreateAppReactorClientOptions, t as LocalPackage, u as createAppReactorClient, v as REACTOR_CLIENT_STORAGE_KEY, w as isReactorWorkerEnabled, x as REACTOR_WORKER_QUERY_KEY, y as ReactorClientMode } from "./index-r46ba0Kx.js";
|
|
2
2
|
import { A as useDriveRouteData, B as ConnectConfigHooks, C as holdConnectRoutes, D as DRIVE_ROUTE_ID, E as removeConnectRoutes, F as DriveRouteData, G as ConnectPluginUi, H as ConnectPluginContext, I as DriveRouteParams, J as ConnectModals, K as ConnectRouteUi, L as isDriveNotFound, M as ConnectRouterContext, N as DriveLoaderOptions, O as DriveRouteView, P as DriveNotFoundData, R as loadDrive, S as connectRoutesSettled, T as registerPackageRoutes, U as ConnectPluginDefinition, V as ConnectPlugin, W as ConnectPluginFactory, Y as ModalOutlet, _ as ConnectRoutes, a as bindConnectRouter, b as addConnectRoutes, c as applyConnectPluginUi, d as mergeConnectPluginUi, f as resetConnectPluginUi, g as ConnectRootRoute, h as APP_ROUTE_ID, i as ConnectRouterOptions, j as useDriveRouteIds, k as NODE_ROUTE_ID, l as getConnectPluginUi, m as ConnectRouteRegistration, n as ConnectRouterBundle, o as createConnectRouter, q as CORE_MODAL_VIEWS, r as ConnectRouterFor, s as ConnectPluginUiSet, t as ConnectRouter, u as loadConnectPluginUi, v as HOME_ROUTE_ID, w as registerConnectRoutes, x as connectRoutes, y as PackageRoute, z as loadNode } from "./connect-router-11uRIT3z.js";
|
|
3
3
|
import { a as DrivePending, i as DocumentViewProps, n as ContentOutlet, o as DriveViewProps, r as DRIVE_PENDING_MS, t as CONTENT_VIEW_ID } from "./route-components-1XyfosoL.js";
|
|
4
|
-
import { $ as
|
|
4
|
+
import { $ as disposeConnectAppRouter, A as stringifyConnectSearch, B as ConnectCoreApp, C as useSidebarMode, D as connectSearchMiddlewares, E as GLOBAL_SEARCH_PARAMS, F as CoreRouteOptions, G as isCoreView, H as CoreNotFound, I as coreRouteOptions, J as markNavigationClick, K as PERF_STORAGE_KEY, L as ModalDialog, M as validateDriveSearch, N as bindConnectScroll, O as definedSearch, P as connectScrollRestoration, Q as ConnectAppRouterOptions, R as ModalFrameProps, S as useNavRoutes, T as FEATURE_FLAG_PARAM_PREFIX, U as coreModals, V as CoreError, W as coreView, X as routerPerfEnabled, Y as markRouterNavigations, Z as createConnectNavigation, _ as ConnectNavItem, a as SETTINGS_ROUTE_ID, b as navRoutes, c as redirectToSettingsTab, d as settingsTabsOf, et as getConnectAppRouter, f as settingsTitle, g as ConnectChrome, h as useSettingsTabs, i as ConnectSettingsTab, j as validateConnectSearch, k as parseConnectSearch, l as setSettingsRoute, m as useForgetSettingsOpenedFrom, n as driveTitle, nt as CreateDocumentTarget, o as SettingsTabEntry, p as showsSettingsTab, q as ROUTER_MEASURES, r as notFoundTitle, rt as useCreateDocumentTarget, s as keepOpenedFrom, t as appTitle, tt as useIsColdStart, u as settingsTabs, v as NavRouteEntry, w as ConnectSearch, x as useConnectChrome, y as SidebarMode, z as useModalFrame } from "./index-Bfl1VYdj.js";
|
|
5
5
|
import { a as registerConnectPlugins, i as knownPlugins, n as isPluginActive, r as applyComposition, t as getActivePluginModules } from "./index-xKGW_46_.js";
|
|
6
6
|
import { i as primeRuntimeConfig, n as getRuntimeConfig, r as loadRuntimeConfig } from "./runtime-config-D3YPhYyj.js";
|
|
7
7
|
import { n as useIsEmbedded, t as getIsEmbedded } from "./embedded-DT1C47F0.js";
|
|
8
8
|
import { C as DocumentJson, D as DocumentView, E as DirectoryListing, O as DriveLayout, S as EditorHostProps, T as HISTORY_PAGE_SIZE, _ as CoreRoot, a as CoreRouteError, b as DocumentEditorProps, c as DeleteItemModal, d as DriveAuthRequiredModal, f as LoginModal, g as CoreLayout, h as CoreHeader, i as CoreSettingsPage, k as NodeView, l as DocumentVersionUnsupportedModal, m as NotFoundPage, n as PackagesTab, o as ConfirmDocumentUpgradeModal, p as DriveNotFoundPage, r as AppearanceTab, s as CreateDocumentModal, t as ThemeToggle, u as DownloadDocumentWithErrorsModal, v as formatModified, w as DocumentHistory, x as EditorHost, y as DriveIndex } from "./index-DQ0nbYne.js";
|
|
9
|
-
export { APP_ROUTE_ID, type AppReactorClientParams, AppearanceTab, CONTENT_VIEW_ID, CORE_MODAL_VIEWS, ConfirmDocumentUpgradeModal, type ConnectAppRouterOptions, type ConnectConfigHooks, ConnectCoreApp, type ConnectModals, type ConnectNavItem, type ConnectPlugin, type ConnectPluginContext, type ConnectPluginDefinition, type ConnectPluginFactory, type ConnectPluginUi, type ConnectPluginUiSet, type ConnectRootRoute, type ConnectRouteRegistration, type ConnectRouteUi, type ConnectRouter, type ConnectRouterBundle, type ConnectRouterContext, type ConnectRouterFor, type ConnectRouterOptions, type ConnectRoutes, type ConnectSearch, type ConnectSettingsTab, ContentOutlet, CoreError, CoreHeader, CoreLayout, CoreNotFound, CoreRoot, CoreRouteError, CoreSettingsPage, type CreateAppReactorClientOptions, CreateDocumentModal, type CreateDocumentTarget, DRIVE_PENDING_MS, DRIVE_ROUTE_ID, DeleteItemModal, DirectoryListing, type DocumentEditorProps, DocumentHistory, DocumentJson, DocumentVersionUnsupportedModal, DocumentView, type DocumentViewProps, DownloadDocumentWithErrorsModal, DriveAuthRequiredModal, DriveIndex, DriveLayout, type DriveLoaderOptions, type DriveNotFoundData, DriveNotFoundPage, DrivePending, type DriveRouteData, type DriveRouteParams, type DriveRouteView, type DriveViewProps, EditorHost, type EditorHostProps, FEATURE_FLAG_PARAM_PREFIX, GLOBAL_SEARCH_PARAMS, HISTORY_PAGE_SIZE, HOME_ROUTE_ID, type LoadedDocumentModels, type LocalPackage, type LocalPackageSource, type LocalReactorFactory, type LocalReactorModule, LoginModal, ModalDialog, type ModalFrameProps, ModalOutlet, type ModuleNamespace, NODE_ROUTE_ID, type NavRouteEntry, NodeView, NotFoundPage, PERF_STORAGE_KEY, type PackageRoute, PackagesTab, REACTOR_WORKER_QUERY_KEY, REACTOR_WORKER_STORAGE_KEY, ROUTER_MEASURES, type ReactorClientMode, type ReactorClientPlan, type ReactorWorkerFlagInput, type RuntimeFlagInput, type RuntimeFlagKeys, SETTINGS_ROUTE_ID, type SettingsTabEntry, type SidebarMode, ThemeToggle, addConnectRoutes, appTitle, applyComposition, applyConnectPluginUi, bindConnectRouter, bindConnectScroll, connectRoutes, connectRoutesSettled, connectScrollRestoration, connectSearchMiddlewares, coreModals, coreView, createAppReactorClient, createConnectNavigation, createConnectRouter, definedSearch, disposeConnectAppRouter, driveTitle, formatModified, getActivePluginModules, getAppDrives, getConnectAppRouter, getConnectPHStore, getConnectPluginUi, getIsEmbedded, getRuntimeConfig, holdConnectRoutes, isCoreView, isDriveNotFound, isMultiReactorEnabled, isPluginActive, isReactorWorkerEnabled, isRuntimeFlagEnabled, keepOpenedFrom, knownPlugins, loadConnectPluginUi, loadDrive, loadLocalPackage, loadNode, loadRuntimeConfig, markNavigationClick, markRouterNavigations, mergeConnectPluginUi, navRoutes, notFoundTitle, parseConnectSearch, planReactorClient, primeRuntimeConfig, redirectToSettingsTab, refreshAppDrives, registerConnectPlugins, registerConnectRoutes, registerPackageRoutes, removeConnectRoutes, resetConnectPluginUi, resolveReactorClientMode, resolveReactorWorkerEnabled, resolveRuntimeFlag, routerPerfEnabled, selectAppReactorClient, setSettingsRoute, settingsTabs, settingsTabsOf, settingsTitle, showsSettingsTab, stringifyConnectSearch, useCreateDocumentTarget, useDriveRouteData, useDriveRouteIds, useForgetSettingsOpenedFrom, useIsColdStart, useIsEmbedded, useModalFrame, useNavRoutes, useSettingsTabs, useSidebarMode, validateConnectSearch, validateDriveSearch };
|
|
9
|
+
export { APP_ROUTE_ID, type AppReactorClientParams, AppearanceTab, CONTENT_VIEW_ID, CORE_MODAL_VIEWS, ConfirmDocumentUpgradeModal, type ConnectAppRouterOptions, type ConnectChrome, type ConnectConfigHooks, ConnectCoreApp, type ConnectModals, type ConnectNavItem, type ConnectPlugin, type ConnectPluginContext, type ConnectPluginDefinition, type ConnectPluginFactory, type ConnectPluginUi, type ConnectPluginUiSet, type ConnectRootRoute, type ConnectRouteRegistration, type ConnectRouteUi, type ConnectRouter, type ConnectRouterBundle, type ConnectRouterContext, type ConnectRouterFor, type ConnectRouterOptions, type ConnectRoutes, type ConnectSearch, type ConnectSettingsTab, ContentOutlet, CoreError, CoreHeader, CoreLayout, CoreNotFound, CoreRoot, CoreRouteError, type CoreRouteOptions, CoreSettingsPage, type CreateAppReactorClientOptions, CreateDocumentModal, type CreateDocumentTarget, DRIVE_PENDING_MS, DRIVE_ROUTE_ID, DeleteItemModal, DirectoryListing, type DocumentEditorProps, DocumentHistory, DocumentJson, DocumentVersionUnsupportedModal, DocumentView, type DocumentViewProps, DownloadDocumentWithErrorsModal, DriveAuthRequiredModal, DriveIndex, DriveLayout, type DriveLoaderOptions, type DriveNotFoundData, DriveNotFoundPage, DrivePending, type DriveRouteData, type DriveRouteParams, type DriveRouteView, type DriveViewProps, EditorHost, type EditorHostProps, FEATURE_FLAG_PARAM_PREFIX, GLOBAL_SEARCH_PARAMS, HISTORY_PAGE_SIZE, HOME_ROUTE_ID, type LoadedDocumentModels, type LocalPackage, type LocalPackageSource, type LocalReactorFactory, type LocalReactorModule, LoginModal, ModalDialog, type ModalFrameProps, ModalOutlet, type ModuleNamespace, NODE_ROUTE_ID, type NavRouteEntry, NodeView, NotFoundPage, PERF_STORAGE_KEY, type PackageRoute, PackagesTab, REACTOR_CLIENT_QUERY_KEY, REACTOR_CLIENT_STORAGE_KEY, REACTOR_WORKER_QUERY_KEY, REACTOR_WORKER_STORAGE_KEY, ROUTER_MEASURES, type ReactorClientMode, type ReactorClientPlan, type ReactorWorkerFlagInput, type RuntimeFlagInput, type RuntimeFlagKeys, SETTINGS_ROUTE_ID, type SettingsTabEntry, type SidebarMode, ThemeToggle, addConnectRoutes, appTitle, applyComposition, applyConnectPluginUi, bindConnectRouter, bindConnectScroll, connectRoutes, connectRoutesSettled, connectScrollRestoration, connectSearchMiddlewares, coreModals, coreRouteOptions, coreView, createAppReactorClient, createConnectNavigation, createConnectRouter, definedSearch, disposeConnectAppRouter, driveTitle, formatModified, getActivePluginModules, getAppDrives, getConnectAppRouter, getConnectPHStore, getConnectPluginUi, getIsEmbedded, getRuntimeConfig, holdConnectRoutes, isCoreView, isDriveNotFound, isMultiReactorEnabled, isPluginActive, isReactorWorkerEnabled, isRuntimeFlagEnabled, keepOpenedFrom, knownPlugins, loadConnectPluginUi, loadDrive, loadLocalPackage, loadNode, loadRuntimeConfig, markNavigationClick, markRouterNavigations, mergeConnectPluginUi, navRoutes, notFoundTitle, parseConnectSearch, planReactorClient, primeRuntimeConfig, redirectToSettingsTab, refreshAppDrives, registerConnectPlugins, registerConnectRoutes, registerPackageRoutes, removeConnectRoutes, resetConnectPluginUi, resolveReactorClientMode, resolveReactorWorkerEnabled, resolveRuntimeFlag, routerPerfEnabled, selectAppReactorClient, setSettingsRoute, settingsTabs, settingsTabsOf, settingsTitle, showsSettingsTab, stringifyConnectSearch, useConnectChrome, useCreateDocumentTarget, useDriveRouteData, useDriveRouteIds, useForgetSettingsOpenedFrom, useIsColdStart, useIsEmbedded, useModalFrame, useNavRoutes, useSettingsTabs, useSidebarMode, validateConnectSearch, validateDriveSearch };
|
|
10
10
|
export {};
|
package/dist/index.js
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import { C as DocumentJson, D as formatModified, E as DirectoryListing, S as EditorHost, T as HISTORY_PAGE_SIZE, _ as ThemeToggle, a as DriveNotFoundPage, b as DriveLayout, c as CoreLayout, d as CreateDocumentModal, f as DeleteItemModal, g as LoginModal, h as DriveAuthRequiredModal, i as CoreRouteError, l as CoreRoot, m as DownloadDocumentWithErrorsModal, n as AppearanceTab, o as NotFoundPage, p as DocumentVersionUnsupportedModal, r as CoreSettingsPage, s as CoreHeader, t as PackagesTab, u as ConfirmDocumentUpgradeModal, v as DriveIndex, w as DocumentHistory, x as NodeView, y as DocumentView } from "./views-
|
|
2
|
-
import { c as CoreNotFound, d as isCoreView, f as isDriveNotFound, i as mergeConnectPluginUi, l as coreModals, m as loadNode, n as getConnectPluginUi, o as resetConnectPluginUi, p as loadDrive, r as loadConnectPluginUi, s as CoreError, t as applyConnectPluginUi, u as coreView } from "./plugin-ui-
|
|
1
|
+
import { C as DocumentJson, D as formatModified, E as DirectoryListing, S as EditorHost, T as HISTORY_PAGE_SIZE, _ as ThemeToggle, a as DriveNotFoundPage, b as DriveLayout, c as CoreLayout, d as CreateDocumentModal, f as DeleteItemModal, g as LoginModal, h as DriveAuthRequiredModal, i as CoreRouteError, l as CoreRoot, m as DownloadDocumentWithErrorsModal, n as AppearanceTab, o as NotFoundPage, p as DocumentVersionUnsupportedModal, r as CoreSettingsPage, s as CoreHeader, t as PackagesTab, u as ConfirmDocumentUpgradeModal, v as DriveIndex, w as DocumentHistory, x as NodeView, y as DocumentView } from "./views-Ba9OeN3c.js";
|
|
2
|
+
import { c as CoreNotFound, d as isCoreView, f as isDriveNotFound, i as mergeConnectPluginUi, l as coreModals, m as loadNode, n as getConnectPluginUi, o as resetConnectPluginUi, p as loadDrive, r as loadConnectPluginUi, s as CoreError, t as applyConnectPluginUi, u as coreView } from "./plugin-ui-fDXhKTCK.js";
|
|
3
3
|
import { a as connectRoutesSettled, c as registerPackageRoutes, f as CORE_MODAL_VIEWS, h as useModalFrame, i as connectRoutes, l as removeConnectRoutes, m as ModalDialog, n as HOME_ROUTE_ID, o as holdConnectRoutes, p as ModalOutlet, r as addConnectRoutes, s as registerConnectRoutes, t as APP_ROUTE_ID } from "./route-tree-D0aszMrk.js";
|
|
4
|
-
import { C as
|
|
5
|
-
import { i as registerConnectPlugins, n as knownPlugins, t as applyComposition } from "./plugin-host-
|
|
6
|
-
import { _ as
|
|
4
|
+
import { C as CONTENT_VIEW_ID, D as useIsColdStart, E as DrivePending, S as notFoundTitle, T as DRIVE_PENDING_MS, _ as showsSettingsTab, a as useCreateDocumentTarget, b as appTitle, c as useDriveRouteData, d as keepOpenedFrom, f as redirectToSettingsTab, g as settingsTitle, h as settingsTabsOf, i as useSidebarMode, l as useDriveRouteIds, m as settingsTabs, n as useConnectChrome, o as DRIVE_ROUTE_ID, p as setSettingsRoute, r as useNavRoutes, s as NODE_ROUTE_ID, t as navRoutes, u as SETTINGS_ROUTE_ID, v as useForgetSettingsOpenedFrom, w as ContentOutlet, x as driveTitle, y as useSettingsTabs } from "./sidebar-C2y4mZnX.js";
|
|
5
|
+
import { i as registerConnectPlugins, n as knownPlugins, t as applyComposition } from "./plugin-host-D_EW56IQ.js";
|
|
6
|
+
import { S as routerPerfEnabled, _ as connectScrollRestoration, a as bindConnectRouter, b as markNavigationClick, c as FEATURE_FLAG_PARAM_PREFIX, d as definedSearch, f as parseConnectSearch, g as bindConnectScroll, h as validateDriveSearch, i as getConnectAppRouter, l as GLOBAL_SEARCH_PARAMS, m as validateConnectSearch, n as ConnectCoreApp, o as createConnectRouter, p as stringifyConnectSearch, r as disposeConnectAppRouter, s as createConnectNavigation, t as coreRouteOptions, u as connectSearchMiddlewares, v as PERF_STORAGE_KEY, x as markRouterNavigations, y as ROUTER_MEASURES } from "./router-wVNdTI-Y.js";
|
|
7
|
+
import { getIsEmbedded, useIsEmbedded } from "./embedded.js";
|
|
7
8
|
import { getRuntimeConfig, loadRuntimeConfig, primeRuntimeConfig } from "./runtime-config.js";
|
|
8
9
|
import { n as isPluginActive, t as getActivePluginModules } from "./plugins-x1XqLPzp.js";
|
|
9
|
-
import { n as resolveRuntimeFlag, t as isRuntimeFlagEnabled } from "./runtime-flag-
|
|
10
|
-
import { a as planReactorClient, c as
|
|
11
|
-
|
|
12
|
-
export { APP_ROUTE_ID, AppearanceTab, CONTENT_VIEW_ID, CORE_MODAL_VIEWS, ConfirmDocumentUpgradeModal, ConnectCoreApp, ContentOutlet, CoreError, CoreHeader, CoreLayout, CoreNotFound, CoreRoot, CoreRouteError, CoreSettingsPage, CreateDocumentModal, DRIVE_PENDING_MS, DRIVE_ROUTE_ID, DeleteItemModal, DirectoryListing, DocumentHistory, DocumentJson, DocumentVersionUnsupportedModal, DocumentView, DownloadDocumentWithErrorsModal, DriveAuthRequiredModal, DriveIndex, DriveLayout, DriveNotFoundPage, DrivePending, EditorHost, FEATURE_FLAG_PARAM_PREFIX, GLOBAL_SEARCH_PARAMS, HISTORY_PAGE_SIZE, HOME_ROUTE_ID, LoginModal, ModalDialog, ModalOutlet, NODE_ROUTE_ID, NodeView, NotFoundPage, PERF_STORAGE_KEY, PackagesTab, REACTOR_WORKER_QUERY_KEY, REACTOR_WORKER_STORAGE_KEY, ROUTER_MEASURES, SETTINGS_ROUTE_ID, ThemeToggle, addConnectRoutes, appTitle, applyComposition, applyConnectPluginUi, bindConnectRouter, bindConnectScroll, connectRoutes, connectRoutesSettled, connectScrollRestoration, connectSearchMiddlewares, coreModals, coreView, createAppReactorClient, createConnectNavigation, createConnectRouter, definedSearch, disposeConnectAppRouter, driveTitle, formatModified, getActivePluginModules, getAppDrives, getConnectAppRouter, getConnectPHStore, getConnectPluginUi, getIsEmbedded, getRuntimeConfig, holdConnectRoutes, isCoreView, isDriveNotFound, isMultiReactorEnabled, isPluginActive, isReactorWorkerEnabled, isRuntimeFlagEnabled, keepOpenedFrom, knownPlugins, loadConnectPluginUi, loadDrive, loadLocalPackage, loadNode, loadRuntimeConfig, markNavigationClick, markRouterNavigations, mergeConnectPluginUi, navRoutes, notFoundTitle, parseConnectSearch, planReactorClient, primeRuntimeConfig, redirectToSettingsTab, refreshAppDrives, registerConnectPlugins, registerConnectRoutes, registerPackageRoutes, removeConnectRoutes, resetConnectPluginUi, resolveReactorClientMode, resolveReactorWorkerEnabled, resolveRuntimeFlag, routerPerfEnabled, selectAppReactorClient, setSettingsRoute, settingsTabs, settingsTabsOf, settingsTitle, showsSettingsTab, stringifyConnectSearch, useCreateDocumentTarget, useDriveRouteData, useDriveRouteIds, useForgetSettingsOpenedFrom, useIsColdStart, useIsEmbedded, useModalFrame, useNavRoutes, useSettingsTabs, useSidebarMode, validateConnectSearch, validateDriveSearch };
|
|
10
|
+
import { n as resolveRuntimeFlag, t as isRuntimeFlagEnabled } from "./runtime-flag-Bp6QasS8.js";
|
|
11
|
+
import { a as planReactorClient, c as REACTOR_CLIENT_QUERY_KEY, d as REACTOR_WORKER_QUERY_KEY, f as REACTOR_WORKER_STORAGE_KEY, h as isMultiReactorEnabled, i as getAppDrives, l as REACTOR_CLIENT_STORAGE_KEY, m as resolveReactorWorkerEnabled, n as getConnectPHStore, o as refreshAppDrives, p as isReactorWorkerEnabled, r as createAppReactorClient, s as selectAppReactorClient, t as loadLocalPackage, u as resolveReactorClientMode } from "./runtime-BUG9vT2E.js";
|
|
12
|
+
export { APP_ROUTE_ID, AppearanceTab, CONTENT_VIEW_ID, CORE_MODAL_VIEWS, ConfirmDocumentUpgradeModal, ConnectCoreApp, ContentOutlet, CoreError, CoreHeader, CoreLayout, CoreNotFound, CoreRoot, CoreRouteError, CoreSettingsPage, CreateDocumentModal, DRIVE_PENDING_MS, DRIVE_ROUTE_ID, DeleteItemModal, DirectoryListing, DocumentHistory, DocumentJson, DocumentVersionUnsupportedModal, DocumentView, DownloadDocumentWithErrorsModal, DriveAuthRequiredModal, DriveIndex, DriveLayout, DriveNotFoundPage, DrivePending, EditorHost, FEATURE_FLAG_PARAM_PREFIX, GLOBAL_SEARCH_PARAMS, HISTORY_PAGE_SIZE, HOME_ROUTE_ID, LoginModal, ModalDialog, ModalOutlet, NODE_ROUTE_ID, NodeView, NotFoundPage, PERF_STORAGE_KEY, PackagesTab, REACTOR_CLIENT_QUERY_KEY, REACTOR_CLIENT_STORAGE_KEY, REACTOR_WORKER_QUERY_KEY, REACTOR_WORKER_STORAGE_KEY, ROUTER_MEASURES, SETTINGS_ROUTE_ID, ThemeToggle, addConnectRoutes, appTitle, applyComposition, applyConnectPluginUi, bindConnectRouter, bindConnectScroll, connectRoutes, connectRoutesSettled, connectScrollRestoration, connectSearchMiddlewares, coreModals, coreRouteOptions, coreView, createAppReactorClient, createConnectNavigation, createConnectRouter, definedSearch, disposeConnectAppRouter, driveTitle, formatModified, getActivePluginModules, getAppDrives, getConnectAppRouter, getConnectPHStore, getConnectPluginUi, getIsEmbedded, getRuntimeConfig, holdConnectRoutes, isCoreView, isDriveNotFound, isMultiReactorEnabled, isPluginActive, isReactorWorkerEnabled, isRuntimeFlagEnabled, keepOpenedFrom, knownPlugins, loadConnectPluginUi, loadDrive, loadLocalPackage, loadNode, loadRuntimeConfig, markNavigationClick, markRouterNavigations, mergeConnectPluginUi, navRoutes, notFoundTitle, parseConnectSearch, planReactorClient, primeRuntimeConfig, redirectToSettingsTab, refreshAppDrives, registerConnectPlugins, registerConnectRoutes, registerPackageRoutes, removeConnectRoutes, resetConnectPluginUi, resolveReactorClientMode, resolveReactorWorkerEnabled, resolveRuntimeFlag, routerPerfEnabled, selectAppReactorClient, setSettingsRoute, settingsTabs, settingsTabsOf, settingsTitle, showsSettingsTab, stringifyConnectSearch, useConnectChrome, useCreateDocumentTarget, useDriveRouteData, useDriveRouteIds, useForgetSettingsOpenedFrom, useIsColdStart, useIsEmbedded, useModalFrame, useNavRoutes, useSettingsTabs, useSidebarMode, validateConnectSearch, validateDriveSearch };
|
|
@@ -78,7 +78,7 @@ function createGraphQLRoutableBackend(options) {
|
|
|
78
78
|
getIncomingRelationshipEdges: (target, type, view, paging, signal) => gql.getIncomingRelationshipEdges(target, type, view, paging, signal),
|
|
79
79
|
subscribe: (search, callback, view) => gql.subscribe(search, callback, view),
|
|
80
80
|
getCreateSignaturePolicy: () => gql.getCreateSignaturePolicy(),
|
|
81
|
-
getCreateProtocolVersions: (
|
|
81
|
+
getCreateProtocolVersions: (options, signal) => gql.getCreateProtocolVersions(options, signal),
|
|
82
82
|
create: async (document, parent, signal) => drives.learn(await gql.create(document, parent, signal)),
|
|
83
83
|
execute: async (identifier, branch, actions, signal) => drives.learn(await gql.execute(identifier, branch, actions, signal)),
|
|
84
84
|
executeBatch: (request, signal) => gql.executeBatch(request, signal),
|
|
@@ -216,4 +216,4 @@ async function buildMultiReactorClient(params) {
|
|
|
216
216
|
//#endregion
|
|
217
217
|
export { ConnectRoutingClient, LOCAL_BACKEND_NAME, PLACE_ON_LOCAL, PLACE_ON_REMOTE, REMOTE_BACKEND_NAME, buildMultiReactorClient, createGraphQLRoutableBackend, deriveSwitchboardGraphqlUrl, localFacts, localReach };
|
|
218
218
|
|
|
219
|
-
//# sourceMappingURL=multi-reactor-
|
|
219
|
+
//# sourceMappingURL=multi-reactor-D_2B4jmu.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"multi-reactor-D_2B4jmu.js","names":[],"sources":["../src/runtime/graphql-routable-backend.ts","../src/runtime/multi-reactor.ts"],"sourcesContent":["import {\n JOB_NOT_FOUND_ERROR_NAME,\n JobStatus,\n type PagedResults,\n type ReactorInfo,\n type ViewFilter,\n} from \"@powerhousedao/reactor\";\nimport {\n DRIVE_DOCUMENT_TYPES,\n findIsServableOverGraphQL,\n GraphQLReactorClient,\n type DriveIdCall,\n type GraphQLReactorClientOptions,\n} from \"@powerhousedao/reactor-browser\";\nimport type { IRoutableBackend } from \"@powerhousedao/reactor-router\";\nimport type { Action, PHDocument } from \"@powerhousedao/shared/document-model\";\n\nconst REMOTE_INFO_QUERY = /* GraphQL */ `\n query RemoteReactorInfo {\n inspection {\n info {\n storage {\n engine\n persistence\n durable\n selfHeal\n }\n workflows\n syncChannels\n }\n }\n }\n`;\n\ntype RemoteReactorInfo = {\n inspection: { info: Omit<ReactorInfo, \"access\"> };\n};\n\n/** Ids and slugs of documents this backend answered as drives, by drive id. */\nclass KnownDrives {\n private readonly ids = new Map<string, string>();\n\n learn<T extends PHDocument>(document: T): T {\n const { id, slug, documentType } = document.header;\n if ((DRIVE_DOCUMENT_TYPES as readonly string[]).includes(documentType)) {\n this.ids.set(id, id);\n if (slug) {\n this.ids.set(slug, id);\n }\n }\n return document;\n }\n\n learnPage<T extends PHDocument>(page: PagedResults<T>): PagedResults<T> {\n for (const document of page.results) {\n this.learn(document);\n }\n return page;\n }\n\n driveOf(identifier: string | undefined): string | undefined {\n return identifier === undefined ? undefined : this.ids.get(identifier);\n }\n\n /** Names a drive only when this backend proved it is one. */\n driveIdFor = (call: DriveIdCall): string | undefined => {\n switch (call.method) {\n case \"create\":\n case \"find\":\n return this.driveOf(call.parentId);\n case \"execute\":\n case \"deleteDocument\":\n return this.driveOf(call.documentId);\n case \"executeBatch\":\n for (const job of call.jobs ?? []) {\n const drive = this.driveOf(job.documentId);\n if (drive !== undefined) {\n return drive;\n }\n }\n return undefined;\n }\n };\n}\n\nexport type GraphQLRoutableBackendOptions = Omit<\n GraphQLReactorClientOptions,\n \"driveIdFor\"\n>;\n\nexport type GraphQLRoutableBackend = {\n readonly backend: IRoutableBackend;\n /** The Switchboard's own facts, from its inspection subgraph. */\n info(): Promise<ReactorInfo>;\n /** Reopens the realtime socket on the new credentials. */\n notifyCredentialsChanged(): void;\n};\n\n/** A Switchboard as a router backend; members GraphQL cannot serve are absent. */\nexport function createGraphQLRoutableBackend(\n options: GraphQLRoutableBackendOptions,\n): GraphQLRoutableBackend {\n const drives = new KnownDrives();\n const gql = new GraphQLReactorClient({\n ...options,\n driveIdFor: drives.driveIdFor,\n });\n const backend: IRoutableBackend = {\n supports: { find: findIsServableOverGraphQL, pointInTimeViews: false },\n drives: gql.read.drives,\n get: async <TDocument extends PHDocument>(\n identifier: string,\n view?: ViewFilter,\n signal?: AbortSignal,\n ) => drives.learn(await gql.get<TDocument>(identifier, view, signal)),\n getMany: async <TDocument extends PHDocument>(\n ids: string[],\n view?: ViewFilter,\n signal?: AbortSignal,\n ) =>\n (await gql.getMany<TDocument>(ids, view, signal)).map((document) =>\n drives.learn(document),\n ),\n getOperations: (identifier, view, filter, paging, signal) =>\n gql.getOperations(identifier, view, filter, paging, signal),\n find: async (search, view, paging, signal) =>\n drives.learnPage(await gql.find(search, view, paging, signal)),\n isServed: (identifier, view, signal) =>\n gql.isServed(identifier, view, signal),\n getOutgoingRelationships: (source, type, view, paging, signal) =>\n gql.getOutgoingRelationships(source, type, view, paging, signal),\n getIncomingRelationships: (target, type, view, paging, signal) =>\n gql.getIncomingRelationships(target, type, view, paging, signal),\n getOutgoingRelationshipEdges: (source, type, view, paging, signal) =>\n gql.getOutgoingRelationshipEdges(source, type, view, paging, signal),\n getIncomingRelationshipEdges: (target, type, view, paging, signal) =>\n gql.getIncomingRelationshipEdges(target, type, view, paging, signal),\n subscribe: (search, callback, view) =>\n gql.subscribe(search, callback, view),\n getCreateSignaturePolicy: () => gql.getCreateSignaturePolicy(),\n getCreateProtocolVersions: (options, signal) =>\n gql.getCreateProtocolVersions(options, signal),\n create: async <TDocument extends PHDocument = PHDocument>(\n document: PHDocument,\n parent?: string,\n signal?: AbortSignal,\n ) => drives.learn(await gql.create<TDocument>(document, parent, signal)),\n execute: async <TDocument extends PHDocument>(\n identifier: string,\n branch: string,\n actions: Action[],\n signal?: AbortSignal,\n ) =>\n drives.learn(\n await gql.execute<TDocument>(identifier, branch, actions, signal),\n ),\n executeBatch: (request, signal) => gql.executeBatch(request, signal),\n deleteDocument: (identifier, propagate, signal) =>\n gql.deleteDocument(identifier, propagate, signal),\n setPreferredEditor: (identifier, editor, branch, signal) =>\n gql.setPreferredEditor(identifier, editor, branch, signal),\n getJob: async (jobId, signal) => {\n const job = await gql.getJob(jobId, signal);\n return job?.status === JobStatus.FAILED &&\n job.error?.name === JOB_NOT_FOUND_ERROR_NAME\n ? undefined\n : job;\n },\n waitForJob: (job, signal) => gql.waitForJob(job, signal),\n };\n return {\n backend,\n info: async () => {\n const result = await gql.request<RemoteReactorInfo>(REMOTE_INFO_QUERY);\n return {\n ...result.inspection.info,\n access: { admin: false, sql: false },\n };\n },\n notifyCredentialsChanged: () => gql.notifyCredentialsChanged(),\n };\n}\n","import {\n createReactorInspector,\n type ReactorInfo,\n} from \"@powerhousedao/reactor\";\nimport type {\n BrowserReactorClientModule,\n WorkerReactorClientModule,\n} from \"@powerhousedao/reactor-browser\";\nimport {\n FanInPartialFailureError,\n fromReactorClient,\n RoutingReactorClient,\n type CollectionRequirementsInput,\n type ReactorReach,\n type RoutableBackendConfig,\n type RouterDiagnostic,\n type RoutingClientOptions,\n} from \"@powerhousedao/reactor-router\";\nimport type {\n DocumentModelModule,\n ISigner,\n} from \"@powerhousedao/shared/document-model\";\nimport { logger } from \"document-model\";\nimport {\n createGraphQLRoutableBackend,\n type GraphQLRoutableBackend,\n} from \"./graphql-routable-backend.js\";\n\nexport { createGraphQLRoutableBackend } from \"./graphql-routable-backend.js\";\nexport type {\n GraphQLRoutableBackend,\n GraphQLRoutableBackendOptions,\n} from \"./graphql-routable-backend.js\";\n\nexport const LOCAL_BACKEND_NAME = \"connect-local\";\nexport const REMOTE_BACKEND_NAME = \"switchboard-remote\";\n\nexport type LocalReactorModule =\n | BrowserReactorClientModule\n | WorkerReactorClientModule;\n\nconst REMOTE_REACH: ReactorReach = Object.freeze({\n hosting: \"remote\",\n inspection: \"none\",\n});\n\n/** Only the tab's reactor is inspectable here, so new collections land on it. */\nexport const PLACE_ON_LOCAL: CollectionRequirementsInput = Object.freeze({\n inspectable: true,\n});\n\nexport function localReach(kind: LocalReactorModule[\"kind\"]): ReactorReach {\n return kind === \"worker\"\n ? { hosting: \"worker\", inspection: \"rpc\" }\n : { hosting: \"in-process\", inspection: \"direct\" };\n}\n\n/** Read at every refresh, never kept: a rebuilt reactor reports its own. */\nexport function localFacts(\n module: LocalReactorModule,\n): () => Promise<ReactorInfo> {\n if (module.kind === \"worker\") {\n return () => module.inspector.info();\n }\n return async () => {\n const reactorModule = module.reactorModule;\n if (!reactorModule) {\n throw new Error(\"The in-tab reactor exposes no module to inspect\");\n }\n return createReactorInspector(reactorModule).info();\n };\n}\n\n/** `<origin>[/<prefix>]/d/<slug>` -> `<origin>[/<prefix>]/graphql`. */\nexport function deriveSwitchboardGraphqlUrl(\n remoteDriveUrl: string,\n): string | undefined {\n let parsed: URL;\n try {\n parsed = new URL(remoteDriveUrl);\n } catch {\n return undefined;\n }\n const prefix = /^(.*)\\/d\\/[^/]+\\/?$/.exec(parsed.pathname)?.[1];\n return prefix === undefined ? undefined : `${parsed.origin}${prefix}/graphql`;\n}\n\n/** The loaded document models, or a getter that reads the current ones. */\nexport type LoadedDocumentModels =\n | readonly DocumentModelModule[]\n | (() => readonly DocumentModelModule[]);\n\nexport type MultiReactorParams = {\n /** The local module, built and ready. Undefined builds a REMOTE-ONLY router\n * (no local backend → no local reactor, no PGlite): the `remote` client. */\n module: LocalReactorModule | undefined;\n remoteGraphqlUrl: string;\n /** Signs routed writes; unsigned (anonymous) without one. */\n signer?: ISigner;\n /** Signing models when the local module exposes no registry; the router asks the local reactor (or, remote-only, the loaded set). */\n documentModelModules: LoadedDocumentModels;\n onDiagnostic?: RouterDiagnostic;\n};\n\n/** Remote-only placement: the Switchboard serves every collection. (It offers\n * no inspection surface over GraphQL, so PLACE_ON_LOCAL's `inspectable`\n * requirement must NOT apply, or no backend would be eligible.) */\nexport const PLACE_ON_REMOTE: CollectionRequirementsInput = Object.freeze({});\n\n/**\n * The local answer stands when only the Switchboard could not answer -- but\n * only when there IS a local backend. Remote-only has nothing to fall back to,\n * so its errors surface. Installed as the router's `answerFailedIdCheck`, so\n * the facade and `write.isDocumentIdTaken` both apply it.\n */\nfunction localIdCheckAnswer(\n documentId: string,\n error: unknown,\n): boolean | undefined {\n if (!failedOnlyOnRemote(error)) {\n return undefined;\n }\n logger.warn(\n \"The Switchboard could not say whether @id is taken; using the local reactor's answer: @error\",\n documentId,\n error,\n );\n return false;\n}\n\n/** The router Connect installs, with Connect's handling of credentials and id checks. */\nexport class ConnectRoutingClient extends RoutingReactorClient {\n private readonly remote: GraphQLRoutableBackend;\n\n constructor(\n backends: readonly RoutableBackendConfig[],\n options: RoutingClientOptions,\n remote: GraphQLRoutableBackend,\n hasLocal: boolean,\n ) {\n super(backends, {\n ...options,\n answerFailedIdCheck: hasLocal\n ? localIdCheckAnswer\n : options.answerFailedIdCheck,\n });\n this.remote = remote;\n }\n\n /** Renown's sign-in and sign-out call this on whatever client is installed. */\n notifyCredentialsChanged(): void {\n this.remote.notifyCredentialsChanged();\n }\n}\n\nfunction failedOnlyOnRemote(error: unknown): boolean {\n return (\n error instanceof FanInPartialFailureError &&\n error.failures.every((failure) => failure.backend === REMOTE_BACKEND_NAME)\n );\n}\n\n/**\n * Build the Connect routing client. With a local `module` it is the router\n * over the tab's reactor (primary) and the Switchboard; WITHOUT one it is the\n * `remote` client — a remote-only router whose single backend is the\n * Switchboard, so no local reactor (and no PGlite) is built. Either way the\n * result is a full IReactorClient the app graph consumes unchanged.\n */\nexport async function buildMultiReactorClient(\n params: MultiReactorParams,\n): Promise<ConnectRoutingClient> {\n const module = params.module;\n const registry = module?.reactorModule?.documentModelRegistry;\n const loaded = params.documentModelModules;\n const loadedModules = typeof loaded === \"function\" ? loaded : () => loaded;\n const remote = createGraphQLRoutableBackend({\n url: params.remoteGraphqlUrl,\n documentModels: () => registry?.getAllModules() ?? loadedModules(),\n });\n const remoteBackend: RoutableBackendConfig = {\n name: REMOTE_BACKEND_NAME,\n backend: remote.backend,\n facts: () => remote.info(),\n reach: REMOTE_REACH,\n refusesMisroutes: false,\n };\n const backends: RoutableBackendConfig[] = module\n ? [\n {\n name: LOCAL_BACKEND_NAME,\n backend: fromReactorClient(module.client),\n facts: localFacts(module),\n reach: localReach(module.kind),\n refusesMisroutes: false,\n },\n remoteBackend,\n ]\n : [remoteBackend];\n const router = new ConnectRoutingClient(\n backends,\n {\n // Remote-only: the Switchboard is primary and serves every collection;\n // with a local reactor, new collections land on it (inspectable).\n primaryBackend: module ? LOCAL_BACKEND_NAME : REMOTE_BACKEND_NAME,\n defaultRequirements: module ? PLACE_ON_LOCAL : PLACE_ON_REMOTE,\n signer: params.signer,\n onDiagnostic: params.onDiagnostic,\n // The Switchboard serves no models over GraphQL; remote-only uses the loaded set.\n documentModelModules: module ? undefined : loadedModules,\n },\n remote,\n Boolean(module),\n );\n await router.refreshFacts();\n return router;\n}\n"],"mappings":";;;;;AAiBA,MAAM,oBAAkC;;;;;;;;;;;;;;;;;AAsBxC,IAAM,cAAN,MAAkB;CAChB,sBAAuB,IAAI,IAAoB;CAE/C,MAA4B,UAAgB;EAC1C,MAAM,EAAE,IAAI,MAAM,iBAAiB,SAAS;EAC5C,IAAK,qBAA2C,SAAS,YAAY,GAAG;GACtE,KAAK,IAAI,IAAI,IAAI,EAAE;GACnB,IAAI,MACF,KAAK,IAAI,IAAI,MAAM,EAAE;EAEzB;EACA,OAAO;CACT;CAEA,UAAgC,MAAwC;EACtE,KAAK,MAAM,YAAY,KAAK,SAC1B,KAAK,MAAM,QAAQ;EAErB,OAAO;CACT;CAEA,QAAQ,YAAoD;EAC1D,OAAO,eAAe,KAAA,IAAY,KAAA,IAAY,KAAK,IAAI,IAAI,UAAU;CACvE;;CAGA,cAAc,SAA0C;EACtD,QAAQ,KAAK,QAAb;GACE,KAAK;GACL,KAAK,QACH,OAAO,KAAK,QAAQ,KAAK,QAAQ;GACnC,KAAK;GACL,KAAK,kBACH,OAAO,KAAK,QAAQ,KAAK,UAAU;GACrC,KAAK;IACH,KAAK,MAAM,OAAO,KAAK,QAAQ,CAAC,GAAG;KACjC,MAAM,QAAQ,KAAK,QAAQ,IAAI,UAAU;KACzC,IAAI,UAAU,KAAA,GACZ,OAAO;IAEX;IACA;EACJ;CACF;AACF;;AAgBA,SAAgB,6BACd,SACwB;CACxB,MAAM,SAAS,IAAI,YAAY;CAC/B,MAAM,MAAM,IAAI,qBAAqB;EACnC,GAAG;EACH,YAAY,OAAO;CACrB,CAAC;CAgED,OAAO;EACL,SAAA;GA/DA,UAAU;IAAE,MAAM;IAA2B,kBAAkB;GAAM;GACrE,QAAQ,IAAI,KAAK;GACjB,KAAK,OACH,YACA,MACA,WACG,OAAO,MAAM,MAAM,IAAI,IAAe,YAAY,MAAM,MAAM,CA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,OAAO;AACT"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { O as __exportAll } from "./views-
|
|
1
|
+
import { O as __exportAll } from "./views-Ba9OeN3c.js";
|
|
2
2
|
import { t as getConnectRegistry } from "./registry-DCZHBP7M.js";
|
|
3
3
|
import { resolveOrder, runTransformHook } from "@powerhousedao/host-core/plugins";
|
|
4
4
|
//#region src/plugins/plugin-host.ts
|
|
@@ -57,4 +57,4 @@ async function applyComposition(config) {
|
|
|
57
57
|
//#endregion
|
|
58
58
|
export { registerConnectPlugins as i, knownPlugins as n, plugin_host_exports as r, applyComposition as t };
|
|
59
59
|
|
|
60
|
-
//# sourceMappingURL=plugin-host-
|
|
60
|
+
//# sourceMappingURL=plugin-host-D_EW56IQ.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"plugin-host-
|
|
1
|
+
{"version":3,"file":"plugin-host-D_EW56IQ.js","names":[],"sources":["../src/plugins/plugin-host.ts"],"sourcesContent":["import {\n resolveOrder,\n runTransformHook,\n} from \"@powerhousedao/host-core/plugins\";\nimport type { PHConnectRuntimeConfig } from \"@powerhousedao/shared/clis\";\nimport type { ConnectPluginDefinitions } from \"../registry.js\";\nimport { getConnectRegistry } from \"../registry.js\";\nimport type {\n ConnectPlugin,\n ConnectPluginContext,\n ConnectPluginDefinition,\n} from \"./types.js\";\n\nexport type { ConnectPluginContext } from \"./types.js\";\n\n// ConnectCore's plugin pipeline (rewire plan R3). It runs only when the served\n// config carries a `composition`; presence is activation.\n\ntype PluginDefinitions = ConnectPluginDefinitions;\ntype PluginLoader = () => Promise<PluginDefinitions>;\n\n/** Makes plugin modules known by specifier; a loader runs when a composition applies. */\nexport function registerConnectPlugins(\n plugins: PluginDefinitions | PluginLoader,\n) {\n const registry = getConnectRegistry();\n if (typeof plugins === \"function\") registry.pluginLoaders.push(plugins);\n else Object.assign(registry.plugins, plugins);\n}\n\n/** Every plugin module made known, its loaders run. */\nexport async function knownPlugins(): Promise<PluginDefinitions> {\n const registry = getConnectRegistry();\n const pending = registry.pluginLoaders;\n registry.pluginLoaders = [];\n for (const loaded of await Promise.all(pending.map((load) => load()))) {\n Object.assign(registry.plugins, loaded);\n }\n return registry.plugins;\n}\n\n/** The slices of known plugins absent from the composition, zeroed. */\nfunction zeroAbsentSlices(\n config: PHConnectRuntimeConfig,\n present: ReadonlySet<string>,\n plugins: PluginDefinitions,\n): PHConnectRuntimeConfig {\n let out = { ...config };\n for (const [module, definition] of Object.entries(plugins)) {\n if (!present.has(module) && definition.whenAbsent) {\n out = definition.whenAbsent(out);\n }\n }\n return out;\n}\n\nconst LOG = \"[connect:plugins]\";\n\n/** Applies the composition to the served config; pure, and logs the plan and\n * each hook it fires to the console. */\nexport async function applyComposition(\n config: PHConnectRuntimeConfig,\n): Promise<PHConnectRuntimeConfig> {\n const composition = config.composition;\n if (!composition) return config;\n\n const definitions = await knownPlugins();\n const present = new Set(composition.map((entry) => entry.module));\n const plugins: ConnectPlugin[] = [];\n\n console.info(\n `${LOG} resolving composition — ${composition.length} entr${composition.length === 1 ? \"y\" : \"ies\"}`,\n );\n for (const entry of composition) {\n const definition: ConnectPluginDefinition | undefined =\n definitions[entry.module];\n if (!definition) {\n console.warn(\n `${LOG} ✗ ${entry.module} — unknown (external plugin loading not wired); SKIPPED`,\n );\n continue;\n }\n const plugin = definition.create(entry.config ?? {});\n plugins.push(plugin);\n const cfgKeys = Object.keys(entry.config ?? {});\n console.info(\n `${LOG} ✓ ${plugin.name} (${entry.module})` +\n (cfgKeys.length ? ` config: {${cfgKeys.join(\", \")}}` : \"\"),\n );\n }\n\n const ordered = resolveOrder(plugins);\n const ctx: ConnectPluginContext = { entryConfig: {} };\n const ran = ordered\n .filter((p) => p.hooks?.transformConnectConfig)\n .map((p) => p.name);\n console.info(\n `${LOG} hook transformConnectConfig → ${ran.length ? ran.join(\", \") : \"(none)\"}`,\n );\n return runTransformHook<PHConnectRuntimeConfig, ConnectPluginContext>(\n \"transformConnectConfig\",\n ord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,UAAU,OAAO,KAAK,MAAM,UAAU,CAAC,CAAC;EAC9C,QAAQ,KACN,GAAG,IAAI,OAAO,OAAO,KAAK,IAAI,MAAM,OAAO,MACxC,QAAQ,SAAS,aAAa,QAAQ,KAAK,IAAI,EAAE,KAAK,GAC3D;CACF;CAEA,MAAM,UAAU,aAAa,OAAO;CACpC,MAAM,MAA4B,EAAE,aAAa,CAAC,EAAE;CACpD,MAAM,MAAM,QACT,QAAQ,MAAM,EAAE,OAAO,sBAAsB,CAAC,CAC9C,KAAK,MAAM,EAAE,IAAI;CACpB,QAAQ,KACN,GAAG,IAAI,iCAAiC,IAAI,SAAS,IAAI,KAAK,IAAI,IAAI,UACxE;CACA,OAAO,iBACL,0BACA,SACA,KACA,iBAAiB,QAAQ,SAAS,WAAW,CAC/C;AACF"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { O as __exportAll } from "./views-
|
|
1
|
+
import { O as __exportAll } from "./views-Ba9OeN3c.js";
|
|
2
2
|
import { t as getConnectRegistry } from "./registry-DCZHBP7M.js";
|
|
3
3
|
import { f as CORE_MODAL_VIEWS, l as removeConnectRoutes, r as addConnectRoutes, u as resolveConnectRoutes } from "./route-tree-D0aszMrk.js";
|
|
4
|
-
import { n as knownPlugins } from "./plugin-host-
|
|
4
|
+
import { n as knownPlugins } from "./plugin-host-D_EW56IQ.js";
|
|
5
5
|
import { findDriveBySlugOrId, makeDriveSlug, makeNodeSlug, peekDriveNode, resolveDriveRoute } from "@powerhousedao/reactor-browser";
|
|
6
6
|
import { lazyRouteComponent, notFound, redirect } from "@tanstack/react-router";
|
|
7
7
|
import { jsx } from "react/jsx-runtime";
|
|
@@ -197,4 +197,4 @@ function resetConnectPluginUi(routeTree) {
|
|
|
197
197
|
//#endregion
|
|
198
198
|
export { plugin_ui_exports as a, CoreNotFound as c, isCoreView as d, isDriveNotFound as f, mergeConnectPluginUi as i, coreModals as l, loadNode as m, getConnectPluginUi as n, resetConnectPluginUi as o, loadDrive as p, loadConnectPluginUi as r, CoreError as s, applyConnectPluginUi as t, coreView as u };
|
|
199
199
|
|
|
200
|
-
//# sourceMappingURL=plugin-ui-
|
|
200
|
+
//# sourceMappingURL=plugin-ui-fDXhKTCK.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"plugin-ui-W0ma6oKJ.js","names":[],"sources":["../src/router/drive-route-loader.ts","../src/router/core-views.tsx","../src/plugins/plugin-ui.ts"],"sourcesContent":["// The drive routes' loaders. Server-safe: they read everything from router context.\nimport type { DriveArrivals, PHStore } from \"@powerhousedao/reactor-browser\";\nimport {\n findDriveBySlugOrId,\n makeDriveSlug,\n makeNodeSlug,\n peekDriveNode,\n resolveDriveRoute,\n} from \"@powerhousedao/reactor-browser\";\nimport { notFound, redirect } from \"@tanstack/react-router\";\n\nexport type ConnectRouterContext = {\n store: PHStore;\n /** Without it the drive route never waits for drives to arrive. */\n arrivals?: DriveArrivals;\n /** Ends every document title; \"Connect\" without one. */\n appName?: string;\n /** Rendering the loading shell: a layout shows its pendingComponent in place of its page. */\n shell?: boolean;\n};\n\n/** A missing drive's not-found data. */\nexport type DriveNotFoundData = { driveSlug: string };\n\nexport function isDriveNotFound(data: unknown): data is DriveNotFoundData {\n return (\n typeof data === \"object\" &&\n data !== null &&\n typeof (data as { driveSlug?: unknown }).driveSlug === \"string\"\n );\n}\n\n/** What the drive routes resolved their params to. */\nexport type DriveRouteData = { driveId: string; nodeId?: string };\n\nexport type DriveRouteParams = { driveSlug: string; nodeSlug?: string };\n\nexport type DriveLoaderOptions = {\n params: DriveRouteParams;\n context: ConnectRouterContext;\n abortController: AbortController;\n preload: boolean;\n};\n\nfunction resolve(options: DriveLoaderOptions, params: DriveRouteParams) {\n return resolveDriveRoute({\n store: options.context.store,\n arrivals: options.context.arrivals,\n driveSlug: params.driveSlug,\n nodeSlug: params.nodeSlug,\n signal: options.abortController.signal,\n preload: options.preload,\n });\n}\n\n// At the drive layout, so the 404 takes the drive's place in the layout.\nfunction driveNotFound(driveSlug: string) {\n return notFound({\n routeId: \"/_app/d/$driveSlug\" as never,\n data: { driveSlug } satisfies DriveNotFoundData,\n });\n}\n\n/** The drive layout's loader: the drive, or not found once arrivals settle. */\nexport async function loadDrive(\n options: DriveLoaderOptions,\n): Promise<{ driveId: string }> {\n const { driveSlug } = options.params;\n const result = await resolve(options, { driveSlug });\n if (result.kind === \"drive-not-found\") {\n // oxlint-disable-next-line typescript/only-throw-error -- router control flow\n throw driveNotFound(driveSlug);\n }\n return { driveId: result.driveId };\n}\n\n/** The node route's loader: the drive and the open node. An id or an old name\n * in the URL becomes the current slugs; a missing node leads to its drive. */\nexport async function loadNode(\n options: DriveLoaderOptions,\n): Promise<DriveRouteData> {\n const { params, context, preload } = options;\n const result = await resolve(options, params);\n switch (result.kind) {\n case \"drive\": {\n const data: DriveRouteData = result.nodeId\n ? { driveId: result.driveId, nodeId: result.nodeId }\n : { driveId: result.driveId };\n const canonical = canonicalParams(context.store, data);\n // An id, an old name or an old drive id in the URL becomes the current slugs.\n if (\n !preload &&\n canonical &&\n (canonical.driveSlug !== params.driveSlug ||\n canonical.nodeSlug !== (params.nodeSlug || undefined))\n ) {\n // oxlint-disable-next-line typescript/only-throw-error -- router control flow\n throw redirectTo(canonical);\n }\n return data;\n }\n case \"drive-not-found\":\n // oxlint-disable-next-line typescript/only-throw-error -- router control flow\n throw driveNotFound(params.driveSlug);\n case \"node-not-found\":\n // oxlint-disable-next-line typescript/only-throw-error -- router control flow\n throw redirectTo({\n driveSlug:\n canonicalParams(context.store, { driveId: result.driveId })\n ?.driveSlug ?? params.driveSlug,\n nodeSlug: undefined,\n });\n }\n}\n\n// The slugs links write for `data`; unknown while the drive is unlisted.\nfunction canonicalParams(\n store: PHStore,\n data: DriveRouteData,\n): DriveRouteParams | undefined {\n const drive = findDriveBySlugOrId(store, data.driveId);\n if (!drive) return undefined;\n if (!data.nodeId) return { driveSlug: makeDriveSlug(drive) };\n // resolveDriveRoute cached the node it resolved.\n const node = peekDriveNode(drive.header.id, data.nodeId, store);\n if (!node) return undefined;\n return { driveSlug: makeDriveSlug(drive), nodeSlug: makeNodeSlug(node) };\n}\n\n// In place, with the URL's search params and history state (the opened-from index).\nfunction redirectTo(params: DriveRouteParams) {\n return redirect({\n to: \"/d/$driveSlug/{-$nodeSlug}\",\n params,\n search: true,\n state: true,\n replace: true,\n });\n}\n","// The router's one edge to core's views: views never import this module, so\n// loading them lazily makes no import cycle.\nimport type {\n ErrorRouteComponent,\n NotFoundRouteProps,\n RouteComponent,\n} from \"@tanstack/react-router\";\nimport { lazyRouteComponent } from \"@tanstack/react-router\";\nimport type { ComponentType } from \"react\";\nimport { isDriveNotFound } from \"./drive-route-loader.js\";\nimport type { ConnectModals } from \"./modals.js\";\nimport { CORE_MODAL_VIEWS } from \"./modals.js\";\n\n// Core's views load only when a page shows one.\nconst views = () => import(\"@powerhousedao/connect-core/views\");\n\nconst CORE_VIEW = Symbol.for(\"@powerhousedao/connect-core/core-view\");\n\n/** One of core's views, loaded with the route that shows it. */\nexport function coreView(name: keyof Awaited<ReturnType<typeof views>>) {\n return Object.assign(lazyRouteComponent(views, name), {\n [CORE_VIEW]: true,\n }) as RouteComponent;\n}\n\n/** Whether a route's component is one of core's views, which a plugin's UI replaces. */\nexport function isCoreView(component: unknown) {\n return (\n typeof component === \"function\" &&\n (component as { [CORE_VIEW]?: true })[CORE_VIEW] === true\n );\n}\n\nconst NotFoundPage = coreView(\"NotFoundPage\");\nconst DriveNotFoundPage = coreView(\"DriveNotFoundPage\") as ComponentType<{\n driveSlug: string;\n}>;\n\n/** Core's not-found page; a missing drive's names the drive. */\nexport function CoreNotFound({ data }: Partial<NotFoundRouteProps>) {\n return isDriveNotFound(data) ? (\n <DriveNotFoundPage driveSlug={data.driveSlug} />\n ) : (\n <NotFoundPage />\n );\n}\n\n/** Core's view of a route's loader or render error. */\nexport const CoreError = coreView(\"CoreRouteError\") as ErrorRouteComponent;\n\n/** Core's modals, loaded when one opens. */\nexport const coreModals: ConnectModals = Object.fromEntries(\n Object.entries(CORE_MODAL_VIEWS).map(([type, name]) => [\n type,\n coreView(name),\n ]),\n);\n","import type { AnyRoute, ErrorRouteComponent } from \"@tanstack/react-router\";\nimport type { ComponentType } from \"react\";\nimport type { ConnectRouteRegistration } from \"../registry.js\";\nimport { getConnectRegistry } from \"../registry.js\";\nimport type { ConnectModals } from \"../router/modals.js\";\nimport { isCoreView } from \"../router/core-views.js\";\nimport {\n addConnectRoutes,\n removeConnectRoutes,\n resolveConnectRoutes,\n} from \"../router/route-tree.js\";\nimport { knownPlugins } from \"./plugin-host.js\";\nimport type { ConnectPluginUi, ConnectRouteUi } from \"./types.js\";\n\n/** The active plugins' UI; a later plugin's routes and modals win. */\nexport type ConnectPluginUiSet = {\n routes: Record<string, ConnectRouteUi>;\n addRoutes: ConnectRouteRegistration[];\n modals: ConnectModals;\n roots: ComponentType[];\n errorComponent?: ErrorRouteComponent;\n commonEditors: boolean;\n consent: boolean;\n};\n\nconst NO_UI: ConnectPluginUiSet = {\n routes: {},\n addRoutes: [],\n modals: {},\n roots: [],\n commonEditors: false,\n consent: false,\n};\n\nexport function mergeConnectPluginUi(\n uis: readonly ConnectPluginUi[],\n): ConnectPluginUiSet {\n const set: ConnectPluginUiSet = {\n routes: {},\n addRoutes: [],\n modals: {},\n roots: [],\n commonEditors: false,\n consent: false,\n };\n for (const ui of uis) {\n for (const [id, route] of Object.entries(ui.routes ?? {})) {\n set.routes[id] = { ...set.routes[id], ...route };\n }\n if (ui.addRoutes) set.addRoutes.push(ui.addRoutes);\n Object.assign(set.modals, ui.modals);\n if (ui.Root) set.roots.push(ui.Root);\n set.errorComponent = ui.errorComponent ?? set.errorComponent;\n set.commonEditors ||= ui.commonEditors ?? false;\n set.consent ||= ui.consent ?? false;\n }\n return set;\n}\n\n/** Loads the UI of the plugins `composition` names, or of every known plugin\n * without one (classic Connect), and keeps it for `getConnectPluginUi`. */\nexport async function loadConnectPluginUi(\n composition: readonly { module: string }[] | undefined,\n): Promise<ConnectPluginUiSet> {\n const definitions = await knownPlugins();\n const modules = composition\n ? composition.map((entry) => entry.module)\n : Object.keys(definitions);\n const uis = await Promise.all(\n modules.map(\n (module) => definitions[module]?.ui?.() ?? Promise.resolve(undefined),\n ),\n );\n const set = mergeConnectPluginUi(\n uis.filter((ui): ui is ConnectPluginUi => !!ui),\n );\n getConnectRegistry().ui = set;\n return set;\n}\n\n/** The active plugins' UI; none until `loadRuntimeConfig` has loaded it. */\nexport function getConnectPluginUi(): ConnectPluginUiSet {\n return getConnectRegistry().ui ?? NO_UI;\n}\n\ntype RouteOptions = Record<string, unknown> & { id?: string; path?: string };\n\nconst ROOT_ID = \"__root__\";\n\nfunction forEachRoute(\n route: AnyRoute,\n visit: (route: AnyRoute, id: string) => void,\n parentId?: string,\n) {\n const options = route.options as unknown as RouteOptions;\n const segment = options.id ?? options.path;\n const own =\n parentId === undefined || segment === undefined\n ? ROOT_ID\n : `${parentId === ROOT_ID ? \"\" : parentId}/${segment.replace(/^\\//, \"\")}`;\n visit(route, own);\n for (const child of (route.children ?? []) as AnyRoute[]) {\n forEachRoute(child, visit, own);\n }\n}\n\ntype Applied = { originals: Map<AnyRoute, RouteOptions>; added: AnyRoute[] };\nconst appliedTo = new WeakMap<AnyRoute, Applied>();\n\n/** Sets `ui`'s route options on the tree's routes that still show core's view,\n * and adds its routes; `resetConnectPluginUi` undoes both. */\nexport function applyConnectPluginUi(\n routeTree: AnyRoute,\n ui: ConnectPluginUiSet = getConnectPluginUi(),\n) {\n resetConnectPluginUi(routeTree);\n const applied: Applied = { originals: new Map(), added: [] };\n forEachRoute(routeTree, (route, id) => {\n const routeUi = ui.routes[id];\n const options = route.options as unknown as RouteOptions;\n if (!routeUi || !isCoreView(options.component)) return;\n const { staticData, ...views } = routeUi;\n const keys = [...Object.keys(views), ...(staticData ? [\"staticData\"] : [])];\n applied.originals.set(\n route,\n Object.fromEntries(keys.map((key) => [key, options[key]])),\n );\n Object.assign(options, views);\n if (staticData) {\n options.staticData = {\n ...(options.staticData as object | undefined),\n ...staticData,\n };\n }\n });\n for (const registration of ui.addRoutes) {\n const routes = resolveConnectRoutes(registration, routeTree);\n addConnectRoutes(routes);\n applied.added.push(...routes);\n }\n appliedTo.set(routeTree, applied);\n}\n\n/** Restores the routes `applyConnectPluginUi` changed and removes the ones it added. */\nexport function resetConnectPluginUi(routeTree: AnyRoute) {\n const applied = appliedTo.get(routeTree);\n if (!applied) return;\n for (const [route, originals] of applied.originals) {\n Object.assign(route.options, originals);\n }\n removeConnectRoutes(applied.added);\n appliedTo.delete(routeTree);\n}\n"],"mappings":";;;;;;;;AAwBA,SAAgB,gBAAgB,MAA0C;CACxE,OACE,OAAO,SAAS,YAChB,SAAS,QACT,OAAQ,KAAiC,cAAc;AAE3D;AAcA,SAAS,QAAQ,SAA6B,QAA0B;CACtE,OAAO,kBAAkB;EACvB,OAAO,QAAQ,QAAQ;EACvB,UAAU,QAAQ,QAAQ;EAC1B,WAAW,OAAO;EAClB,UAAU,OAAO;EACjB,QAAQ,QAAQ,gBAAgB;EAChC,SAAS,QAAQ;CACnB,CAAC;AACH;AAGA,SAAS,cAAc,WAAmB;CACxC,OAAO,SAAS;EACd,SAAS;EACT,MAAM,EAAE,UAAU;CACpB,CAAC;AACH;;AAGA,eAAsB,UACpB,SAC8B;CAC9B,MAAM,EAAE,cAAc,QAAQ;CAC9B,MAAM,SAAS,MAAM,QAAQ,SAAS,EAAE,UAAU,CAAC;CACnD,IAAI,OAAO,SAAS,mBAElB,MAAM,cAAc,SAAS;CAE/B,OAAO,EAAE,SAAS,OAAO,QAAQ;AACnC;;;AAIA,eAAsB,SACpB,SACyB;CACzB,MAAM,EAAE,QAAQ,SAAS,YAAY;CACrC,MAAM,SAAS,MAAM,QAAQ,SAAS,MAAM;CAC5C,QAAQ,OAAO,MAAf;EACE,KAAK,SAAS;GACZ,MAAM,OAAuB,OAAO,SAChC;IAAE,SAAS,OAAO;IAAS,QAAQ,OAAO;GAAO,IACjD,EAA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vC,MAAM,SAAS,qBAAqB,cAAc,SAAS;EAC3D,iBAAiB,MAAM;EACvB,QAAQ,MAAM,KAAK,GAAG,MAAM;CAC9B;CACA,UAAU,IAAI,WAAW,OAAO;AAClC;;AAGA,SAAgB,qBAAqB,WAAqB;CACxD,MAAM,UAAU,UAAU,IAAI,SAAS;CACvC,IAAI,CAAC,SAAS;CACd,KAAK,MAAM,CAAC,OAAO,cAAc,QAAQ,WACvC,OAAO,OAAO,MAAM,SAAS,SAAS;CAExC,oBAAoB,QAAQ,KAAK;CACjC,UAAU,OAAO,SAAS;AAC5B"}
|
|
1
|
+
{"version":3,"file":"plugin-ui-fDXhKTCK.js","names":[],"sources":["../src/router/drive-route-loader.ts","../src/router/core-views.tsx","../src/plugins/plugin-ui.ts"],"sourcesContent":["// The drive routes' loaders. Server-safe: they read everything from router context.\nimport type { DriveArrivals, PHStore } from \"@powerhousedao/reactor-browser\";\nimport {\n findDriveBySlugOrId,\n makeDriveSlug,\n makeNodeSlug,\n peekDriveNode,\n resolveDriveRoute,\n} from \"@powerhousedao/reactor-browser\";\nimport { notFound, redirect } from \"@tanstack/react-router\";\n\nexport type ConnectRouterContext = {\n store: PHStore;\n /** Without it the drive route never waits for drives to arrive. */\n arrivals?: DriveArrivals;\n /** Ends every document title; \"Connect\" without one. */\n appName?: string;\n /** Rendering the loading shell: a layout shows its pendingComponent in place of its page. */\n shell?: boolean;\n};\n\n/** A missing drive's not-found data. */\nexport type DriveNotFoundData = { driveSlug: string };\n\nexport function isDriveNotFound(data: unknown): data is DriveNotFoundData {\n return (\n typeof data === \"object\" &&\n data !== null &&\n typeof (data as { driveSlug?: unknown }).driveSlug === \"string\"\n );\n}\n\n/** What the drive routes resolved their params to. */\nexport type DriveRouteData = { driveId: string; nodeId?: string };\n\nexport type DriveRouteParams = { driveSlug: string; nodeSlug?: string };\n\nexport type DriveLoaderOptions = {\n params: DriveRouteParams;\n context: ConnectRouterContext;\n abortController: AbortController;\n preload: boolean;\n};\n\nfunction resolve(options: DriveLoaderOptions, params: DriveRouteParams) {\n return resolveDriveRoute({\n store: options.context.store,\n arrivals: options.context.arrivals,\n driveSlug: params.driveSlug,\n nodeSlug: params.nodeSlug,\n signal: options.abortController.signal,\n preload: options.preload,\n });\n}\n\n// At the drive layout, so the 404 takes the drive's place in the layout.\nfunction driveNotFound(driveSlug: string) {\n return notFound({\n routeId: \"/_app/d/$driveSlug\" as never,\n data: { driveSlug } satisfies DriveNotFoundData,\n });\n}\n\n/** The drive layout's loader: the drive, or not found once arrivals settle. */\nexport async function loadDrive(\n options: DriveLoaderOptions,\n): Promise<{ driveId: string }> {\n const { driveSlug } = options.params;\n const result = await resolve(options, { driveSlug });\n if (result.kind === \"drive-not-found\") {\n // oxlint-disable-next-line typescript/only-throw-error -- router control flow\n throw driveNotFound(driveSlug);\n }\n return { driveId: result.driveId };\n}\n\n/** The node route's loader: the drive and the open node. An id or an old name\n * in the URL becomes the current slugs; a missing node leads to its drive. */\nexport async function loadNode(\n options: DriveLoaderOptions,\n): Promise<DriveRouteData> {\n const { params, context, preload } = options;\n const result = await resolve(options, params);\n switch (result.kind) {\n case \"drive\": {\n const data: DriveRouteData = result.nodeId\n ? { driveId: result.driveId, nodeId: result.nodeId }\n : { driveId: result.driveId };\n const canonical = canonicalParams(context.store, data);\n // An id, an old name or an old drive id in the URL becomes the current slugs.\n if (\n !preload &&\n canonical &&\n (canonical.driveSlug !== params.driveSlug ||\n canonical.nodeSlug !== (params.nodeSlug || undefined))\n ) {\n // oxlint-disable-next-line typescript/only-throw-error -- router control flow\n throw redirectTo(canonical);\n }\n return data;\n }\n case \"drive-not-found\":\n // oxlint-disable-next-line typescript/only-throw-error -- router control flow\n throw driveNotFound(params.driveSlug);\n case \"node-not-found\":\n // oxlint-disable-next-line typescript/only-throw-error -- router control flow\n throw redirectTo({\n driveSlug:\n canonicalParams(context.store, { driveId: result.driveId })\n ?.driveSlug ?? params.driveSlug,\n nodeSlug: undefined,\n });\n }\n}\n\n// The slugs links write for `data`; unknown while the drive is unlisted.\nfunction canonicalParams(\n store: PHStore,\n data: DriveRouteData,\n): DriveRouteParams | undefined {\n const drive = findDriveBySlugOrId(store, data.driveId);\n if (!drive) return undefined;\n if (!data.nodeId) return { driveSlug: makeDriveSlug(drive) };\n // resolveDriveRoute cached the node it resolved.\n const node = peekDriveNode(drive.header.id, data.nodeId, store);\n if (!node) return undefined;\n return { driveSlug: makeDriveSlug(drive), nodeSlug: makeNodeSlug(node) };\n}\n\n// In place, with the URL's search params and history state (the opened-from index).\nfunction redirectTo(params: DriveRouteParams) {\n return redirect({\n to: \"/d/$driveSlug/{-$nodeSlug}\",\n params,\n search: true,\n state: true,\n replace: true,\n });\n}\n","// The router's one edge to core's views: views never import this module, so\n// loading them lazily makes no import cycle.\nimport type {\n ErrorRouteComponent,\n NotFoundRouteProps,\n RouteComponent,\n} from \"@tanstack/react-router\";\nimport { lazyRouteComponent } from \"@tanstack/react-router\";\nimport type { ComponentType } from \"react\";\nimport { isDriveNotFound } from \"./drive-route-loader.js\";\nimport type { ConnectModals } from \"./modals.js\";\nimport { CORE_MODAL_VIEWS } from \"./modals.js\";\n\n// Core's views load only when a page shows one.\nconst views = () => import(\"@powerhousedao/connect-core/views\");\n\nconst CORE_VIEW = Symbol.for(\"@powerhousedao/connect-core/core-view\");\n\n/** One of core's views, loaded with the route that shows it. */\nexport function coreView(name: keyof Awaited<ReturnType<typeof views>>) {\n return Object.assign(lazyRouteComponent(views, name), {\n [CORE_VIEW]: true,\n }) as RouteComponent;\n}\n\n/** Whether a route's component is one of core's views, which a plugin's UI replaces. */\nexport function isCoreView(component: unknown) {\n return (\n typeof component === \"function\" &&\n (component as { [CORE_VIEW]?: true })[CORE_VIEW] === true\n );\n}\n\nconst NotFoundPage = coreView(\"NotFoundPage\");\nconst DriveNotFoundPage = coreView(\"DriveNotFoundPage\") as ComponentType<{\n driveSlug: string;\n}>;\n\n/** Core's not-found page; a missing drive's names the drive. */\nexport function CoreNotFound({ data }: Partial<NotFoundRouteProps>) {\n return isDriveNotFound(data) ? (\n <DriveNotFoundPage driveSlug={data.driveSlug} />\n ) : (\n <NotFoundPage />\n );\n}\n\n/** Core's view of a route's loader or render error. */\nexport const CoreError = coreView(\"CoreRouteError\") as ErrorRouteComponent;\n\n/** Core's modals, loaded when one opens. */\nexport const coreModals: ConnectModals = Object.fromEntries(\n Object.entries(CORE_MODAL_VIEWS).map(([type, name]) => [\n type,\n coreView(name),\n ]),\n);\n","import type { AnyRoute, ErrorRouteComponent } from \"@tanstack/react-router\";\nimport type { ComponentType } from \"react\";\nimport type { ConnectRouteRegistration } from \"../registry.js\";\nimport { getConnectRegistry } from \"../registry.js\";\nimport type { ConnectModals } from \"../router/modals.js\";\nimport { isCoreView } from \"../router/core-views.js\";\nimport {\n addConnectRoutes,\n removeConnectRoutes,\n resolveConnectRoutes,\n} from \"../router/route-tree.js\";\nimport { knownPlugins } from \"./plugin-host.js\";\nimport type { ConnectPluginUi, ConnectRouteUi } from \"./types.js\";\n\n/** The active plugins' UI; a later plugin's routes and modals win. */\nexport type ConnectPluginUiSet = {\n routes: Record<string, ConnectRouteUi>;\n addRoutes: ConnectRouteRegistration[];\n modals: ConnectModals;\n roots: ComponentType[];\n errorComponent?: ErrorRouteComponent;\n commonEditors: boolean;\n consent: boolean;\n};\n\nconst NO_UI: ConnectPluginUiSet = {\n routes: {},\n addRoutes: [],\n modals: {},\n roots: [],\n commonEditors: false,\n consent: false,\n};\n\nexport function mergeConnectPluginUi(\n uis: readonly ConnectPluginUi[],\n): ConnectPluginUiSet {\n const set: ConnectPluginUiSet = {\n routes: {},\n addRoutes: [],\n modals: {},\n roots: [],\n commonEditors: false,\n consent: false,\n };\n for (const ui of uis) {\n for (const [id, route] of Object.entries(ui.routes ?? {})) {\n set.routes[id] = { ...set.routes[id], ...route };\n }\n if (ui.addRoutes) set.addRoutes.push(ui.addRoutes);\n Object.assign(set.modals, ui.modals);\n if (ui.Root) set.roots.push(ui.Root);\n set.errorComponent = ui.errorComponent ?? set.errorComponent;\n set.commonEditors ||= ui.commonEditors ?? false;\n set.consent ||= ui.consent ?? false;\n }\n return set;\n}\n\n/** Loads the UI of the plugins `composition` names, or of every known plugin\n * without one (classic Connect), and keeps it for `getConnectPluginUi`. */\nexport async function loadConnectPluginUi(\n composition: readonly { module: string }[] | undefined,\n): Promise<ConnectPluginUiSet> {\n const definitions = await knownPlugins();\n const modules = composition\n ? composition.map((entry) => entry.module)\n : Object.keys(definitions);\n const uis = await Promise.all(\n modules.map(\n (module) => definitions[module]?.ui?.() ?? Promise.resolve(undefined),\n ),\n );\n const set = mergeConnectPluginUi(\n uis.filter((ui): ui is ConnectPluginUi => !!ui),\n );\n getConnectRegistry().ui = set;\n return set;\n}\n\n/** The active plugins' UI; none until `loadRuntimeConfig` has loaded it. */\nexport function getConnectPluginUi(): ConnectPluginUiSet {\n return getConnectRegistry().ui ?? NO_UI;\n}\n\ntype RouteOptions = Record<string, unknown> & { id?: string; path?: string };\n\nconst ROOT_ID = \"__root__\";\n\nfunction forEachRoute(\n route: AnyRoute,\n visit: (route: AnyRoute, id: string) => void,\n parentId?: string,\n) {\n const options = route.options as unknown as RouteOptions;\n const segment = options.id ?? options.path;\n const own =\n parentId === undefined || segment === undefined\n ? ROOT_ID\n : `${parentId === ROOT_ID ? \"\" : parentId}/${segment.replace(/^\\//, \"\")}`;\n visit(route, own);\n for (const child of (route.children ?? []) as AnyRoute[]) {\n forEachRoute(child, visit, own);\n }\n}\n\ntype Applied = { originals: Map<AnyRoute, RouteOptions>; added: AnyRoute[] };\nconst appliedTo = new WeakMap<AnyRoute, Applied>();\n\n/** Sets `ui`'s route options on the tree's routes that still show core's view,\n * and adds its routes; `resetConnectPluginUi` undoes both. */\nexport function applyConnectPluginUi(\n routeTree: AnyRoute,\n ui: ConnectPluginUiSet = getConnectPluginUi(),\n) {\n resetConnectPluginUi(routeTree);\n const applied: Applied = { originals: new Map(), added: [] };\n forEachRoute(routeTree, (route, id) => {\n const routeUi = ui.routes[id];\n const options = route.options as unknown as RouteOptions;\n if (!routeUi || !isCoreView(options.component)) return;\n const { staticData, ...views } = routeUi;\n const keys = [...Object.keys(views), ...(staticData ? [\"staticData\"] : [])];\n applied.originals.set(\n route,\n Object.fromEntries(keys.map((key) => [key, options[key]])),\n );\n Object.assign(options, views);\n if (staticData) {\n options.staticData = {\n ...(options.staticData as object | undefined),\n ...staticData,\n };\n }\n });\n for (const registration of ui.addRoutes) {\n const routes = resolveConnectRoutes(registration, routeTree);\n addConnectRoutes(routes);\n applied.added.push(...routes);\n }\n appliedTo.set(routeTree, applied);\n}\n\n/** Restores the routes `applyConnectPluginUi` changed and removes the ones it added. */\nexport function resetConnectPluginUi(routeTree: AnyRoute) {\n const applied = appliedTo.get(routeTree);\n if (!applied) return;\n for (const [route, originals] of applied.originals) {\n Object.assign(route.options, originals);\n }\n removeConnectRoutes(applied.added);\n appliedTo.delete(routeTree);\n}\n"],"mappings":";;;;;;;;AAwBA,SAAgB,gBAAgB,MAA0C;CACxE,OACE,OAAO,SAAS,YAChB,SAAS,QACT,OAAQ,KAAiC,cAAc;AAE3D;AAcA,SAAS,QAAQ,SAA6B,QAA0B;CACtE,OAAO,kBAAkB;EACvB,OAAO,QAAQ,QAAQ;EACvB,UAAU,QAAQ,QAAQ;EAC1B,WAAW,OAAO;EAClB,UAAU,OAAO;EACjB,QAAQ,QAAQ,gBAAgB;EAChC,SAAS,QAAQ;CACnB,CAAC;AACH;AAGA,SAAS,cAAc,WAAmB;CACxC,OAAO,SAAS;EACd,SAAS;EACT,MAAM,EAAE,UAAU;CACpB,CAAC;AACH;;AAGA,eAAsB,UACpB,SAC8B;CAC9B,MAAM,EAAE,cAAc,QAAQ;CAC9B,MAAM,SAAS,MAAM,QAAQ,SAAS,EAAE,UAAU,CAAC;CACnD,IAAI,OAAO,SAAS,mBAElB,MAAM,cAAc,SAAS;CAE/B,OAAO,EAAE,SAAS,OAAO,QAAQ;AACnC;;;AAIA,eAAsB,SACpB,SACyB;CACzB,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,QAAQ,CAAC,KAAK,QAAQ,IAAI,CAAC,CAAC,CAC3D;EACA,OAAO,OAAO,SAAS,KAAK;EAC5B,IAAI,YACF,QAAQ,aAAa;GACnB,GAAI,QAAQ;GACZ,GAAG;EACL;CAEJ,CAAC;CACD,KAAK,MAAM,gBAAgB,GAAG,WAAW;EACvC,MAAM,SAAS,qBAAqB,cAAc,SAAS;EAC3D,iBAAiB,MAAM;EACvB,QAAQ,MAAM,KAAK,GAAG,MAAM;CAC9B;CACA,UAAU,IAAI,WAAW,OAAO;AAClC;;AAGA,SAAgB,qBAAqB,WAAqB;CACxD,MAAM,UAAU,UAAU,IAAI,SAAS;CACvC,IAAI,CAAC,SAAS;CACd,KAAK,MAAM,CAAC,OAAO,cAAc,QAAQ,WACvC,OAAO,OAAO,MAAM,SAAS,SAAS;CAExC,oBAAoB,QAAQ,KAAK;CACjC,UAAU,OAAO,SAAS;AAC5B"}
|
package/dist/plugins.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { i as mergeConnectPluginUi, n as getConnectPluginUi, o as resetConnectPluginUi, r as loadConnectPluginUi, t as applyConnectPluginUi } from "./plugin-ui-
|
|
2
|
-
import { i as registerConnectPlugins, n as knownPlugins, t as applyComposition } from "./plugin-host-
|
|
1
|
+
import { i as mergeConnectPluginUi, n as getConnectPluginUi, o as resetConnectPluginUi, r as loadConnectPluginUi, t as applyConnectPluginUi } from "./plugin-ui-fDXhKTCK.js";
|
|
2
|
+
import { i as registerConnectPlugins, n as knownPlugins, t as applyComposition } from "./plugin-host-D_EW56IQ.js";
|
|
3
3
|
import { n as isPluginActive, t as getActivePluginModules } from "./plugins-x1XqLPzp.js";
|
|
4
4
|
export { applyComposition, applyConnectPluginUi, getActivePluginModules, getConnectPluginUi, isPluginActive, knownPlugins, loadConnectPluginUi, mergeConnectPluginUi, registerConnectPlugins, resetConnectPluginUi };
|
package/dist/route-tree.d.ts
CHANGED
|
@@ -11,27 +11,27 @@ import { Route as Route$7 } from "./routes/_app/settings/appearance.js";
|
|
|
11
11
|
import { Route as Route$8 } from "./routes/_app/settings/packages.js";
|
|
12
12
|
import { Route as Route$9 } from "./routes/_app/d/$driveSlug/{-$nodeSlug}.js";
|
|
13
13
|
//#region src/routeTree.gen.d.ts
|
|
14
|
-
declare const AppRoute: Route<import("@tanstack/react-router").Register, import("@tanstack/react-router").RootRoute<import("@tanstack/react-router").Register, (search: Record<string, unknown>) => Record<string, string | undefined>, ConnectRouterContext,
|
|
15
|
-
declare const AppIndexRoute: Route<import("@tanstack/react-router").Register, Route<import("@tanstack/react-router").Register, import("@tanstack/react-router").RootRoute<import("@tanstack/react-router").Register, (search: Record<string, unknown>) => Record<string, string | undefined>, ConnectRouterContext,
|
|
16
|
-
declare const AppSplatRoute: Route<import("@tanstack/react-router").Register, Route<import("@tanstack/react-router").Register, import("@tanstack/react-router").RootRoute<import("@tanstack/react-router").Register, (search: Record<string, unknown>) => Record<string, string | undefined>, ConnectRouterContext,
|
|
17
|
-
declare const AppSettingsRoute: Route<import("@tanstack/react-router").Register, Route<import("@tanstack/react-router").Register, import("@tanstack/react-router").RootRoute<import("@tanstack/react-router").Register, (search: Record<string, unknown>) => Record<string, string | undefined>, ConnectRouterContext,
|
|
18
|
-
declare const AppDDriveSlugRoute: Route<import("@tanstack/react-router").Register, Route<import("@tanstack/react-router").Register, import("@tanstack/react-router").RootRoute<import("@tanstack/react-router").Register, (search: Record<string, unknown>) => Record<string, string | undefined>, ConnectRouterContext,
|
|
14
|
+
declare const AppRoute: Route<import("@tanstack/react-router").Register, import("@tanstack/react-router").RootRoute<import("@tanstack/react-router").Register, (search: Record<string, unknown>) => Record<string, string | undefined>, ConnectRouterContext, undefined, undefined, {}, undefined, unknown, unknown, undefined, unknown, undefined>, "", "/", "/_app", "/_app", undefined, ResolveParams<"">, AnyContext, undefined, undefined, {}, undefined, unknown, unknown, undefined, unknown, undefined>;
|
|
15
|
+
declare const AppIndexRoute: Route<import("@tanstack/react-router").Register, Route<import("@tanstack/react-router").Register, import("@tanstack/react-router").RootRoute<import("@tanstack/react-router").Register, (search: Record<string, unknown>) => Record<string, string | undefined>, ConnectRouterContext, undefined, undefined, {}, undefined, unknown, unknown, undefined, unknown, undefined>, "", "/", "/_app", "/_app", undefined, ResolveParams<"">, AnyContext, undefined, undefined, {}, undefined, unknown, unknown, undefined, unknown, undefined>, "/", "/", "/_app/", "/_app/", undefined, ResolveParams<"/">, AnyContext, undefined, undefined, {}, undefined, unknown, unknown, undefined, unknown, undefined>;
|
|
16
|
+
declare const AppSplatRoute: Route<import("@tanstack/react-router").Register, Route<import("@tanstack/react-router").Register, import("@tanstack/react-router").RootRoute<import("@tanstack/react-router").Register, (search: Record<string, unknown>) => Record<string, string | undefined>, ConnectRouterContext, undefined, undefined, {}, undefined, unknown, unknown, undefined, unknown, undefined>, "", "/", "/_app", "/_app", undefined, ResolveParams<"">, AnyContext, undefined, undefined, {}, undefined, unknown, unknown, undefined, unknown, undefined>, "/$", "/$", "/_app/$", "/_app/$", undefined, ResolveParams<"/$">, AnyContext, undefined, undefined, {}, () => Promise<void>, unknown, unknown, undefined, unknown, undefined>;
|
|
17
|
+
declare const AppSettingsRoute: Route<import("@tanstack/react-router").Register, Route<import("@tanstack/react-router").Register, import("@tanstack/react-router").RootRoute<import("@tanstack/react-router").Register, (search: Record<string, unknown>) => Record<string, string | undefined>, ConnectRouterContext, undefined, undefined, {}, undefined, unknown, unknown, undefined, unknown, undefined>, "", "/", "/_app", "/_app", undefined, ResolveParams<"">, AnyContext, undefined, undefined, {}, undefined, unknown, unknown, undefined, unknown, undefined>, "/settings", "/settings", "/_app/settings", "/_app/settings", undefined, ResolveParams<"/settings">, AnyContext, undefined, (context: any) => void, {}, undefined, unknown, unknown, undefined, unknown, undefined>;
|
|
18
|
+
declare const AppDDriveSlugRoute: Route<import("@tanstack/react-router").Register, Route<import("@tanstack/react-router").Register, import("@tanstack/react-router").RootRoute<import("@tanstack/react-router").Register, (search: Record<string, unknown>) => Record<string, string | undefined>, ConnectRouterContext, undefined, undefined, {}, undefined, unknown, unknown, undefined, unknown, undefined>, "", "/", "/_app", "/_app", undefined, ResolveParams<"">, AnyContext, undefined, undefined, {}, undefined, unknown, unknown, undefined, unknown, undefined>, "/d/$driveSlug", "/d/$driveSlug", "/_app/d/$driveSlug", "/_app/d/$driveSlug", undefined, DriveRouteParams, AnyContext, undefined, undefined, {}, {
|
|
19
19
|
handler: (options: DriveLoaderOptions) => Promise<{
|
|
20
20
|
driveId: string;
|
|
21
21
|
}>;
|
|
22
22
|
staleReloadMode: "blocking";
|
|
23
|
-
}, unknown, unknown,
|
|
24
|
-
declare const AppSettingsAppearanceRoute: Route<import("@tanstack/react-router").Register, Route<import("@tanstack/react-router").Register, Route<import("@tanstack/react-router").Register, import("@tanstack/react-router").RootRoute<import("@tanstack/react-router").Register, (search: Record<string, unknown>) => Record<string, string | undefined>, ConnectRouterContext,
|
|
25
|
-
declare const AppSettingsPackagesRoute: Route<import("@tanstack/react-router").Register, Route<import("@tanstack/react-router").Register, Route<import("@tanstack/react-router").Register, import("@tanstack/react-router").RootRoute<import("@tanstack/react-router").Register, (search: Record<string, unknown>) => Record<string, string | undefined>, ConnectRouterContext,
|
|
26
|
-
declare const AppDDriveSlugChar123NodeSlugChar125Route: Route<import("@tanstack/react-router").Register, Route<import("@tanstack/react-router").Register, Route<import("@tanstack/react-router").Register, import("@tanstack/react-router").RootRoute<import("@tanstack/react-router").Register, (search: Record<string, unknown>) => Record<string, string | undefined>, ConnectRouterContext,
|
|
23
|
+
}, unknown, unknown, undefined, unknown, undefined>;
|
|
24
|
+
declare const AppSettingsAppearanceRoute: Route<import("@tanstack/react-router").Register, Route<import("@tanstack/react-router").Register, Route<import("@tanstack/react-router").Register, import("@tanstack/react-router").RootRoute<import("@tanstack/react-router").Register, (search: Record<string, unknown>) => Record<string, string | undefined>, ConnectRouterContext, undefined, undefined, {}, undefined, unknown, unknown, undefined, unknown, undefined>, "", "/", "/_app", "/_app", undefined, ResolveParams<"">, AnyContext, undefined, undefined, {}, undefined, unknown, unknown, undefined, unknown, undefined>, "/settings", "/settings", "/_app/settings", "/_app/settings", undefined, ResolveParams<"/settings">, AnyContext, undefined, (context: any) => void, {}, undefined, unknown, unknown, undefined, unknown, undefined>, "/appearance", "/settings/appearance", "/_app/settings/appearance", "/_app/settings/appearance", undefined, ResolveParams<"/appearance">, AnyContext, undefined, undefined, {}, undefined, unknown, unknown, undefined, unknown, undefined>;
|
|
25
|
+
declare const AppSettingsPackagesRoute: Route<import("@tanstack/react-router").Register, Route<import("@tanstack/react-router").Register, Route<import("@tanstack/react-router").Register, import("@tanstack/react-router").RootRoute<import("@tanstack/react-router").Register, (search: Record<string, unknown>) => Record<string, string | undefined>, ConnectRouterContext, undefined, undefined, {}, undefined, unknown, unknown, undefined, unknown, undefined>, "", "/", "/_app", "/_app", undefined, ResolveParams<"">, AnyContext, undefined, undefined, {}, undefined, unknown, unknown, undefined, unknown, undefined>, "/settings", "/settings", "/_app/settings", "/_app/settings", undefined, ResolveParams<"/settings">, AnyContext, undefined, (context: any) => void, {}, undefined, unknown, unknown, undefined, unknown, undefined>, "/packages", "/settings/packages", "/_app/settings/packages", "/_app/settings/packages", undefined, ResolveParams<"/packages">, AnyContext, undefined, undefined, {}, undefined, unknown, unknown, undefined, unknown, undefined>;
|
|
26
|
+
declare const AppDDriveSlugChar123NodeSlugChar125Route: Route<import("@tanstack/react-router").Register, Route<import("@tanstack/react-router").Register, Route<import("@tanstack/react-router").Register, import("@tanstack/react-router").RootRoute<import("@tanstack/react-router").Register, (search: Record<string, unknown>) => Record<string, string | undefined>, ConnectRouterContext, undefined, undefined, {}, undefined, unknown, unknown, undefined, unknown, undefined>, "", "/", "/_app", "/_app", undefined, ResolveParams<"">, AnyContext, undefined, undefined, {}, undefined, unknown, unknown, undefined, unknown, undefined>, "/d/$driveSlug", "/d/$driveSlug", "/_app/d/$driveSlug", "/_app/d/$driveSlug", undefined, DriveRouteParams, AnyContext, undefined, undefined, {}, {
|
|
27
27
|
handler: (options: DriveLoaderOptions) => Promise<{
|
|
28
28
|
driveId: string;
|
|
29
29
|
}>;
|
|
30
30
|
staleReloadMode: "blocking";
|
|
31
|
-
}, unknown, unknown,
|
|
31
|
+
}, unknown, unknown, undefined, unknown, undefined>, "/{-$nodeSlug}", "/d/$driveSlug/{-$nodeSlug}", "/_app/d/$driveSlug/{-$nodeSlug}", "/_app/d/$driveSlug/{-$nodeSlug}", (search: Record<string, unknown>) => Record<string, string | undefined>, DriveRouteParams, AnyContext, undefined, undefined, {}, {
|
|
32
32
|
handler: (options: DriveLoaderOptions) => Promise<DriveRouteData>;
|
|
33
33
|
staleReloadMode: "blocking";
|
|
34
|
-
}, unknown, unknown,
|
|
34
|
+
}, unknown, unknown, undefined, unknown, undefined>;
|
|
35
35
|
export interface FileRoutesByFullPath {
|
|
36
36
|
"/": typeof AppIndexRoute;
|
|
37
37
|
"/$": typeof AppSplatRoute;
|
|
@@ -137,17 +137,17 @@ interface AppSettingsRouteChildren {
|
|
|
137
137
|
AppSettingsPackagesRoute: typeof AppSettingsPackagesRoute;
|
|
138
138
|
}
|
|
139
139
|
declare const AppSettingsRouteChildren: AppSettingsRouteChildren;
|
|
140
|
-
declare const AppSettingsRouteWithChildren: Route<import("@tanstack/react-router").Register, Route<import("@tanstack/react-router").Register, import("@tanstack/react-router").RootRoute<import("@tanstack/react-router").Register, (search: Record<string, unknown>) => Record<string, string | undefined>, ConnectRouterContext,
|
|
140
|
+
declare const AppSettingsRouteWithChildren: Route<import("@tanstack/react-router").Register, Route<import("@tanstack/react-router").Register, import("@tanstack/react-router").RootRoute<import("@tanstack/react-router").Register, (search: Record<string, unknown>) => Record<string, string | undefined>, ConnectRouterContext, undefined, undefined, {}, undefined, unknown, unknown, undefined, unknown, undefined>, "", "/", "/_app", "/_app", undefined, ResolveParams<"">, AnyContext, undefined, undefined, {}, undefined, unknown, unknown, undefined, unknown, undefined>, "/settings", "/settings", "/_app/settings", "/_app/settings", undefined, ResolveParams<"/settings">, AnyContext, undefined, (context: any) => void, {}, undefined, AppSettingsRouteChildren, unknown, undefined, unknown, undefined>;
|
|
141
141
|
interface AppDDriveSlugRouteChildren {
|
|
142
142
|
AppDDriveSlugChar123NodeSlugChar125Route: typeof AppDDriveSlugChar123NodeSlugChar125Route;
|
|
143
143
|
}
|
|
144
144
|
declare const AppDDriveSlugRouteChildren: AppDDriveSlugRouteChildren;
|
|
145
|
-
declare const AppDDriveSlugRouteWithChildren: Route<import("@tanstack/react-router").Register, Route<import("@tanstack/react-router").Register, import("@tanstack/react-router").RootRoute<import("@tanstack/react-router").Register, (search: Record<string, unknown>) => Record<string, string | undefined>, ConnectRouterContext,
|
|
145
|
+
declare const AppDDriveSlugRouteWithChildren: Route<import("@tanstack/react-router").Register, Route<import("@tanstack/react-router").Register, import("@tanstack/react-router").RootRoute<import("@tanstack/react-router").Register, (search: Record<string, unknown>) => Record<string, string | undefined>, ConnectRouterContext, undefined, undefined, {}, undefined, unknown, unknown, undefined, unknown, undefined>, "", "/", "/_app", "/_app", undefined, ResolveParams<"">, AnyContext, undefined, undefined, {}, undefined, unknown, unknown, undefined, unknown, undefined>, "/d/$driveSlug", "/d/$driveSlug", "/_app/d/$driveSlug", "/_app/d/$driveSlug", undefined, DriveRouteParams, AnyContext, undefined, undefined, {}, {
|
|
146
146
|
handler: (options: DriveLoaderOptions) => Promise<{
|
|
147
147
|
driveId: string;
|
|
148
148
|
}>;
|
|
149
149
|
staleReloadMode: "blocking";
|
|
150
|
-
}, AppDDriveSlugRouteChildren, unknown,
|
|
150
|
+
}, AppDDriveSlugRouteChildren, unknown, undefined, unknown, undefined>;
|
|
151
151
|
interface AppRouteChildren {
|
|
152
152
|
AppSplatRoute: typeof AppSplatRoute;
|
|
153
153
|
AppSettingsRoute: typeof AppSettingsRouteWithChildren;
|
|
@@ -155,8 +155,8 @@ interface AppRouteChildren {
|
|
|
155
155
|
AppDDriveSlugRoute: typeof AppDDriveSlugRouteWithChildren;
|
|
156
156
|
}
|
|
157
157
|
declare const AppRouteChildren: AppRouteChildren;
|
|
158
|
-
declare const AppRouteWithChildren: Route<import("@tanstack/react-router").Register, import("@tanstack/react-router").RootRoute<import("@tanstack/react-router").Register, (search: Record<string, unknown>) => Record<string, string | undefined>, ConnectRouterContext,
|
|
159
|
-
export declare const routeTree: Route<import("@tanstack/react-router").Register, any, "/", "/", string, "__root__", (search: Record<string, unknown>) => Record<string, string | undefined>, {}, ConnectRouterContext,
|
|
158
|
+
declare const AppRouteWithChildren: Route<import("@tanstack/react-router").Register, import("@tanstack/react-router").RootRoute<import("@tanstack/react-router").Register, (search: Record<string, unknown>) => Record<string, string | undefined>, ConnectRouterContext, undefined, undefined, {}, undefined, unknown, unknown, undefined, unknown, undefined>, "", "/", "/_app", "/_app", undefined, ResolveParams<"">, AnyContext, undefined, undefined, {}, undefined, AppRouteChildren, unknown, undefined, unknown, undefined>;
|
|
159
|
+
export declare const routeTree: Route<import("@tanstack/react-router").Register, any, "/", "/", string, "__root__", (search: Record<string, unknown>) => Record<string, string | undefined>, {}, ConnectRouterContext, undefined, undefined, {}, undefined, RootRouteChildren, FileRouteTypes, undefined, unknown, undefined>;
|
|
160
160
|
//#endregion
|
|
161
161
|
export {};
|
|
162
162
|
//# sourceMappingURL=route-tree.d.ts.map
|
package/dist/route-tree.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"route-tree.d.ts","names":[],"sources":["../src/routeTree.gen.ts"],"mappings":";;;;;;;;;;;;;cAoBM,UAAQ,uCAAA,2CAAA,2CAAA,WAAA,QAAA,4BAAA,oCAAA,
|
|
1
|
+
{"version":3,"file":"route-tree.d.ts","names":[],"sources":["../src/routeTree.gen.ts"],"mappings":";;;;;;;;;;;;;cAoBM,UAAQ,uCAAA,2CAAA,2CAAA,WAAA,QAAA,4BAAA,oCAAA,mJAAA,mBAAA;cAIR,eAAa,uCAAA,UAAA,uCAAA,2CAAA,2CAAA,WAAA,QAAA,4BAAA,oCA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ACA;MACA,uBAAuB;MACvB,oBAAoB;;IAEtB;MACE;MACA;MACA;MACA,uBAAuB;MACvB,oBAAoB;;IAEtB;MACE;MACA;MACA;MACA,uBAAuB;MACvB,oBAAoB;;IAEtB;MACE;MACA;MACA;MACA,uBAAuB;MACvB,oBAAoB;;IAEtB;MACE;MACA;MACA;MACA,uBAAuB;MACvB,oBAAoB;;IAEtB;MACE;MACA;MACA;MACA,uBAAuB;MACvB,oBAAoB;;IAEtB;MACE;MACA;MACA;MACA,uBAAuB;MACvB,oBAAoB;;IAEtB;MACE;MACA;MACA;MACA,uBAAuB;MACvB,oBAAoB;;;;UAKhB;EACR,mCAAmC;EACnC,iCAAiC;;cAG7B,0BAA0B;cAK1B,8BAA4B,uCAAA,UAAA,uCAAA,2CAAA,2CAAA,WAAA,QAAA,4BAAA,oCAAA,mJAAA,mBAAA,4KAAA,4BAAA,wBAAA,sCAAA;UAIxB;EACR,iDAAiD;;cAG7C,4BAA4B;cAK5B,gCAEL,uCAFmC,UAAA,uCAAA,2CAAA,2CAAA,WAAA,QAAA,4BAAA,oCAAA,mJAAA,mBAAA,4LAAA,kBAAA;qBAAA;;;;GAEnC;UAES;EACR,sBAAsB;EACtB,yBAAyB;EACzB,sBAAsB;EACtB,2BAA2B;;cAGvB,kBAAkB;cAOlB,sBAAoB,uCAAA,2CAAA,2CAAA,WAAA,QAAA,4BAAA,oCAAA,mJAAA,mBAAA,iDAAA;qBAKb,WAAS,uCAAA,8CAAA,QAAA,4BAAA,wCAAA,2DAAA,mBAAA"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { t as getConnectRegistry } from "./registry-DCZHBP7M.js";
|
|
2
|
-
import { c as CoreNotFound, n as getConnectPluginUi, s as CoreError, t as applyConnectPluginUi } from "./plugin-ui-
|
|
2
|
+
import { c as CoreNotFound, n as getConnectPluginUi, s as CoreError, t as applyConnectPluginUi } from "./plugin-ui-fDXhKTCK.js";
|
|
3
3
|
import { i as connectRoutes, r as addConnectRoutes, u as resolveConnectRoutes } from "./route-tree-D0aszMrk.js";
|
|
4
|
-
import {
|
|
4
|
+
import { C as CONTENT_VIEW_ID, d as keepOpenedFrom, m as settingsTabs, p as setSettingsRoute, x as driveTitle } from "./sidebar-C2y4mZnX.js";
|
|
5
5
|
import { FEATURE_FLAG_PARAM_PREFIX, GLOBAL_SEARCH_PARAMS, OPENED_FROM_STATE_KEY, PHStoreProvider, REVISION_HISTORY_PAGE_PARAM, REVISION_HISTORY_PARAM, applySearchUpdate, createDriveArrivals, findDriveBySlugOrId, getPHStoreSubscribe, isRoutedModal, isSettingsTarget, makeDriveSlug, modalFromSearch, openedFromIndex, parseRevisionHistoryPage, resolveSearchUpdate, searchParamsToString } from "@powerhousedao/reactor-browser";
|
|
6
6
|
import { RouterProvider, createRouter, retainSearchParams, useRouterState } from "@tanstack/react-router";
|
|
7
7
|
import { useMemo } from "react";
|
|
@@ -487,6 +487,12 @@ function ConnectCoreApp(props) {
|
|
|
487
487
|
});
|
|
488
488
|
}
|
|
489
489
|
//#endregion
|
|
490
|
-
|
|
490
|
+
//#region src/router/route-options.ts
|
|
491
|
+
/** Types a core route file's exported `options` as {@link CoreRouteOptions}. */
|
|
492
|
+
function coreRouteOptions(options) {
|
|
493
|
+
return options;
|
|
494
|
+
}
|
|
495
|
+
//#endregion
|
|
496
|
+
export { routerPerfEnabled as S, connectScrollRestoration as _, bindConnectRouter as a, markNavigationClick as b, FEATURE_FLAG_PARAM_PREFIX as c, definedSearch as d, parseConnectSearch as f, bindConnectScroll as g, validateDriveSearch as h, getConnectAppRouter as i, GLOBAL_SEARCH_PARAMS as l, validateConnectSearch as m, ConnectCoreApp as n, createConnectRouter as o, stringifyConnectSearch as p, disposeConnectAppRouter as r, createConnectNavigation as s, coreRouteOptions as t, connectSearchMiddlewares as u, PERF_STORAGE_KEY as v, markRouterNavigations as x, ROUTER_MEASURES as y };
|
|
491
497
|
|
|
492
|
-
//# sourceMappingURL=router-
|
|
498
|
+
//# sourceMappingURL=router-wVNdTI-Y.js.map
|