@powerhousedao/connect 6.2.3-dev.70 → 6.2.3-dev.71

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 (76) hide show
  1. package/RUNTIME-CONFIG.md +29 -20
  2. package/dist/{ClearStorageModal-BwGVIuLX.js → ClearStorageModal-DxBXLSmH.js} +4 -4
  3. package/dist/{ClearStorageModal-BwGVIuLX.js.map → ClearStorageModal-DxBXLSmH.js.map} +1 -1
  4. package/dist/{DebugSettingsModal-DfOnR4iY.js → DebugSettingsModal-D1I-K2Gf.js} +4 -4
  5. package/dist/{DebugSettingsModal-DfOnR4iY.js.map → DebugSettingsModal-D1I-K2Gf.js.map} +1 -1
  6. package/dist/{InspectorModal-BVqRNFfP.js → InspectorModal-D85U4oKJ.js} +4 -4
  7. package/dist/{InspectorModal-BVqRNFfP.js.map → InspectorModal-D85U4oKJ.js.map} +1 -1
  8. package/dist/{OpenFileDocumentsModal-BNHD0vg9.js → OpenFileDocumentsModal-B9c-CsKT.js} +4 -4
  9. package/dist/{OpenFileDocumentsModal-BNHD0vg9.js.map → OpenFileDocumentsModal-B9c-CsKT.js.map} +1 -1
  10. package/dist/app-loader-D5GEwpML.js +4 -0
  11. package/dist/{app-loader-DtH6v5CE.js → app-loader-casiq2T2.js} +36 -27
  12. package/dist/{app-loader-DtH6v5CE.js.map → app-loader-casiq2T2.js.map} +1 -1
  13. package/dist/{app-skeleton-DFg65Rxa.js → app-skeleton-BHgmbYld.js} +3 -3
  14. package/dist/{app-skeleton-BFjvlTWd.js → app-skeleton-ClRUYLE_.js} +14 -5
  15. package/dist/app-skeleton-ClRUYLE_.js.map +1 -0
  16. package/dist/{boot-N7f3RrY_.js → boot-CFPdHSqB.js} +5 -5
  17. package/dist/{boot-N7f3RrY_.js.map → boot-CFPdHSqB.js.map} +1 -1
  18. package/dist/{build-info-TgBEqTq1.js → build-info-Cn2f6llN.js} +5 -5
  19. package/dist/{build-info-TgBEqTq1.js.map → build-info-Cn2f6llN.js.map} +1 -1
  20. package/dist/{components-B_wpF5Is.js → components-C4K5xyad.js} +7 -7
  21. package/dist/{components-B_wpF5Is.js.map → components-C4K5xyad.js.map} +1 -1
  22. package/dist/{drive-icon-BiVP8yJc.js → drive-icon-BIpd8edR.js} +14 -3
  23. package/dist/drive-icon-BIpd8edR.js.map +1 -0
  24. package/dist/generic.js +1 -1
  25. package/dist/{load-CkbGF6wB.js → load-DcDV9hi4.js} +6 -6
  26. package/dist/{load-CkbGF6wB.js.map → load-DcDV9hi4.js.map} +1 -1
  27. package/dist/{load-runtime-config-DXswYA71.js → load-runtime-config-Deq75NYr.js} +4 -4
  28. package/dist/{load-runtime-config-DXswYA71.js.map → load-runtime-config-Deq75NYr.js.map} +1 -1
  29. package/dist/main.js +2 -2
  30. package/dist/{package-manager-CPqbVSd8.js → package-manager-CzBsaUUd.js} +6 -6
  31. package/dist/{package-manager-CPqbVSd8.js.map → package-manager-CzBsaUUd.js.map} +1 -1
  32. package/dist/plugin-configs.d.ts +242 -0
  33. package/dist/plugin-configs.d.ts.map +1 -0
  34. package/dist/plugin-configs.js +26 -0
  35. package/dist/plugin-configs.js.map +1 -0
  36. package/dist/plugins-CegSox2x.js +263 -0
  37. package/dist/plugins-CegSox2x.js.map +1 -0
  38. package/dist/prerender.js +9 -5
  39. package/dist/prerender.js.map +1 -1
  40. package/dist/{reactor-DLCl-WHi.js → reactor-BGYR1N7Z.js} +5 -5
  41. package/dist/{reactor-DLCl-WHi.js.map → reactor-BGYR1N7Z.js.map} +1 -1
  42. package/dist/route-tree.js +1 -1
  43. package/dist/{route-views-CTARvT5N.js → route-views-2aB1ZZPP.js} +6 -6
  44. package/dist/route-views-2aB1ZZPP.js.map +1 -0
  45. package/dist/{route-views-BF0p-4Fi.js → route-views-CDVZytw4.js} +4 -4
  46. package/dist/{route-views-BF0p-4Fi.js.map → route-views-CDVZytw4.js.map} +1 -1
  47. package/dist/route-views-D_873yb_.js +4 -0
  48. package/dist/route-views.js +3 -3
  49. package/dist/router-B0OQvO11.js +4 -0
  50. package/dist/{router-L9X9U-97.js → router-Cu0PH6sh.js} +5 -5
  51. package/dist/router-Cu0PH6sh.js.map +1 -0
  52. package/dist/{settings-B-apZN_f.js → settings-CFn4TA0g.js} +13 -7
  53. package/dist/{settings-B-apZN_f.js.map → settings-CFn4TA0g.js.map} +1 -1
  54. package/dist/{settings-tabs-CRgiuZcb.js → settings-tabs-BC8gAacB.js} +31 -6
  55. package/dist/settings-tabs-BC8gAacB.js.map +1 -0
  56. package/dist/shell-core.html +1 -1
  57. package/dist/shell.html +1 -1
  58. package/dist/start-connect.js +2 -2
  59. package/dist/style.css +27 -4
  60. package/dist/{ui-CwbE23ra.js → ui-BOTsJPoc.js} +7 -7
  61. package/dist/{ui-CwbE23ra.js.map → ui-BOTsJPoc.js.map} +1 -1
  62. package/dist/workflows-C3qEvx1R.js +63 -0
  63. package/dist/workflows-C3qEvx1R.js.map +1 -0
  64. package/docs/customizing/styles-and-branding.md +1 -1
  65. package/package.json +23 -17
  66. package/scripts/assert-plugin-configs.mjs +47 -0
  67. package/dist/app-loader-BjAXSJQ6.js +0 -4
  68. package/dist/app-skeleton-BFjvlTWd.js.map +0 -1
  69. package/dist/drive-icon-BiVP8yJc.js.map +0 -1
  70. package/dist/plugins-CWbr0n_Q.js +0 -246
  71. package/dist/plugins-CWbr0n_Q.js.map +0 -1
  72. package/dist/route-views-CTARvT5N.js.map +0 -1
  73. package/dist/route-views-D8I-1PWU.js +0 -4
  74. package/dist/router-BguOMBUh.js +0 -4
  75. package/dist/router-L9X9U-97.js.map +0 -1
  76. package/dist/settings-tabs-CRgiuZcb.js.map +0 -1
