@powerhousedao/connect 6.2.3-dev.73 → 6.2.3-dev.74

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (41) hide show
  1. package/dist/{ClearStorageModal-UrKsUfAG.js → ClearStorageModal-BAs06koT.js} +4 -4
  2. package/dist/{ClearStorageModal-UrKsUfAG.js.map → ClearStorageModal-BAs06koT.js.map} +1 -1
  3. package/dist/{DebugSettingsModal-CgGazj3J.js → DebugSettingsModal-B-vQv43w.js} +4 -4
  4. package/dist/{DebugSettingsModal-CgGazj3J.js.map → DebugSettingsModal-B-vQv43w.js.map} +1 -1
  5. package/dist/{InspectorModal-Dvfzy6Q2.js → InspectorModal-d75vwZXi.js} +4 -4
  6. package/dist/{InspectorModal-Dvfzy6Q2.js.map → InspectorModal-d75vwZXi.js.map} +1 -1
  7. package/dist/{app-loader-b3At29LQ.js → app-loader-DY5d_p9f.js} +4 -4
  8. package/dist/{app-loader-b3At29LQ.js.map → app-loader-DY5d_p9f.js.map} +1 -1
  9. package/dist/app-loader-HXeSdSMZ.js +4 -0
  10. package/dist/{boot-BbECCfkE.js → boot-D2alGwqP.js} +4 -4
  11. package/dist/{boot-BbECCfkE.js.map → boot-D2alGwqP.js.map} +1 -1
  12. package/dist/{build-info-BS1JT5IX.js → build-info-CCIiEXQk.js} +5 -5
  13. package/dist/{build-info-BS1JT5IX.js.map → build-info-CCIiEXQk.js.map} +1 -1
  14. package/dist/{components-C3f6Ci7V.js → components-CkA2pg2N.js} +4 -4
  15. package/dist/{components-C3f6Ci7V.js.map → components-CkA2pg2N.js.map} +1 -1
  16. package/dist/generic.js +1 -1
  17. package/dist/{load-Dx-ssjO5.js → load-By5vUsT4.js} +6 -6
  18. package/dist/{load-Dx-ssjO5.js.map → load-By5vUsT4.js.map} +1 -1
  19. package/dist/{load-runtime-config-BVBJKjyd.js → load-runtime-config-DLRJpv_3.js} +4 -4
  20. package/dist/{load-runtime-config-BVBJKjyd.js.map → load-runtime-config-DLRJpv_3.js.map} +1 -1
  21. package/dist/main.js +2 -2
  22. package/dist/{package-manager-DzxMzlms.js → package-manager-BVTVLqzW.js} +6 -6
  23. package/dist/{package-manager-DzxMzlms.js.map → package-manager-BVTVLqzW.js.map} +1 -1
  24. package/dist/{plugins-BUSgAzk9.js → plugins-bza5fE9s.js} +4 -4
  25. package/dist/{plugins-BUSgAzk9.js.map → plugins-bza5fE9s.js.map} +1 -1
  26. package/dist/prerender.js +1 -1
  27. package/dist/{reactor-DJVGEQho.js → reactor-Du-IBSNA.js} +5 -5
  28. package/dist/{reactor-DJVGEQho.js.map → reactor-Du-IBSNA.js.map} +1 -1
  29. package/dist/{settings-CiB17TJY.js → settings-CsHGlVY8.js} +6 -6
  30. package/dist/{settings-CiB17TJY.js.map → settings-CsHGlVY8.js.map} +1 -1
  31. package/dist/{settings-tabs-V0EGYnyB.js → settings-tabs-BTXdJi6Z.js} +4 -4
  32. package/dist/{settings-tabs-V0EGYnyB.js.map → settings-tabs-BTXdJi6Z.js.map} +1 -1
  33. package/dist/start-connect.js +2 -2
  34. package/dist/{ui-Jmmy7K8U.js → ui-CeG6ny6D.js} +7 -7
  35. package/dist/{ui-Jmmy7K8U.js.map → ui-CeG6ny6D.js.map} +1 -1
  36. package/docs/customizing/data-and-navigation.md +21 -0
  37. package/docs/customizing/drive-apps.md +1 -1
  38. package/docs/customizing/styles-and-branding.md +1 -1
  39. package/docs/customizing/types-and-troubleshooting.md +2 -2
  40. package/package.json +16 -16
  41. package/dist/app-loader-Ho1-z1fv.js +0 -4
