topotopo 0.4.0 → 0.5.0

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 (336) hide show
  1. package/NOTICE +10 -10
  2. package/README.md +460 -117
  3. package/dist/cli.js +323 -146
  4. package/dist/config.d.ts +48 -0
  5. package/dist/config.js +170 -0
  6. package/dist/core/bake.d.ts +14 -3
  7. package/dist/core/bake.js +153 -4
  8. package/dist/core/bevel.d.ts +3 -1
  9. package/dist/core/bevel.js +76 -3
  10. package/dist/core/decimate.d.ts +65 -0
  11. package/dist/core/decimate.js +409 -3
  12. package/dist/core/erosion.d.ts +37 -0
  13. package/dist/core/erosion.js +41 -1
  14. package/dist/core/geometry.d.ts +5 -1
  15. package/dist/core/geometry.js +203 -3
  16. package/dist/core/heightfield.d.ts +27 -4
  17. package/dist/core/heightfield.js +54 -16
  18. package/dist/core/intrinsics.d.ts +7 -0
  19. package/dist/core/intrinsics.js +94 -0
  20. package/dist/core/manifold.d.ts +12 -1
  21. package/dist/core/manifold.js +78 -6
  22. package/dist/core/materials.d.ts +7 -0
  23. package/dist/core/materials.js +45 -0
  24. package/dist/core/noise.d.ts +9 -0
  25. package/dist/core/noise.js +10 -1
  26. package/dist/core/polymerge.d.ts +21 -0
  27. package/dist/core/polymerge.js +327 -0
  28. package/dist/core/repair.d.ts +2 -0
  29. package/dist/core/repair.js +2 -0
  30. package/dist/core/report.d.ts +70 -0
  31. package/dist/core/report.js +275 -0
  32. package/dist/core/scene.js +2 -1
  33. package/dist/core/sha256.d.ts +4 -0
  34. package/dist/core/sha256.js +69 -0
  35. package/dist/core/shapes.d.ts +3 -0
  36. package/dist/core/shapes.js +34 -0
  37. package/dist/core/snippet-lib.d.ts +14 -1
  38. package/dist/core/snippet-lib.js +39 -13
  39. package/dist/core/tangents.d.ts +2 -0
  40. package/dist/core/tangents.js +5 -1
  41. package/dist/core/texnoise.d.ts +6 -1
  42. package/dist/core/texnoise.js +6 -2
  43. package/dist/core/texsdf.d.ts +131 -0
  44. package/dist/core/texsdf.js +637 -0
  45. package/dist/core/texture.d.ts +163 -9
  46. package/dist/core/texture.js +844 -20
  47. package/dist/core/topology.d.ts +10 -0
  48. package/dist/core/topology.js +168 -0
  49. package/dist/core/unwrap.d.ts +72 -0
  50. package/dist/core/unwrap.js +800 -0
  51. package/dist/core/usercode.d.ts +27 -0
  52. package/dist/core/usercode.js +87 -0
  53. package/dist/core/uv.d.ts +4 -18
  54. package/dist/core/uv.js +35 -188
  55. package/dist/core/uvislands.d.ts +62 -0
  56. package/dist/core/uvislands.js +574 -0
  57. package/dist/core/uvoverlap.d.ts +58 -0
  58. package/dist/core/uvoverlap.js +220 -0
  59. package/dist/core/uvpack.d.ts +64 -0
  60. package/dist/core/uvpack.js +628 -0
  61. package/dist/core/uvreport.d.ts +61 -0
  62. package/dist/core/uvreport.js +207 -143
  63. package/dist/core/wrangle.d.ts +6 -1
  64. package/dist/core/wrangle.js +27 -16
  65. package/dist/core/xatlas.d.ts +16 -1
  66. package/dist/core/xatlas.js +66 -62
  67. package/dist/engines.d.ts +63 -0
  68. package/dist/engines.js +180 -0
  69. package/dist/explain.d.ts +4 -3
  70. package/dist/explain.js +129 -12
  71. package/dist/graph/engine.d.ts +92 -29
  72. package/dist/graph/engine.js +298 -148
  73. package/dist/graph/expr.d.ts +6 -3
  74. package/dist/graph/expr.js +18 -8
  75. package/dist/graph/outputs.d.ts +23 -0
  76. package/dist/graph/outputs.js +41 -0
  77. package/dist/graph/packages.d.ts +72 -0
  78. package/dist/graph/packages.js +261 -0
  79. package/dist/graph/parallel.d.ts +3 -1
  80. package/dist/graph/parallel.js +4 -1
  81. package/dist/graph/params.d.ts +6 -0
  82. package/dist/graph/params.js +34 -7
  83. package/dist/graph/scope.d.ts +55 -0
  84. package/dist/graph/scope.js +14 -0
  85. package/dist/graph/types.d.ts +75 -12
  86. package/dist/graph/types.js +4 -2
  87. package/dist/graph/vars.d.ts +16 -0
  88. package/dist/graph/vars.js +80 -0
  89. package/dist/host/artifacts.d.ts +10 -1
  90. package/dist/host/artifacts.js +37 -6
  91. package/dist/host/cook.d.ts +241 -0
  92. package/dist/host/cook.js +844 -0
  93. package/dist/host/export-targets.d.ts +42 -5
  94. package/dist/host/export-targets.js +72 -13
  95. package/dist/host/godot-commands.d.ts +4 -0
  96. package/dist/host/godot-commands.js +21 -0
  97. package/dist/host/godot.d.ts +183 -0
  98. package/dist/host/godot.js +916 -0
  99. package/dist/host/node.d.ts +12 -7
  100. package/dist/host/node.js +27 -9
  101. package/dist/host/pool.js +51 -2
  102. package/dist/host/sidecars.d.ts +8 -0
  103. package/dist/host/sidecars.js +50 -0
  104. package/dist/host/types.d.ts +19 -6
  105. package/dist/host/version.d.ts +1 -0
  106. package/dist/host/version.js +3 -0
  107. package/dist/host/worker.js +5 -2
  108. package/dist/index.d.ts +2 -2
  109. package/dist/index.js +1 -1
  110. package/dist/inspect.d.ts +80 -2
  111. package/dist/inspect.js +265 -30
  112. package/dist/io/common.d.ts +25 -5
  113. package/dist/io/export.js +2 -1
  114. package/dist/io/files.d.ts +23 -4
  115. package/dist/io/files.js +60 -8
  116. package/dist/io/gltf.js +134 -47
  117. package/dist/io/heightmap.d.ts +3 -0
  118. package/dist/io/heightmap.js +1 -0
  119. package/dist/io/import.js +10 -0
  120. package/dist/io/inspect-scene.d.ts +55 -0
  121. package/dist/io/inspect-scene.js +155 -0
  122. package/dist/io/kinds.d.ts +81 -0
  123. package/dist/io/kinds.js +163 -0
  124. package/dist/io/points.d.ts +2 -1
  125. package/dist/io/points.js +3 -1
  126. package/dist/io/sidecars.d.ts +24 -0
  127. package/dist/io/sidecars.js +57 -0
  128. package/dist/io/source.d.ts +65 -0
  129. package/dist/io/source.js +112 -0
  130. package/dist/io/targets.d.ts +47 -3
  131. package/dist/io/targets.js +148 -13
  132. package/dist/io/textures.js +21 -1
  133. package/dist/io/unreal.js +5 -1
  134. package/dist/mcp/docs.d.ts +10 -1
  135. package/dist/mcp/docs.js +786 -143
  136. package/dist/mcp/inputs.d.ts +12 -5
  137. package/dist/mcp/inputs.js +50 -13
  138. package/dist/mcp/server.js +56 -27
  139. package/dist/mcp/tools.d.ts +14 -7
  140. package/dist/mcp/tools.js +196 -103
  141. package/dist/mcp/verify.d.ts +2 -2
  142. package/dist/mcp/verify.js +1 -1
  143. package/dist/mcp/workspace.d.ts +15 -0
  144. package/dist/mcp/workspace.js +349 -0
  145. package/dist/nodes/attributes.js +198 -1
  146. package/dist/nodes/bake.js +151 -47
  147. package/dist/nodes/beam.d.ts +1 -0
  148. package/dist/nodes/beam.js +201 -0
  149. package/dist/nodes/bevel.js +51 -3
  150. package/dist/nodes/cloth.js +2 -0
  151. package/dist/nodes/code.js +21 -9
  152. package/dist/nodes/curves.js +433 -93
  153. package/dist/nodes/flow.js +53 -33
  154. package/dist/nodes/generate.js +12 -38
  155. package/dist/nodes/heightfield.js +248 -77
  156. package/dist/nodes/imageops.js +16 -19
  157. package/dist/nodes/index.d.ts +1 -0
  158. package/dist/nodes/index.js +1 -0
  159. package/dist/nodes/material.js +89 -24
  160. package/dist/nodes/measure.js +43 -17
  161. package/dist/nodes/particles.js +2 -0
  162. package/dist/nodes/pcg.js +6 -5
  163. package/dist/nodes/procedural.js +4 -3
  164. package/dist/nodes/remesh.js +71 -15
  165. package/dist/nodes/scene.js +4 -2
  166. package/dist/nodes/sdf.js +10 -5
  167. package/dist/nodes/solid.js +20 -5
  168. package/dist/nodes/splines.d.ts +15 -1
  169. package/dist/nodes/splines.js +112 -105
  170. package/dist/nodes/texture.d.ts +21 -6
  171. package/dist/nodes/texture.js +1318 -185
  172. package/dist/nodes/topology.d.ts +7 -0
  173. package/dist/nodes/topology.js +133 -6
  174. package/dist/nodes/transform.js +6 -2
  175. package/dist/nodes/uv.js +192 -174
  176. package/dist/nodes/wasmcall.js +5 -1
  177. package/dist/open.d.ts +19 -0
  178. package/dist/open.js +12 -0
  179. package/dist/package.d.ts +288 -0
  180. package/dist/package.js +772 -0
  181. package/dist/packages/check.d.ts +32 -0
  182. package/dist/packages/check.js +169 -0
  183. package/dist/packages/commands.d.ts +57 -0
  184. package/dist/packages/commands.js +537 -0
  185. package/dist/packages/registry.d.ts +796 -0
  186. package/dist/packages/registry.js +2998 -0
  187. package/dist/packages/update.d.ts +124 -0
  188. package/dist/packages/update.js +476 -0
  189. package/dist/render/options.d.ts +2 -0
  190. package/dist/render/options.js +44 -5
  191. package/dist/render/preview.d.ts +15 -4
  192. package/dist/render/preview.js +6 -4
  193. package/dist/render/raster.d.ts +66 -5
  194. package/dist/render/raster.js +506 -138
  195. package/dist/render/texview.d.ts +6 -0
  196. package/dist/render/texview.js +27 -0
  197. package/dist/scan.d.ts +61 -0
  198. package/dist/scan.js +228 -0
  199. package/dist/session.d.ts +311 -0
  200. package/dist/session.js +849 -0
  201. package/dist/viewer/app/api.js +48 -6
  202. package/dist/viewer/app/cooking.js +78 -0
  203. package/dist/viewer/app/embed.js +27 -7
  204. package/dist/viewer/app/export-popover.js +118 -16
  205. package/dist/viewer/app/grid.js +5 -1
  206. package/dist/viewer/app/guides.js +122 -0
  207. package/dist/viewer/app/keymap.js +6 -3
  208. package/dist/viewer/app/layers.js +4 -4
  209. package/dist/viewer/app/main.js +185 -52
  210. package/dist/viewer/app/markers.js +60 -0
  211. package/dist/viewer/app/outliner.js +72 -27
  212. package/dist/viewer/app/output-info.js +45 -0
  213. package/dist/viewer/app/outputs.css +147 -8
  214. package/dist/viewer/app/outputs.js +168 -54
  215. package/dist/viewer/app/packages.js +614 -0
  216. package/dist/viewer/app/props.js +176 -52
  217. package/dist/viewer/app/scene.js +30 -5
  218. package/dist/viewer/app/select.js +4 -3
  219. package/dist/viewer/app/status.js +12 -15
  220. package/dist/viewer/app/style.css +65 -7
  221. package/dist/viewer/app/vars.js +47 -0
  222. package/dist/viewer/app/welcome.js +72 -0
  223. package/dist/viewer/graph-file.d.ts +62 -0
  224. package/dist/viewer/graph-file.js +175 -0
  225. package/dist/viewer/index.html +23 -10
  226. package/dist/viewer/json-edit.d.ts +13 -0
  227. package/dist/viewer/json-edit.js +274 -0
  228. package/dist/viewer/outputs.d.ts +49 -5
  229. package/dist/viewer/outputs.js +264 -56
  230. package/dist/viewer/packages.d.ts +121 -0
  231. package/dist/viewer/packages.js +584 -0
  232. package/dist/viewer/server.d.ts +14 -9
  233. package/dist/viewer/server.js +266 -28
  234. package/dist/web/app/web.css +419 -0
  235. package/dist/web/app/web.js +188 -0
  236. package/dist/{gallery → web}/bake.d.ts +4 -4
  237. package/dist/{gallery → web}/bake.js +24 -15
  238. package/dist/web/folder-page.d.ts +101 -0
  239. package/dist/web/folder-page.js +146 -0
  240. package/dist/web/folders.d.ts +280 -0
  241. package/dist/web/folders.js +970 -0
  242. package/dist/web/library.d.ts +91 -0
  243. package/dist/web/library.js +228 -0
  244. package/dist/web/markdown.d.ts +45 -0
  245. package/dist/web/markdown.js +677 -0
  246. package/dist/web/pages.d.ts +258 -0
  247. package/dist/web/pages.js +301 -0
  248. package/dist/web/server.d.ts +24 -0
  249. package/dist/web/server.js +1068 -0
  250. package/dist/workspace.d.ts +88 -118
  251. package/dist/workspace.js +358 -460
  252. package/integrations/godot/addons/topotopo/LICENSE +202 -0
  253. package/integrations/godot/addons/topotopo/README.md +57 -0
  254. package/integrations/godot/addons/topotopo/context_menu.gd +43 -0
  255. package/integrations/godot/addons/topotopo/dock.gd +266 -0
  256. package/integrations/godot/addons/topotopo/dock.tscn +72 -0
  257. package/integrations/godot/addons/topotopo/export_filter.gd +72 -0
  258. package/integrations/godot/addons/topotopo/gltf_instancing.gd +131 -0
  259. package/integrations/godot/addons/topotopo/icons/topotopo.svg +1 -0
  260. package/integrations/godot/addons/topotopo/inspector.gd +38 -0
  261. package/integrations/godot/addons/topotopo/instances_post_import.gd +111 -0
  262. package/integrations/godot/addons/topotopo/package.gd +23 -0
  263. package/integrations/godot/addons/topotopo/package_importer.gd +187 -0
  264. package/integrations/godot/addons/topotopo/plugin.cfg +7 -0
  265. package/integrations/godot/addons/topotopo/plugin.gd +970 -0
  266. package/integrations/godot/addons/topotopo/record.gd +435 -0
  267. package/integrations/godot/addons/topotopo/runner.gd +458 -0
  268. package/integrations/godot/addons/topotopo/tools/check.gd +42 -0
  269. package/integrations/godot/addons/topotopo/watcher.gd +199 -0
  270. package/kernels/pkg/README.md +2 -1
  271. package/kernels/pkg-simd/README.md +2 -1
  272. package/library/architecture/versions/1.0/architecture.topo +12 -0
  273. package/{shelf → library/architecture/versions/1.0/graphs}/arch.json +3 -3
  274. package/{shelf → library/architecture/versions/1.0/graphs}/beam_truss.json +6 -6
  275. package/{shelf → library/architecture/versions/1.0/graphs}/brick_wall.json +8 -8
  276. package/{shelf → library/architecture/versions/1.0/graphs}/door_frame.json +3 -3
  277. package/{shelf → library/architecture/versions/1.0/graphs}/hex_grid_floor.json +3 -2
  278. package/{shelf → library/architecture/versions/1.0/graphs}/house.json +8 -8
  279. package/library/architecture/versions/1.0/graphs/lineup.json +42 -0
  280. package/{shelf → library/architecture/versions/1.0/graphs}/pillar.json +3 -2
  281. package/{shelf → library/architecture/versions/1.0/graphs}/railing.json +5 -5
  282. package/{shelf → library/architecture/versions/1.0/graphs}/roof_gable.json +2 -2
  283. package/{shelf → library/architecture/versions/1.0/graphs}/roof_hip.json +2 -2
  284. package/{shelf → library/architecture/versions/1.0/graphs}/roof_skeleton.json +2 -1
  285. package/{shelf → library/architecture/versions/1.0/graphs}/scaffold.json +4 -4
  286. package/{shelf → library/architecture/versions/1.0/graphs}/spiral_stairs.json +3 -2
  287. package/{shelf → library/architecture/versions/1.0/graphs}/stairs.json +6 -6
  288. package/{shelf → library/architecture/versions/1.0/graphs}/tile_floor.json +3 -2
  289. package/{shelf → library/architecture/versions/1.0/graphs}/wall_segment.json +10 -10
  290. package/{shelf → library/architecture/versions/1.0/graphs}/window_frame.json +2 -2
  291. package/library/architecture/versions/1.0/version.json +1119 -0
  292. package/{shelf → library/nature/versions/1.0/graphs}/bush.json +2 -2
  293. package/{shelf → library/nature/versions/1.0/graphs}/cliff_block.json +4 -3
  294. package/{shelf → library/nature/versions/1.0/graphs}/forest_patch.json +5 -5
  295. package/{shelf → library/nature/versions/1.0/graphs}/grass_clumps.json +2 -2
  296. package/library/nature/versions/1.0/graphs/lineup.json +24 -0
  297. package/{shelf → library/nature/versions/1.0/graphs}/log.json +6 -6
  298. package/{shelf → library/nature/versions/1.0/graphs}/rock.json +5 -4
  299. package/{shelf → library/nature/versions/1.0/graphs}/scatter_rocks.json +5 -5
  300. package/{shelf → library/nature/versions/1.0/graphs}/tree_lowpoly.json +3 -2
  301. package/library/nature/versions/1.0/nature.topo +12 -0
  302. package/library/nature/versions/1.0/version.json +534 -0
  303. package/{shelf → library/props/versions/1.0/graphs}/barrel.json +5 -4
  304. package/{shelf → library/props/versions/1.0/graphs}/crate.json +3 -3
  305. package/library/props/versions/1.0/graphs/lineup.json +18 -0
  306. package/{shelf → library/props/versions/1.0/graphs}/pallet.json +4 -3
  307. package/{shelf → library/props/versions/1.0/graphs}/pipe_run.json +3 -3
  308. package/{shelf → library/props/versions/1.0/graphs}/sandbag_wall.json +5 -5
  309. package/library/props/versions/1.0/props.topo +12 -0
  310. package/library/props/versions/1.0/version.json +336 -0
  311. package/{shelf → library/street/versions/1.0/graphs}/bench.json +5 -5
  312. package/{shelf → library/street/versions/1.0/graphs}/bollard.json +2 -1
  313. package/{shelf → library/street/versions/1.0/graphs}/cable.json +4 -4
  314. package/{shelf → library/street/versions/1.0/graphs}/fence.json +7 -7
  315. package/{shelf → library/street/versions/1.0/graphs}/lamp_post.json +2 -2
  316. package/library/street/versions/1.0/graphs/lineup.json +22 -0
  317. package/{shelf → library/street/versions/1.0/graphs}/road_strip.json +2 -2
  318. package/{shelf → library/street/versions/1.0/graphs}/sign_post.json +1 -1
  319. package/library/street/versions/1.0/street.topo +12 -0
  320. package/library/street/versions/1.0/version.json +421 -0
  321. package/package.json +17 -8
  322. package/dist/gallery/app/gallery.css +0 -100
  323. package/dist/gallery/app/gallery.js +0 -80
  324. package/dist/gallery/cli.d.ts +0 -4
  325. package/dist/gallery/cli.js +0 -157
  326. package/dist/gallery/library.d.ts +0 -124
  327. package/dist/gallery/library.js +0 -366
  328. package/dist/gallery/pages.d.ts +0 -94
  329. package/dist/gallery/pages.js +0 -148
  330. package/dist/gallery/server.d.ts +0 -21
  331. package/dist/gallery/server.js +0 -391
  332. package/dist/graph/migrate.d.ts +0 -23
  333. package/dist/graph/migrate.js +0 -58
  334. package/dist/mcp/library.d.ts +0 -12
  335. package/dist/mcp/library.js +0 -159
  336. package/shelf/index.json +0 -190
