@powerhousedao/connect 6.2.3-dev.71 → 6.2.3-dev.73
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/RUNTIME-CONFIG.md +2 -90
- package/dist/{ClearStorageModal-DxBXLSmH.js → ClearStorageModal-UrKsUfAG.js} +4 -4
- package/dist/{ClearStorageModal-DxBXLSmH.js.map → ClearStorageModal-UrKsUfAG.js.map} +1 -1
- package/dist/{CreateDocumentModal-B-cXzeOA.js → CreateDocumentModal-CiIW3pzx.js} +18 -9
- package/dist/CreateDocumentModal-CiIW3pzx.js.map +1 -0
- package/dist/{DebugSettingsModal-D1I-K2Gf.js → DebugSettingsModal-CgGazj3J.js} +6 -6
- package/dist/{DebugSettingsModal-D1I-K2Gf.js.map → DebugSettingsModal-CgGazj3J.js.map} +1 -1
- package/dist/{InspectorModal-D85U4oKJ.js → InspectorModal-Dvfzy6Q2.js} +6 -6
- package/dist/{InspectorModal-D85U4oKJ.js.map → InspectorModal-Dvfzy6Q2.js.map} +1 -1
- package/dist/app-loader-Ho1-z1fv.js +4 -0
- package/dist/{app-loader-casiq2T2.js → app-loader-b3At29LQ.js} +11 -11
- package/dist/{app-loader-casiq2T2.js.map → app-loader-b3At29LQ.js.map} +1 -1
- package/dist/{boot-CFPdHSqB.js → boot-BbECCfkE.js} +4 -4
- package/dist/{boot-CFPdHSqB.js.map → boot-BbECCfkE.js.map} +1 -1
- package/dist/{build-info-Cn2f6llN.js → build-info-BS1JT5IX.js} +5 -5
- package/dist/{build-info-Cn2f6llN.js.map → build-info-BS1JT5IX.js.map} +1 -1
- package/dist/{components-C4K5xyad.js → components-C3f6Ci7V.js} +6 -6
- package/dist/{components-C4K5xyad.js.map → components-C3f6Ci7V.js.map} +1 -1
- package/dist/{connect.config-D1pGNmaF.js → connect.config-DL9nKtlW.js} +6 -5
- package/dist/connect.config-DL9nKtlW.js.map +1 -0
- package/dist/{connection-state-B6fleM37.js → connection-state-Bwm9Agwy.js} +4 -4
- package/dist/{connection-state-B6fleM37.js.map → connection-state-Bwm9Agwy.js.map} +1 -1
- package/dist/{cookie-banner-CAvd3PC3.js → cookie-banner-NclLYtB0.js} +4 -4
- package/dist/{cookie-banner-CAvd3PC3.js.map → cookie-banner-NclLYtB0.js.map} +1 -1
- package/dist/generic.d.ts +20 -2
- package/dist/generic.d.ts.map +1 -1
- package/dist/generic.js +2 -2
- package/dist/{load-DcDV9hi4.js → load-Dx-ssjO5.js} +9 -9
- package/dist/{load-DcDV9hi4.js.map → load-Dx-ssjO5.js.map} +1 -1
- package/dist/{load-runtime-config-Deq75NYr.js → load-runtime-config-BVBJKjyd.js} +4 -4
- package/dist/{load-runtime-config-Deq75NYr.js.map → load-runtime-config-BVBJKjyd.js.map} +1 -1
- package/dist/main.js +2 -2
- package/dist/{package-manager-CzBsaUUd.js → package-manager-DzxMzlms.js} +31 -12
- package/dist/package-manager-DzxMzlms.js.map +1 -0
- package/dist/{pglite-seed-eGzXMld2.js → pglite-seed-QPbGbLB_.js} +4 -4
- package/dist/{pglite-seed-eGzXMld2.js.map → pglite-seed-QPbGbLB_.js.map} +1 -1
- package/dist/{plugins-CegSox2x.js → plugins-BUSgAzk9.js} +4 -4
- package/dist/{plugins-CegSox2x.js.map → plugins-BUSgAzk9.js.map} +1 -1
- package/dist/{preferences-store-CSqauT9V.js → preferences-store-DxYAnGCc.js} +4 -4
- package/dist/{preferences-store-CSqauT9V.js.map → preferences-store-DxYAnGCc.js.map} +1 -1
- package/dist/prerender.d.ts.map +1 -1
- package/dist/prerender.js +12 -5
- package/dist/prerender.js.map +1 -1
- package/dist/{reactor-BGYR1N7Z.js → reactor-DJVGEQho.js} +52 -11
- package/dist/reactor-DJVGEQho.js.map +1 -0
- package/dist/reactor.worker.js +10 -12
- package/dist/reactor.worker.js.map +1 -1
- package/dist/{registerServiceWorker-APlHkrmH.js → registerServiceWorker-X6fT91iL.js} +4 -4
- package/dist/{registerServiceWorker-APlHkrmH.js.map → registerServiceWorker-X6fT91iL.js.map} +1 -1
- package/dist/route-tree.js +1 -1
- package/dist/{route-views-CDVZytw4.js → route-views-DmmQ1DzX.js} +4 -4
- package/dist/{route-views-CDVZytw4.js.map → route-views-DmmQ1DzX.js.map} +1 -1
- package/dist/route-views.js +3 -3
- package/dist/router-CBzb5FUq.js +4 -0
- package/dist/{router-Cu0PH6sh.js → router-DXpaaTeR.js} +13 -5
- package/dist/router-DXpaaTeR.js.map +1 -0
- package/dist/{settings-CFn4TA0g.js → settings-CiB17TJY.js} +10 -9
- package/dist/{settings-CFn4TA0g.js.map → settings-CiB17TJY.js.map} +1 -1
- package/dist/{settings-tabs-BC8gAacB.js → settings-tabs-V0EGYnyB.js} +24 -17
- package/dist/settings-tabs-V0EGYnyB.js.map +1 -0
- package/dist/shell-head.html +1 -1
- package/dist/shell.html +1 -1
- package/dist/start-connect.js +2 -2
- package/dist/style.css +82 -0
- package/dist/{ui-BOTsJPoc.js → ui-Jmmy7K8U.js} +8 -8
- package/dist/{ui-BOTsJPoc.js.map → ui-Jmmy7K8U.js.map} +1 -1
- package/docs/customizing/data-and-navigation.md +50 -0
- package/docs/customizing/drive-apps.md +42 -0
- package/docs/customizing/hosts-and-plugins.md +23 -0
- package/docs/customizing/layout.md +9 -2
- package/docs/customizing/modals.md +25 -4
- package/docs/customizing/overrides.md +59 -4
- package/docs/customizing/packages.md +2 -0
- package/docs/customizing/pages.md +10 -13
- package/docs/customizing/styles-and-branding.md +9 -2
- package/docs/customizing/types-and-troubleshooting.md +4 -2
- package/generic-routes.json +9 -0
- package/package.json +19 -18
- package/skills/customize-connect/SKILL.md +14 -11
- package/CUSTOMIZING.md +0 -80
- package/dist/CreateDocumentModal-B-cXzeOA.js.map +0 -1
- package/dist/app-loader-D5GEwpML.js +0 -4
- package/dist/connect.config-D1pGNmaF.js.map +0 -1
- package/dist/package-manager-CzBsaUUd.js.map +0 -1
- package/dist/reactor-BGYR1N7Z.js.map +0 -1
- package/dist/router-B0OQvO11.js +0 -4
- package/dist/router-Cu0PH6sh.js.map +0 -1
- package/dist/settings-tabs-BC8gAacB.js.map +0 -1
|
@@ -37,10 +37,63 @@ function InventoryDrive() {
|
|
|
37
37
|
|
|
38
38
|
- `useDriveRouteData()` returns the open `drive`, `folder` and `documentId` from the drive routes' loaders, live.
|
|
39
39
|
- Connect's routes nested under an overridden one stay: the node route renders in an overridden drive route's `<Outlet />`, and the tabs in an overridden settings page's.
|
|
40
|
-
- Drive apps and editors come from packages, not routes. Override a route only to change Connect around them.
|
|
40
|
+
- Drive apps and editors come from packages, not routes ([drive-apps.md](./drive-apps.md)). Override a route only to change Connect around them.
|
|
41
41
|
- Without the generic plugin, each of Connect's files shows core's view instead (a header, an index of drives, a directory listing, a JSON view). An override shows the same view either way.
|
|
42
42
|
- `_app.tsx` and `__root.tsx` are not overridden here: a project's `_app.tsx` replaces the layout ([layout.md](./layout.md)), and the root route is Connect's.
|
|
43
43
|
- To hide a route, override it with a `beforeLoad` that throws `notFound()` or `redirect()`.
|
|
44
|
+
- `ph build` and Studio warn about an override that doesn't import its route's `options`: what Connect sets on the route is dropped.
|
|
45
|
+
|
|
46
|
+
### Build on the home page
|
|
47
|
+
|
|
48
|
+
`Home` is made of parts that `/generic` exports, so a custom home keeps Connect's drive cards and adds its own:
|
|
49
|
+
|
|
50
|
+
```tsx
|
|
51
|
+
// hosts/connect/routes/_app/index.tsx
|
|
52
|
+
import {
|
|
53
|
+
ConnectHomeScreen,
|
|
54
|
+
HomeAddDriveItem,
|
|
55
|
+
HomeDriveItem,
|
|
56
|
+
useVisibleDrives,
|
|
57
|
+
} from "@powerhousedao/connect/generic";
|
|
58
|
+
import { options } from "@powerhousedao/connect/routes/_app/index";
|
|
59
|
+
import { HomeScreenItem } from "@powerhousedao/design-system/connect";
|
|
60
|
+
import { createFileRoute, useNavigate } from "@tanstack/react-router";
|
|
61
|
+
|
|
62
|
+
export const Route = createFileRoute("/_app/")({
|
|
63
|
+
...options,
|
|
64
|
+
component: InventoryHome,
|
|
65
|
+
});
|
|
66
|
+
|
|
67
|
+
// A card like the drives', for a page of the project's own.
|
|
68
|
+
function OpenOrdersCard() {
|
|
69
|
+
const navigate = useNavigate();
|
|
70
|
+
return (
|
|
71
|
+
<HomeScreenItem
|
|
72
|
+
title="Open orders"
|
|
73
|
+
description="Orders on the floor"
|
|
74
|
+
onClick={() => void navigate({ to: "/orders" })}
|
|
75
|
+
/>
|
|
76
|
+
);
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
function InventoryHome() {
|
|
80
|
+
const drives = useVisibleDrives();
|
|
81
|
+
return (
|
|
82
|
+
<ConnectHomeScreen>
|
|
83
|
+
<OpenOrdersCard />
|
|
84
|
+
{drives?.map((drive) => (
|
|
85
|
+
<HomeDriveItem key={drive.header.id} drive={drive} />
|
|
86
|
+
))}
|
|
87
|
+
<HomeAddDriveItem />
|
|
88
|
+
</ConnectHomeScreen>
|
|
89
|
+
);
|
|
90
|
+
}
|
|
91
|
+
```
|
|
92
|
+
|
|
93
|
+
- `ConnectHomeScreen` is the grid on the configured `branding.homeBackground`.
|
|
94
|
+
- `useVisibleDrives()` is `useDrives()` without the drives dismissed from the sign-in gate this session.
|
|
95
|
+
- `HomeAddDriveItem` renders nothing where adding drives is turned off.
|
|
96
|
+
- `HomeScreenItem` (`@powerhousedao/design-system/connect`) is the card the drives use: `title`, `description`, an `icon` element, and `href` or `onClick`.
|
|
44
97
|
|
|
45
98
|
## Loading, not found and errors
|
|
46
99
|
|
|
@@ -71,7 +124,7 @@ export const Route = createFileRoute("/_app/d/$driveSlug")({
|
|
|
71
124
|
// hosts/connect/routes/_app/d/$driveSlug.tsx
|
|
72
125
|
import { isDriveNotFound } from "@powerhousedao/connect/router";
|
|
73
126
|
import { options } from "@powerhousedao/connect/routes/_app/d/$driveSlug";
|
|
74
|
-
import type
|
|
127
|
+
import { createFileRoute, type NotFoundRouteProps } from "@tanstack/react-router";
|
|
75
128
|
|
|
76
129
|
export const Route = createFileRoute("/_app/d/$driveSlug")({
|
|
77
130
|
...options,
|
|
@@ -84,6 +137,8 @@ export const Route = createFileRoute("/_app/d/$driveSlug")({
|
|
|
84
137
|
A project route throws `notFound()` the same way:
|
|
85
138
|
|
|
86
139
|
```tsx
|
|
140
|
+
import { createFileRoute, notFound } from "@tanstack/react-router";
|
|
141
|
+
|
|
87
142
|
export const Route = createFileRoute("/_app/documents/$documentId")({
|
|
88
143
|
loader: async ({ context, params }) => {
|
|
89
144
|
// ...
|
|
@@ -96,14 +151,14 @@ export const Route = createFileRoute("/_app/documents/$documentId")({
|
|
|
96
151
|
|
|
97
152
|
### Errors
|
|
98
153
|
|
|
99
|
-
A loader or render error shows the route's `errorComponent`, else Connect's error view (with the generic plugin) or core's. It gets `{ error, reset }`; `reset()` retries the route. Connect reports the error to Sentry when Sentry is configured.
|
|
154
|
+
A loader or render error shows the route's `errorComponent`, else Connect's error view (with the generic plugin) or core's. It gets `{ error, reset }`; `error` is `unknown`, since anything can be thrown, and `reset()` retries the route. Connect reports the error to Sentry when Sentry is configured.
|
|
100
155
|
|
|
101
156
|
```tsx
|
|
102
157
|
export const Route = createFileRoute("/_app/reports")({
|
|
103
158
|
loader: loadReports,
|
|
104
159
|
errorComponent: ({ error, reset }) => (
|
|
105
160
|
<div role="alert">
|
|
106
|
-
<p>{error.message}</p>
|
|
161
|
+
<p>{error instanceof Error ? error.message : "Something went wrong"}</p>
|
|
107
162
|
<button onClick={reset}>Try again</button>
|
|
108
163
|
</div>
|
|
109
164
|
),
|
|
@@ -11,6 +11,8 @@ A package's `hosts/connect/routes/` also adds routes to every Connect that loads
|
|
|
11
11
|
- Removing a package while one of its pages is open takes the app home first.
|
|
12
12
|
- Bundled packages (`ph install --local`, `provider: "local"`) register in a production build through the page's import map, as on the dev server.
|
|
13
13
|
- An offered route imports `@powerhousedao/connect-core` (`ContentOutlet`, `useDriveRouteData`, `ModalDialog`), `@tanstack/react-router` and `@powerhousedao/reactor-browser`, which Connect shares with packages. `@powerhousedao/connect` is not shared, so `ph build` fails, naming the file, if an offered route imports it, or reaches a module that does. The rest of the package gets a warning: its build would bundle a copy of the Connect modules it uses, apart from the app's state.
|
|
14
|
+
- An offered route also imports its own package's code, such as `document-models/*` and editor components, which the same build bundles. Another package's runtime import, e.g. `@powerhousedao/shared` (usually only a devDependency), is bundled as a copy; take the same helper from `@powerhousedao/reactor-browser` where it has one, e.g. `isFileNodeKind`.
|
|
15
|
+
- `@powerhousedao/connect/layout` re-exports `@powerhousedao/connect-core/router` and design-system parts. An offered route imports those directly: `useNavRoutes`, `useSidebarMode` and `ContentOutlet` from `@powerhousedao/connect-core/router`, `SidebarItem` from `@powerhousedao/design-system/connect`.
|
|
14
16
|
- The project's own package is the exception: its host build already has its routes.
|
|
15
17
|
- The package's stylesheet styles its routes, as it does its editors; see [A package's styles](./styles-and-branding.md#a-packages-styles).
|
|
16
18
|
|
|
@@ -4,13 +4,9 @@ A project adds pages to Connect with file routes in `hosts/connect/routes/`. A r
|
|
|
4
4
|
|
|
5
5
|
## Add a page
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
Routes import `@tanstack/react-router`. A project from `ph init` has it as a `peerDependency`, and as a `devDependency` at the version Connect is built with; `ph migrate` adds it to an older project. Connect uses the project's copy, so keep that version rather than adding another.
|
|
8
8
|
|
|
9
|
-
|
|
10
|
-
pnpm add @tanstack/react-router@1.170.41
|
|
11
|
-
```
|
|
12
|
-
|
|
13
|
-
2. Create a route file. A file in `_app/` renders inside Connect's layout; its route id starts with `/_app`, and the URL does not:
|
|
9
|
+
1. Create a route file. A file in `_app/` renders inside Connect's layout; its route id starts with `/_app`, and the URL does not:
|
|
14
10
|
|
|
15
11
|
```tsx
|
|
16
12
|
// hosts/connect/routes/_app/inventory.tsx
|
|
@@ -27,7 +23,7 @@ A project adds pages to Connect with file routes in `hosts/connect/routes/`. A r
|
|
|
27
23
|
}
|
|
28
24
|
```
|
|
29
25
|
|
|
30
|
-
|
|
26
|
+
2. Open `/inventory` in Studio: `ph vetra` if it's running, else `ph connect studio`. Run only one: each has its own reactor.
|
|
31
27
|
|
|
32
28
|
A file outside `_app/` is a full page, without Connect's layout:
|
|
33
29
|
|
|
@@ -54,11 +50,12 @@ function Status() {
|
|
|
54
50
|
Rules:
|
|
55
51
|
|
|
56
52
|
- Connect reads routes only from `hosts/connect/routes/`.
|
|
57
|
-
- Core routes are `/`, `/d/$driveSlug/{-$nodeSlug}`, `/settings` with its Appearance and Packages tabs, and the catch-all `$`. They live in `@powerhousedao/connect-core`. A file in `_app/` at a core route's path overrides it; see [Override a Connect route](./overrides.md#override-a-connect-route). Any other route at a
|
|
53
|
+
- Core routes are `/`, `/d/$driveSlug/{-$nodeSlug}`, `/settings` with its Appearance and Packages tabs, and the catch-all `$`. They live in `@powerhousedao/connect-core`. A file in `_app/` at a core route's path overrides it; see [Override a Connect route](./overrides.md#override-a-connect-route). Any other route at a URL Connect serves, e.g. a full page `settings.tsx` outside `_app/`, fails the build and names both files.
|
|
58
54
|
- Files and folders starting with `-` are not routes. Use them for shared components.
|
|
59
55
|
- Route groups, `(name)/`, only organize files.
|
|
60
56
|
- Each route is code-split into its own chunk.
|
|
61
57
|
- Inside a route, navigate with the router's `Link` and `useNavigate`. They are typed with the project's routes and Connect's.
|
|
58
|
+
- A route file's `createFileRoute("…")` id must match its path. While Studio runs, the router's watcher rewrites a mismatched id in the file itself, under your editor; without Studio, `tsc` reports it.
|
|
62
59
|
|
|
63
60
|
## Add a sidebar link
|
|
64
61
|
|
|
@@ -67,14 +64,14 @@ A route in `_app/` lists itself in the sidebar with `staticData.nav`:
|
|
|
67
64
|
```tsx
|
|
68
65
|
// hosts/connect/routes/_app/inventory.tsx
|
|
69
66
|
export const Route = createFileRoute("/_app/inventory")({
|
|
70
|
-
staticData: { nav: { label: "Inventory",
|
|
67
|
+
staticData: { nav: { label: "Inventory", order: 10 } },
|
|
71
68
|
component: Inventory,
|
|
72
69
|
});
|
|
73
70
|
```
|
|
74
71
|
|
|
75
72
|
- Links come after the drives, sorted by `order`, then by `label`.
|
|
76
|
-
- `icon` is optional: any component that takes `size` (and `className`),
|
|
77
|
-
- Routes with path params (`$id`) are not listed: the sidebar cannot fill in the param.
|
|
73
|
+
- `icon` is optional: any component that takes `size` (and `className`). Without one, the link shows the label's first letter.
|
|
74
|
+
- Routes with path params (`$id`) are not listed: the sidebar cannot fill in the param. `ph build` and Studio warn about a `nav` on one.
|
|
78
75
|
|
|
79
76
|
## Hide or collapse the sidebar on a page
|
|
80
77
|
|
|
@@ -113,9 +110,9 @@ export const Route = createFileRoute("/_app/settings/inventory")({
|
|
|
113
110
|
});
|
|
114
111
|
```
|
|
115
112
|
|
|
116
|
-
- `icon` and `destructive` are optional.
|
|
113
|
+
- `icon` (a component that takes `size`, as for a sidebar link) and `destructive` are optional.
|
|
117
114
|
- The page title becomes `Settings · Inventory · <app>`. The tab needs no `head`.
|
|
118
|
-
- The generic plugin adds its tabs (Package Manager, Default Editors, Danger Zone, About, AI Assistant) as code routes and hides core's (Appearance, Packages); without it, core's are listed. A project file at a tab's path, e.g. `_app/settings/about.tsx`, replaces that tab; it spreads the tab's options from `genericSettingsTabs` (`@powerhousedao/connect/generic`), e.g. `...genericSettingsTabs.about`, to keep its label, icon and order.
|
|
115
|
+
- The generic plugin adds its tabs (Package Manager, Default Editors, Danger Zone, About, AI Assistant) as code routes and hides core's (Appearance, Packages); without it, core's are listed. A project file at a tab's path, e.g. `_app/settings/about.tsx`, replaces that tab; it spreads the tab's options from `genericSettingsTabs` (`@powerhousedao/connect/generic`), e.g. `...genericSettingsTabs.about`, to keep its label, icon and order. Like an override of Connect's routes, it stays this project's: `ph build` doesn't offer it to other Connects, so it may import `@powerhousedao/connect`.
|
|
119
116
|
|
|
120
117
|
## Set the page title
|
|
121
118
|
|
|
@@ -25,7 +25,13 @@ A project's styles are in two files, which the page builds as one Tailwind build
|
|
|
25
25
|
--color-red-700: #b42318;
|
|
26
26
|
}
|
|
27
27
|
|
|
28
|
+
/* A semantic token: set its light value and its dark one. */
|
|
29
|
+
:root {
|
|
30
|
+
--primary: #0a5bc4;
|
|
31
|
+
}
|
|
32
|
+
|
|
28
33
|
:root.dark {
|
|
34
|
+
--primary: #6aa8ff;
|
|
29
35
|
--background: #16181c;
|
|
30
36
|
}
|
|
31
37
|
```
|
|
@@ -36,6 +42,7 @@ A project's styles are in two files, which the page builds as one Tailwind build
|
|
|
36
42
|
- Theme Connect in the host's file: override tokens in `@theme static`, and add plain CSS below it. Tailwind emits only the tokens the page's own classes use, so without `static` an override of a token only a package uses never reaches the page, and the package's class keeps Connect's default. A fully static theme would add about 11 KB (3 KB gzipped) to the page; `static` on the host's own block adds just its overrides. Plain rules outside a `@layer` win over all of Connect's CSS, which is layered; put a rule in `@layer components` to let utilities override it.
|
|
37
43
|
- The host's file sits beside its routes folder: `hosts/connect/style.css` for `hosts/connect/routes/`, `hosts/lab/style.css` for a host whose `runner.routes` is `hosts/lab/routes`. `ph connect studio`, `build` and `preview`, `ph vetra` and `ph run <host>` add it, and the loading screen's inline CSS includes it. Studio applies edits to it without a reload.
|
|
38
44
|
- The design system defines the `dark` variant (`.dark` on `<html>`), so a project's `dark:` classes follow Connect's theme toggle.
|
|
45
|
+
- The semantic tokens (`--background`, `--foreground`, `--primary`, `--muted`, `--border`, ... in the design system's `theme.css`) are the ones to override. Each has a light value on `:root` and a dark one on `.dark`, so set both: a `:root` override alone ties with `.dark`, comes later, and wins in the dark theme too.
|
|
39
46
|
- `ph migrate` rewrites the imports at the top of an existing `style.css` to these and keeps the rest of the file. It drops the imports of local packages' builds that `ph install --local` used to add (other `node_modules` CSS stays) and the old template's empty `@theme` block, adds `properties` to an old layer order, creates `hosts/connect/style.css` when it is missing (a host with its own `runner.routes` creates its file by hand), and warns when `style.css` sets tokens or global rules (`:root`, `html`, `body`, `.dark`). It doesn't move them: only the project knows which are the package's and which are this Connect's theme.
|
|
40
47
|
|
|
41
48
|
## A package's styles
|
|
@@ -52,7 +59,7 @@ A project's styles are in two files, which the page builds as one Tailwind build
|
|
|
52
59
|
|
|
53
60
|
## Name and icon per host
|
|
54
61
|
|
|
55
|
-
`connect.branding.appName` and `connect.branding.favicon` in `powerhouse.config.json` name the app and set its tab icon for every host. A host overrides either in its `config`:
|
|
62
|
+
`connect.branding.appName` and `connect.branding.favicon` in `powerhouse.config.json` name the app and set its tab icon for every host. The app name also names the installed app (the PWA manifest), unless `connect.pwa.manifest` sets `name` or `short_name`; its icons, and the tab's when there's no `favicon`, come from `connect.branding.icon` (see [RUNTIME-CONFIG.md](../../RUNTIME-CONFIG.md)). A running `ph vetra` or `ph connect studio` reads `connect.branding` at startup: restart it after changing it. A host overrides either in its `config`:
|
|
56
63
|
|
|
57
64
|
```js
|
|
58
65
|
// hosts/lab/host.js
|
|
@@ -64,6 +71,6 @@ export default {
|
|
|
64
71
|
```
|
|
65
72
|
|
|
66
73
|
- A host's `config` merges over the project's `connect` block field by field, so a host inherits what it doesn't set.
|
|
67
|
-
- `branding.favicon` is a file (`.ico`, `.svg` or `.png`) relative to the project. `ph run lab dev` serves it and `ph run lab build` builds it as `icon.ico`; the built `powerhouse.config.json` leaves the path out. `ph connect build --favicon` wins over it
|
|
74
|
+
- `branding.favicon` is a file (`.ico`, `.svg` or `.png`) relative to the project. `ph run lab dev` serves it and `ph run lab build` builds it with its type, as `icon.ico`, `icon.svg` or `icon.png`, and links it from `index.html`; the built `powerhouse.config.json` leaves the path out. `ph connect build --favicon` wins over it.
|
|
68
75
|
- `ph run lab build` bakes the host's `config` into the build, over `powerhouse.config.json`: the `<title>` and the loading screen take its `branding.appName`, and the build uses its `app.basePath` and `pwa`.
|
|
69
76
|
|
|
@@ -8,7 +8,7 @@ The build generates `.ph/connect-routes.gen.ts`: the route tree of Connect's rou
|
|
|
8
8
|
- The project's `tsconfig.json` includes `.ph/connect-routes.gen.ts` and maps both `"@powerhousedao/connect-core/route-tree"` and `"@powerhousedao/connect/route-tree"` to `["./.ph/connect-routes.gen.ts"]` in `paths`. New projects are scaffolded with them. In an older project, add them by hand, and drop `.ph` from `exclude`. Core's router types name the tree by `@powerhousedao/connect-core/route-tree`; without that path they use core's own routes.
|
|
9
9
|
- Until the first build, both specifiers resolve to core's own tree. Project routes show type errors (unknown route ids) until `ph connect build` or `ph connect studio` has run.
|
|
10
10
|
- `ph connect build` type-checks the routes and fails on errors. `--ignore-type-errors` skips the check.
|
|
11
|
-
- `@tanstack/react-router`
|
|
11
|
+
- `@tanstack/react-router` is the project's own copy, which Connect uses too: keep the version `ph init` or `ph migrate` set. The routes and Connect share one router, and its types come from that copy.
|
|
12
12
|
|
|
13
13
|
## Troubleshooting
|
|
14
14
|
|
|
@@ -16,6 +16,7 @@ The build generates `.ph/connect-routes.gen.ts`: the route tree of Connect's rou
|
|
|
16
16
|
| --- | --- |
|
|
17
17
|
| `Connect could not mount the routes in hosts/connect/routes/` | A route outside `_app/` collides with one of Connect's, or two project files have one path. The message names the files. |
|
|
18
18
|
| A new routes folder is ignored by a running `ph connect studio` | Connect checks for the folder at startup. Restart it. |
|
|
19
|
+
| `tsc` reports `TS2883: The inferred type of 'Route' cannot be named without a reference to 'ConnectRouterContext'` | The route tree hasn't been generated yet. Run `ph build` (or start Studio) once; the error goes with the unknown route ids. |
|
|
19
20
|
| `createFileRoute("/_app/x")` is a type error | The tree is not generated yet, or the tsconfig lacks the `route-tree` path. See [Types](#types). |
|
|
20
21
|
| A sidebar link reloads the whole app | It is a plain `href`. Navigate through the router; see [Replace the sidebar](./layout.md#replace-the-sidebar). |
|
|
21
22
|
| A `staticData.nav` route is missing from the sidebar | Its path has a param, or it is not in `_app/`, or a replaced layout does not render `SidebarNavItems`/`useNavRoutes`. |
|
|
@@ -27,6 +28,7 @@ The build generates `.ph/connect-routes.gen.ts`: the route tree of Connect's rou
|
|
|
27
28
|
| A host's token override doesn't reach a package's classes | The page emits only the tokens its own classes use. Override it in `@theme static` in the host's stylesheet; see [Styles](./styles-and-branding.md#styles). |
|
|
28
29
|
| Installing a package re-themes Connect | The package's `style.css` sets Connect's tokens or global rules, which ship in its stylesheet. Move them to its `hosts/connect/style.css`; `ph migrate` warns about them. |
|
|
29
30
|
| `ph build` fails: `./theme.css` is not exported from `@powerhousedao/connect` | The project's `@powerhousedao/connect` is older than `ph-cli`. Update it to the same version. |
|
|
31
|
+
| You want to see the route tree, matches and loader state | Studio shows TanStack's router devtools when the page has `?devtools=1`, or after `localStorage.setItem("ph:router-devtools", "1")`. They are off by default and never in a build. |
|
|
30
32
|
|
|
31
33
|
## Upgrading
|
|
32
34
|
|
|
@@ -57,7 +59,7 @@ In 6.2.3 dev prereleases only, `RouteSelection` and scoped PH stores (`createSco
|
|
|
57
59
|
The generic plugin's UI moved behind the plugin, which a project's routes follow by hand:
|
|
58
60
|
|
|
59
61
|
- `AppLayout`, `ConnectSidebar`, `SidebarDriveItems`, `SidebarNavItems` and `OpenDocument` import from `@powerhousedao/connect/generic`, not `/layout`.
|
|
60
|
-
- `@powerhousedao/connect/route-views` exports only `ConnectRoot`; `Home
|
|
62
|
+
- `@powerhousedao/connect/route-views` exports only `ConnectRoot`; `Home` (and its parts), `DriveLayout`, `NodeView`, `DrivePending` and `SettingsPage` import from `/generic`.
|
|
61
63
|
- `generic()`, `genericActive`, `IfPlugin` and `useIsPluginActive` are gone; a plugin's `ui()` provides its views.
|
|
62
64
|
- Connect's About, AI Assistant, Danger Zone, Default Editors and Package Manager tabs are the generic plugin's code routes, so `@powerhousedao/connect/routes/_app/settings/<tab>` no longer exists for them. An override imports the tab's options as `genericSettingsTabs["<tab>"]` from `@powerhousedao/connect/generic` instead; links to these tabs are untyped, so use `useLinkProps({ settings: "<tab>" })`.
|
|
63
65
|
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@powerhousedao/connect",
|
|
3
3
|
"productName": "Powerhouse-Connect",
|
|
4
|
-
"version": "6.2.3-dev.
|
|
4
|
+
"version": "6.2.3-dev.73",
|
|
5
5
|
"description": "Powerhouse Connect",
|
|
6
6
|
"main": "dist/index.html",
|
|
7
7
|
"type": "module",
|
|
@@ -12,12 +12,12 @@
|
|
|
12
12
|
"dist",
|
|
13
13
|
"skills",
|
|
14
14
|
"docs",
|
|
15
|
-
"CUSTOMIZING.md",
|
|
16
15
|
"RUNTIME-CONFIG.md",
|
|
17
16
|
"src/routes",
|
|
18
17
|
"src/router",
|
|
19
18
|
"src/route-tree.ts",
|
|
20
19
|
"src/routeTree.gen.ts",
|
|
20
|
+
"generic-routes.json",
|
|
21
21
|
"style.css",
|
|
22
22
|
"tailwind.css",
|
|
23
23
|
"theme.css",
|
|
@@ -110,28 +110,27 @@
|
|
|
110
110
|
"@openfeature/core": "1.9.1",
|
|
111
111
|
"@openfeature/web-sdk": "1.6.2",
|
|
112
112
|
"@openpanel/web": "^1.4.1",
|
|
113
|
-
"@powerhousedao/config": "6.2.3-dev.
|
|
114
|
-
"@powerhousedao/connect-core": "6.2.3-dev.
|
|
115
|
-
"@powerhousedao/design-system": "6.2.3-dev.
|
|
113
|
+
"@powerhousedao/config": "6.2.3-dev.73",
|
|
114
|
+
"@powerhousedao/connect-core": "6.2.3-dev.73",
|
|
115
|
+
"@powerhousedao/design-system": "6.2.3-dev.73",
|
|
116
116
|
"@powerhousedao/document-engineering": "1.40.5",
|
|
117
|
-
"@powerhousedao/host-core": "6.2.3-dev.
|
|
118
|
-
"@powerhousedao/powerhouse-vetra-packages": "6.2.3-dev.
|
|
119
|
-
"@powerhousedao/reactor": "6.2.3-dev.
|
|
120
|
-
"@powerhousedao/reactor-attachments": "6.2.3-dev.
|
|
121
|
-
"@powerhousedao/reactor-browser": "6.2.3-dev.
|
|
122
|
-
"@powerhousedao/reactor-mcp": "6.2.3-dev.
|
|
123
|
-
"@powerhousedao/reactor-router": "6.2.3-dev.
|
|
124
|
-
"@powerhousedao/shared": "6.2.3-dev.
|
|
125
|
-
"@powerhousedao/vetra": "6.2.3-dev.
|
|
126
|
-
"@powerhousedao/workflow": "6.2.3-dev.
|
|
117
|
+
"@powerhousedao/host-core": "6.2.3-dev.73",
|
|
118
|
+
"@powerhousedao/powerhouse-vetra-packages": "6.2.3-dev.73",
|
|
119
|
+
"@powerhousedao/reactor": "6.2.3-dev.73",
|
|
120
|
+
"@powerhousedao/reactor-attachments": "6.2.3-dev.73",
|
|
121
|
+
"@powerhousedao/reactor-browser": "6.2.3-dev.73",
|
|
122
|
+
"@powerhousedao/reactor-mcp": "6.2.3-dev.73",
|
|
123
|
+
"@powerhousedao/reactor-router": "6.2.3-dev.73",
|
|
124
|
+
"@powerhousedao/shared": "6.2.3-dev.73",
|
|
125
|
+
"@powerhousedao/vetra": "6.2.3-dev.73",
|
|
126
|
+
"@powerhousedao/workflow": "6.2.3-dev.73",
|
|
127
127
|
"@privy-io/react-auth": "3.35.0",
|
|
128
128
|
"@rainbow-me/rainbowkit": "^2.2.11",
|
|
129
|
-
"@renown/sdk": "6.2.3-dev.
|
|
129
|
+
"@renown/sdk": "6.2.3-dev.73",
|
|
130
130
|
"@sentry/react": "^10.17.0",
|
|
131
131
|
"@tailwindcss/node": "4.2.2",
|
|
132
132
|
"@tanstack/react-query": "^5.90.2",
|
|
133
|
-
"
|
|
134
|
-
"document-model": "6.2.3-dev.71",
|
|
133
|
+
"document-model": "6.2.3-dev.73",
|
|
135
134
|
"i18next": "^25.5.3",
|
|
136
135
|
"kysely": "0.28.16",
|
|
137
136
|
"kysely-pglite-dialect": "1.2.0",
|
|
@@ -149,6 +148,7 @@
|
|
|
149
148
|
"devDependencies": {
|
|
150
149
|
"@tailwindcss/cli": "4.2.2",
|
|
151
150
|
"@tailwindcss/vite": "4.2.2",
|
|
151
|
+
"@tanstack/react-router": "^1.170.41",
|
|
152
152
|
"@tanstack/react-router-devtools": "1.167.2",
|
|
153
153
|
"@tanstack/router-core": "1.171.34",
|
|
154
154
|
"@tanstack/router-plugin": "1.168.42",
|
|
@@ -171,6 +171,7 @@
|
|
|
171
171
|
"vite-tsconfig-paths": "6.1.1"
|
|
172
172
|
},
|
|
173
173
|
"peerDependencies": {
|
|
174
|
+
"@tanstack/react-router": "^1.170.41",
|
|
174
175
|
"react": ">=19.0.0",
|
|
175
176
|
"react-dom": ">=19.0.0"
|
|
176
177
|
},
|
|
@@ -13,8 +13,9 @@ Connect is the Powerhouse web app that shows drives, documents and their editors
|
|
|
13
13
|
| Pages, sidebar links, settings tabs, page titles | File routes in `hosts/connect/routes/` | [pages.md](../../docs/customizing/pages.md) |
|
|
14
14
|
| Sidebar, layout, loading screen | `hosts/connect/routes/_app.tsx` | [layout.md](../../docs/customizing/layout.md) |
|
|
15
15
|
| Home, drive view, open document, settings page, 404 | A route file at Connect's route path | [overrides.md](../../docs/customizing/overrides.md) |
|
|
16
|
-
| Loading data, search params, links from editors | Route `loader`, `validateSearch`; `@powerhousedao/reactor-browser` | [data-and-navigation.md](../../docs/customizing/data-and-navigation.md) |
|
|
16
|
+
| Loading data, documents of one type across drives and links to them, search params, links from editors | Route `loader`, `validateSearch`; `useDocumentsOfType` and the other `@powerhousedao/reactor-browser` hooks | [data-and-navigation.md](../../docs/customizing/data-and-navigation.md) |
|
|
17
17
|
| Modals | `staticData.modals`, `staticData.modalFrame` | [modals.md](../../docs/customizing/modals.md) |
|
|
18
|
+
| A drive's own view, and which drive uses it | A package's drive app; the drive's `preferredEditor` | [drive-apps.md](../../docs/customizing/drive-apps.md) |
|
|
18
19
|
| Colours, fonts, CSS; app name and favicon per host | `style.css`; `connect.branding` | [styles-and-branding.md](../../docs/customizing/styles-and-branding.md) |
|
|
19
20
|
| Several Connects with different routes, config or plugins | `hosts/<name>/host.js` | [hosts-and-plugins.md](../../docs/customizing/hosts-and-plugins.md) |
|
|
20
21
|
| Routes that ship with a package to other Connects | The package's `hosts/connect/routes/` | [packages.md](../../docs/customizing/packages.md) |
|
|
@@ -26,10 +27,11 @@ These paths are relative to this file, inside `node_modules/@powerhousedao/conne
|
|
|
26
27
|
|
|
27
28
|
- Connect routes with [TanStack Router](https://tanstack.com/router) file routes. The project's `hosts/connect/routes/` folder joins Connect's own routes in one router. `ph vetra`, `ph connect studio`, `ph connect build` and `ph build` all mount it.
|
|
28
29
|
- A file in `_app/` renders inside Connect's layout, with the sidebar. Its route id starts with `/_app` but its URL does not: `_app/inventory.tsx` is `createFileRoute("/_app/inventory")` at `/inventory`. Any other file is a full page.
|
|
30
|
+
- A route's `loader` reads the app's PH store from the router context (`context.store`: drives, `reactorClient`, `documentCache`); components read live data with the `@powerhousedao/reactor-browser` hooks.
|
|
29
31
|
- A route describes itself through `staticData`: `nav` lists it in the sidebar, `settings` makes it a settings tab, `sidebar` hides or collapses the sidebar, `modals` and `modalFrame` restyle modals.
|
|
30
|
-
- Connect's routes come from `@powerhousedao/connect-core`. Each route file exports `options`, everything but the component. A project file at the same path spreads `options` and sets its own `component
|
|
32
|
+
- Connect's routes come from `@powerhousedao/connect-core`. Each route file exports `options`, everything but the component. A project file at the same path spreads `options` and sets its own `component`; `ph build` and Studio warn when it doesn't.
|
|
31
33
|
- The generic plugin (`@powerhousedao/connect/plugins/generic`) draws Connect's sidebar, home, drive views and settings tabs. Without it, core's plain views show. A project's route files win over both.
|
|
32
|
-
- `@powerhousedao/connect/layout` exports core's layout parts. `@powerhousedao/connect/generic` adds the generic plugin's parts (`AppLayout`, `ConnectSidebar`, `OpenDocument`, `genericSettingsTabs`).
|
|
34
|
+
- `@powerhousedao/connect/layout` exports core's layout parts. `@powerhousedao/connect/generic` adds the generic plugin's parts (`AppLayout`, `ConnectSidebar`, `OpenDocument`, `genericSettingsTabs`, and the home's `ConnectHomeScreen`, `HomeDriveItem`, `HomeAddDriveItem` and `useVisibleDrives`).
|
|
33
35
|
|
|
34
36
|
## A first page
|
|
35
37
|
|
|
@@ -37,10 +39,9 @@ These paths are relative to this file, inside `node_modules/@powerhousedao/conne
|
|
|
37
39
|
// hosts/connect/routes/_app/inventory.tsx
|
|
38
40
|
import { useDrives } from "@powerhousedao/reactor-browser";
|
|
39
41
|
import { createFileRoute } from "@tanstack/react-router";
|
|
40
|
-
import { Box } from "lucide-react";
|
|
41
42
|
|
|
42
43
|
export const Route = createFileRoute("/_app/inventory")({
|
|
43
|
-
staticData: { nav: { label: "Inventory",
|
|
44
|
+
staticData: { nav: { label: "Inventory", order: 10 } },
|
|
44
45
|
component: Inventory,
|
|
45
46
|
});
|
|
46
47
|
|
|
@@ -52,23 +53,25 @@ function Inventory() {
|
|
|
52
53
|
|
|
53
54
|
## Rules that break builds
|
|
54
55
|
|
|
55
|
-
- **
|
|
56
|
+
- **One router.** `ph init` adds `@tanstack/react-router` as a peer and dev dependency at the version Connect is built with, and `ph migrate` adds it to older projects. Connect uses the project's copy, so don't add another version.
|
|
56
57
|
- **Route ids match the file.** `createFileRoute("...")` takes the file's id, `/_app/...` for files in `_app/`. A route outside `_app/` at the URL of one of Connect's fails the build.
|
|
57
58
|
- **Spread `options` when overriding** (`import { options } from "@powerhousedao/connect/routes/_app/..."`). Without them the route loses its loader, search params and title. The generic settings tabs have no route files: spread `genericSettingsTabs["<tab>"]` from `@powerhousedao/connect/generic` instead.
|
|
58
|
-
- **Navigate through the router.** Use `Link`, `useNavigate` or `useLinkProps`. A plain `href` reloads the whole app, so keep it for external links
|
|
59
|
+
- **Navigate through the router.** Use `Link`, `useNavigate` or `useLinkProps`. A plain `href` reloads the whole app, `modalHref()` links included, so keep it for external links; link to a modal with `useModalLinkProps(modal)`.
|
|
59
60
|
- **One Tailwind build.** `style.css` imports `@powerhousedao/connect/tailwind.css`, never `@powerhousedao/connect/style.css` or a package's compiled CSS.
|
|
60
61
|
- **The loading screen renders in Node.** `ph connect build` renders the layout and `_app`'s `pendingComponent` at build time, with no drives. Code on that path must not touch `window` while rendering, and must handle `useDrives()` being `undefined`.
|
|
61
|
-
- **Package routes can't import `@powerhousedao/connect`.** Routes a package offers to other Connects import from `@powerhousedao/connect-core`, `@tanstack/react-router
|
|
62
|
+
- **Package routes can't import `@powerhousedao/connect`.** Routes a package offers to other Connects import from `@powerhousedao/connect-core`, `@tanstack/react-router`, `@powerhousedao/reactor-browser`, the design system and the package's own code. Overrides of Connect's routes and of the generic settings tabs stay the project's, so they may.
|
|
63
|
+
- **`ph run` needs a flag.** `FEATURE_UNIFORM_RUNNERS_ENABLED=1 ph run <host> dev|build|serve`; see hosts-and-plugins.md for its output folder and ports.
|
|
62
64
|
- **Don't edit generated files.** `.ph/connect-routes.gen.ts` is regenerated from the routes folder.
|
|
63
65
|
|
|
64
66
|
## Check your work
|
|
65
67
|
|
|
66
|
-
|
|
68
|
+
`ph` is the global Powerhouse CLI (`ph-cmd`). A project without it runs the same commands with `pnpm exec ph-cli`, e.g. `pnpm exec ph-cli build`.
|
|
69
|
+
|
|
70
|
+
1. Run Vetra (`ph vetra`) or `ph connect studio`, and open the route's URL. Restart it after creating the routes folder for the first time, because the folder is detected at startup. Studio shows a loading screen that fails to render over the page and in its log.
|
|
67
71
|
2. Run `ph build`. It generates `.ph/connect-routes.gen.ts` and type-checks the routes. Unknown route ids in `createFileRoute`, `Link` or `useNavigate` mean the tree is stale or the tsconfig lacks the `route-tree` paths; see [types-and-troubleshooting.md](../../docs/customizing/types-and-troubleshooting.md).
|
|
68
72
|
3. When the layout or `_app`'s `pendingComponent` changed, run `ph connect build`. It prerenders the loading screen and fails on code that touches `window` while rendering.
|
|
69
73
|
|
|
70
74
|
## Reading Connect's source
|
|
71
75
|
|
|
72
76
|
- `node_modules/@powerhousedao/connect/src/routes/`: Connect's route files, the paths a project overrides.
|
|
73
|
-
-
|
|
74
|
-
- `node_modules/@powerhousedao/connect-core/src/routes/`: each core route's `options` and core's views.
|
|
77
|
+
- In `@powerhousedao/connect-core`'s folder, `src/router/` (`staticData` types, the router context, search params and titles) and `src/routes/` (each core route's `options` and core's views). pnpm doesn't link it into the project's `node_modules`; find it with `ls -d node_modules/.pnpm/@powerhousedao+connect-core@*/node_modules/@powerhousedao/connect-core`.
|
package/CUSTOMIZING.md
DELETED
|
@@ -1,80 +0,0 @@
|
|
|
1
|
-
# Customizing Connect
|
|
2
|
-
|
|
3
|
-
How a Powerhouse project (scaffolded by `ph init`) changes what Connect shows: its own pages, sidebar links, settings tabs, and the layout around them.
|
|
4
|
-
|
|
5
|
-
## TL;DR
|
|
6
|
-
|
|
7
|
-
Connect routes with [TanStack Router](https://tanstack.com/router) file routes. A project adds file routes to `hosts/connect/routes/`, and `ph connect build`, `ph connect studio` and `ph connect preview` mount them beside Connect's own routes in one router.
|
|
8
|
-
|
|
9
|
-
```
|
|
10
|
-
hosts/connect/routes/
|
|
11
|
-
├── _app.tsx optional: replaces Connect's layout (sidebar)
|
|
12
|
-
├── _app/
|
|
13
|
-
│ ├── inventory.tsx /inventory, inside the layout
|
|
14
|
-
│ └── settings/
|
|
15
|
-
│ └── inventory.tsx /settings/inventory, a settings tab
|
|
16
|
-
└── status.tsx /status, a full page without the layout
|
|
17
|
-
```
|
|
18
|
-
|
|
19
|
-
- A file in `_app/` renders inside Connect's layout, with the sidebar.
|
|
20
|
-
- Any other file renders as a full page.
|
|
21
|
-
- A route lists itself in the sidebar with `staticData.nav`, and adds a settings tab with `staticData.settings`.
|
|
22
|
-
- Route loaders read the app's PH store from the router context.
|
|
23
|
-
|
|
24
|
-
Connect's runtime settings (app name, drives, Renown, package registry) are the other way to customize it. They live in `powerhouse.config.json`; see [RUNTIME-CONFIG.md](./RUNTIME-CONFIG.md).
|
|
25
|
-
|
|
26
|
-
## Guides
|
|
27
|
-
|
|
28
|
-
| Guide | Covers |
|
|
29
|
-
| --- | --- |
|
|
30
|
-
| [Pages, sidebar links and settings tabs](./docs/customizing/pages.md) | Add a page, list it in the sidebar, hide the sidebar on it, add a settings tab, set the page title. |
|
|
31
|
-
| [Layout and the loading screen](./docs/customizing/layout.md) | Replace the sidebar or the whole layout; what the prerendered loading screen shows. |
|
|
32
|
-
| [Data and navigation](./docs/customizing/data-and-navigation.md) | Route loaders, the open drive and document, editor props, typed search params, navigating from editors. |
|
|
33
|
-
| [Override Connect's routes](./docs/customizing/overrides.md) | Replace home, the drive view, the open document, settings or the 404 page; slow routes, not found and errors. |
|
|
34
|
-
| [Modals](./docs/customizing/modals.md) | Routed modals, replacing a modal's view, framing every modal. |
|
|
35
|
-
| [Styles and branding](./docs/customizing/styles-and-branding.md) | The project's Tailwind build and theme tokens; app name and favicon per host. |
|
|
36
|
-
| [Hosts and plugins](./docs/customizing/hosts-and-plugins.md) | Routes per host, host plugins, the generic plugin and a plugin's UI. |
|
|
37
|
-
| [Extend Connect from a package](./docs/customizing/packages.md) | A package's routes in every Connect that loads it; registering routes from code. |
|
|
38
|
-
| [Types, troubleshooting and upgrading](./docs/customizing/types-and-troubleshooting.md) | The generated route tree, common symptoms, `ph migrate`. |
|
|
39
|
-
|
|
40
|
-
Coding agents start from the [customize-connect skill](./skills/customize-connect/SKILL.md), which links to these guides.
|
|
41
|
-
|
|
42
|
-
## UI screenshots of core's views
|
|
43
|
-
|
|
44
|
-
`ui:shots` in `@powerhousedao/connect-core` renders core's views in a real Connect and saves one PNG per scene to `packages/connect-core/.ui-shots/` (gitignored):
|
|
45
|
-
|
|
46
|
-
```sh
|
|
47
|
-
pnpm --filter @powerhousedao/connect-core ui:serve # Connect plus a browser window on seeded drives
|
|
48
|
-
pnpm --filter @powerhousedao/connect-core ui:shots # every scene
|
|
49
|
-
pnpm --filter @powerhousedao/connect-core ui:shots document-json --theme dark
|
|
50
|
-
pnpm --filter @powerhousedao/connect-core ui:shots --list
|
|
51
|
-
```
|
|
52
|
-
|
|
53
|
-
- Connect is a production build of `test/versioned-documents` (`ph connect build --outDir .ph/ui-shots/dist`), served by `ph connect preview` on `:4350` (`UI_SHOTS_CONNECT_PORT`, 4350-4359). The stack starts it unless the port answers, stops what it started, and rebuilds when the connect-core, Connect, builder-tools or project sources are newer than the build. `UI_CONNECT_DEV=1` runs `ph connect studio` instead.
|
|
54
|
-
- Each browser context overrides the served `powerhouse.config.json` with `connect.composition: []`, so the generic plugin is absent and core's views show. `--generic` keeps the classic chrome, for comparison.
|
|
55
|
-
- Each run seeds local drives through Connect's reactor: folders, a Todo document, Reactor Group documents (no editor, so the JSON view) and a drive whose `preferredEditor` is a drive app.
|
|
56
|
-
- Flags: `--width`, `--height`, `--out`; `UI_SHOTS_VERBOSE=1` prints the server logs. Scenes live in `SCENES` in `packages/connect-core/scripts/ui-shots.ts`.
|
|
57
|
-
|
|
58
|
-
## Reference: key files
|
|
59
|
-
|
|
60
|
-
| File | What it holds |
|
|
61
|
-
| --- | --- |
|
|
62
|
-
| `apps/connect/src/routes/` | Connect's routes, which a project's files override: core's `options` and core's views, which plugins' UI replaces. |
|
|
63
|
-
| `packages/connect-core/src/routes/` | Core's routes: each file's `options` and core's view. |
|
|
64
|
-
| `packages/connect-core/src/plugins/plugin-ui.ts` | Loading, merging and applying plugins' UI. |
|
|
65
|
-
| `apps/connect/src/generic/ui.tsx` | The generic plugin's UI. |
|
|
66
|
-
| `apps/connect/src/layout/index.ts` | The `@powerhousedao/connect/layout` exports: core's layout parts. |
|
|
67
|
-
| `apps/connect/src/generic/index.ts` | The `@powerhousedao/connect/generic` exports: the generic plugin's parts, with core's. |
|
|
68
|
-
| `packages/connect-core/src/router/sidebar.ts` | `staticData.nav` and `staticData.sidebar`. |
|
|
69
|
-
| `packages/connect-core/src/router/settings.ts` | `staticData.settings`. |
|
|
70
|
-
| `packages/connect-core/src/router/drive-route-loader.ts` | `ConnectRouterContext`. |
|
|
71
|
-
| `packages/connect-core/src/router/search.ts` | Search param parsing and the global params. |
|
|
72
|
-
| `packages/connect-core/src/router/titles.ts` | Connect's titles. |
|
|
73
|
-
| `packages/builder-tools/connect-utils/vite-plugins/connect-routes.ts` | Routes folder lookup and tree generation. |
|
|
74
|
-
| `apps/connect/tailwind.css` | Connect's Tailwind source, which a project's `style.css` imports. |
|
|
75
|
-
| `apps/connect/theme.css` | Connect's tokens without its classes, which a package's stylesheet references. |
|
|
76
|
-
| `packages/codegen/src/file-builders/boilerplate/migrate-style.ts` | `style.css` on `ph migrate`, and the package stylesheet `ph build` compiles. |
|
|
77
|
-
| `packages/builder-tools/connect-utils/vite-plugins/host-stylesheet.ts` | The host's `style.css`, added to the project's in the page's build. |
|
|
78
|
-
| `apps/connect/src/prerender/shell-css.ts` | The loading screen's CSS, built by Tailwind's compiler. |
|
|
79
|
-
| `packages/reactor-browser/src/hooks/navigation.ts`, `link-props.ts` | The navigation API for editors. |
|
|
80
|
-
| `test/versioned-documents/hosts/connect/routes/` | A working example project. |
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"CreateDocumentModal-B-cXzeOA.js","sources":["../src/generic/modals/CreateDocumentModal.tsx"],"sourcesContent":["import { CreateDocumentModal as ConnectCreateDocumentModal } from \"@powerhousedao/design-system/connect\";\nimport {\n addDocument,\n closePHModal,\n setSelectedNode,\n useDocumentModelModuleById,\n useNodeParentFolderById,\n usePHModal,\n} from \"@powerhousedao/reactor-browser\";\nimport { useDriveRouteData } from \"@powerhousedao/connect-core/router\";\n\nexport const CreateDocumentModal: React.FC = () => {\n const phModal = usePHModal();\n const open = phModal?.type === \"createDocument\";\n const documentType = open ? phModal.documentType : undefined;\n const documentModelVersion = open ? phModal.documentModelVersion : undefined;\n const documentModel = useDocumentModelModuleById(\n documentType,\n documentModelVersion,\n );\n // In the open folder, else beside the open document.\n const { drive, folder, documentId } = useDriveRouteData();\n const parentFolder = useNodeParentFolderById(documentId);\n\n const onCreateDocument = async (documentName: string) => {\n closePHModal();\n if (!drive || !documentModel) return;\n\n const node = await addDocument(\n drive.header.id,\n documentName || `New ${documentModel.documentModel.global.name}`,\n documentModel.documentModel.global.id,\n folder?.id ?? parentFolder?.id,\n undefined,\n undefined,\n undefined,\n documentModelVersion,\n );\n setSelectedNode(node);\n };\n\n return (\n <ConnectCreateDocumentModal\n open={open}\n onContinue={(documentName) => {\n void onCreateDocument(documentName);\n }}\n onOpenChange={(status: boolean) => {\n if (!status) return closePHModal();\n }}\n />\n );\n};\n"],"names":["ConnectCreateDocumentModal"],"mappings":";;;;;;;AAWA,MAAa,4BAAsC;CACjD,MAAM,UAAU,WAAW;CAC3B,MAAM,OAAO,SAAS,SAAS;CAC/B,MAAM,eAAe,OAAO,QAAQ,eAAe,KAAA;CACnD,MAAM,uBAAuB,OAAO,QAAQ,uBAAuB,KAAA;CACnE,MAAM,gBAAgB,2BACpB,cACA,oBACF;CAEA,MAAM,EAAE,OAAO,QAAQ,eAAe,kBAAkB;CACxD,MAAM,eAAe,wBAAwB,UAAU;CAEvD,MAAM,mBAAmB,OAAO,iBAAyB;EACvD,aAAa;EACb,IAAI,CAAC,SAAS,CAAC,eAAe;EAE9B,MAAM,OAAO,MAAM,YACjB,MAAM,OAAO,IACb,gBAAgB,OAAO,cAAc,cAAc,OAAO,QAC1D,cAAc,cAAc,OAAO,IACnC,QAAQ,MAAM,cAAc,IAC5B,KAAA,GACA,KAAA,GACA,KAAA,GACA,oBACF;EACA,gBAAgB,IAAI;CACtB;CAEA,OACE,oBAACA,uBAAD;EACQ;EACN,aAAa,iBAAiB;GAC5B,iBAAsB,YAAY;EACpC;EACA,eAAe,WAAoB;GACjC,IAAI,CAAC,QAAQ,OAAO,aAAa;EACnC;CACD,CAAA;AAEL","debug_id":"80191016-ed64-5a35-8eb6-56700d13ea19"}
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
import { t as AppLoader } from "./app-loader-casiq2T2.js";
|
|
2
|
-
export { AppLoader };
|
|
3
|
-
!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="b574d743-3a4c-5cf3-b3a6-062087129ff7")}catch(e){}}();
|
|
4
|
-
//# debugId=b574d743-3a4c-5cf3-b3a6-062087129ff7
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"connect.config-D1pGNmaF.js","sources":["../src/utils/openpanel-config.ts","../src/connect.config.ts"],"sourcesContent":["import type { PHConnectOpenPanel } from \"@powerhousedao/shared/clis\";\n\n/** The build-time (Vite env) OpenPanel settings, as parsed by loadRuntimeEnv. */\nexport type OpenPanelBuildEnv = {\n PH_CONNECT_OPENPANEL_CLIENT_ID?: string;\n PH_CONNECT_OPENPANEL_API_URL?: string;\n PH_CONNECT_OPENPANEL_TRACK_UI_EVENTS: boolean;\n PH_CONNECT_OPENPANEL_TRACK_OPERATIONS: boolean;\n};\n\nexport type ResolvedOpenPanelConfig = {\n clientId: string;\n apiUrl: string | undefined;\n trackUiEvents: boolean;\n trackOperations: boolean;\n};\n\n/**\n * Resolve Connect's OpenPanel settings. The runtime config\n * (`connect.openPanel`, settable per deploy via PH_CONNECT_CONFIG_JSON) wins;\n * the build-time PH_CONNECT_OPENPANEL_* env is the fallback so builds that\n * bake it keep working. An empty clientId leaves OpenPanel disabled.\n */\nexport function resolveOpenPanelConfig(\n runtime: PHConnectOpenPanel | undefined,\n env: OpenPanelBuildEnv,\n): ResolvedOpenPanelConfig {\n return {\n clientId: runtime?.clientId || env.PH_CONNECT_OPENPANEL_CLIENT_ID || \"\",\n apiUrl: runtime?.apiUrl || env.PH_CONNECT_OPENPANEL_API_URL || undefined,\n trackUiEvents:\n runtime?.trackUiEvents ?? env.PH_CONNECT_OPENPANEL_TRACK_UI_EVENTS,\n trackOperations:\n runtime?.trackOperations ?? env.PH_CONNECT_OPENPANEL_TRACK_OPERATIONS,\n };\n}\n","import {\n setLogLevel,\n type PHAppConfig,\n type PHDocumentEditorConfig,\n type PHGlobalConfig,\n} from \"@powerhousedao/reactor-browser\";\nimport type { PHConnectRuntimeConfig } from \"@powerhousedao/shared/clis\";\nimport {\n loadRuntimeEnv,\n normalizeBasePath,\n} from \"@powerhousedao/shared/connect\";\nimport { logger } from \"document-model\";\nimport { getRuntimeConfig } from \"@powerhousedao/connect-core/runtime-config\";\nimport { resolveOpenPanelConfig } from \"./utils/openpanel-config.js\";\n\n// Env vars are reserved for version stamps and analytics processor toggles.\n// Everything in the Connect runtime schema (PHConnectRuntimeConfig) is read\n// from `runtime` below. The Sentry release tag is stamped at build time via\n// Vite's `define` so it always matches the sourcemap upload tag CI used.\nexport const env = loadRuntimeEnv({\n processEnv: import.meta.env,\n});\n\ndeclare const PH_CONNECT_SENTRY_RELEASE: string;\n\n// Runtime fields come from the JSON, not env. start-connect.tsx's top-level\n// await guarantees the loader cache is warm by the time this module\n// evaluates, so getRuntimeConfig() resolves synchronously. The cache merges\n// DEFAULT_CONNECT_CONFIG into whatever the file declared, so every leaf\n// under `runtime.*` is guaranteed defined.\nconst runtime = getRuntimeConfig().connect;\n\nfunction getRouterBasenameFromBasePath(basePath: string) {\n return basePath.endsWith(\"/\") ? basePath : basePath + \"/\";\n}\n\n// Runtime deploy base. In dynamic-base builds the plugin rewrites\n// import.meta.env.BASE_URL to (globalThis.__PH_DYNAMIC_BASE__||\"/\"), the same\n// base assets resolve against; it takes precedence so router basename and\n// path stripping match the served subpath. A baked runtime base path\n// (runtime.app.basePath) only applies to concrete-base builds, where the\n// dynamic global is unset.\nfunction getDeployBasePath() {\n if (\n typeof globalThis !== \"undefined\" &&\n (globalThis as { __PH_DYNAMIC_BASE__?: string }).__PH_DYNAMIC_BASE__\n ) {\n return import.meta.env.BASE_URL;\n }\n return runtime.app?.basePath || import.meta.env.BASE_URL;\n}\n\n// Hardcoded literal defaults for `PHGlobalConfig` fields whose env-var\n// source was removed. The fields stay on the type so wired-but-dead SW /\n// hook consumers keep typechecking; values mirror the previous Zod\n// defaults.\nfunction getBuiltInDefaults(): Omit<\n PHGlobalConfig,\n \"basePath\" | \"routerBasename\"\n> {\n const studioMode = runtime.app?.studioMode ?? false;\n // Drive containers, DocumentModel, and vetra builder-spec types are authored\n // via their own drives — never creatable from a generic drive.\n const disabledEditors = [\n \"powerhouse/document-drive\",\n \"powerhouse/reactor-drive\",\n \"powerhouse/document-model\",\n \"powerhouse/app\",\n \"powerhouse/document-editor\",\n \"powerhouse/processor\",\n \"powerhouse/subgraph\",\n \"powerhouse/package\",\n ];\n return {\n allowList: undefined,\n allowedDocumentTypes: [],\n isDragAndDropEnabled: true,\n isEditorDebugModeEnabled: false,\n isEditorReadModeEnabled: false,\n isExternalControlsEnabled: false,\n version: env.PH_CONNECT_VERSION,\n logLevel: runtime.app?.logLevel,\n requiresHardRefresh: true,\n warnOutdatedApp: true,\n studioMode,\n versionCheckInterval: 60 * 60 * 1000,\n cliVersion: env.PH_CONNECT_CLI_VERSION,\n fileUploadOperationsChunkSize: 50,\n gaTrackingId: undefined,\n defaultDrivesUrl: runtime.drives?.defaultDrives?.find(\n (drive) => \"url\" in drive,\n )?.url,\n drivesPreserveStrategy: runtime.drives?.preserveStrategy,\n enabledEditors: undefined,\n disabledEditors,\n\n /* Processors */\n isExternalProcessorsEnabled: true,\n // Analytics off by default; flip to true (or wire a runtime-config field)\n // when we want analytics enabled out of the box.\n isAnalyticsEnabled: false,\n isAnalyticsExternalProcessorsEnabled:\n env.PH_CONNECT_EXTERNAL_ANALYTICS_PROCESSORS_ENABLED,\n analyticsDatabaseName: undefined,\n isRelationalProcessorsEnabled: true,\n isExternalRelationalProcessorsEnabled: true,\n\n renownUrl: runtime.renown?.url,\n renownNetworkId: runtime.renown?.networkId,\n renownChainId: runtime.renown?.chainId,\n switchboardUrl: runtime.renown?.switchboardUrl,\n renownAdapters: runtime.renown?.adapters,\n sentryRelease: PH_CONNECT_SENTRY_RELEASE,\n sentryDsn: runtime.sentry?.dsn ?? undefined,\n sentryEnv: runtime.sentry?.env,\n isDiffAnalyticsEnabled: env.PH_CONNECT_DIFF_ANALYTICS_ENABLED,\n isDriveAnalyticsEnabled: env.PH_CONNECT_DRIVE_ANALYTICS_ENABLED,\n isPublicDrivesEnabled: runtime.drives?.sections?.remote?.enabled,\n isCloudDrivesEnabled: runtime.drives?.sections?.remote?.enabled ?? true,\n isLocalDrivesEnabled: runtime.drives?.sections?.local?.enabled,\n isSentryTracingEnabled: runtime.sentry?.tracing,\n isDocumentModelSelectionSettingsEnabled: false,\n isAddDriveEnabled: runtime.drives?.allowAddDrive,\n isAddPublicDrivesEnabled: runtime.drives?.sections?.remote?.allowAdd,\n isDeletePublicDrivesEnabled: runtime.drives?.sections?.remote?.allowDelete,\n isAddCloudDrivesEnabled: runtime.drives?.sections?.remote?.allowAdd ?? true,\n isDeleteCloudDrivesEnabled:\n runtime.drives?.sections?.remote?.allowDelete ?? true,\n isAddLocalDrivesEnabled: runtime.drives?.sections?.local?.allowAdd,\n isDeleteLocalDrivesEnabled: runtime.drives?.sections?.local?.allowDelete,\n isAnalyticsDatabaseWorkerEnabled: false,\n isExternalPackagesEnabled: runtime.packages?.externalEnabled,\n };\n}\n\nexport function buildPHGlobalConfig(\n basePath: string,\n routerBasename: string,\n connectFromConfig: PHConnectRuntimeConfig,\n): PHGlobalConfig {\n const defaults = getBuiltInDefaults();\n const fileOverrides: Partial<PHGlobalConfig> = {};\n\n if (connectFromConfig.drives?.allowAddDrive !== undefined) {\n fileOverrides.isAddDriveEnabled = connectFromConfig.drives.allowAddDrive;\n }\n\n return {\n basePath,\n routerBasename,\n ...defaults,\n ...fileOverrides,\n };\n}\n\nfunction getPHGlobalConfigFromRuntime(): PHGlobalConfig {\n // Deploy base wins via getDeployBasePath: the dynamic-base global when set,\n // else runtime.app.basePath (DEFAULT_CONNECT_CONFIG guarantees it defined),\n // with a \"/\" fallback as a defensive guard for typecheck.\n const basePath = getDeployBasePath() ?? \"/\";\n const routerBasename = getRouterBasenameFromBasePath(basePath);\n return buildPHGlobalConfig(basePath, routerBasename, runtime);\n}\n\nexport const phGlobalConfig = getPHGlobalConfigFromRuntime();\n\nexport const defaultPHDocumentEditorConfig: PHDocumentEditorConfig = {\n isExternalControlsEnabled: phGlobalConfig.isExternalControlsEnabled,\n};\n\nexport const defaultPHAppConfig: PHAppConfig = {\n allowedDocumentTypes: phGlobalConfig.allowedDocumentTypes,\n isDragAndDropEnabled: phGlobalConfig.isDragAndDropEnabled,\n};\n\n// Set log level from the runtime config (DEFAULT_CONNECT_CONFIG provides a\n// fallback, so this is always defined).\nconst RESOLVED_LOG_LEVEL = runtime.app?.logLevel;\nif (RESOLVED_LOG_LEVEL) {\n setLogLevel(RESOLVED_LOG_LEVEL);\n}\nlogger.debug(\"Setting log level to @level.\", RESOLVED_LOG_LEVEL);\n\n// Normalize the base path to ensure it starts and ends with a forward slash.\nexport const PH_CONNECT_BASE_PATH = normalizeBasePath(\n getDeployBasePath() ?? \"/\",\n);\n\n// Analytics database name — derived deterministically from the base path so\n// instances on different prefixes of one origin do not share an analytics DB.\n// Root resolves to \":analytics\".\nconst PH_CONNECT_ANALYTICS_DATABASE_NAME = `${PH_CONNECT_BASE_PATH.replace(\n /\\//g,\n \"\",\n)}:analytics`;\n\n// The CLOUD section was collapsed into the unified `remote` section. PUBLIC\n// keeps its existing string identifier in the legacy\n// connectConfig.drives.sections map to avoid rippling through downstream UI\n// components — both PUBLIC and the\n// soon-to-be-removed CLOUD readers point at runtime.drives.sections.remote.\nexport const connectConfig = {\n appVersion: env.PH_CONNECT_VERSION,\n studioMode: runtime.app?.studioMode ?? false,\n // Boot-time constant, so it is read straight off the runtime config rather\n // than through the PHGlobalConfig event machinery. Off unless turned on.\n workflowsEnabled: runtime.app?.workflowsEnabled ?? false,\n warnOutdatedApp: phGlobalConfig.warnOutdatedApp,\n appVersionCheckInterval: 60 * 60 * 1000,\n routerBasename: PH_CONNECT_BASE_PATH,\n offline: runtime.app?.offline ?? true,\n aiAssistantEnabled: runtime.ai?.assistantEnabled ?? false,\n externalPackagesEnabled: runtime.packages?.externalEnabled,\n processors: {\n enabled: true,\n externalProcessorsEnabled: true,\n },\n analytics: {\n enabled: true,\n databaseName: PH_CONNECT_ANALYTICS_DATABASE_NAME,\n useWorker: false,\n driveAnalyticsEnabled: env.PH_CONNECT_DRIVE_ANALYTICS_ENABLED,\n diffProcessorEnabled: env.PH_CONNECT_DIFF_ANALYTICS_ENABLED,\n externalProcessorsEnabled: true,\n },\n relational: {\n enabled: true,\n externalProcessorsEnabled: true,\n },\n // Runtime `connect.openPanel` wins; the build-time PH_CONNECT_OPENPANEL_*\n // env is the fallback. An empty clientId (the default) keeps it disabled.\n // `trackUiEvents` is intentionally dormant — no call sites gate on it yet.\n openPanel: resolveOpenPanelConfig(runtime.openPanel, env),\n renown: {\n url: runtime.renown?.url,\n networkId: runtime.renown?.networkId,\n chainId: runtime.renown?.chainId,\n namespace: runtime.renown?.namespace,\n switchboardUrl: runtime.renown?.switchboardUrl,\n adapters: runtime.renown?.adapters,\n },\n sentry: {\n release: PH_CONNECT_SENTRY_RELEASE,\n // `dsn: null` (default) means Sentry is disabled — useInitSentry bails.\n dsn: runtime.sentry?.dsn ?? null,\n env: runtime.sentry?.env,\n tracing: runtime.sentry?.tracing ?? false,\n },\n content: {\n showSearchBar: false,\n showDocumentModelSelectionSetting: false,\n },\n drives: {\n addDriveEnabled: runtime.drives?.allowAddDrive,\n preserveStrategy: runtime.drives?.preserveStrategy,\n // The legacy `SharingType` enum still includes a \"CLOUD\" variant.\n // Connect collapsed CLOUD into the unified remote section, so both CLOUD\n // and PUBLIC map to the same `runtime.drives.sections.remote` object —\n // the alias keeps `sections[sharingType]` lookups type-safe for every\n // SharingType value.\n sections: (() => {\n const remote = {\n enabled: runtime.drives?.sections?.remote?.enabled,\n allowAdd: runtime.drives?.sections?.remote?.allowAdd,\n allowDelete: runtime.drives?.sections?.remote?.allowDelete,\n };\n return {\n LOCAL: {\n enabled: runtime.drives?.sections?.local?.enabled,\n allowAdd: runtime.drives?.sections?.local?.allowAdd,\n allowDelete: runtime.drives?.sections?.local?.allowDelete,\n },\n PUBLIC: remote,\n CLOUD: remote,\n };\n })(),\n },\n gaTrackingId: undefined,\n phCliVersion: env.PH_CONNECT_CLI_VERSION,\n} as const;\n"],"names":[],"mappings":"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","debug_id":"972c4b6d-757b-5a6e-a5dc-4a4c89222173"}
|