@@ -1 +1 @@
1
- {"version":3,"file":"ui-Jmmy7K8U.js","sources":["../src/generic/modals.ts","../src/generic/ui.tsx"],"sourcesContent":["import type { ConnectModals } from \"@powerhousedao/connect-core/router\";\nimport { lazy } from \"react\";\n\nconst AddDriveModal = lazy(() =>\n import(\"./modals/AddDriveModal.js\").then((m) => ({\n default: m.AddDriveModal,\n })),\n);\nconst ClearStorageModal = lazy(() =>\n import(\"./modals/ClearStorageModal.js\").then((m) => ({\n default: m.ClearStorageModal,\n })),\n);\nconst CreateDocumentModal = lazy(() =>\n import(\"./modals/CreateDocumentModal.js\").then((m) => ({\n default: m.CreateDocumentModal,\n })),\n);\nconst DebugSettingsModal = lazy(() =>\n import(\"./modals/DebugSettingsModal.js\").then((m) => ({\n default: m.DebugSettingsModal,\n })),\n);\nconst DeleteDriveModal = lazy(() =>\n import(\"./modals/DeleteDriveModal.js\").then((m) => ({\n default: m.DeleteDriveModal,\n })),\n);\nconst DeleteItemModal = lazy(() =>\n import(\"./modals/DeleteItemModal.js\").then((m) => ({\n default: m.DeleteItemModal,\n })),\n);\nconst DisclaimerModal = lazy(() =>\n import(\"./modals/DisclaimerModal.js\").then((m) => ({\n default: m.DisclaimerModal,\n })),\n);\nconst DriveSettingsModal = lazy(() =>\n import(\"./modals/DriveSettingsModal.js\").then((m) => ({\n default: m.DriveSettingsModal,\n })),\n);\nconst DownloadDocumentWithErrorsModal = lazy(() =>\n import(\"./modals/DownloadDocumentWithErrorsModal.js\").then((m) => ({\n default: m.DownloadDocumentWithErrorsModal,\n })),\n);\nconst DocumentVersionUnsupportedModal = lazy(() =>\n import(\"./modals/DocumentVersionUnsupportedModal.js\").then((m) => ({\n default: m.DocumentVersionUnsupportedModal,\n })),\n);\nconst ConfirmDocumentUpgradeModal = lazy(() =>\n import(\"./modals/ConfirmDocumentUpgradeModal.js\").then((m) => ({\n default: m.ConfirmDocumentUpgradeModal,\n })),\n);\nconst UpgradeDriveModal = lazy(() =>\n import(\"./modals/UpgradeDriveModal.js\").then((m) => ({\n default: m.UpgradeDriveModal,\n })),\n);\nconst InspectorModal = lazy(() =>\n import(\"./modals/InspectorModal/index.js\").then((m) => ({\n default: m.InspectorModal,\n })),\n);\nconst DriveAuthRequiredModal = lazy(() =>\n import(\"./modals/DriveAuthRequiredModal.js\").then((m) => ({\n default: m.DriveAuthRequiredModal,\n })),\n);\nconst LoginModal = lazy(() =>\n import(\"./modals/LoginModal.js\").then((m) => ({\n default: m.LoginModal,\n })),\n);\n\n/** The generic plugin's modals: its chrome's, and core's in its style.\n * \"settings\" is a page; showPHModal navigates to it. */\nexport const genericModals: ConnectModals = {\n addDrive: AddDriveModal,\n clearStorage: ClearStorageModal,\n createDocument: CreateDocumentModal,\n debugSettings: DebugSettingsModal,\n deleteDrive: DeleteDriveModal,\n deleteItem: DeleteItemModal,\n disclaimer: DisclaimerModal,\n driveSettings: DriveSettingsModal,\n downloadDocumentWithErrors: DownloadDocumentWithErrorsModal,\n documentVersionUnsupported: DocumentVersionUnsupportedModal,\n confirmDocumentUpgrade: ConfirmDocumentUpgradeModal,\n inspector: InspectorModal,\n upgradeDrive: UpgradeDriveModal,\n driveAuthRequired: DriveAuthRequiredModal,\n login: LoginModal,\n};\n","// The generic plugin's UI: Connect's sidebar, drives, editors, settings and\n// modals over core's routes. Loaded only while the plugin is active.\nimport type { ConnectPluginUi } from \"@powerhousedao/connect-core/plugins\";\nimport { AppLayout } from \"./layout/app-layout.js\";\nimport { DrivePending, RouteError } from \"./layout/route-views.js\";\nimport { genericModals } from \"./modals.js\";\nimport { DriveLayout, Home, NodeView } from \"./pages/content.js\";\nimport { SettingsPage } from \"./settings/tabs.js\";\nimport { settingsTabRoutes } from \"./settings-tabs.js\";\n\nconst GenericLayout = () => <AppLayout />;\n\nconst genericUi: ConnectPluginUi = {\n routes: {\n \"/_app\": { component: GenericLayout },\n \"/_app/\": { component: Home },\n \"/_app/d/$driveSlug\": {\n component: DriveLayout,\n pendingComponent: DrivePending,\n },\n \"/_app/d/$driveSlug/{-$nodeSlug}\": {\n component: NodeView,\n pendingComponent: DrivePending,\n },\n \"/_app/settings\": { component: SettingsPage },\n // Core's tabs; the package manager and the theme toggle replace them.\n \"/_app/settings/appearance\": { staticData: { settings: undefined } },\n \"/_app/settings/packages\": { staticData: { settings: undefined } },\n },\n addRoutes: settingsTabRoutes,\n modals: genericModals,\n errorComponent: RouteError,\n commonEditors: true,\n};\n\nexport default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;CACf,aAAa;CACb,YAAY;CACZ,YAAY;CACZ,eAAe;CACf,4BAA4B;CAC5B,4BAA4B;CAC5B,wBAAwB;CACxB,WA9BqB,WACrB,OAAO,+BAAmC,CAAC,MAAM,OAAO,EACtD,SAAS,EAAE,eACb,EAAE,CA2BS;CACX,cAAc;CACd,mBA3B6B,WAC7B,OAAO,uCAAqC,CAAC,MAAM,OAAO,EACxD,SAAS,EAAE,uBACb,EAAE,CAwBiB;CACnB,OAvBiB,WACjB,OAAO,2BAAyB,CAAC,MAAM,OAAO,EAC5C,SAAS,EAAE,WACb,EAAE,CAoBK;AACT;;;ACvFA,MAAM,sBAAsB,oBAAC,WAAD,CAAY,CAAA;AAExC,MAAM,YAA6B;CACjC,QAAQ;EACN,SAAS,EAAE,WAAW,cAAc;EACpC,UAAU,EAAE,WAAW,KAAK;EAC5B,sBAAsB;GACpB,WAAW;GACX,kBAAkB;EACpB;EACA,mCAAmC;GACjC,WAAW;GACX,kBAAkB;EACpB;EACA,kBAAkB,EAAE,WAAW,aAAa;EAE5C,6BAA6B,EAAE,YAAY,EAAE,UAAU,KAAA,EAAU,EAAE;EACnE,2BAA2B,EAAE,YAAY,EAAE,UAAU,KAAA,EAAU,EAAE;CACnE;CACA,WAAW;CACX,QAAQ;CACR,gBAAgB;CAChB,eAAe;AACjB","debug_id":"ccb84cbf-61ce-53d1-bb84-cc9b2fdd8e15"}
1
+ {"version":3,"file":"ui-CeG6ny6D.js","sources":["../src/generic/modals.ts","../src/generic/ui.tsx"],"sourcesContent":["import type { ConnectModals } from \"@powerhousedao/connect-core/router\";\nimport { lazy } from \"react\";\n\nconst AddDriveModal = lazy(() =>\n import(\"./modals/AddDriveModal.js\").then((m) => ({\n default: m.AddDriveModal,\n })),\n);\nconst ClearStorageModal = lazy(() =>\n import(\"./modals/ClearStorageModal.js\").then((m) => ({\n default: m.ClearStorageModal,\n })),\n);\nconst CreateDocumentModal = lazy(() =>\n import(\"./modals/CreateDocumentModal.js\").then((m) => ({\n default: m.CreateDocumentModal,\n })),\n);\nconst DebugSettingsModal = lazy(() =>\n import(\"./modals/DebugSettingsModal.js\").then((m) => ({\n default: m.DebugSettingsModal,\n })),\n);\nconst DeleteDriveModal = lazy(() =>\n import(\"./modals/DeleteDriveModal.js\").then((m) => ({\n default: m.DeleteDriveModal,\n })),\n);\nconst DeleteItemModal = lazy(() =>\n import(\"./modals/DeleteItemModal.js\").then((m) => ({\n default: m.DeleteItemModal,\n })),\n);\nconst DisclaimerModal = lazy(() =>\n import(\"./modals/DisclaimerModal.js\").then((m) => ({\n default: m.DisclaimerModal,\n })),\n);\nconst DriveSettingsModal = lazy(() =>\n import(\"./modals/DriveSettingsModal.js\").then((m) => ({\n default: m.DriveSettingsModal,\n })),\n);\nconst DownloadDocumentWithErrorsModal = lazy(() =>\n import(\"./modals/DownloadDocumentWithErrorsModal.js\").then((m) => ({\n default: m.DownloadDocumentWithErrorsModal,\n })),\n);\nconst DocumentVersionUnsupportedModal = lazy(() =>\n import(\"./modals/DocumentVersionUnsupportedModal.js\").then((m) => ({\n default: m.DocumentVersionUnsupportedModal,\n })),\n);\nconst ConfirmDocumentUpgradeModal = lazy(() =>\n import(\"./modals/ConfirmDocumentUpgradeModal.js\").then((m) => ({\n default: m.ConfirmDocumentUpgradeModal,\n })),\n);\nconst UpgradeDriveModal = lazy(() =>\n import(\"./modals/UpgradeDriveModal.js\").then((m) => ({\n default: m.UpgradeDriveModal,\n })),\n);\nconst InspectorModal = lazy(() =>\n import(\"./modals/InspectorModal/index.js\").then((m) => ({\n default: m.InspectorModal,\n })),\n);\nconst DriveAuthRequiredModal = lazy(() =>\n import(\"./modals/DriveAuthRequiredModal.js\").then((m) => ({\n default: m.DriveAuthRequiredModal,\n })),\n);\nconst LoginModal = lazy(() =>\n import(\"./modals/LoginModal.js\").then((m) => ({\n default: m.LoginModal,\n })),\n);\n\n/** The generic plugin's modals: its chrome's, and core's in its style.\n * \"settings\" is a page; showPHModal navigates to it. */\nexport const genericModals: ConnectModals = {\n addDrive: AddDriveModal,\n clearStorage: ClearStorageModal,\n createDocument: CreateDocumentModal,\n debugSettings: DebugSettingsModal,\n deleteDrive: DeleteDriveModal,\n deleteItem: DeleteItemModal,\n disclaimer: DisclaimerModal,\n driveSettings: DriveSettingsModal,\n downloadDocumentWithErrors: DownloadDocumentWithErrorsModal,\n documentVersionUnsupported: DocumentVersionUnsupportedModal,\n confirmDocumentUpgrade: ConfirmDocumentUpgradeModal,\n inspector: InspectorModal,\n upgradeDrive: UpgradeDriveModal,\n driveAuthRequired: DriveAuthRequiredModal,\n login: LoginModal,\n};\n","// The generic plugin's UI: Connect's sidebar, drives, editors, settings and\n// modals over core's routes. Loaded only while the plugin is active.\nimport type { ConnectPluginUi } from \"@powerhousedao/connect-core/plugins\";\nimport { AppLayout } from \"./layout/app-layout.js\";\nimport { DrivePending, RouteError } from \"./layout/route-views.js\";\nimport { genericModals } from \"./modals.js\";\nimport { DriveLayout, Home, NodeView } from \"./pages/content.js\";\nimport { SettingsPage } from \"./settings/tabs.js\";\nimport { settingsTabRoutes } from \"./settings-tabs.js\";\n\nconst GenericLayout = () => <AppLayout />;\n\nconst genericUi: ConnectPluginUi = {\n routes: {\n \"/_app\": { component: GenericLayout },\n \"/_app/\": { component: Home },\n \"/_app/d/$driveSlug\": {\n component: DriveLayout,\n pendingComponent: DrivePending,\n },\n \"/_app/d/$driveSlug/{-$nodeSlug}\": {\n component: NodeView,\n pendingComponent: DrivePending,\n },\n \"/_app/settings\": { component: SettingsPage },\n // Core's tabs; the package manager and the theme toggle replace them.\n \"/_app/settings/appearance\": { staticData: { settings: undefined } },\n \"/_app/settings/packages\": { staticData: { settings: undefined } },\n },\n addRoutes: settingsTabRoutes,\n modals: genericModals,\n errorComponent: RouteError,\n commonEditors: true,\n};\n\nexport default genericUi;\n"],"names":[],"mappings":";;;;;;AAGA,MAAM,gBAAgB,WACpB,OAAO,8BAA4B,CAAC,MAAM,OAAO,EAC/C,SAAS,EAAE,cACb,EAAE,CAC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AmC,CAAC,MAAM,OAAO,EACtD,SAAS,EAAE,eACb,EAAE,CA2BS;CACX,cAAc;CACd,mBA3B6B,WAC7B,OAAO,uCAAqC,CAAC,MAAM,OAAO,EACxD,SAAS,EAAE,uBACb,EAAE,CAwBiB;CACnB,OAvBiB,WACjB,OAAO,2BAAyB,CAAC,MAAM,OAAO,EAC5C,SAAS,EAAE,WACb,EAAE,CAoBK;AACT;;;ACvFA,MAAM,sBAAsB,oBAAC,WAAD,CAAY,CAAA;AAExC,MAAM,YAA6B;CACjC,QAAQ;EACN,SAAS,EAAE,WAAW,cAAc;EACpC,UAAU,EAAE,WAAW,KAAK;EAC5B,sBAAsB;GACpB,WAAW;GACX,kBAAkB;EACpB;EACA,mCAAmC;GACjC,WAAW;GACX,kBAAkB;EACpB;EACA,kBAAkB,EAAE,WAAW,aAAa;EAE5C,6BAA6B,EAAE,YAAY,EAAE,UAAU,KAAA,EAAU,EAAE;EACnE,2BAA2B,EAAE,YAAY,EAAE,UAAU,KAAA,EAAU,EAAE;CACnE;CACA,WAAW;CACX,QAAQ;CACR,gBAAgB;CAChB,eAAe;AACjB","debug_id":"118d4114-656f-5901-a3d6-332d58a7d935"}
@@ -138,6 +138,27 @@ export default function Editor({
138
138
  - Components inside the editor call the generated `useSelected<Model>Document()`. It reads the document the editor was rendered with, from an `EditorDocumentProvider` the host renders around the editor; without one it reads the app's selection.
139
139
  - An editor that reads its document from props needs a Connect that passes them (see [Upgrading](./types-and-troubleshooting.md#upgrading)). Editors that only use the hooks work in every Connect.
140
140
 
141
+ ### Show that an action was rejected
142
+
143
+ When a reducer throws one of the model's errors, the operation is stored with the error and the state stays unchanged. The write itself succeeds, so the editor hears about it only if it asks. Pass `dispatch` an `onErrors` callback:
144
+
145
+ ```tsx
146
+ const [error, setError] = useState<string>();
147
+
148
+ function rename(title: string) {
149
+ setError(undefined);
150
+ dispatch(actions.setTitle({ title }), (errors) =>
151
+ setError(errors[0]?.message),
152
+ );
153
+ }
154
+ ```
155
+
156
+ - Each rejected action arrives as an `OperationRejectedError` from `@powerhousedao/reactor-browser`. `message` is the reducer's error message. The error also has `actionId`, `actionType`, `scope`, the operation's `index`, and `kind`: `"reducer-error"`, or `"denied"` for a write the document's policy refused. `OperationRejectedError.isError(error)` tells it apart from a dispatch that failed outright, such as a missing document.
157
+ - A batch reports only the actions that were rejected; the others still apply.
158
+ - `onSuccess`, the third argument, runs once the write lands, also when an action in it was rejected. Clear the error before dispatching, not in `onSuccess`.
159
+ - This works in every reactor mode: in-process, worker and remote.
160
+ - Don't read `document.operations` for this: Connect does not load an editor's operations. The revision history lists every operation's errors.
161
+
141
162
  ### Render an editor or a drive app yourself
142
163
 
143
164
  A project route that renders an editor passes it `document` and `dispatch`, and wraps it in `EditorDocumentProvider` from `@powerhousedao/reactor-browser` with the same pair. `useEditorModuleFor(document)` picks the document's editor:
@@ -26,7 +26,7 @@ Inside it, the `@powerhousedao/reactor-browser` hooks read the route it is shown
26
26
  - `useLinkProps(useNodeTarget(node))` makes a row a real link.
27
27
  - `getDriveName(drive)` is the drive's display name; drives made in the UI leave `header.name` empty.
28
28
  - `showCreateDocumentModal(type)` opens Connect's create modal, which adds the document to the open folder and opens it.
29
- - Documents in Connect don't carry their operations, so `document.operations.global` can be undefined; read history with `useDocumentOperations(id, "global")`.
29
+ - Documents in Connect don't carry their operations: `document.operations.global` is an empty array, however long the history. Read history with `useDocumentOperations(id, "global")`, and the operation count with `document.header.revision.global`.
30
30
 
31
31
  The `reactor-browser` actions do the same work from outside the app: `addFolder(driveId, name, parentId?)`, `renameDriveNode(driveId, nodeId, name)` and `deleteNode(driveId, nodeId)`.
32
32
 
@@ -43,7 +43,7 @@ A project's styles are in two files, which the page builds as one Tailwind build
43
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.
44
44
  - The design system defines the `dark` variant (`.dark` on `<html>`), so a project's `dark:` classes follow Connect's theme toggle.
45
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.
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.
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, and creates `hosts/connect/style.css` when it is missing (a host with its own `runner.routes` creates its file by hand). It moves Connect's theme out of `style.css`: declarations of the design system's and core's semantic tokens (`--primary`, `--ring`, `--ph-core-bg`, ...) on `:root`, `html`, `.dark` or `[data-theme]` go to `hosts/connect/style.css`, and the package's own tokens stay. It moves them only when the host's file is new or still the empty template, and only top-level rules whose selectors are all theme selectors; otherwise it leaves them and warns, naming each rule and token. It also warns about `html` and `body` rules, which ship with the package too.
47
47
 
48
48
  ## A package's styles
49
49
 
@@ -26,7 +26,7 @@ The build generates `.ph/connect-routes.gen.ts`: the route tree of Connect's rou
26
26
  | A package's `dist/style.css` is hundreds of KB, or a host's `@theme` values revert to the defaults once the package loads | The package was built before packages left Connect's CSS out: its stylesheet is a full Tailwind build, whose tokens outrank the host's. Rebuild it with `ph build` and publish it; see [A package's styles](./styles-and-branding.md#a-packages-styles). |
27
27
  | A package's token or rule works in its own Connect but not in another | It is in `hosts/connect/style.css`, which `ph build` leaves out. Move what the package's editors and routes need to `style.css`. |
28
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). |
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
+ | 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` moves Connect's token overrides, or warns about what it can't move. |
30
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
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. |
32
32
 
@@ -37,7 +37,7 @@ The build generates `.ph/connect-routes.gen.ts`: the route tree of Connect's rou
37
37
  - `style.css` imports `@powerhousedao/connect/tailwind.css` instead of `@powerhousedao/design-system/theme.css` and `@powerhousedao/connect/style.css`. The project's own rules stay.
38
38
  - `tsconfig.json` includes `.ph/connect-routes.gen.ts`, the generated tree that types the project's routes.
39
39
  - `style.css` drops the `@import './node_modules/<package>/dist/style.css'` lines that `ph install --local` added. Connect loads a bundled package's stylesheet with its code.
40
- - `hosts/connect/style.css` holds this Connect's theme; `ph migrate` creates it and warns when `style.css` sets tokens or global rules, which now ship in the package's stylesheet. Move a Connect's theme there by hand.
40
+ - `hosts/connect/style.css` holds this Connect's theme; `ph migrate` creates it. A project that themed Connect in `style.css` (`--primary` on `:root` and `.dark`, say) re-themes every Connect that installs its package until the overrides move. `ph migrate` moves Connect's token overrides there when the host's file is new or empty, and otherwise warns with the rules and tokens to move by hand; see [Styles](./styles-and-branding.md#styles).
41
41
  - A Tailwind host that imported `@powerhousedao/connect-core/theme.css` for core's classes imports `@powerhousedao/connect-core/tailwind.css`. `theme.css` now holds only core's tokens. `@powerhousedao/connect/tailwind.css` does this already.
42
42
 
43
43
  A package rebuilt with `ph build` ships only its own classes and rules (see [A package's styles](./styles-and-branding.md#a-packages-styles)). Republish packages so the Connects that load them keep one Tailwind build per page.
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.73",
4
+ "version": "6.2.3-dev.74",
5
5
  "description": "Powerhouse Connect",
6
6
  "main": "dist/index.html",
7
7
  "type": "module",
@@ -110,27 +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.73",
114
- "@powerhousedao/connect-core": "6.2.3-dev.73",
115
- "@powerhousedao/design-system": "6.2.3-dev.73",
113
+ "@powerhousedao/config": "6.2.3-dev.74",
114
+ "@powerhousedao/connect-core": "6.2.3-dev.74",
115
+ "@powerhousedao/design-system": "6.2.3-dev.74",
116
116
  "@powerhousedao/document-engineering": "1.40.5",
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",
117
+ "@powerhousedao/host-core": "6.2.3-dev.74",
118
+ "@powerhousedao/powerhouse-vetra-packages": "6.2.3-dev.74",
119
+ "@powerhousedao/reactor": "6.2.3-dev.74",
120
+ "@powerhousedao/reactor-attachments": "6.2.3-dev.74",
121
+ "@powerhousedao/reactor-browser": "6.2.3-dev.74",
122
+ "@powerhousedao/reactor-mcp": "6.2.3-dev.74",
123
+ "@powerhousedao/reactor-router": "6.2.3-dev.74",
124
+ "@powerhousedao/shared": "6.2.3-dev.74",
125
+ "@powerhousedao/vetra": "6.2.3-dev.74",
126
+ "@powerhousedao/workflow": "6.2.3-dev.74",
127
127
  "@privy-io/react-auth": "3.35.0",
128
128
  "@rainbow-me/rainbowkit": "^2.2.11",
129
- "@renown/sdk": "6.2.3-dev.73",
129
+ "@renown/sdk": "6.2.3-dev.74",
130
130
  "@sentry/react": "^10.17.0",
131
131
  "@tailwindcss/node": "4.2.2",
132
132
  "@tanstack/react-query": "^5.90.2",
133
- "document-model": "6.2.3-dev.73",
133
+ "document-model": "6.2.3-dev.74",
134
134
  "i18next": "^25.5.3",
135
135
  "kysely": "0.28.16",
136
136
  "kysely-pglite-dialect": "1.2.0",
@@ -1,4 +0,0 @@
1
- import { t as AppLoader } from "./app-loader-b3At29LQ.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]="2d8eb149-d91c-5261-a64f-ae24722942bc")}catch(e){}}();
4
- //# debugId=2d8eb149-d91c-5261-a64f-ae24722942bc