@@ -1,6 +1,7 @@
1
- // The left panel: three tabs. Scene is the outliner tree: the output (the node being
2
- // shown), the graph's nodes (click one to show its result; the square is its display flag) and the guides. Outputs
3
- // is the published results (outputs.js). Inputs is the files in inputs/ (reference layers) with Add input.
1
+ // The left panel's tabs. Scene is the outliner tree: the output (the node being shown), the graph's nodes (click one to
2
+ // show its result; the square is its display flag; a node of a package with an update carries the mark packages.js
3
+ // gives it) and the guides. Outputs is the published results (outputs.js). Inputs is the files in inputs/ (reference
4
+ // layers) with Add input. Packages (packages.js) shows while the package uses packages.
4
5
  // Rows carry a visibility eye, a display mode and the name; selecting a row selects in the viewport and back.
5
6
  // Rows are kept and updated in place, so an open menu survives a refresh.
6
7
  import { opOf } from './selection.js';
@@ -14,12 +15,15 @@ const EYE = '<svg viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-w
14
15
  const el = (tag, cls, text) => { const e = document.createElement(tag); if (cls) e.className = cls; if (text !== undefined) e.textContent = text; return e; };
15
16
 
16
17
  export function createOutliner(ctx, panes) {
17
- // the tabs: one pane shown, remembered per browser; arrow keys move between tabs
18
+ // the tabs: one pane shown, remembered per browser; arrow keys move between tabs. A hidden tab (Packages, while the
19
+ // package uses none) stays the one wanted: it shows again when its tab does.
18
20
  const tabs = [...document.querySelectorAll('#outliner [data-tab]')], paneEls = [...document.querySelectorAll('#outliner [data-pane]')];
19
- let tab = ctx.store.get('outliner.tab', 'outputs');
20
- const showTab = (name, focus = false) => {
21
- if (!tabs.some((t) => t.dataset.tab === name)) name = 'outputs';
22
- tab = name; ctx.store.set('outliner.tab', name);
21
+ let tab = ctx.store.get('outliner.tab', 'outputs'), wanted = tab;
22
+ const visibleTabs = () => tabs.filter((t) => !t.hidden);
23
+ const showTab = (name, focus = false, chosen = true) => {
24
+ if (!visibleTabs().some((t) => t.dataset.tab === name)) name = 'outputs';
25
+ tab = name;
26
+ if (chosen) { wanted = name; ctx.store.set('outliner.tab', name); }
23
27
  for (const t of tabs) { const on = t.dataset.tab === name; t.classList.toggle('on', on); t.setAttribute('aria-selected', String(on)); t.tabIndex = on ? 0 : -1; if (on && focus) t.focus(); }
24
28
  for (const p of paneEls) p.hidden = p.dataset.pane !== name;
25
29
  };
@@ -28,20 +32,39 @@ export function createOutliner(ctx, panes) {
28
32
  t.onkeydown = (e) => {
29
33
  if (!['ArrowLeft', 'ArrowRight'].includes(e.key)) return;
30
34
  e.preventDefault();
31
- const i = tabs.indexOf(t), next = tabs[(i + (e.key === 'ArrowRight' ? 1 : tabs.length - 1)) % tabs.length];
35
+ const on = visibleTabs(), i = on.indexOf(t), next = on[(i + (e.key === 'ArrowRight' ? 1 : on.length - 1)) % on.length];
32
36
  showTab(next.dataset.tab, true);
33
37
  };
34
38
  }
35
- showTab(tab);
39
+ showTab(tab, false, false);
40
+ /** Show or hide a tab (Packages); hiding the one in view shows Outputs. */
41
+ const setTabShown = (name, on) => {
42
+ const t = tabs.find((x) => x.dataset.tab === name);
43
+ if (!t || t.hidden === !on) return;
44
+ t.hidden = !on;
45
+ if (!on && tab === name) showTab('outputs', false, false);
46
+ else if (on && wanted === name) showTab(name, false, false);
47
+ };
36
48
  const tabCount = (name, n) => { const c = document.querySelector(`#tab-${name} .count`); if (c) c.textContent = n ? String(n) : ''; };
37
49
  const picker = document.getElementById('input-file');
38
50
  document.getElementById('add-input').onclick = () => picker.click();
39
51
  picker.onchange = () => { ctx.layers.upload([...picker.files], []); picker.value = ''; };
40
- const sizes = [32, 56, 88], sizeButton = document.getElementById('thumb-size');
52
+ // the cards' thumbnail size: one for the Outputs and Inputs cards, cycled by a button in each tab's bar
53
+ const sizes = [32, 56, 88], names = { 32: 'small', 56: 'medium', 88: 'large' };
41
54
  let size = ctx.store.get('outliner.thumbnailSize', 56);
42
55
  if (!sizes.includes(size)) size = 56;
43
- const applySize = () => { document.getElementById('outliner').style.setProperty('--thumb-size', size + 'px'); sizeButton.textContent = size + ' px'; };
44
- sizeButton.onclick = () => { size = sizes[(sizes.indexOf(size) + 1) % sizes.length]; ctx.store.set('outliner.thumbnailSize', size); applySize(); };
56
+ const label = () => `Pictures: ${names[size]}`;
57
+ const applySize = () => {
58
+ document.getElementById('outliner').style.setProperty('--thumb-size', size + 'px');
59
+ for (const b of document.querySelectorAll('.thumb-size')) b.textContent = label();
60
+ };
61
+ ctx.thumbSizeButton = () => {
62
+ const b = el('button', 'thumb-size', label());
63
+ b.type = 'button'; b.title = 'the size of the cards\' pictures: small, medium or large (click for the next)'; b.setAttribute('aria-label', 'Picture size of the cards');
64
+ b.onclick = () => { b.blur(); size = sizes[(sizes.indexOf(size) + 1) % sizes.length]; ctx.store.set('outliner.thumbnailSize', size); applySize(); };
65
+ return b;
66
+ };
67
+ document.querySelector('.inputs-bar').append(ctx.thumbSizeButton());
45
68
  applySize();
46
69
  const closed = new Set(ctx.store.get('outliner.closed', []));
47
70
  const sections = new Map();
@@ -136,10 +159,13 @@ export function createOutliner(ctx, panes) {
136
159
  const nodes = g?.nodes ?? [];
137
160
  s.count.textContent = nodes.length || '';
138
161
  sync(s, nodes.map((n) => ({ key: n.name, n })), ({ n: first }) => {
139
- const row = el('div', 'row'), flag = el('span', 'flag'), nm = el('span', 'nm'), mt = el('span', 'mt');
140
- row.append(flag, nm, mt);
141
- let name = first.name;
162
+ const row = el('div', 'row'), flag = el('span', 'flag'), nm = el('span', 'nm'), mt = el('span', 'mt'), pm = el('span', 'pmark');
163
+ row.append(flag, nm, mt, pm);
164
+ let name = first.name, marked = null;
142
165
  row.addEventListener('pointerdown', (e) => { if (e.button === 0) ctx.graph.show(name); });
166
+ // the mark opens the package's card (and leaves the node shown as it is)
167
+ pm.addEventListener('pointerdown', (e) => e.stopPropagation());
168
+ pm.onclick = () => { if (marked) ctx.packages?.reveal(marked); };
143
169
  return {
144
170
  el: row,
145
171
  update({ n }) {
@@ -149,33 +175,48 @@ export function createOutliner(ctx, panes) {
149
175
  nm.textContent = n.name + (n.name === g.output ? ' ◂ output' : '');
150
176
  mt.textContent = n.type + (n.ms != null ? ` · ${n.ms.toFixed(0)} ms` : '');
151
177
  row.classList.toggle('err', !!n.error);
152
- row.title = n.error ?? `${n.type}${n.in?.length ? ' ← ' + n.in.filter(Boolean).join(', ') : ''} — click to show its result`;
178
+ // a package with an update (or followed this session): the mark after its type
179
+ const mark = n.packages ? ctx.packages?.nodeMark(n) ?? null : null;
180
+ marked = mark?.package ?? null;
181
+ pm.hidden = !mark;
182
+ pm.className = `pmark ${mark?.kind ?? ''}`;
183
+ pm.textContent = mark?.text ?? '';
184
+ pm.title = mark?.title ?? '';
185
+ row.title = (n.error ?? `${n.type}${n.in?.length ? ' ← ' + n.in.filter(Boolean).join(', ') : ''} — click to show its result`) + (mark ? `\n${mark.title}` : '');
153
186
  },
154
187
  };
155
188
  });
156
189
  }
157
- // inputs: reference layers, in the Inputs tab
190
+ // inputs: reference layers, in the Inputs tab. An export's sidecar (kind "metadata": a heightmap's .json,
191
+ // <file>.source.json …) is listed on the card of the file it describes, not as a layer of its own.
158
192
  {
159
193
  const s = section('inputs', 'Inputs', panes.inputs, true);
160
194
  const L = ctx.layers;
161
- tabCount('inputs', L.list.length);
195
+ const paths = new Set(L.list.map((f) => f.path));
196
+ const attached = (f) => f.kind === 'metadata' && !!f.sidecar?.of && paths.has(f.sidecar.of);
197
+ const cardsOf = L.list.filter((f) => !attached(f));
198
+ tabCount('inputs', cardsOf.length);
162
199
  const where = document.getElementById('inputs-where');
163
200
  where.textContent = L.where ? `inputs/ ${L.where}` : 'inputs/'; where.title = L.dir ?? '';
164
- sync(s, L.list.map((f) => ({ key: f.path, f })), ({ f: first }) => {
165
- const path = first.path, id = layerId(path);
201
+ // keyed by kind too: a file that turns into a sidecar (or back) gets the card that fits it
202
+ sync(s, cardsOf.map((f) => ({ key: `${f.path}\n${f.kind === 'metadata'}`, f, meta: L.list.filter((m) => attached(m) && m.sidecar.of === f.path) })), ({ f: first }) => {
203
+ const path = first.path, id = layerId(path), metadata = first.kind === 'metadata';
166
204
  const wrap = el('div', ''), row = el('div', 'row input-card'), ey = eye(() => L.show(path, !L.shown.has(path))), nm = el('span', 'nm', path), mt = el('span', 'mt'), er = el('div', 'rowerr');
167
205
  const ds = displaySelect(LAYER_MODES, (m) => L.setDisplay(path, m));
168
206
  const thumb = el('img', 'input-thumb'), body = el('div', 'input-body'), controls = el('div', 'input-controls'), icon = el('span', 'file-icon', first.ext?.toUpperCase() || 'FILE');
207
+ const meta = el('div', 'input-meta');
169
208
  thumb.alt = ''; thumb.loading = 'lazy'; thumb.onerror = () => { thumb.hidden = true; icon.hidden = false; };
170
- controls.append(ey, ds, mt); body.append(nm, controls); row.append(thumb, icon, body);
209
+ // a sidecar without the file it describes is metadata, never a layer: no eye, no display mode
210
+ if (metadata) controls.append(mt); else controls.append(ey, ds, mt);
211
+ body.append(nm, controls, meta); row.append(thumb, icon, body);
171
212
  wrap.append(row, er);
172
- selectRow(row, id);
213
+ if (!metadata) selectRow(row, id);
173
214
  row.onclick = (e) => { if (!e.target.closest('button,select,input') && isInputImage(path)) ctx.outputs.openInput(path); };
174
215
  row.addEventListener('pointerenter', () => setTimeout(() => L.fetchInfo(path), 150));
175
216
  return {
176
217
  el: wrap,
177
- update({ f }) {
178
- const canPreview = isInputImage(path) || ['mesh', 'geometry', 'points'].includes(f.kind) || /\.(obj|stl|ply|glb|gltf|blend|geo|bgeo|json|csv)$/i.test(path);
218
+ update({ f, meta: sidecars }) {
219
+ const canPreview = f.kind !== 'metadata' && (isInputImage(path) || ['mesh', 'geometry', 'points'].includes(f.kind) || /\.(obj|stl|ply|glb|gltf|blend|geo|bgeo|json|csv)$/i.test(path));
179
220
  const src = canPreview ? (isInputImage(path) ? inputImageURL(f) : '/api/input_thumb?' + new URLSearchParams({ path, rev: `${f.mtime}:${f.size}` })) : '';
180
221
  if (thumb.dataset.source !== src) { thumb.dataset.source = src; thumb.hidden = !src; icon.hidden = !!src; if (src) thumb.src = src; }
181
222
  const on = L.shown.has(path), e = ctx.objects.get(id);
@@ -184,6 +225,10 @@ export function createOutliner(ctx, panes) {
184
225
  if (document.activeElement !== ds) ds.value = L.display.get(path) ?? 'view';
185
226
  mt.textContent = e?.loading ? 'loading…' : fmtBytes(f.size);
186
227
  row.title = `inputs/${path} · ${L.fileText(f)}`;
228
+ // what describes it (its sidecars), or what it is (a sidecar alone)
229
+ const lines = f.kind === 'metadata' ? [`${f.about ?? 'metadata'}${f.sidecar?.of ? ` of ${f.sidecar.of}/` : ''}`]
230
+ : sidecars.map((m) => `+ ${m.path.replace(/^.*\//, '')} · ${m.about ?? 'metadata'} · ${fmtBytes(m.size)}`);
231
+ meta.textContent = lines.join('\n'); meta.hidden = !lines.length;
187
232
  const err = L.errors.get(path);
188
233
  er.textContent = err?.msg ?? '';
189
234
  er.hidden = !err;
@@ -192,7 +237,7 @@ export function createOutliner(ctx, panes) {
192
237
  };
193
238
  });
194
239
  if (!L.list.length) note(s, 'No inputs yet: Add input, or drop meshes, curves, points, PNG, JPEG or WebP files anywhere on this page. The agent hears about new files and reads them as inputs/<name>.');
195
- else note(s, 'a file node reads these as inputs/<name>; the agent hears about new ones');
240
+ else note(s, 'your agent reads these as inputs/<name> and hears about new ones');
196
241
  }
197
242
  tabCount('outputs', ctx.outputs?.count);
198
243
  // guides
@@ -221,5 +266,5 @@ export function createOutliner(ctx, panes) {
221
266
  if (!G.list.length) note(s, 'none yet — Shift+1 null, Shift+2 curve, Shift+3 area, Shift+4 volume; agents read them as inputs/markers.json');
222
267
  }
223
268
  }
224
- return { render };
269
+ return { render, showTab, setTabShown };
225
270
  }
@@ -0,0 +1,45 @@
1
+ // What an output says about itself on the page: its kind line on the card and in Properties, and the heightfield
2
+ // layers a person can see in red over the terrain. The server decides the kind from the cooked geometry
3
+ // (src/io/kinds.ts); these plain functions are tested in Node (test/viewer-logic.ts).
4
+ import { fmtSize } from './units.js';
5
+
6
+ /**
7
+ * A result's kind as its badge shows it, in the words everything uses (src/io/kinds.ts): mesh, instances, points,
8
+ * curves, terrain, textures, material, volume, scene, or empty; '' for a texture of an output, a sidecar or a file.
9
+ */
10
+ export const kindBadge = (item) => (item.kind && item.kind !== 'metadata' ? item.kind : '');
11
+
12
+ /** Its size beside the badge: "2049 × 2049 samples, 2 m apart · 4096 × 312 × 4096 m". */
13
+ export function detailLine(item) {
14
+ const what = item.about ?? (item.kind === 'metadata' ? 'metadata' : '');
15
+ return [what, item.size ? fmtSize(item.size) : ''].filter(Boolean).join(' · ');
16
+ }
17
+
18
+ /** An output's kind and tags in words, as the CLI says them: "mesh [crate, wood]" (the badges read in the same order). */
19
+ export const kindTagsLine = (o) => `${o.kind || 'kind not pinned'}${o.tags?.length ? ` [${o.tags.join(', ')}]` : ''}`;
20
+
21
+ /** What a result that uses packages shown live says: it shows their unpublished edits; its exports and downloads use the published versions. */
22
+ export const liveText = (item) => (item.live?.length ? `shows the unpublished edits of ${item.live.join(', ')} (live this session, for looking): Export and Download write the published version` : '');
23
+
24
+ /** What it is in a line, its kind first: "terrain · 2049 × 2049 samples, 2 m apart · 4096 × 312 × 4096 m" (its view before it has cooked). */
25
+ export function kindLine(item) {
26
+ const line = [kindBadge(item), detailLine(item)].filter(Boolean).join(' · ');
27
+ return line || (item.view === 'image' ? 'image' : item.view === 'file' ? 'file' : '');
28
+ }
29
+
30
+ /** A heightfield's layers a person can see in red (not the height itself): the mask first, then the others, then none. */
31
+ export function layerChoices(hf) {
32
+ if (!hf) return [];
33
+ const unit = (l) => l.min >= 0 && l.max <= 1;
34
+ const layers = hf.layers.filter((l) => l.name !== 'height').sort((a, b) => (a.name === 'mask' ? -1 : b.name === 'mask' ? 1 : 0));
35
+ return [
36
+ ...layers.map((l) => ({ value: l.name, label: l.name === 'mask' || unit(l) ? l.name : `${l.name} (${+l.min.toPrecision(3)} .. ${+l.max.toPrecision(3)})` })),
37
+ { value: 'none', label: 'none' },
38
+ ];
39
+ }
40
+
41
+ /** The layer shown in red: the one chosen if the heightfield still has it (or "none"), else the mask, else none. */
42
+ export function shownLayer(hf, chosen) {
43
+ const names = new Set(hf?.layers.map((l) => l.name));
44
+ return chosen && (chosen === 'none' || names.has(chosen)) ? chosen : names.has('mask') ? 'mask' : 'none';
45
+ }
@@ -1,16 +1,22 @@
1
- /* the left panel's tabs: Scene, Outputs, Inputs */
2
- .phead.tabs { padding: 0 6px 0 0; gap: 0; align-items: stretch; }
3
- .phead.tabs [role=tab] { padding: 6px 10px 5px; border: 0; border-bottom: 2px solid transparent; border-radius: 0; background: none; color: var(--dim); font: inherit; letter-spacing: .06em; text-transform: uppercase; }
1
+ /* the left panel's tabs: Scene, Outputs, Inputs, and Packages while the package uses packages, which shortens its
2
+ label when the panel is too narrow for all four */
3
+ .phead.tabs { padding: 0; gap: 0; align-items: stretch; }
4
+ .phead.tabs [role=tab] { flex: none; white-space: nowrap; padding: 6px 5px 5px; border: 0; border-bottom: 2px solid transparent; border-radius: 0; background: none; color: var(--dim); font: inherit; letter-spacing: .05em; text-transform: uppercase; }
5
+ .phead.tabs #tab-packages { flex: 0 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
4
6
  .phead.tabs [role=tab]:hover { color: var(--text); }
5
7
  .phead.tabs [role=tab].on { color: var(--text); border-bottom-color: var(--sel); }
6
8
  .phead.tabs [role=tab]:focus-visible { outline: 1px solid var(--sel); outline-offset: -1px; }
7
9
  .phead.tabs [role=tab] .count { margin-left: 3px; color: var(--faint); letter-spacing: 0; }
8
- #thumb-size { margin: auto 0 auto auto; font-size: 10px; letter-spacing: 0; min-width: 48px; }
10
+ .phead.tabs [role=tab] .count.late { color: var(--sel); }
11
+ .phead.tabs [role=tab] .count.live { color: var(--guide); }
12
+ /* the cards' thumbnail size, at the end of the Outputs and Inputs bars */
13
+ .thumb-size { flex: none; margin-left: auto; font-size: 10px; min-width: 48px; }
9
14
  .tabpane { flex: 1; }
10
15
  .tabpane[hidden] { display: none; }
11
16
  /* the bars at the top of the Outputs and Inputs tabs stay in view while the cards scroll */
12
17
  .outputs-bar, .inputs-bar { position: sticky; top: 0; z-index: 1; display: flex; align-items: center; gap: 8px; padding: 8px; background: var(--panel); border-bottom: 1px solid var(--line); overflow-wrap: anywhere; }
13
18
  .outputs-bar .primary, .inputs-bar .primary { flex: none; padding: 4px 12px; }
19
+ .outputs-bar > button { flex: none; }
14
20
  .outputs-bar .dim, .inputs-bar .dim { font-size: 11px; }
15
21
  .primary { border-color: var(--sel); }
16
22
  button:disabled { opacity: .45; cursor: default; }
@@ -22,7 +28,9 @@ button:disabled { opacity: .45; cursor: default; }
22
28
  .input-body .nm { display: block; white-space: normal; overflow-wrap: anywhere; }
23
29
  .input-controls { display: flex; gap: 3px; align-items: center; margin-top: 6px; flex-wrap: wrap; }
24
30
  .input-controls .mt { margin-left: auto; }
25
- /* output cards: thumbnail, name, what it is, where it exports, and its Export button */
31
+ /* an export's sidecar on the card of the file it describes (or a sidecar alone: what it is) */
32
+ .input-meta { margin-top: 4px; color: var(--dim); font-size: 11px; white-space: pre-line; overflow-wrap: anywhere; }
33
+ /* output cards: thumbnail, name, what it is, where it exports, and its Download and Export buttons */
26
34
  .output-group { padding: 12px 10px 5px; color: var(--dim); font-size: 11px; overflow-wrap: anywhere; }
27
35
  .output-card { display: flex; align-items: center; width: calc(100% - 8px); margin: 3px 4px; padding: 5px; gap: 8px; text-align: left; background: var(--bg); border: 1px solid transparent; min-height: calc(var(--thumb-size) + 12px); cursor: pointer; }
28
36
  .output-card:hover { background: var(--hover-bg); }
@@ -30,10 +38,25 @@ button:disabled { opacity: .45; cursor: default; }
30
38
  .output-card.selected { border-color: var(--sel); background: var(--sel-bg); }
31
39
  .output-card.child { margin-left: 12px; width: calc(100% - 16px); }
32
40
  .output-card img { width: var(--thumb-size); height: var(--thumb-size); object-fit: contain; background: var(--view); flex: none; }
41
+ /* the picture: kept while the result cooks again, with a mark over it; dimmed when it is out of date */
42
+ .output-pic { position: relative; flex: none; display: flex; }
43
+ .output-cooking { display: none; position: absolute; left: 0; right: 0; bottom: 0; padding: 1px 3px; background: rgba(31, 33, 36, 0.85); color: var(--sel); font-size: 10px; text-align: center; }
44
+ .output-card.cooking .output-cooking { display: block; }
45
+ .output-card.stale .output-pic { opacity: .55; }
33
46
  .output-card .output-body { display: flex; flex: 1; flex-direction: column; min-width: 0; justify-content: center; gap: 3px; }
47
+ .output-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 6px; }
34
48
  .output-card .output-label { overflow-wrap: anywhere; }
49
+ .output-badges { display: inline-flex; gap: 4px; }
50
+ .badge { padding: 0 4px; border: 1px solid var(--faint); border-radius: 2px; color: var(--dim); font-size: 10px; line-height: 14px; white-space: nowrap; }
51
+ .badge.default { border-color: var(--sel); color: var(--sel); }
52
+ .badge.kind { color: var(--text); }
53
+ .badge.live { border-color: var(--guide); color: var(--guide); }
54
+ .output-tags, .pkg-tags { display: flex; flex-wrap: wrap; gap: 3px; }
55
+ .output-tags .tag, .pkg-tags .tag { padding: 0 4px; border-radius: 2px; background: var(--panel2); color: var(--dim); font-size: 10px; line-height: 14px; }
35
56
  .output-card small { overflow: hidden; text-overflow: ellipsis; max-height: 32px; }
36
- .output-export { flex: none; padding: 3px 10px; }
57
+ .output-card small.warn { color: var(--sel); }
58
+ .output-actions { display: flex; gap: 6px; margin-top: 2px; }
59
+ .output-actions button { padding: 2px 10px; }
37
60
  .output-target { align-self: flex-start; max-width: 100%; padding: 0; border: 0; background: none; color: var(--dim); font-size: 11px; text-align: left; overflow-wrap: anywhere; cursor: pointer; }
38
61
  .output-target:hover { color: var(--text); text-decoration: underline; }
39
62
  .output-target.unset { font-style: italic; color: var(--faint); }
@@ -48,6 +71,120 @@ button:disabled { opacity: .45; cursor: default; }
48
71
  .export-field { display: grid; grid-template-columns: 48px minmax(0, 1fr); align-items: center; gap: 8px; }
49
72
  .export-field select, .export-field input { width: 100%; min-width: 0; padding: 4px 6px; }
50
73
  .export-where { font: var(--mono); font-size: 11px; overflow-wrap: anywhere; }
74
+ .export-about { font-size: 11px; overflow-wrap: anywhere; }
75
+ /* what the chosen format writes; a format that writes only part of the output says what it leaves out */
76
+ .export-writes { font-size: 11px; color: var(--text); overflow-wrap: anywhere; }
77
+ .export-writes.part { color: var(--sel); }
78
+ .export-writes.err { color: var(--err); }
79
+ .export-live { font-size: 11px; color: var(--guide); }
80
+ /* the Packages tab: the package, Find packages, a box per package (packages.js) */
81
+ .packages-bar { position: sticky; top: 0; z-index: 1; display: flex; flex-direction: column; gap: 6px; padding: 8px; background: var(--panel); border-bottom: 1px solid var(--line); overflow-wrap: anywhere; }
82
+ .pkg-package { font-size: 12px; }
83
+ .pkg-search { width: 100%; padding: 4px 6px; }
84
+ .pkg-found { display: flex; flex-direction: column; gap: 2px; padding: 6px 4px 8px; border-bottom: 1px solid var(--line); }
85
+ .pkg-libhead { margin: 6px 4px 2px; color: var(--dim); font-size: 11px; text-transform: uppercase; letter-spacing: .05em; }
86
+ .pkg-hit { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: 2px 6px; align-items: center; padding: 3px 4px; font-size: 11px; }
87
+ .pkg-hit:hover { background: var(--hover-bg); }
88
+ .pkg-hit code { font: var(--mono); min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
89
+ /* tags on one line where rows are aligned: the rest in the row's title */
90
+ .pkg-tags.line { flex-wrap: nowrap; overflow: hidden; min-width: 0; }
91
+ .pkg-tags.line .tag { flex: none; }
92
+ .pkg-hit .pkg-hitstate { grid-column: 1; }
93
+ .pkg-hit .pkg-tags { grid-column: 1 / 3; }
94
+ .pkg-hit .pkg-hitcopy { grid-column: 3; grid-row: 1 / 3; padding: 1px 6px; font-size: 10px; }
95
+ .pkg-empty { padding: 8px 10px; font-size: 12px; }
96
+ .pkg-empty p { margin: 6px 0; }
97
+ .pkg-card { display: flex; flex-direction: column; gap: 5px; margin: 6px 4px; padding: 8px; background: var(--bg); border: 1px solid var(--line); border-radius: 2px; }
98
+ .pkg-card.live { border-color: var(--guide); box-shadow: inset 3px 0 0 var(--guide); }
99
+ .pkg-card.flash { animation: pkgflash 1.5s ease-out 1; }
100
+ @keyframes pkgflash { 0%, 30% { border-color: var(--sel); background: var(--sel-bg); } 100% { } }
101
+ .pkg-head { display: flex; align-items: baseline; gap: 8px; }
102
+ .pkg-name { flex: 1; min-width: 0; font-weight: 600; overflow-wrap: anywhere; }
103
+ .pkg-ver { font: var(--mono); }
104
+ .pkg-state { flex: none; padding: 0 5px; border: 1px solid var(--faint); border-radius: 2px; font-size: 10px; line-height: 15px; color: var(--dim); white-space: nowrap; }
105
+ .pkg-state.update { border-color: var(--sel); color: var(--sel); }
106
+ .pkg-state.live { border-color: var(--guide); color: var(--guide); }
107
+ .pkg-state.error { border-color: var(--err); color: var(--err); }
108
+ .pkg-state.current { border-color: var(--ok); color: var(--ok); }
109
+ .pkg-state.author { border-color: var(--text); color: var(--text); }
110
+ .pkg-note, .pkg-sub { font-size: 11px; color: var(--dim); overflow-wrap: anywhere; }
111
+ .pkg-note.live { color: var(--guide); }
112
+ .pkg-note.warn, .pkg-sub.warn { color: var(--sel); }
113
+ .pkg-sub.err { color: var(--err); }
114
+ .pkg-sub.ok { color: var(--ok); }
115
+ .pkg-sub { margin-top: 4px; }
116
+ /* the source switch: both states named, the one in use pressed */
117
+ .pkg-source { display: flex; flex-direction: column; gap: 3px; }
118
+ .pkg-switch { display: flex; align-items: center; gap: 8px; font-size: 11px; }
119
+ .pkg-seg { display: inline-flex; }
120
+ .pkg-seg button { padding: 1px 8px; border-radius: 0; font-size: 11px; }
121
+ .pkg-seg button + button { margin-left: -1px; }
122
+ .pkg-seg button.on { position: relative; border-color: var(--text); color: var(--text); background: var(--hover-bg); }
123
+ .pkg-seg button.on.live { border-color: var(--guide); color: var(--guide); }
124
+ /* the offer after a save in a working folder, inside the package's box */
125
+ .pkg-offer { display: flex; flex-direction: column; gap: 4px; padding: 6px; border: 1px dashed var(--guide); border-radius: 2px; font-size: 11px; }
126
+ /* the nodes that use it */
127
+ .pkg-used { display: flex; flex-wrap: wrap; align-items: baseline; gap: 3px; font-size: 11px; }
128
+ .pkg-node { padding: 0 5px; font: var(--mono); font-size: 10px; line-height: 15px; }
129
+ /* folded parts: the outputs, what is new, details */
130
+ .pkg-fold > summary { cursor: pointer; color: var(--dim); font-size: 11px; user-select: none; }
131
+ .pkg-fold > summary:hover { color: var(--text); }
132
+ .pkg-fold[open] > summary { margin-bottom: 4px; }
133
+ .pkg-outs { display: grid; grid-template-columns: 10px minmax(0, max-content) max-content minmax(0, 1fr); gap: 2px 6px; align-items: center; font-size: 11px; }
134
+ .pkg-in { color: var(--sel); font-size: 8px; }
135
+ .pkg-outs .badge { justify-self: start; }
136
+ .pkg-on { font: var(--mono); color: var(--dim); overflow-wrap: anywhere; }
137
+ .pkg-on.used { color: var(--text); }
138
+ .pkg-versions { display: flex; flex-direction: column; gap: 1px; }
139
+ .pkg-v { display: grid; grid-template-columns: auto auto minmax(0, 1fr) auto; gap: 6px; align-items: baseline; font-size: 11px; }
140
+ .pkg-vn { font: var(--mono); }
141
+ .pkg-vd { font: var(--mono); font-size: 10px; color: var(--faint); }
142
+ .pkg-vt { overflow-wrap: anywhere; }
143
+ .pkg-tag { padding: 0 4px; border: 1px solid var(--sel); border-radius: 2px; color: var(--sel); font-size: 10px; line-height: 14px; }
144
+ .pkg-actions { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 2px; }
145
+ .pkg-actions button { padding: 3px 10px; }
146
+ .pkg-done { font-size: 11px; color: var(--ok); }
147
+ .pkg-done.err { color: var(--err); }
148
+ .pkg-list { margin: 2px 0; padding-left: 16px; font-size: 11px; overflow-wrap: anywhere; }
149
+ .pkg-list.err { color: var(--err); }
150
+ .pkg-copy { display: flex; gap: 4px; }
151
+ .pkg-copy input { flex: 1; min-width: 0; font: var(--mono); font-size: 10px; padding: 2px 4px; }
152
+ .pkg-copy button { flex: none; padding: 1px 8px; }
153
+ .pkg-must, .pkg-compare, .pkg-author .pkg-sub { display: flex; flex-direction: column; gap: 3px; }
154
+ .pkg-must, .pkg-compare { margin-top: 4px; padding-top: 6px; border-top: 1px solid var(--line); }
155
+ .pkg-must button { align-self: flex-start; padding: 2px 10px; }
156
+ .pkg-ctitle { font-weight: 600; }
157
+ .pkg-verdict { font-size: 12px; }
158
+ .pkg-verdict.err { color: var(--err); }
159
+ .pkg-compare .cookline { height: 20px; }
160
+ /* a place: its graph and node, and what changed there on a line of its own */
161
+ .pkg-place { display: flex; flex-direction: column; gap: 1px; padding: 3px 6px; border-left: 2px solid transparent; cursor: pointer; user-select: none; }
162
+ .pkg-place:hover { background: var(--hover-bg); }
163
+ .pkg-place.sel { background: var(--sel-bg); border-left-color: var(--sel); }
164
+ .pkg-place:focus-visible { outline: 1px solid var(--sel); outline-offset: -1px; }
165
+ .pkg-pn { overflow-wrap: anywhere; font: var(--mono); }
166
+ .pkg-pv { font-size: 11px; color: var(--dim); overflow-wrap: anywhere; }
167
+ .pkg-pv.changed { color: var(--sel); }
168
+ .pkg-pv.failed { color: var(--err); }
169
+ button.danger.primary { border-color: var(--err); }
170
+ /* over the view while it shows a place of an update: a, b or both overlaid, and the overlay's colours (src/explain.ts DIFF_COLORS) */
171
+ .compare-switch { position: absolute; top: 8px; left: 50%; transform: translateX(-50%); z-index: 3; display: flex; align-items: center; gap: 0; max-width: calc(100% - 16px); padding: 4px 6px; background: rgba(38, 40, 44, 0.92); border: 1px solid var(--line); border-radius: 3px; font-size: 11px; }
172
+ .compare-switch .compare-what { margin-right: 10px; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 280px; }
173
+ .compare-switch button { padding: 2px 10px; border-radius: 0; white-space: nowrap; }
174
+ .compare-switch button + button { margin-left: -1px; }
175
+ .compare-switch button.on { border-color: var(--sel); color: var(--sel); position: relative; }
176
+ .compare-legend { display: inline-grid; grid-auto-flow: column; gap: 4px; align-items: center; margin-left: 10px; color: var(--dim); white-space: nowrap; }
177
+ .compare-legend:empty { display: none; }
178
+ .compare-legend .sw, .pkg-legend .sw { width: 10px; height: 10px; border-radius: 1px; }
179
+ .sw.same { background: rgb(184 184 184); }
180
+ .sw.b { background: rgb(51 128 255); }
181
+ .sw.a { background: rgb(255 128 31); }
182
+ /* the heightfield layer drawn in red, in the output's details */
183
+ .layer-pick { display: flex; align-items: center; gap: 8px; margin: 6px 0; }
184
+ .layer-pick select { flex: 1; min-width: 0; }
185
+ #output-details .output-kind { color: var(--text); }
186
+ /* an output that is not the kind its graph pins */
187
+ .output-card .warn, #output-details .warn { color: var(--sel); }
51
188
  .export-error { color: var(--err); font-size: 11px; }
52
189
  .export-error:empty { display: none; }
53
190
  .export-actions { display: flex; justify-content: flex-end; gap: 8px; }
@@ -55,8 +192,10 @@ button:disabled { opacity: .45; cursor: default; }
55
192
  .dim { color: var(--dim); }
56
193
  .err { color: var(--err); }
57
194
  .empty { padding: 12px; color: var(--dim); }
58
- #output-details { padding: 12px; border-bottom: 1px solid var(--line); max-height: 36%; overflow: auto; overflow-wrap: anywhere; }
59
- #output-details p { white-space: pre-wrap; max-height: 120px; overflow: auto; }
195
+ #output-details { padding: 10px 12px; border-bottom: 1px solid var(--line); overflow-wrap: anywhere; }
196
+ #output-details p { white-space: pre-wrap; margin: 6px 0; }
197
+ #output-details pre.summary { font-size: 10px; }
198
+ #output-details .live { color: var(--guide); }
60
199
  #output-details a { display: block; margin: 6px 0; color: #9dc9ee; }
61
200
  #top { gap: 7px; }
62
201
  #top .primary { border-color: var(--sel); color: var(--text); }