@dreamboard-games/cli 0.1.30-alpha.2 → 0.1.30-alpha.21

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 (136) hide show
  1. package/README.md +25 -107
  2. package/dist/agent-verifier/agent-workspace-verifier.mjs +1682 -0
  3. package/dist/agent-verifier/agent-workspace-verifier.mjs.map +1 -0
  4. package/dist/agent-verifier/chunk-22U6RMWO.mjs +722 -0
  5. package/dist/agent-verifier/chunk-22U6RMWO.mjs.map +1 -0
  6. package/dist/agent-verifier/chunk-4I2WWAPK.mjs +399 -0
  7. package/dist/agent-verifier/chunk-4I2WWAPK.mjs.map +1 -0
  8. package/dist/agent-verifier/chunk-BWBN2TDJ.mjs +2811 -0
  9. package/dist/agent-verifier/chunk-BWBN2TDJ.mjs.map +1 -0
  10. package/dist/agent-verifier/chunk-DQUYBIGQ.mjs +353 -0
  11. package/dist/agent-verifier/chunk-DQUYBIGQ.mjs.map +1 -0
  12. package/dist/agent-verifier/chunk-F2DIOJJZ.mjs +302 -0
  13. package/dist/agent-verifier/chunk-F2DIOJJZ.mjs.map +1 -0
  14. package/dist/agent-verifier/chunk-GWRZRWCF.mjs +107 -0
  15. package/dist/agent-verifier/chunk-GWRZRWCF.mjs.map +1 -0
  16. package/dist/agent-verifier/chunk-H6XDQJ3N.mjs +11 -0
  17. package/dist/agent-verifier/chunk-HUBV22JQ.mjs +89 -0
  18. package/dist/agent-verifier/chunk-HUBV22JQ.mjs.map +1 -0
  19. package/dist/agent-verifier/chunk-IWB4L2HV.mjs +273 -0
  20. package/dist/agent-verifier/chunk-IWB4L2HV.mjs.map +1 -0
  21. package/dist/agent-verifier/chunk-JZTH3EMV.mjs +14523 -0
  22. package/dist/agent-verifier/chunk-JZTH3EMV.mjs.map +1 -0
  23. package/dist/agent-verifier/chunk-KDAQ4CZY.mjs +192 -0
  24. package/dist/agent-verifier/chunk-KDAQ4CZY.mjs.map +1 -0
  25. package/dist/agent-verifier/chunk-M7UVBANQ.mjs +58 -0
  26. package/dist/agent-verifier/chunk-M7UVBANQ.mjs.map +1 -0
  27. package/dist/agent-verifier/chunk-MYMVXTZT.mjs +766 -0
  28. package/dist/agent-verifier/chunk-MYMVXTZT.mjs.map +1 -0
  29. package/dist/agent-verifier/chunk-OJFZVGEL.mjs +492 -0
  30. package/dist/agent-verifier/chunk-OJFZVGEL.mjs.map +1 -0
  31. package/dist/agent-verifier/chunk-QD4SQNUP.mjs +75 -0
  32. package/dist/agent-verifier/chunk-QD4SQNUP.mjs.map +1 -0
  33. package/dist/agent-verifier/chunk-RDYXWXXC.mjs +47 -0
  34. package/dist/agent-verifier/chunk-RDYXWXXC.mjs.map +1 -0
  35. package/dist/agent-verifier/chunk-TIDX3YLW.mjs +158 -0
  36. package/dist/agent-verifier/chunk-TIDX3YLW.mjs.map +1 -0
  37. package/dist/agent-verifier/chunk-TTB7AIHZ.mjs +214 -0
  38. package/dist/agent-verifier/chunk-TTB7AIHZ.mjs.map +1 -0
  39. package/dist/agent-verifier/chunk-UXGTT25Q.mjs +59 -0
  40. package/dist/agent-verifier/chunk-UXGTT25Q.mjs.map +1 -0
  41. package/dist/agent-verifier/chunk-YE7UAO3T.mjs +129 -0
  42. package/dist/agent-verifier/chunk-YE7UAO3T.mjs.map +1 -0
  43. package/dist/agent-verifier/chunk-ZEELHSY3.mjs +20 -0
  44. package/dist/agent-verifier/chunk-ZEELHSY3.mjs.map +1 -0
  45. package/dist/agent-verifier/global-config-IXZLY4BS.mjs +19 -0
  46. package/dist/agent-verifier/keychain-backend-UF3Z26JM.mjs +140 -0
  47. package/dist/agent-verifier/keychain-backend-UF3Z26JM.mjs.map +1 -0
  48. package/dist/agent-verifier/local-files-OF4QFISU.mjs +45 -0
  49. package/dist/agent-verifier/local-files-OF4QFISU.mjs.map +1 -0
  50. package/dist/agent-verifier/local-typecheck-DHVLM37Z.mjs +150 -0
  51. package/dist/agent-verifier/local-typecheck-DHVLM37Z.mjs.map +1 -0
  52. package/dist/agent-verifier/materialize-workspace-7DFE45ZH.mjs +90 -0
  53. package/dist/agent-verifier/materialize-workspace-7DFE45ZH.mjs.map +1 -0
  54. package/dist/agent-verifier/project-state-XKUSCFSV.mjs +33 -0
  55. package/dist/agent-verifier/project-state-XKUSCFSV.mjs.map +1 -0
  56. package/dist/agent-verifier/prompt-VKHMCQT6.mjs +756 -0
  57. package/dist/agent-verifier/prompt-VKHMCQT6.mjs.map +1 -0
  58. package/dist/agent-verifier/reducer-bundle-preflight-GLUJKTWU.mjs +312 -0
  59. package/dist/agent-verifier/reducer-bundle-preflight-GLUJKTWU.mjs.map +1 -0
  60. package/dist/agent-verifier/reducer-contract-preflight-WVQQPW5F.mjs +46 -0
  61. package/dist/agent-verifier/reducer-contract-preflight-WVQQPW5F.mjs.map +1 -0
  62. package/dist/agent-verifier/reducer-native-test-harness-H6G6RBRY.mjs +3436 -0
  63. package/dist/agent-verifier/reducer-native-test-harness-H6G6RBRY.mjs.map +1 -0
  64. package/dist/agent-verifier/static-scaffold-CC4KL6K7.mjs +24 -0
  65. package/dist/agent-verifier/static-scaffold-CC4KL6K7.mjs.map +1 -0
  66. package/dist/agent-verifier/workspace-codegen-SPPVHURX.mjs +10 -0
  67. package/dist/agent-verifier/workspace-codegen-SPPVHURX.mjs.map +1 -0
  68. package/dist/agent-verifier/workspace-dependencies-5HEEKZFP.mjs +17 -0
  69. package/dist/agent-verifier/workspace-dependencies-5HEEKZFP.mjs.map +1 -0
  70. package/dist/authoring-compatibility-internal.js +12 -0
  71. package/dist/authoring-compatibility-internal.js.map +1 -0
  72. package/dist/chunk-2H7UOFLK.js +11 -0
  73. package/dist/chunk-2H7UOFLK.js.map +1 -0
  74. package/dist/{chunk-TAQKH67O.js → chunk-2Z65YI7P.js} +2702 -7338
  75. package/dist/chunk-2Z65YI7P.js.map +1 -0
  76. package/dist/chunk-EQNBQVIW.js +204 -0
  77. package/dist/chunk-EQNBQVIW.js.map +1 -0
  78. package/dist/chunk-GQ3ZEAEG.js +4281 -0
  79. package/dist/chunk-GQ3ZEAEG.js.map +1 -0
  80. package/dist/chunk-UI7NWSYA.js +334 -0
  81. package/dist/chunk-UI7NWSYA.js.map +1 -0
  82. package/dist/{global-config-S4ZIPECE.js → global-config-GK2UC2X6.js} +4 -3
  83. package/dist/global-config-GK2UC2X6.js.map +1 -0
  84. package/dist/index.js +3421 -6435
  85. package/dist/index.js.map +1 -1
  86. package/dist/internal.js +15 -9
  87. package/dist/{keychain-backend-HDF4TZDL.js → keychain-backend-GO34KGTG.js} +12 -7
  88. package/dist/keychain-backend-GO34KGTG.js.map +1 -0
  89. package/dist/{prompt-NDV3AE5L.js → prompt-GMZABCJC.js} +2 -2
  90. package/package.json +11 -20
  91. package/release/authoring-release-set.json +38 -0
  92. package/skills/dreamboard/SKILL.md +30 -28
  93. package/skills/dreamboard/references/building-your-first-game.md +15 -15
  94. package/skills/dreamboard/references/cli.md +48 -47
  95. package/skills/dreamboard/references/manifest-authoring.md +11 -3
  96. package/skills/dreamboard/references/quickstart.md +16 -13
  97. package/skills/dreamboard/references/testing.md +10 -10
  98. package/dist/chunk-N7XPNNUI.js +0 -432
  99. package/dist/chunk-N7XPNNUI.js.map +0 -1
  100. package/dist/chunk-SEGVTWSK.js +0 -44
  101. package/dist/chunk-TAQKH67O.js.map +0 -1
  102. package/dist/dev-host/components/drawer.tsx +0 -132
  103. package/dist/dev-host/components/input.tsx +0 -21
  104. package/dist/dev-host/dev-api-proxy-plugin.ts +0 -328
  105. package/dist/dev-host/dev-author-dom-warnings.ts +0 -100
  106. package/dist/dev-host/dev-diagnostics.ts +0 -62
  107. package/dist/dev-host/dev-fallback-stylesheet.ts +0 -53
  108. package/dist/dev-host/dev-hmr-guard-plugin.ts +0 -47
  109. package/dist/dev-host/dev-host-controller.ts +0 -674
  110. package/dist/dev-host/dev-host-player-query.ts +0 -17
  111. package/dist/dev-host/dev-host-session-transport.ts +0 -52
  112. package/dist/dev-host/dev-host-storage.ts +0 -56
  113. package/dist/dev-host/dev-log-relay-plugin.ts +0 -510
  114. package/dist/dev-host/dev-runtime-config.ts +0 -14
  115. package/dist/dev-host/dev-runtime-platform.ts +0 -335
  116. package/dist/dev-host/dev-virtual-modules-plugin.ts +0 -64
  117. package/dist/dev-host/host-main.css +0 -224
  118. package/dist/dev-host/host-main.tsx +0 -948
  119. package/dist/dev-host/index.html +0 -56
  120. package/dist/dev-host/lib/utils.ts +0 -6
  121. package/dist/dev-host/plugin-main.ts +0 -61
  122. package/dist/dev-host/plugin.html +0 -24
  123. package/dist/dev-host/shared-styles.css +0 -144
  124. package/dist/dev-host/start-dev-server.ts +0 -140
  125. package/dist/dev-host/virtual-modules.d.ts +0 -27
  126. package/dist/keychain-backend-HDF4TZDL.js.map +0 -1
  127. package/skills/dreamboard/scripts/events-extract.mjs +0 -218
  128. /package/dist/{chunk-SEGVTWSK.js.map → agent-verifier/chunk-H6XDQJ3N.mjs.map} +0 -0
  129. /package/dist/{global-config-S4ZIPECE.js.map → agent-verifier/global-config-IXZLY4BS.mjs.map} +0 -0
  130. /package/dist/{prompt-NDV3AE5L.js.map → prompt-GMZABCJC.js.map} +0 -0
  131. /package/{dist/scaffold → scaffold}/assets/static/app/tsconfig.framework.json +0 -0
  132. /package/{dist/scaffold → scaffold}/assets/static/app/tsconfig.json +0 -0
  133. /package/{dist/scaffold → scaffold}/assets/static/ui/index.tsx +0 -0
  134. /package/{dist/scaffold → scaffold}/assets/static/ui/style.css +0 -0
  135. /package/{dist/scaffold → scaffold}/assets/static/ui/tsconfig.framework.json +0 -0
  136. /package/{dist/scaffold → scaffold}/assets/static/ui/tsconfig.json +0 -0
