@powerhousedao/connect-core 6.2.3-dev.78 → 6.2.3-dev.80

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.
Files changed (110) hide show
  1. package/dist/backend-auth-gate-DNKg_v4Y.js +65 -0
  2. package/dist/backend-auth-gate-DNKg_v4Y.js.map +1 -0
  3. package/dist/backend-auth-gate-DiFpY5rt.d.ts +19 -0
  4. package/dist/backend-auth-gate-DiFpY5rt.d.ts.map +1 -0
  5. package/dist/{index-q4bHCPoJ.d.ts → index-BMlma368.d.ts} +30 -7
  6. package/dist/index-BMlma368.d.ts.map +1 -0
  7. package/dist/{index-DQ0nbYne.d.ts → index-Beqvfchq.d.ts} +16 -3
  8. package/dist/index-Beqvfchq.d.ts.map +1 -0
  9. package/dist/{index-Cm8rYUhs.d.ts → index-Bfl1VYdj.d.ts} +21 -2
  10. package/dist/index-Bfl1VYdj.d.ts.map +1 -0
  11. package/dist/index.d.ts +5 -4
  12. package/dist/index.js +10 -9
  13. package/dist/{multi-reactor-CCMzwoMi.js → multi-reactor-D_2B4jmu.js} +2 -2
  14. package/dist/multi-reactor-D_2B4jmu.js.map +1 -0
  15. package/dist/{plugin-host-HhfxwUZN.js → plugin-host-CMr7lN40.js} +2 -2
  16. package/dist/{plugin-host-HhfxwUZN.js.map → plugin-host-CMr7lN40.js.map} +1 -1
  17. package/dist/{plugin-ui-W0ma6oKJ.js → plugin-ui-DHlnXJmN.js} +3 -3
  18. package/dist/{plugin-ui-W0ma6oKJ.js.map → plugin-ui-DHlnXJmN.js.map} +1 -1
  19. package/dist/plugins.js +2 -2
  20. package/dist/route-tree-D0aszMrk.js.map +1 -1
  21. package/dist/route-tree.d.ts +16 -16
  22. package/dist/route-tree.d.ts.map +1 -1
  23. package/dist/{router-DHL9GT3P.js → router-C4hDJ4_J.js} +10 -4
  24. package/dist/router-C4hDJ4_J.js.map +1 -0
  25. package/dist/router.d.ts +2 -2
  26. package/dist/router.js +4 -4
  27. package/dist/routes/__root.d.ts +3 -3
  28. package/dist/routes/__root.d.ts.map +1 -1
  29. package/dist/routes/__root.js +3 -3
  30. package/dist/routes/__root.js.map +1 -1
  31. package/dist/routes/_app/$.d.ts +3 -3
  32. package/dist/routes/_app/$.d.ts.map +1 -1
  33. package/dist/routes/_app/$.js +3 -3
  34. package/dist/routes/_app/$.js.map +1 -1
  35. package/dist/routes/_app/d/$driveSlug/{-$nodeSlug}.d.ts +5 -5
  36. package/dist/routes/_app/d/$driveSlug/{-$nodeSlug}.d.ts.map +1 -1
  37. package/dist/routes/_app/d/$driveSlug/{-$nodeSlug}.js +3 -3
  38. package/dist/routes/_app/d/$driveSlug/{-$nodeSlug}.js.map +1 -1
  39. package/dist/routes/_app/d/$driveSlug.d.ts +4 -4
  40. package/dist/routes/_app/d/$driveSlug.d.ts.map +1 -1
  41. package/dist/routes/_app/d/$driveSlug.js +3 -3
  42. package/dist/routes/_app/d/$driveSlug.js.map +1 -1
  43. package/dist/routes/_app/index.d.ts +41 -2
  44. package/dist/routes/_app/index.d.ts.map +1 -1
  45. package/dist/routes/_app/index.js +2 -2
  46. package/dist/routes/_app/index.js.map +1 -1
  47. package/dist/routes/_app/settings/appearance.d.ts +3 -3
  48. package/dist/routes/_app/settings/appearance.d.ts.map +1 -1
  49. package/dist/routes/_app/settings/appearance.js +3 -3
  50. package/dist/routes/_app/settings/appearance.js.map +1 -1
  51. package/dist/routes/_app/settings/packages.d.ts +3 -3
  52. package/dist/routes/_app/settings/packages.d.ts.map +1 -1
  53. package/dist/routes/_app/settings/packages.js +3 -3
  54. package/dist/routes/_app/settings/packages.js.map +1 -1
  55. package/dist/routes/_app/settings.d.ts +3 -3
  56. package/dist/routes/_app/settings.d.ts.map +1 -1
  57. package/dist/routes/_app/settings.js +3 -3
  58. package/dist/routes/_app/settings.js.map +1 -1
  59. package/dist/routes/_app.d.ts +41 -2
  60. package/dist/routes/_app.d.ts.map +1 -1
  61. package/dist/routes/_app.js +2 -2
  62. package/dist/routes/_app.js.map +1 -1
  63. package/dist/{runtime-D5hpzfgT.js → runtime-D20_LlB_.js} +64 -14
  64. package/dist/runtime-D20_LlB_.js.map +1 -0
  65. package/dist/runtime-config-D3YPhYyj.d.ts.map +1 -1
  66. package/dist/runtime-config.js +11 -5
  67. package/dist/runtime-config.js.map +1 -1
  68. package/dist/{runtime-flag-U8y14Nth.js → runtime-flag-DvxW_SD4.js} +2 -2
  69. package/dist/{runtime-flag-U8y14Nth.js.map → runtime-flag-DvxW_SD4.js.map} +1 -1
  70. package/dist/runtime.d.ts +3 -2
  71. package/dist/runtime.js +5 -4
  72. package/dist/{sidebar-CRv_DvBV.js → sidebar-C2y4mZnX.js} +13 -2
  73. package/dist/{sidebar-CRv_DvBV.js.map → sidebar-C2y4mZnX.js.map} +1 -1
  74. package/dist/{views-anOyTI7u.js → views-BtUVboYl.js} +79 -6
  75. package/dist/views-BtUVboYl.js.map +1 -0
  76. package/dist/views.d.ts +3 -2
  77. package/dist/views.js +3 -2
  78. package/package.json +8 -8
  79. package/src/router/index.ts +14 -2
  80. package/src/router/modals.tsx +3 -3
  81. package/src/router/route-options.ts +16 -0
  82. package/src/router/sidebar.ts +22 -0
  83. package/src/routes/__root.tsx +3 -2
  84. package/src/routes/_app/$.tsx +3 -2
  85. package/src/routes/_app/d/$driveSlug/{-$nodeSlug}.tsx +3 -2
  86. package/src/routes/_app/d/$driveSlug.tsx +3 -2
  87. package/src/routes/_app/index.tsx +2 -2
  88. package/src/routes/_app/settings/appearance.tsx +3 -3
  89. package/src/routes/_app/settings/packages.tsx +3 -3
  90. package/src/routes/_app/settings.tsx +3 -2
  91. package/src/routes/_app.tsx +2 -2
  92. package/src/runtime/app-reactor-client.ts +63 -12
  93. package/src/runtime/backend-auth-gate.ts +57 -0
  94. package/src/runtime/drive-relist.ts +18 -0
  95. package/src/runtime/graphql-routable-backend.ts +2 -2
  96. package/src/runtime/index.ts +8 -1
  97. package/src/runtime/reactor-client-mode.ts +26 -9
  98. package/src/runtime/runtime-config.ts +12 -1
  99. package/src/views/backend-auth-gate.tsx +76 -0
  100. package/src/views/directory-listing.tsx +2 -2
  101. package/src/views/editor-host.tsx +3 -3
  102. package/src/views/index.ts +5 -0
  103. package/src/views/layout.tsx +6 -2
  104. package/dist/index-Cm8rYUhs.d.ts.map +0 -1
  105. package/dist/index-DQ0nbYne.d.ts.map +0 -1
  106. package/dist/index-q4bHCPoJ.d.ts.map +0 -1
  107. package/dist/multi-reactor-CCMzwoMi.js.map +0 -1
  108. package/dist/router-DHL9GT3P.js.map +0 -1
  109. package/dist/runtime-D5hpzfgT.js.map +0 -1
  110. package/dist/views-anOyTI7u.js.map +0 -1
@@ -1,8 +1,8 @@
1
1
  import { createFileRoute } from "@tanstack/react-router";
2
- import { DRIVE_PENDING_MS, DrivePending, coreView, driveTitle, loadNode, validateDriveSearch } from "@powerhousedao/connect-core/router";
2
+ import { DRIVE_PENDING_MS, DrivePending, coreRouteOptions, coreView, driveTitle, loadNode, validateDriveSearch } from "@powerhousedao/connect-core/router";
3
3
  //#region src/routes/_app/d/$driveSlug/{-$nodeSlug}.tsx
4
4
  /** The node route's options: its loader, `?history` search and title. */
