@playdrop/playdrop-cli 0.16.16 → 0.17.1

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 (369) hide show
  1. package/config/client-meta.json +4 -4
  2. package/dist/apiClient.d.ts +1 -2
  3. package/dist/apiClient.js +1 -16
  4. package/dist/appUrls.js +4 -0
  5. package/dist/apps/build.d.ts +12 -4
  6. package/dist/apps/build.js +55 -22
  7. package/dist/apps/index.d.ts +2 -1
  8. package/dist/apps/index.js +4 -1
  9. package/dist/apps/loadCheck.d.ts +5 -1
  10. package/dist/apps/loadCheck.js +52 -18
  11. package/dist/apps/serverBuild.d.ts +17 -0
  12. package/dist/apps/serverBuild.js +155 -0
  13. package/dist/apps/staticHtml.d.ts +1 -0
  14. package/dist/apps/staticHtml.js +19 -10
  15. package/dist/apps/upload.d.ts +12 -2
  16. package/dist/apps/upload.js +127 -46
  17. package/dist/catalogue.d.ts +23 -1
  18. package/dist/catalogue.js +126 -100
  19. package/dist/commandContext.d.ts +6 -3
  20. package/dist/commandContext.js +108 -18
  21. package/dist/commands/build.js +0 -7
  22. package/dist/commands/captureListing.d.ts +3 -0
  23. package/dist/commands/captureListing.js +48 -4
  24. package/dist/commands/chat.d.ts +4 -0
  25. package/dist/commands/chat.js +133 -8
  26. package/dist/commands/check.js +34 -1
  27. package/dist/commands/create.js +30 -263
  28. package/dist/commands/dev.js +37 -3
  29. package/dist/commands/devBrowser.js +2 -2
  30. package/dist/commands/devGameServer.d.ts +16 -0
  31. package/dist/commands/devGameServer.js +237 -0
  32. package/dist/commands/devRuntimeAssets.d.ts +1 -0
  33. package/dist/commands/devRuntimeAssets.js +2 -0
  34. package/dist/commands/devServer.d.ts +3 -0
  35. package/dist/commands/devServer.js +111 -5
  36. package/dist/commands/generation.d.ts +33 -4
  37. package/dist/commands/generation.js +304 -115
  38. package/dist/commands/login.js +23 -7
  39. package/dist/commands/review.d.ts +1 -1
  40. package/dist/commands/review.js +68 -95
  41. package/dist/commands/source.d.ts +19 -0
  42. package/dist/commands/source.js +142 -0
  43. package/dist/commands/tweaks.js +5 -11
  44. package/dist/commands/upload-content.d.ts +1 -1
  45. package/dist/commands/upload-content.js +16 -12
  46. package/dist/commands/upload.d.ts +17 -1
  47. package/dist/commands/upload.js +47 -10
  48. package/dist/commands/worker/archive-staging.d.ts +1 -0
  49. package/dist/commands/worker/archive-staging.js +13 -2
  50. package/dist/commands/worker/e2e-fixtures.d.ts +32 -0
  51. package/dist/commands/worker/e2e-fixtures.js +466 -0
  52. package/dist/commands/worker/game-server-infra.d.ts +80 -0
  53. package/dist/commands/worker/game-server-infra.js +595 -0
  54. package/dist/commands/worker/game-source-git.d.ts +126 -0
  55. package/dist/commands/worker/game-source-git.js +782 -0
  56. package/dist/commands/worker/generation.d.ts +94 -0
  57. package/dist/commands/worker/generation.js +1458 -0
  58. package/dist/commands/worker/runtime.d.ts +8 -10
  59. package/dist/commands/worker/runtime.js +51 -45
  60. package/dist/commands/worker.d.ts +79 -19
  61. package/dist/commands/worker.js +1796 -419
  62. package/dist/config.d.ts +2 -0
  63. package/dist/config.js +16 -3
  64. package/dist/environment.d.ts +0 -1
  65. package/dist/environment.js +0 -8
  66. package/dist/index.js +92 -13
  67. package/dist/workerAppProject.d.ts +1 -1
  68. package/dist/workerAppProject.js +15 -2
  69. package/node_modules/@playdrop/api-client/dist/client.d.ts +72 -25
  70. package/node_modules/@playdrop/api-client/dist/client.d.ts.map +1 -1
  71. package/node_modules/@playdrop/api-client/dist/client.js +33 -0
  72. package/node_modules/@playdrop/api-client/dist/core/request.d.ts +1 -0
  73. package/node_modules/@playdrop/api-client/dist/core/request.d.ts.map +1 -1
  74. package/node_modules/@playdrop/api-client/dist/core/request.js +17 -11
  75. package/node_modules/@playdrop/api-client/dist/domains/agent-tasks.d.ts +51 -6
  76. package/node_modules/@playdrop/api-client/dist/domains/agent-tasks.d.ts.map +1 -1
  77. package/node_modules/@playdrop/api-client/dist/domains/agent-tasks.js +338 -41
  78. package/node_modules/@playdrop/api-client/dist/domains/ai.d.ts +24 -1
  79. package/node_modules/@playdrop/api-client/dist/domains/ai.d.ts.map +1 -1
  80. package/node_modules/@playdrop/api-client/dist/domains/ai.js +20 -0
  81. package/node_modules/@playdrop/api-client/dist/domains/apps.d.ts +13 -8
  82. package/node_modules/@playdrop/api-client/dist/domains/apps.d.ts.map +1 -1
  83. package/node_modules/@playdrop/api-client/dist/domains/apps.js +158 -90
  84. package/node_modules/@playdrop/api-client/dist/domains/assets.d.ts +4 -0
  85. package/node_modules/@playdrop/api-client/dist/domains/assets.d.ts.map +1 -1
  86. package/node_modules/@playdrop/api-client/dist/domains/assets.js +27 -0
  87. package/node_modules/@playdrop/api-client/dist/domains/chat.d.ts +35 -3
  88. package/node_modules/@playdrop/api-client/dist/domains/chat.d.ts.map +1 -1
  89. package/node_modules/@playdrop/api-client/dist/domains/chat.js +89 -7
  90. package/node_modules/@playdrop/api-client/dist/domains/player-meta.d.ts +2 -1
  91. package/node_modules/@playdrop/api-client/dist/domains/player-meta.d.ts.map +1 -1
  92. package/node_modules/@playdrop/api-client/dist/domains/player-meta.js +9 -0
  93. package/node_modules/@playdrop/api-client/dist/domains/playtrade.d.ts +1 -2
  94. package/node_modules/@playdrop/api-client/dist/domains/playtrade.d.ts.map +1 -1
  95. package/node_modules/@playdrop/api-client/dist/domains/playtrade.js +0 -11
  96. package/node_modules/@playdrop/api-client/dist/domains/social.d.ts +29 -0
  97. package/node_modules/@playdrop/api-client/dist/domains/social.d.ts.map +1 -0
  98. package/node_modules/@playdrop/api-client/dist/domains/social.js +79 -0
  99. package/node_modules/@playdrop/api-client/dist/index.d.ts +80 -29
  100. package/node_modules/@playdrop/api-client/dist/index.d.ts.map +1 -1
  101. package/node_modules/@playdrop/api-client/dist/index.js +217 -56
  102. package/node_modules/@playdrop/api-client/dist/runtime.d.ts +18 -0
  103. package/node_modules/@playdrop/api-client/dist/runtime.d.ts.map +1 -0
  104. package/node_modules/@playdrop/api-client/dist/runtime.js +54 -0
  105. package/node_modules/@playdrop/api-client/package.json +7 -0
  106. package/node_modules/@playdrop/config/client-meta.json +4 -4
  107. package/node_modules/@playdrop/config/dist/src/creator-plans.d.ts +11 -0
  108. package/node_modules/@playdrop/config/dist/src/creator-plans.d.ts.map +1 -1
  109. package/node_modules/@playdrop/config/dist/src/creator-plans.js +13 -1
  110. package/node_modules/@playdrop/config/dist/src/deployment.d.ts +0 -1
  111. package/node_modules/@playdrop/config/dist/src/deployment.d.ts.map +1 -1
  112. package/node_modules/@playdrop/config/dist/src/deployment.js +0 -8
  113. package/node_modules/@playdrop/config/dist/src/public-deployment.d.ts +0 -1
  114. package/node_modules/@playdrop/config/dist/src/public-deployment.d.ts.map +1 -1
  115. package/node_modules/@playdrop/config/dist/src/public-deployment.js +0 -8
  116. package/node_modules/@playdrop/config/dist/src/runtime-service-origins.d.ts +1 -1
  117. package/node_modules/@playdrop/config/dist/src/runtime-service-origins.js +2 -2
  118. package/node_modules/@playdrop/config/dist/src/server/logging.d.ts.map +1 -1
  119. package/node_modules/@playdrop/config/dist/src/server/logging.js +31 -2
  120. package/node_modules/@playdrop/config/dist/test/creator-plans.test.js +10 -0
  121. package/node_modules/@playdrop/config/dist/test/deployment.test.js +0 -4
  122. package/node_modules/@playdrop/config/dist/test/runtime-service-origins.test.js +2 -0
  123. package/node_modules/@playdrop/config/dist/tsconfig.tsbuildinfo +1 -1
  124. package/node_modules/@playdrop/config/package.json +6 -0
  125. package/node_modules/@playdrop/game-source-git/dist/src/archive.d.ts +9 -0
  126. package/node_modules/@playdrop/game-source-git/dist/src/archive.d.ts.map +1 -0
  127. package/node_modules/@playdrop/game-source-git/dist/src/archive.js +107 -0
  128. package/node_modules/@playdrop/game-source-git/dist/src/bundle-storage.d.ts +29 -0
  129. package/node_modules/@playdrop/game-source-git/dist/src/bundle-storage.d.ts.map +1 -0
  130. package/node_modules/@playdrop/game-source-git/dist/src/bundle-storage.js +64 -0
  131. package/node_modules/@playdrop/game-source-git/dist/src/export.d.ts +8 -0
  132. package/node_modules/@playdrop/game-source-git/dist/src/export.d.ts.map +1 -0
  133. package/node_modules/@playdrop/game-source-git/dist/src/export.js +25 -0
  134. package/node_modules/@playdrop/game-source-git/dist/src/git.d.ts +39 -0
  135. package/node_modules/@playdrop/game-source-git/dist/src/git.d.ts.map +1 -0
  136. package/node_modules/@playdrop/game-source-git/dist/src/git.js +195 -0
  137. package/node_modules/@playdrop/game-source-git/dist/src/ignore.d.ts +6 -0
  138. package/node_modules/@playdrop/game-source-git/dist/src/ignore.d.ts.map +1 -0
  139. package/node_modules/@playdrop/game-source-git/dist/src/ignore.js +51 -0
  140. package/node_modules/@playdrop/game-source-git/dist/src/index.d.ts +10 -0
  141. package/node_modules/@playdrop/game-source-git/dist/src/index.d.ts.map +1 -0
  142. package/node_modules/@playdrop/{boxel-core/dist/src/humanoid/r15 → game-source-git/dist/src}/index.js +9 -4
  143. package/node_modules/@playdrop/game-source-git/dist/src/lock.d.ts +17 -0
  144. package/node_modules/@playdrop/game-source-git/dist/src/lock.d.ts.map +1 -0
  145. package/node_modules/@playdrop/game-source-git/dist/src/lock.js +72 -0
  146. package/node_modules/@playdrop/game-source-git/dist/src/materialize.d.ts +10 -0
  147. package/node_modules/@playdrop/game-source-git/dist/src/materialize.d.ts.map +1 -0
  148. package/node_modules/@playdrop/game-source-git/dist/src/materialize.js +99 -0
  149. package/node_modules/@playdrop/game-source-git/dist/src/paths.d.ts +24 -0
  150. package/node_modules/@playdrop/game-source-git/dist/src/paths.d.ts.map +1 -0
  151. package/node_modules/@playdrop/game-source-git/dist/src/paths.js +207 -0
  152. package/node_modules/@playdrop/game-source-git/dist/src/repository.d.ts +66 -0
  153. package/node_modules/@playdrop/game-source-git/dist/src/repository.d.ts.map +1 -0
  154. package/node_modules/@playdrop/game-source-git/dist/src/repository.js +213 -0
  155. package/node_modules/@playdrop/game-source-git/dist/test/core.test.d.ts +2 -0
  156. package/node_modules/@playdrop/game-source-git/dist/test/core.test.d.ts.map +1 -0
  157. package/node_modules/@playdrop/game-source-git/dist/test/core.test.js +441 -0
  158. package/node_modules/@playdrop/game-source-git/dist/tsconfig.tsbuildinfo +1 -0
  159. package/node_modules/@playdrop/game-source-git/package.json +28 -0
  160. package/node_modules/@playdrop/types/dist/agent-task-terminal.d.ts +2 -2
  161. package/node_modules/@playdrop/types/dist/agent-task-terminal.d.ts.map +1 -1
  162. package/node_modules/@playdrop/types/dist/agent-task-terminal.js +15 -9
  163. package/node_modules/@playdrop/types/dist/api.d.ts +728 -164
  164. package/node_modules/@playdrop/types/dist/api.d.ts.map +1 -1
  165. package/node_modules/@playdrop/types/dist/api.js +60 -11
  166. package/node_modules/@playdrop/types/dist/asset-pack.d.ts +2 -0
  167. package/node_modules/@playdrop/types/dist/asset-pack.d.ts.map +1 -1
  168. package/node_modules/@playdrop/types/dist/asset.d.ts +22 -8
  169. package/node_modules/@playdrop/types/dist/asset.d.ts.map +1 -1
  170. package/node_modules/@playdrop/types/dist/asset.js +26 -26
  171. package/node_modules/@playdrop/types/dist/chat.d.ts +107 -3
  172. package/node_modules/@playdrop/types/dist/chat.d.ts.map +1 -1
  173. package/node_modules/@playdrop/types/dist/chat.js +33 -4
  174. package/node_modules/@playdrop/types/dist/index.d.ts +3 -0
  175. package/node_modules/@playdrop/types/dist/index.d.ts.map +1 -1
  176. package/node_modules/@playdrop/types/dist/index.js +7 -1
  177. package/node_modules/@playdrop/types/dist/public-cache-tags.d.ts +11 -0
  178. package/node_modules/@playdrop/types/dist/public-cache-tags.d.ts.map +1 -0
  179. package/node_modules/@playdrop/types/dist/public-cache-tags.js +78 -0
  180. package/node_modules/@playdrop/types/dist/realtime.d.ts +3 -15
  181. package/node_modules/@playdrop/types/dist/realtime.d.ts.map +1 -1
  182. package/node_modules/@playdrop/types/dist/social.d.ts +64 -0
  183. package/node_modules/@playdrop/types/dist/social.d.ts.map +1 -0
  184. package/node_modules/@playdrop/{boxel-three/dist/src/types.js → types/dist/social.js} +14 -2
  185. package/node_modules/@playdrop/types/dist/spritesheet.d.ts +51 -0
  186. package/node_modules/@playdrop/types/dist/spritesheet.d.ts.map +1 -0
  187. package/node_modules/@playdrop/types/dist/spritesheet.js +73 -0
  188. package/node_modules/@playdrop/types/dist/version.d.ts +86 -58
  189. package/node_modules/@playdrop/types/dist/version.d.ts.map +1 -1
  190. package/node_modules/@playdrop/types/dist/version.js +111 -0
  191. package/node_modules/@playdrop/types/package.json +14 -0
  192. package/node_modules/@playdrop/vox-three/dist/src/index.d.ts +1 -1
  193. package/node_modules/@playdrop/vox-three/dist/src/index.js +1 -1
  194. package/node_modules/@playdrop/vox-three/dist/src/index.js.map +1 -1
  195. package/node_modules/@playdrop/vox-three/dist/src/vox.d.ts +0 -3
  196. package/node_modules/@playdrop/vox-three/dist/src/vox.js +0 -110
  197. package/node_modules/@playdrop/vox-three/dist/src/vox.js.map +1 -1
  198. package/node_modules/@playdrop/vox-three/dist/test/vox.test.js +0 -18
  199. package/node_modules/@playdrop/vox-three/dist/test/vox.test.js.map +1 -1
  200. package/node_modules/@playdrop/vox-three/package.json +8 -4
  201. package/node_modules/@playwright/mcp/node_modules/fsevents/LICENSE +22 -0
  202. package/node_modules/@playwright/mcp/node_modules/fsevents/README.md +83 -0
  203. package/node_modules/@playwright/mcp/node_modules/fsevents/fsevents.d.ts +46 -0
  204. package/node_modules/@playwright/mcp/node_modules/fsevents/fsevents.js +82 -0
  205. package/node_modules/@playwright/mcp/node_modules/fsevents/fsevents.node +0 -0
  206. package/node_modules/@playwright/mcp/node_modules/fsevents/package.json +62 -0
  207. package/package.json +9 -11
  208. package/dist/assets/model-artifacts.d.ts +0 -8
  209. package/dist/assets/model-artifacts.js +0 -382
  210. package/dist/assets/model-worker.d.ts +0 -22
  211. package/dist/assets/model-worker.js +0 -123
  212. package/node_modules/@playdrop/ai-client/dist/index.d.ts +0 -441
  213. package/node_modules/@playdrop/ai-client/dist/index.d.ts.map +0 -1
  214. package/node_modules/@playdrop/ai-client/dist/index.js +0 -499
  215. package/node_modules/@playdrop/ai-client/package.json +0 -22
  216. package/node_modules/@playdrop/boxel-core/dist/src/entity-cleaner.d.ts +0 -13
  217. package/node_modules/@playdrop/boxel-core/dist/src/entity-cleaner.js +0 -141
  218. package/node_modules/@playdrop/boxel-core/dist/src/entity-cleaner.js.map +0 -1
  219. package/node_modules/@playdrop/boxel-core/dist/src/entity-utils.d.ts +0 -47
  220. package/node_modules/@playdrop/boxel-core/dist/src/entity-utils.js +0 -313
  221. package/node_modules/@playdrop/boxel-core/dist/src/entity-utils.js.map +0 -1
  222. package/node_modules/@playdrop/boxel-core/dist/src/format-utils.d.ts +0 -3
  223. package/node_modules/@playdrop/boxel-core/dist/src/format-utils.js +0 -36
  224. package/node_modules/@playdrop/boxel-core/dist/src/format-utils.js.map +0 -1
  225. package/node_modules/@playdrop/boxel-core/dist/src/humanoid/geometry.d.ts +0 -23
  226. package/node_modules/@playdrop/boxel-core/dist/src/humanoid/geometry.js +0 -11
  227. package/node_modules/@playdrop/boxel-core/dist/src/humanoid/geometry.js.map +0 -1
  228. package/node_modules/@playdrop/boxel-core/dist/src/humanoid/index.d.ts +0 -4
  229. package/node_modules/@playdrop/boxel-core/dist/src/humanoid/index.js +0 -21
  230. package/node_modules/@playdrop/boxel-core/dist/src/humanoid/index.js.map +0 -1
  231. package/node_modules/@playdrop/boxel-core/dist/src/humanoid/r15/common.d.ts +0 -4
  232. package/node_modules/@playdrop/boxel-core/dist/src/humanoid/r15/common.js +0 -24
  233. package/node_modules/@playdrop/boxel-core/dist/src/humanoid/r15/common.js.map +0 -1
  234. package/node_modules/@playdrop/boxel-core/dist/src/humanoid/r15/index.d.ts +0 -3
  235. package/node_modules/@playdrop/boxel-core/dist/src/humanoid/r15/index.js.map +0 -1
  236. package/node_modules/@playdrop/boxel-core/dist/src/humanoid/r15/textured-builder.d.ts +0 -3
  237. package/node_modules/@playdrop/boxel-core/dist/src/humanoid/r15/textured-builder.js +0 -387
  238. package/node_modules/@playdrop/boxel-core/dist/src/humanoid/r15/textured-builder.js.map +0 -1
  239. package/node_modules/@playdrop/boxel-core/dist/src/humanoid/r15/types.d.ts +0 -6
  240. package/node_modules/@playdrop/boxel-core/dist/src/humanoid/r15/types.js +0 -3
  241. package/node_modules/@playdrop/boxel-core/dist/src/humanoid/r15/types.js.map +0 -1
  242. package/node_modules/@playdrop/boxel-core/dist/src/humanoid/r15/voxel-builder.d.ts +0 -3
  243. package/node_modules/@playdrop/boxel-core/dist/src/humanoid/r15/voxel-builder.js +0 -373
  244. package/node_modules/@playdrop/boxel-core/dist/src/humanoid/r15/voxel-builder.js.map +0 -1
  245. package/node_modules/@playdrop/boxel-core/dist/src/humanoid/r6/builder.d.ts +0 -12
  246. package/node_modules/@playdrop/boxel-core/dist/src/humanoid/r6/builder.js +0 -215
  247. package/node_modules/@playdrop/boxel-core/dist/src/humanoid/r6/builder.js.map +0 -1
  248. package/node_modules/@playdrop/boxel-core/dist/src/humanoid/r6/index.d.ts +0 -4
  249. package/node_modules/@playdrop/boxel-core/dist/src/humanoid/r6/index.js +0 -18
  250. package/node_modules/@playdrop/boxel-core/dist/src/humanoid/r6/index.js.map +0 -1
  251. package/node_modules/@playdrop/boxel-core/dist/src/humanoid/r6/scanner.d.ts +0 -42
  252. package/node_modules/@playdrop/boxel-core/dist/src/humanoid/r6/scanner.js +0 -145
  253. package/node_modules/@playdrop/boxel-core/dist/src/humanoid/r6/scanner.js.map +0 -1
  254. package/node_modules/@playdrop/boxel-core/dist/src/humanoid/r6/textures/artifacts.d.ts +0 -26
  255. package/node_modules/@playdrop/boxel-core/dist/src/humanoid/r6/textures/artifacts.js +0 -65
  256. package/node_modules/@playdrop/boxel-core/dist/src/humanoid/r6/textures/artifacts.js.map +0 -1
  257. package/node_modules/@playdrop/boxel-core/dist/src/humanoid/r6/textures/face-map.d.ts +0 -33
  258. package/node_modules/@playdrop/boxel-core/dist/src/humanoid/r6/textures/face-map.js +0 -175
  259. package/node_modules/@playdrop/boxel-core/dist/src/humanoid/r6/textures/face-map.js.map +0 -1
  260. package/node_modules/@playdrop/boxel-core/dist/src/humanoid/templates/humanoid_r15.json +0 -1517
  261. package/node_modules/@playdrop/boxel-core/dist/src/humanoid/templates/humanoid_r6.json +0 -61
  262. package/node_modules/@playdrop/boxel-core/dist/src/humanoid/templates/index.d.ts +0 -10
  263. package/node_modules/@playdrop/boxel-core/dist/src/humanoid/templates/index.js +0 -23
  264. package/node_modules/@playdrop/boxel-core/dist/src/humanoid/templates/index.js.map +0 -1
  265. package/node_modules/@playdrop/boxel-core/dist/src/index.d.ts +0 -19
  266. package/node_modules/@playdrop/boxel-core/dist/src/index.js +0 -36
  267. package/node_modules/@playdrop/boxel-core/dist/src/index.js.map +0 -1
  268. package/node_modules/@playdrop/boxel-core/dist/src/materials.d.ts +0 -26
  269. package/node_modules/@playdrop/boxel-core/dist/src/materials.js +0 -184
  270. package/node_modules/@playdrop/boxel-core/dist/src/materials.js.map +0 -1
  271. package/node_modules/@playdrop/boxel-core/dist/src/palette_tools.d.ts +0 -68
  272. package/node_modules/@playdrop/boxel-core/dist/src/palette_tools.js +0 -488
  273. package/node_modules/@playdrop/boxel-core/dist/src/palette_tools.js.map +0 -1
  274. package/node_modules/@playdrop/boxel-core/dist/src/serialization.d.ts +0 -4
  275. package/node_modules/@playdrop/boxel-core/dist/src/serialization.js +0 -380
  276. package/node_modules/@playdrop/boxel-core/dist/src/serialization.js.map +0 -1
  277. package/node_modules/@playdrop/boxel-core/dist/src/textures.d.ts +0 -29
  278. package/node_modules/@playdrop/boxel-core/dist/src/textures.js +0 -208
  279. package/node_modules/@playdrop/boxel-core/dist/src/textures.js.map +0 -1
  280. package/node_modules/@playdrop/boxel-core/dist/src/transforms/textured-boxes/infer-face.d.ts +0 -9
  281. package/node_modules/@playdrop/boxel-core/dist/src/transforms/textured-boxes/infer-face.js +0 -312
  282. package/node_modules/@playdrop/boxel-core/dist/src/transforms/textured-boxes/infer-face.js.map +0 -1
  283. package/node_modules/@playdrop/boxel-core/dist/src/transforms/textured-boxes/layer-mode.d.ts +0 -9
  284. package/node_modules/@playdrop/boxel-core/dist/src/transforms/textured-boxes/layer-mode.js +0 -154
  285. package/node_modules/@playdrop/boxel-core/dist/src/transforms/textured-boxes/layer-mode.js.map +0 -1
  286. package/node_modules/@playdrop/boxel-core/dist/src/transforms/textured-boxes/merge-overlay.d.ts +0 -2
  287. package/node_modules/@playdrop/boxel-core/dist/src/transforms/textured-boxes/merge-overlay.js +0 -121
  288. package/node_modules/@playdrop/boxel-core/dist/src/transforms/textured-boxes/merge-overlay.js.map +0 -1
  289. package/node_modules/@playdrop/boxel-core/dist/src/transforms/textured-boxes/slice.d.ts +0 -20
  290. package/node_modules/@playdrop/boxel-core/dist/src/transforms/textured-boxes/slice.js +0 -389
  291. package/node_modules/@playdrop/boxel-core/dist/src/transforms/textured-boxes/slice.js.map +0 -1
  292. package/node_modules/@playdrop/boxel-core/dist/src/transforms/upscale.d.ts +0 -3
  293. package/node_modules/@playdrop/boxel-core/dist/src/transforms/upscale.js +0 -206
  294. package/node_modules/@playdrop/boxel-core/dist/src/transforms/upscale.js.map +0 -1
  295. package/node_modules/@playdrop/boxel-core/dist/src/transforms/voxels/slice.d.ts +0 -12
  296. package/node_modules/@playdrop/boxel-core/dist/src/transforms/voxels/slice.js +0 -81
  297. package/node_modules/@playdrop/boxel-core/dist/src/transforms/voxels/slice.js.map +0 -1
  298. package/node_modules/@playdrop/boxel-core/dist/src/transforms/voxels/textured-to-voxel.d.ts +0 -12
  299. package/node_modules/@playdrop/boxel-core/dist/src/transforms/voxels/textured-to-voxel.js +0 -318
  300. package/node_modules/@playdrop/boxel-core/dist/src/transforms/voxels/textured-to-voxel.js.map +0 -1
  301. package/node_modules/@playdrop/boxel-core/dist/src/types.d.ts +0 -168
  302. package/node_modules/@playdrop/boxel-core/dist/src/types.js +0 -3
  303. package/node_modules/@playdrop/boxel-core/dist/src/types.js.map +0 -1
  304. package/node_modules/@playdrop/boxel-core/dist/src/validation.d.ts +0 -24
  305. package/node_modules/@playdrop/boxel-core/dist/src/validation.js +0 -620
  306. package/node_modules/@playdrop/boxel-core/dist/src/validation.js.map +0 -1
  307. package/node_modules/@playdrop/boxel-core/dist/src/voxels/greedy-mesher.d.ts +0 -11
  308. package/node_modules/@playdrop/boxel-core/dist/src/voxels/greedy-mesher.js +0 -135
  309. package/node_modules/@playdrop/boxel-core/dist/src/voxels/greedy-mesher.js.map +0 -1
  310. package/node_modules/@playdrop/boxel-core/dist/src/voxels.d.ts +0 -23
  311. package/node_modules/@playdrop/boxel-core/dist/src/voxels.js +0 -52
  312. package/node_modules/@playdrop/boxel-core/dist/src/voxels.js.map +0 -1
  313. package/node_modules/@playdrop/boxel-core/package.json +0 -19
  314. package/node_modules/@playdrop/boxel-three/dist/src/animations.d.ts +0 -4
  315. package/node_modules/@playdrop/boxel-three/dist/src/animations.js +0 -92
  316. package/node_modules/@playdrop/boxel-three/dist/src/builders.d.ts +0 -8
  317. package/node_modules/@playdrop/boxel-three/dist/src/builders.js +0 -363
  318. package/node_modules/@playdrop/boxel-three/dist/src/context.d.ts +0 -24
  319. package/node_modules/@playdrop/boxel-three/dist/src/context.js +0 -58
  320. package/node_modules/@playdrop/boxel-three/dist/src/exporters/glb.d.ts +0 -100
  321. package/node_modules/@playdrop/boxel-three/dist/src/exporters/glb.js +0 -927
  322. package/node_modules/@playdrop/boxel-three/dist/src/exporters/image.d.ts +0 -18
  323. package/node_modules/@playdrop/boxel-three/dist/src/exporters/image.js +0 -294
  324. package/node_modules/@playdrop/boxel-three/dist/src/index.d.ts +0 -17
  325. package/node_modules/@playdrop/boxel-three/dist/src/index.js +0 -64
  326. package/node_modules/@playdrop/boxel-three/dist/src/instantiate.d.ts +0 -40
  327. package/node_modules/@playdrop/boxel-three/dist/src/instantiate.js +0 -96
  328. package/node_modules/@playdrop/boxel-three/dist/src/nodes.d.ts +0 -8
  329. package/node_modules/@playdrop/boxel-three/dist/src/nodes.js +0 -88
  330. package/node_modules/@playdrop/boxel-three/dist/src/overlays.d.ts +0 -7
  331. package/node_modules/@playdrop/boxel-three/dist/src/overlays.js +0 -123
  332. package/node_modules/@playdrop/boxel-three/dist/src/primitives.d.ts +0 -4
  333. package/node_modules/@playdrop/boxel-three/dist/src/primitives.js +0 -48
  334. package/node_modules/@playdrop/boxel-three/dist/src/scene.d.ts +0 -3
  335. package/node_modules/@playdrop/boxel-three/dist/src/scene.js +0 -168
  336. package/node_modules/@playdrop/boxel-three/dist/src/skinned-mesh.d.ts +0 -29
  337. package/node_modules/@playdrop/boxel-three/dist/src/skinned-mesh.js +0 -623
  338. package/node_modules/@playdrop/boxel-three/dist/src/texture-atlas.d.ts +0 -13
  339. package/node_modules/@playdrop/boxel-three/dist/src/texture-atlas.js +0 -133
  340. package/node_modules/@playdrop/boxel-three/dist/src/textures.d.ts +0 -17
  341. package/node_modules/@playdrop/boxel-three/dist/src/textures.js +0 -216
  342. package/node_modules/@playdrop/boxel-three/dist/src/types.d.ts +0 -112
  343. package/node_modules/@playdrop/boxel-three/dist/src/voxels/faces.d.ts +0 -28
  344. package/node_modules/@playdrop/boxel-three/dist/src/voxels/faces.js +0 -344
  345. package/node_modules/@playdrop/boxel-three/dist/src/voxels/mesher.d.ts +0 -24
  346. package/node_modules/@playdrop/boxel-three/dist/src/voxels/mesher.js +0 -113
  347. package/node_modules/@playdrop/boxel-three/dist/test/export-image.playwright.test.d.ts +0 -1
  348. package/node_modules/@playdrop/boxel-three/dist/test/export-image.playwright.test.js +0 -137
  349. package/node_modules/@playdrop/boxel-three/dist/test/fixtures/render-worker.d.ts +0 -20
  350. package/node_modules/@playdrop/boxel-three/dist/test/fixtures/render-worker.js +0 -85
  351. package/node_modules/@playdrop/boxel-three/dist/test/glb-skinned.test.d.ts +0 -1
  352. package/node_modules/@playdrop/boxel-three/dist/test/glb-skinned.test.js +0 -104
  353. package/node_modules/@playdrop/boxel-three/dist/test/index.test.d.ts +0 -1
  354. package/node_modules/@playdrop/boxel-three/dist/test/index.test.js +0 -30
  355. package/node_modules/@playdrop/boxel-three/dist/test/instantiate.test.d.ts +0 -1
  356. package/node_modules/@playdrop/boxel-three/dist/test/instantiate.test.js +0 -88
  357. package/node_modules/@playdrop/boxel-three/dist/test/overlays.test.d.ts +0 -1
  358. package/node_modules/@playdrop/boxel-three/dist/test/overlays.test.js +0 -42
  359. package/node_modules/@playdrop/boxel-three/dist/test/scene-filter.test.d.ts +0 -1
  360. package/node_modules/@playdrop/boxel-three/dist/test/scene-filter.test.js +0 -73
  361. package/node_modules/@playdrop/boxel-three/dist/test/scene-smoke.test.d.ts +0 -1
  362. package/node_modules/@playdrop/boxel-three/dist/test/scene-smoke.test.js +0 -85
  363. package/node_modules/@playdrop/boxel-three/dist/test/skinned-mesh.test.d.ts +0 -1
  364. package/node_modules/@playdrop/boxel-three/dist/test/skinned-mesh.test.js +0 -73
  365. package/node_modules/@playdrop/boxel-three/dist/test/textured-overlay.test.d.ts +0 -1
  366. package/node_modules/@playdrop/boxel-three/dist/test/textured-overlay.test.js +0 -136
  367. package/node_modules/@playdrop/boxel-three/dist/test/voxels.test.d.ts +0 -1
  368. package/node_modules/@playdrop/boxel-three/dist/test/voxels.test.js +0 -42
  369. package/node_modules/@playdrop/boxel-three/package.json +0 -28
