@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.
- package/dist/backend-auth-gate-DNKg_v4Y.js +65 -0
- package/dist/backend-auth-gate-DNKg_v4Y.js.map +1 -0
- package/dist/backend-auth-gate-DiFpY5rt.d.ts +19 -0
- package/dist/backend-auth-gate-DiFpY5rt.d.ts.map +1 -0
- package/dist/{index-q4bHCPoJ.d.ts → index-BMlma368.d.ts} +30 -7
- package/dist/index-BMlma368.d.ts.map +1 -0
- package/dist/{index-DQ0nbYne.d.ts → index-Beqvfchq.d.ts} +16 -3
- package/dist/index-Beqvfchq.d.ts.map +1 -0
- package/dist/{index-Cm8rYUhs.d.ts → index-Bfl1VYdj.d.ts} +21 -2
- package/dist/index-Bfl1VYdj.d.ts.map +1 -0
- package/dist/index.d.ts +5 -4
- package/dist/index.js +10 -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-CMr7lN40.js} +2 -2
- package/dist/{plugin-host-HhfxwUZN.js.map → plugin-host-CMr7lN40.js.map} +1 -1
- package/dist/{plugin-ui-W0ma6oKJ.js → plugin-ui-DHlnXJmN.js} +3 -3
- package/dist/{plugin-ui-W0ma6oKJ.js.map → plugin-ui-DHlnXJmN.js.map} +1 -1
- package/dist/plugins.js +2 -2
- package/dist/route-tree-D0aszMrk.js.map +1 -1
- package/dist/route-tree.d.ts +16 -16
- package/dist/route-tree.d.ts.map +1 -1
- package/dist/{router-DHL9GT3P.js → router-C4hDJ4_J.js} +10 -4
- package/dist/router-C4hDJ4_J.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-D20_LlB_.js} +64 -14
- package/dist/runtime-D20_LlB_.js.map +1 -0
- package/dist/runtime-config-D3YPhYyj.d.ts.map +1 -1
- package/dist/runtime-config.js +11 -5
- package/dist/runtime-config.js.map +1 -1
- package/dist/{runtime-flag-U8y14Nth.js → runtime-flag-DvxW_SD4.js} +2 -2
- package/dist/{runtime-flag-U8y14Nth.js.map → runtime-flag-DvxW_SD4.js.map} +1 -1
- package/dist/runtime.d.ts +3 -2
- package/dist/runtime.js +5 -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-BtUVboYl.js} +79 -6
- package/dist/views-BtUVboYl.js.map +1 -0
- package/dist/views.d.ts +3 -2
- package/dist/views.js +3 -2
- package/package.json +8 -8
- package/src/router/index.ts +14 -2
- package/src/router/modals.tsx +3 -3
- 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/app-reactor-client.ts +63 -12
- package/src/runtime/backend-auth-gate.ts +57 -0
- package/src/runtime/drive-relist.ts +18 -0
- package/src/runtime/graphql-routable-backend.ts +2 -2
- package/src/runtime/index.ts +8 -1
- package/src/runtime/reactor-client-mode.ts +26 -9
- package/src/runtime/runtime-config.ts +12 -1
- package/src/views/backend-auth-gate.tsx +76 -0
- package/src/views/directory-listing.tsx +2 -2
- package/src/views/editor-host.tsx +3 -3
- package/src/views/index.ts +5 -0
- package/src/views/layout.tsx +6 -2
- package/dist/index-Cm8rYUhs.d.ts.map +0 -1
- package/dist/index-DQ0nbYne.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
- package/dist/views-anOyTI7u.js.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"route-tree-D0aszMrk.js","names":[],"sources":["../src/router/modal-frame.tsx","../src/router/modals.tsx","../src/router/route-tree.ts"],"sourcesContent":["import { closePHModal } from \"@powerhousedao/reactor-browser\";\nimport type { ComponentType, ReactNode } from \"react\";\nimport { createContext, useContext, useEffect, useRef } from \"react\";\n\n/** What a modal frame lays out: the modal's title, its content and its buttons. */\nexport type ModalFrameProps = {\n title: string;\n /** The title element's id, for the dialog's `aria-labelledby`. */\n titleId: string;\n actions: ReactNode;\n children: ReactNode;\n};\n\ndeclare module \"@tanstack/react-router\" {\n interface StaticDataRouteOption {\n /** Frames every core modal while the route matches; the deepest wins. */\n modalFrame?: ComponentType<ModalFrameProps>;\n }\n}\n\nexport const ModalFrameContext = createContext<\n ComponentType<ModalFrameProps> | undefined\n>(undefined);\n\n/** The frame the matched routes set, if any. */\nexport function useModalFrame() {\n return useContext(ModalFrameContext);\n}\n\n/** A modal `<dialog>`: it opens as a modal, and Escape or a click on the\n * backdrop closes the open modal. */\nexport function ModalDialog(props: {\n labelledBy: string;\n className?: string;\n children: ReactNode;\n}) {\n const ref = useRef<HTMLDialogElement>(null);\n useEffect(() => {\n const dialog = ref.current;\n if (dialog && !dialog.open) dialog.showModal();\n }, []);\n return (\n <dialog\n ref={ref}\n aria-labelledby={props.labelledBy}\n onCancel={(event) => {\n event.preventDefault();\n closePHModal();\n }}\n onClick={(event) => {\n if (event.target === event.currentTarget) closePHModal();\n }}\n // Tailwind's reset drops the margin that centres a modal dialog.\n className={props.className ? `m-auto ${props.className}` : \"m-auto\"}\n >\n {props.children}\n </dialog>\n );\n}\n","import type { PHModal } from \"@powerhousedao/reactor-browser\";\nimport { usePHModal } from \"@powerhousedao/reactor-browser\";\nimport { useMatches } from \"@tanstack/react-router\";\nimport type { ComponentType, ErrorInfo, ReactNode } from \"react\";\nimport { Component, createElement, Suspense } from \"react\";\nimport type * as ModalViews from \"../views/modals.js\";\nimport type { ModalFrameProps } from \"./modal-frame.js\";\nimport { ModalFrameContext } from \"./modal-frame.js\";\n\n/** Modal views by modal type. Each reads the open modal with `usePHModal()`. */\nexport type ConnectModals = Partial<Record<PHModal[\"type\"], ComponentType>>;\n\ndeclare module \"@tanstack/react-router\" {\n interface StaticDataRouteOption {\n /** Replaces the host's view of these modals while the route matches. */\n modals?: ConnectModals;\n }\n}\n\n/** Core's modals: the ones editors, drive apps and the reactor open, so every\n * host has them. Each names its view in `@powerhousedao/connect-core/views`. */\nexport const CORE_MODAL_VIEWS = {\n createDocument: \"CreateDocumentModal\",\n login: \"LoginModal\",\n deleteItem: \"DeleteItemModal\",\n confirmDocumentUpgrade: \"ConfirmDocumentUpgradeModal\",\n downloadDocumentWithErrors: \"DownloadDocumentWithErrorsModal\",\n documentVersionUnsupported: \"DocumentVersionUnsupportedModal\",\n driveAuthRequired: \"DriveAuthRequiredModal\",\n} as const satisfies Partial<Record<PHModal[\"type\"], keyof typeof ModalViews>>;\n\ntype BoundaryProps = { modal: string; children: ReactNode };\n\n// A broken modal closes quietly instead of taking the page down; keyed by\n// modal, so the next one gets a fresh try.\nclass ModalErrorBoundary extends Component<BoundaryProps, { failed: boolean }> {\n state = { failed: false };\n\n static getDerivedStateFromError() {\n return { failed: true };\n }\n\n componentDidCatch(error: unknown, info: ErrorInfo) {\n console.error(\n `[connect] the ${this.props.modal} modal failed:`,\n error,\n info,\n );\n }\n\n render() {\n return this.state.failed ? null : this.props.children;\n }\n}\n\n/** The open modal's view: the deepest matched route's `staticData.modals`\n * entry for it, else `modals`', in the deepest `staticData.modalFrame`. */\nexport function ModalOutlet({ modals }: { modals: ConnectModals }) {\n const type = usePHModal()?.type;\n const routed = useMatches({\n select: (matches) =>\n type &&\n matches.reduce<ComponentType | undefined>(\n (found, match) => match.staticData.modals?.[type] ?? found,\n undefined,\n ),\n });\n const frame = useMatches({\n select: (matches) =>\n matches.reduce<ComponentType<ModalFrameProps> | undefined>(\n (found, match) => match.staticData.modalFrame ?? found,\n undefined,\n ),\n });\n const View = routed || (type && modals[type]);\n if (!type || !View) return null;\n return (\n <ModalErrorBoundary key={type} modal={type}>\n <ModalFrameContext.Provider value={frame}>\n <Suspense name=\"Modal\" fallback={null}>\n {/* A registered view, not one made here. */}\n {createElement(View)}\n </Suspense>\n </ModalFrameContext.Provider>\n </ModalErrorBoundary>\n );\n}\n","// The app's route tree: core's own, or a project's generated one when its\n// tsconfig maps this specifier to the tree.\nimport type { AnyRoute } from \"@tanstack/react-router\";\nimport { useRouter } from \"@tanstack/react-router\";\nimport { useSyncExternalStore } from \"react\";\nimport type {\n FileRoutesById,\n routeTree as appRouteTree,\n} from \"@powerhousedao/connect-core/route-tree\";\nimport type {\n ConnectRouteEntry,\n ConnectRouteRegistration,\n} from \"../registry.js\";\nimport {\n getConnectRegistry,\n notifyConnectRegistry,\n subscribeConnectRegistry,\n} from \"../registry.js\";\nimport type { DRIVE_ROUTE_ID, NODE_ROUTE_ID } from \"./route-data.js\";\n\nexport { DRIVE_PENDING_MS } from \"./route-components.js\";\nexport type { ConnectRouteRegistration } from \"../registry.js\";\n\n/** The home route's id; a tree change that moves it is a type error here. */\nexport const HOME_ROUTE_ID = \"/_app/\" satisfies keyof FileRoutesById;\n/** The `_app` layout's id; a project's _app/ routes nest in it. */\nexport const APP_ROUTE_ID = \"/_app\";\nconst SETTINGS_ROUTE_ID = \"/_app/settings\";\n\ntype RouteOptions = { id?: string; path?: string };\n\n// Generated routes carry their full id only once a router initialises them.\nfunction findChild(parent: AnyRoute, idOrPath: string) {\n const children = (parent.children ?? []) as AnyRoute[];\n const child = children.find((route) => {\n const options = route.options as RouteOptions;\n return options.id === idOrPath || options.path === idOrPath;\n });\n if (!child) throw new Error(`Connect's route tree lacks ${idOrPath}`);\n return child;\n}\n\n// Named, so declarations name the tree instead of inlining its type.\nexport type ConnectRootRoute = typeof appRouteTree;\nexport type ConnectRoutes = {\n routeTree: ConnectRootRoute;\n rootRoute: ConnectRootRoute;\n appRoute: FileRoutesById[typeof APP_ROUTE_ID];\n homeRoute: FileRoutesById[typeof HOME_ROUTE_ID];\n /** The drive layout, around the node route. */\n driveRoute: FileRoutesById[typeof DRIVE_ROUTE_ID];\n /** The open folder or document; the drive's root without a node. */\n nodeRoute: FileRoutesById[typeof NODE_ROUTE_ID];\n settingsRoute: FileRoutesById[typeof SETTINGS_ROUTE_ID];\n};\n\n/** Connect's routes in `routeTree`, core's or a project's generated one, which\n * holds the same routes. Deployment routes attach to these. */\nexport function connectRoutes(routeTree: AnyRoute): ConnectRoutes {\n const appRoute = findChild(routeTree, APP_ROUTE_ID);\n const driveRoute = findChild(appRoute, \"/d/$driveSlug\");\n return {\n routeTree: routeTree as ConnectRootRoute,\n rootRoute: routeTree as ConnectRootRoute,\n appRoute: appRoute as ConnectRoutes[\"appRoute\"],\n homeRoute: findChild(appRoute, \"/\") as ConnectRoutes[\"homeRoute\"],\n driveRoute: driveRoute as ConnectRoutes[\"driveRoute\"],\n nodeRoute: findChild(\n driveRoute,\n \"/{-$nodeSlug}\",\n ) as ConnectRoutes[\"nodeRoute\"],\n settingsRoute: findChild(\n appRoute,\n \"/settings\",\n ) as ConnectRoutes[\"settingsRoute\"],\n };\n}\n\n/** Code routes, e.g. `createRoute({ getParentRoute: () => rootRoute })`, join\n * their parent's file routes; an embedding app without the router plugin adds routes so. */\nexport function addConnectRoutes(routes: readonly AnyRoute[]) {\n for (const route of routes) {\n const parent = route.options.getParentRoute() as AnyRoute | undefined;\n if (!parent) throw new Error(\"A Connect route needs getParentRoute\");\n const children = (parent.children ?? []) as AnyRoute[];\n if (children.includes(route)) continue;\n // A project's file route at its path replaces it, as documented: no warning.\n const path = (route.options as RouteOptions).path;\n if (path && children.some((child) => samePath(child, path))) continue;\n parent.addChildren([...children, route]);\n }\n}\n\nconst trimSlashes = (path: string) => path.replace(/^\\/+|\\/+$/g, \"\");\n\nfunction samePath(route: AnyRoute, path: string) {\n const own = (route.options as RouteOptions).path;\n return own !== undefined && trimSlashes(own) === trimSlashes(path);\n}\n\n/** Takes `routes` out of their parents, e.g. when the module that made them is replaced. */\nexport function removeConnectRoutes(routes: readonly AnyRoute[]) {\n for (const route of routes) {\n const parent = route.options.getParentRoute() as AnyRoute | undefined;\n const children = (parent?.children ?? []) as AnyRoute[];\n if (children.includes(route)) {\n parent?.addChildren(children.filter((child) => child !== route));\n }\n }\n}\n\n/** The routes `registration` gives for `tree`'s core routes. */\nexport function resolveConnectRoutes(\n registration: ConnectRouteRegistration,\n tree: AnyRoute,\n): readonly AnyRoute[] {\n return typeof registration === \"function\"\n ? registration(connectRoutes(tree))\n : registration;\n}\n\n/** Adds code routes to the app's router, e.g. a package's settings tab below\n * `settingsRoute`; a running router takes them in. Returns the unregister. */\nexport function registerConnectRoutes(\n registration: ConnectRouteRegistration,\n): () => void {\n const registry = getConnectRegistry();\n const entry: ConnectRouteEntry = { registration, added: [] };\n registry.routes = [...registry.routes, entry];\n const bound = registry.app;\n if (bound) {\n const tree = bound.bundle.router.routeTree;\n entry.added = [...resolveConnectRoutes(registration, tree)];\n addConnectRoutes(entry.added);\n rebuildRoutes(bound.bundle.router);\n }\n return () => {\n registry.routes = registry.routes.filter((other) => other !== entry);\n const router = registry.app?.bundle.router;\n const ids = new Set<string>(entry.added.map((route) => route.id as string));\n const remove = () => {\n // The router reads a cached match's route later; those go with them.\n router?.clearCache({ filter: (match) => ids.has(match.routeId) });\n removeConnectRoutes(entry.added);\n if (router) rebuildRoutes(router);\n };\n // Leaving a route needs it: from one of these, go home before they go.\n const open = router?.state.matches.some((match) => ids.has(match.routeId));\n if (router && open) {\n void router.navigate({ to: \"/\", replace: true }).then(remove);\n } else {\n remove();\n }\n };\n}\n\n/** A file route a package offers to other Connects; `ph build` generates the\n * list from its hosts/connect/routes, parents before children. */\nexport type PackageRoute = {\n route: AnyRoute;\n /** The route's full id, e.g. `/_app/reports`. */\n id: string;\n /** Its path below its parent, e.g. `/reports`; none for a pathless layout. */\n path?: string;\n /** Its parent's full id: a Connect route's, or one of the package's. */\n parentId: string;\n};\n\nconst ROOT_ID = \"__root__\";\n\n// Before a router initialises a tree, its ids are only in the routes' options.\nfunction findRouteById(tree: AnyRoute, id: string): AnyRoute | undefined {\n if (id === ROOT_ID) return tree;\n const walk = (route: AnyRoute, routeId: string): AnyRoute | undefined => {\n for (const child of (route.children ?? []) as AnyRoute[]) {\n const options = child.options as RouteOptions;\n const own = options.id ?? options.path ?? \"\";\n const childId = `${routeId}${own.startsWith(\"/\") ? \"\" : \"/\"}${own}`;\n if (childId === id) return child;\n if (id.startsWith(childId)) {\n const found = walk(child, childId);\n if (found) return found;\n }\n }\n return undefined;\n };\n return walk(tree, \"\");\n}\n\nfunction routeHolds() {\n const registry = getConnectRegistry();\n registry.routeHolds ??= { count: 0, settled: new Set() };\n return registry.routeHolds;\n}\n\n/** Marks routes as still loading, e.g. a package's; unknown paths wait for\n * them before showing not found. Returns the release. */\nexport function holdConnectRoutes() {\n const holds = routeHolds();\n holds.count++;\n let released = false;\n return () => {\n if (released) return;\n released = true;\n holds.count--;\n if (holds.count > 0) return;\n for (const settle of holds.settled) settle();\n holds.settled.clear();\n };\n}\n\n/** Resolves once no routes are loading, or after `timeoutMs`. */\nexport function connectRoutesSettled(timeoutMs = 10_000) {\n const holds = routeHolds();\n if (holds.count === 0) return Promise.resolve();\n return new Promise<void>((resolve) => {\n const settle = () => {\n clearTimeout(timer);\n holds.settled.delete(settle);\n resolve();\n };\n const timer = setTimeout(settle, timeoutMs);\n holds.settled.add(settle);\n });\n}\n\n/** Adds a package's file routes below the app's routes with the same ids; a\n * route whose id the app already serves is skipped. Returns the unregister. */\nexport function registerPackageRoutes(routes: readonly PackageRoute[]) {\n return registerConnectRoutes(({ routeTree }) => {\n const own = new Map<string, AnyRoute>();\n for (const entry of routes) {\n const parent =\n own.get(entry.parentId) ?? findRouteById(routeTree, entry.parentId);\n if (!parent) {\n console.warn(\n `[connect] no route \"${entry.parentId}\" for \"${entry.id}\"`,\n );\n continue;\n }\n if (findRouteById(routeTree, entry.id)) {\n console.warn(\n `[connect] a route already serves \"${entry.id}\"; skipping`,\n );\n continue;\n }\n const relativeId = entry.path ?? entry.id.slice(entry.parentId.length);\n entry.route.update({\n id: relativeId,\n path: entry.path,\n getParentRoute: () => parent,\n } as never);\n own.set(entry.id, entry.route);\n }\n return [...own.values()];\n });\n}\n\ntype RebuildableRouter = {\n buildRouteTree(): unknown;\n setRoutes(caches: never): void;\n invalidate(): Promise<unknown>;\n};\n\nfunction rebuildRoutes(router: RebuildableRouter) {\n router.setRoutes(router.buildRouteTree() as never);\n void router.invalidate();\n // For views that list routes, e.g. the nav and the settings tabs.\n notifyConnectRegistry();\n}\n\n/** The router's routes by id, read again when routes are added or removed. */\nexport function useRoutesById() {\n const router = useRouter();\n const routesById = () => router.routesById;\n // The server snapshot too: the loading shell is prerendered.\n return useSyncExternalStore(subscribeConnectRegistry, routesById, routesById);\n}\n"],"mappings":";;;;;;AAoBA,MAAa,oBAAoB,cAE/B,KAAA,CAAS;;AAGX,SAAgB,gBAAgB;CAC9B,OAAO,WAAW,iBAAiB;AACrC;;;AAIA,SAAgB,YAAY,OAIzB;CACD,MAAM,MAAM,OAA0B,IAAI;CAC1C,gBAAgB;EACd,MAAM,SAAS,IAAI;EACnB,IAAI,UAAU,CAAC,OAAO,MAAM,OAAO,UAAU;CAC/C,GAAG,CAAC,CAAC;CACL,OACE,oBAAC,UAAD;EACO;EACL,mBAAiB,MAAM;EACvB,WAAW,UAAU;GACnB,MAAM,eAAe;GACrB,aAAa;EACf;EACA,UAAU,UAAU;GAClB,IAAI,MAAM,WAAW,MAAM,eAAe,aAAa;EACzD;EAEA,WAAW,MAAM,YAAY,UAAU,MAAM,cAAc;EAE1D,UAAA,MAAM;CACD,CAAA;AAEZ;;;;;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AQ,MAAM,GAAG,MAAM,MAAM,SAAS,MAAM;GACrE,MAAM,MAAM,OAAO;IACjB,IAAI;IACJ,MAAM,MAAM;IACZ,sBAAsB;GACxB,CAAU;GACV,IAAI,IAAI,MAAM,IAAI,MAAM,KAAK;EAC/B;EACA,OAAO,CAAC,GAAG,IAAI,OAAO,CAAC;CACzB,CAAC;AACH;AAQA,SAAS,cAAc,QAA2B;CAChD,OAAO,UAAU,OAAO,eAAe,CAAU;CACjD,OAAY,WAAW;CAEvB,sBAAsB;AACxB;;AAGA,SAAgB,gBAAgB;CAC9B,MAAM,SAAS,UAAU;CACzB,MAAM,mBAAmB,OAAO;CAEhC,OAAO,qBAAqB,0BAA0B,YAAY,UAAU;AAC9E"}
|
|
1
|
+
{"version":3,"file":"route-tree-D0aszMrk.js","names":[],"sources":["../src/router/modal-frame.tsx","../src/router/modals.tsx","../src/router/route-tree.ts"],"sourcesContent":["import { closePHModal } from \"@powerhousedao/reactor-browser\";\nimport type { ComponentType, ReactNode } from \"react\";\nimport { createContext, useContext, useEffect, useRef } from \"react\";\n\n/** What a modal frame lays out: the modal's title, its content and its buttons. */\nexport type ModalFrameProps = {\n title: string;\n /** The title element's id, for the dialog's `aria-labelledby`. */\n titleId: string;\n actions: ReactNode;\n children: ReactNode;\n};\n\ndeclare module \"@tanstack/react-router\" {\n interface StaticDataRouteOption {\n /** Frames every core modal while the route matches; the deepest wins. */\n modalFrame?: ComponentType<ModalFrameProps>;\n }\n}\n\nexport const ModalFrameContext = createContext<\n ComponentType<ModalFrameProps> | undefined\n>(undefined);\n\n/** The frame the matched routes set, if any. */\nexport function useModalFrame() {\n return useContext(ModalFrameContext);\n}\n\n/** A modal `<dialog>`: it opens as a modal, and Escape or a click on the\n * backdrop closes the open modal. */\nexport function ModalDialog(props: {\n labelledBy: string;\n className?: string;\n children: ReactNode;\n}) {\n const ref = useRef<HTMLDialogElement>(null);\n useEffect(() => {\n const dialog = ref.current;\n if (dialog && !dialog.open) dialog.showModal();\n }, []);\n return (\n <dialog\n ref={ref}\n aria-labelledby={props.labelledBy}\n onCancel={(event) => {\n event.preventDefault();\n closePHModal();\n }}\n onClick={(event) => {\n if (event.target === event.currentTarget) closePHModal();\n }}\n // Tailwind's reset drops the margin that centres a modal dialog.\n className={props.className ? `m-auto ${props.className}` : \"m-auto\"}\n >\n {props.children}\n </dialog>\n );\n}\n","import type { PHModal } from \"@powerhousedao/reactor-browser\";\nimport { usePHModal } from \"@powerhousedao/reactor-browser\";\nimport { useMatches } from \"@tanstack/react-router\";\nimport type { ComponentType, ErrorInfo, ReactNode } from \"react\";\nimport { Component, createElement, Suspense } from \"react\";\nimport type * as ModalViews from \"../views/modals.js\";\nimport type { ModalFrameProps } from \"./modal-frame.js\";\nimport { ModalFrameContext } from \"./modal-frame.js\";\n\n/** Modal views by modal type. Each reads the open modal with `usePHModal()`. */\nexport type ConnectModals = Partial<Record<PHModal[\"type\"], ComponentType>>;\n\ndeclare module \"@tanstack/react-router\" {\n interface StaticDataRouteOption {\n /** Replaces the host's view of these modals while the route matches. */\n modals?: ConnectModals;\n }\n}\n\n/** Core's modals: the ones editors, drive apps and the reactor open, so every\n * host has them. Each names its view in `@powerhousedao/connect-core/views`. */\nexport const CORE_MODAL_VIEWS = {\n createDocument: \"CreateDocumentModal\",\n login: \"LoginModal\",\n deleteItem: \"DeleteItemModal\",\n confirmDocumentUpgrade: \"ConfirmDocumentUpgradeModal\",\n downloadDocumentWithErrors: \"DownloadDocumentWithErrorsModal\",\n documentVersionUnsupported: \"DocumentVersionUnsupportedModal\",\n driveAuthRequired: \"DriveAuthRequiredModal\",\n} as const satisfies Partial<Record<PHModal[\"type\"], keyof typeof ModalViews>>;\n\ntype BoundaryProps = { modal: string; children: ReactNode };\n\n// A broken modal closes quietly instead of taking the page down; keyed by\n// modal, so the next one gets a fresh try.\nclass ModalErrorBoundary extends Component<BoundaryProps, { failed: boolean }> {\n override state = { failed: false };\n\n static getDerivedStateFromError() {\n return { failed: true };\n }\n\n override componentDidCatch(error: unknown, info: ErrorInfo) {\n console.error(\n `[connect] the ${this.props.modal} modal failed:`,\n error,\n info,\n );\n }\n\n override render() {\n return this.state.failed ? null : this.props.children;\n }\n}\n\n/** The open modal's view: the deepest matched route's `staticData.modals`\n * entry for it, else `modals`', in the deepest `staticData.modalFrame`. */\nexport function ModalOutlet({ modals }: { modals: ConnectModals }) {\n const type = usePHModal()?.type;\n const routed = useMatches({\n select: (matches) =>\n type &&\n matches.reduce<ComponentType | undefined>(\n (found, match) => match.staticData.modals?.[type] ?? found,\n undefined,\n ),\n });\n const frame = useMatches({\n select: (matches) =>\n matches.reduce<ComponentType<ModalFrameProps> | undefined>(\n (found, match) => match.staticData.modalFrame ?? found,\n undefined,\n ),\n });\n const View = routed || (type && modals[type]);\n if (!type || !View) return null;\n return (\n <ModalErrorBoundary key={type} modal={type}>\n <ModalFrameContext.Provider value={frame}>\n <Suspense name=\"Modal\" fallback={null}>\n {/* A registered view, not one made here. */}\n {createElement(View)}\n </Suspense>\n </ModalFrameContext.Provider>\n </ModalErrorBoundary>\n );\n}\n","// The app's route tree: core's own, or a project's generated one when its\n// tsconfig maps this specifier to the tree.\nimport type { AnyRoute } from \"@tanstack/react-router\";\nimport { useRouter } from \"@tanstack/react-router\";\nimport { useSyncExternalStore } from \"react\";\nimport type {\n FileRoutesById,\n routeTree as appRouteTree,\n} from \"@powerhousedao/connect-core/route-tree\";\nimport type {\n ConnectRouteEntry,\n ConnectRouteRegistration,\n} from \"../registry.js\";\nimport {\n getConnectRegistry,\n notifyConnectRegistry,\n subscribeConnectRegistry,\n} from \"../registry.js\";\nimport type { DRIVE_ROUTE_ID, NODE_ROUTE_ID } from \"./route-data.js\";\n\nexport { DRIVE_PENDING_MS } from \"./route-components.js\";\nexport type { ConnectRouteRegistration } from \"../registry.js\";\n\n/** The home route's id; a tree change that moves it is a type error here. */\nexport const HOME_ROUTE_ID = \"/_app/\" satisfies keyof FileRoutesById;\n/** The `_app` layout's id; a project's _app/ routes nest in it. */\nexport const APP_ROUTE_ID = \"/_app\";\nconst SETTINGS_ROUTE_ID = \"/_app/settings\";\n\ntype RouteOptions = { id?: string; path?: string };\n\n// Generated routes carry their full id only once a router initialises them.\nfunction findChild(parent: AnyRoute, idOrPath: string) {\n const children = (parent.children ?? []) as AnyRoute[];\n const child = children.find((route) => {\n const options = route.options as RouteOptions;\n return options.id === idOrPath || options.path === idOrPath;\n });\n if (!child) throw new Error(`Connect's route tree lacks ${idOrPath}`);\n return child;\n}\n\n// Named, so declarations name the tree instead of inlining its type.\nexport type ConnectRootRoute = typeof appRouteTree;\nexport type ConnectRoutes = {\n routeTree: ConnectRootRoute;\n rootRoute: ConnectRootRoute;\n appRoute: FileRoutesById[typeof APP_ROUTE_ID];\n homeRoute: FileRoutesById[typeof HOME_ROUTE_ID];\n /** The drive layout, around the node route. */\n driveRoute: FileRoutesById[typeof DRIVE_ROUTE_ID];\n /** The open folder or document; the drive's root without a node. */\n nodeRoute: FileRoutesById[typeof NODE_ROUTE_ID];\n settingsRoute: FileRoutesById[typeof SETTINGS_ROUTE_ID];\n};\n\n/** Connect's routes in `routeTree`, core's or a project's generated one, which\n * holds the same routes. Deployment routes attach to these. */\nexport function connectRoutes(routeTree: AnyRoute): ConnectRoutes {\n const appRoute = findChild(routeTree, APP_ROUTE_ID);\n const driveRoute = findChild(appRoute, \"/d/$driveSlug\");\n return {\n routeTree: routeTree as ConnectRootRoute,\n rootRoute: routeTree as ConnectRootRoute,\n appRoute: appRoute as ConnectRoutes[\"appRoute\"],\n homeRoute: findChild(appRoute, \"/\") as ConnectRoutes[\"homeRoute\"],\n driveRoute: driveRoute as ConnectRoutes[\"driveRoute\"],\n nodeRoute: findChild(\n driveRoute,\n \"/{-$nodeSlug}\",\n ) as ConnectRoutes[\"nodeRoute\"],\n settingsRoute: findChild(\n appRoute,\n \"/settings\",\n ) as ConnectRoutes[\"settingsRoute\"],\n };\n}\n\n/** Code routes, e.g. `createRoute({ getParentRoute: () => rootRoute })`, join\n * their parent's file routes; an embedding app without the router plugin adds routes so. */\nexport function addConnectRoutes(routes: readonly AnyRoute[]) {\n for (const route of routes) {\n const parent = route.options.getParentRoute() as AnyRoute | undefined;\n if (!parent) throw new Error(\"A Connect route needs getParentRoute\");\n const children = (parent.children ?? []) as AnyRoute[];\n if (children.includes(route)) continue;\n // A project's file route at its path replaces it, as documented: no warning.\n const path = (route.options as RouteOptions).path;\n if (path && children.some((child) => samePath(child, path))) continue;\n parent.addChildren([...children, route]);\n }\n}\n\nconst trimSlashes = (path: string) => path.replace(/^\\/+|\\/+$/g, \"\");\n\nfunction samePath(route: AnyRoute, path: string) {\n const own = (route.options as RouteOptions).path;\n return own !== undefined && trimSlashes(own) === trimSlashes(path);\n}\n\n/** Takes `routes` out of their parents, e.g. when the module that made them is replaced. */\nexport function removeConnectRoutes(routes: readonly AnyRoute[]) {\n for (const route of routes) {\n const parent = route.options.getParentRoute() as AnyRoute | undefined;\n const children = (parent?.children ?? []) as AnyRoute[];\n if (children.includes(route)) {\n parent?.addChildren(children.filter((child) => child !== route));\n }\n }\n}\n\n/** The routes `registration` gives for `tree`'s core routes. */\nexport function resolveConnectRoutes(\n registration: ConnectRouteRegistration,\n tree: AnyRoute,\n): readonly AnyRoute[] {\n return typeof registration === \"function\"\n ? registration(connectRoutes(tree))\n : registration;\n}\n\n/** Adds code routes to the app's router, e.g. a package's settings tab below\n * `settingsRoute`; a running router takes them in. Returns the unregister. */\nexport function registerConnectRoutes(\n registration: ConnectRouteRegistration,\n): () => void {\n const registry = getConnectRegistry();\n const entry: ConnectRouteEntry = { registration, added: [] };\n registry.routes = [...registry.routes, entry];\n const bound = registry.app;\n if (bound) {\n const tree = bound.bundle.router.routeTree;\n entry.added = [...resolveConnectRoutes(registration, tree)];\n addConnectRoutes(entry.added);\n rebuildRoutes(bound.bundle.router);\n }\n return () => {\n registry.routes = registry.routes.filter((other) => other !== entry);\n const router = registry.app?.bundle.router;\n const ids = new Set<string>(entry.added.map((route) => route.id as string));\n const remove = () => {\n // The router reads a cached match's route later; those go with them.\n router?.clearCache({ filter: (match) => ids.has(match.routeId) });\n removeConnectRoutes(entry.added);\n if (router) rebuildRoutes(router);\n };\n // Leaving a route needs it: from one of these, go home before they go.\n const open = router?.state.matches.some((match) => ids.has(match.routeId));\n if (router && open) {\n void router.navigate({ to: \"/\", replace: true }).then(remove);\n } else {\n remove();\n }\n };\n}\n\n/** A file route a package offers to other Connects; `ph build` generates the\n * list from its hosts/connect/routes, parents before children. */\nexport type PackageRoute = {\n route: AnyRoute;\n /** The route's full id, e.g. `/_app/reports`. */\n id: string;\n /** Its path below its parent, e.g. `/reports`; none for a pathless layout. */\n path?: string;\n /** Its parent's full id: a Connect route's, or one of the package's. */\n parentId: string;\n};\n\nconst ROOT_ID = \"__root__\";\n\n// Before a router initialises a tree, its ids are only in the routes' options.\nfunction findRouteById(tree: AnyRoute, id: string): AnyRoute | undefined {\n if (id === ROOT_ID) return tree;\n const walk = (route: AnyRoute, routeId: string): AnyRoute | undefined => {\n for (const child of (route.children ?? []) as AnyRoute[]) {\n const options = child.options as RouteOptions;\n const own = options.id ?? options.path ?? \"\";\n const childId = `${routeId}${own.startsWith(\"/\") ? \"\" : \"/\"}${own}`;\n if (childId === id) return child;\n if (id.startsWith(childId)) {\n const found = walk(child, childId);\n if (found) return found;\n }\n }\n return undefined;\n };\n return walk(tree, \"\");\n}\n\nfunction routeHolds() {\n const registry = getConnectRegistry();\n registry.routeHolds ??= { count: 0, settled: new Set() };\n return registry.routeHolds;\n}\n\n/** Marks routes as still loading, e.g. a package's; unknown paths wait for\n * them before showing not found. Returns the release. */\nexport function holdConnectRoutes() {\n const holds = routeHolds();\n holds.count++;\n let released = false;\n return () => {\n if (released) return;\n released = true;\n holds.count--;\n if (holds.count > 0) return;\n for (const settle of holds.settled) settle();\n holds.settled.clear();\n };\n}\n\n/** Resolves once no routes are loading, or after `timeoutMs`. */\nexport function connectRoutesSettled(timeoutMs = 10_000) {\n const holds = routeHolds();\n if (holds.count === 0) return Promise.resolve();\n return new Promise<void>((resolve) => {\n const settle = () => {\n clearTimeout(timer);\n holds.settled.delete(settle);\n resolve();\n };\n const timer = setTimeout(settle, timeoutMs);\n holds.settled.add(settle);\n });\n}\n\n/** Adds a package's file routes below the app's routes with the same ids; a\n * route whose id the app already serves is skipped. Returns the unregister. */\nexport function registerPackageRoutes(routes: readonly PackageRoute[]) {\n return registerConnectRoutes(({ routeTree }) => {\n const own = new Map<string, AnyRoute>();\n for (const entry of routes) {\n const parent =\n own.get(entry.parentId) ?? findRouteById(routeTree, entry.parentId);\n if (!parent) {\n console.warn(\n `[connect] no route \"${entry.parentId}\" for \"${entry.id}\"`,\n );\n continue;\n }\n if (findRouteById(routeTree, entry.id)) {\n console.warn(\n `[connect] a route already serves \"${entry.id}\"; skipping`,\n );\n continue;\n }\n const relativeId = entry.path ?? entry.id.slice(entry.parentId.length);\n entry.route.update({\n id: relativeId,\n path: entry.path,\n getParentRoute: () => parent,\n } as never);\n own.set(entry.id, entry.route);\n }\n return [...own.values()];\n });\n}\n\ntype RebuildableRouter = {\n buildRouteTree(): unknown;\n setRoutes(caches: never): void;\n invalidate(): Promise<unknown>;\n};\n\nfunction rebuildRoutes(router: RebuildableRouter) {\n router.setRoutes(router.buildRouteTree() as never);\n void router.invalidate();\n // For views that list routes, e.g. the nav and the settings tabs.\n notifyConnectRegistry();\n}\n\n/** The router's routes by id, read again when routes are added or removed. */\nexport function useRoutesById() {\n const router = useRouter();\n const routesById = () => router.routesById;\n // The server snapshot too: the loading shell is prerendered.\n return useSyncExternalStore(subscribeConnectRegistry, routesById, routesById);\n}\n"],"mappings":";;;;;;AAoBA,MAAa,oBAAoB,cAE/B,KAAA,CAAS;;AAGX,SAAgB,gBAAgB;CAC9B,OAAO,WAAW,iBAAiB;AACrC;;;AAIA,SAAgB,YAAY,OAIzB;CACD,MAAM,MAAM,OAA0B,IAAI;CAC1C,gBAAgB;EACd,MAAM,SAAS,IAAI;EACnB,IAAI,UAAU,CAAC,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AS,QAAQ;GAC1B,MAAM,SACJ,IAAI,IAAI,MAAM,QAAQ,KAAK,cAAc,WAAW,MAAM,QAAQ;GACpE,IAAI,CAAC,QAAQ;IACX,QAAQ,KACN,uBAAuB,MAAM,SAAS,SAAS,MAAM,GAAG,EAC1D;IACA;GACF;GACA,IAAI,cAAc,WAAW,MAAM,EAAE,GAAG;IACtC,QAAQ,KACN,qCAAqC,MAAM,GAAG,YAChD;IACA;GACF;GACA,MAAM,aAAa,MAAM,QAAQ,MAAM,GAAG,MAAM,MAAM,SAAS,MAAM;GACrE,MAAM,MAAM,OAAO;IACjB,IAAI;IACJ,MAAM,MAAM;IACZ,sBAAsB;GACxB,CAAU;GACV,IAAI,IAAI,MAAM,IAAI,MAAM,KAAK;EAC/B;EACA,OAAO,CAAC,GAAG,IAAI,OAAO,CAAC;CACzB,CAAC;AACH;AAQA,SAAS,cAAc,QAA2B;CAChD,OAAO,UAAU,OAAO,eAAe,CAAU;CACjD,OAAY,WAAW;CAEvB,sBAAsB;AACxB;;AAGA,SAAgB,gBAAgB;CAC9B,MAAM,SAAS,UAAU;CACzB,MAAM,mBAAmB,OAAO;CAEhC,OAAO,qBAAqB,0BAA0B,YAAY,UAAU;AAC9E"}
|
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,oCAAA,mJAAA,mBAAA,4IAAA,oBAAA;cAKb,eAAa,uCAAA,UAAA,uCAAA,2CAAA,2CAAA,WAAA,QAAA,4BAAA,oCAAA,mJAAA,mBAAA,gJAAA,qBAAA,4CAAA;cAKb,kBAAgB,uCAAA,UAAA,uCAAA,2CAAA,2CAAA,WAAA,QAAA,4BAAA,oCAAA,mJAAA,mBAAA,4KAAA,4BAAA,wBAAA;cAKhB,2DAAkB,UAAA,uCAAA,2CAAA,2CAAA,WAAA,QAAA,4BAAA,oCAAA,mJAAA,mBAAA,4LAAA,kBAAA;qBAAA;;;;;cAKlB,4BAA0B,uCAAA,UAAA,uCAAA,UAAA,u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;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-DHlnXJmN.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-C4hDJ4_J.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"router-C4hDJ4_J.js","names":[],"sources":["../src/router/perf-marks.ts","../src/router/scroll.ts","../src/router/search.ts","../src/router/navigation.ts","../src/router/connect-router.ts","../src/router/app-router.ts","../src/router/core-app.tsx","../src/router/route-options.ts"],"sourcesContent":["import type { AnyRouter } from \"@tanstack/react-router\";\n\n/** `localStorage[PERF_STORAGE_KEY] = \"1\"` or `?perf=1` turns the marks on in production. */\nexport const PERF_STORAGE_KEY = \"ph:perf\";\n\n/** The measures each navigation writes, as the bench reads them. */\nexport const ROUTER_MEASURES = {\n /** `navigation.open` to the router starting the navigation. */\n click: \"nav click\",\n /** Route loaders, until the router commits the matches. */\n loader: \"nav loader\",\n /** The commit until React has rendered it. */\n commit: \"nav commit\",\n /** The click (or the navigation's start) to the next frame after render. */\n total: \"nav total\",\n} as const;\n\n// Chrome's Performance panel shows these as \"Connect › Router\".\nconst DETAIL = {\n devtools: { dataType: \"track-entry\", track: \"Router\", trackGroup: \"Connect\" },\n} as const;\n\nlet marking = 0;\nlet clickedAt: number | undefined;\n\n/** On in dev builds; elsewhere only with the runtime flag. */\nexport function routerPerfEnabled(dev = !!import.meta.env?.DEV) {\n if (dev) return true;\n try {\n return (\n new URLSearchParams(location.search).get(\"perf\") === \"1\" ||\n localStorage.getItem(PERF_STORAGE_KEY) === \"1\"\n );\n } catch {\n return false;\n }\n}\n\n/** Marks a navigation's click; a no-op unless a router is being marked. */\nexport function markNavigationClick() {\n if (!marking) return;\n clickedAt = performance.now();\n performance.mark(\"nav:click\", { detail: DETAIL });\n}\n\nfunction measure(name: string, start: number | undefined, end: number) {\n if (start === undefined) return;\n performance.measure(name, { start, end, detail: DETAIL });\n}\n\n/** Writes each navigation's phases as performance measures; returns the unsubscribe. */\nexport function markRouterNavigations(\n router: Pick<AnyRouter, \"subscribe\">,\n enabled = routerPerfEnabled(),\n) {\n if (!enabled) return () => {};\n marking++;\n let generation = 0;\n let clicked: number | undefined;\n let navigated: number | undefined;\n let loading: number | undefined;\n let loaded: number | undefined;\n const unsubscribes = [\n router.subscribe(\"onBeforeNavigate\", () => {\n generation++;\n navigated = performance.now();\n clicked = clickedAt;\n clickedAt = undefined;\n measure(ROUTER_MEASURES.click, clicked, navigated);\n loading = loaded = undefined;\n }),\n router.subscribe(\"onBeforeLoad\", () => {\n loading = performance.now();\n }),\n router.subscribe(\"onLoad\", () => {\n loaded = performance.now();\n measure(ROUTER_MEASURES.loader, loading, loaded);\n }),\n router.subscribe(\"onRendered\", () => {\n measure(ROUTER_MEASURES.commit, loaded, performance.now());\n const current = generation;\n const start = clicked ?? navigated;\n // The frame after render, as close to paint as a script sees.\n requestAnimationFrame(() =>\n setTimeout(() => {\n if (current === generation) {\n measure(ROUTER_MEASURES.total, start, performance.now());\n }\n }),\n );\n }),\n ];\n return () => {\n marking--;\n for (const unsubscribe of unsubscribes) unsubscribe();\n };\n}\n","import type {\n AnyRouter,\n ParsedLocation,\n RouterHistory,\n} from \"@tanstack/react-router\";\n\ntype ScrollRouter = Pick<AnyRouter, \"subscribe\" | \"_scroll\" | \"options\"> & {\n history: RouterHistory;\n};\n\nconst TRAVERSALS = new Set([\"BACK\", \"FORWARD\", \"GO\"]);\nconst traversals = new WeakMap<object, { traversal: boolean }>();\n\n/** The router's `scrollRestoration`: on for back/forward only; other\n * navigations reset the content view in `bindConnectScroll`. */\nexport function connectScrollRestoration() {\n // The first load restores a reloaded page's scroll.\n const state = { traversal: true };\n const restore = ({ location }: { location: ParsedLocation }) =>\n state.traversal || !!location.hash;\n traversals.set(restore, state);\n return restore;\n}\n\n/** Tracks history actions, and resets a scrolled content view on new views. */\nexport function bindConnectScroll(router: ScrollRouter, contentViewId: string) {\n const state = traversals.get(router.options.scrollRestoration as object);\n if (!state) return () => {};\n const unsubscribeHistory = router.history.subscribe(({ action }) => {\n state.traversal = TRAVERSALS.has(action.type);\n });\n if (typeof document === \"undefined\") return unsubscribeHistory;\n\n // Read in the scroll event, where layout is clean, not at navigation.\n let scrolledView: Element | undefined;\n let windowScrolled = false;\n const onScroll = (event: Event) => {\n const target = event.target;\n if (target === document) {\n windowScrolled = window.scrollY > 0 || window.scrollX > 0;\n } else if (target instanceof Element && target.id === contentViewId) {\n scrolledView = target.scrollTop > 0 ? target : undefined;\n }\n };\n document.addEventListener(\"scroll\", onScroll, {\n capture: true,\n passive: true,\n });\n\n let resetScroll = true;\n const unsubscribes = [\n unsubscribeHistory,\n // The navigation's `resetScroll`, before the router clears it on render.\n router.subscribe(\"onBeforeRouteMount\", () => {\n resetScroll = router._scroll.n;\n }),\n router.subscribe(\"onRendered\", ({ toLocation }) => {\n if (state.traversal || toLocation.hash || !resetScroll) return;\n if (scrolledView?.isConnected) scrolledView.scrollTo(0, 0);\n if (windowScrolled) window.scrollTo(0, 0);\n scrolledView = undefined;\n windowScrolled = false;\n }),\n ];\n return () => {\n document.removeEventListener(\"scroll\", onScroll, { capture: true });\n for (const unsubscribe of unsubscribes) unsubscribe();\n };\n}\n","import {\n FEATURE_FLAG_PARAM_PREFIX,\n GLOBAL_SEARCH_PARAMS,\n parseRevisionHistoryPage,\n REVISION_HISTORY_PAGE_PARAM,\n REVISION_HISTORY_PARAM,\n searchParamsToString,\n} from \"@powerhousedao/reactor-browser\";\nimport type { SearchMiddleware } from \"@tanstack/react-router\";\nimport { retainSearchParams } from \"@tanstack/react-router\";\n\n// Shared with reactor-browser's fallback navigation.\nexport { FEATURE_FLAG_PARAM_PREFIX, GLOBAL_SEARCH_PARAMS };\n\n/** Connect's query params: plain strings, as in the URL. */\nexport type ConnectSearch = Record<string, string | undefined>;\n\nconst retainFeatureFlags: SearchMiddleware<ConnectSearch> = ({\n search,\n next,\n}) => {\n const result = { ...next(search) };\n for (const [key, value] of Object.entries(search)) {\n if (key.startsWith(FEATURE_FLAG_PARAM_PREFIX) && !(key in result)) {\n result[key] = value;\n }\n }\n return result;\n};\n\n/** The root route's middlewares; they apply to every navigation and redirect. */\nexport const connectSearchMiddlewares: SearchMiddleware<ConnectSearch>[] = [\n retainSearchParams<ConnectSearch>([...GLOBAL_SEARCH_PARAMS]),\n retainFeatureFlags,\n];\n\n/** Lets every param through; routes add none of their own. */\nexport function validateConnectSearch(\n search: Record<string, unknown>,\n): ConnectSearch {\n return search as ConnectSearch;\n}\n\n/** Parses a query string into plain string values, unlike the JSON default. */\nexport function parseConnectSearch(searchStr: string): ConnectSearch {\n return Object.fromEntries(new URLSearchParams(searchStr));\n}\n\n/** Writes plain `key=value` pairs, so other readers of the URL see strings. */\nexport function stringifyConnectSearch(search: Record<string, unknown>) {\n const params = new URLSearchParams();\n for (const [key, value] of Object.entries(search)) {\n if (value === undefined || value === null) continue;\n params.set(key, typeof value === \"string\" ? value : JSON.stringify(value));\n }\n const searchStr = searchParamsToString(params);\n return searchStr ? `?${searchStr}` : \"\";\n}\n\n/** The drive route's params: `?history` opens the document's revision history,\n * and `historyPage` (a positive integer; 1 is dropped) pages it. */\nexport function validateDriveSearch(\n search: Record<string, unknown>,\n): ConnectSearch {\n const result = { ...search } as ConnectSearch;\n if (result[REVISION_HISTORY_PARAM] === undefined) return result;\n result[REVISION_HISTORY_PARAM] = \"\";\n const page = parseRevisionHistoryPage(result[REVISION_HISTORY_PAGE_PARAM]);\n if (page > 1) result[REVISION_HISTORY_PAGE_PARAM] = String(page);\n // Undefined, not deleted: a route's search is merged over its parent's.\n else result[REVISION_HISTORY_PAGE_PARAM] = undefined;\n return result;\n}\n\n/** The defined values of `search`, for callers that take plain records. */\nexport function definedSearch(search: object): Record<string, string> {\n const record: Record<string, string> = {};\n for (const [key, value] of Object.entries(search)) {\n if (typeof value === \"string\") record[key] = value;\n else if (value !== undefined && value !== null) {\n record[key] = JSON.stringify(value);\n }\n }\n return record;\n}\n","import type {\n PHDriveTarget,\n PHNavigation,\n PHNavigationTarget,\n PHSettingsTarget,\n SetSearchParams,\n} from \"@powerhousedao/reactor-browser\";\nimport {\n applySearchUpdate,\n findDriveBySlugOrId,\n isSettingsTarget,\n makeDriveSlug,\n OPENED_FROM_STATE_KEY,\n openedFromIndex,\n resolveSearchUpdate,\n} from \"@powerhousedao/reactor-browser\";\nimport type {\n AnyRouter,\n HistoryState,\n MakeRouteMatchUnion,\n} from \"@tanstack/react-router\";\nimport { useRouterState } from \"@tanstack/react-router\";\nimport { useMemo } from \"react\";\nimport type { ConnectRouterBundle } from \"./connect-router.js\";\nimport { markNavigationClick } from \"./perf-marks.js\";\nimport { definedSearch } from \"./search.js\";\nimport { keepOpenedFrom, settingsTabs } from \"./settings.js\";\n\n// Hover intent: a pointer passing over cards doesn't preload each of them.\nconst PRELOAD_DELAY_MS = 50;\n\n/** The PH navigation backed by `router`; its hooks take the router directly,\n * so they work outside the RouterProvider. */\nexport function createConnectNavigation(\n connectRouter: ConnectRouterBundle,\n): PHNavigation & { dispose(): void } {\n const { router, homeRoute, nodeRoute, settingsRoute } = connectRouter;\n // Settings tabs can come from a project's routes, unknown to Connect's types.\n const anyRouter = router as unknown as AnyRouter;\n\n // A listed drive is addressed by its canonical slug, whatever form came in.\n const driveParams = (target: PHDriveTarget) => {\n const drive = findDriveBySlugOrId(\n router.options.context.store,\n target.driveSlug,\n );\n return {\n driveSlug: drive ? makeDriveSlug(drive) : target.driveSlug,\n nodeSlug: target.nodeSlug || undefined,\n };\n };\n\n // `true` is the first tab, so the URL names a tab without a redirect.\n const settingsPath = ({ settings }: PHSettingsTarget) => {\n const tab =\n settings === true ? settingsTabs(anyRouter).at(0)?.id : settings;\n return tab ? `${settingsRoute.fullPath}/${tab}` : settingsRoute.fullPath;\n };\n\n // In-document writes keep the entry's state, so its opened-from index too.\n const setSearch: PHNavigation[\"setSearch\"] = (update, options) => {\n void router.navigate({\n to: \".\",\n search: (prev) => applySearchUpdate({}, update(definedSearch(prev))),\n state: true,\n replace: options?.replace,\n resetScroll: false,\n });\n };\n\n const showsSettings = () =>\n router.state.matches.some((match) => match.routeId === settingsRoute.id);\n\n // A push remembers the entry it leaves; a replace keeps what that one had,\n // as does a move between settings tabs.\n const openedFromState = (\n replace: boolean | undefined,\n target: PHNavigationTarget | undefined,\n ) => {\n const { state } = router.history.location;\n const next =\n replace || (isSettingsTarget(target) && showsSettings())\n ? keepOpenedFrom(state)\n : ({\n [OPENED_FROM_STATE_KEY]: state.__TSR_index,\n } as unknown as HistoryState);\n return () => next;\n };\n\n const targetKey = (target: PHNavigationTarget | undefined) => {\n if (!target) return homeRoute.id;\n if (isSettingsTarget(target)) return settingsPath(target);\n const { driveSlug, nodeSlug } = driveParams(target);\n return JSON.stringify([driveSlug, nodeSlug ?? \"\"]);\n };\n let keyedMatches: readonly MakeRouteMatchUnion[] | undefined;\n let matchesKey: string | undefined;\n const currentKey = (matches: readonly MakeRouteMatchUnion[]) => {\n if (matches === keyedMatches) return matchesKey;\n keyedMatches = matches;\n const drive = matches.find((match) => match.routeId === nodeRoute.id);\n const settings = matches.some(\n (match) => match.routeId === settingsRoute.id,\n );\n if (drive) {\n matchesKey = targetKey(drive.params as PHDriveTarget);\n } else if (settings) {\n // A tab's key is its path, as settingsPath builds it.\n matchesKey = matches.at(-1)?.fullPath.replace(/\\/$/, \"\");\n } else {\n matchesKey = matches.find(\n (match) => match.routeId === homeRoute.id,\n )?.routeId;\n }\n return matchesKey;\n };\n\n // Hrefs depend only on the target and the global params of the current search.\n const hrefs = new Map<string, string>();\n let hrefsSearch: string | undefined;\n\n const setSearchParams: SetSearchParams = (update, options) =>\n setSearch((prev) => resolveSearchUpdate(prev, update), options);\n\n let preloadTimer: ReturnType<typeof setTimeout> | undefined;\n return {\n location: () => router.history.location,\n // The root route's middlewares add the global params to `search`.\n open: (target, options) => {\n markNavigationClick();\n const search = applySearchUpdate({}, options?.search ?? {});\n const replace = options?.replace;\n const state = openedFromState(replace, target);\n if (!target) {\n void router.navigate({\n to: homeRoute.fullPath,\n search,\n replace,\n state,\n });\n return;\n }\n if (isSettingsTarget(target)) {\n void anyRouter.navigate({\n to: settingsPath(target),\n search,\n replace,\n state,\n });\n return;\n }\n void router.navigate({\n to: nodeRoute.fullPath,\n params: driveParams(target),\n search,\n replace,\n state,\n });\n },\n // The public href, base path included; global params as `open` keeps them.\n hrefFor: (target) => {\n const { searchStr } = router.latestLocation;\n if (searchStr !== hrefsSearch) {\n hrefs.clear();\n hrefsSearch = searchStr;\n }\n const key = targetKey(target);\n let href = hrefs.get(key);\n if (href === undefined) {\n const location = !target\n ? router.buildLocation({ to: homeRoute.fullPath, search: {} })\n : isSettingsTarget(target)\n ? anyRouter.buildLocation({ to: settingsPath(target), search: {} })\n : router.buildLocation({\n to: nodeRoute.fullPath,\n params: driveParams(target),\n search: {},\n });\n href = location.publicHref;\n hrefs.set(key, href);\n }\n return href;\n },\n // One key per shown matches, so each link's selector is a string compare.\n useIsCurrent: (target) => {\n // The settings page itself is current on any of its tabs.\n const anyTab = isSettingsTarget(target) && target.settings === true;\n const key = anyTab ? `${settingsRoute.fullPath}/` : targetKey(target);\n return useRouterState({\n router,\n select: (state) => {\n const current = currentKey(state.matches);\n return anyTab ? !!current?.startsWith(key) : current === key;\n },\n });\n },\n preload: (target) => {\n clearTimeout(preloadTimer);\n if (!target) return;\n preloadTimer = setTimeout(() => {\n const preloading = isSettingsTarget(target)\n ? anyRouter.preloadRoute({ to: settingsPath(target) })\n : router.preloadRoute({\n to: nodeRoute.fullPath,\n params: driveParams(target),\n });\n preloading.catch(() => undefined);\n }, PRELOAD_DELAY_MS);\n },\n setSearch,\n // The presented matches' params, else the location's.\n useSearchParams() {\n const search = useRouterState({\n router,\n select: (state) =>\n state.matches.at(-1)?.search ?? state.location.search,\n });\n return useMemo(() => definedSearch(search), [search]);\n },\n useSetSearchParams: () => setSearchParams,\n closeOpened: () => {\n const { state } = router.history.location;\n const from = openedFromIndex(state, state.__TSR_index);\n if (from === undefined) return false;\n router.history.go(from - state.__TSR_index);\n return true;\n },\n dispose: () => clearTimeout(preloadTimer),\n };\n}\n","import type { DriveArrivals, PHStore } from \"@powerhousedao/reactor-browser\";\nimport {\n getPHStoreSubscribe,\n isRoutedModal,\n modalFromSearch,\n} from \"@powerhousedao/reactor-browser\";\nimport type {\n AnyRoute,\n ErrorRouteComponent,\n NotFoundRouteComponent,\n RouteComponent,\n Router,\n RouterHistory,\n} from \"@tanstack/react-router\";\nimport { createRouter } from \"@tanstack/react-router\";\nimport type { ErrorInfo, PropsWithChildren, ReactElement } from \"react\";\nimport type { ConnectPluginUiSet } from \"../plugins/plugin-ui.js\";\nimport { applyConnectPluginUi } from \"../plugins/plugin-ui.js\";\nimport { markRouterNavigations } from \"./perf-marks.js\";\nimport { bindConnectScroll, connectScrollRestoration } from \"./scroll.js\";\nimport type { DriveRouteData } from \"./drive-route-loader.js\";\nimport type { ConnectRootRoute, ConnectRoutes } from \"./route-tree.js\";\nimport { createConnectNavigation } from \"./navigation.js\";\nimport { CoreError, CoreNotFound } from \"./core-views.js\";\nimport { CONTENT_VIEW_ID } from \"./route-components.js\";\nimport { addConnectRoutes, connectRoutes } from \"./route-tree.js\";\nimport { setSettingsRoute } from \"./settings.js\";\nimport { parseConnectSearch, stringifyConnectSearch } from \"./search.js\";\nimport { driveTitle } from \"./titles.js\";\n\nexport type ConnectRouterOptions = {\n store: PHStore;\n arrivals?: DriveArrivals;\n basepath?: string;\n history?: RouterHistory;\n InnerWrap?: (props: PropsWithChildren) => ReactElement;\n /** Shown while a route's loader or chunks are pending, after the router's `pendingMs`. */\n pendingComponent?: RouteComponent;\n /** Any route's loader or render error; the plugins', else core's error view. */\n errorComponent?: ErrorRouteComponent;\n /** The active plugins' UI, set on the routes that show core's views. */\n pluginUi?: ConnectPluginUiSet;\n /** Loaders' notFound(), e.g. a missing drive's; core's page by default. */\n notFoundComponent?: NotFoundRouteComponent;\n /** The tree to route with: `@powerhousedao/connect/route-tree`, core's or a project's. */\n routeTree: AnyRoute;\n /** Code routes added to the file routes; see `addConnectRoutes`. A function\n * receives the tree's core routes to attach to. */\n routes?:\n | readonly AnyRoute[]\n | ((routes: ConnectRoutes) => readonly AnyRoute[]);\n /** Reports a route's loader or render error; logged by default. */\n onCatch?: (error: unknown, info?: ErrorInfo) => void;\n /** Ends every document title; \"Connect\" without one. */\n appName?: string;\n /** Renders the loading shell: layouts show their pendingComponent, not their page. */\n shell?: boolean;\n};\n\nfunction reportRouteError(error: unknown, info?: ErrorInfo) {\n console.error(error, info?.componentStack ?? \"\");\n}\n\n/** The router over `TRouteTree`; a project's generated tree registers its own. */\nexport type ConnectRouterFor<TRouteTree extends AnyRoute> = Router<\n TRouteTree,\n \"never\",\n false,\n RouterHistory,\n Record<string, any>\n>;\n// Written out, not inferred; see ConnectRootRoute.\nexport type ConnectRouter = ConnectRouterFor<ConnectRootRoute>;\nexport type ConnectRouterBundle = Pick<\n ConnectRoutes,\n \"homeRoute\" | \"driveRoute\" | \"nodeRoute\" | \"settingsRoute\"\n> & { router: ConnectRouter };\n\nexport function createConnectRouter(\n options: ConnectRouterOptions,\n): ConnectRouterBundle {\n const { routeTree, homeRoute, driveRoute, nodeRoute, settingsRoute } =\n connectRoutes(options.routeTree);\n if (options.pluginUi) applyConnectPluginUi(routeTree, options.pluginUi);\n if (options.routes) {\n addConnectRoutes(\n typeof options.routes === \"function\"\n ? options.routes(connectRoutes(routeTree))\n : options.routes,\n );\n }\n setSettingsRoute(settingsRoute);\n const router = createRouter({\n routeTree,\n basepath: options.basepath,\n history: options.history,\n context: {\n store: options.store,\n arrivals: options.arrivals,\n appName: options.appName,\n shell: options.shell,\n },\n parseSearch: parseConnectSearch,\n stringifySearch: stringifyConnectSearch,\n scrollRestoration: connectScrollRestoration(),\n scrollToTopSelectors: [`#${CONTENT_VIEW_ID}`],\n InnerWrap: options.InnerWrap,\n defaultPendingComponent: options.pendingComponent,\n defaultErrorComponent:\n options.errorComponent ?? options.pluginUi?.errorComponent ?? CoreError,\n // Not per route: a route's notFoundComponent mounts a boundary that\n // re-renders on every navigation.\n defaultNotFoundComponent: options.notFoundComponent ?? CoreNotFound,\n defaultOnCatch: options.onCatch ?? reportRouteError,\n });\n return { router, homeRoute, driveRoute, nodeRoute, settingsRoute };\n}\n\nfunction writeSelection(store: PHStore, data: DriveRouteData | undefined) {\n // Drive first: a new drive resets the node.\n store.selectedDriveId = data?.driveId;\n store.selectedNodeId = data?.nodeId;\n}\n\n/** Makes `router` the store's navigation and writes the selection it commits. */\nexport function bindConnectRouter(\n connectRouter: ConnectRouterBundle,\n store: PHStore,\n) {\n const { router, nodeRoute } = connectRouter;\n\n // Only committed matches select; pending ones keep the open view.\n const commitSelection = () => {\n const matches = router.state.matches;\n const drive = matches.find((match) => match.routeId === nodeRoute.id);\n if (drive) {\n if (drive.status === \"success\" && drive.loaderData) {\n writeSelection(store, drive.loaderData);\n } else if (matches.some((match) => match.status === \"notFound\")) {\n // The drive's 404 page shows no drive.\n writeSelection(store, undefined);\n }\n return;\n }\n // Any other page (home, settings, a project's, a 404) shows no drive.\n const shown = matches.at(-1)?.status;\n if (shown === \"success\" || shown === \"notFound\") {\n writeSelection(store, undefined);\n }\n };\n\n // A routed modal is the URL's: the store holds what the location names,\n // unless a confirmation is open over it.\n const syncModal = () => {\n const routed = modalFromSearch(router.state.location.search);\n if (store.modal && !isRoutedModal(store.modal)) return;\n if (routed) {\n if (JSON.stringify(store.modal) !== JSON.stringify(routed)) {\n store.modal = routed;\n }\n } else if (isRoutedModal(store.modal)) {\n store.modal = undefined;\n }\n };\n\n // Set once, before the first render; selection setters navigate from the start.\n const navigation = createConnectNavigation(connectRouter);\n store.navigation = navigation;\n\n // The node route's head reads names from the store; a rename re-runs it.\n const shownTitle = () => {\n const node = router.state.matches.find((m) => m.routeId === nodeRoute.id);\n return driveTitle(store, node?.loaderData, router.options.context.appName);\n };\n let title = shownTitle();\n const retitle = () => {\n const next = shownTitle();\n if (next === title) return;\n title = next;\n void router.invalidate({ filter: (m) => m.routeId === nodeRoute.id });\n };\n\n // Before mount, so the view and scroll restoration see the new selection.\n const unsubscribes = [\n router.subscribe(\"onBeforeRouteMount\", commitSelection),\n router.subscribe(\"onResolved\", commitSelection),\n router.subscribe(\"onResolved\", () => {\n title = shownTitle();\n }),\n router.subscribe(\"onResolved\", syncModal),\n getPHStoreSubscribe(store, \"drives\")(retitle),\n getPHStoreSubscribe(store, \"driveNodes\")(retitle),\n markRouterNavigations(router),\n ];\n const unbindScroll = bindConnectScroll(router, CONTENT_VIEW_ID);\n commitSelection();\n syncModal();\n\n return () => {\n navigation.dispose();\n unbindScroll();\n for (const unsubscribe of unsubscribes) unsubscribe();\n if (store.navigation === navigation) store.navigation = undefined;\n };\n}\n","import type { PHStore } from \"@powerhousedao/reactor-browser\";\nimport { createDriveArrivals } from \"@powerhousedao/reactor-browser\";\nimport { getConnectPluginUi } from \"../plugins/plugin-ui.js\";\nimport { getConnectRegistry } from \"../registry.js\";\nimport type {\n ConnectRouterBundle,\n ConnectRouterOptions,\n} from \"./connect-router.js\";\nimport { bindConnectRouter, createConnectRouter } from \"./connect-router.js\";\nimport { resolveConnectRoutes } from \"./route-tree.js\";\n\nexport type ConnectAppRouterOptions = Omit<\n ConnectRouterOptions,\n \"store\" | \"arrivals\"\n>;\n\n/** The app's one router over `store`; created, and made the store's navigation,\n * on first use. Registered routes join `options.routes`. */\nexport function getConnectAppRouter(\n store: PHStore,\n options: () => ConnectAppRouterOptions,\n): ConnectRouterBundle {\n const registry = getConnectRegistry();\n const current = registry.app;\n if (current) {\n if (import.meta.env?.DEV && current.store !== store) {\n throw new Error(\"Connect's router is already bound to another PH store\");\n }\n return current.bundle;\n }\n const { routes, ...rest } = options();\n const bundle = createConnectRouter({\n store,\n arrivals: createDriveArrivals(store),\n pluginUi: getConnectPluginUi(),\n ...rest,\n routes: (tree) => [\n ...(routes ? resolveConnectRoutes(routes, tree.routeTree) : []),\n ...registry.routes.flatMap((entry) => {\n entry.added = [\n ...resolveConnectRoutes(entry.registration, tree.routeTree),\n ];\n return entry.added;\n }),\n ],\n });\n registry.app = { store, bundle, unbind: bindConnectRouter(bundle, store) };\n return bundle;\n}\n\n/** Stops the app's router writing the selection, e.g. on HMR. */\nexport function disposeConnectAppRouter() {\n const registry = getConnectRegistry();\n registry.app?.unbind();\n registry.app = undefined;\n}\n","import type { PHStore } from \"@powerhousedao/reactor-browser\";\nimport { PHStoreProvider } from \"@powerhousedao/reactor-browser\";\nimport type { AnyRoute } from \"@tanstack/react-router\";\nimport { RouterProvider } from \"@tanstack/react-router\";\nimport type { ConnectAppRouterOptions } from \"./app-router.js\";\nimport { getConnectAppRouter } from \"./app-router.js\";\n\n/** A core-only app: `routeTree`'s views over `store`. */\nexport function ConnectCoreApp(props: {\n store: PHStore;\n routeTree: AnyRoute;\n basepath?: string;\n options?: () => Omit<ConnectAppRouterOptions, \"routeTree\">;\n}) {\n const { router } = getConnectAppRouter(props.store, () => ({\n basepath: props.basepath,\n ...props.options?.(),\n routeTree: props.routeTree,\n }));\n return (\n <PHStoreProvider store={props.store}>\n <RouterProvider router={router} />\n </PHStoreProvider>\n );\n}\n","import type { AnyRoute } from \"@tanstack/react-router\";\n\ntype RouteOptionKey = keyof AnyRoute[\"options\"];\n\n/** A core route's `options`: what it sets, as it sets it, and every other\n * route option, unset. */\nexport type CoreRouteOptions<T extends object> = T & {\n [K in Exclude<RouteOptionKey, keyof T>]?: undefined;\n};\n\n/** Types a core route file's exported `options` as {@link CoreRouteOptions}. */\nexport function coreRouteOptions<T extends object>(\n options: T,\n): CoreRouteOptions<T> {\n return options as CoreRouteOptions<T>;\n}\n"],"mappings":";;;;;;;;;;AAGA,MAAa,mBAAmB;;AAGhC,MAAa,kBAAkB;;CAE7B,OAAO;;CAEP,QAAQ;;CAER,QAAQ;;CAER,OAAO;AACT;AAGA,MAAM,SAAS,EACb,UAAU;CAAE,UAAU;CAAe,OAAO;CAAU,YAAY;AAAU,EAC9E;AAEA,IAAI,UAAU;AACd,IAAI;;AAGJ,SAAgB,kBAAkB,MAAM,CAAC,CAAC,YAAY,KAAK,KAAK;CAC9D,IAAI,KAAK,OAAO;CAChB,IAAI;EACF,OACE,IAAI,gBAAgB,SAAS,MAAM,CAAC,CAAC,IAAI,MAAM,MAAM,OACrD,aAAa,QAAA,SAAwB,MAAM;CAE/C,QAAQ;EACN,OAAO;CACT;AACF;;AAGA,SAAgB,sBAAsB;CACpC,IAAI,CAAC,SAAS;CACd,YAAY,YAAY,IAAI;CAC5B,YAAY,KAAK,aAAa,EAAE,QAAQ,OAAO,CAAC;AAClD;AAEA,SAAS,QAAQ,MAAc,OAA2B,KAAa;CACrE,IAAI,UAAU,KAAA,GAAW;CACzB,YAAY,QAAQ,MAAM;EAAE;EAAO;EAAK,QAAQ;CAAO,CAAC;AAC1D;;AAGA,SAAgB,sBACd,QACA,UAAU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AM,EAAE,QAAQ,GAAG,SAAS,QAAQ;CACpC,MAAM,SAAS,oBAAoB;EACjC;EACA,UAAU,oBAAoB,KAAK;EACnC,UAAU,mBAAmB;EAC7B,GAAG;EACH,SAAS,SAAS,CAChB,GAAI,SAAS,qBAAqB,QAAQ,KAAK,SAAS,IAAI,CAAC,GAC7D,GAAG,SAAS,OAAO,SAAS,UAAU;GACpC,MAAM,QAAQ,CACZ,GAAG,qBAAqB,MAAM,cAAc,KAAK,SAAS,CAC5D;GACA,OAAO,MAAM;EACf,CAAC,CACH;CACF,CAAC;CACD,SAAS,MAAM;EAAE;EAAO;EAAQ,QAAQ,kBAAkB,QAAQ,KAAK;CAAE;CACzE,OAAO;AACT;;AAGA,SAAgB,0BAA0B;CACxC,MAAM,WAAW,mBAAmB;CACpC,SAAS,KAAK,OAAO;CACrB,SAAS,MAAM,KAAA;AACjB;;;;AC/CA,SAAgB,eAAe,OAK5B;CACD,MAAM,EAAE,WAAW,oBAAoB,MAAM,cAAc;EACzD,UAAU,MAAM;EAChB,GAAG,MAAM,UAAU;EACnB,WAAW,MAAM;CACnB,EAAE;CACF,OACE,oBAAC,iBAAD;EAAiB,OAAO,MAAM;EAC5B,UAAA,oBAAC,gBAAD,EAAwB,OAAS,CAAA;CAClB,CAAA;AAErB;;;;ACbA,SAAgB,iBACd,SACqB;CACrB,OAAO;AACT"}
|
package/dist/router.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { A as useDriveRouteData, C as holdConnectRoutes, D as DRIVE_ROUTE_ID, E as removeConnectRoutes, F as DriveRouteData, I as DriveRouteParams, J as ConnectModals, L as isDriveNotFound, M as ConnectRouterContext, N as DriveLoaderOptions, O as DriveRouteView, P as DriveNotFoundData, R as loadDrive, S as connectRoutesSettled, T as registerPackageRoutes, Y as ModalOutlet, _ as ConnectRoutes, a as bindConnectRouter, b as addConnectRoutes, g as ConnectRootRoute, h as APP_ROUTE_ID, i as ConnectRouterOptions, j as useDriveRouteIds, k as NODE_ROUTE_ID, m as ConnectRouteRegistration, n as ConnectRouterBundle, o as createConnectRouter, q as CORE_MODAL_VIEWS, r as ConnectRouterFor, t as ConnectRouter, v as HOME_ROUTE_ID, w as registerConnectRoutes, x as connectRoutes, y as PackageRoute, z as loadNode } from "./connect-router-11uRIT3z.js";
|
|
2
2
|
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";
|
|
3
|
-
import { $ as
|
|
4
|
-
export { APP_ROUTE_ID, CONTENT_VIEW_ID, CORE_MODAL_VIEWS, type ConnectAppRouterOptions, ConnectCoreApp, type ConnectModals, type ConnectNavItem, type ConnectRootRoute, type ConnectRouteRegistration, type ConnectRouter, type ConnectRouterBundle, type ConnectRouterContext, type ConnectRouterFor, type ConnectRouterOptions, type ConnectRoutes, type ConnectSearch, type ConnectSettingsTab, ContentOutlet, CoreError, CoreNotFound, type CreateDocumentTarget, DRIVE_PENDING_MS, DRIVE_ROUTE_ID, type DocumentViewProps, type DriveLoaderOptions, type DriveNotFoundData, DrivePending, type DriveRouteData, type DriveRouteParams, type DriveRouteView, type DriveViewProps, FEATURE_FLAG_PARAM_PREFIX, GLOBAL_SEARCH_PARAMS, HOME_ROUTE_ID, ModalDialog, type ModalFrameProps, ModalOutlet, NODE_ROUTE_ID, type NavRouteEntry, PERF_STORAGE_KEY, type PackageRoute, ROUTER_MEASURES, SETTINGS_ROUTE_ID, type SettingsTabEntry, type SidebarMode, addConnectRoutes, appTitle, bindConnectRouter, bindConnectScroll, connectRoutes, connectRoutesSettled, connectScrollRestoration, connectSearchMiddlewares, coreModals, coreView, createConnectNavigation, createConnectRouter, definedSearch, disposeConnectAppRouter, driveTitle, getConnectAppRouter, holdConnectRoutes, isCoreView, isDriveNotFound, keepOpenedFrom, loadDrive, loadNode, markNavigationClick, markRouterNavigations, navRoutes, notFoundTitle, parseConnectSearch, redirectToSettingsTab, registerConnectRoutes, registerPackageRoutes, removeConnectRoutes, routerPerfEnabled, setSettingsRoute, settingsTabs, settingsTabsOf, settingsTitle, showsSettingsTab, stringifyConnectSearch, useCreateDocumentTarget, useDriveRouteData, useDriveRouteIds, useForgetSettingsOpenedFrom, useIsColdStart, useModalFrame, useNavRoutes, useSettingsTabs, useSidebarMode, validateConnectSearch, validateDriveSearch };
|
|
3
|
+
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";
|
|
4
|
+
export { APP_ROUTE_ID, CONTENT_VIEW_ID, CORE_MODAL_VIEWS, type ConnectAppRouterOptions, type ConnectChrome, ConnectCoreApp, type ConnectModals, type ConnectNavItem, type ConnectRootRoute, type ConnectRouteRegistration, type ConnectRouter, type ConnectRouterBundle, type ConnectRouterContext, type ConnectRouterFor, type ConnectRouterOptions, type ConnectRoutes, type ConnectSearch, type ConnectSettingsTab, ContentOutlet, CoreError, CoreNotFound, type CoreRouteOptions, type CreateDocumentTarget, DRIVE_PENDING_MS, DRIVE_ROUTE_ID, type DocumentViewProps, type DriveLoaderOptions, type DriveNotFoundData, DrivePending, type DriveRouteData, type DriveRouteParams, type DriveRouteView, type DriveViewProps, FEATURE_FLAG_PARAM_PREFIX, GLOBAL_SEARCH_PARAMS, HOME_ROUTE_ID, ModalDialog, type ModalFrameProps, ModalOutlet, NODE_ROUTE_ID, type NavRouteEntry, PERF_STORAGE_KEY, type PackageRoute, ROUTER_MEASURES, SETTINGS_ROUTE_ID, type SettingsTabEntry, type SidebarMode, addConnectRoutes, appTitle, bindConnectRouter, bindConnectScroll, connectRoutes, connectRoutesSettled, connectScrollRestoration, connectSearchMiddlewares, coreModals, coreRouteOptions, coreView, createConnectNavigation, createConnectRouter, definedSearch, disposeConnectAppRouter, driveTitle, getConnectAppRouter, holdConnectRoutes, isCoreView, isDriveNotFound, keepOpenedFrom, loadDrive, loadNode, markNavigationClick, markRouterNavigations, navRoutes, notFoundTitle, parseConnectSearch, redirectToSettingsTab, registerConnectRoutes, registerPackageRoutes, removeConnectRoutes, routerPerfEnabled, setSettingsRoute, settingsTabs, settingsTabsOf, settingsTitle, showsSettingsTab, stringifyConnectSearch, useConnectChrome, useCreateDocumentTarget, useDriveRouteData, useDriveRouteIds, useForgetSettingsOpenedFrom, useIsColdStart, useModalFrame, useNavRoutes, useSettingsTabs, useSidebarMode, validateConnectSearch, validateDriveSearch };
|
|
5
5
|
export {};
|
package/dist/router.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { c as CoreNotFound, d as isCoreView, f as isDriveNotFound, l as coreModals, m as loadNode, p as loadDrive, s as CoreError, u as coreView } from "./plugin-ui-
|
|
1
|
+
import { c as CoreNotFound, d as isCoreView, f as isDriveNotFound, l as coreModals, m as loadNode, p as loadDrive, s as CoreError, u as coreView } from "./plugin-ui-DHlnXJmN.js";
|
|
2
2
|
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";
|
|
3
|
-
import { C as
|
|
4
|
-
import { _ as
|
|
5
|
-
export { APP_ROUTE_ID, CONTENT_VIEW_ID, CORE_MODAL_VIEWS, ConnectCoreApp, ContentOutlet, CoreError, CoreNotFound, DRIVE_PENDING_MS, DRIVE_ROUTE_ID, DrivePending, FEATURE_FLAG_PARAM_PREFIX, GLOBAL_SEARCH_PARAMS, HOME_ROUTE_ID, ModalDialog, ModalOutlet, NODE_ROUTE_ID, PERF_STORAGE_KEY, ROUTER_MEASURES, SETTINGS_ROUTE_ID, addConnectRoutes, appTitle, bindConnectRouter, bindConnectScroll, connectRoutes, connectRoutesSettled, connectScrollRestoration, connectSearchMiddlewares, coreModals, coreView, createConnectNavigation, createConnectRouter, definedSearch, disposeConnectAppRouter, driveTitle, getConnectAppRouter, holdConnectRoutes, isCoreView, isDriveNotFound, keepOpenedFrom, loadDrive, loadNode, markNavigationClick, markRouterNavigations, navRoutes, notFoundTitle, parseConnectSearch, redirectToSettingsTab, registerConnectRoutes, registerPackageRoutes, removeConnectRoutes, routerPerfEnabled, setSettingsRoute, settingsTabs, settingsTabsOf, settingsTitle, showsSettingsTab, stringifyConnectSearch, useCreateDocumentTarget, useDriveRouteData, useDriveRouteIds, useForgetSettingsOpenedFrom, useIsColdStart, useModalFrame, useNavRoutes, useSettingsTabs, useSidebarMode, validateConnectSearch, validateDriveSearch };
|
|
3
|
+
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";
|
|
4
|
+
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-C4hDJ4_J.js";
|
|
5
|
+
export { APP_ROUTE_ID, CONTENT_VIEW_ID, CORE_MODAL_VIEWS, ConnectCoreApp, ContentOutlet, CoreError, CoreNotFound, DRIVE_PENDING_MS, DRIVE_ROUTE_ID, DrivePending, FEATURE_FLAG_PARAM_PREFIX, GLOBAL_SEARCH_PARAMS, HOME_ROUTE_ID, ModalDialog, ModalOutlet, NODE_ROUTE_ID, PERF_STORAGE_KEY, ROUTER_MEASURES, SETTINGS_ROUTE_ID, addConnectRoutes, appTitle, bindConnectRouter, bindConnectScroll, connectRoutes, connectRoutesSettled, connectScrollRestoration, connectSearchMiddlewares, coreModals, coreRouteOptions, coreView, createConnectNavigation, createConnectRouter, definedSearch, disposeConnectAppRouter, driveTitle, getConnectAppRouter, holdConnectRoutes, isCoreView, isDriveNotFound, keepOpenedFrom, loadDrive, loadNode, markNavigationClick, markRouterNavigations, navRoutes, notFoundTitle, parseConnectSearch, redirectToSettingsTab, registerConnectRoutes, registerPackageRoutes, removeConnectRoutes, routerPerfEnabled, setSettingsRoute, settingsTabs, settingsTabsOf, settingsTitle, showsSettingsTab, stringifyConnectSearch, useConnectChrome, useCreateDocumentTarget, useDriveRouteData, useDriveRouteIds, useForgetSettingsOpenedFrom, useIsColdStart, useModalFrame, useNavRoutes, useSettingsTabs, useSidebarMode, validateConnectSearch, validateDriveSearch };
|
package/dist/routes/__root.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { ConnectRouterContext } from "@powerhousedao/connect-core/router";
|
|
2
2
|
//#region src/routes/__root.d.ts
|
|
3
3
|
/** The root's options: search params and the app's title. */
|
|
4
|
-
export declare const options: {
|
|
4
|
+
export declare const options: import("@powerhousedao/connect-core/router").CoreRouteOptions<{
|
|
5
5
|
validateSearch: (search: Record<string, unknown>) => Record<string, string | undefined>;
|
|
6
6
|
search: {
|
|
7
7
|
middlewares: import("@tanstack/react-router").SearchMiddleware<import("@powerhousedao/connect-core/router").ConnectSearch>[];
|
|
@@ -18,8 +18,8 @@ export declare const options: {
|
|
|
18
18
|
title: string;
|
|
19
19
|
}[];
|
|
20
20
|
};
|
|
21
|
-
}
|
|
22
|
-
export declare const Route: import("@tanstack/react-router").RootRoute<import("@tanstack/react-router").Register, (search: Record<string, unknown>) => Record<string, string | undefined>, ConnectRouterContext,
|
|
21
|
+
}>;
|
|
22
|
+
export declare const Route: 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>;
|
|
23
23
|
//#endregion
|
|
24
24
|
export {};
|
|
25
25
|
//# sourceMappingURL=__root.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"__root.d.ts","names":[],"sources":["../../src/routes/__root.tsx"],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"__root.d.ts","names":[],"sources":["../../src/routes/__root.tsx"],"mappings":";;;qBAca,sDAAO;EAGO,iBAAA,QAAA,4BACU;;IACzB,8CAAW,8DAAA;;EAKlB,SAAA,OAAA;IACD;MAAS,SAAS;;IAClB;MAAoB;;;;;;;;qBAaX,wCAAK,2CAAA,WAAA,QAtBS,4BACU,oCAAkC"}
|
package/dist/routes/__root.js
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { createRootRouteWithContext } from "@tanstack/react-router";
|
|
2
|
-
import { appTitle, connectSearchMiddlewares, coreView, notFoundTitle, validateConnectSearch } from "@powerhousedao/connect-core/router";
|
|
2
|
+
import { appTitle, connectSearchMiddlewares, coreRouteOptions, coreView, notFoundTitle, validateConnectSearch } from "@powerhousedao/connect-core/router";
|
|
3
3
|
//#region src/routes/__root.tsx
|
|
4
4
|
/** The root's options: search params and the app's title. */
|
|
5
|
-
const options = {
|
|
5
|
+
const options = coreRouteOptions({
|
|
6
6
|
validateSearch: (search) => validateConnectSearch(search),
|
|
7
7
|
search: { middlewares: connectSearchMiddlewares },
|
|
8
8
|
head: ({ match, matches }) => ({ meta: [{ title: matches.some((m) => m.status === "notFound") ? notFoundTitle(match.context.appName) : appTitle(match.context.appName) }] })
|
|
9
|
-
};
|
|
9
|
+
});
|
|
10
10
|
const Route = createRootRouteWithContext()({
|
|
11
11
|
...options,
|
|
12
12
|
component: coreView("CoreRoot")
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"__root.js","names":[],"sources":["../../src/routes/__root.tsx"],"sourcesContent":["import { createRootRouteWithContext } from \"@tanstack/react-router\";\n// By package name: a project's build shares the module Connect uses, and its\n// declarations can name the types.\nimport type { ConnectRouterContext } from \"@powerhousedao/connect-core/router\";\nimport {\n appTitle,\n connectSearchMiddlewares,\n coreView,\n notFoundTitle,\n validateConnectSearch,\n} from \"@powerhousedao/connect-core/router\";\n\n/** The root's options: search params and the app's title. */\nexport const options = {\n // Passes every param through; only the global ones outlive a navigation.\n // Inline type: project declaration emit can't name this module's types.\n validateSearch: (search: Record<string, unknown>) =>\n validateConnectSearch(search) as Record<string, string | undefined>,\n search: { middlewares: connectSearchMiddlewares },\n // Child routes' titles replace this one; a notFound() skips the heads below it.\n head: ({\n match,\n matches,\n }: {\n match: { context: ConnectRouterContext };\n matches: readonly { status: string }[];\n }) => ({\n meta: [\n {\n title: matches.some((m) => m.status === \"notFound\")\n ? notFoundTitle(match.context.appName)\n : appTitle(match.context.appName),\n },\n ],\n }),\n};\n\n// The page in the theme, with the matched routes' head.\nexport const Route = createRootRouteWithContext<ConnectRouterContext>()({\n ...options,\n component: coreView(\"CoreRoot\"),\n});\n"],"mappings":";;;;
|
|
1
|
+
{"version":3,"file":"__root.js","names":[],"sources":["../../src/routes/__root.tsx"],"sourcesContent":["import { createRootRouteWithContext } from \"@tanstack/react-router\";\n// By package name: a project's build shares the module Connect uses, and its\n// declarations can name the types.\nimport type { ConnectRouterContext } from \"@powerhousedao/connect-core/router\";\nimport {\n appTitle,\n connectSearchMiddlewares,\n coreRouteOptions,\n coreView,\n notFoundTitle,\n validateConnectSearch,\n} from \"@powerhousedao/connect-core/router\";\n\n/** The root's options: search params and the app's title. */\nexport const options = coreRouteOptions({\n // Passes every param through; only the global ones outlive a navigation.\n // Inline type: project declaration emit can't name this module's types.\n validateSearch: (search: Record<string, unknown>) =>\n validateConnectSearch(search) as Record<string, string | undefined>,\n search: { middlewares: connectSearchMiddlewares },\n // Child routes' titles replace this one; a notFound() skips the heads below it.\n head: ({\n match,\n matches,\n }: {\n match: { context: ConnectRouterContext };\n matches: readonly { status: string }[];\n }) => ({\n meta: [\n {\n title: matches.some((m) => m.status === \"notFound\")\n ? notFoundTitle(match.context.appName)\n : appTitle(match.context.appName),\n },\n ],\n }),\n});\n\n// The page in the theme, with the matched routes' head.\nexport const Route = createRootRouteWithContext<ConnectRouterContext>()({\n ...options,\n component: coreView(\"CoreRoot\"),\n});\n"],"mappings":";;;;AAcA,MAAa,UAAU,iBAAiB;CAGtC,iBAAiB,WACf,sBAAsB,MAAM;CAC9B,QAAQ,EAAE,aAAa,yBAAyB;CAEhD,OAAO,EACL,OACA,eAIK,EACL,MAAM,CACJ,EACE,OAAO,QAAQ,MAAM,MAAM,EAAE,WAAW,UAAU,IAC9C,cAAc,MAAM,QAAQ,OAAO,IACnC,SAAS,MAAM,QAAQ,OAAO,EACpC,CACF,EACF;AACF,CAAC;AAGD,MAAa,QAAQ,2BAAiD,CAAC,CAAC;CACtE,GAAG;CACH,WAAW,SAAS,UAAU;AAChC,CAAC"}
|
package/dist/routes/_app/$.d.ts
CHANGED
|
@@ -2,7 +2,7 @@ import { r as Route$1 } from "../../index-PjlUqG36.js";
|
|
|
2
2
|
import { ConnectRouterContext } from "@powerhousedao/connect-core/router";
|
|
3
3
|
//#region src/routes/_app/$.d.ts
|
|
4
4
|
/** Not found's options: its title, and a wait for routes still loading. */
|
|
5
|
-
export declare const options: {
|
|
5
|
+
export declare const options: import("@powerhousedao/connect-core/router").CoreRouteOptions<{
|
|
6
6
|
head: ({ match }: {
|
|
7
7
|
match: {
|
|
8
8
|
context: ConnectRouterContext;
|
|
@@ -13,8 +13,8 @@ export declare const options: {
|
|
|
13
13
|
}[];
|
|
14
14
|
};
|
|
15
15
|
loader: () => Promise<void>;
|
|
16
|
-
}
|
|
17
|
-
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,
|
|
16
|
+
}>;
|
|
17
|
+
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>, "/$", "/$", "/_app/$", "/_app/$", undefined, import("@tanstack/react-router").ResolveParams<"/$">, import("@tanstack/react-router").AnyContext, undefined, undefined, {}, () => Promise<void>, unknown, unknown, undefined, unknown, undefined>;
|
|
18
18
|
//#endregion
|
|
19
19
|
export {};
|
|
20
20
|
//# sourceMappingURL=$.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"$.d.ts","names":[],"sources":["../../../src/routes/_app/$.tsx"],"mappings":";;;;
|
|
1
|
+
{"version":3,"file":"$.d.ts","names":[],"sources":["../../../src/routes/_app/$.tsx"],"mappings":";;;;qBAUa,sDAAO;EACA,SAAA;IAAE;MAAS,SAAS;;;;;;;;;qBAQ3B,OAAK,yCAAA,UAAA,yCAAA,2CAAA,2CAAA,WAAA,QAAA,4BAAA,oCAAA,oLAAA,oDAAA,iLAAA,sDAAA,4CAAA"}
|
package/dist/routes/_app/$.js
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { createFileRoute } from "@tanstack/react-router";
|
|
2
|
-
import { connectRoutesSettled, coreView, notFoundTitle } from "@powerhousedao/connect-core/router";
|
|
2
|
+
import { connectRoutesSettled, coreRouteOptions, coreView, notFoundTitle } from "@powerhousedao/connect-core/router";
|
|
3
3
|
//#region src/routes/_app/$.tsx
|
|
4
4
|
/** Not found's options: its title, and a wait for routes still loading. */
|
|
5
|
-
const options = {
|
|
5
|
+
const options = coreRouteOptions({
|
|
6
6
|
head: ({ match }) => ({ meta: [{ title: notFoundTitle(match.context.appName) }] }),
|
|
7
7
|
loader: () => connectRoutesSettled()
|
|
8
|
-
};
|
|
8
|
+
});
|
|
9
9
|
const Route = createFileRoute("/_app/$")({
|
|
10
10
|
...options,
|
|
11
11
|
codeSplitGroupings: [],
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"$.js","names":[],"sources":["../../../src/routes/_app/$.tsx"],"sourcesContent":["import { createFileRoute } from \"@tanstack/react-router\";\nimport type { ConnectRouterContext } from \"@powerhousedao/connect-core/router\";\nimport {\n connectRoutesSettled,\n coreView,\n notFoundTitle,\n} from \"@powerhousedao/connect-core/router\";\n\n/** Not found's options: its title, and a wait for routes still loading. */\nexport const options = {\n head: ({ match }: { match: { context: ConnectRouterContext } }) => ({\n meta: [{ title: notFoundTitle(match.context.appName) }],\n }),\n // A package's routes may still be loading: the path may be one of them.\n loader: () => connectRoutesSettled(),\n};\n\n// Unknown paths, inside the layout so it stays; matched last.\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(\"NotFoundPage\"),\n});\n"],"mappings":";;;;
|
|
1
|
+
{"version":3,"file":"$.js","names":[],"sources":["../../../src/routes/_app/$.tsx"],"sourcesContent":["import { createFileRoute } from \"@tanstack/react-router\";\nimport type { ConnectRouterContext } from \"@powerhousedao/connect-core/router\";\nimport {\n connectRoutesSettled,\n coreRouteOptions,\n coreView,\n notFoundTitle,\n} from \"@powerhousedao/connect-core/router\";\n\n/** Not found's options: its title, and a wait for routes still loading. */\nexport const options = coreRouteOptions({\n head: ({ match }: { match: { context: ConnectRouterContext } }) => ({\n meta: [{ title: notFoundTitle(match.context.appName) }],\n }),\n // A package's routes may still be loading: the path may be one of them.\n loader: () => connectRoutesSettled(),\n});\n\n// Unknown paths, inside the layout so it stays; matched last.\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(\"NotFoundPage\"),\n});\n"],"mappings":";;;;AAUA,MAAa,UAAU,iBAAiB;CACtC,OAAO,EAAE,aAA2D,EAClE,MAAM,CAAC,EAAE,OAAO,cAAc,MAAM,QAAQ,OAAO,EAAE,CAAC,EACxD;CAEA,cAAc,qBAAqB;AACrC,CAAC;AAGD,MAAa,QAAQ,gBAAgB,SAAS,CAAC,CAAC;CAC9C,GAAG;CAEH,oBAAoB,CAAC;CACrB,WAAW,SAAS,cAAc;AACpC,CAAC"}
|
|
@@ -2,7 +2,7 @@ import { r as Route$1 } from "../../../../index-PjlUqG36.js";
|
|
|
2
2
|
import { ConnectRouterContext, DriveLoaderOptions, DrivePending, DriveRouteData } from "@powerhousedao/connect-core/router";
|
|
3
3
|
//#region src/routes/_app/d/$driveSlug/{-$nodeSlug}.d.ts
|
|
4
4
|
/** The node route's options: its loader, `?history` search and title. */
|
|
5
|
-
export declare const options: {
|
|
5
|
+
export declare const options: import("@powerhousedao/connect-core/router").CoreRouteOptions<{
|
|
6
6
|
validateSearch: (search: Record<string, unknown>) => Record<string, string | undefined>;
|
|
7
7
|
loader: {
|
|
8
8
|
handler: (options: DriveLoaderOptions) => Promise<DriveRouteData>;
|
|
@@ -25,16 +25,16 @@ export declare const options: {
|
|
|
25
25
|
title: string;
|
|
26
26
|
}[];
|
|
27
27
|
};
|
|
28
|
-
}
|
|
29
|
-
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>, ConnectRouterContext,
|
|
28
|
+
}>;
|
|
29
|
+
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>, 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, {}, {
|
|
30
30
|
handler: (options: DriveLoaderOptions) => Promise<{
|
|
31
31
|
driveId: string;
|
|
32
32
|
}>;
|
|
33
33
|
staleReloadMode: "blocking";
|
|
34
|
-
}, unknown, unknown,
|
|
34
|
+
}, 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>, import("@powerhousedao/connect-core/router").DriveRouteParams, import("@tanstack/react-router").AnyContext, undefined, undefined, {}, {
|
|
35
35
|
handler: (options: DriveLoaderOptions) => Promise<DriveRouteData>;
|
|
36
36
|
staleReloadMode: "blocking";
|
|
37
|
-
}, unknown, unknown,
|
|
37
|
+
}, unknown, unknown, undefined, unknown, undefined>;
|
|
38
38
|
//#endregion
|
|
39
39
|
export {};
|
|
40
40
|
//# sourceMappingURL={-$nodeSlug}.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"{-$nodeSlug}.d.ts","names":[],"sources":["../../../../../src/routes/_app/d/$driveSlug/{-$nodeSlug}.tsx"],"mappings":";;;;
|
|
1
|
+
{"version":3,"file":"{-$nodeSlug}.d.ts","names":[],"sources":["../../../../../src/routes/_app/d/$driveSlug/{-$nodeSlug}.tsx"],"mappings":";;;;qBAmBa,sDAAO;EAEO,iBAAA,QAAA,4BACQ;;IAE/B,UAAO,SAAY,uBAAqB,QAAQ;IAGhD;;EAGwB,iBAAA;IAAE;;;;;;EAUzB,SAAA,OAAA;IACD;MAAS,SAAS;;IAClB,aAAa;;;;;;;qBAeJ,OAjC+B,yCAiC1B,mDAAA,UAAA,yCAAA,2CAAA,2CAAA,WAAA,QAAA,4BAAA,oCAAA,oLAAA,oDAAA,yOAAA,mDAAA;;;;;2KApCS,QAAA,4BACQ,iFAAkC,mDAAA;EAE9C,UAAA,SAAA,uBAAqB,QAAQ;EAG/B"}
|