@dreamboard-games/cli 0.1.30-alpha.3 → 0.1.30-alpha.30

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 (173) hide show
  1. package/README.md +27 -108
  2. package/dist/agent-verifier/agent-workspace-verifier.mjs +1855 -57
  3. package/dist/agent-verifier/agent-workspace-verifier.mjs.map +1 -1
  4. package/dist/agent-verifier/{chunk-XQXDOBYB.mjs → chunk-4I2WWAPK.mjs} +27 -10
  5. package/dist/agent-verifier/chunk-4I2WWAPK.mjs.map +1 -0
  6. package/dist/agent-verifier/{chunk-O4YCPU7C.mjs → chunk-BWBN2TDJ.mjs} +539 -641
  7. package/dist/agent-verifier/chunk-BWBN2TDJ.mjs.map +1 -0
  8. package/dist/agent-verifier/{chunk-SH5JKYOB.mjs → chunk-FNSHNMDY.mjs} +116 -23
  9. package/dist/agent-verifier/chunk-FNSHNMDY.mjs.map +1 -0
  10. package/dist/agent-verifier/{chunk-TAEQKBJB.mjs → chunk-GWRZRWCF.mjs} +1 -1
  11. package/dist/agent-verifier/chunk-GWRZRWCF.mjs.map +1 -0
  12. package/dist/agent-verifier/chunk-H6XDQJ3N.mjs +11 -0
  13. package/dist/agent-verifier/chunk-HUBV22JQ.mjs +89 -0
  14. package/dist/agent-verifier/chunk-HUBV22JQ.mjs.map +1 -0
  15. package/dist/agent-verifier/{chunk-VS573ERH.mjs → chunk-JZTH3EMV.mjs} +2 -2
  16. package/dist/agent-verifier/{chunk-XGWCY624.mjs → chunk-KDAQ4CZY.mjs} +34 -27
  17. package/dist/agent-verifier/chunk-KDAQ4CZY.mjs.map +1 -0
  18. package/dist/agent-verifier/{chunk-IAYRNVUC.mjs → chunk-LMW66VBH.mjs} +2 -13
  19. package/dist/agent-verifier/{chunk-IAYRNVUC.mjs.map → chunk-LMW66VBH.mjs.map} +1 -1
  20. package/dist/agent-verifier/{chunk-776W3UGV.mjs → chunk-M6YNQZCC.mjs} +4 -13
  21. package/dist/agent-verifier/chunk-M6YNQZCC.mjs.map +1 -0
  22. package/dist/agent-verifier/{chunk-H76MT5UR.mjs → chunk-M7UVBANQ.mjs} +2 -1
  23. package/dist/agent-verifier/chunk-M7UVBANQ.mjs.map +1 -0
  24. package/dist/agent-verifier/{chunk-NAK77WXW.mjs → chunk-MYMVXTZT.mjs} +4 -5
  25. package/dist/agent-verifier/chunk-MYMVXTZT.mjs.map +1 -0
  26. package/dist/agent-verifier/chunk-OJFZVGEL.mjs +492 -0
  27. package/dist/agent-verifier/chunk-OJFZVGEL.mjs.map +1 -0
  28. package/dist/agent-verifier/{chunk-LUZ7KE6H.mjs → chunk-QD4SQNUP.mjs} +4 -8
  29. package/dist/agent-verifier/{chunk-LUZ7KE6H.mjs.map → chunk-QD4SQNUP.mjs.map} +1 -1
  30. package/dist/agent-verifier/{chunk-7WWGFAAU.mjs → chunk-QMOBTQ5G.mjs} +215 -223
  31. package/dist/agent-verifier/chunk-QMOBTQ5G.mjs.map +1 -0
  32. package/dist/agent-verifier/chunk-TTB7AIHZ.mjs +214 -0
  33. package/dist/agent-verifier/chunk-TTB7AIHZ.mjs.map +1 -0
  34. package/dist/agent-verifier/{chunk-F2DIOJJZ.mjs → chunk-XCQQIPCO.mjs} +5 -46
  35. package/dist/agent-verifier/chunk-XCQQIPCO.mjs.map +1 -0
  36. package/dist/agent-verifier/{global-config-Y2NTSK4R.mjs → global-config-SWWR2LP4.mjs} +6 -6
  37. package/dist/agent-verifier/{keychain-backend-SPQWGKZN.mjs → keychain-backend-UF3Z26JM.mjs} +12 -7
  38. package/dist/agent-verifier/keychain-backend-UF3Z26JM.mjs.map +1 -0
  39. package/dist/agent-verifier/{local-files-JFOQQZDL.mjs → local-files-OF4QFISU.mjs} +10 -10
  40. package/dist/agent-verifier/{chunk-UIOLGH4A.mjs → local-typecheck-DHVLM37Z.mjs} +4 -4
  41. package/dist/agent-verifier/local-typecheck-DHVLM37Z.mjs.map +1 -0
  42. package/dist/agent-verifier/{materialize-workspace-ZAVGQQSF.mjs → materialize-workspace-K4WYFG5E.mjs} +23 -22
  43. package/dist/agent-verifier/materialize-workspace-K4WYFG5E.mjs.map +1 -0
  44. package/dist/agent-verifier/{project-state-K576C2TE.mjs → project-state-XKUSCFSV.mjs} +2 -2
  45. package/dist/agent-verifier/{prompt-MJRJMOGQ.mjs → prompt-VKHMCQT6.mjs} +2 -2
  46. package/dist/agent-verifier/{chunk-A64ZZUZV.mjs → reducer-bundle-preflight-GLUJKTWU.mjs} +76 -25
  47. package/dist/agent-verifier/reducer-bundle-preflight-GLUJKTWU.mjs.map +1 -0
  48. package/dist/agent-verifier/{chunk-JGT4P4UD.mjs → reducer-contract-preflight-WVQQPW5F.mjs} +7 -6
  49. package/dist/agent-verifier/reducer-contract-preflight-WVQQPW5F.mjs.map +1 -0
  50. package/dist/agent-verifier/{chunk-E7SSWJXJ.mjs → reducer-native-test-harness-UFMSNNDY.mjs} +463 -686
  51. package/dist/agent-verifier/reducer-native-test-harness-UFMSNNDY.mjs.map +1 -0
  52. package/dist/agent-verifier/static-scaffold-MHVM63HU.mjs +24 -0
  53. package/dist/agent-verifier/workspace-codegen-SPPVHURX.mjs +10 -0
  54. package/dist/agent-verifier/{workspace-dependencies-NOOQBK6I.mjs → workspace-dependencies-5HEEKZFP.mjs} +6 -4
  55. package/dist/authoring-compatibility-internal.js +12 -0
  56. package/dist/chunk-2H7UOFLK.js +11 -0
  57. package/dist/chunk-EQNBQVIW.js +204 -0
  58. package/dist/chunk-EQNBQVIW.js.map +1 -0
  59. package/dist/{chunk-TAQKH67O.js → chunk-I4SZ7FA4.js} +2593 -7278
  60. package/dist/chunk-I4SZ7FA4.js.map +1 -0
  61. package/dist/chunk-RTNKVNQA.js +3735 -0
  62. package/dist/chunk-RTNKVNQA.js.map +1 -0
  63. package/dist/chunk-UI7NWSYA.js +334 -0
  64. package/dist/chunk-UI7NWSYA.js.map +1 -0
  65. package/dist/{global-config-S4ZIPECE.js → global-config-GK2UC2X6.js} +4 -3
  66. package/dist/index.js +3278 -6181
  67. package/dist/index.js.map +1 -1
  68. package/dist/internal.js +36 -10
  69. package/dist/internal.js.map +1 -1
  70. package/dist/{keychain-backend-HDF4TZDL.js → keychain-backend-GO34KGTG.js} +12 -7
  71. package/dist/keychain-backend-GO34KGTG.js.map +1 -0
  72. package/dist/{prompt-NDV3AE5L.js → prompt-GMZABCJC.js} +2 -2
  73. package/package.json +9 -19
  74. package/release/authoring-release-set.json +38 -0
  75. package/skills/dreamboard/SKILL.md +30 -28
  76. package/skills/dreamboard/references/building-your-first-game.md +15 -15
  77. package/skills/dreamboard/references/cli.md +46 -47
  78. package/skills/dreamboard/references/manifest-authoring.md +11 -3
  79. package/skills/dreamboard/references/quickstart.md +16 -13
  80. package/skills/dreamboard/references/testing.md +6 -13
  81. package/dist/agent-verifier/chunk-3UKQVWLV.mjs +0 -1744
  82. package/dist/agent-verifier/chunk-3UKQVWLV.mjs.map +0 -1
  83. package/dist/agent-verifier/chunk-776W3UGV.mjs.map +0 -1
  84. package/dist/agent-verifier/chunk-7WWGFAAU.mjs.map +0 -1
  85. package/dist/agent-verifier/chunk-A64ZZUZV.mjs.map +0 -1
  86. package/dist/agent-verifier/chunk-E7SSWJXJ.mjs.map +0 -1
  87. package/dist/agent-verifier/chunk-F2DIOJJZ.mjs.map +0 -1
  88. package/dist/agent-verifier/chunk-G42BGGG2.mjs +0 -70
  89. package/dist/agent-verifier/chunk-G42BGGG2.mjs.map +0 -1
  90. package/dist/agent-verifier/chunk-H76MT5UR.mjs.map +0 -1
  91. package/dist/agent-verifier/chunk-HGMUAL33.mjs +0 -39
  92. package/dist/agent-verifier/chunk-HGMUAL33.mjs.map +0 -1
  93. package/dist/agent-verifier/chunk-JGT4P4UD.mjs.map +0 -1
  94. package/dist/agent-verifier/chunk-NAK77WXW.mjs.map +0 -1
  95. package/dist/agent-verifier/chunk-O4YCPU7C.mjs.map +0 -1
  96. package/dist/agent-verifier/chunk-S34FRJHS.mjs +0 -222
  97. package/dist/agent-verifier/chunk-S34FRJHS.mjs.map +0 -1
  98. package/dist/agent-verifier/chunk-SH5JKYOB.mjs.map +0 -1
  99. package/dist/agent-verifier/chunk-SKI2ESE5.mjs +0 -44
  100. package/dist/agent-verifier/chunk-TAEQKBJB.mjs.map +0 -1
  101. package/dist/agent-verifier/chunk-UIOLGH4A.mjs.map +0 -1
  102. package/dist/agent-verifier/chunk-UIZNWRM6.mjs +0 -2432
  103. package/dist/agent-verifier/chunk-UIZNWRM6.mjs.map +0 -1
  104. package/dist/agent-verifier/chunk-W3N3QJ4V.mjs +0 -624
  105. package/dist/agent-verifier/chunk-W3N3QJ4V.mjs.map +0 -1
  106. package/dist/agent-verifier/chunk-XGWCY624.mjs.map +0 -1
  107. package/dist/agent-verifier/chunk-XQXDOBYB.mjs.map +0 -1
  108. package/dist/agent-verifier/compile-TEQVA46V.mjs +0 -312
  109. package/dist/agent-verifier/compile-TEQVA46V.mjs.map +0 -1
  110. package/dist/agent-verifier/keychain-backend-SPQWGKZN.mjs.map +0 -1
  111. package/dist/agent-verifier/local-typecheck-XVGWI75X.mjs +0 -10
  112. package/dist/agent-verifier/materialize-workspace-ZAVGQQSF.mjs.map +0 -1
  113. package/dist/agent-verifier/reducer-bundle-preflight-LXNJUBKL.mjs +0 -20
  114. package/dist/agent-verifier/reducer-contract-preflight-TUMQ43JV.mjs +0 -11
  115. package/dist/agent-verifier/reducer-native-test-harness-CHX5MBL5.mjs +0 -50
  116. package/dist/agent-verifier/static-scaffold-R7SVDRQI.mjs +0 -27
  117. package/dist/agent-verifier/sync-THAI546U.mjs +0 -588
  118. package/dist/agent-verifier/sync-THAI546U.mjs.map +0 -1
  119. package/dist/agent-verifier/test-AFAQFKOB.mjs +0 -353
  120. package/dist/agent-verifier/test-AFAQFKOB.mjs.map +0 -1
  121. package/dist/agent-verifier/workspace-codegen-2ZMQRIKJ.mjs +0 -10
  122. package/dist/agent-verifier/workspace-dependencies-NOOQBK6I.mjs.map +0 -1
  123. package/dist/chunk-N7XPNNUI.js +0 -432
  124. package/dist/chunk-N7XPNNUI.js.map +0 -1
  125. package/dist/chunk-SEGVTWSK.js +0 -44
  126. package/dist/chunk-SEGVTWSK.js.map +0 -1
  127. package/dist/chunk-TAQKH67O.js.map +0 -1
  128. package/dist/dev-host/components/drawer.tsx +0 -132
  129. package/dist/dev-host/components/input.tsx +0 -21
  130. package/dist/dev-host/dev-api-proxy-plugin.ts +0 -328
  131. package/dist/dev-host/dev-author-dom-warnings.ts +0 -100
  132. package/dist/dev-host/dev-diagnostics.ts +0 -62
  133. package/dist/dev-host/dev-fallback-stylesheet.ts +0 -53
  134. package/dist/dev-host/dev-hmr-guard-plugin.ts +0 -47
  135. package/dist/dev-host/dev-host-controller.ts +0 -674
  136. package/dist/dev-host/dev-host-player-query.ts +0 -17
  137. package/dist/dev-host/dev-host-session-transport.ts +0 -52
  138. package/dist/dev-host/dev-host-storage.ts +0 -56
  139. package/dist/dev-host/dev-log-relay-plugin.ts +0 -510
  140. package/dist/dev-host/dev-runtime-config.ts +0 -14
  141. package/dist/dev-host/dev-runtime-platform.ts +0 -335
  142. package/dist/dev-host/dev-virtual-modules-plugin.ts +0 -64
  143. package/dist/dev-host/host-main.css +0 -224
  144. package/dist/dev-host/host-main.tsx +0 -948
  145. package/dist/dev-host/index.html +0 -56
  146. package/dist/dev-host/lib/utils.ts +0 -6
  147. package/dist/dev-host/plugin-main.ts +0 -61
  148. package/dist/dev-host/plugin.html +0 -24
  149. package/dist/dev-host/shared-styles.css +0 -144
  150. package/dist/dev-host/start-dev-server.ts +0 -140
  151. package/dist/dev-host/virtual-modules.d.ts +0 -27
  152. package/dist/global-config-S4ZIPECE.js.map +0 -1
  153. package/dist/keychain-backend-HDF4TZDL.js.map +0 -1
  154. package/skills/dreamboard/scripts/events-extract.mjs +0 -218
  155. /package/dist/agent-verifier/{chunk-SKI2ESE5.mjs.map → chunk-H6XDQJ3N.mjs.map} +0 -0
  156. /package/dist/agent-verifier/{chunk-VS573ERH.mjs.map → chunk-JZTH3EMV.mjs.map} +0 -0
  157. /package/dist/agent-verifier/{global-config-Y2NTSK4R.mjs.map → global-config-SWWR2LP4.mjs.map} +0 -0
  158. /package/dist/agent-verifier/{local-files-JFOQQZDL.mjs.map → local-files-OF4QFISU.mjs.map} +0 -0
  159. /package/dist/agent-verifier/{local-typecheck-XVGWI75X.mjs.map → project-state-XKUSCFSV.mjs.map} +0 -0
  160. /package/dist/agent-verifier/{prompt-MJRJMOGQ.mjs.map → prompt-VKHMCQT6.mjs.map} +0 -0
  161. /package/dist/agent-verifier/{project-state-K576C2TE.mjs.map → static-scaffold-MHVM63HU.mjs.map} +0 -0
  162. /package/dist/agent-verifier/{reducer-bundle-preflight-LXNJUBKL.mjs.map → workspace-codegen-SPPVHURX.mjs.map} +0 -0
  163. /package/dist/agent-verifier/{reducer-contract-preflight-TUMQ43JV.mjs.map → workspace-dependencies-5HEEKZFP.mjs.map} +0 -0
  164. /package/dist/{agent-verifier/reducer-native-test-harness-CHX5MBL5.mjs.map → authoring-compatibility-internal.js.map} +0 -0
  165. /package/dist/{agent-verifier/static-scaffold-R7SVDRQI.mjs.map → chunk-2H7UOFLK.js.map} +0 -0
  166. /package/dist/{agent-verifier/workspace-codegen-2ZMQRIKJ.mjs.map → global-config-GK2UC2X6.js.map} +0 -0
  167. /package/dist/{prompt-NDV3AE5L.js.map → prompt-GMZABCJC.js.map} +0 -0
  168. /package/{dist/scaffold → scaffold}/assets/static/app/tsconfig.framework.json +0 -0
  169. /package/{dist/scaffold → scaffold}/assets/static/app/tsconfig.json +0 -0
  170. /package/{dist/scaffold → scaffold}/assets/static/ui/index.tsx +0 -0
  171. /package/{dist/scaffold → scaffold}/assets/static/ui/style.css +0 -0
  172. /package/{dist/scaffold → scaffold}/assets/static/ui/tsconfig.framework.json +0 -0
  173. /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
- }