@@ -1,335 +0,0 @@
1
- import { createRequire } from "node:module";
2
- import path from "node:path";
3
- import { fileURLToPath } from "node:url";
4
- import { existsSync } from "node:fs";
5
- import type { Alias, ServerOptions } from "vite";
6
- import { resolveDevDiagnosticsLevel } from "./dev-diagnostics.js";
7
-
8
- export interface DevRuntimePlatformOptions {
9
- importMetaUrl: string;
10
- projectRoot: string;
11
- debug: boolean;
12
- port?: number;
13
- host?: string | boolean;
14
- allowedHosts?: string[];
15
- tailwindCssEntry: string;
16
- }
17
-
18
- export interface DevRuntimePlatform {
19
- devHostRoot: string;
20
- repoRoot: string;
21
- cliRoot: string;
22
- diagnosticsLevel: ReturnType<typeof resolveDevDiagnosticsLevel>;
23
- viteLogLevel: "info" | "warn";
24
- serverConfig: ServerOptions;
25
- resolveDedupe: string[];
26
- resolveAlias: Alias[];
27
- optimizeDepsExclude: string[];
28
- }
29
-
30
- export function createDevRuntimePlatform(
31
- options: DevRuntimePlatformOptions,
32
- ): DevRuntimePlatform {
33
- const devHostRoot = resolveDevHostRoot(options.importMetaUrl);
34
- const cliRoot = resolveCliRoot(options.importMetaUrl);
35
- const repoRoot = resolveRepoRoot(cliRoot);
36
- const require = createRequire(options.importMetaUrl);
37
- const diagnosticsLevel = resolveDevDiagnosticsLevel(options.debug);
38
- const sdkRoot = resolvePackageRoot(
39
- require,
40
- cliRoot,
41
- "@dreamboard-games/sdk",
42
- "@dreamboard-games/sdk",
43
- "node_modules/@dreamboard-games/sdk",
44
- );
45
- const apiClientClientGen = resolvePackageSubpath(
46
- require,
47
- cliRoot,
48
- "@dreamboard-games/api-client/client.gen",
49
- "@dreamboard-games/api-client/client.gen",
50
- "node_modules/@dreamboard-games/api-client/dist/client.gen.js",
51
- );
52
- const uiHostRuntimeRoot = resolveUiHostRuntimeRoot(require, cliRoot);
53
-
54
- return {
55
- devHostRoot,
56
- repoRoot,
57
- cliRoot,
58
- diagnosticsLevel,
59
- viteLogLevel: diagnosticsLevel === "verbose" ? "info" : "warn",
60
- serverConfig: {
61
- host: options.host ?? "localhost",
62
- allowedHosts: options.allowedHosts,
63
- port: options.port ?? 5352,
64
- strictPort: false,
65
- watch: {
66
- ignored: createProjectOnlyWatchIgnored(options.projectRoot),
67
- },
68
- headers: {
69
- "Access-Control-Allow-Origin": "*",
70
- "Access-Control-Allow-Methods": "GET, OPTIONS",
71
- },
72
- fs: {
73
- allow: [options.projectRoot, repoRoot],
74
- },
75
- },
76
- resolveDedupe: ["react", "react-dom", "@dreamboard-games/sdk"],
77
- resolveAlias: [
78
- {
79
- find: /^react$/,
80
- replacement: resolveCliDependency(
81
- require,
82
- cliRoot,
83
- "react",
84
- "node_modules/react/index.js",
85
- ),
86
- },
87
- {
88
- find: /^react\/jsx-runtime$/,
89
- replacement: resolveCliDependency(
90
- require,
91
- cliRoot,
92
- "react/jsx-runtime",
93
- "node_modules/react/jsx-runtime.js",
94
- ),
95
- },
96
- {
97
- find: /^react\/jsx-dev-runtime$/,
98
- replacement: resolveCliDependency(
99
- require,
100
- cliRoot,
101
- "react/jsx-dev-runtime",
102
- "node_modules/react/jsx-dev-runtime.js",
103
- ),
104
- },
105
- {
106
- find: /^react-dom$/,
107
- replacement: resolveCliDependency(
108
- require,
109
- cliRoot,
110
- "react-dom",
111
- "node_modules/react-dom/index.js",
112
- ),
113
- },
114
- {
115
- find: /^react-dom\/client$/,
116
- replacement: resolveCliDependency(
117
- require,
118
- cliRoot,
119
- "react-dom/client",
120
- "node_modules/react-dom/client.js",
121
- ),
122
- },
123
- {
124
- find: /^@dreamboard-games\/sdk\/ui$/,
125
- replacement: path.resolve(sdkRoot, "dist/ui.js"),
126
- },
127
- {
128
- find: /^@dreamboard-games\/sdk\/ui\/components$/,
129
- replacement: path.resolve(sdkRoot, "dist/ui/components.js"),
130
- },
131
- {
132
- find: /^@dreamboard-games\/sdk\/runtime$/,
133
- replacement: path.resolve(sdkRoot, "dist/runtime.js"),
134
- },
135
- {
136
- find: /^@dreamboard-games\/sdk\/runtime\/runtime-api$/,
137
- replacement: path.resolve(sdkRoot, "dist/runtime/runtime-api.js"),
138
- },
139
- {
140
- find: /^@dreamboard-games\/sdk\/runtime\/primitives$/,
141
- replacement: path.resolve(sdkRoot, "dist/runtime/primitives.js"),
142
- },
143
- {
144
- find: /^@dreamboard-games\/sdk\/runtime\/workspace-contract$/,
145
- replacement: path.resolve(
146
- sdkRoot,
147
- "dist/runtime/workspace-contract.js",
148
- ),
149
- },
150
- {
151
- find: /^@dreamboard-games\/ui-host-runtime\/components$/,
152
- replacement: path.resolve(uiHostRuntimeRoot, "src/components/index.ts"),
153
- },
154
- {
155
- find: /^@dreamboard-games\/ui-host-runtime\/runtime$/,
156
- replacement: path.resolve(uiHostRuntimeRoot, "src/runtime/index.ts"),
157
- },
158
- {
159
- find: /^@dreamboard\/manifest-contract$/,
160
- replacement: path.resolve(
161
- options.projectRoot,
162
- "shared/manifest-contract.ts",
163
- ),
164
- },
165
- {
166
- find: /^#dreamboard\/ui-contract$/,
167
- replacement: path.resolve(
168
- options.projectRoot,
169
- "shared/generated/ui-contract.ts",
170
- ),
171
- },
172
- {
173
- find: /^@dreamboard-games\/sdk\/ui\/plugin-styles\.css$/,
174
- replacement: resolveCliDependency(
175
- require,
176
- cliRoot,
177
- "@dreamboard-games/sdk/ui/plugin-styles.css",
178
- "node_modules/@dreamboard-games/sdk/dist/ui/plugin-styles.css",
179
- ),
180
- },
181
- {
182
- find: /^@dreamboard-games\/api-client\/client\.gen$/,
183
- replacement: apiClientClientGen,
184
- },
185
- {
186
- find: /^@shared\/(.*)$/,
187
- replacement: path.resolve(options.projectRoot, "shared/$1"),
188
- },
189
- {
190
- find: /^tailwindcss$/,
191
- replacement: options.tailwindCssEntry,
192
- },
193
- ],
194
- // Author SDKs are resolved from the project, not the CLI root. Let Vite
195
- // transform them fresh so its CLI-scoped dependency cache cannot pin an
196
- // older local snapshot after `dreamboard sync`.
197
- optimizeDepsExclude: [
198
- "@dreamboard-games/sdk",
199
- "@dreamboard-games/sdk/ui",
200
- "@dreamboard-games/sdk/runtime",
201
- "@dreamboard-games/sdk/runtime/primitives",
202
- "@dreamboard-games/sdk/runtime/workspace-contract",
203
- "@dreamboard-games/sdk/reducer",
204
- "@dreamboard-games/sdk/types",
205
- ],
206
- };
207
- }
208
-
209
- function createProjectOnlyWatchIgnored(
210
- projectRoot: string,
211
- ): (file: string) => boolean {
212
- const normalizedProjectRoot = path.resolve(projectRoot);
213
-
214
- return (file) => {
215
- const normalizedFile = path.resolve(file);
216
- const relativePath = path.relative(normalizedProjectRoot, normalizedFile);
217
- const isInsideProject =
218
- relativePath === "" ||
219
- (relativePath.length > 0 &&
220
- !relativePath.startsWith("..") &&
221
- !path.isAbsolute(relativePath));
222
-
223
- if (!isInsideProject) {
224
- return true;
225
- }
226
-
227
- const pathSegments = relativePath.split(path.sep);
228
- return (
229
- pathSegments.includes(".dreamboard") ||
230
- pathSegments.includes("node_modules")
231
- );
232
- };
233
- }
234
-
235
- function resolveUiHostRuntimeRoot(
236
- require: NodeJS.Require,
237
- cliRoot: string,
238
- ): string {
239
- try {
240
- return path.dirname(
241
- require.resolve("@dreamboard-games/ui-host-runtime/package.json"),
242
- );
243
- } catch {
244
- return path.resolve(cliRoot, "dist/runtime-packages/ui-host-runtime");
245
- }
246
- }
247
-
248
- function resolvePackageRoot(
249
- require: NodeJS.Require,
250
- cliRoot: string,
251
- specifier: string,
252
- publicSpecifier: string,
253
- fallbackRelativePath: string,
254
- ): string {
255
- try {
256
- return path.dirname(require.resolve(`${specifier}/package.json`));
257
- } catch {
258
- try {
259
- return path.dirname(require.resolve(`${publicSpecifier}/package.json`));
260
- } catch {
261
- return path.resolve(cliRoot, "..", "..", fallbackRelativePath);
262
- }
263
- }
264
- }
265
-
266
- function resolvePackageSubpath(
267
- require: NodeJS.Require,
268
- cliRoot: string,
269
- specifier: string,
270
- publicSpecifier: string,
271
- fallbackRelativePath: string,
272
- ): string {
273
- try {
274
- return require.resolve(specifier);
275
- } catch {
276
- try {
277
- return require.resolve(publicSpecifier);
278
- } catch {
279
- return path.resolve(cliRoot, fallbackRelativePath);
280
- }
281
- }
282
- }
283
-
284
- function resolveCliDependency(
285
- require: NodeJS.Require,
286
- cliRoot: string,
287
- specifier: string,
288
- fallbackRelativePath: string,
289
- ): string {
290
- try {
291
- return require.resolve(specifier);
292
- } catch {
293
- return path.resolve(cliRoot, fallbackRelativePath);
294
- }
295
- }
296
-
297
- function resolveDevHostRoot(importMetaUrl: string): string {
298
- const currentDir = path.dirname(fileURLToPath(importMetaUrl));
299
- const packagedDirCandidate = path.resolve(currentDir, "dev-host");
300
- if (existsSync(packagedDirCandidate)) return packagedDirCandidate;
301
- const sourceDirCandidate = path.resolve(currentDir, "../src/dev-host");
302
- return existsSync(sourceDirCandidate) ? sourceDirCandidate : currentDir;
303
- }
304
-
305
- function resolveCliRoot(importMetaUrl: string): string {
306
- let currentDir = path.dirname(fileURLToPath(importMetaUrl));
307
-
308
- while (true) {
309
- if (existsSync(path.join(currentDir, "package.json"))) {
310
- return currentDir;
311
- }
312
-
313
- const parentDir = path.dirname(currentDir);
314
- if (parentDir === currentDir) {
315
- return path.resolve(resolveDevHostRoot(importMetaUrl), "../..");
316
- }
317
- currentDir = parentDir;
318
- }
319
- }
320
-
321
- function resolveRepoRoot(cliRoot: string): string {
322
- let currentDir = cliRoot;
323
-
324
- while (true) {
325
- if (existsSync(path.join(currentDir, "pnpm-workspace.yaml"))) {
326
- return currentDir;
327
- }
328
-
329
- const parentDir = path.dirname(currentDir);
330
- if (parentDir === currentDir) {
331
- return cliRoot;
332
- }
333
- currentDir = parentDir;
334
- }
335
- }
@@ -1,64 +0,0 @@
1
- import path from "node:path";
2
- import { normalizePath, type Plugin } from "vite";
3
- import type { DreamboardDevRuntimeConfig } from "./dev-runtime-config.js";
4
-
5
- export function createVirtualDevModulesPlugin(options: {
6
- projectRoot: string;
7
- runtimeConfig: DreamboardDevRuntimeConfig;
8
- generatedFallbackStylesheetPath: string | null;
9
- }): Plugin {
10
- const configModuleId = "virtual:dreamboard-dev-config";
11
- const resolvedConfigModuleId = `\0${configModuleId}`;
12
- const projectEntryModuleId = "virtual:dreamboard-project-entry";
13
- const resolvedProjectEntryModuleId = `\0${projectEntryModuleId}`;
14
- const projectAppPath = path.resolve(options.projectRoot, "ui/App.tsx");
15
- const projectStylePath = path.resolve(options.projectRoot, "ui/style.css");
16
-
17
- return {
18
- name: "dreamboard-dev-virtual-modules",
19
- resolveId(id) {
20
- if (id === configModuleId) {
21
- return resolvedConfigModuleId;
22
- }
23
- if (id === projectEntryModuleId) {
24
- return resolvedProjectEntryModuleId;
25
- }
26
- return null;
27
- },
28
- load(id) {
29
- if (id === resolvedConfigModuleId) {
30
- return `export const devConfig = ${JSON.stringify(options.runtimeConfig)};\nexport default devConfig;\n`;
31
- }
32
- if (id === resolvedProjectEntryModuleId) {
33
- const fallbackImport = options.generatedFallbackStylesheetPath
34
- ? `import "/@fs/${normalizePath(options.generatedFallbackStylesheetPath)}";\n`
35
- : "";
36
- return `${fallbackImport}import { createElement } from "react";
37
- import { createRoot } from "react-dom/client";
38
- import { ErrorBoundary } from "@dreamboard-games/sdk/ui";
39
- import { PluginRuntime } from "@dreamboard-games/sdk/runtime";
40
- import "/@fs/${normalizePath(projectStylePath)}";
41
- import App from "/@fs/${normalizePath(projectAppPath)}";
42
-
43
- const rootElement = document.getElementById("root");
44
- if (!rootElement) {
45
- throw new Error("Dreamboard dev plugin root element was not found.");
46
- }
47
-
48
- createRoot(rootElement).render(
49
- createElement(
50
- ErrorBoundary,
51
- null,
52
- createElement(
53
- PluginRuntime,
54
- null,
55
- createElement(App),
56
- ),
57
- ),
58
- );
59
- `;
60
- }
61
- return null;
62
- },
63
- };
64
- }
@@ -1,224 +0,0 @@
1
- @import "./shared-styles.css";
2
- @import url("https://fonts.googleapis.com/css2?family=Kalam:wght@300;400;700&family=Patrick+Hand&display=swap");
3
-
4
- :root {
5
- color-scheme: light;
6
- --background: oklch(0.985 0.005 85);
7
- --foreground: oklch(0.25 0 0);
8
- --card: oklch(0.985 0.005 85);
9
- --card-foreground: oklch(0.25 0 0);
10
- --popover: oklch(0.985 0.005 85);
11
- --popover-foreground: oklch(0.25 0 0);
12
- --primary: oklch(0.6 0.2 25);
13
- --primary-foreground: oklch(1 0 0);
14
- --secondary: oklch(0.92 0.01 85);
15
- --secondary-foreground: oklch(0.25 0 0);
16
- --muted: oklch(0.92 0.01 85);
17
- --muted-foreground: oklch(0.5 0 0);
18
- --accent: oklch(0.97 0.05 100);
19
- --accent-foreground: oklch(0.25 0 0);
20
- --destructive: oklch(0.6 0.2 25);
21
- --destructive-foreground: oklch(1 0 0);
22
- --border: oklch(0.25 0 0);
23
- --input: oklch(0.25 0 0);
24
- --ring: oklch(0.45 0.15 250);
25
- --radius: 0.75rem;
26
- --font-display: "Kalam", cursive;
27
- --font-sans: "Patrick Hand", cursive;
28
- }
29
-
30
- html,
31
- body,
32
- #app {
33
- height: 100%;
34
- min-height: 100%;
35
- margin: 0;
36
- }
37
-
38
- body {
39
- min-height: 100vh;
40
- background-color: #f5f1e7;
41
- background-image:
42
- radial-gradient(
43
- circle at top left,
44
- rgba(255, 255, 255, 0.9),
45
- transparent 40%
46
- ),
47
- radial-gradient(#dcd5c9 1px, transparent 1px);
48
- background-size: 100% 100%, 24px 24px;
49
- background-attachment: fixed, fixed;
50
- color: #1f2937;
51
- font-family: var(--font-sans);
52
- }
53
-
54
- #app {
55
- display: block;
56
- }
57
-
58
- #app > * {
59
- min-height: 100%;
60
- }
61
-
62
- h1,
63
- h2,
64
- h3,
65
- h4,
66
- h5,
67
- h6 {
68
- font-family: var(--font-display);
69
- font-weight: 700;
70
- }
71
-
72
- .wobbly-border {
73
- border-radius: 255px 15px 225px 15px / 15px 225px 15px 255px;
74
- }
75
-
76
- .wobbly-border-md {
77
- border-radius: 25px 8px 25px 8px / 8px 25px 8px 25px;
78
- }
79
-
80
- .wobbly-border-lg {
81
- border-radius: 45px 15px 45px 15px / 15px 45px 15px 45px;
82
- }
83
-
84
- .hard-shadow {
85
- box-shadow: 4px 4px 0 0 #2d2d2d;
86
- }
87
-
88
- .hard-shadow-lg {
89
- box-shadow: 8px 8px 0 0 #2d2d2d;
90
- }
91
-
92
- /* Calm secondary CTA inside the dev drawer — the player switcher is
93
- * already the panel's single wobbly+shadow stamp, so the primary action
94
- * here is intentionally quiet. */
95
- .dev-calm-button {
96
- display: inline-flex;
97
- align-items: center;
98
- justify-content: center;
99
- height: 2.5rem;
100
- padding: 0 1rem;
101
- border-radius: 0.5rem;
102
- border: 2px solid #2d2d2d;
103
- background-color: #2d2d2d;
104
- color: #fff8e8;
105
- font-family: var(--font-sans);
106
- font-size: 0.875rem;
107
- font-weight: 700;
108
- letter-spacing: 0.02em;
109
- transition:
110
- background-color 0.15s ease,
111
- transform 0.05s ease;
112
- }
113
-
114
- .dev-calm-button:hover:not(:disabled) {
115
- background-color: #1f1f1f;
116
- }
117
-
118
- .dev-calm-button:active:not(:disabled) {
119
- transform: translateY(1px);
120
- }
121
-
122
- .dev-calm-button:disabled {
123
- opacity: 0.5;
124
- cursor: not-allowed;
125
- }
126
-
127
- /* Tame HostHistoryNavigator into a text link inside the dev drawer.
128
- *
129
- * The upstream Button ships with `wobbly-border-md` + `hard-shadow`
130
- * baked into its base classes; twMerge cannot strip custom utilities so
131
- * we brute-force a flat link-style treatment with !important on multiple
132
- * selector forms. */
133
- .dev-history-shell button,
134
- .dev-history-shell [data-slot="button"],
135
- .dev-history-shell .wobbly-border-md,
136
- .dev-history-shell .hard-shadow {
137
- height: auto !important;
138
- padding: 0.25rem 0 !important;
139
- background: transparent !important;
140
- border: none !important;
141
- box-shadow: none !important;
142
- border-radius: 0 !important;
143
- font-size: 0.75rem !important;
144
- font-weight: 700 !important;
145
- color: oklch(0.5 0 0) !important;
146
- gap: 0.4rem !important;
147
- text-transform: uppercase;
148
- letter-spacing: 0.12em;
149
- }
150
-
151
- .dev-history-shell button:hover,
152
- .dev-history-shell [data-slot="button"]:hover {
153
- background: transparent !important;
154
- color: oklch(0.25 0 0) !important;
155
- box-shadow: none !important;
156
- transform: none !important;
157
- }
158
-
159
- .dev-history-shell [data-slot="badge"] {
160
- background-color: rgba(45, 45, 45, 0.08);
161
- color: oklch(0.25 0 0);
162
- border-color: transparent;
163
- padding: 0 0.4rem;
164
- font-size: 0.65rem;
165
- letter-spacing: 0;
166
- }
167
-
168
- /* Calm copy buttons inside the Debug fold so they're text-tabular, not
169
- * three wobbly stamps. */
170
- .dev-host-debug-shell button,
171
- .dev-host-debug-shell .wobbly-border-md,
172
- .dev-host-debug-shell .hard-shadow {
173
- border-radius: 0.375rem !important;
174
- box-shadow: none !important;
175
- border-width: 1px !important;
176
- border-color: rgba(45, 45, 45, 0.12) !important;
177
- background-color: transparent !important;
178
- }
179
-
180
- .dev-host-debug-shell button:hover {
181
- background-color: rgba(45, 45, 45, 0.04) !important;
182
- transform: none !important;
183
- box-shadow: none !important;
184
- }
185
-
186
- /* Seed input — pull off the upstream wobbly+thick border in favour of a
187
- * calm flat rectangle that matches the rest of the panel chrome. */
188
- .dev-seed-input {
189
- border-radius: 0.5rem !important;
190
- border-width: 1.5px !important;
191
- border-color: rgba(45, 45, 45, 0.18) !important;
192
- background-color: #fff !important;
193
- font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace !important;
194
- }
195
-
196
- .dev-seed-input:focus,
197
- .dev-seed-input:focus-visible {
198
- border-color: rgba(45, 45, 45, 0.4) !important;
199
- box-shadow: 0 0 0 3px rgba(45, 93, 161, 0.12) !important;
200
- }
201
-
202
- /* Edge handle — calm strip at rest, soft glow on hover. */
203
- .dev-edge-handle .dev-edge-strip {
204
- transition:
205
- background-color 200ms ease,
206
- box-shadow 200ms ease,
207
- width 200ms ease,
208
- height 200ms ease;
209
- }
210
-
211
- .dev-edge-handle:hover .dev-edge-strip,
212
- .dev-edge-handle:focus-visible .dev-edge-strip {
213
- width: 6px;
214
- height: 7rem;
215
- background-color: #2d5da1;
216
- box-shadow:
217
- 0 0 0 2px rgba(45, 93, 161, 0.18),
218
- 0 0 14px 4px rgba(45, 93, 161, 0.55),
219
- 0 0 28px 8px rgba(45, 93, 161, 0.25);
220
- }
221
-
222
- .dev-edge-handle:focus-visible {
223
- outline: none;
224
- }