@@ -1,620 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.BoxelValidationError = void 0;
4
- exports.isTupleOfNumbers = isTupleOfNumbers;
5
- exports.assertVec3 = assertVec3;
6
- exports.assertVec2 = assertVec2;
7
- exports.assertPattern = assertPattern;
8
- exports.assertMaterial = assertMaterial;
9
- exports.assertTexture = assertTexture;
10
- exports.assertPrimitive = assertPrimitive;
11
- exports.assertAnimation = assertAnimation;
12
- exports.assertTexturedBoxFaceSizes = assertTexturedBoxFaceSizes;
13
- exports.validateBoxel = validateBoxel;
14
- exports.assertBoxel = assertBoxel;
15
- exports.collectBoxelValidationIssues = collectBoxelValidationIssues;
16
- const textures_1 = require("./textures");
17
- const VEC2_LENGTH = 2;
18
- const VEC3_LENGTH = 3;
19
- const CONNECT_MODES = ["none", "child", "parent", "both"];
20
- const isConnectMode = (value) => typeof value === "string" && CONNECT_MODES.includes(value);
21
- class BoxelValidationError extends Error {
22
- constructor(message, issues) {
23
- super(message);
24
- this.issues = issues;
25
- this.name = "BoxelValidationError";
26
- }
27
- }
28
- exports.BoxelValidationError = BoxelValidationError;
29
- const sanitizeMessage = (error) => {
30
- if (!error)
31
- return "Unknown validation error";
32
- if (typeof error === "string")
33
- return error;
34
- if (error instanceof Error)
35
- return error.message;
36
- if (typeof error === "object" && "message" in error) {
37
- const candidate = error.message;
38
- return typeof candidate === "string" ? candidate : "Unknown validation error";
39
- }
40
- return String(error);
41
- };
42
- const pushIssue = (issues, path, error) => {
43
- issues.push({ path, message: sanitizeMessage(error) });
44
- };
45
- function isTupleOfNumbers(value, expectedLength) {
46
- return (Array.isArray(value) &&
47
- value.length === expectedLength &&
48
- value.every((item) => typeof item === "number" && Number.isFinite(item)));
49
- }
50
- function assertVec3(value, context) {
51
- if (!isTupleOfNumbers(value, VEC3_LENGTH)) {
52
- throw new Error(`Invalid Vec3 for ${context}`);
53
- }
54
- }
55
- function assertVec2(value, context) {
56
- if (!isTupleOfNumbers(value, VEC2_LENGTH)) {
57
- throw new Error(`Invalid Vec2 for ${context}`);
58
- }
59
- }
60
- function assertPattern(value, index) {
61
- if (!value || typeof value !== "object") {
62
- throw new Error(`Pattern at index ${index} must be an object`);
63
- }
64
- const pattern = value;
65
- if (typeof pattern.id !== "string") {
66
- throw new Error(`Pattern at index ${index} is missing id`);
67
- }
68
- assertVec2(pattern.size, `pattern ${pattern.id} size`);
69
- const patternSize = pattern.size;
70
- if (!Array.isArray(pattern.data) || !pattern.data.every((cell) => Number.isInteger(cell) && cell >= 0)) {
71
- throw new Error(`Pattern ${pattern.id} data must be an array of non-negative integers`);
72
- }
73
- const expectedLength = patternSize[0] * patternSize[1];
74
- if (pattern.data.length !== expectedLength) {
75
- throw new Error(`Pattern ${pattern.id} data length ${pattern.data.length} does not match expected size ${expectedLength}`);
76
- }
77
- }
78
- function assertMaterial(value, index) {
79
- if (!value || typeof value !== "object") {
80
- throw new Error(`Material at index ${index} must be an object`);
81
- }
82
- const material = value;
83
- if (typeof material.id !== "string") {
84
- throw new Error(`Material at index ${index} is missing id`);
85
- }
86
- assertVec3(material.baseColor, `material ${material.id} baseColor`);
87
- if (material.emissiveColor !== undefined) {
88
- assertVec3(material.emissiveColor, `material ${material.id} emissiveColor`);
89
- }
90
- if (material.opacity !== undefined && (typeof material.opacity !== "number" || !Number.isFinite(material.opacity))) {
91
- throw new Error(`Material ${material.id} opacity must be a finite number`);
92
- }
93
- }
94
- function assertTexture(value, index) {
95
- if (!value || typeof value !== "object") {
96
- throw new Error(`Texture at index ${index} must be an object`);
97
- }
98
- const texture = value;
99
- if (typeof texture.id !== "string") {
100
- throw new Error(`Texture at index ${index} is missing id`);
101
- }
102
- if (typeof texture.pattern !== "string") {
103
- throw new Error(`Texture ${texture.id} pattern must be a string`);
104
- }
105
- if (!Array.isArray(texture.materials) || !texture.materials.every((id) => typeof id === "string")) {
106
- throw new Error(`Texture ${texture.id} materials must be an array of strings`);
107
- }
108
- }
109
- function assertPlainBox(primitive, context) {
110
- if (primitive.kind !== "plain_box") {
111
- throw new Error(`${context} expected kind plain_box`);
112
- }
113
- if (typeof primitive.material !== "string") {
114
- throw new Error(`${context} material must be a string`);
115
- }
116
- }
117
- function assertTexturedBox(primitive, context) {
118
- if (primitive.kind !== "textured_box") {
119
- throw new Error(`${context} expected kind textured_box`);
120
- }
121
- const candidate = primitive;
122
- const faces = ["top", "bottom", "north", "south", "east", "west", "sides", "all"];
123
- faces.forEach((face) => {
124
- const value = candidate[face];
125
- if (value !== undefined && typeof value !== "string") {
126
- throw new Error(`${context} face ${face} must be a string id`);
127
- }
128
- });
129
- }
130
- function assertVoxelBox(primitive, context) {
131
- if (primitive.kind !== "voxel_box") {
132
- throw new Error(`${context} expected kind voxel_box`);
133
- }
134
- const candidate = primitive;
135
- if (!Array.isArray(candidate.voxels) || !candidate.voxels.every((cell) => typeof cell === "number")) {
136
- throw new Error(`${context} voxels must be an array of numbers`);
137
- }
138
- if (candidate.palette !== undefined) {
139
- if (!Array.isArray(candidate.palette) || !candidate.palette.every((entry) => typeof entry === "string")) {
140
- throw new Error(`${context} palette must be an array of material ids`);
141
- }
142
- }
143
- const size = primitive.size;
144
- assertVec3(size, `${context} size`);
145
- const dims = size.map((axis) => Math.round(axis));
146
- if (dims.some((value) => value <= 0 || !Number.isFinite(value))) {
147
- throw new Error(`${context} size must contain positive finite numbers`);
148
- }
149
- const expected = dims[0] * dims[1] * dims[2];
150
- if (candidate.voxels.length !== expected) {
151
- throw new Error(`${context} voxels length ${candidate.voxels.length} does not match size product ${expected}`);
152
- }
153
- }
154
- function assertComboBox(primitive, context) {
155
- if (primitive.kind !== "combo_box") {
156
- throw new Error(`${context} expected kind combo_box`);
157
- }
158
- const candidate = primitive;
159
- if (!Array.isArray(candidate.slots)) {
160
- throw new Error(`${context} slots must be an array`);
161
- }
162
- candidate.slots.forEach((slot, idx) => {
163
- if (!slot || typeof slot !== "object") {
164
- throw new Error(`${context} slot ${idx} must be an object`);
165
- }
166
- const slotId = slot.id;
167
- if (slotId !== undefined && typeof slotId !== "string") {
168
- throw new Error(`${context} slot ${idx} id must be a string when provided`);
169
- }
170
- if (typeof slot.primitive !== "string") {
171
- throw new Error(`${context} slot ${idx} primitive must be a string`);
172
- }
173
- assertVec3(slot.offset, `${context} slot ${idx} offset`);
174
- });
175
- }
176
- function assertPrimitive(value, index) {
177
- if (!value || typeof value !== "object") {
178
- throw new Error(`Primitive at index ${index} must be an object`);
179
- }
180
- const primitive = value;
181
- if (typeof primitive.id !== "string") {
182
- throw new Error(`Primitive at index ${index} is missing id`);
183
- }
184
- const primitiveId = primitive.id;
185
- if (typeof primitive.kind !== "string") {
186
- throw new Error(`Primitive ${primitiveId} kind must be a string discriminator`);
187
- }
188
- assertVec3(primitive.size, `primitive ${primitiveId} size`);
189
- switch (primitive.kind) {
190
- case "plain_box":
191
- assertPlainBox(primitive, `primitive ${primitiveId}`);
192
- break;
193
- case "textured_box":
194
- assertTexturedBox(primitive, `primitive ${primitiveId}`);
195
- break;
196
- case "voxel_box":
197
- assertVoxelBox(primitive, `primitive ${primitiveId}`);
198
- break;
199
- case "combo_box":
200
- assertComboBox(primitive, `primitive ${primitiveId}`);
201
- break;
202
- default: {
203
- const unknownKind = value.kind;
204
- throw new Error(`Unknown primitive kind ${String(unknownKind)} for primitive ${primitiveId}`);
205
- }
206
- }
207
- }
208
- const animationProperties = ["position", "rotation", "scale"];
209
- function assertAnimationChannel(value, context) {
210
- if (!value || typeof value !== "object") {
211
- throw new Error(`${context} channel must be an object`);
212
- }
213
- const channel = value;
214
- if (typeof channel.node !== "string") {
215
- throw new Error(`${context} channel node must be a string`);
216
- }
217
- if (!animationProperties.includes(channel.property)) {
218
- throw new Error(`${context} channel property must be one of ${animationProperties.join(", ")}`);
219
- }
220
- if (!Array.isArray(channel.keyframes)) {
221
- throw new Error(`${context} keyframes must be an array`);
222
- }
223
- channel.keyframes.forEach((keyframe, idx) => {
224
- if (!keyframe || typeof keyframe !== "object") {
225
- throw new Error(`${context} keyframe ${idx} must be an object`);
226
- }
227
- const reference = keyframe;
228
- if (typeof reference.time !== "number" || !Number.isFinite(reference.time) || reference.time < 0) {
229
- throw new Error(`${context} keyframe ${idx} time must be a non-negative number`);
230
- }
231
- assertVec3(reference.value, `${context} keyframe ${idx} value`);
232
- });
233
- }
234
- function assertAnimation(value, index) {
235
- if (!value || typeof value !== "object") {
236
- throw new Error(`Animation at index ${index} must be an object`);
237
- }
238
- const animation = value;
239
- if (typeof animation.id !== "string" || !animation.id) {
240
- throw new Error(`Animation at index ${index} is missing id`);
241
- }
242
- if (typeof animation.duration !== "number" || !Number.isFinite(animation.duration) || animation.duration < 0) {
243
- throw new Error(`Animation ${animation.id} duration must be a non-negative finite number`);
244
- }
245
- if (!Array.isArray(animation.channels)) {
246
- throw new Error(`Animation ${animation.id} channels must be an array`);
247
- }
248
- animation.channels.forEach((channel, channelIndex) => assertAnimationChannel(channel, `animation ${animation.id} channel ${channelIndex}`));
249
- }
250
- const FACE_DIMENSIONS = {
251
- top: (size) => [size[0], size[2]],
252
- bottom: (size) => [size[0], size[2]],
253
- north: (size) => [size[0], size[1]],
254
- south: (size) => [size[0], size[1]],
255
- east: (size) => [size[2], size[1]],
256
- west: (size) => [size[2], size[1]],
257
- sides: () => [0, 0],
258
- all: () => [0, 0],
259
- };
260
- function normalizeDimension(value) {
261
- if (!Number.isFinite(value)) {
262
- return NaN;
263
- }
264
- return Math.abs(Math.round(value));
265
- }
266
- function assertTexturedBoxFaceSizes(box, textureLookup, patternLookup, materialLookup) {
267
- const size = box.size;
268
- const [sizeX, sizeY, sizeZ] = size;
269
- [sizeX, sizeY, sizeZ].forEach((component, idx) => {
270
- if (!Number.isFinite(component)) {
271
- throw new Error(`primitive ${box.id} size component ${idx} must be finite to validate textures`);
272
- }
273
- });
274
- const normalizedSize = [normalizeDimension(sizeX), normalizeDimension(sizeY), normalizeDimension(sizeZ)];
275
- if (normalizedSize.some((dimension) => dimension === 0)) {
276
- throw new Error(`primitive ${box.id} must not contain zero-sized dimensions for textured faces`);
277
- }
278
- ["top", "bottom", "north", "south", "east", "west"].forEach((face) => {
279
- const textureId = (0, textures_1.resolveFaceTextureId)(box, face);
280
- if (!textureId) {
281
- return;
282
- }
283
- const texture = textureLookup.get(textureId);
284
- if (!texture) {
285
- throw new Error(`primitive ${box.id} face ${face} references missing texture ${textureId}`);
286
- }
287
- const pattern = patternLookup.get(texture.pattern);
288
- if (!pattern) {
289
- throw new Error(`texture ${texture.id} referenced by primitive ${box.id} face ${face} is missing pattern ${texture.pattern}`);
290
- }
291
- if (!Array.isArray(pattern.size) || pattern.size.length !== 2) {
292
- throw new Error(`pattern ${pattern.id} must define a 2D size for primitive ${box.id} face ${face}`);
293
- }
294
- const size2D = pattern.size;
295
- const patternWidth = normalizeDimension(size2D[0]);
296
- const patternHeight = normalizeDimension(size2D[1]);
297
- if (!Number.isFinite(patternWidth) || !Number.isFinite(patternHeight) || patternWidth <= 0 || patternHeight <= 0) {
298
- throw new Error(`pattern ${pattern.id} has invalid size for primitive ${box.id} face ${face}`);
299
- }
300
- const [expectedWidthRaw, expectedHeightRaw] = FACE_DIMENSIONS[face](normalizedSize);
301
- const expectedWidth = normalizeDimension(expectedWidthRaw);
302
- const expectedHeight = normalizeDimension(expectedHeightRaw);
303
- if (patternWidth !== expectedWidth || patternHeight !== expectedHeight) {
304
- throw new Error(`primitive ${box.id} face ${face} expects texture size ${expectedWidth}x${expectedHeight} but texture ${textureId} pattern ${pattern.id} is ${patternWidth}x${patternHeight}`);
305
- }
306
- });
307
- ["top", "bottom", "north", "south", "east", "west"].forEach((face) => {
308
- const textureId = (0, textures_1.resolveOverlayFaceTextureId)(box, face);
309
- if (!textureId) {
310
- return;
311
- }
312
- const texture = textureLookup.get(textureId);
313
- if (!texture) {
314
- throw new Error(`primitive ${box.id} overlay face ${face} references missing texture ${textureId}`);
315
- }
316
- const pattern = patternLookup.get(texture.pattern);
317
- if (!pattern) {
318
- throw new Error(`texture ${texture.id} referenced by primitive ${box.id} overlay face ${face} is missing pattern ${texture.pattern}`);
319
- }
320
- if (!Array.isArray(pattern.size) || pattern.size.length !== 2) {
321
- throw new Error(`pattern ${pattern.id} must define a 2D size for primitive ${box.id} overlay face ${face}`);
322
- }
323
- const size2D = pattern.size;
324
- const patternWidth = normalizeDimension(size2D[0]);
325
- const patternHeight = normalizeDimension(size2D[1]);
326
- if (!Number.isFinite(patternWidth) || !Number.isFinite(patternHeight) || patternWidth <= 0 || patternHeight <= 0) {
327
- throw new Error(`pattern ${pattern.id} has invalid size for primitive ${box.id} overlay face ${face}`);
328
- }
329
- const [expectedWidthRaw, expectedHeightRaw] = FACE_DIMENSIONS[face](normalizedSize);
330
- const expectedWidth = normalizeDimension(expectedWidthRaw);
331
- const expectedHeight = normalizeDimension(expectedHeightRaw);
332
- if (patternWidth !== expectedWidth || patternHeight !== expectedHeight) {
333
- throw new Error(`primitive ${box.id} overlay face ${face} expects texture size ${expectedWidth}x${expectedHeight} but texture ${textureId} pattern ${pattern.id} is ${patternWidth}x${patternHeight}`);
334
- }
335
- });
336
- const mode = box.renderMode ?? "plain";
337
- if (mode !== "plain" && mode !== "cutout") {
338
- throw new Error(`primitive ${box.id} has invalid renderMode ${String(mode)}`);
339
- }
340
- const faceTextureIds = (0, textures_1.collectFaceTextureIds)(box);
341
- const usesTransparency = faceTextureIds.some((textureId) => {
342
- const texture = textureLookup.get(textureId);
343
- if (!texture) {
344
- return false;
345
- }
346
- return texture.materials.some((materialId) => {
347
- const material = materialLookup.get(materialId);
348
- if (!material) {
349
- return false;
350
- }
351
- if (material.opacity === undefined) {
352
- return false;
353
- }
354
- return Number(material.opacity) < 1;
355
- });
356
- });
357
- if (mode === "plain" && usesTransparency) {
358
- throw new Error(`primitive ${box.id} renderMode plain but references textures with transparent materials`);
359
- }
360
- }
361
- function assertNode(value, path, primitiveLookup) {
362
- if (!value || typeof value !== "object") {
363
- throw new Error(`Node ${path} must be an object`);
364
- }
365
- const node = value;
366
- if (typeof node.id !== "string") {
367
- throw new Error(`Node ${path} is missing id`);
368
- }
369
- assertVec3(node.position, `node ${node.id} position`);
370
- if (node.rotation !== undefined) {
371
- assertVec3(node.rotation, `node ${node.id} rotation`);
372
- }
373
- if (node.scale !== undefined) {
374
- assertVec3(node.scale, `node ${node.id} scale`);
375
- }
376
- if (node.size !== undefined) {
377
- assertVec3(node.size, `node ${node.id} size`);
378
- }
379
- if (node.center !== undefined) {
380
- assertVec3(node.center, `node ${node.id} center`);
381
- }
382
- if (node.connect !== undefined) {
383
- const connectValue = node.connect;
384
- if (connectValue === true) {
385
- node.connect = "child";
386
- }
387
- else if (connectValue === false) {
388
- delete node.connect;
389
- }
390
- else if (typeof connectValue === "string") {
391
- if (!isConnectMode(connectValue)) {
392
- throw new Error(`Node ${node.id} connect must be one of ${CONNECT_MODES.join(", ")}`);
393
- }
394
- node.connect = connectValue;
395
- }
396
- else {
397
- throw new Error(`Node ${node.id} connect must be a boolean or enum value`);
398
- }
399
- }
400
- if (node.mesh !== undefined) {
401
- if (typeof node.mesh !== "string") {
402
- throw new Error(`Node ${node.id} mesh must be a primitive id`);
403
- }
404
- if (!primitiveLookup.has(node.mesh)) {
405
- throw new Error(`Node ${node.id} references unknown primitive ${node.mesh}`);
406
- }
407
- }
408
- if (!Array.isArray(node.children)) {
409
- throw new Error(`Node ${node.id} children must be an array`);
410
- }
411
- node.children.forEach((child, idx) => assertNode(child, `${path}.${child?.id ?? idx}`, primitiveLookup));
412
- }
413
- function collectNodeIds(node, set) {
414
- set.add(node.id);
415
- node.children.forEach((child) => collectNodeIds(child, set));
416
- }
417
- function assertAnimationChannels(animation, nodeIds) {
418
- const seenChannels = new Set();
419
- const epsilon = 1e-5;
420
- animation.channels.forEach((channel, channelIndex) => {
421
- const key = `${channel.node}:${channel.property}`;
422
- if (seenChannels.has(key)) {
423
- throw new Error(`Animation ${animation.id} channel ${channelIndex} duplicates node ${channel.node} property ${channel.property}`);
424
- }
425
- seenChannels.add(key);
426
- if (!nodeIds.has(channel.node)) {
427
- throw new Error(`Animation ${animation.id} channel ${channelIndex} references unknown node ${channel.node}`);
428
- }
429
- let previousTime = -Infinity;
430
- channel.keyframes.forEach((keyframe, keyframeIndex) => {
431
- if (keyframe.time > animation.duration + epsilon) {
432
- throw new Error(`Animation ${animation.id} channel ${channelIndex} keyframe ${keyframeIndex} time ${keyframe.time} exceeds duration ${animation.duration}`);
433
- }
434
- if (keyframe.time + epsilon < previousTime) {
435
- throw new Error(`Animation ${animation.id} channel ${channelIndex} keyframes must be in ascending time order (found ${keyframe.time} after ${previousTime})`);
436
- }
437
- previousTime = keyframe.time;
438
- });
439
- });
440
- }
441
- function validateBoxel(candidate) {
442
- const issues = [];
443
- if (!candidate || typeof candidate !== "object") {
444
- pushIssue(issues, "boxel", "BoxelDefinition must be an object");
445
- return { boxel: null, issues };
446
- }
447
- const raw = candidate;
448
- let id = null;
449
- if (typeof raw.id === "string" && raw.id.trim().length > 0) {
450
- id = raw.id;
451
- }
452
- else {
453
- pushIssue(issues, "boxel.id", "BoxelDefinition id must be a non-empty string");
454
- }
455
- const primitives = [];
456
- const primitiveLookup = new Map();
457
- if (!Array.isArray(raw.primitives)) {
458
- pushIssue(issues, "boxel.primitives", "BoxelDefinition primitives must be an array");
459
- }
460
- else {
461
- raw.primitives.forEach((primitive, index) => {
462
- try {
463
- assertPrimitive(primitive, index);
464
- primitives.push(primitive);
465
- primitiveLookup.set(primitive.id, primitive);
466
- }
467
- catch (error) {
468
- pushIssue(issues, `boxel.primitives[${index}]`, error);
469
- }
470
- });
471
- }
472
- let geometry = null;
473
- const geometryNodeIds = new Set();
474
- if (!raw.geometry || typeof raw.geometry !== "object") {
475
- pushIssue(issues, "boxel.geometry", "BoxelDefinition geometry is missing or invalid");
476
- }
477
- else {
478
- const geo = raw.geometry;
479
- if (typeof geo.id !== "string") {
480
- pushIssue(issues, "boxel.geometry.id", "Geometry id must be a string");
481
- }
482
- else if (!geo.root) {
483
- pushIssue(issues, "boxel.geometry.root", "Geometry root is missing");
484
- }
485
- else {
486
- try {
487
- assertNode(geo.root, "root", primitiveLookup);
488
- geometry = geo;
489
- collectNodeIds(geo.root, geometryNodeIds);
490
- }
491
- catch (error) {
492
- pushIssue(issues, "boxel.geometry.root", error);
493
- }
494
- }
495
- }
496
- const patterns = [];
497
- const patternLookup = new Map();
498
- if (!Array.isArray(raw.patterns)) {
499
- pushIssue(issues, "boxel.patterns", "BoxelDefinition patterns must be an array");
500
- }
501
- else {
502
- raw.patterns.forEach((pattern, index) => {
503
- try {
504
- assertPattern(pattern, index);
505
- patterns.push(pattern);
506
- patternLookup.set(pattern.id, pattern);
507
- }
508
- catch (error) {
509
- pushIssue(issues, `boxel.patterns[${index}]`, error);
510
- }
511
- });
512
- }
513
- const materials = [];
514
- const materialLookup = new Map();
515
- if (!Array.isArray(raw.materials)) {
516
- pushIssue(issues, "boxel.materials", "BoxelDefinition materials must be an array");
517
- }
518
- else {
519
- raw.materials.forEach((material, index) => {
520
- try {
521
- assertMaterial(material, index);
522
- materials.push(material);
523
- materialLookup.set(material.id, material);
524
- }
525
- catch (error) {
526
- pushIssue(issues, `boxel.materials[${index}]`, error);
527
- }
528
- });
529
- }
530
- const textures = [];
531
- const textureLookup = new Map();
532
- if (!Array.isArray(raw.textures)) {
533
- pushIssue(issues, "boxel.textures", "BoxelDefinition textures must be an array");
534
- }
535
- else {
536
- raw.textures.forEach((texture, index) => {
537
- try {
538
- assertTexture(texture, index);
539
- const typed = texture;
540
- const pattern = patternLookup.get(typed.pattern);
541
- if (!pattern) {
542
- throw new Error(`Texture ${typed.id} references unknown pattern ${typed.pattern}`);
543
- }
544
- typed.materials.forEach((materialId) => {
545
- if (!materialLookup.has(materialId)) {
546
- throw new Error(`Texture ${typed.id} references unknown material ${materialId}`);
547
- }
548
- });
549
- const paletteSize = typed.materials.length;
550
- for (let i = 0; i < pattern.data.length; i += 1) {
551
- const value = pattern.data[i];
552
- if (value >= paletteSize) {
553
- throw new Error(`Texture ${typed.id} pattern index ${value} exceeds palette size ${paletteSize} (pattern ${pattern.id})`);
554
- }
555
- }
556
- textures.push(typed);
557
- textureLookup.set(typed.id, typed);
558
- }
559
- catch (error) {
560
- pushIssue(issues, `boxel.textures[${index}]`, error);
561
- }
562
- });
563
- }
564
- if (textures.length > 0) {
565
- primitives
566
- .filter((primitive) => primitive.kind === "textured_box")
567
- .forEach((primitive) => {
568
- try {
569
- assertTexturedBoxFaceSizes(primitive, textureLookup, patternLookup, materialLookup);
570
- }
571
- catch (error) {
572
- pushIssue(issues, `boxel.primitives[${primitive.id}]`, error);
573
- }
574
- });
575
- }
576
- const animations = [];
577
- if (!Array.isArray(raw.animations)) {
578
- if (raw.animations !== undefined) {
579
- pushIssue(issues, "boxel.animations", "BoxelDefinition animations must be an array");
580
- }
581
- }
582
- else {
583
- raw.animations.forEach((animation, index) => {
584
- try {
585
- assertAnimation(animation, index);
586
- if (geometry) {
587
- assertAnimationChannels(animation, geometryNodeIds);
588
- }
589
- animations.push(animation);
590
- }
591
- catch (error) {
592
- pushIssue(issues, `boxel.animations[${index}]`, error);
593
- }
594
- });
595
- }
596
- if (id === null || !geometry) {
597
- return { boxel: null, issues };
598
- }
599
- const boxel = {
600
- id,
601
- geometry,
602
- patterns,
603
- materials,
604
- textures,
605
- primitives,
606
- animations,
607
- };
608
- return { boxel: issues.length === 0 ? boxel : null, issues };
609
- }
610
- function assertBoxel(candidate) {
611
- const { boxel, issues } = validateBoxel(candidate);
612
- if (boxel) {
613
- return boxel;
614
- }
615
- throw new BoxelValidationError("BoxelDefinition validation failed", issues);
616
- }
617
- function collectBoxelValidationIssues(candidate) {
618
- return validateBoxel(candidate).issues;
619
- }
620
- //# sourceMappingURL=validation.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"validation.js","sourceRoot":"","sources":["../../src/validation.ts"],"names":[],"mappings":";;;AAwDA,4CAMC;AAED,gCAIC;AAED,gCAIC;AAED,sCAuBC;AAED,wCAmBC;AAED,sCAiBC;AAgFD,0CAmCC;AA8BD,0CAiBC;AAuBD,gEAsHC;AAqGD,sCAsKC;AAED,kCAMC;AAED,oEAEC;AAjtBD,yCAAsG;AAkBtG,MAAM,WAAW,GAAG,CAAC,CAAC;AACtB,MAAM,WAAW,GAAG,CAAC,CAAC;AAEtB,MAAM,aAAa,GAAkB,CAAC,MAAM,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,CAAC,CAAC;AAEzE,MAAM,aAAa,GAAG,CAAC,KAAc,EAAwB,EAAE,CAC7D,OAAO,KAAK,KAAK,QAAQ,IAAI,aAAa,CAAC,QAAQ,CAAC,KAAoB,CAAC,CAAC;AAO5E,MAAa,oBAAqB,SAAQ,KAAK;IAG7C,YAAY,OAAe,EAAE,MAA8B;QACzD,KAAK,CAAC,OAA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