5
- const options = {
5
+ const options = coreRouteOptions({
6
6
  validateSearch: (search) => validateDriveSearch(search),
7
7
  loader: {
8
8
  handler: (options) => loadNode(options),
@@ -14,7 +14,7 @@ const options = {
14
14
  pendingMinMs: 0,
15
15
  pendingComponent: DrivePending,
16
16
  head: ({ match, loaderData }) => ({ meta: [{ title: driveTitle(match.context.store, loaderData, match.context.appName) }] })
17
- };
17
+ });
18
18
  const Route = createFileRoute("/_app/d/$driveSlug/{-$nodeSlug}")({
19
19
  ...options,
20
20
  codeSplitGroupings: [],
@@ -1 +1 @@
1
- {"version":3,"file":"{-$nodeSlug}.js","names":[],"sources":["../../../../../src/routes/_app/d/$driveSlug/{-$nodeSlug}.tsx"],"sourcesContent":["// By package name: a project's build shares the module Connect uses, and its\n// declarations can name the types.\nimport type {\n ConnectRouterContext,\n DriveLoaderOptions,\n DriveRouteData,\n} from \"@powerhousedao/connect-core/router\";\nimport {\n coreView,\n DRIVE_PENDING_MS,\n DrivePending,\n driveTitle,\n loadNode,\n validateDriveSearch,\n} from \"@powerhousedao/connect-core/router\";\nimport { createFileRoute } from \"@tanstack/react-router\";\n\n/** The node route's options: its loader, `?history` search and title. */\nexport const options = {\n // `?history` and its `historyPage`; inline type, as in __root.tsx.\n validateSearch: (search: Record<string, unknown>) =>\n validateDriveSearch(search) as Record<string, string | undefined>,\n loader: {\n handler: (options: DriveLoaderOptions): Promise<DriveRouteData> =>\n loadNode(options),\n // A reused match re-resolves before it shows; drives may have changed.\n staleReloadMode: \"blocking\" as const,\n },\n // Only a path change re-resolves; search-only and same-URL navigations stay.\n shouldReload: ({ cause }: { cause: \"preload\" | \"enter\" | \"stay\" }) =>\n cause !== \"stay\",\n preloadStaleTime: 0,\n pendingMs: DRIVE_PENDING_MS,\n pendingMinMs: 0,\n pendingComponent: DrivePending,\n // Names from the store; bindConnectRouter re-runs this when they change.\n head: ({\n match,\n loaderData,\n }: {\n match: { context: ConnectRouterContext };\n loaderData?: DriveRouteData;\n }) => ({\n meta: [\n {\n title: driveTitle(\n match.context.store,\n loaderData,\n match.context.appName,\n ),\n },\n ],\n }),\n};\n\n// The open document: its history, editor or JSON. Nothing on a folder or the drive's root.\nexport const Route = createFileRoute(\"/_app/d/$driveSlug/{-$nodeSlug}\")({\n ...options,\n // Core routes stay in the main chunk when a project build splits its routes.\n codeSplitGroupings: [],\n component: coreView(\"NodeView\"),\n});\n"],"mappings":";;;;AAkBA,MAAa,UAAU;CAErB,iBAAiB,WACf,oBAAoB,MAAM;CAC5B,QAAQ;EACN,UAAU,YACR,SAAS,OAAO;EAElB,iBAAiB;CACnB;CAEA,eAAe,EAAE,YACf,UAAU;CACZ,kBAAkB;CAClB,WAAW;CACX,cAAc;CACd,kBAAkB;CAElB,OAAO,EACL,OACA,kBAIK,EACL,MAAM,CACJ,EACE,OAAO,WACL,MAAM,QAAQ,OACd,YACA,MAAM,QAAQ,OAChB,EACF,CACF,EACF;AACF;AAGA,MAAa,QAAQ,gBAAgB,iCAAiC,CAAC,CAAC;CACtE,GAAG;CAEH,oBAAoB,CAAC;CACrB,WAAW,SAAS,UAAU;AAChC,CAAC"}
1
+ {"version":3,"file":"{-$nodeSlug}.js","names":[],"sources":["../../../../../src/routes/_app/d/$driveSlug/{-$nodeSlug}.tsx"],"sourcesContent":["// By package name: a project's build shares the module Connect uses, and its\n// declarations can name the types.\nimport type {\n ConnectRouterContext,\n DriveLoaderOptions,\n DriveRouteData,\n} from \"@powerhousedao/connect-core/router\";\nimport {\n coreRouteOptions,\n coreView,\n DRIVE_PENDING_MS,\n DrivePending,\n driveTitle,\n loadNode,\n validateDriveSearch,\n} from \"@powerhousedao/connect-core/router\";\nimport { createFileRoute } from \"@tanstack/react-router\";\n\n/** The node route's options: its loader, `?history` search and title. */\nexport const options = coreRouteOptions({\n // `?history` and its `historyPage`; inline type, as in __root.tsx.\n validateSearch: (search: Record<string, unknown>) =>\n validateDriveSearch(search) as Record<string, string | undefined>,\n loader: {\n handler: (options: DriveLoaderOptions): Promise<DriveRouteData> =>\n loadNode(options),\n // A reused match re-resolves before it shows; drives may have changed.\n staleReloadMode: \"blocking\" as const,\n },\n // Only a path change re-resolves; search-only and same-URL navigations stay.\n shouldReload: ({ cause }: { cause: \"preload\" | \"enter\" | \"stay\" }) =>\n cause !== \"stay\",\n preloadStaleTime: 0,\n pendingMs: DRIVE_PENDING_MS,\n pendingMinMs: 0,\n pendingComponent: DrivePending,\n // Names from the store; bindConnectRouter re-runs this when they change.\n head: ({\n match,\n loaderData,\n }: {\n match: { context: ConnectRouterContext };\n loaderData?: DriveRouteData;\n }) => ({\n meta: [\n {\n title: driveTitle(\n match.context.store,\n loaderData,\n match.context.appName,\n ),\n },\n ],\n }),\n});\n\n// The open document: its history, editor or JSON. Nothing on a folder or the drive's root.\nexport const Route = createFileRoute(\"/_app/d/$driveSlug/{-$nodeSlug}\")({\n ...options,\n // Core routes stay in the main chunk when a project build splits its routes.\n codeSplitGroupings: [],\n component: coreView(\"NodeView\"),\n});\n"],"mappings":";;;;AAmBA,MAAa,UAAU,iBAAiB;CAEtC,iBAAiB,WACf,oBAAoB,MAAM;CAC5B,QAAQ;EACN,UAAU,YACR,SAAS,OAAO;EAElB,iBAAiB;CACnB;CAEA,eAAe,EAAE,YACf,UAAU;CACZ,kBAAkB;CAClB,WAAW;CACX,cAAc;CACd,kBAAkB;CAElB,OAAO,EACL,OACA,kBAIK,EACL,MAAM,CACJ,EACE,OAAO,WACL,MAAM,QAAQ,OACd,YACA,MAAM,QAAQ,OAChB,EACF,CACF,EACF;AACF,CAAC;AAGD,MAAa,QAAQ,gBAAgB,iCAAiC,CAAC,CAAC;CACtE,GAAG;CAEH,oBAAoB,CAAC;CACrB,WAAW,SAAS,UAAU;AAChC,CAAC"}
@@ -2,7 +2,7 @@ import { r as Route$1 } from "../../../index-PjlUqG36.js";
2
2
  import { DriveLoaderOptions, DrivePending } from "@powerhousedao/connect-core/router";
3
3
  //#region src/routes/_app/d/$driveSlug.d.ts
4
4
  /** The drive layout's options: its loader and pending view. */
5
- export declare const options: {
5
+ export declare const options: import("@powerhousedao/connect-core/router").CoreRouteOptions<{
6
6
  loader: {
7
7
  handler: (options: DriveLoaderOptions) => Promise<{
8
8
  driveId: string;
@@ -16,13 +16,13 @@ export declare const options: {
16
16
  pendingMs: number;
17
17
  pendingMinMs: number;
18
18
  pendingComponent: typeof DrivePending;
19
- };
20
- export declare const Route: Route$1<import("@tanstack/react-router").Register, Route$1<import("@tanstack/react-router").Register, import("@tanstack/react-router").RootRoute<import("@tanstack/react-router").Register, (search: Record<string, unknown>) => Record<string, string | undefined>, import("@powerhousedao/connect-core/router").ConnectRouterContext, import("@tanstack/react-router").AnyContext, import("@tanstack/react-router").AnyContext, {}, undefined, unknown, unknown, unknown, unknown, undefined>, "", "/", "/_app", "/_app", undefined, import("@tanstack/react-router").ResolveParams<"">, import("@tanstack/react-router").AnyContext, import("@tanstack/react-router").AnyContext, import("@tanstack/react-router").AnyContext, {}, undefined, unknown, unknown, unknown, unknown, undefined>, "/d/$driveSlug", "/d/$driveSlug", "/_app/d/$driveSlug", "/_app/d/$driveSlug", undefined, import("@powerhousedao/connect-core/router").DriveRouteParams, import("@tanstack/react-router").AnyContext, import("@powerhousedao/connect-core/router").ConnectRouterContext, import("@powerhousedao/connect-core/router").ConnectRouterContext, {}, {
19
+ }>;
20
+ export declare const Route: Route$1<import("@tanstack/react-router").Register, Route$1<import("@tanstack/react-router").Register, import("@tanstack/react-router").RootRoute<import("@tanstack/react-router").Register, (search: Record<string, unknown>) => Record<string, string | undefined>, import("@powerhousedao/connect-core/router").ConnectRouterContext, undefined, undefined, {}, undefined, unknown, unknown, undefined, unknown, undefined>, "", "/", "/_app", "/_app", undefined, import("@tanstack/react-router").ResolveParams<"">, import("@tanstack/react-router").AnyContext, undefined, undefined, {}, undefined, unknown, unknown, undefined, unknown, undefined>, "/d/$driveSlug", "/d/$driveSlug", "/_app/d/$driveSlug", "/_app/d/$driveSlug", undefined, import("@powerhousedao/connect-core/router").DriveRouteParams, import("@tanstack/react-router").AnyContext, undefined, undefined, {}, {
21
21
  handler: (options: DriveLoaderOptions) => Promise<{
22
22
  driveId: string;
23
23
  }>;
24
24
  staleReloadMode: "blocking";
25
- }, unknown, unknown, unknown, unknown, undefined>;
25
+ }, unknown, unknown, undefined, unknown, undefined>;
26
26
  //#endregion
27
27
  export {};
28
28
  //# sourceMappingURL=$driveSlug.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"$driveSlug.d.ts","names":[],"sources":["../../../../src/routes/_app/d/$driveSlug.tsx"],"mappings":";;;;qBAYa;;IAET,UAAO,SAAY,uBAAkB;;;IAErC;;EAGwB,iBAAA;IAAE;;;;;;;qBAWjB,OAhB4B,yCAgBvB,UAAA,yCAAA,2CAAA,2CAAA,WAAA,QAAA,4BAAA,iFAAA,uDAAA,6CAAA,kJAAA,oDAAA,6CAAA,6CAAA,iNAAA,mDAAA,yDAAA,mEAAA;EAhBK,UAAA,SAAA,uBAAkB;;;EAEpB"}
1
+ {"version":3,"file":"$driveSlug.d.ts","names":[],"sources":["../../../../src/routes/_app/d/$driveSlug.tsx"],"mappings":";;;;qBAaa,sDAAO;;IAEhB,UAAO,SAAY,uBAAkB;;;IAErC;;EAGwB,iBAAA;IAAE;;;;;;;qBAWjB,OAhB4B,yCAgBvB,UAAA,yCAAA,2CAAA,2CAAA,WAAA,QAAA,4BAAA,iFAAA,oLAAA,oDAAA,yOAAA,mDAAA;EAhBK,UAAA,SAAA,uBAAkB;;;EAEpB"}
@@ -1,8 +1,8 @@
1
1
  import { createFileRoute } from "@tanstack/react-router";
2
- import { DRIVE_PENDING_MS, DrivePending, coreView, loadDrive } from "@powerhousedao/connect-core/router";
2
+ import { DRIVE_PENDING_MS, DrivePending, coreRouteOptions, coreView, loadDrive } from "@powerhousedao/connect-core/router";
3
3
  //#region src/routes/_app/d/$driveSlug.tsx
4
4
  /** The drive layout's options: its loader and pending view. */
5
- const options = {
5
+ const options = coreRouteOptions({
6
6
  loader: {
7
7
  handler: (options) => loadDrive(options),
8
8
  staleReloadMode: "blocking"
@@ -12,7 +12,7 @@ const options = {
12
12
  pendingMs: DRIVE_PENDING_MS,
13
13
  pendingMinMs: 0,
14
14
  pendingComponent: DrivePending
15
- };
15
+ });
16
16
  const Route = createFileRoute("/_app/d/$driveSlug")({
17
17
  ...options,
18
18
  codeSplitGroupings: [],
@@ -1 +1 @@
1
- {"version":3,"file":"$driveSlug.js","names":[],"sources":["../../../../src/routes/_app/d/$driveSlug.tsx"],"sourcesContent":["// By package name: a project's build shares the module Connect uses, and its\n// declarations can name the types.\nimport type { DriveLoaderOptions } from \"@powerhousedao/connect-core/router\";\nimport {\n coreView,\n DRIVE_PENDING_MS,\n DrivePending,\n loadDrive,\n} from \"@powerhousedao/connect-core/router\";\nimport { createFileRoute } from \"@tanstack/react-router\";\n\n/** The drive layout's options: its loader and pending view. */\nexport const options = {\n loader: {\n handler: (options: DriveLoaderOptions) => loadDrive(options),\n // A reused match re-resolves before it shows; drives may have changed.\n staleReloadMode: \"blocking\" as const,\n },\n // Only a path change re-resolves; search-only and same-URL navigations stay.\n shouldReload: ({ cause }: { cause: \"preload\" | \"enter\" | \"stay\" }) =>\n cause !== \"stay\",\n preloadStaleTime: 0,\n pendingMs: DRIVE_PENDING_MS,\n // The pending view is empty on warm navigations; the router's 500 ms default\n // would hold their commit.\n pendingMinMs: 0,\n pendingComponent: DrivePending,\n};\n\n// The drive app the drive names, else a directory listing, around the node route.\nexport const Route = createFileRoute(\"/_app/d/$driveSlug\")({\n ...options,\n // Core routes stay in the main chunk when a project build splits its routes.\n codeSplitGroupings: [],\n component: coreView(\"DriveLayout\"),\n});\n"],"mappings":";;;;AAYA,MAAa,UAAU;CACrB,QAAQ;EACN,UAAU,YAAgC,UAAU,OAAO;EAE3D,iBAAiB;CACnB;CAEA,eAAe,EAAE,YACf,UAAU;CACZ,kBAAkB;CAClB,WAAW;CAGX,cAAc;CACd,kBAAkB;AACpB;AAGA,MAAa,QAAQ,gBAAgB,oBAAoB,CAAC,CAAC;CACzD,GAAG;CAEH,oBAAoB,CAAC;CACrB,WAAW,SAAS,aAAa;AACnC,CAAC"}
1
+ {"version":3,"file":"$driveSlug.js","names":[],"sources":["../../../../src/routes/_app/d/$driveSlug.tsx"],"sourcesContent":["// By package name: a project's build shares the module Connect uses, and its\n// declarations can name the types.\nimport type { DriveLoaderOptions } from \"@powerhousedao/connect-core/router\";\nimport {\n coreRouteOptions,\n coreView,\n DRIVE_PENDING_MS,\n DrivePending,\n loadDrive,\n} from \"@powerhousedao/connect-core/router\";\nimport { createFileRoute } from \"@tanstack/react-router\";\n\n/** The drive layout's options: its loader and pending view. */\nexport const options = coreRouteOptions({\n loader: {\n handler: (options: DriveLoaderOptions) => loadDrive(options),\n // A reused match re-resolves before it shows; drives may have changed.\n staleReloadMode: \"blocking\" as const,\n },\n // Only a path change re-resolves; search-only and same-URL navigations stay.\n shouldReload: ({ cause }: { cause: \"preload\" | \"enter\" | \"stay\" }) =>\n cause !== \"stay\",\n preloadStaleTime: 0,\n pendingMs: DRIVE_PENDING_MS,\n // The pending view is empty on warm navigations; the router's 500 ms default\n // would hold their commit.\n pendingMinMs: 0,\n pendingComponent: DrivePending,\n});\n\n// The drive app the drive names, else a directory listing, around the node route.\nexport const Route = createFileRoute(\"/_app/d/$driveSlug\")({\n ...options,\n // Core routes stay in the main chunk when a project build splits its routes.\n codeSplitGroupings: [],\n component: coreView(\"DriveLayout\"),\n});\n"],"mappings":";;;;AAaA,MAAa,UAAU,iBAAiB;CACtC,QAAQ;EACN,UAAU,YAAgC,UAAU,OAAO;EAE3D,iBAAiB;CACnB;CAEA,eAAe,EAAE,YACf,UAAU;CACZ,kBAAkB;CAClB,WAAW;CAGX,cAAc;CACd,kBAAkB;AACpB,CAAC;AAGD,MAAa,QAAQ,gBAAgB,oBAAoB,CAAC,CAAC;CACzD,GAAG;CAEH,oBAAoB,CAAC;CACrB,WAAW,SAAS,aAAa;AACnC,CAAC"}
@@ -1,8 +1,47 @@
1
1
  import { r as Route$1 } from "../../index-PjlUqG36.js";
2
2
  //#region src/routes/_app/index.d.ts
3
3
  /** Home's options; none yet. */
4
- export declare const options: {};
5
- export declare const Route: Route$1<import("@tanstack/react-router").Register, Route$1<import("@tanstack/react-router").Register, import("@tanstack/react-router").RootRoute<import("@tanstack/react-router").Register, (search: Record<string, unknown>) => Record<string, string | undefined>, import("@powerhousedao/connect-core/router").ConnectRouterContext, import("@tanstack/react-router").AnyContext, import("@tanstack/react-router").AnyContext, {}, undefined, unknown, unknown, unknown, unknown, undefined>, "", "/", "/_app", "/_app", undefined, import("@tanstack/react-router").ResolveParams<"">, import("@tanstack/react-router").AnyContext, import("@tanstack/react-router").AnyContext, import("@tanstack/react-router").AnyContext, {}, undefined, unknown, unknown, unknown, unknown, undefined>, "/", "/", "/_app/", "/_app/", undefined, import("@tanstack/react-router").ResolveParams<"/">, import("@tanstack/react-router").AnyContext, import("@tanstack/react-router").AnyContext, import("@tanstack/react-router").AnyContext, {}, undefined, unknown, unknown, unknown, unknown, undefined>;
4
+ export declare const options: {
5
+ beforeLoad?: undefined;
6
+ caseSensitive?: undefined;
7
+ codeSplitGroupings?: undefined;
8
+ component?: undefined;
9
+ context?: undefined;
10
+ errorComponent?: undefined;
11
+ gcTime?: undefined;
12
+ getParentRoute?: undefined;
13
+ head?: undefined;
14
+ headers?: undefined;
15
+ loader?: undefined;
16
+ loaderDeps?: undefined;
17
+ notFoundComponent?: undefined;
18
+ onCatch?: undefined;
19
+ onEnter?: undefined;
20
+ onError?: undefined;
21
+ onLeave?: undefined;
22
+ onStay?: undefined;
23
+ params?: undefined;
24
+ parseParams?: undefined;
25
+ pendingComponent?: undefined;
26
+ pendingMinMs?: undefined;
27
+ pendingMs?: undefined;
28
+ postSearchFilters?: undefined;
29
+ preSearchFilters?: undefined;
30
+ preload?: undefined;
31
+ preloadGcTime?: undefined;
32
+ preloadStaleTime?: undefined;
33
+ remountDeps?: undefined;
34
+ scripts?: undefined;
35
+ search?: undefined;
36
+ shouldReload?: undefined;
37
+ ssr?: undefined;
38
+ staleTime?: undefined;
39
+ staticData?: undefined;
40
+ stringifyParams?: undefined;
41
+ validateSearch?: undefined;
42
+ wrapInSuspense?: undefined;
43
+ };
44
+ export declare const Route: Route$1<import("@tanstack/react-router").Register, Route$1<import("@tanstack/react-router").Register, import("@tanstack/react-router").RootRoute<import("@tanstack/react-router").Register, (search: Record<string, unknown>) => Record<string, string | undefined>, import("@powerhousedao/connect-core/router").ConnectRouterContext, undefined, undefined, {}, undefined, unknown, unknown, undefined, unknown, undefined>, "", "/", "/_app", "/_app", undefined, import("@tanstack/react-router").ResolveParams<"">, import("@tanstack/react-router").AnyContext, undefined, undefined, {}, undefined, unknown, unknown, undefined, unknown, undefined>, "/", "/", "/_app/", "/_app/", undefined, import("@tanstack/react-router").ResolveParams<"/">, import("@tanstack/react-router").AnyContext, undefined, undefined, {}, undefined, unknown, unknown, undefined, unknown, undefined>;
6
45
  //#endregion
7
46
  export {};
8
47
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","names":[],"sources":["../../../src/routes/_app/index.tsx"],"mappings":";;;qBAIa;qBAGA,OAAK,yCAAA,UAAA,yCAAA,2CAAA,2CAAA,WAAA,QAAA,4BAAA,iFAAA,uDAAA,6CAAA,kJAAA,oDAAA,6CAAA,6CAAA,qJAAA,qDAAA,6CAAA,6CAAA"}
1
+ {"version":3,"file":"index.d.ts","names":[],"sources":["../../../src/routes/_app/index.tsx"],"mappings":";;;qBAIa;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;qBAGA,OAAK,yCAAA,UAAA,yCAAA,2CAAA,2CAAA,WAAA,QAAA,4BAAA,iFAAA,oLAAA,oDAAA,6KAAA,qDAAA"}
@@ -1,8 +1,8 @@
1
1
  import { createFileRoute } from "@tanstack/react-router";
2
- import { coreView } from "@powerhousedao/connect-core/router";
2
+ import { coreRouteOptions, coreView } from "@powerhousedao/connect-core/router";
3
3
  //#region src/routes/_app/index.tsx
4
4
  /** Home's options; none yet. */
5
- const options = {};
5
+ const options = coreRouteOptions({});
6
6
  const Route = createFileRoute("/_app/")({
7
7
  ...options,
8
8
  codeSplitGroupings: [],
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","names":[],"sources":["../../../src/routes/_app/index.tsx"],"sourcesContent":["import { createFileRoute } from \"@tanstack/react-router\";\nimport { coreView } from \"@powerhousedao/connect-core/router\";\n\n/** Home's options; none yet. */\nexport const options = {};\n\n// The drives, as an index.\nexport const Route = createFileRoute(\"/_app/\")({\n ...options,\n // Core routes stay in the main chunk when a project build splits its routes.\n codeSplitGroupings: [],\n component: coreView(\"DriveIndex\"),\n});\n"],"mappings":";;;;AAIA,MAAa,UAAU,CAAC;AAGxB,MAAa,QAAQ,gBAAgB,QAAQ,CAAC,CAAC;CAC7C,GAAG;CAEH,oBAAoB,CAAC;CACrB,WAAW,SAAS,YAAY;AAClC,CAAC"}
1
+ {"version":3,"file":"index.js","names":[],"sources":["../../../src/routes/_app/index.tsx"],"sourcesContent":["import { createFileRoute } from \"@tanstack/react-router\";\nimport { coreRouteOptions, coreView } from \"@powerhousedao/connect-core/router\";\n\n/** Home's options; none yet. */\nexport const options = coreRouteOptions({});\n\n// The drives, as an index.\nexport const Route = createFileRoute(\"/_app/\")({\n ...options,\n // Core routes stay in the main chunk when a project build splits its routes.\n codeSplitGroupings: [],\n component: coreView(\"DriveIndex\"),\n});\n"],"mappings":";;;;AAIA,MAAa,UAAU,iBAAiB,CAAC,CAAC;AAG1C,MAAa,QAAQ,gBAAgB,QAAQ,CAAC,CAAC;CAC7C,GAAG;CAEH,oBAAoB,CAAC;CACrB,WAAW,SAAS,YAAY;AAClC,CAAC"}
@@ -1,15 +1,15 @@
1
1
  import { r as Route$1 } from "../../../index-PjlUqG36.js";
2
2
  //#region src/routes/_app/settings/appearance.d.ts
3
3
  /** The tab's options: its entry in the settings page. */
4
- export declare const options: {
4
+ export declare const options: import("@powerhousedao/connect-core/router").CoreRouteOptions<{
5
5
  staticData: {
6
6
  settings: {
7
7
  label: string;
8
8
  order: number;
9
9
  };
10
10
  };
11
- };
12
- export declare const Route: Route$1<import("@tanstack/react-router").Register, Route$1<import("@tanstack/react-router").Register, Route$1<import("@tanstack/react-router").Register, import("@tanstack/react-router").RootRoute<import("@tanstack/react-router").Register, (search: Record<string, unknown>) => Record<string, string | undefined>, import("@powerhousedao/connect-core/router").ConnectRouterContext, import("@tanstack/react-router").AnyContext, import("@tanstack/react-router").AnyContext, {}, undefined, unknown, unknown, unknown, unknown, undefined>, "", "/", "/_app", "/_app", undefined, import("@tanstack/react-router").ResolveParams<"">, import("@tanstack/react-router").AnyContext, import("@tanstack/react-router").AnyContext, import("@tanstack/react-router").AnyContext, {}, undefined, unknown, unknown, unknown, unknown, undefined>, "/settings", "/settings", "/_app/settings", "/_app/settings", undefined, import("@tanstack/react-router").ResolveParams<"/settings">, import("@tanstack/react-router").AnyContext, import("@tanstack/react-router").AnyContext, (context: any) => void, {}, undefined, unknown, unknown, unknown, unknown, undefined>, "/appearance", "/settings/appearance", "/_app/settings/appearance", "/_app/settings/appearance", undefined, import("@tanstack/react-router").ResolveParams<"/appearance">, import("@tanstack/react-router").AnyContext, import("@tanstack/react-router").AnyContext, import("@tanstack/react-router").AnyContext, {}, undefined, unknown, unknown, unknown, unknown, undefined>;
11
+ }>;
12
+ export declare const Route: Route$1<import("@tanstack/react-router").Register, Route$1<import("@tanstack/react-router").Register, Route$1<import("@tanstack/react-router").Register, import("@tanstack/react-router").RootRoute<import("@tanstack/react-router").Register, (search: Record<string, unknown>) => Record<string, string | undefined>, import("@powerhousedao/connect-core/router").ConnectRouterContext, undefined, undefined, {}, undefined, unknown, unknown, undefined, unknown, undefined>, "", "/", "/_app", "/_app", undefined, import("@tanstack/react-router").ResolveParams<"">, import("@tanstack/react-router").AnyContext, undefined, undefined, {}, undefined, unknown, unknown, undefined, unknown, undefined>, "/settings", "/settings", "/_app/settings", "/_app/settings", undefined, import("@tanstack/react-router").ResolveParams<"/settings">, import("@tanstack/react-router").AnyContext, undefined, (context: any) => void, {}, undefined, unknown, unknown, undefined, unknown, undefined>, "/appearance", "/settings/appearance", "/_app/settings/appearance", "/_app/settings/appearance", undefined, import("@tanstack/react-router").ResolveParams<"/appearance">, import("@tanstack/react-router").AnyContext, undefined, undefined, {}, undefined, unknown, unknown, undefined, unknown, undefined>;
13
13
  //#endregion
14
14
  export {};
15
15
  //# sourceMappingURL=appearance.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"appearance.d.ts","names":[],"sources":["../../../../src/routes/_app/settings/appearance.tsx"],"mappings":";;;qBAIa;EACX;IAAc;MAAY;MAAqB;;;;qBAIpC,OAAK,yCAAA,UAAA,yCAAA,UAAA,yCAAA,2CAAA,2CAAA,WAAA,QAAA,4BAAA,iFAAA,uDAAA,6CAAA,kJAAA,oDAAA,6CAAA,6CAAA,qLAAA,6DAAA,6CAAA,aAAA,mOAAA,+DAAA,6CAAA,6CAAA"}
1
+ {"version":3,"file":"appearance.d.ts","names":[],"sources":["../../../../src/routes/_app/settings/appearance.tsx"],"mappings":";;;qBAIa,sDAAO;;IACJ;MAAY;MAAqB;;;;qBAIpC,OAAK,yCAAA,UAAA,yCAAA,UAAA,yCAAA,2CAAA,2CAAA,WAAA,QAAA,4BAAA,iFAAA,oLAAA,oDAAA,6MAAA,6DAAA,wBAAA,qOAAA,+DAAA"}
@@ -1,11 +1,11 @@
1
1
  import { createFileRoute } from "@tanstack/react-router";
2
- import { coreView } from "@powerhousedao/connect-core/router";
2
+ import { coreRouteOptions, coreView } from "@powerhousedao/connect-core/router";
3
3
  //#region src/routes/_app/settings/appearance.tsx
4
4
  /** The tab's options: its entry in the settings page. */
5
- const options = { staticData: { settings: {
5
+ const options = coreRouteOptions({ staticData: { settings: {
6
6
  label: "Appearance",
7
7
  order: 30
8
- } } };
8
+ } } });
9
9
  const Route = createFileRoute("/_app/settings/appearance")({
10
10
  ...options,
11
11
  codeSplitGroupings: [],
@@ -1 +1 @@
1
- {"version":3,"file":"appearance.js","names":[],"sources":["../../../../src/routes/_app/settings/appearance.tsx"],"sourcesContent":["import { createFileRoute } from \"@tanstack/react-router\";\nimport { coreView } from \"@powerhousedao/connect-core/router\";\n\n/** The tab's options: its entry in the settings page. */\nexport const options = {\n staticData: { settings: { label: \"Appearance\", order: 30 } },\n};\n\n// The theme.\nexport const Route = createFileRoute(\"/_app/settings/appearance\")({\n ...options,\n // Core routes stay in the main chunk when a project build splits its routes.\n codeSplitGroupings: [],\n component: coreView(\"AppearanceTab\"),\n});\n"],"mappings":";;;;AAIA,MAAa,UAAU,EACrB,YAAY,EAAE,UAAU;CAAE,OAAO;CAAc,OAAO;AAAG,EAAE,EAC7D;AAGA,MAAa,QAAQ,gBAAgB,2BAA2B,CAAC,CAAC;CAChE,GAAG;CAEH,oBAAoB,CAAC;CACrB,WAAW,SAAS,eAAe;AACrC,CAAC"}
1
+ {"version":3,"file":"appearance.js","names":[],"sources":["../../../../src/routes/_app/settings/appearance.tsx"],"sourcesContent":["import { createFileRoute } from \"@tanstack/react-router\";\nimport { coreRouteOptions, coreView } from \"@powerhousedao/connect-core/router\";\n\n/** The tab's options: its entry in the settings page. */\nexport const options = coreRouteOptions({\n staticData: { settings: { label: \"Appearance\", order: 30 } },\n});\n\n// The theme.\nexport const Route = createFileRoute(\"/_app/settings/appearance\")({\n ...options,\n // Core routes stay in the main chunk when a project build splits its routes.\n codeSplitGroupings: [],\n component: coreView(\"AppearanceTab\"),\n});\n"],"mappings":";;;;AAIA,MAAa,UAAU,iBAAiB,EACtC,YAAY,EAAE,UAAU;CAAE,OAAO;CAAc,OAAO;AAAG,EAAE,EAC7D,CAAC;AAGD,MAAa,QAAQ,gBAAgB,2BAA2B,CAAC,CAAC;CAChE,GAAG;CAEH,oBAAoB,CAAC;CACrB,WAAW,SAAS,eAAe;AACrC,CAAC"}
@@ -1,15 +1,15 @@
1
1
  import { r as Route$1 } from "../../../index-PjlUqG36.js";
2
2
  //#region src/routes/_app/settings/packages.d.ts
3
3
  /** The tab's options: its entry in the settings page. */
4
- export declare const options: {
4
+ export declare const options: import("@powerhousedao/connect-core/router").CoreRouteOptions<{
5
5
  staticData: {
6
6
  settings: {
7
7
  label: string;
8
8
  order: number;
9
9
  };
10
10
  };
11
- };
12
- export declare const Route: Route$1<import("@tanstack/react-router").Register, Route$1<import("@tanstack/react-router").Register, Route$1<import("@tanstack/react-router").Register, import("@tanstack/react-router").RootRoute<import("@tanstack/react-router").Register, (search: Record<string, unknown>) => Record<string, string | undefined>, import("@powerhousedao/connect-core/router").ConnectRouterContext, import("@tanstack/react-router").AnyContext, import("@tanstack/react-router").AnyContext, {}, undefined, unknown, unknown, unknown, unknown, undefined>, "", "/", "/_app", "/_app", undefined, import("@tanstack/react-router").ResolveParams<"">, import("@tanstack/react-router").AnyContext, import("@tanstack/react-router").AnyContext, import("@tanstack/react-router").AnyContext, {}, undefined, unknown, unknown, unknown, unknown, undefined>, "/settings", "/settings", "/_app/settings", "/_app/settings", undefined, import("@tanstack/react-router").ResolveParams<"/settings">, import("@tanstack/react-router").AnyContext, import("@tanstack/react-router").AnyContext, (context: any) => void, {}, undefined, unknown, unknown, unknown, unknown, undefined>, "/packages", "/settings/packages", "/_app/settings/packages", "/_app/settings/packages", undefined, import("@tanstack/react-router").ResolveParams<"/packages">, import("@tanstack/react-router").AnyContext, import("@tanstack/react-router").AnyContext, import("@tanstack/react-router").AnyContext, {}, undefined, unknown, unknown, unknown, unknown, undefined>;
11
+ }>;
12
+ export declare const Route: Route$1<import("@tanstack/react-router").Register, Route$1<import("@tanstack/react-router").Register, Route$1<import("@tanstack/react-router").Register, import("@tanstack/react-router").RootRoute<import("@tanstack/react-router").Register, (search: Record<string, unknown>) => Record<string, string | undefined>, import("@powerhousedao/connect-core/router").ConnectRouterContext, undefined, undefined, {}, undefined, unknown, unknown, undefined, unknown, undefined>, "", "/", "/_app", "/_app", undefined, import("@tanstack/react-router").ResolveParams<"">, import("@tanstack/react-router").AnyContext, undefined, undefined, {}, undefined, unknown, unknown, undefined, unknown, undefined>, "/settings", "/settings", "/_app/settings", "/_app/settings", undefined, import("@tanstack/react-router").ResolveParams<"/settings">, import("@tanstack/react-router").AnyContext, undefined, (context: any) => void, {}, undefined, unknown, unknown, undefined, unknown, undefined>, "/packages", "/settings/packages", "/_app/settings/packages", "/_app/settings/packages", undefined, import("@tanstack/react-router").ResolveParams<"/packages">, import("@tanstack/react-router").AnyContext, undefined, undefined, {}, undefined, unknown, unknown, undefined, unknown, undefined>;
13
13
  //#endregion
14
14
  export {};
15
15
  //# sourceMappingURL=packages.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"packages.d.ts","names":[],"sources":["../../../../src/routes/_app/settings/packages.tsx"],"mappings":";;;qBAIa;EACX;IAAc;MAAY;MAAmB;;;;qBAIlC,OAAK,yCAAA,UAAA,yCAAA,UAAA,yCAAA,2CAAA,2CAAA,WAAA,QAAA,4BAAA,iFAAA,uDAAA,6CAAA,kJAAA,oDAAA,6CAAA,6CAAA,qLAAA,6DAAA,6CAAA,aAAA,2NAAA,6DAAA,6CAAA,6CAAA"}
1
+ {"version":3,"file":"packages.d.ts","names":[],"sources":["../../../../src/routes/_app/settings/packages.tsx"],"mappings":";;;qBAIa,sDAAO;;IACJ;MAAY;MAAmB;;;;qBAIlC,OAAK,yCAAA,UAAA,yCAAA,UAAA,yCAAA,2CAAA,2CAAA,WAAA,QAAA,4BAAA,iFAAA,oLAAA,oDAAA,6MAAA,6DAAA,wBAAA,6NAAA,6DAAA"}
@@ -1,11 +1,11 @@
1
1
  import { createFileRoute } from "@tanstack/react-router";
2
- import { coreView } from "@powerhousedao/connect-core/router";
2
+ import { coreRouteOptions, coreView } from "@powerhousedao/connect-core/router";
3
3
  //#region src/routes/_app/settings/packages.tsx
4
4
  /** The tab's options: its entry in the settings page. */
5
- const options = { staticData: { settings: {
5
+ const options = coreRouteOptions({ staticData: { settings: {
6
6
  label: "Packages",
7
7
  order: 50
8
- } } };
8
+ } } });
9
9
  const Route = createFileRoute("/_app/settings/packages")({
10
10
  ...options,
11
11
  codeSplitGroupings: [],
@@ -1 +1 @@
1
- {"version":3,"file":"packages.js","names":[],"sources":["../../../../src/routes/_app/settings/packages.tsx"],"sourcesContent":["import { createFileRoute } from \"@tanstack/react-router\";\nimport { coreView } from \"@powerhousedao/connect-core/router\";\n\n/** The tab's options: its entry in the settings page. */\nexport const options = {\n staticData: { settings: { label: \"Packages\", order: 50 } },\n};\n\n// The loaded packages, their document models and editors.\nexport const Route = createFileRoute(\"/_app/settings/packages\")({\n ...options,\n // Core routes stay in the main chunk when a project build splits its routes.\n codeSplitGroupings: [],\n component: coreView(\"PackagesTab\"),\n});\n"],"mappings":";;;;AAIA,MAAa,UAAU,EACrB,YAAY,EAAE,UAAU;CAAE,OAAO;CAAY,OAAO;AAAG,EAAE,EAC3D;AAGA,MAAa,QAAQ,gBAAgB,yBAAyB,CAAC,CAAC;CAC9D,GAAG;CAEH,oBAAoB,CAAC;CACrB,WAAW,SAAS,aAAa;AACnC,CAAC"}
1
+ {"version":3,"file":"packages.js","names":[],"sources":["../../../../src/routes/_app/settings/packages.tsx"],"sourcesContent":["import { createFileRoute } from \"@tanstack/react-router\";\nimport { coreRouteOptions, coreView } from \"@powerhousedao/connect-core/router\";\n\n/** The tab's options: its entry in the settings page. */\nexport const options = coreRouteOptions({\n staticData: { settings: { label: \"Packages\", order: 50 } },\n});\n\n// The loaded packages, their document models and editors.\nexport const Route = createFileRoute(\"/_app/settings/packages\")({\n ...options,\n // Core routes stay in the main chunk when a project build splits its routes.\n codeSplitGroupings: [],\n component: coreView(\"PackagesTab\"),\n});\n"],"mappings":";;;;AAIA,MAAa,UAAU,iBAAiB,EACtC,YAAY,EAAE,UAAU;CAAE,OAAO;CAAY,OAAO;AAAG,EAAE,EAC3D,CAAC;AAGD,MAAa,QAAQ,gBAAgB,yBAAyB,CAAC,CAAC;CAC9D,GAAG;CAEH,oBAAoB,CAAC;CACrB,WAAW,SAAS,aAAa;AACnC,CAAC"}
@@ -4,7 +4,7 @@ import { ConnectRouterContext } from "@powerhousedao/connect-core/router";
4
4
  //#region src/routes/_app/settings.d.ts
5
5
  /** The settings page's options: the tab redirect and title. Its tabs are its
6
6
  * child routes with `staticData.settings`. */
7
- export declare const options: {
7
+ export declare const options: import("@powerhousedao/connect-core/router").CoreRouteOptions<{
8
8
  beforeLoad: (context: any) => void;
9
9
  head: ({ matches, match }: {
10
10
  matches: readonly {
@@ -18,8 +18,8 @@ export declare const options: {
18
18
  title: string;
19
19
  }[];
20
20
  };
21
- };
22
- export declare const Route: Route$1<import("@tanstack/react-router").Register, Route$1<import("@tanstack/react-router").Register, import("@tanstack/react-router").RootRoute<import("@tanstack/react-router").Register, (search: Record<string, unknown>) => Record<string, string | undefined>, ConnectRouterContext, import("@tanstack/react-router").AnyContext, import("@tanstack/react-router").AnyContext, {}, undefined, unknown, unknown, unknown, unknown, undefined>, "", "/", "/_app", "/_app", undefined, import("@tanstack/react-router").ResolveParams<"">, import("@tanstack/react-router").AnyContext, import("@tanstack/react-router").AnyContext, import("@tanstack/react-router").AnyContext, {}, undefined, unknown, unknown, unknown, unknown, undefined>, "/settings", "/settings", "/_app/settings", "/_app/settings", undefined, import("@tanstack/react-router").ResolveParams<"/settings">, import("@tanstack/react-router").AnyContext, import("@tanstack/react-router").AnyContext, (context: any) => void, {}, undefined, unknown, unknown, unknown, unknown, undefined>;
21
+ }>;
22
+ export declare const Route: Route$1<import("@tanstack/react-router").Register, Route$1<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, import("@tanstack/react-router").ResolveParams<"">, import("@tanstack/react-router").AnyContext, undefined, undefined, {}, undefined, unknown, unknown, undefined, unknown, undefined>, "/settings", "/settings", "/_app/settings", "/_app/settings", undefined, import("@tanstack/react-router").ResolveParams<"/settings">, import("@tanstack/react-router").AnyContext, undefined, (context: any) => void, {}, undefined, unknown, unknown, undefined, unknown, undefined>;
23
23
  //#endregion
24
24
  export {};
25
25
  //# sourceMappingURL=settings.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"settings.d.ts","names":[],"sources":["../../../src/routes/_app/settings.tsx"],"mappings":";;;;;;qBAWa;EAG0B,aAAC;EAKnC,SAAA,SAAA;IACD;MAAoB,YAAY;;IAChC;MAAS,SAAS;;;;;;;;qBAcT,OAAK,yCAAA,UAAA,yCAAA,2CAAA,2CAAA,WAAA,QAAA,4BAAA,oCAAA,uDAAA,6CAAA,kJAAA,oDAAA,6CAAA,6CAAA,qLAAA,6DAAA,6CAAA,aAAA"}
1
+ {"version":3,"file":"settings.d.ts","names":[],"sources":["../../../src/routes/_app/settings.tsx"],"mappings":";;;;;;qBAYa,sDAAO;EAGmB,aAAC;EAKnC,SAAA,SAAA;IACD;MAAoB,YAAY;;IAChC;MAAS,SAAS;;;;;;;;qBAcT,OAAK,yCAAA,UAAA,yCAAA,2CAAA,2CAAA,WAAA,QAAA,4BAAA,oCAAA,oLAAA,oDAAA,6MAAA,6DAAA,wBAAA"}
@@ -1,12 +1,12 @@
1
1
  import { createFileRoute } from "@tanstack/react-router";
2
- import { coreView, redirectToSettingsTab, settingsTitle } from "@powerhousedao/connect-core/router";
2
+ import { coreRouteOptions, coreView, redirectToSettingsTab, settingsTitle } from "@powerhousedao/connect-core/router";
3
3
  //#region src/routes/_app/settings.tsx
4
4
  /** The settings page's options: the tab redirect and title. Its tabs are its
5
5
  * child routes with `staticData.settings`. */
6
- const options = {
6
+ const options = coreRouteOptions({
7
7
  beforeLoad: redirectToSettingsTab,
8
8
  head: ({ matches, match }) => ({ meta: [{ title: settingsTitle(matches.at(-1)?.staticData.settings?.label, match.context.appName) }] })
9
- };
9
+ });
10
10
  const Route = createFileRoute("/_app/settings")({
11
11
  ...options,
12
12
  codeSplitGroupings: [],
@@ -1 +1 @@
1
- {"version":3,"file":"settings.js","names":[],"sources":["../../../src/routes/_app/settings.tsx"],"sourcesContent":["import type { ConnectRouterContext } from \"@powerhousedao/connect-core/router\";\nimport {\n coreView,\n redirectToSettingsTab,\n settingsTitle,\n} from \"@powerhousedao/connect-core/router\";\nimport type { StaticDataRouteOption } from \"@tanstack/react-router\";\nimport { createFileRoute } from \"@tanstack/react-router\";\n\n/** The settings page's options: the tab redirect and title. Its tabs are its\n * child routes with `staticData.settings`. */\nexport const options = {\n // Bare /settings and a disabled tab go to the first tab. `any`: checking the\n // router's context against a typed parameter here is circular.\n beforeLoad: redirectToSettingsTab as (context: any) => void,\n // The shown tab's label; a tab needs no head of its own.\n head: ({\n matches,\n match,\n }: {\n matches: readonly { staticData: StaticDataRouteOption }[];\n match: { context: ConnectRouterContext };\n }) => ({\n meta: [\n {\n title: settingsTitle(\n matches.at(-1)?.staticData.settings?.label,\n match.context.appName,\n ),\n },\n ],\n }),\n};\n\n// The tab list beside the shown tab.\nexport const Route = createFileRoute(\"/_app/settings\")({\n ...options,\n // Core routes stay in the main chunk when a project build splits its routes.\n codeSplitGroupings: [],\n component: coreView(\"CoreSettingsPage\"),\n});\n"],"mappings":";;;;;AAWA,MAAa,UAAU;CAGrB,YAAY;CAEZ,OAAO,EACL,SACA,aAIK,EACL,MAAM,CACJ,EACE,OAAO,cACL,QAAQ,GAAG,EAAE,CAAC,EAAE,WAAW,UAAU,OACrC,MAAM,QAAQ,OAChB,EACF,CACF,EACF;AACF;AAGA,MAAa,QAAQ,gBAAgB,gBAAgB,CAAC,CAAC;CACrD,GAAG;CAEH,oBAAoB,CAAC;CACrB,WAAW,SAAS,kBAAkB;AACxC,CAAC"}
1
+ {"version":3,"file":"settings.js","names":[],"sources":["../../../src/routes/_app/settings.tsx"],"sourcesContent":["import type { ConnectRouterContext } from \"@powerhousedao/connect-core/router\";\nimport {\n coreRouteOptions,\n coreView,\n redirectToSettingsTab,\n settingsTitle,\n} from \"@powerhousedao/connect-core/router\";\nimport type { StaticDataRouteOption } from \"@tanstack/react-router\";\nimport { createFileRoute } from \"@tanstack/react-router\";\n\n/** The settings page's options: the tab redirect and title. Its tabs are its\n * child routes with `staticData.settings`. */\nexport const options = coreRouteOptions({\n // Bare /settings and a disabled tab go to the first tab. `any`: checking the\n // router's context against a typed parameter here is circular.\n beforeLoad: redirectToSettingsTab as (context: any) => void,\n // The shown tab's label; a tab needs no head of its own.\n head: ({\n matches,\n match,\n }: {\n matches: readonly { staticData: StaticDataRouteOption }[];\n match: { context: ConnectRouterContext };\n }) => ({\n meta: [\n {\n title: settingsTitle(\n matches.at(-1)?.staticData.settings?.label,\n match.context.appName,\n ),\n },\n ],\n }),\n});\n\n// The tab list beside the shown tab.\nexport const Route = createFileRoute(\"/_app/settings\")({\n ...options,\n // Core routes stay in the main chunk when a project build splits its routes.\n codeSplitGroupings: [],\n component: coreView(\"CoreSettingsPage\"),\n});\n"],"mappings":";;;;;AAYA,MAAa,UAAU,iBAAiB;CAGtC,YAAY;CAEZ,OAAO,EACL,SACA,aAIK,EACL,MAAM,CACJ,EACE,OAAO,cACL,QAAQ,GAAG,EAAE,CAAC,EAAE,WAAW,UAAU,OACrC,MAAM,QAAQ,OAChB,EACF,CACF,EACF;AACF,CAAC;AAGD,MAAa,QAAQ,gBAAgB,gBAAgB,CAAC,CAAC;CACrD,GAAG;CAEH,oBAAoB,CAAC;CACrB,WAAW,SAAS,kBAAkB;AACxC,CAAC"}
@@ -1,8 +1,47 @@
1
1
  import { r as Route$1 } from "../index-PjlUqG36.js";
2
2
  //#region src/routes/_app.d.ts
3
3
  /** The layout's options; none yet. */
4
- export declare const options: {};
5
- export declare const Route: Route$1<import("@tanstack/react-router").Register, import("@tanstack/react-router").RootRoute<import("@tanstack/react-router").Register, (search: Record<string, unknown>) => Record<string, string | undefined>, import("@powerhousedao/connect-core/router").ConnectRouterContext, import("@tanstack/react-router").AnyContext, import("@tanstack/react-router").AnyContext, {}, undefined, unknown, unknown, unknown, unknown, undefined>, "", "/", "/_app", "/_app", undefined, import("@tanstack/react-router").ResolveParams<"">, import("@tanstack/react-router").AnyContext, import("@tanstack/react-router").AnyContext, import("@tanstack/react-router").AnyContext, {}, undefined, unknown, unknown, unknown, unknown, undefined>;
4
+ export declare const options: {
5
+ beforeLoad?: undefined;
6
+ caseSensitive?: undefined;
7
+ codeSplitGroupings?: undefined;
8
+ component?: undefined;
9
+ context?: undefined;
10
+ errorComponent?: undefined;
11
+ gcTime?: undefined;
12
+ getParentRoute?: undefined;
13
+ head?: undefined;
14
+ headers?: undefined;
15
+ loader?: undefined;
16
+ loaderDeps?: undefined;
17
+ notFoundComponent?: undefined;
18
+ onCatch?: undefined;
19
+ onEnter?: undefined;
20
+ onError?: undefined;
21
+ onLeave?: undefined;
22
+ onStay?: undefined;
23
+ params?: undefined;
24
+ parseParams?: undefined;
25
+ pendingComponent?: undefined;
26
+ pendingMinMs?: undefined;
27
+ pendingMs?: undefined;
28
+ postSearchFilters?: undefined;
29
+ preSearchFilters?: undefined;
30
+ preload?: undefined;
31
+ preloadGcTime?: undefined;
32
+ preloadStaleTime?: undefined;
33
+ remountDeps?: undefined;
34
+ scripts?: undefined;
35
+ search?: undefined;
36
+ shouldReload?: undefined;
37
+ ssr?: undefined;
38
+ staleTime?: undefined;
39
+ staticData?: undefined;
40
+ stringifyParams?: undefined;
41
+ validateSearch?: undefined;
42
+ wrapInSuspense?: undefined;
43
+ };
44
+ export declare const Route: Route$1<import("@tanstack/react-router").Register, import("@tanstack/react-router").RootRoute<import("@tanstack/react-router").Register, (search: Record<string, unknown>) => Record<string, string | undefined>, import("@powerhousedao/connect-core/router").ConnectRouterContext, undefined, undefined, {}, undefined, unknown, unknown, undefined, unknown, undefined>, "", "/", "/_app", "/_app", undefined, import("@tanstack/react-router").ResolveParams<"">, import("@tanstack/react-router").AnyContext, undefined, undefined, {}, undefined, unknown, unknown, undefined, unknown, undefined>;
6
45
  //#endregion
7
46
  export {};
8
47
  //# sourceMappingURL=_app.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"_app.d.ts","names":[],"sources":["../../src/routes/_app.tsx"],"mappings":";;;qBAIa;qBAIA,OAAK,yCAAA,2CAAA,2CAAA,WAAA,QAAA,4BAAA,iFAAA,uDAAA,6CAAA,kJAAA,oDAAA,6CAAA,6CAAA"}
1
+ {"version":3,"file":"_app.d.ts","names":[],"sources":["../../src/routes/_app.tsx"],"mappings":";;;qBAIa;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;qBAIA,OAAK,yCAAA,2CAAA,2CAAA,WAAA,QAAA,4BAAA,iFAAA,oLAAA,oDAAA"}
@@ -1,8 +1,8 @@
1
1
  import { createFileRoute } from "@tanstack/react-router";
2
- import { coreView } from "@powerhousedao/connect-core/router";
2
+ import { coreRouteOptions, coreView } from "@powerhousedao/connect-core/router";
3
3
  //#region src/routes/_app.tsx
4
4
  /** The layout's options; none yet. */
5
- const options = {};
5
+ const options = coreRouteOptions({});
6
6
  const Route = createFileRoute("/_app")({
7
7
  ...options,
8
8
  codeSplitGroupings: [],
@@ -1 +1 @@
1
- {"version":3,"file":"_app.js","names":[],"sources":["../../src/routes/_app.tsx"],"sourcesContent":["import { createFileRoute } from \"@tanstack/react-router\";\nimport { coreView } from \"@powerhousedao/connect-core/router\";\n\n/** The layout's options; none yet. */\nexport const options = {};\n\n// Pathless: the header and content area around home, drives, settings and a\n// project's _app/ routes. A layout renders `ContentOutlet` for its content.\nexport const Route = createFileRoute(\"/_app\")({\n ...options,\n // Core routes stay in the main chunk when a project build splits its routes.\n codeSplitGroupings: [],\n component: coreView(\"CoreLayout\"),\n});\n"],"mappings":";;;;AAIA,MAAa,UAAU,CAAC;AAIxB,MAAa,QAAQ,gBAAgB,OAAO,CAAC,CAAC;CAC5C,GAAG;CAEH,oBAAoB,CAAC;CACrB,WAAW,SAAS,YAAY;AAClC,CAAC"}
1
+ {"version":3,"file":"_app.js","names":[],"sources":["../../src/routes/_app.tsx"],"sourcesContent":["import { createFileRoute } from \"@tanstack/react-router\";\nimport { coreRouteOptions, coreView } from \"@powerhousedao/connect-core/router\";\n\n/** The layout's options; none yet. */\nexport const options = coreRouteOptions({});\n\n// Pathless: the header and content area around home, drives, settings and a\n// project's _app/ routes. A layout renders `ContentOutlet` for its content.\nexport const Route = createFileRoute(\"/_app\")({\n ...options,\n // Core routes stay in the main chunk when a project build splits its routes.\n codeSplitGroupings: [],\n component: coreView(\"CoreLayout\"),\n});\n"],"mappings":";;;;AAIA,MAAa,UAAU,iBAAiB,CAAC,CAAC;AAI1C,MAAa,QAAQ,gBAAgB,OAAO,CAAC,CAAC;CAC5C,GAAG;CAEH,oBAAoB,CAAC;CACrB,WAAW,SAAS,YAAY;AAClC,CAAC"}
@@ -1,6 +1,7 @@
1
1
  import { getRuntimeConfig } from "./runtime-config.js";
2
- import { n as resolveRuntimeFlag, t as isRuntimeFlagEnabled } from "./runtime-flag-U8y14Nth.js";
3
- import { bindPHStoreToWindow, createPHStore, getActivePHStore, getDrives, getPHStore, refreshReactorDataClient, setDrives, setFullReactorClient } from "@powerhousedao/reactor-browser";
2
+ import { n as resolveRuntimeFlag, t as isRuntimeFlagEnabled } from "./runtime-flag-DvxW_SD4.js";
3
+ import { n as setDriveRelister } from "./backend-auth-gate-DNKg_v4Y.js";
4
+ import { bindPHStoreToWindow, createPHStore, getActivePHStore, getDrives, getFullReactorClient, getPHStore, recordBackendAuthError, setBackendAuth, setDrives, setFullReactorClient } from "@powerhousedao/reactor-browser";
4
5
  import { logger } from "document-model";
5
6
  //#region src/runtime/multi-reactor-flag.ts
6
7
  function isMultiReactorEnabled() {
@@ -28,17 +29,29 @@ const MODES = /* @__PURE__ */ new Set([
28
29
  "remote",
29
30
  "router"
30
31
  ]);
31
- function fromQuery() {
32
+ const REACTOR_CLIENT_QUERY_KEY = "reactorClient";
33
+ const REACTOR_CLIENT_STORAGE_KEY = "ph:reactorClient";
34
+ const asMode = (value) => value && MODES.has(value) ? value : void 0;
35
+ function fromTab() {
32
36
  if (typeof window === "undefined") return void 0;
37
+ let query;
33
38
  try {
34
- const value = new URLSearchParams(window.location.search).get("reactorClient");
35
- return value && MODES.has(value) ? value : void 0;
39
+ query = asMode(new URLSearchParams(window.location.search).get(REACTOR_CLIENT_QUERY_KEY));
36
40
  } catch {
37
41
  return;
38
42
  }
43
+ try {
44
+ if (query) {
45
+ window.localStorage.setItem(REACTOR_CLIENT_STORAGE_KEY, query);
46
+ return query;
47
+ }
48
+ return asMode(window.localStorage.getItem(REACTOR_CLIENT_STORAGE_KEY));
49
+ } catch {
50
+ return query;
51
+ }
39
52
  }
40
53
  function resolveReactorClientMode() {
41
- const override = fromQuery();
54
+ const override = fromTab();
42
55
  if (override) return override;
43
56
  const configured = getRuntimeConfig().connect.instance?.reactorClient;
44
57
  if (configured && MODES.has(configured)) return configured;
@@ -48,7 +61,7 @@ function resolveReactorClientMode() {
48
61
  }
49
62
  //#endregion
50
63
  //#region src/runtime/app-reactor-client.ts
51
- const loadMultiReactor = () => import("./multi-reactor-CCMzwoMi.js");
64
+ const loadMultiReactor = () => import("./multi-reactor-D_2B4jmu.js");
52
65
  function planReactorClient(mode = resolveReactorClientMode()) {
53
66
  const needsLocalReactor = mode !== "remote";
54
67
  return {
@@ -105,20 +118,57 @@ function requireModule(params) {
105
118
  if (!params.module) throw new Error(`reactorClient mode "${params.mode}" needs a local reactor, but none was built`);
106
119
  return params.module;
107
120
  }
108
- /** A Switchboard that cannot answer must not fail boot: list the tab's drives. */
121
+ /**
122
+ * A Switchboard that cannot answer must not fail boot: list the tab's drives.
123
+ *
124
+ * A Switchboard that REFUSES the caller (401/403) must not fail boot either:
125
+ * the refusal is recorded (`backendAuth`) so the root view shows the sign-in
126
+ * gate, and the drive list is empty until the user is someone the backend
127
+ * accepts. A remote-only client has no local drives to fall back on.
128
+ */
109
129
  async function getAppDrives(client, local) {
110
- if (client === local) return getDrives(local);
130
+ if (client === local) try {
131
+ const drives = await getDrives(local);
132
+ setBackendAuth(void 0);
133
+ return drives;
134
+ } catch (error) {
135
+ if (recordBackendAuthError(error, "switchboard")) {
136
+ logger.warn("The Switchboard refused this caller; showing the sign-in gate: @error", error);
137
+ return [];
138
+ }
139
+ throw error;
140
+ }
111
141
  try {
112
- return await getDrives(client);
142
+ const drives = await getDrives(client);
143
+ setBackendAuth(void 0);
144
+ return drives;
113
145
  } catch (error) {
114
- logger.warn("Could not list drives through the router; listing the local reactor's: @error", error);
146
+ if (recordBackendAuthError(error, "switchboard")) logger.warn("A remote backend refused this caller; listing the local reactor's drives: @error", error);
147
+ else logger.warn("Could not list drives through the router; listing the local reactor's: @error", error);
115
148
  return getDrives(local);
116
149
  }
117
150
  }
151
+ /**
152
+ * The boot refresh of the drives store. It lists through `getAppDrives`
153
+ * whichever client is in use, so a Switchboard that refuses the caller is
154
+ * recorded for the sign-in gate here too: the remote-only client is its own
155
+ * `local`, and a bare `refreshReactorDataClient` would let the 401 escape
156
+ * and fail the boot before the gate can render.
157
+ */
118
158
  async function refreshAppDrives(client, local) {
119
- if (client === local) return refreshReactorDataClient(client);
120
159
  setDrives(await getAppDrives(client, local));
121
160
  }
161
+ /**
162
+ * Lists the drives again as the caller the tab now is, through the clients
163
+ * boot left in the store: after a sign-in landing or a sign-out that followed
164
+ * a backend's refusal. Nothing to do before boot has set a client.
165
+ */
166
+ async function relistAppDrives() {
167
+ const client = getFullReactorClient();
168
+ if (!client) return;
169
+ await refreshAppDrives(client, getPHStore()?.reactorClientModule?.client ?? client);
170
+ }
171
+ setDriveRelister(relistAppDrives);
122
172
  async function buildRouter(params) {
123
173
  if (!params.remoteDriveUrl) {
124
174
  logger.warn("multiReactor is on but no remote drive URL is configured; using the local reactor only");
@@ -184,6 +234,6 @@ function loadLocalPackage(source) {
184
234
  return pkg;
185
235
  }
186
236
  //#endregion
187
- export { planReactorClient as a, resolveReactorClientMode as c, isReactorWorkerEnabled as d, resolveReactorWorkerEnabled as f, getAppDrives as i, REACTOR_WORKER_QUERY_KEY as l, getConnectPHStore as n, refreshAppDrives as o, isMultiReactorEnabled as p, createAppReactorClient as r, selectAppReactorClient as s, loadLocalPackage as t, REACTOR_WORKER_STORAGE_KEY as u };
237
+ export { planReactorClient as a, selectAppReactorClient as c, resolveReactorClientMode as d, REACTOR_WORKER_QUERY_KEY as f, isMultiReactorEnabled as g, resolveReactorWorkerEnabled as h, getAppDrives as i, REACTOR_CLIENT_QUERY_KEY as l, isReactorWorkerEnabled as m, getConnectPHStore as n, refreshAppDrives as o, REACTOR_WORKER_STORAGE_KEY as p, createAppReactorClient as r, relistAppDrives as s, loadLocalPackage as t, REACTOR_CLIENT_STORAGE_KEY as u };
188
238
 
189
- //# sourceMappingURL=runtime-D5hpzfgT.js.map
239
+ //# sourceMappingURL=runtime-D20_LlB_.js.map