@@ -1,246 +0,0 @@
1
-
2
- !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]="12bba573-1829-54ba-93ff-88f5dd246cb5")}catch(e){}}();
3
- import { DEFAULT_CONNECT_CONFIG } from "@powerhousedao/shared/connect";
4
- import { z } from "zod";
5
- //#region src/plugins/assistant.ts
6
- /**
7
- * The Connect AI assistant (`@powerhousedao/connect/plugins/assistant`).
8
- * Presence flips `ai.assistantEnabled` on and merges the entry config
9
- * (endpoint, agent, defaultOpen, …); absence forces it off. The assistant FAB
10
- * in app.tsx already renders on `ai.assistantEnabled`, so this plugin's
11
- * config shuffle is immediately visible in the UI.
12
- */
13
- const createAssistantPlugin = (config) => {
14
- return {
15
- name: "connect-assistant",
16
- appliesTo: "connect",
17
- hooks: { transformConnectConfig(served) {
18
- return {
19
- ...served,
20
- ai: {
21
- ...served.ai,
22
- assistantEnabled: true,
23
- ...config
24
- }
25
- };
26
- } }
27
- };
28
- };
29
- //#endregion
30
- //#region src/plugins/generic.ts
31
- /**
32
- * The generic Connect shell plugin (`@powerhousedao/connect/plugins/generic`).
33
- *
34
- * It OWNS the drive-chrome UI toggles — `allowAddDrive` and the per-section
35
- * `sections.{remote,local}` switches (enabled / allowAdd / allowDelete). These
36
- * describe nothing outside the generic chrome (connect.config.ts reads them to
37
- * decide whether the add-drive affordance and the drive sections render), so
38
- * under uniform runners they are configured HERE, through this plugin's entry
39
- * config, not as free-standing top-level connect.drives values:
40
- *
41
- * - present + entry provides a value -> that value
42
- * - present + entry omits it -> inherit DEFAULT_CONNECT_CONFIG
43
- * - absent from the composition -> zeroed off (see plugin-host's
44
- * zeroAbsentSlices — no chrome, no
45
- * toggles)
46
- *
47
- * The top-level served value is deliberately NOT a fallback: ownership means a
48
- * single source. `branding` is intentionally NOT handled here — it has reach
49
- * beyond the chrome (e.g. document.title), so it stays a Connect-level config
50
- * value that survives this plugin's absence.
51
- */
52
- const sectionSchema = z.object({
53
- enabled: z.boolean().optional(),
54
- allowAdd: z.boolean().optional(),
55
- allowDelete: z.boolean().optional()
56
- }).optional();
57
- const genericConfigSchema = z.object({
58
- allowAddDrive: z.boolean().optional(),
59
- sections: z.object({
60
- remote: sectionSchema,
61
- local: sectionSchema
62
- }).optional()
63
- }).partial();
64
- const DEFAULT_DRIVES = DEFAULT_CONNECT_CONFIG.drives;
65
- const createGenericPlugin = (rawConfig) => {
66
- const config = genericConfigSchema.parse(rawConfig ?? {});
67
- return {
68
- name: "connect-generic",
69
- appliesTo: "connect",
70
- configSchema: genericConfigSchema,
71
- hooks: { transformConnectConfig(served) {
72
- const entrySections = config.sections ?? {};
73
- return {
74
- ...served,
75
- drives: {
76
- ...served.drives,
77
- allowAddDrive: config.allowAddDrive ?? DEFAULT_DRIVES?.allowAddDrive,
78
- sections: {
79
- remote: {
80
- ...DEFAULT_DRIVES?.sections?.remote,
81
- ...entrySections.remote
82
- },
83
- local: {
84
- ...DEFAULT_DRIVES?.sections?.local,
85
- ...entrySections.local
86
- }
87
- }
88
- }
89
- };
90
- } }
91
- };
92
- };
93
- //#endregion
94
- //#region src/plugins/openpanel.ts
95
- /**
96
- * OpenPanel analytics (`@powerhousedao/connect/plugins/openpanel`). Presence
97
- * is activation: the entry config (clientId, trackUiEvents, trackOperations)
98
- * merges into the served `openPanel` block; absence clears the clientId and
99
- * turns tracking off. Config shuffle today; the Analytics/OpenPanel
100
- * components that consume it already live in the app tree.
101
- */
102
- const createOpenPanelPlugin = (config) => {
103
- return {
104
- name: "connect-openpanel",
105
- appliesTo: "connect",
106
- hooks: { transformConnectConfig(served) {
107
- return {
108
- ...served,
109
- openPanel: {
110
- ...served.openPanel,
111
- ...config
112
- }
113
- };
114
- } }
115
- };
116
- };
117
- //#endregion
118
- //#region src/plugins/sentry.ts
119
- /**
120
- * Sentry error reporting (`@powerhousedao/connect/plugins/sentry`). Presence
121
- * is activation: listing it merges the entry config (dsn, env, tracing) into
122
- * the served `sentry` block; omitting it nulls the dsn (see the absence
123
- * zeroing in plugin-host). A thin config shuffle today — the SentryProvider
124
- * that reads this slice already exists in the app.
125
- */
126
- const createSentryPlugin = (config) => {
127
- return {
128
- name: "connect-sentry",
129
- appliesTo: "connect",
130
- hooks: { transformConnectConfig(served) {
131
- return {
132
- ...served,
133
- sentry: {
134
- ...served.sentry,
135
- ...config
136
- }
137
- };
138
- } }
139
- };
140
- };
141
- //#endregion
142
- //#region src/plugins/ids.ts
143
- /** The generic shell: Connect's sidebar, home screen and settings tabs. */
144
- const GENERIC_PLUGIN = "@powerhousedao/connect/plugins/generic";
145
- //#endregion
146
- //#region src/plugins/vetra-studio.ts
147
- /**
148
- * Vetra Studio, browser side (`@powerhousedao/vetra-studio/connect`). Its
149
- * presence turns Connect's studio mode on; the classic `app.studioMode`
150
- * consumer paths run unchanged, and absence forces studio off (the zeroing in
151
- * plugin-host). Lives here, in Connect's own source, because the studio-mode
152
- * behaviour is Connect browser behaviour — the published vetra-studio/connect
153
- * module is only the server-resolvable identity of the same plugin.
154
- */
155
- const createVetraStudioPlugin = (config) => {
156
- return {
157
- name: "vetra-studio-connect",
158
- appliesTo: "connect",
159
- hooks: { transformConnectConfig(served) {
160
- return {
161
- ...served,
162
- app: {
163
- ...served.app,
164
- studioMode: true,
165
- ...config
166
- }
167
- };
168
- } }
169
- };
170
- };
171
- //#endregion
172
- //#region src/plugins/index.ts
173
- const ANALYTICS_CONSENT = { consent: true };
174
- const driveSectionOff = {
175
- enabled: false,
176
- allowAdd: false,
177
- allowDelete: false
178
- };
179
- /** Connect's built-in plugins, by the specifier a composition names. */
180
- const connectPlugins = {
181
- [GENERIC_PLUGIN]: {
182
- create: createGenericPlugin,
183
- ui: () => import("./ui-CwbE23ra.js").then((m) => m.default),
184
- shell: "generic",
185
- whenAbsent: (config) => ({
186
- ...config,
187
- drives: {
188
- ...config.drives,
189
- allowAddDrive: false,
190
- sections: {
191
- remote: driveSectionOff,
192
- local: driveSectionOff
193
- }
194
- }
195
- })
196
- },
197
- "@powerhousedao/connect/plugins/sentry": {
198
- create: createSentryPlugin,
199
- ui: () => Promise.resolve(ANALYTICS_CONSENT),
200
- whenAbsent: (config) => ({
201
- ...config,
202
- sentry: {
203
- ...config.sentry,
204
- dsn: null
205
- }
206
- })
207
- },
208
- "@powerhousedao/connect/plugins/openpanel": {
209
- create: createOpenPanelPlugin,
210
- ui: () => Promise.resolve(ANALYTICS_CONSENT),
211
- whenAbsent: (config) => ({
212
- ...config,
213
- openPanel: {
214
- ...config.openPanel,
215
- clientId: "",
216
- trackUiEvents: false,
217
- trackOperations: false
218
- }
219
- })
220
- },
221
- "@powerhousedao/connect/plugins/assistant": {
222
- create: createAssistantPlugin,
223
- whenAbsent: (config) => ({
224
- ...config,
225
- ai: {
226
- ...config.ai,
227
- assistantEnabled: false
228
- }
229
- })
230
- },
231
- "@powerhousedao/vetra-studio/connect": {
232
- create: createVetraStudioPlugin,
233
- whenAbsent: (config) => ({
234
- ...config,
235
- app: {
236
- ...config.app,
237
- studioMode: false
238
- }
239
- })
240
- }
241
- };
242
- //#endregion
243
- export { connectPlugins };
244
-
245
- //# sourceMappingURL=plugins-CWbr0n_Q.js.map
246
- //# debugId=12bba573-1829-54ba-93ff-88f5dd246cb5
@@ -1 +0,0 @@
1
- {"version":3,"file":"plugins-CWbr0n_Q.js","sources":["../src/plugins/assistant.ts","../src/plugins/generic.ts","../src/plugins/openpanel.ts","../src/plugins/sentry.ts","../src/plugins/ids.ts","../src/plugins/vetra-studio.ts","../src/plugins/index.ts"],"sourcesContent":["import type { PHConnectRuntimeConfig } from \"@powerhousedao/shared/clis\";\nimport type {\n ConnectPlugin,\n ConnectPluginFactory,\n} from \"@powerhousedao/connect-core/plugins\";\n\n/**\n * The Connect AI assistant (`@powerhousedao/connect/plugins/assistant`).\n * Presence flips `ai.assistantEnabled` on and merges the entry config\n * (endpoint, agent, defaultOpen, …); absence forces it off. The assistant FAB\n * in app.tsx already renders on `ai.assistantEnabled`, so this plugin's\n * config shuffle is immediately visible in the UI.\n */\nexport const createAssistantPlugin: ConnectPluginFactory = (config) => {\n const plugin: ConnectPlugin = {\n name: \"connect-assistant\",\n appliesTo: \"connect\",\n hooks: {\n transformConnectConfig(served: PHConnectRuntimeConfig) {\n return {\n ...served,\n ai: { ...served.ai, assistantEnabled: true, ...config } as never,\n };\n },\n },\n };\n return plugin;\n};\n\nexport default createAssistantPlugin;\n","import { DEFAULT_CONNECT_CONFIG } from \"@powerhousedao/shared/connect\";\nimport type { PHConnectRuntimeConfig } from \"@powerhousedao/shared/clis\";\nimport { z } from \"zod\";\nimport type {\n ConnectPlugin,\n ConnectPluginFactory,\n} from \"@powerhousedao/connect-core/plugins\";\n\n/**\n * The generic Connect shell plugin (`@powerhousedao/connect/plugins/generic`).\n *\n * It OWNS the drive-chrome UI toggles — `allowAddDrive` and the per-section\n * `sections.{remote,local}` switches (enabled / allowAdd / allowDelete). These\n * describe nothing outside the generic chrome (connect.config.ts reads them to\n * decide whether the add-drive affordance and the drive sections render), so\n * under uniform runners they are configured HERE, through this plugin's entry\n * config, not as free-standing top-level connect.drives values:\n *\n * - present + entry provides a value -> that value\n * - present + entry omits it -> inherit DEFAULT_CONNECT_CONFIG\n * - absent from the composition -> zeroed off (see plugin-host's\n * zeroAbsentSlices — no chrome, no\n * toggles)\n *\n * The top-level served value is deliberately NOT a fallback: ownership means a\n * single source. `branding` is intentionally NOT handled here — it has reach\n * beyond the chrome (e.g. document.title), so it stays a Connect-level config\n * value that survives this plugin's absence.\n */\n\nconst sectionSchema = z\n .object({\n enabled: z.boolean().optional(),\n allowAdd: z.boolean().optional(),\n allowDelete: z.boolean().optional(),\n })\n .optional();\n\nconst genericConfigSchema = z\n .object({\n allowAddDrive: z.boolean().optional(),\n sections: z\n .object({ remote: sectionSchema, local: sectionSchema })\n .optional(),\n })\n .partial();\n\ntype GenericConfig = z.infer<typeof genericConfigSchema>;\n\nconst DEFAULT_DRIVES = DEFAULT_CONNECT_CONFIG.drives;\n\nexport const createGenericPlugin: ConnectPluginFactory = (rawConfig) => {\n const config = genericConfigSchema.parse(rawConfig ?? {}) as GenericConfig;\n const plugin: ConnectPlugin = {\n name: \"connect-generic\",\n appliesTo: \"connect\",\n configSchema: genericConfigSchema,\n hooks: {\n transformConnectConfig(served: PHConnectRuntimeConfig) {\n const entrySections = config.sections ?? {};\n return {\n ...served,\n drives: {\n ...served.drives,\n // Owned: entry value, else the single-source default — never the\n // served top-level value.\n allowAddDrive:\n config.allowAddDrive ?? DEFAULT_DRIVES?.allowAddDrive,\n sections: {\n remote: {\n ...DEFAULT_DRIVES?.sections?.remote,\n ...entrySections.remote,\n },\n local: {\n ...DEFAULT_DRIVES?.sections?.local,\n ...entrySections.local,\n },\n },\n } as never,\n };\n },\n },\n };\n return plugin;\n};\n\nexport default createGenericPlugin;\n","import type { PHConnectRuntimeConfig } from \"@powerhousedao/shared/clis\";\nimport type {\n ConnectPlugin,\n ConnectPluginFactory,\n} from \"@powerhousedao/connect-core/plugins\";\n\n/**\n * OpenPanel analytics (`@powerhousedao/connect/plugins/openpanel`). Presence\n * is activation: the entry config (clientId, trackUiEvents, trackOperations)\n * merges into the served `openPanel` block; absence clears the clientId and\n * turns tracking off. Config shuffle today; the Analytics/OpenPanel\n * components that consume it already live in the app tree.\n */\nexport const createOpenPanelPlugin: ConnectPluginFactory = (config) => {\n const plugin: ConnectPlugin = {\n name: \"connect-openpanel\",\n appliesTo: \"connect\",\n hooks: {\n transformConnectConfig(served: PHConnectRuntimeConfig) {\n return {\n ...served,\n openPanel: { ...served.openPanel, ...config } as never,\n };\n },\n },\n };\n return plugin;\n};\n\nexport default createOpenPanelPlugin;\n","import type { PHConnectRuntimeConfig } from \"@powerhousedao/shared/clis\";\nimport type {\n ConnectPlugin,\n ConnectPluginFactory,\n} from \"@powerhousedao/connect-core/plugins\";\n\n/**\n * Sentry error reporting (`@powerhousedao/connect/plugins/sentry`). Presence\n * is activation: listing it merges the entry config (dsn, env, tracing) into\n * the served `sentry` block; omitting it nulls the dsn (see the absence\n * zeroing in plugin-host). A thin config shuffle today — the SentryProvider\n * that reads this slice already exists in the app.\n */\nexport const createSentryPlugin: ConnectPluginFactory = (config) => {\n const plugin: ConnectPlugin = {\n name: \"connect-sentry\",\n appliesTo: \"connect\",\n hooks: {\n transformConnectConfig(served: PHConnectRuntimeConfig) {\n return {\n ...served,\n sentry: { ...served.sentry, ...config } as never,\n };\n },\n },\n };\n return plugin;\n};\n\nexport default createSentryPlugin;\n","/** The generic shell: Connect's sidebar, home screen and settings tabs. */\nexport const GENERIC_PLUGIN = \"@powerhousedao/connect/plugins/generic\";\n","import type { PHConnectRuntimeConfig } from \"@powerhousedao/shared/clis\";\nimport type {\n ConnectPlugin,\n ConnectPluginFactory,\n} from \"@powerhousedao/connect-core/plugins\";\n\n/**\n * Vetra Studio, browser side (`@powerhousedao/vetra-studio/connect`). Its\n * presence turns Connect's studio mode on; the classic `app.studioMode`\n * consumer paths run unchanged, and absence forces studio off (the zeroing in\n * plugin-host). Lives here, in Connect's own source, because the studio-mode\n * behaviour is Connect browser behaviour — the published vetra-studio/connect\n * module is only the server-resolvable identity of the same plugin.\n */\nexport const createVetraStudioPlugin: ConnectPluginFactory = (config) => {\n const plugin: ConnectPlugin = {\n name: \"vetra-studio-connect\",\n appliesTo: \"connect\",\n hooks: {\n transformConnectConfig(served: PHConnectRuntimeConfig) {\n return {\n ...served,\n app: { ...served.app, studioMode: true, ...config } as never,\n };\n },\n },\n };\n return plugin;\n};\n\nexport default createVetraStudioPlugin;\n","import type { ConnectPluginDefinition } from \"@powerhousedao/connect-core/plugins\";\nimport createAssistantPlugin from \"./assistant.js\";\nimport createGenericPlugin from \"./generic.js\";\nimport createOpenPanelPlugin from \"./openpanel.js\";\nimport createSentryPlugin from \"./sentry.js\";\nimport { GENERIC_PLUGIN } from \"./ids.js\";\nimport createVetraStudioPlugin from \"./vetra-studio.js\";\n\nexport { GENERIC_PLUGIN };\n\n// Sentry and OpenPanel start only once the viewer accepts analytics cookies.\nconst ANALYTICS_CONSENT = { consent: true };\n\n// Each built-in zeroes the config slice it owns when a composition leaves it out.\nconst driveSectionOff = { enabled: false, allowAdd: false, allowDelete: false };\n\n/** Connect's built-in plugins, by the specifier a composition names. */\nexport const connectPlugins: Record<string, ConnectPluginDefinition> = {\n [GENERIC_PLUGIN]: {\n create: createGenericPlugin,\n ui: () => import(\"../generic/ui.js\").then((m) => m.default),\n shell: \"generic\",\n // Branding is not zeroed: it is Connect-level and outlives the plugin.\n whenAbsent: (config) => ({\n ...config,\n drives: {\n ...config.drives,\n allowAddDrive: false,\n sections: { remote: driveSectionOff, local: driveSectionOff },\n } as never,\n }),\n },\n \"@powerhousedao/connect/plugins/sentry\": {\n create: createSentryPlugin,\n ui: () => Promise.resolve(ANALYTICS_CONSENT),\n whenAbsent: (config) => ({\n ...config,\n sentry: { ...config.sentry, dsn: null } as never,\n }),\n },\n \"@powerhousedao/connect/plugins/openpanel\": {\n create: createOpenPanelPlugin,\n ui: () => Promise.resolve(ANALYTICS_CONSENT),\n whenAbsent: (config) => ({\n ...config,\n openPanel: {\n ...config.openPanel,\n clientId: \"\",\n trackUiEvents: false,\n trackOperations: false,\n } as never,\n }),\n },\n \"@powerhousedao/connect/plugins/assistant\": {\n create: createAssistantPlugin,\n whenAbsent: (config) => ({\n ...config,\n ai: { ...config.ai, assistantEnabled: false } as never,\n }),\n },\n \"@powerhousedao/vetra-studio/connect\": {\n create: createVetraStudioPlugin,\n whenAbsent: (config) => ({\n ...config,\n app: { ...config.app, studioMode: false } as never,\n }),\n },\n};\n"],"names":[],"mappings":";;;;;;;;;;;;AAaA,MAAa,yBAA+C,WAAW;CAarE,OAAO;EAXL,MAAM;EACN,WAAW;EACX,OAAO,EACL,uBAAuB,QAAgC;GACrD,OAAO;IACL,GAAG;IACH,IAAI;KAAE,GAAG,OAAO;KAAI,kBAAkB;KAAM,GAAG;IAAO;GACxD;EACF,EACF;CAEU;AACd;;;;;;;;;;;;;;;;;;;;;;;;ACGA,MAAM,gBAAgB,EACnB,OAAO;CACN,SAAS,EAAE,QAAQ,CAAC,CAAC,SAAS;CAC9B,UAAU,EAAE,QAAQ,CAAC,CAAC,SAAS;CAC/B,aAAa,EAA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,OAAO,EACL,uBAAuB,QAAgC;GACrD,OAAO;IACL,GAAG;IACH,KAAK;KAAE,GAAG,OAAO;KAAK,YAAY;KAAM,GAAG;IAAO;GACpD;EACF,EACF;CAEU;AACd;;;ACjBA,MAAM,oBAAoB,EAAE,SAAS,KAAK;AAG1C,MAAM,kBAAkB;CAAE,SAAS;CAAO,UAAU;CAAO,aAAa;AAAM;;AAG9E,MAAa,iBAA0D;EACpE,iBAAiB;EAChB,QAAQ;EACR,UAAU,OAAO,mBAAmB,CAAC,MAAM,MAAM,EAAE,OAAO;EAC1D,OAAO;EAEP,aAAa,YAAY;GACvB,GAAG;GACH,QAAQ;IACN,GAAG,OAAO;IACV,eAAe;IACf,UAAU;KAAE,QAAQ;KAAiB,OAAO;IAAgB;GAC9D;EACF;CACF;CACA,yCAAyC;EACvC,QAAQ;EACR,UAAU,QAAQ,QAAQ,iBAAiB;EAC3C,aAAa,YAAY;GACvB,GAAG;GACH,QAAQ;IAAE,GAAG,OAAO;IAAQ,KAAK;GAAK;EACxC;CACF;CACA,4CAA4C;EAC1C,QAAQ;EACR,UAAU,QAAQ,QAAQ,iBAAiB;EAC3C,aAAa,YAAY;GACvB,GAAG;GACH,WAAW;IACT,GAAG,OAAO;IACV,UAAU;IACV,eAAe;IACf,iBAAiB;GACnB;EACF;CACF;CACA,4CAA4C;EAC1C,QAAQ;EACR,aAAa,YAAY;GACvB,GAAG;GACH,IAAI;IAAE,GAAG,OAAO;IAAI,kBAAkB;GAAM;EAC9C;CACF;CACA,uCAAuC;EACrC,QAAQ;EACR,aAAa,YAAY;GACvB,GAAG;GACH,KAAK;IAAE,GAAG,OAAO;IAAK,YAAY;GAAM;EAC1C;CACF;AACF","debug_id":"12bba573-1829-54ba-93ff-88f5dd246cb5"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"route-views-CTARvT5N.js","sources":["../src/components/route-views.tsx"],"sourcesContent":["import { useRouter, useRouterState } from \"@tanstack/react-router\";\nimport type { PropsWithChildren } from \"react\";\nimport { useEffect, useState } from \"react\";\nimport AppSkeleton from \"./app-skeleton.js\";\nimport { LoadingShell } from \"./prerendered-shell.js\";\n\n// Loads quicker than this show no progress bar.\nconst PROGRESS_DELAY_MS = 150;\n\n/** A thin top bar while a route takes longer than PROGRESS_DELAY_MS. */\nexport function RouteProgressBar() {\n const router = useRouter();\n const [visible, setVisible] = useState(false);\n // Router events, not state: a quick load never re-renders the bar.\n useEffect(() => {\n let timer: ReturnType<typeof setTimeout> | undefined;\n const start = () => {\n clearTimeout(timer);\n timer = setTimeout(() => setVisible(true), PROGRESS_DELAY_MS);\n };\n const stop = () => {\n clearTimeout(timer);\n setVisible(false);\n };\n // The first load starts before this effect subscribes.\n if (router.state.isLoading) start();\n const unsubscribes = [\n router.subscribe(\"onBeforeLoad\", start),\n router.subscribe(\"onResolved\", stop),\n ];\n return () => {\n clearTimeout(timer);\n for (const unsubscribe of unsubscribes) unsubscribe();\n };\n }, [router]);\n if (!visible) return null;\n return (\n <div\n role=\"progressbar\"\n aria-label=\"Loading\"\n className=\"pointer-events-none fixed inset-x-0 top-0 z-50 h-[3px] overflow-hidden\"\n >\n <style>\n {`@keyframes ph-route-progress{0%{transform:translateX(-100%)}100%{transform:translateX(250%)}}`}\n </style>\n <div\n className=\"h-full w-2/5 bg-[#3b82f6]\"\n style={{ animation: \"ph-route-progress 1.1s ease-in-out infinite\" }}\n />\n </div>\n );\n}\n\n/** Wraps the matches: the skeleton until the first view shows, and the bar. */\nexport function RouterChrome({ children }: PropsWithChildren) {\n const isEmpty = useRouterState({ select: (state) => !state.matches.length });\n return (\n <>\n {isEmpty && <LoadingShell Fallback={AppSkeleton} />}\n {children}\n <RouteProgressBar />\n </>\n );\n}\n"],"names":[],"mappings":";;;;;;;;AAOA,MAAM,oBAAoB;;AAG1B,SAAgB,mBAAmB;CACjC,MAAM,SAAS,UAAU;CACzB,MAAM,CAAC,SAAS,cAAc,SAAS,KAAK;CAE5C,gBAAgB;EACd,IAAI;EACJ,MAAM,cAAc;GAClB,aAAa,KAAK;GAClB,QAAQ,iBAAiB,WAAW,IAAI,GAAG,iBAAiB;EAC9D;EACA,MAAM,aAAa;GACjB,aAAa,KAAK;GAClB,WAAW,KAAK;EAClB;EAEA,IAAI,OAAO,MAAM,WAAW,MAAM;EAClC,MAAM,eAAe,CACnB,OAAO,UAAU,gBAAgB,KAAK,GACtC,OAAO,UAAU,cAAc,IAAI,CACrC;EACA,aAAa;GACX,aAAa,KAAK;GAClB,KAAK,MAAM,eAAe,cAAc,YAAY;EACtD;CACF,GAAG,CAAC,MAAM,CAAC;CACX,IAAI,CAAC,SAAS,OAAO;CACrB,OACE,qBAAC,OAAD;EACE,MAAK;EACL,cAAW;EACX,WAAU;EAHZ,UAAA,CAKE,oBAAC,SAAD,EAAA,UACG,gGACI,CAAA,GACP,oBAAC,OAAD;GACE,WAAU;GACV,OAAO,EAAE,WAAW,8CAA8C;EACnE,CAAA,CACE;;AAET;;AAGA,SAAgB,aAAa,EAAE,YAA+B;CAC5D,MAAM,UAAU,eAAe,EAAE,SAAS,UAAU,CAAC,MAAM,QAAQ,OAAO,CAAC;CAC3E,OACE,qBAAA,YAAA,EAAA,UAAA;EACG,WAAW,oBAAC,cAAD,EAAc,UAAU,YAAc,CAAA;EACjD;EACD,oBAAC,kBAAD,CAAmB,CAAA;CACnB,EAAA,CAAA;AAEN","debug_id":"5a966c41-2bda-5eb5-b42a-c2f02e7c6ec9"}
@@ -1,4 +0,0 @@
1
- import { n as RouterChrome, t as RouteProgressBar } from "./route-views-CTARvT5N.js";
2
- export { RouteProgressBar, RouterChrome };
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]="0830b340-f22b-5577-a827-f9bad6b1a9bb")}catch(e){}}();
4
- //# debugId=0830b340-f22b-5577-a827-f9bad6b1a9bb
@@ -1,4 +0,0 @@
1
- import { n as getConnectRouter } from "./router-L9X9U-97.js";
2
- export { getConnectRouter };
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]="195cb590-140e-5d0c-98ba-18fa4cfa23b4")}catch(e){}}();
4
- //# debugId=195cb590-140e-5d0c-98ba-18fa4cfa23b4
@@ -1 +0,0 @@
1
- {"version":3,"file":"router-L9X9U-97.js","sources":["../src/components/router.tsx"],"sourcesContent":["import { connectConfig } from \"@powerhousedao/connect/config\";\nimport { routeTree } from \"@powerhousedao/connect/route-tree\";\nimport type { ConnectAppRouterOptions } from \"@powerhousedao/connect-core/router\";\nimport {\n disposeConnectAppRouter,\n getConnectAppRouter,\n} from \"@powerhousedao/connect-core/router\";\nimport { getRuntimeConfig } from \"@powerhousedao/connect-core/runtime-config\";\nimport { ensurePHStore, usePHStore } from \"@powerhousedao/reactor-browser\";\nimport { RouterProvider } from \"@tanstack/react-router\";\nimport { lazy, Suspense } from \"react\";\nimport { reportRouteError } from \"../services/sentry.js\";\nimport { ColdStartPending } from \"./prerendered-shell.js\";\nimport { RouterChrome } from \"./route-views.js\";\n\nfunction connectRouterOptions(): ConnectAppRouterOptions {\n return {\n routeTree,\n basepath: connectConfig.routerBasename,\n InnerWrap: RouterChrome,\n pendingComponent: ColdStartPending,\n appName: getRuntimeConfig().connect.branding?.appName,\n onCatch: reportRouteError,\n };\n}\n\n// HMR re-runs this module: the replaced router must stop writing the selection.\nimport.meta.hot?.dispose(() => disposeConnectAppRouter());\n\n/** The app's router, e.g. for tracing. */\nexport function getConnectRouter() {\n return getConnectAppRouter(ensurePHStore(), connectRouterOptions).router;\n}\n\n// Dev only: production builds drop the import with this branch.\nconst RouterDevtools = import.meta.env.DEV\n ? lazy(() =>\n import(\"@tanstack/react-router-devtools\").then((m) => ({\n default: m.TanStackRouterDevtools,\n })),\n )\n : undefined;\n\nexport const Router = () => {\n const store = usePHStore() ?? ensurePHStore();\n const { router } = getConnectAppRouter(store, connectRouterOptions);\n return (\n <>\n <RouterProvider router={router} />\n {RouterDevtools && (\n <Suspense name=\"RouterDevtools\">\n <RouterDevtools router={router} position=\"bottom-left\" />\n </Suspense>\n )}\n </>\n );\n};\n"],"names":[],"mappings":";;;;;;;;;;;;;;AAeA,SAAS,uBAAgD;CACvD,OAAO;EACL;EACA,UAAU,cAAc;EACxB,WAAW;EACX,kBAAkB;EAClB,SAAS,iBAAiB,CAAC,CAAC,QAAQ,UAAU;EAC9C,SAAS;CACX;AACF;AAGA,YAAY,KAAK,cAAc,wBAAwB,CAAC;;AAGxD,SAAgB,mBAAmB;CACjC,OAAO,oBAAoB,cAAc,GAAG,oBAAoB,CAAC,CAAC;AACpE;AAGA,MAAM,iBAAiB,YAAY,IAAI,MACnC,WACE,OAAO,oBAAkC,CAAC,MAAM,OAAO,EACrD,SAAS,EAAE,uBACb,EAAE,CACJ,IACA,KAAA;AAEJ,MAAa,eAAe;CAC1B,MAAM,QAAQ,WAAW,KAAK,cAAc;CAC5C,MAAM,EAAE,WAAW,oBAAoB,OAAO,oBAAoB;CAClE,OACE,qBAAA,YAAA,EAAA,UAAA,CACE,oBAAC,gBAAD,EAAwB,OAAS,CAAA,GAChC,kBACC,oBAAC,UAAD;EAAU,MAAK;EACb,UAAA,oBAAC,gBAAD;GAAwB;GAAQ,UAAS;EAAe,CAAA;CAChD,CAAA,CAEZ,EAAA,CAAA;AAEN","debug_id":"9bb1cf89-913c-563d-9b67-c8a5d6b4b08b"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"settings-tabs-CRgiuZcb.js","sources":["../src/generic/pages/use-drive-auth-gate.ts","../src/generic/layout/sidebar.tsx","../src/generic/layout/app-layout.tsx","../src/generic/layout/route-views.tsx","../src/generic/editors/app-container.tsx","../src/generic/pages/content.tsx","../src/generic/settings/tabs.ts","../src/generic/settings-tabs.ts"],"sourcesContent":["import {\n setSelectedDrive,\n useConnectionStates,\n useDrives,\n useSelectedDriveId,\n useSync,\n useUser,\n type ConnectionStateSnapshot,\n} from \"@powerhousedao/reactor-browser\";\nimport type { DocumentDriveDocument } from \"@powerhousedao/shared/document-drive\";\nimport { useCallback, useEffect, useMemo, useSyncExternalStore } from \"react\";\n\n/** Return code for the auth gate decision:\n * - `\"login\"` : anonymous user, the selected drive's channel rejected with `requiresAuth`.\n * - `\"unauthorized\"` : signed in, but the selected drive's channel was rejected — they aren't the owner.\n * - `null` : no auth barrier on the selected drive, carry on. */\nexport type AuthGate = \"login\" | \"unauthorized\" | null;\n\n/** A remote, reduced to the two fields the gate decision needs. */\nexport type AuthGateRemote = {\n readonly name: string;\n readonly driveId: string;\n};\n\nexport type AuthGateSelection = {\n readonly selectedDriveId: string | undefined;\n readonly remotes: readonly AuthGateRemote[];\n};\n\n/**\n * Decides the gate for the drive the user selected, and only that drive. A\n * refusal on any other drive must not hide the rest of Connect.\n *\n * Connection states are keyed by remote name, which is a random uuid, so the\n * caller supplies the remote -> drive mapping.\n */\nexport function computeAuthGate(\n isAuthenticated: boolean,\n connectionStates: ReadonlyMap<string, ConnectionStateSnapshot>,\n selection: AuthGateSelection,\n): AuthGate {\n const { selectedDriveId, remotes } = selection;\n if (!selectedDriveId) return null;\n\n let refused = false;\n for (const remote of remotes) {\n if (remote.driveId !== selectedDriveId) continue;\n const snapshot = connectionStates.get(remote.name);\n if (snapshot?.state === \"error\" && snapshot.requiresAuth) {\n refused = true;\n break;\n }\n }\n if (!refused) return null;\n return isAuthenticated ? \"unauthorized\" : \"login\";\n}\n\n// Drives dismissed from the auth gate. Deliberately in memory and session\n// scoped: the reactor keeps a refused drive's storage record, so a reload while\n// signed in must bring the drive back rather than fight that recovery.\nconst hiddenDriveIds = new Set<string>();\nlet hiddenDriveIdsSnapshot: readonly string[] = [];\nconst hiddenDriveListeners = new Set<() => void>();\n\nfunction publishHiddenDrives(): void {\n hiddenDriveIdsSnapshot = [...hiddenDriveIds];\n for (const listener of [...hiddenDriveListeners]) {\n listener();\n }\n}\n\nfunction subscribeHiddenDrives(listener: () => void): () => void {\n hiddenDriveListeners.add(listener);\n return () => {\n hiddenDriveListeners.delete(listener);\n };\n}\n\nfunction getHiddenDriveIds(): readonly string[] {\n return hiddenDriveIdsSnapshot;\n}\n\n/** Hides a drive from Connect's drive lists until the page reloads. */\nexport function hideDriveForSession(driveId: string): void {\n if (hiddenDriveIds.has(driveId)) return;\n hiddenDriveIds.add(driveId);\n publishHiddenDrives();\n}\n\n/** Restores every drive hidden this session. */\nexport function clearHiddenDrives(): void {\n if (hiddenDriveIds.size === 0) return;\n hiddenDriveIds.clear();\n publishHiddenDrives();\n}\n\nexport function useHiddenDriveIds(): readonly string[] {\n return useSyncExternalStore(\n subscribeHiddenDrives,\n getHiddenDriveIds,\n getHiddenDriveIds,\n );\n}\n\n/** `useDrives()` minus the drives dismissed from the auth gate this session. */\nexport function useVisibleDrives(): DocumentDriveDocument[] | undefined {\n const drives = useDrives();\n const hidden = useHiddenDriveIds();\n return useMemo(() => {\n if (!drives || hidden.length === 0) return drives;\n return drives.filter((drive) => !hidden.includes(drive.header.id));\n }, [drives, hidden]);\n}\n\n/** Live wrapper over {@link computeAuthGate}, plus the dismiss action. */\nexport function useDriveAuthGate(): { gate: AuthGate; dismiss: () => void } {\n const user = useUser();\n const connectionStates = useConnectionStates();\n const syncManager = useSync();\n const selectedDriveId = useSelectedDriveId();\n\n // Remote names are random uuids; `meta.collectionId.driveId` is the only link\n // from a connection state back to the drive it belongs to. Recomputed\n // alongside `connectionStates`, which also refreshes as remotes come and go.\n const remotes = useMemo<AuthGateRemote[]>(\n () =>\n (syncManager?.list() ?? []).map((remote) => ({\n name: remote.meta.name,\n driveId: remote.meta.collectionId.driveId,\n })),\n [syncManager, connectionStates],\n );\n\n // A change of identity changes who the drive would be fetched as, so give the\n // dismissed drives another chance instead of waiting for a reload.\n const address = user?.address;\n useEffect(() => {\n clearHiddenDrives();\n }, [address]);\n\n const dismiss = useCallback(() => {\n if (selectedDriveId) {\n hideDriveForSession(selectedDriveId);\n }\n setSelectedDrive(undefined);\n }, [selectedDriveId]);\n\n const gate = computeAuthGate(Boolean(user), connectionStates, {\n selectedDriveId,\n remotes,\n });\n return { gate, dismiss };\n}\n","import {\n ConnectSidebar,\n ConnectTooltipProvider,\n SidebarAddDriveItem,\n SidebarItem,\n useEns,\n} from \"@powerhousedao/design-system/connect\";\n\nimport {\n isPlainClick,\n logout,\n makeDriveSlug,\n preloadDrive,\n setSelectedDrive,\n showPHModal,\n useIsAddDriveEnabled,\n useLinkProps,\n useSelectedDriveSafe,\n useUser,\n getDriveName,\n} from \"@powerhousedao/reactor-browser\";\nimport type { DocumentDriveDocument } from \"@powerhousedao/shared/document-drive\";\nimport type { AnyRouter } from \"@tanstack/react-router\";\nimport { useRouter, useRouterState } from \"@tanstack/react-router\";\nimport type { ReactNode } from \"react\";\nimport { useOpenRenownLogin } from \"../hooks/use-renown-login.js\";\nimport type { NavRouteEntry } from \"@powerhousedao/connect-core/router\";\nimport { useNavRoutes } from \"@powerhousedao/connect-core/router\";\nimport { DriveIcon } from \"@powerhousedao/connect/components/shared\";\nimport { ErrorBoundary } from \"@powerhousedao/connect/components/shared\";\nimport { useVisibleDrives } from \"../pages/use-drive-auth-gate.js\";\n\nfunction DriveSidebarItem(props: {\n drive: DocumentDriveDocument;\n active: boolean;\n}) {\n const { drive, active } = props;\n const link = useLinkProps({ driveSlug: makeDriveSlug(drive) }, () =>\n setSelectedDrive(drive),\n );\n return (\n <SidebarItem\n title={getDriveName(drive)}\n href={link.href}\n aria-current={link[\"aria-current\"]}\n onClick={link.onClick}\n onPreload={() => preloadDrive(drive)}\n active={active}\n icon={<DriveIcon drive={drive} />}\n />\n );\n}\n\n/** The drives the user may open, and the add-drive item when enabled. */\nexport function SidebarDriveItems() {\n const drives = useVisibleDrives();\n const isAddDriveEnabled = useIsAddDriveEnabled();\n const [selectedDrive] = useSelectedDriveSafe();\n return (\n <>\n {drives?.map((drive) => (\n <DriveSidebarItem\n key={drive.header.id}\n drive={drive}\n active={selectedDrive?.header.id === drive.header.id}\n />\n ))}\n {isAddDriveEnabled && (\n <SidebarAddDriveItem\n onClick={() => showPHModal({ type: \"addDrive\" })}\n />\n )}\n </>\n );\n}\n\nfunction NavSidebarItem({ item }: { item: NavRouteEntry }) {\n // Nav routes can come from a project's tree, unknown to Connect's types.\n const router = useRouter() as unknown as AnyRouter;\n // A boolean select: loading state changes don't re-render the item.\n const current = useRouterState({\n select: () => !!router.matchRoute({ to: item.to }, { fuzzy: true }),\n });\n const Icon = item.icon;\n return (\n <SidebarItem\n title={item.label}\n href={router.buildLocation({ to: item.to }).publicHref}\n aria-current={current ? \"page\" : undefined}\n onClick={(event) => {\n if (!isPlainClick(event)) return;\n event.preventDefault();\n void router.navigate({ to: item.to });\n }}\n onPreload={() => {\n router.preloadRoute({ to: item.to }).catch(() => undefined);\n }}\n icon={Icon ? <Icon size={24} /> : undefined}\n />\n );\n}\n\n/** Links to the routes that declare `staticData.nav`, in order. */\nexport function SidebarNavItems() {\n const items = useNavRoutes();\n return (\n <>\n {items.map((item) => (\n <NavSidebarItem key={item.routeId} item={item} />\n ))}\n </>\n );\n}\n\nexport type SidebarProps = {\n /** Items after the drives and nav routes, e.g. a custom layout's links. */\n extraItems?: ReactNode;\n /** Header and footer only, no items. */\n collapsed?: boolean;\n};\n\n/** Connect's sidebar: drives, nav routes, settings and the user. */\nexport function Sidebar({ extraItems, collapsed }: SidebarProps = {}) {\n const user = useUser();\n const openLogin = useOpenRenownLogin();\n const connectDebug =\n typeof localStorage !== \"undefined\" &&\n localStorage.getItem(\"CONNECT_DEBUG\") === \"true\";\n\n const ensName = user?.ens?.name || user?.profile?.username || undefined;\n const avatarUrl =\n user?.ens?.avatarUrl || user?.profile?.userImage || undefined;\n\n const ensInfo = useEns(!avatarUrl ? user?.address : undefined);\n\n const settingsLink = useLinkProps({ settings: true });\n\n const etherscanUrl = user?.address\n ? `https://etherscan.io/address/${user.address}`\n : \"\";\n\n return (\n <ConnectTooltipProvider>\n <ConnectSidebar\n id=\"sidebar\"\n data-collapsed={collapsed ? \"\" : undefined}\n onClick={() => setSelectedDrive(undefined)}\n onClickSettings={settingsLink.onClick}\n settingsHref={settingsLink.href}\n settingsCurrent={settingsLink[\"aria-current\"]}\n address={user?.address}\n onLogin={openLogin}\n onDisconnect={() => {\n void logout();\n }}\n ensName={ensName || ensInfo.data?.ens}\n avatarUrl={\n avatarUrl ||\n ensInfo.data?.avatar_small ||\n ensInfo.data?.avatar_url ||\n undefined\n }\n etherscanUrl={etherscanUrl}\n showDebug={connectDebug}\n onDebugClick={() => showPHModal({ type: \"debugSettings\" })}\n >\n {!collapsed && (\n <ErrorBoundary\n variant=\"text\"\n fallbackMessage=\"There was an error loading drives\"\n loggerContext={[\"Connect\", \"Sidebar\"]}\n >\n <SidebarDriveItems />\n <SidebarNavItems />\n {extraItems}\n </ErrorBoundary>\n )}\n </ConnectSidebar>\n </ConnectTooltipProvider>\n );\n}\n","import { useIsEmbedded } from \"@powerhousedao/connect-core/embedded\";\nimport type { ReactNode } from \"react\";\nimport {\n ContentOutlet,\n useSidebarMode,\n} from \"@powerhousedao/connect-core/router\";\nimport { Sidebar } from \"./sidebar.js\";\n\nexport type AppLayoutProps = {\n /** Replaces Connect's sidebar, e.g. `<ConnectSidebar extraItems={...} />`. */\n sidebar?: ReactNode;\n};\n\n/** The `_app` layout: the sidebar beside the matched route. Embedded mode and\n * `staticData.sidebar: \"hidden\"` drop the sidebar. */\nexport function AppLayout({ sidebar }: AppLayoutProps = {}) {\n const isEmbedded = useIsEmbedded();\n const mode = useSidebarMode();\n const showSidebar = !isEmbedded && mode !== \"hidden\";\n return (\n <div\n className=\"flex h-full items-stretch overflow-auto\"\n role=\"presentation\"\n tabIndex={0}\n >\n {showSidebar && (sidebar ?? <Sidebar collapsed={mode === \"collapsed\"} />)}\n <ContentOutlet className=\"relative flex flex-1 flex-col overflow-auto\" />\n </div>\n );\n}\n","import { CenteredErrorMessage } from \"@powerhousedao/connect/components/shared\";\nimport { useIsColdStart } from \"@powerhousedao/connect-core/router\";\nimport { DefaultEditorLoader } from \"@powerhousedao/design-system/connect\";\nimport type { ErrorComponentProps } from \"@tanstack/react-router\";\n\n// Fades the cold-start loader in, so a load ending just past pendingMs doesn't flash.\nconst DRIVE_PENDING_FADE = \"ph-drive-pending-in 200ms ease-in 100ms both\";\n\n/** A loader on a cold start; otherwise the open view stays while loading. */\nexport function DrivePending() {\n const isColdStart = useIsColdStart();\n if (!isColdStart) return null;\n return (\n <div\n className=\"flex size-full items-center justify-center\"\n style={{ animation: DRIVE_PENDING_FADE }}\n >\n <style>\n {`@keyframes ph-drive-pending-in{from{opacity:0}to{opacity:1}}`}\n </style>\n <DefaultEditorLoader message=\"Loading drive\" />\n </div>\n );\n}\n\n/** A route's loader or render error, as Connect's error boundaries show it. */\nexport function RouteError({ error, reset }: ErrorComponentProps) {\n return <CenteredErrorMessage error={error} resetErrorBoundary={reset} />;\n}\n","import { DropZoneWrapper } from \"@powerhousedao/design-system/connect\";\nimport { GenericDriveExplorer } from \"@powerhousedao/powerhouse-vetra-packages/editors\";\nimport {\n DriveProvider,\n useAppModuleById,\n useDefaultAppModule,\n useDispatch,\n} from \"@powerhousedao/reactor-browser\";\nimport { useDriveRouteData } from \"@powerhousedao/connect-core/router\";\nimport type { ReactNode } from \"react\";\nimport { Suspense, useMemo } from \"react\";\nimport { EditorLoader } from \"./editor-loader.js\";\nimport { ErrorBoundary } from \"@powerhousedao/connect/components/shared\";\n\n/** The route's drive's app around `children`, the open document's view;\n * drive apps show their own view while `children` is null. */\nexport function AppContainer({ children = null }: { children?: ReactNode }) {\n const { drive: selectedDrive, folder, documentId } = useDriveRouteData();\n\n const app = useAppModuleById(selectedDrive?.header.meta?.preferredEditor);\n const defaultApp = useDefaultAppModule();\n const [, dispatch] = useDispatch(selectedDrive);\n const nodeId = documentId ?? folder?.id;\n // The drive app's useSelected* read this; opening goes through the router.\n const context = useMemo(\n () => selectedDrive && { drive: selectedDrive, dispatch, folder, nodeId },\n [selectedDrive, dispatch, folder, nodeId],\n );\n\n if (!selectedDrive || !context) {\n return <EditorLoader />;\n }\n\n const AppComponent =\n app?.Component ?? defaultApp?.Component ?? GenericDriveExplorer.Component;\n return (\n <ErrorBoundary\n variant=\"detailed\"\n resetKeys={[selectedDrive.header.id]}\n loggerContext={[\"Connect\", \"App\"]}\n >\n <Suspense fallback={<EditorLoader />}>\n <DriveProvider value={context}>\n <DropZoneWrapper className=\"flex h-full flex-col overflow-auto\">\n <AppComponent document={selectedDrive} dispatch={dispatch}>\n {children}\n </AppComponent>\n </DropZoneWrapper>\n </DriveProvider>\n </Suspense>\n </ErrorBoundary>\n );\n}\n","import { AppContainer } from \"../editors/app-container.js\";\nimport { DocumentEditorContainer } from \"../editors/document-editor-container.js\";\nimport { DriveIcon } from \"@powerhousedao/connect/components/shared\";\nimport {\n DriveAuthGate,\n HomeScreen,\n HomeScreenAddDriveItem,\n HomeScreenItem,\n} from \"@powerhousedao/design-system/connect\";\nimport {\n logout,\n makeDriveSlug,\n preloadDrive,\n setSelectedDrive,\n useAppModuleById,\n useIsAddDriveEnabled,\n useLinkProps,\n getDriveName,\n} from \"@powerhousedao/reactor-browser\";\nimport type { DocumentDriveDocument } from \"@powerhousedao/shared/document-drive\";\nimport { Outlet } from \"@tanstack/react-router\";\nimport { useDriveRouteData } from \"@powerhousedao/connect-core/router\";\nimport { getRuntimeConfig } from \"@powerhousedao/connect-core/runtime-config\";\nimport { useDriveAuthGate, useVisibleDrives } from \"./use-drive-auth-gate.js\";\nimport { useOpenRenownLogin } from \"../hooks/use-renown-login.js\";\n\n/** Connect's home: the drives, and adding one. */\nexport function Home() {\n const drives = useVisibleDrives();\n const isAddDriveEnabled = useIsAddDriveEnabled();\n const runtimeConfig = getRuntimeConfig();\n const homeBackground = runtimeConfig.connect?.branding?.homeBackground;\n return (\n <HomeScreen homeBackground={homeBackground}>\n {drives?.map((drive) => {\n return <DriveItem key={drive.header.id} drive={drive} />;\n })}\n {isAddDriveEnabled && <HomeScreenAddDriveItem />}\n </HomeScreen>\n );\n}\n\n/** Connect's drive layout: the drive app around the open document, or the\n * sign-in gate when the drive's remote refuses the user. */\nexport function DriveLayout() {\n const { gate, dismiss } = useDriveAuthGate();\n const openLogin = useOpenRenownLogin();\n const { documentId } = useDriveRouteData();\n if (gate) {\n return (\n <div className=\"flex h-full items-center justify-center p-4\">\n <DriveAuthGate\n mode={gate}\n onLogin={openLogin}\n onLogout={() => void logout()}\n onClose={dismiss}\n />\n </div>\n );\n }\n return <AppContainer>{documentId ? <Outlet /> : null}</AppContainer>;\n}\n\n/** Connect's node route: the open document's editor. */\nexport function NodeView() {\n const { documentId } = useDriveRouteData();\n return documentId ? (\n <DocumentEditorContainer documentId={documentId} />\n ) : null;\n}\n\nfunction DriveItem({ drive }: { drive: DocumentDriveDocument }) {\n const editorModule = useAppModuleById(drive.header.meta?.preferredEditor);\n const description = editorModule?.config.name || \"Drive Explorer App\";\n const link = useLinkProps({ driveSlug: makeDriveSlug(drive) }, () =>\n setSelectedDrive(drive),\n );\n return (\n <HomeScreenItem\n key={drive.header.id}\n title={getDriveName(drive)}\n description={description}\n icon={<DriveIcon drive={drive} />}\n href={link.href}\n aria-current={link[\"aria-current\"]}\n onClick={link.onClick}\n onPreload={() => preloadDrive(drive)}\n />\n );\n}\n","import { connectConfig } from \"@powerhousedao/connect/config\";\nimport { lazyRouteComponent } from \"@tanstack/react-router\";\nimport type * as SettingsModule from \"./index.js\";\n\n/** Whether the AI assistant is configured. */\nexport const aiAssistantEnabled = () => connectConfig.aiAssistantEnabled;\n\n// Loaded with the settings page, not with the app; the router preloads it on intent.\nconst settings = () => import(\"./index.js\");\n\n/** Connect's settings page around the shown tab. */\nexport const SettingsPage = lazyRouteComponent(settings, \"SettingsPage\");\n\n/** One of Connect's settings tabs. */\nexport function settingsTab(\n name: Exclude<keyof typeof SettingsModule, \"SettingsPage\">,\n) {\n return lazyRouteComponent(settings, name);\n}\n","import type {\n ConnectRoutes,\n ConnectSettingsTab,\n} from \"@powerhousedao/connect-core/router\";\nimport type { AnyRoute } from \"@tanstack/react-router\";\nimport { createRoute } from \"@tanstack/react-router\";\nimport { Bot, CircleHelp, Package, PenLine, TriangleAlert } from \"lucide-react\";\nimport { aiAssistantEnabled, settingsTab } from \"./settings/tabs.js\";\n\nconst tab = (settings: ConnectSettingsTab) => ({ staticData: { settings } });\n\n/** The generic plugin's settings tabs by path: each tab's route options, which a\n * project file at that path spreads to replace the tab's view. */\nexport const genericSettingsTabs = {\n \"ai-assistant\": tab({\n label: \"AI Assistant\",\n order: 0,\n icon: Bot,\n enabled: aiAssistantEnabled,\n }),\n \"package-manager\": tab({\n label: \"Package Manager\",\n order: 10,\n icon: Package,\n }),\n \"default-editors\": tab({\n label: \"Default Editors\",\n order: 20,\n icon: PenLine,\n }),\n \"danger-zone\": tab({\n label: \"Danger Zone\",\n order: 80,\n icon: TriangleAlert,\n destructive: true,\n }),\n about: tab({ label: \"About\", order: 90, icon: CircleHelp }),\n};\n\ntype GenericSettingsTab = keyof typeof genericSettingsTabs;\n\nconst VIEWS: Record<GenericSettingsTab, Parameters<typeof settingsTab>[0]> = {\n \"ai-assistant\": \"AiAssistant\",\n \"package-manager\": \"ConnectPackageManager\",\n \"default-editors\": \"DefaultEditor\",\n \"danger-zone\": \"DangerZone\",\n about: \"About\",\n};\n\n/** The generic settings tabs, under the settings route. */\nexport function settingsTabRoutes({ settingsRoute }: ConnectRoutes) {\n return Object.entries(genericSettingsTabs).map(([path, options]) =>\n createRoute({\n getParentRoute: () => settingsRoute,\n path,\n ...options,\n component: settingsTab(VIEWS[path as GenericSettingsTab]),\n }),\n ) as AnyRoute[];\n}\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AAoCA,SAAgB,gBACd,iBACA,kBACA,WACU;CACV,MAAM,EAAE,iBAAiB,YAAY;CACrC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