@playdrop/playdrop-cli 0.16.5 → 0.16.12

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 (383) hide show
  1. package/bin/playdrop +1 -2
  2. package/config/client-meta.json +4 -4
  3. package/dist/apiClient.d.ts +2 -2
  4. package/dist/apiClient.js +16 -20
  5. package/dist/appUrls.d.ts +2 -2
  6. package/dist/appUrls.js +31 -33
  7. package/dist/apps/build.d.ts +2 -2
  8. package/dist/apps/build.js +83 -83
  9. package/dist/apps/index.d.ts +7 -7
  10. package/dist/apps/index.js +8 -8
  11. package/dist/apps/loadCheck.d.ts +28 -16
  12. package/dist/apps/loadCheck.js +411 -279
  13. package/dist/apps/registration.d.ts +3 -3
  14. package/dist/apps/registration.js +1 -1
  15. package/dist/apps/staticHtml.d.ts +3 -3
  16. package/dist/apps/staticHtml.js +90 -91
  17. package/dist/apps/surfaceProfiles.d.ts +2 -2
  18. package/dist/apps/surfaceProfiles.js +6 -6
  19. package/dist/apps/upload.d.ts +5 -5
  20. package/dist/apps/upload.js +75 -81
  21. package/dist/apps/validate.d.ts +2 -2
  22. package/dist/apps/validate.js +18 -22
  23. package/dist/assetSpecs.d.ts +2 -2
  24. package/dist/assetSpecs.js +35 -35
  25. package/dist/assets/model-artifacts.d.ts +1 -1
  26. package/dist/assets/model-artifacts.js +81 -77
  27. package/dist/assets/model-worker.d.ts +1 -1
  28. package/dist/assets/model-worker.js +6 -6
  29. package/dist/browser.js +9 -9
  30. package/dist/catalogue-utils.d.ts +1 -1
  31. package/dist/catalogue-utils.js +26 -26
  32. package/dist/catalogue.d.ts +21 -16
  33. package/dist/catalogue.js +509 -413
  34. package/dist/clientInfo.d.ts +1 -1
  35. package/dist/clientInfo.js +28 -28
  36. package/dist/commandContext.d.ts +5 -5
  37. package/dist/commandContext.js +19 -23
  38. package/dist/commands/accounts.js +6 -6
  39. package/dist/commands/ads.js +16 -16
  40. package/dist/commands/agents.d.ts +2 -2
  41. package/dist/commands/agents.js +131 -127
  42. package/dist/commands/boosts.js +41 -31
  43. package/dist/commands/browse.d.ts +2 -2
  44. package/dist/commands/browse.js +168 -128
  45. package/dist/commands/build.js +9 -9
  46. package/dist/commands/captureListing.d.ts +8 -8
  47. package/dist/commands/captureListing.js +292 -332
  48. package/dist/commands/changelog.js +1 -1
  49. package/dist/commands/chat.js +51 -53
  50. package/dist/commands/check.d.ts +1 -1
  51. package/dist/commands/check.js +44 -44
  52. package/dist/commands/clients.d.ts +3 -3
  53. package/dist/commands/clients.js +67 -64
  54. package/dist/commands/comments.js +36 -29
  55. package/dist/commands/create.js +305 -312
  56. package/dist/commands/createRemixContent.d.ts +1 -1
  57. package/dist/commands/createRemixContent.js +65 -60
  58. package/dist/commands/creations.js +205 -135
  59. package/dist/commands/credits.js +37 -27
  60. package/dist/commands/detail.js +40 -34
  61. package/dist/commands/dev.js +103 -126
  62. package/dist/commands/devBrowser.js +74 -65
  63. package/dist/commands/devRuntimeAssets.d.ts +4 -4
  64. package/dist/commands/devRuntimeAssets.js +38 -40
  65. package/dist/commands/devServer.d.ts +4 -4
  66. package/dist/commands/devServer.js +183 -174
  67. package/dist/commands/devShared.d.ts +3 -3
  68. package/dist/commands/devShared.js +31 -31
  69. package/dist/commands/doctor.d.ts +5 -5
  70. package/dist/commands/doctor.js +63 -57
  71. package/dist/commands/documentation.js +42 -32
  72. package/dist/commands/feedback.js +59 -42
  73. package/dist/commands/format.js +9 -9
  74. package/dist/commands/generation.d.ts +2 -2
  75. package/dist/commands/generation.js +344 -326
  76. package/dist/commands/init.d.ts +4 -4
  77. package/dist/commands/init.js +64 -61
  78. package/dist/commands/login.d.ts +2 -2
  79. package/dist/commands/login.js +42 -62
  80. package/dist/commands/logout.js +4 -4
  81. package/dist/commands/marketing.d.ts +8 -8
  82. package/dist/commands/marketing.js +246 -297
  83. package/dist/commands/notes.js +19 -19
  84. package/dist/commands/notifications.js +34 -22
  85. package/dist/commands/npmProcess.js +3 -3
  86. package/dist/commands/ownedRuntimeImageValidation.d.ts +1 -1
  87. package/dist/commands/ownedRuntimeImageValidation.js +19 -17
  88. package/dist/commands/play.js +12 -21
  89. package/dist/commands/publicPages.js +8 -4
  90. package/dist/commands/review.js +123 -110
  91. package/dist/commands/search.js +107 -88
  92. package/dist/commands/tags.js +10 -12
  93. package/dist/commands/taskCaptureSession.d.ts +3 -3
  94. package/dist/commands/taskCaptureSession.js +3 -3
  95. package/dist/commands/tweaks.js +25 -23
  96. package/dist/commands/upgrade.js +40 -31
  97. package/dist/commands/upload-content.d.ts +5 -5
  98. package/dist/commands/upload-content.js +130 -122
  99. package/dist/commands/upload-graph.d.ts +1 -1
  100. package/dist/commands/upload-graph.js +7 -11
  101. package/dist/commands/upload.d.ts +7 -7
  102. package/dist/commands/upload.js +196 -217
  103. package/dist/commands/validate.js +33 -32
  104. package/dist/commands/versionsBrowse.js +61 -51
  105. package/dist/commands/whoami.js +11 -14
  106. package/dist/commands/worker/archive-staging.d.ts +9 -0
  107. package/dist/commands/worker/archive-staging.js +257 -0
  108. package/dist/commands/worker/instrument-evidence.d.ts +1 -1
  109. package/dist/commands/worker/instrument-evidence.js +41 -43
  110. package/dist/commands/worker/provider-telemetry.d.ts +2 -1
  111. package/dist/commands/worker/provider-telemetry.js +181 -64
  112. package/dist/commands/worker/runtime.d.ts +18 -3
  113. package/dist/commands/worker/runtime.js +291 -239
  114. package/dist/commands/worker.d.ts +83 -22
  115. package/dist/commands/worker.js +1980 -1411
  116. package/dist/commands/workspaces.d.ts +2 -2
  117. package/dist/commands/workspaces.js +57 -57
  118. package/dist/config.js +23 -20
  119. package/dist/devAuth.d.ts +3 -3
  120. package/dist/devAuth.js +20 -17
  121. package/dist/environment.d.ts +1 -1
  122. package/dist/environment.js +34 -34
  123. package/dist/errors.d.ts +1 -1
  124. package/dist/errors.js +7 -7
  125. package/dist/externalAssetPackValidation.d.ts +1 -1
  126. package/dist/externalAssetPackValidation.js +9 -9
  127. package/dist/http.d.ts +1 -1
  128. package/dist/http.js +9 -9
  129. package/dist/index.js +657 -664
  130. package/dist/listingCaptureLease.js +23 -23
  131. package/dist/listingPreflight.d.ts +2 -2
  132. package/dist/listingPreflight.js +33 -33
  133. package/dist/messages.js +6 -14
  134. package/dist/output.js +9 -9
  135. package/dist/playwright.d.ts +1 -1
  136. package/dist/playwright.js +35 -40
  137. package/dist/proxyFetch.js +30 -27
  138. package/dist/recorderRelease.js +8 -8
  139. package/dist/refs.d.ts +5 -5
  140. package/dist/refs.js +40 -37
  141. package/dist/sessionCookie.js +15 -21
  142. package/dist/shellProbe.js +5 -5
  143. package/dist/taskSelection.d.ts +3 -3
  144. package/dist/taskSelection.js +67 -62
  145. package/dist/taskUtils.d.ts +1 -1
  146. package/dist/taskUtils.js +4 -4
  147. package/dist/tweakStaleness.d.ts +3 -3
  148. package/dist/tweakStaleness.js +8 -8
  149. package/dist/uploadLog.d.ts +3 -3
  150. package/dist/uploadLog.js +51 -51
  151. package/dist/versionCompare.js +3 -3
  152. package/dist/workerAppProject.d.ts +1 -1
  153. package/dist/workerAppProject.js +10 -17
  154. package/dist/workspaceAuth.d.ts +1 -1
  155. package/dist/workspaceAuth.js +28 -22
  156. package/node_modules/@playdrop/ai-client/dist/index.d.ts +35 -35
  157. package/node_modules/@playdrop/ai-client/dist/index.d.ts.map +1 -1
  158. package/node_modules/@playdrop/api-client/dist/client.d.ts +34 -33
  159. package/node_modules/@playdrop/api-client/dist/client.d.ts.map +1 -1
  160. package/node_modules/@playdrop/api-client/dist/core/errors.d.ts +1 -1
  161. package/node_modules/@playdrop/api-client/dist/core/errors.d.ts.map +1 -1
  162. package/node_modules/@playdrop/api-client/dist/core/request.d.ts +2 -2
  163. package/node_modules/@playdrop/api-client/dist/core/request.d.ts.map +1 -1
  164. package/node_modules/@playdrop/api-client/dist/domains/admin.d.ts +2 -2
  165. package/node_modules/@playdrop/api-client/dist/domains/admin.d.ts.map +1 -1
  166. package/node_modules/@playdrop/api-client/dist/domains/admin.js +4 -1
  167. package/node_modules/@playdrop/api-client/dist/domains/agent-tasks.d.ts +4 -3
  168. package/node_modules/@playdrop/api-client/dist/domains/agent-tasks.d.ts.map +1 -1
  169. package/node_modules/@playdrop/api-client/dist/domains/agent-tasks.js +12 -0
  170. package/node_modules/@playdrop/api-client/dist/domains/ai.d.ts +2 -2
  171. package/node_modules/@playdrop/api-client/dist/domains/ai.d.ts.map +1 -1
  172. package/node_modules/@playdrop/api-client/dist/domains/apps.d.ts +4 -4
  173. package/node_modules/@playdrop/api-client/dist/domains/apps.d.ts.map +1 -1
  174. package/node_modules/@playdrop/api-client/dist/domains/asset-packs.d.ts +4 -4
  175. package/node_modules/@playdrop/api-client/dist/domains/asset-packs.d.ts.map +1 -1
  176. package/node_modules/@playdrop/api-client/dist/domains/assets.d.ts +4 -4
  177. package/node_modules/@playdrop/api-client/dist/domains/assets.d.ts.map +1 -1
  178. package/node_modules/@playdrop/api-client/dist/domains/auth.d.ts +2 -2
  179. package/node_modules/@playdrop/api-client/dist/domains/auth.d.ts.map +1 -1
  180. package/node_modules/@playdrop/api-client/dist/domains/chat.d.ts +2 -2
  181. package/node_modules/@playdrop/api-client/dist/domains/chat.d.ts.map +1 -1
  182. package/node_modules/@playdrop/api-client/dist/domains/comments.d.ts +3 -3
  183. package/node_modules/@playdrop/api-client/dist/domains/comments.d.ts.map +1 -1
  184. package/node_modules/@playdrop/api-client/dist/domains/free-credits.d.ts +2 -2
  185. package/node_modules/@playdrop/api-client/dist/domains/free-credits.d.ts.map +1 -1
  186. package/node_modules/@playdrop/api-client/dist/domains/me.d.ts +2 -2
  187. package/node_modules/@playdrop/api-client/dist/domains/me.d.ts.map +1 -1
  188. package/node_modules/@playdrop/api-client/dist/domains/payments.d.ts +2 -2
  189. package/node_modules/@playdrop/api-client/dist/domains/payments.d.ts.map +1 -1
  190. package/node_modules/@playdrop/api-client/dist/domains/player-meta.d.ts +2 -2
  191. package/node_modules/@playdrop/api-client/dist/domains/player-meta.d.ts.map +1 -1
  192. package/node_modules/@playdrop/api-client/dist/domains/playtrade.d.ts +3 -3
  193. package/node_modules/@playdrop/api-client/dist/domains/playtrade.d.ts.map +1 -1
  194. package/node_modules/@playdrop/api-client/dist/domains/playtrade.js +2 -2
  195. package/node_modules/@playdrop/api-client/dist/domains/search.d.ts +2 -2
  196. package/node_modules/@playdrop/api-client/dist/domains/search.d.ts.map +1 -1
  197. package/node_modules/@playdrop/api-client/dist/domains/tags.d.ts +2 -2
  198. package/node_modules/@playdrop/api-client/dist/domains/tags.d.ts.map +1 -1
  199. package/node_modules/@playdrop/api-client/dist/index.d.ts +19 -18
  200. package/node_modules/@playdrop/api-client/dist/index.d.ts.map +1 -1
  201. package/node_modules/@playdrop/api-client/dist/index.js +7 -2
  202. package/node_modules/@playdrop/boxel-core/dist/src/entity-cleaner.d.ts +1 -1
  203. package/node_modules/@playdrop/boxel-core/dist/src/entity-cleaner.js +47 -47
  204. package/node_modules/@playdrop/boxel-core/dist/src/entity-cleaner.js.map +1 -1
  205. package/node_modules/@playdrop/boxel-core/dist/src/entity-utils.d.ts +3 -3
  206. package/node_modules/@playdrop/boxel-core/dist/src/entity-utils.js +32 -47
  207. package/node_modules/@playdrop/boxel-core/dist/src/entity-utils.js.map +1 -1
  208. package/node_modules/@playdrop/boxel-core/dist/src/format-utils.js +16 -18
  209. package/node_modules/@playdrop/boxel-core/dist/src/format-utils.js.map +1 -1
  210. package/node_modules/@playdrop/boxel-core/dist/src/humanoid/geometry.d.ts +2 -2
  211. package/node_modules/@playdrop/boxel-core/dist/src/humanoid/index.d.ts +4 -4
  212. package/node_modules/@playdrop/boxel-core/dist/src/humanoid/r15/common.d.ts +1 -1
  213. package/node_modules/@playdrop/boxel-core/dist/src/humanoid/r15/index.d.ts +3 -3
  214. package/node_modules/@playdrop/boxel-core/dist/src/humanoid/r15/textured-builder.d.ts +2 -2
  215. package/node_modules/@playdrop/boxel-core/dist/src/humanoid/r15/textured-builder.js +44 -45
  216. package/node_modules/@playdrop/boxel-core/dist/src/humanoid/r15/textured-builder.js.map +1 -1
  217. package/node_modules/@playdrop/boxel-core/dist/src/humanoid/r15/types.d.ts +1 -1
  218. package/node_modules/@playdrop/boxel-core/dist/src/humanoid/r15/voxel-builder.d.ts +2 -2
  219. package/node_modules/@playdrop/boxel-core/dist/src/humanoid/r15/voxel-builder.js +40 -44
  220. package/node_modules/@playdrop/boxel-core/dist/src/humanoid/r15/voxel-builder.js.map +1 -1
  221. package/node_modules/@playdrop/boxel-core/dist/src/humanoid/r6/builder.d.ts +2 -2
  222. package/node_modules/@playdrop/boxel-core/dist/src/humanoid/r6/builder.js +30 -34
  223. package/node_modules/@playdrop/boxel-core/dist/src/humanoid/r6/builder.js.map +1 -1
  224. package/node_modules/@playdrop/boxel-core/dist/src/humanoid/r6/index.d.ts +4 -4
  225. package/node_modules/@playdrop/boxel-core/dist/src/humanoid/r6/index.js.map +1 -1
  226. package/node_modules/@playdrop/boxel-core/dist/src/humanoid/r6/scanner.d.ts +3 -3
  227. package/node_modules/@playdrop/boxel-core/dist/src/humanoid/r6/scanner.js +23 -20
  228. package/node_modules/@playdrop/boxel-core/dist/src/humanoid/r6/scanner.js.map +1 -1
  229. package/node_modules/@playdrop/boxel-core/dist/src/humanoid/r6/textures/artifacts.d.ts +3 -3
  230. package/node_modules/@playdrop/boxel-core/dist/src/humanoid/r6/textures/artifacts.js +3 -3
  231. package/node_modules/@playdrop/boxel-core/dist/src/humanoid/r6/textures/face-map.d.ts +1 -1
  232. package/node_modules/@playdrop/boxel-core/dist/src/humanoid/r6/textures/face-map.js +21 -21
  233. package/node_modules/@playdrop/boxel-core/dist/src/humanoid/r6/textures/face-map.js.map +1 -1
  234. package/node_modules/@playdrop/boxel-core/dist/src/humanoid/templates/index.d.ts +1 -1
  235. package/node_modules/@playdrop/boxel-core/dist/src/humanoid/templates/index.js +2 -2
  236. package/node_modules/@playdrop/boxel-core/dist/src/index.d.ts +19 -19
  237. package/node_modules/@playdrop/boxel-core/dist/src/materials.d.ts +1 -1
  238. package/node_modules/@playdrop/boxel-core/dist/src/materials.js +12 -16
  239. package/node_modules/@playdrop/boxel-core/dist/src/materials.js.map +1 -1
  240. package/node_modules/@playdrop/boxel-core/dist/src/palette_tools.d.ts +1 -1
  241. package/node_modules/@playdrop/boxel-core/dist/src/palette_tools.js +38 -41
  242. package/node_modules/@playdrop/boxel-core/dist/src/palette_tools.js.map +1 -1
  243. package/node_modules/@playdrop/boxel-core/dist/src/serialization.d.ts +1 -1
  244. package/node_modules/@playdrop/boxel-core/dist/src/serialization.js +54 -56
  245. package/node_modules/@playdrop/boxel-core/dist/src/serialization.js.map +1 -1
  246. package/node_modules/@playdrop/boxel-core/dist/src/textures.d.ts +3 -3
  247. package/node_modules/@playdrop/boxel-core/dist/src/textures.js +39 -45
  248. package/node_modules/@playdrop/boxel-core/dist/src/textures.js.map +1 -1
  249. package/node_modules/@playdrop/boxel-core/dist/src/transforms/textured-boxes/infer-face.d.ts +2 -2
  250. package/node_modules/@playdrop/boxel-core/dist/src/transforms/textured-boxes/infer-face.js +39 -43
  251. package/node_modules/@playdrop/boxel-core/dist/src/transforms/textured-boxes/infer-face.js.map +1 -1
  252. package/node_modules/@playdrop/boxel-core/dist/src/transforms/textured-boxes/layer-mode.d.ts +3 -3
  253. package/node_modules/@playdrop/boxel-core/dist/src/transforms/textured-boxes/layer-mode.js +35 -35
  254. package/node_modules/@playdrop/boxel-core/dist/src/transforms/textured-boxes/layer-mode.js.map +1 -1
  255. package/node_modules/@playdrop/boxel-core/dist/src/transforms/textured-boxes/merge-overlay.d.ts +1 -1
  256. package/node_modules/@playdrop/boxel-core/dist/src/transforms/textured-boxes/merge-overlay.js +18 -18
  257. package/node_modules/@playdrop/boxel-core/dist/src/transforms/textured-boxes/merge-overlay.js.map +1 -1
  258. package/node_modules/@playdrop/boxel-core/dist/src/transforms/textured-boxes/slice.d.ts +3 -3
  259. package/node_modules/@playdrop/boxel-core/dist/src/transforms/textured-boxes/slice.js +50 -48
  260. package/node_modules/@playdrop/boxel-core/dist/src/transforms/textured-boxes/slice.js.map +1 -1
  261. package/node_modules/@playdrop/boxel-core/dist/src/transforms/upscale.d.ts +1 -1
  262. package/node_modules/@playdrop/boxel-core/dist/src/transforms/upscale.js +22 -26
  263. package/node_modules/@playdrop/boxel-core/dist/src/transforms/upscale.js.map +1 -1
  264. package/node_modules/@playdrop/boxel-core/dist/src/transforms/voxels/slice.d.ts +2 -2
  265. package/node_modules/@playdrop/boxel-core/dist/src/transforms/voxels/slice.js +8 -8
  266. package/node_modules/@playdrop/boxel-core/dist/src/transforms/voxels/slice.js.map +1 -1
  267. package/node_modules/@playdrop/boxel-core/dist/src/transforms/voxels/textured-to-voxel.d.ts +2 -2
  268. package/node_modules/@playdrop/boxel-core/dist/src/transforms/voxels/textured-to-voxel.js +23 -28
  269. package/node_modules/@playdrop/boxel-core/dist/src/transforms/voxels/textured-to-voxel.js.map +1 -1
  270. package/node_modules/@playdrop/boxel-core/dist/src/types.d.ts +8 -8
  271. package/node_modules/@playdrop/boxel-core/dist/src/validation.d.ts +1 -1
  272. package/node_modules/@playdrop/boxel-core/dist/src/validation.js +93 -95
  273. package/node_modules/@playdrop/boxel-core/dist/src/validation.js.map +1 -1
  274. package/node_modules/@playdrop/boxel-core/dist/src/voxels/greedy-mesher.d.ts +1 -1
  275. package/node_modules/@playdrop/boxel-core/dist/src/voxels/greedy-mesher.js +2 -2
  276. package/node_modules/@playdrop/boxel-core/dist/src/voxels/greedy-mesher.js.map +1 -1
  277. package/node_modules/@playdrop/boxel-core/dist/src/voxels.d.ts +1 -1
  278. package/node_modules/@playdrop/boxel-core/dist/src/voxels.js +2 -7
  279. package/node_modules/@playdrop/boxel-core/dist/src/voxels.js.map +1 -1
  280. package/node_modules/@playdrop/boxel-three/dist/src/animations.d.ts +3 -3
  281. package/node_modules/@playdrop/boxel-three/dist/src/builders.d.ts +4 -4
  282. package/node_modules/@playdrop/boxel-three/dist/src/context.d.ts +3 -3
  283. package/node_modules/@playdrop/boxel-three/dist/src/exporters/glb.d.ts +6 -6
  284. package/node_modules/@playdrop/boxel-three/dist/src/exporters/glb.js +9 -1
  285. package/node_modules/@playdrop/boxel-three/dist/src/exporters/image.d.ts +3 -3
  286. package/node_modules/@playdrop/boxel-three/dist/src/index.d.ts +17 -17
  287. package/node_modules/@playdrop/boxel-three/dist/src/instantiate.d.ts +9 -9
  288. package/node_modules/@playdrop/boxel-three/dist/src/nodes.d.ts +3 -3
  289. package/node_modules/@playdrop/boxel-three/dist/src/nodes.js +1 -1
  290. package/node_modules/@playdrop/boxel-three/dist/src/overlays.d.ts +2 -2
  291. package/node_modules/@playdrop/boxel-three/dist/src/primitives.d.ts +1 -1
  292. package/node_modules/@playdrop/boxel-three/dist/src/scene.d.ts +1 -1
  293. package/node_modules/@playdrop/boxel-three/dist/src/skinned-mesh.d.ts +2 -2
  294. package/node_modules/@playdrop/boxel-three/dist/src/texture-atlas.d.ts +1 -1
  295. package/node_modules/@playdrop/boxel-three/dist/src/textures.d.ts +3 -3
  296. package/node_modules/@playdrop/boxel-three/dist/src/types.d.ts +4 -4
  297. package/node_modules/@playdrop/boxel-three/dist/src/voxels/faces.d.ts +2 -2
  298. package/node_modules/@playdrop/boxel-three/dist/src/voxels/mesher.d.ts +1 -1
  299. package/node_modules/@playdrop/boxel-three/dist/test/fixtures/render-worker.d.ts +1 -1
  300. package/node_modules/@playdrop/config/client-meta.json +4 -4
  301. package/node_modules/@playdrop/config/dist/src/client-meta.d.ts +1 -1
  302. package/node_modules/@playdrop/config/dist/src/client-meta.d.ts.map +1 -1
  303. package/node_modules/@playdrop/config/dist/src/client-meta.js +10 -10
  304. package/node_modules/@playdrop/config/dist/src/constants.js +10 -10
  305. package/node_modules/@playdrop/config/dist/src/creator-plans.d.ts +1 -1
  306. package/node_modules/@playdrop/config/dist/src/creator-plans.d.ts.map +1 -1
  307. package/node_modules/@playdrop/config/dist/src/creator-plans.js +27 -28
  308. package/node_modules/@playdrop/config/dist/src/deployment.d.ts +4 -4
  309. package/node_modules/@playdrop/config/dist/src/deployment.d.ts.map +1 -1
  310. package/node_modules/@playdrop/config/dist/src/deployment.js +42 -41
  311. package/node_modules/@playdrop/config/dist/src/game-arena.js +12 -12
  312. package/node_modules/@playdrop/config/dist/src/index.d.ts +9 -9
  313. package/node_modules/@playdrop/config/dist/src/index.d.ts.map +1 -1
  314. package/node_modules/@playdrop/config/dist/src/index.js +24 -25
  315. package/node_modules/@playdrop/config/dist/src/public-deployment.d.ts +4 -4
  316. package/node_modules/@playdrop/config/dist/src/public-deployment.d.ts.map +1 -1
  317. package/node_modules/@playdrop/config/dist/src/public-deployment.js +41 -39
  318. package/node_modules/@playdrop/config/dist/src/runtime-client-meta.js +1 -3
  319. package/node_modules/@playdrop/config/dist/src/runtime-service-origins.d.ts.map +1 -1
  320. package/node_modules/@playdrop/config/dist/src/runtime-service-origins.js +23 -25
  321. package/node_modules/@playdrop/config/dist/src/server/fastify.d.ts +5 -5
  322. package/node_modules/@playdrop/config/dist/src/server/fastify.d.ts.map +1 -1
  323. package/node_modules/@playdrop/config/dist/src/server/fastify.js +44 -46
  324. package/node_modules/@playdrop/config/dist/src/server/logging.d.ts +1 -1
  325. package/node_modules/@playdrop/config/dist/src/server/logging.d.ts.map +1 -1
  326. package/node_modules/@playdrop/config/dist/src/server/logging.js +6 -8
  327. package/node_modules/@playdrop/config/dist/src/types.d.ts +2 -2
  328. package/node_modules/@playdrop/config/dist/test/creator-plans.test.js +12 -12
  329. package/node_modules/@playdrop/config/dist/test/deployment.test.js +59 -59
  330. package/node_modules/@playdrop/config/dist/test/fastify.test.js +4 -4
  331. package/node_modules/@playdrop/config/dist/test/game-arena.test.js +8 -8
  332. package/node_modules/@playdrop/config/dist/test/logging.test.js +6 -6
  333. package/node_modules/@playdrop/config/dist/test/validateClientEnvironment.test.js +57 -57
  334. package/node_modules/@playdrop/config/dist/tsconfig.tsbuildinfo +1 -1
  335. package/node_modules/@playdrop/types/dist/agent-task-playtest.d.ts.map +1 -1
  336. package/node_modules/@playdrop/types/dist/agent-task-terminal.d.ts +2 -2
  337. package/node_modules/@playdrop/types/dist/agent-task-terminal.d.ts.map +1 -1
  338. package/node_modules/@playdrop/types/dist/api.d.ts +314 -250
  339. package/node_modules/@playdrop/types/dist/api.d.ts.map +1 -1
  340. package/node_modules/@playdrop/types/dist/api.js +40 -59
  341. package/node_modules/@playdrop/types/dist/app-capability-filters.d.ts +2 -2
  342. package/node_modules/@playdrop/types/dist/app-playtest-tape.d.ts +6 -6
  343. package/node_modules/@playdrop/types/dist/app-playtest-tape.d.ts.map +1 -1
  344. package/node_modules/@playdrop/types/dist/app-review.d.ts +2 -2
  345. package/node_modules/@playdrop/types/dist/app-review.d.ts.map +1 -1
  346. package/node_modules/@playdrop/types/dist/app-review.js +1 -6
  347. package/node_modules/@playdrop/types/dist/app.d.ts.map +1 -1
  348. package/node_modules/@playdrop/types/dist/asset-pack.d.ts +5 -5
  349. package/node_modules/@playdrop/types/dist/asset-spec.d.ts +4 -4
  350. package/node_modules/@playdrop/types/dist/asset.d.ts +11 -11
  351. package/node_modules/@playdrop/types/dist/attachment-policy.d.ts.map +1 -1
  352. package/node_modules/@playdrop/types/dist/chat.d.ts +3 -3
  353. package/node_modules/@playdrop/types/dist/creator-public-image.d.ts.map +1 -1
  354. package/node_modules/@playdrop/types/dist/graph.d.ts +4 -4
  355. package/node_modules/@playdrop/types/dist/index.d.ts +25 -25
  356. package/node_modules/@playdrop/types/dist/instrument-evidence.d.ts +2 -2
  357. package/node_modules/@playdrop/types/dist/instrument-evidence.d.ts.map +1 -1
  358. package/node_modules/@playdrop/types/dist/instrument-evidence.js +2 -11
  359. package/node_modules/@playdrop/types/dist/locale.d.ts +2 -2
  360. package/node_modules/@playdrop/types/dist/locale.d.ts.map +1 -1
  361. package/node_modules/@playdrop/types/dist/locale.js +2 -17
  362. package/node_modules/@playdrop/types/dist/owned-assets.d.ts +2 -2
  363. package/node_modules/@playdrop/types/dist/owned-assets.d.ts.map +1 -1
  364. package/node_modules/@playdrop/types/dist/player-meta.d.ts +3 -3
  365. package/node_modules/@playdrop/types/dist/player-meta.d.ts.map +1 -1
  366. package/node_modules/@playdrop/types/dist/playtest-notes.d.ts +11 -11
  367. package/node_modules/@playdrop/types/dist/playtest-notes.d.ts.map +1 -1
  368. package/node_modules/@playdrop/types/dist/playtrade.d.ts +8 -5
  369. package/node_modules/@playdrop/types/dist/playtrade.d.ts.map +1 -1
  370. package/node_modules/@playdrop/types/dist/realtime.d.ts +1 -1
  371. package/node_modules/@playdrop/types/dist/tweaks.d.ts +4 -4
  372. package/node_modules/@playdrop/types/dist/tweaks.d.ts.map +1 -1
  373. package/node_modules/@playdrop/types/dist/tweaks.js +12 -2
  374. package/node_modules/@playdrop/types/dist/version.d.ts +14 -14
  375. package/node_modules/@playdrop/types/dist/version.d.ts.map +1 -1
  376. package/node_modules/@playdrop/types/dist/version.js +4 -1
  377. package/node_modules/@playdrop/vox-three/dist/src/index.d.ts +1 -1
  378. package/node_modules/@playdrop/vox-three/dist/src/vox.d.ts +2 -2
  379. package/node_modules/@playdrop/vox-three/dist/src/vox.js +20 -18
  380. package/node_modules/@playdrop/vox-three/dist/src/vox.js.map +1 -1
  381. package/node_modules/@playdrop/vox-three/dist/test/vox.test.js +11 -14
  382. package/node_modules/@playdrop/vox-three/dist/test/vox.test.js.map +1 -1
  383. package/package.json +1 -1
@@ -6,28 +6,28 @@ const textures_1 = require("../../textures");
6
6
  const validation_1 = require("../../validation");
7
7
  const textured_to_voxel_1 = require("../voxels/textured-to-voxel");
8
8
  const merge_overlay_1 = require("./merge-overlay");
9
- const FACE_KEYS = ['north', 'south', 'east', 'west', 'top', 'bottom'];
9
+ const FACE_KEYS = ["north", "south", "east", "west", "top", "bottom"];
10
10
  const OVERLAY_PROPS = [
11
- 'northOverlay',
12
- 'southOverlay',
13
- 'eastOverlay',
14
- 'westOverlay',
15
- 'topOverlay',
16
- 'bottomOverlay',
17
- 'sidesOverlay',
18
- 'allOverlay',
11
+ "northOverlay",
12
+ "southOverlay",
13
+ "eastOverlay",
14
+ "westOverlay",
15
+ "topOverlay",
16
+ "bottomOverlay",
17
+ "sidesOverlay",
18
+ "allOverlay",
19
19
  ];
20
20
  const stripOverlay = (primitive) => {
21
21
  const target = primitive;
22
- OVERLAY_PROPS.forEach(prop => {
22
+ OVERLAY_PROPS.forEach((prop) => {
23
23
  target[prop] = undefined;
24
24
  });
25
25
  };
26
26
  const buildOverlayPrimitive = (primitive) => {
27
27
  const overlayTextures = [];
28
- FACE_KEYS.forEach(face => {
28
+ FACE_KEYS.forEach((face) => {
29
29
  const textureId = (0, textures_1.resolveOverlayFaceTextureId)(primitive, face);
30
- if (typeof textureId === 'string' && textureId.length > 0) {
30
+ if (typeof textureId === "string" && textureId.length > 0) {
31
31
  overlayTextures.push({ face, textureId });
32
32
  }
33
33
  });
@@ -36,7 +36,7 @@ const buildOverlayPrimitive = (primitive) => {
36
36
  }
37
37
  const overlay = {
38
38
  id: `${primitive.id}_overlay_source`,
39
- kind: 'textured_box',
39
+ kind: "textured_box",
40
40
  size: primitive.size ? [...primitive.size] : [1, 1, 1],
41
41
  };
42
42
  overlayTextures.forEach(({ face, textureId }) => {
@@ -44,21 +44,21 @@ const buildOverlayPrimitive = (primitive) => {
44
44
  });
45
45
  return overlay;
46
46
  };
47
- const FACE_NAMES = ['north', 'south', 'east', 'west', 'top', 'bottom'];
48
- const hasOverlayFaces = (primitive) => FACE_NAMES.some(face => {
47
+ const FACE_NAMES = ["north", "south", "east", "west", "top", "bottom"];
48
+ const hasOverlayFaces = (primitive) => FACE_NAMES.some((face) => {
49
49
  const value = primitive[face];
50
- return typeof value === 'string' && value.length > 0;
50
+ return typeof value === "string" && value.length > 0;
51
51
  });
52
52
  const convertPrimitiveToVoxel = (entity, primitive, mode) => {
53
- const textureLookup = new Map(entity.textures.map(entry => [entry.id, entry]));
54
- const patternLookup = new Map(entity.patterns.map(entry => [entry.id, entry]));
55
- const materialLookup = new Map(entity.materials.map(entry => [entry.id, entry]));
53
+ const textureLookup = new Map(entity.textures.map((entry) => [entry.id, entry]));
54
+ const patternLookup = new Map(entity.patterns.map((entry) => [entry.id, entry]));
55
+ const materialLookup = new Map(entity.materials.map((entry) => [entry.id, entry]));
56
56
  let overlayPrimitive = buildOverlayPrimitive(primitive);
57
- if (overlayPrimitive && primitive.id === 'torso_primitive') {
57
+ if (overlayPrimitive && primitive.id === "torso_primitive") {
58
58
  overlayPrimitive.top = undefined;
59
59
  overlayPrimitive.bottom = undefined;
60
60
  if (Array.isArray(overlayPrimitive.size) && overlayPrimitive.size.length >= 3) {
61
- overlayPrimitive.size = overlayPrimitive.size.map(value => Math.max(1, Math.round(value ?? 1) - 2));
61
+ overlayPrimitive.size = overlayPrimitive.size.map((value) => Math.max(1, Math.round(value ?? 1) - 2));
62
62
  }
63
63
  if (!hasOverlayFaces(overlayPrimitive)) {
64
64
  overlayPrimitive = undefined;
@@ -75,30 +75,30 @@ const convertPrimitiveToVoxel = (entity, primitive, mode) => {
75
75
  });
76
76
  };
77
77
  const transformPrimitiveLayer = (entity, primitive, mode, voxelMode) => {
78
- if (primitive.kind !== 'textured_box') {
78
+ if (primitive.kind !== "textured_box") {
79
79
  return primitive;
80
80
  }
81
81
  const textured = primitive;
82
- if (mode === 'overlay') {
82
+ if (mode === "overlay") {
83
83
  return textured;
84
84
  }
85
- if (mode === 'base_only') {
85
+ if (mode === "base_only") {
86
86
  stripOverlay(textured);
87
87
  return textured;
88
88
  }
89
- if (mode === 'flat') {
89
+ if (mode === "flat") {
90
90
  (0, merge_overlay_1.mergeOverlayIntoBase)(entity, textured);
91
91
  stripOverlay(textured);
92
92
  textured.renderMode = (0, textures_1.determineTexturedBoxRenderMode)(entity, textured);
93
93
  return textured;
94
94
  }
95
- if (mode === 'voxel') {
95
+ if (mode === "voxel") {
96
96
  return convertPrimitiveToVoxel(entity, textured, voxelMode);
97
97
  }
98
98
  return textured;
99
99
  };
100
100
  const stripPrimitiveRenderMode = (primitive) => {
101
- if (primitive.kind === 'textured_box' && primitive.renderMode === 'cutout') {
101
+ if (primitive.kind === "textured_box" && primitive.renderMode === "cutout") {
102
102
  primitive.renderMode = undefined;
103
103
  }
104
104
  };
@@ -107,7 +107,7 @@ const enforceOpaqueMaterials = (materials, fillColor, stripAlpha) => {
107
107
  return;
108
108
  }
109
109
  const [fillR, fillG, fillB] = fillColor;
110
- materials.forEach(material => {
110
+ materials.forEach((material) => {
111
111
  const opacity = material.opacity ?? 1;
112
112
  if (opacity <= 0) {
113
113
  material.baseColor = [fillR, fillG, fillB];
@@ -118,16 +118,16 @@ const enforceOpaqueMaterials = (materials, fillColor, stripAlpha) => {
118
118
  });
119
119
  };
120
120
  function applyLayerMode(entity, mode, options) {
121
- if (mode === 'overlay') {
121
+ if (mode === "overlay") {
122
122
  return entity;
123
123
  }
124
- const opts = typeof options === 'string' ? { voxelMode: options } : options ?? {};
125
- const voxelMode = opts.voxelMode ?? 'outer_wrap';
124
+ const opts = typeof options === "string" ? { voxelMode: options } : (options ?? {});
125
+ const voxelMode = opts.voxelMode ?? "outer_wrap";
126
126
  const stripAlpha = opts.stripAlpha ?? false;
127
127
  const fillColor = opts.transparentFillColor ?? [0, 0, 0];
128
128
  const transformed = (0, entity_utils_1.cloneEntity)(entity);
129
129
  const primitives = [];
130
- transformed.primitives.forEach(primitive => {
130
+ transformed.primitives.forEach((primitive) => {
131
131
  const result = transformPrimitiveLayer(transformed, primitive, mode, voxelMode);
132
132
  if (Array.isArray(result)) {
133
133
  primitives.push(...result);
@@ -136,7 +136,7 @@ function applyLayerMode(entity, mode, options) {
136
136
  primitives.push(result);
137
137
  }
138
138
  });
139
- if (mode === 'flat' && stripAlpha) {
139
+ if (mode === "flat" && stripAlpha) {
140
140
  primitives.forEach(stripPrimitiveRenderMode);
141
141
  enforceOpaqueMaterials(transformed.materials, fillColor, stripAlpha);
142
142
  }
@@ -145,8 +145,8 @@ function applyLayerMode(entity, mode, options) {
145
145
  if (issues.length > 0) {
146
146
  const summary = issues
147
147
  .slice(0, 3)
148
- .map(issue => `${issue.path}: ${issue.message}`)
149
- .join('; ');
148
+ .map((issue) => `${issue.path}: ${issue.message}`)
149
+ .join("; ");
150
150
  throw new Error(`Layer transformation produced invalid entity — ${summary}`);
151
151
  }
152
152
  return transformed;
@@ -1 +1 @@
1
- {"version":3,"file":"layer-mode.js","sourceRoot":"","sources":["../../../../src/transforms/textured-boxes/layer-mode.ts"],"names":[],"mappings":";;AAwKA,wCA4CC;AApND,qDAAiD;AACjD,6CAA6F;AAS7F,iDAAiD;AACjD,mEAAiG;AACjG,mDAAuD;AAYvD,MAAM,SAAS,GAAc,CAAC,OAAO,EAAE,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,KAAK,EAAE,QAAQ,CAAC,CAAC;AACjF,MAAM,aAAa,GAA6B;IAC9C,cAAc;IACd,cAAc;IACd,aAAa;IACb,aAAa;IACb,YAAY;IACZ,eAAe;IACf,cAAc;IACd,YAAY;CACb,CAAC;AAEF,MAAM,YAAY,GAAG,CAAC,SAAsB,EAAQ,EAAE;IACpD,MAAM,MAAM,GAAG,SAA0D,CAAC;IAC1E,aAAa,CAAC,OAAO,CAAC,IAAI,CAAC,EAAE;QAC3B,MAAM,CAAC,IAAc,CAAC,GAAG,SAAS,CAAC;IACrC,CAAC,CAAC,CAAC;AACL,CAAC,CAAC;AAEF,MAAM,qBAAqB,GAAG,CAAC,SAAsB,EAA2B,EAAE;IAChF,MAAM,eAAe,GAAgD,EAAE,CAAC;IACxE,SAAS,CAAC,OAAO,CAAC,IAAI,CAAC,EAAE;QACvB,MAAM,SAAS,GAAG,IAAA,sCAA2B,EAAC,SAAS,EAAE,IAAI,CAAC,CAAC;QAC/D,IAAI,OAAO,SAAS,KAAK,QAAQ,IAAI,SAAS,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;YAC1D,eAAe,CAAC,IAAI,CAAC,EAAE,IAAI,EAAE,SAAS,EAAE,CAAC,CAAC;QAC5C,CAAC;IACH,CAAC,CAAC,CAAC;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,OAAO,EAAE,CAAC;aACjD,IAAI,CAAC,IAAI,CAAC,CAAC;QACd,MAAM,IAAI,KAAK,CAAC,kDAAkD,OAAO,EAAE,CAAC,CAAC;IAC/E,CAAC;IAED,OAAO,WAAW,CAAC;AACrB,CAAC"}
@@ -1,2 +1,2 @@
1
- import type { BoxelDefinition, TexturedBox } from '../../types';
1
+ import type { BoxelDefinition, TexturedBox } from "../../types";
2
2
  export declare function mergeOverlayIntoBase(entity: BoxelDefinition, primitive: TexturedBox): void;
@@ -2,20 +2,20 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.mergeOverlayIntoBase = mergeOverlayIntoBase;
4
4
  const textures_1 = require("../../textures");
5
- const FACE_NAMES = ['north', 'south', 'east', 'west', 'top', 'bottom'];
5
+ const FACE_NAMES = ["north", "south", "east", "west", "top", "bottom"];
6
6
  const getFaceTexture = (primitive, face) => {
7
7
  switch (face) {
8
- case 'north':
8
+ case "north":
9
9
  return primitive.north;
10
- case 'south':
10
+ case "south":
11
11
  return primitive.south;
12
- case 'east':
12
+ case "east":
13
13
  return primitive.east;
14
- case 'west':
14
+ case "west":
15
15
  return primitive.west;
16
- case 'top':
16
+ case "top":
17
17
  return primitive.top;
18
- case 'bottom':
18
+ case "bottom":
19
19
  return primitive.bottom;
20
20
  default:
21
21
  return undefined;
@@ -23,22 +23,22 @@ const getFaceTexture = (primitive, face) => {
23
23
  };
24
24
  const setFaceTexture = (primitive, face, textureId) => {
25
25
  switch (face) {
26
- case 'north':
26
+ case "north":
27
27
  primitive.north = textureId;
28
28
  break;
29
- case 'south':
29
+ case "south":
30
30
  primitive.south = textureId;
31
31
  break;
32
- case 'east':
32
+ case "east":
33
33
  primitive.east = textureId;
34
34
  break;
35
- case 'west':
35
+ case "west":
36
36
  primitive.west = textureId;
37
37
  break;
38
- case 'top':
38
+ case "top":
39
39
  primitive.top = textureId;
40
40
  break;
41
- case 'bottom':
41
+ case "bottom":
42
42
  primitive.bottom = textureId;
43
43
  break;
44
44
  default:
@@ -46,10 +46,10 @@ const setFaceTexture = (primitive, face, textureId) => {
46
46
  }
47
47
  };
48
48
  function mergeOverlayIntoBase(entity, primitive) {
49
- const textureLookup = new Map(entity.textures.map(entry => [entry.id, entry]));
50
- const patternLookup = new Map(entity.patterns.map(entry => [entry.id, entry]));
51
- const materialLookup = new Map(entity.materials.map(entry => [entry.id, entry]));
52
- FACE_NAMES.forEach(face => {
49
+ const textureLookup = new Map(entity.textures.map((entry) => [entry.id, entry]));
50
+ const patternLookup = new Map(entity.patterns.map((entry) => [entry.id, entry]));
51
+ const materialLookup = new Map(entity.materials.map((entry) => [entry.id, entry]));
52
+ FACE_NAMES.forEach((face) => {
53
53
  const overlayTextureId = (0, textures_1.resolveOverlayFaceTextureId)(primitive, face);
54
54
  if (!overlayTextureId) {
55
55
  return;
@@ -100,7 +100,7 @@ function mergeOverlayIntoBase(entity, primitive) {
100
100
  return undefined;
101
101
  }
102
102
  const overlayMaterial = materialLookup.get(overlayMaterialId);
103
- if (overlayMaterial && typeof overlayMaterial.opacity === 'number' && overlayMaterial.opacity <= 0) {
103
+ if (overlayMaterial && typeof overlayMaterial.opacity === "number" && overlayMaterial.opacity <= 0) {
104
104
  return undefined;
105
105
  }
106
106
  const mapped = ensureMaterialIndex(overlayMaterialId);
@@ -1 +1 @@
1
- {"version":3,"file":"merge-overlay.js","sourceRoot":"","sources":["../../../../src/transforms/textured-boxes/merge-overlay.ts"],"names":[],"mappings":";;AAkDA,oDAiFC;AAnID,6CAAmF;AAInF,MAAM,UAAU,GAAe,CAAC,OAAO,EAAE,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,KAAK,EAAE,QAAQ,CAAC,CAAC;AAEnF,MAAM,cAAc,GAAG,CAAC,SAAsB,EAAE,IAAc,EAAsB,EAAE;IACpF,QAAQ,IAAI,EAAE,CAAC;QACb,KAAK,OAAO;YACV,OAAO,SAAS,CAAC,KAAK,CAAC;QACzB,KAAK,OAAO;YACV,OAAO,SAAS,C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AAE;YAClF,IAAI,YAAY,KAAK,SAAS,EAAE,CAAC;gBAC/B,OAAO,SAAS,CAAC;YACnB,CAAC;YACD,MAAM,iBAAiB,GAAG,cAAc,CAAC,SAAS,CAAC,YAAY,CAAC,CAAC;YACjE,IAAI,CAAC,iBAAiB,EAAE,CAAC;gBACvB,OAAO,SAAS,CAAC;YACnB,CAAC;YACD,MAAM,eAAe,GAAG,cAAc,CAAC,GAAG,CAAC,iBAAiB,CAAC,CAAC;YAC9D,IAAI,eAAe,IAAI,OAAO,eAAe,CAAC,OAAO,KAAK,QAAQ,IAAI,eAAe,CAAC,OAAO,IAAI,CAAC,EAAE,CAAC;gBACnG,OAAO,SAAS,CAAC;YACnB,CAAC;YACD,MAAM,MAAM,GAAG,mBAAmB,CAAC,iBAAiB,CAAC,CAAC;YACtD,OAAO,MAAM,CAAC;QAChB,CAAC,CAAC;QAEF,MAAM,QAAQ,GAAG,QAAQ,CAAC,GAAG,CAAC,CAAC,KAAK,EAAE,KAAK,EAAE,EAAE;YAC7C,MAAM,YAAY,GAAG,WAAW,CAAC,KAAK,CAAC,CAAC;YACxC,MAAM,WAAW,GAAG,kBAAkB,CAAC,YAAY,CAAC,CAAC;YACrD,IAAI,WAAW,KAAK,SAAS,EAAE,CAAC;gBAC9B,OAAO,KAAK,CAAC;YACf,CAAC;YACD,OAAO,WAAW,CAAC;QACrB,CAAC,CAAC,CAAC;QAEH,WAAW,CAAC,IAAI,GAAG,QAAQ,CAAC;QAC5B,WAAW,CAAC,IAAI,GAAG,CAAC,GAAG,cAAc,CAAC,IAAI,CAAC,CAAC;IAC9C,CAAC,CAAC,CAAC;AACL,CAAC"}
@@ -1,6 +1,6 @@
1
- import type { BoxelDefinition } from '../../types';
2
- import type { SplitAxis } from '../voxels/slice';
3
- export type CrossFillMode = 'empty' | 'solid' | 'solid-edge';
1
+ import type { BoxelDefinition } from "../../types";
2
+ import type { SplitAxis } from "../voxels/slice";
3
+ export type CrossFillMode = "empty" | "solid" | "solid-edge";
4
4
  export interface CrossFillOptions {
5
5
  mode: CrossFillMode;
6
6
  color?: [number, number, number] | undefined;
@@ -5,26 +5,26 @@ const textures_1 = require("../../textures");
5
5
  const validation_1 = require("../../validation");
6
6
  const infer_face_1 = require("./infer-face");
7
7
  const FACE_DIMENSIONS = {
8
- north: { widthAxis: 'x', heightAxis: 'y' },
9
- south: { widthAxis: 'x', heightAxis: 'y' },
10
- east: { widthAxis: 'z', heightAxis: 'y' },
11
- west: { widthAxis: 'z', heightAxis: 'y' },
12
- top: { widthAxis: 'x', heightAxis: 'z' },
13
- bottom: { widthAxis: 'x', heightAxis: 'z' },
8
+ north: { widthAxis: "x", heightAxis: "y" },
9
+ south: { widthAxis: "x", heightAxis: "y" },
10
+ east: { widthAxis: "z", heightAxis: "y" },
11
+ west: { widthAxis: "z", heightAxis: "y" },
12
+ top: { widthAxis: "x", heightAxis: "z" },
13
+ bottom: { widthAxis: "x", heightAxis: "z" },
14
14
  };
15
- const FACE_POSITIVE = { x: 'east', y: 'top', z: 'north' };
16
- const FACE_NEGATIVE = { x: 'west', y: 'bottom', z: 'south' };
15
+ const FACE_POSITIVE = { x: "east", y: "top", z: "north" };
16
+ const FACE_NEGATIVE = { x: "west", y: "bottom", z: "south" };
17
17
  const FACE_WIDTH_FLIP = { south: true };
18
18
  const overlayProps = {
19
- north: 'northOverlay',
20
- south: 'southOverlay',
21
- east: 'eastOverlay',
22
- west: 'westOverlay',
23
- top: 'topOverlay',
24
- bottom: 'bottomOverlay',
19
+ north: "northOverlay",
20
+ south: "southOverlay",
21
+ east: "eastOverlay",
22
+ west: "westOverlay",
23
+ top: "topOverlay",
24
+ bottom: "bottomOverlay",
25
25
  };
26
26
  const clearOverlayFallbacks = (primitive) => {
27
- ['sidesOverlay', 'allOverlay'].forEach(prop => {
27
+ ["sidesOverlay", "allOverlay"].forEach((prop) => {
28
28
  if (primitive[prop] !== undefined) {
29
29
  primitive[prop] = undefined;
30
30
  }
@@ -51,7 +51,7 @@ const gridFromPattern = (pattern) => {
51
51
  };
52
52
  const patternFromGrid = (id, grid) => {
53
53
  const height = grid.length;
54
- const width = height > 0 ? grid[0]?.length ?? 0 : 0;
54
+ const width = height > 0 ? (grid[0]?.length ?? 0) : 0;
55
55
  const data = [];
56
56
  for (let y = 0; y < height; y += 1) {
57
57
  for (let x = 0; x < width; x += 1) {
@@ -75,7 +75,7 @@ const cloneTexture = (texture) => ({
75
75
  materials: texture.materials.slice(),
76
76
  });
77
77
  const ensureMaterial = (entity, color, alpha) => {
78
- const existing = entity.materials.find(material => material.baseColor?.[0] === color[0] &&
78
+ const existing = entity.materials.find((material) => material.baseColor?.[0] === color[0] &&
79
79
  material.baseColor?.[1] === color[1] &&
80
80
  material.baseColor?.[2] === color[2] &&
81
81
  (material.opacity ?? 1) === alpha);
@@ -104,7 +104,7 @@ const addPatternTexture = (entity, baseId, grid, materials) => {
104
104
  return texture;
105
105
  };
106
106
  const findMaterialColor = (entity, materialId) => {
107
- const material = entity.materials.find(entry => entry.id === materialId);
107
+ const material = entity.materials.find((entry) => entry.id === materialId);
108
108
  const base = Array.isArray(material?.baseColor) ? material.baseColor : [255, 255, 255];
109
109
  const color = [
110
110
  Math.max(0, Math.min(255, Math.round(base[0] ?? 255))),
@@ -117,13 +117,13 @@ const findMaterialColor = (entity, materialId) => {
117
117
  const deriveSeamFill = (entity, primitive, face) => {
118
118
  const textureId = (0, textures_1.resolveFaceTextureId)(primitive, face);
119
119
  if (!textureId) {
120
- return { mode: 'solid', color: [255, 255, 255], alpha: 1 };
120
+ return { mode: "solid", color: [255, 255, 255], alpha: 1 };
121
121
  }
122
- const texture = entity.textures.find(entry => entry.id === textureId);
122
+ const texture = entity.textures.find((entry) => entry.id === textureId);
123
123
  if (!texture) {
124
- return { mode: 'solid', color: [255, 255, 255], alpha: 1 };
124
+ return { mode: "solid", color: [255, 255, 255], alpha: 1 };
125
125
  }
126
- const pattern = entity.patterns.find(entry => entry.id === texture.pattern);
126
+ const pattern = entity.patterns.find((entry) => entry.id === texture.pattern);
127
127
  let materialId;
128
128
  if (pattern && Array.isArray(pattern.data) && Array.isArray(texture.materials)) {
129
129
  for (const value of pattern.data) {
@@ -141,26 +141,26 @@ const deriveSeamFill = (entity, primitive, face) => {
141
141
  materialId = texture.materials[0];
142
142
  }
143
143
  const { color, alpha } = findMaterialColor(entity, materialId);
144
- return { mode: 'solid', color, alpha };
144
+ return { mode: "solid", color, alpha };
145
145
  };
146
146
  const setFaceTexture = (primitive, face, textureId) => {
147
147
  switch (face) {
148
- case 'north':
148
+ case "north":
149
149
  primitive.north = textureId;
150
150
  break;
151
- case 'south':
151
+ case "south":
152
152
  primitive.south = textureId;
153
153
  break;
154
- case 'east':
154
+ case "east":
155
155
  primitive.east = textureId;
156
156
  break;
157
- case 'west':
157
+ case "west":
158
158
  primitive.west = textureId;
159
159
  break;
160
- case 'top':
160
+ case "top":
161
161
  primitive.top = textureId;
162
162
  break;
163
- case 'bottom':
163
+ case "bottom":
164
164
  primitive.bottom = textureId;
165
165
  break;
166
166
  default:
@@ -181,8 +181,10 @@ const splitFaceTextures = (entity, partA, partB, original, face, axis, plane) =>
181
181
  setFaceTexture(partB, face, undefined);
182
182
  return { partA: {}, partB: {} };
183
183
  }
184
- const originalTexture = entity.textures.find(entry => entry.id === textureId);
185
- const originalPattern = originalTexture ? entity.patterns.find(entry => entry.id === originalTexture.pattern) : undefined;
184
+ const originalTexture = entity.textures.find((entry) => entry.id === textureId);
185
+ const originalPattern = originalTexture
186
+ ? entity.patterns.find((entry) => entry.id === originalTexture.pattern)
187
+ : undefined;
186
188
  if (!originalTexture || !originalPattern) {
187
189
  setFaceTexture(partA, face, textureId);
188
190
  setFaceTexture(partB, face, textureId);
@@ -201,8 +203,8 @@ const splitFaceTextures = (entity, partA, partB, original, face, axis, plane) =>
201
203
  if (widthAxis === axis) {
202
204
  const splitPixels = Math.max(1, Math.min(widthPixels - 1, Math.round((plane / dimension) * widthPixels)));
203
205
  const flip = FACE_WIDTH_FLIP[face] ?? false;
204
- const negativeGrid = grid.map(row => flip ? row.slice(widthPixels - splitPixels) : row.slice(0, splitPixels));
205
- const positiveGrid = grid.map(row => flip ? row.slice(0, widthPixels - splitPixels) : row.slice(splitPixels));
206
+ const negativeGrid = grid.map((row) => (flip ? row.slice(widthPixels - splitPixels) : row.slice(0, splitPixels)));
207
+ const positiveGrid = grid.map((row) => (flip ? row.slice(0, widthPixels - splitPixels) : row.slice(splitPixels)));
206
208
  const negativeTexture = addPatternTexture(entity, `${texture.id}_${face}_negative`, negativeGrid, texture.materials);
207
209
  const positiveTexture = addPatternTexture(entity, `${texture.id}_${face}_positive`, positiveGrid, texture.materials);
208
210
  setFaceTexture(partA, face, negativeTexture.id);
@@ -236,8 +238,8 @@ const splitOverlayTextures = (entity, partA, partB, original, face, axis, plane)
236
238
  setOverlayTexture(partB, face, undefined);
237
239
  return;
238
240
  }
239
- const texture = entity.textures.find(entry => entry.id === overlayId);
240
- const pattern = texture ? entity.patterns.find(entry => entry.id === texture.pattern) : undefined;
241
+ const texture = entity.textures.find((entry) => entry.id === overlayId);
242
+ const pattern = texture ? entity.patterns.find((entry) => entry.id === texture.pattern) : undefined;
241
243
  if (!texture || !pattern) {
242
244
  setOverlayTexture(partA, face, overlayId);
243
245
  setOverlayTexture(partB, face, overlayId);
@@ -250,8 +252,8 @@ const splitOverlayTextures = (entity, partA, partB, original, face, axis, plane)
250
252
  const width = Math.max(1, grid[0]?.length ?? 1);
251
253
  const splitPixels = Math.max(1, Math.min(width - 1, Math.round((plane / dimension) * width)));
252
254
  const flip = FACE_WIDTH_FLIP[face] ?? false;
253
- const negativeGrid = grid.map(row => flip ? row.slice(width - splitPixels) : row.slice(0, splitPixels));
254
- const positiveGrid = grid.map(row => flip ? row.slice(0, width - splitPixels) : row.slice(splitPixels));
255
+ const negativeGrid = grid.map((row) => (flip ? row.slice(width - splitPixels) : row.slice(0, splitPixels)));
256
+ const positiveGrid = grid.map((row) => (flip ? row.slice(0, width - splitPixels) : row.slice(splitPixels)));
255
257
  const negativeTexture = addPatternTexture(entity, `${texture.id}_${face}_ov_negative`, negativeGrid, texture.materials);
256
258
  const positiveTexture = addPatternTexture(entity, `${texture.id}_${face}_ov_positive`, positiveGrid, texture.materials);
257
259
  setOverlayTexture(partA, face, negativeTexture.id);
@@ -273,7 +275,7 @@ const splitOverlayTextures = (entity, partA, partB, original, face, axis, plane)
273
275
  setOverlayTexture(partB, face, overlayId);
274
276
  };
275
277
  const applyCrossFill = (entity, part, face, fill) => {
276
- if (fill.mode === 'empty') {
278
+ if (fill.mode === "empty") {
277
279
  setFaceTexture(part, face, undefined);
278
280
  return;
279
281
  }
@@ -284,7 +286,7 @@ const applyCrossFill = (entity, part, face, fill) => {
284
286
  const width = Math.max(1, Math.round(toNumber(part.size?.[axisIndex[dims.widthAxis]])));
285
287
  const height = Math.max(1, Math.round(toNumber(part.size?.[axisIndex[dims.heightAxis]])));
286
288
  const grid = new Array(height).fill(null).map(() => new Array(width).fill(0));
287
- if (fill.mode === 'solid-edge') {
289
+ if (fill.mode === "solid-edge") {
288
290
  grid.forEach((row, y) => {
289
291
  row[0] = 0;
290
292
  row[row.length - 1] = 0;
@@ -297,7 +299,7 @@ const applyCrossFill = (entity, part, face, fill) => {
297
299
  setFaceTexture(part, face, texture.id);
298
300
  };
299
301
  const applyOverlayCrossFill = (entity, part, face, fill) => {
300
- if (fill.mode === 'empty') {
302
+ if (fill.mode === "empty") {
301
303
  setOverlayTexture(part, face, undefined);
302
304
  return;
303
305
  }
@@ -312,12 +314,12 @@ const applyOverlayCrossFill = (entity, part, face, fill) => {
312
314
  setOverlayTexture(part, face, texture.id);
313
315
  };
314
316
  function splitTexturedBox(entity, primitiveId, options) {
315
- const index = entity.primitives.findIndex(primitive => primitive.id === primitiveId);
317
+ const index = entity.primitives.findIndex((primitive) => primitive.id === primitiveId);
316
318
  if (index === -1) {
317
319
  throw new Error(`Textured primitive ${primitiveId} not found`);
318
320
  }
319
321
  const primitive = entity.primitives[index];
320
- if (primitive.kind !== 'textured_box') {
322
+ if (primitive.kind !== "textured_box") {
321
323
  throw new Error(`Primitive ${primitiveId} is not a textured box`);
322
324
  }
323
325
  const axis = options.axis;
@@ -327,7 +329,7 @@ function splitTexturedBox(entity, primitiveId, options) {
327
329
  if (plane <= 0 || plane >= extent) {
328
330
  throw new Error(`Split plane ${plane} must be within (0, ${extent}) for axis ${axis}`);
329
331
  }
330
- const baseFill = options.fill ?? { mode: 'empty' };
332
+ const baseFill = options.fill ?? { mode: "empty" };
331
333
  const overlayFill = options.overlayFill ?? baseFill;
332
334
  const partA = { ...primitive, id: `${primitive.id}_part_a` };
333
335
  const partB = { ...primitive, id: `${primitive.id}_part_b` };
@@ -335,7 +337,7 @@ function splitTexturedBox(entity, primitiveId, options) {
335
337
  partB.size = [...primitive.size];
336
338
  partA.size[axisIdx] = plane;
337
339
  partB.size[axisIdx] = extent - plane;
338
- ['north', 'south', 'east', 'west', 'top', 'bottom'].forEach(face => {
340
+ ["north", "south", "east", "west", "top", "bottom"].forEach((face) => {
339
341
  splitFaceTextures(entity, partA, partB, primitive, face, axis, plane);
340
342
  splitOverlayTextures(entity, partA, partB, primitive, face, axis, plane);
341
343
  });
@@ -351,7 +353,7 @@ function splitTexturedBox(entity, primitiveId, options) {
351
353
  setFaceTexture(partA, positiveFace, seamNegativeTexture);
352
354
  }
353
355
  else {
354
- const positiveFill = baseFill.mode === 'empty' ? deriveSeamFill(entity, primitive, positiveFace) : baseFill;
356
+ const positiveFill = baseFill.mode === "empty" ? deriveSeamFill(entity, primitive, positiveFace) : baseFill;
355
357
  applyCrossFill(entity, partA, positiveFace, positiveFill);
356
358
  }
357
359
  const seamPositiveTexture = (0, infer_face_1.buildFaceFromNeighbors)({
@@ -364,7 +366,7 @@ function splitTexturedBox(entity, primitiveId, options) {
364
366
  setFaceTexture(partB, negativeFace, seamPositiveTexture);
365
367
  }
366
368
  else {
367
- const negativeFill = baseFill.mode === 'empty' ? deriveSeamFill(entity, primitive, negativeFace) : baseFill;
369
+ const negativeFill = baseFill.mode === "empty" ? deriveSeamFill(entity, primitive, negativeFace) : baseFill;
368
370
  applyCrossFill(entity, partB, negativeFace, negativeFill);
369
371
  }
370
372
  applyOverlayCrossFill(entity, partA, positiveFace, overlayFill);
@@ -378,8 +380,8 @@ function splitTexturedBox(entity, primitiveId, options) {
378
380
  if (issues.length > 0) {
379
381
  const summary = issues
380
382
  .slice(0, 3)
381
- .map(issue => `${issue.path}: ${issue.message}`)
382
- .join('; ');
383
+ .map((issue) => `${issue.path}: ${issue.message}`)
384
+ .join("; ");
383
385
  throw new Error(`Split textured box produced invalid entity — ${summary}`);
384
386
  }
385
387
  return { firstId: partA.id, secondId: partB.id, negativeId, positiveId };