nucleation 0.5.1 → 0.7.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 (190) hide show
  1. package/AnimationEffect.d.mts +44 -0
  2. package/AnimationEffect.d.ts +1 -1
  3. package/Autostack.d.mts +43 -0
  4. package/Autostack.d.ts +2 -2
  5. package/BlockPos.d.mts +28 -0
  6. package/BlockState.d.mts +39 -0
  7. package/BlockState.d.ts +1 -1
  8. package/Blocks.d.mts +91 -0
  9. package/Blocks.d.ts +1 -1
  10. package/Brush.d.mts +99 -0
  11. package/Brush.d.ts +21 -12
  12. package/Brush.mjs +66 -9
  13. package/BuildAnimation.d.mts +142 -0
  14. package/BuildAnimation.d.ts +5 -5
  15. package/BuildingTool.d.mts +46 -0
  16. package/BuildingTool.d.ts +4 -4
  17. package/CellularSdfConfig.d.mts +22 -0
  18. package/CellularSdfConfig.d.ts +22 -0
  19. package/CellularSdfConfig.mjs +69 -0
  20. package/ChunkMeshResult.d.mts +75 -0
  21. package/ChunkMeshResult.d.ts +7 -7
  22. package/CircuitBuilder.d.mts +118 -0
  23. package/CircuitBuilder.d.ts +6 -6
  24. package/Curve3D.d.mts +27 -0
  25. package/Curve3D.d.ts +1 -1
  26. package/DefinitionRegion.d.mts +274 -0
  27. package/DefinitionRegion.d.ts +5 -5
  28. package/Diff.d.mts +88 -0
  29. package/Diff.d.ts +2 -2
  30. package/Dimensions.d.mts +28 -0
  31. package/DistanceField.d.mts +39 -0
  32. package/DistanceField.d.ts +1 -1
  33. package/ExecutionMode.d.mts +42 -0
  34. package/ExecutionMode.d.ts +2 -2
  35. package/Field3.d.mts +40 -0
  36. package/Field3.d.ts +40 -0
  37. package/Field3.mjs +160 -0
  38. package/FieldProgram.d.mts +40 -0
  39. package/FieldProgram.d.ts +40 -0
  40. package/FieldProgram.mjs +167 -0
  41. package/FieldProgramBinaryOp.d.mts +42 -0
  42. package/FieldProgramBinaryOp.d.ts +42 -0
  43. package/FieldProgramBinaryOp.mjs +118 -0
  44. package/FieldProgramBuilder.d.mts +104 -0
  45. package/FieldProgramBuilder.d.ts +104 -0
  46. package/FieldProgramBuilder.mjs +486 -0
  47. package/FieldProgramDistanceKind.d.mts +26 -0
  48. package/FieldProgramDistanceKind.d.ts +26 -0
  49. package/FieldProgramDistanceKind.mjs +78 -0
  50. package/FieldProgramUnaryOp.d.mts +34 -0
  51. package/FieldProgramUnaryOp.d.ts +34 -0
  52. package/FieldProgramUnaryOp.mjs +102 -0
  53. package/FieldProgramValueType.d.mts +25 -0
  54. package/FieldProgramValueType.d.ts +25 -0
  55. package/FieldProgramValueType.mjs +75 -0
  56. package/FieldRange.d.mts +15 -0
  57. package/FieldRange.d.ts +15 -0
  58. package/FieldRange.mjs +108 -0
  59. package/Fingerprint.d.mts +44 -0
  60. package/Fingerprint.d.ts +2 -2
  61. package/GeneratedChunk.d.mts +35 -0
  62. package/GeneratedChunk.d.ts +35 -0
  63. package/GeneratedChunk.mjs +178 -0
  64. package/GeneratedChunkCoverage.d.mts +25 -0
  65. package/GeneratedChunkCoverage.d.ts +25 -0
  66. package/GeneratedChunkCoverage.mjs +75 -0
  67. package/GeneratedChunkOverlayMode.d.mts +24 -0
  68. package/GeneratedChunkOverlayMode.d.ts +24 -0
  69. package/GeneratedChunkOverlayMode.mjs +72 -0
  70. package/GeneratedWorldStream.d.mts +28 -0
  71. package/GeneratedWorldStream.d.ts +28 -0
  72. package/GeneratedWorldStream.mjs +86 -0
  73. package/Geo.d.mts +41 -0
  74. package/Geo.d.ts +2 -2
  75. package/InterpolationSpace.d.mts +25 -0
  76. package/IoLayout.d.mts +26 -0
  77. package/IoLayoutBuilder.d.mts +73 -0
  78. package/IoLayoutBuilder.d.ts +4 -4
  79. package/IoType.d.mts +41 -0
  80. package/ItemModelConfig.d.mts +65 -0
  81. package/ItemModelConfig.d.ts +1 -1
  82. package/ItemModelPackBuilder.d.mts +32 -0
  83. package/ItemModelPackBuilder.d.ts +1 -1
  84. package/ItemModelResult.d.mts +72 -0
  85. package/ItemModelResult.d.ts +7 -7
  86. package/ItemScale.d.mts +31 -0
  87. package/LayoutFunction.d.mts +52 -0
  88. package/LayoutFunction.d.ts +1 -1
  89. package/MchprsWorld.d.mts +131 -0
  90. package/MchprsWorld.d.ts +3 -3
  91. package/MeshBounds.d.mts +40 -0
  92. package/MeshConfig.d.mts +101 -0
  93. package/MeshConfig.d.ts +1 -1
  94. package/MeshJob.d.mts +44 -0
  95. package/MeshJob.d.ts +7 -7
  96. package/MeshPhase.d.mts +38 -0
  97. package/MeshProgress.d.mts +32 -0
  98. package/MeshProgress.d.ts +1 -1
  99. package/MeshResult.d.mts +65 -0
  100. package/MeshResult.d.ts +5 -5
  101. package/MultiMeshResult.d.mts +50 -0
  102. package/MultiMeshResult.d.ts +5 -5
  103. package/Nbt.d.mts +50 -0
  104. package/Nbt.d.ts +1 -1
  105. package/NucleationError.d.mts +41 -0
  106. package/NucleationError.d.ts +5 -0
  107. package/NucleationError.mjs +8 -1
  108. package/OutputCondition.d.mts +45 -0
  109. package/OutputCondition.d.ts +1 -1
  110. package/Palette.d.mts +145 -0
  111. package/Palette.d.ts +9 -1
  112. package/Palette.mjs +35 -0
  113. package/PaletteBuilder.d.mts +119 -0
  114. package/PaletteBuilder.d.ts +2 -2
  115. package/RawMeshExport.d.mts +74 -0
  116. package/RawMeshExport.d.ts +4 -4
  117. package/RedstoneGraph.d.mts +58 -0
  118. package/RedstoneGraph.d.ts +1 -1
  119. package/RegionBounds.d.mts +41 -0
  120. package/RenderConfig.d.mts +101 -0
  121. package/RenderConfig.d.ts +1 -1
  122. package/Renderer.d.mts +51 -0
  123. package/Renderer.d.ts +4 -4
  124. package/ResourcePack.d.mts +105 -0
  125. package/ResourcePack.d.ts +3 -3
  126. package/ResourcePackList.d.mts +32 -0
  127. package/Schematic.d.mts +734 -0
  128. package/Schematic.d.ts +4 -4
  129. package/SchematicBuilder.d.mts +103 -0
  130. package/SchematicBuilder.d.ts +2 -2
  131. package/SchematicRegions.d.mts +93 -0
  132. package/SchematicRegions.d.ts +3 -3
  133. package/Scripting.d.mts +40 -0
  134. package/Scripting.d.ts +2 -2
  135. package/Sdf.d.mts +234 -0
  136. package/Sdf.d.ts +208 -13
  137. package/Sdf.mjs +1106 -11
  138. package/SdfAxis.d.mts +25 -0
  139. package/SdfAxis.d.ts +25 -0
  140. package/SdfAxis.mjs +75 -0
  141. package/SdfBounds.d.mts +19 -0
  142. package/SdfBounds.d.ts +19 -0
  143. package/SdfBounds.mjs +160 -0
  144. package/SdfCellMode.d.mts +26 -0
  145. package/SdfCellMode.d.ts +26 -0
  146. package/SdfCellMode.mjs +78 -0
  147. package/SdfNormal.d.mts +16 -0
  148. package/SdfNormal.d.ts +16 -0
  149. package/SdfNormal.mjs +121 -0
  150. package/Shape.d.mts +143 -0
  151. package/Shape.d.ts +2 -2
  152. package/SortStrategy.d.mts +86 -0
  153. package/SortStrategy.d.ts +1 -1
  154. package/Store.d.mts +83 -0
  155. package/Store.d.ts +2 -2
  156. package/StoreIo.d.mts +71 -0
  157. package/StoreIo.d.ts +2 -2
  158. package/TextureAtlas.d.mts +40 -0
  159. package/TextureAtlas.d.ts +4 -4
  160. package/TextureInfo.d.mts +34 -0
  161. package/TypedCircuitExecutor.d.mts +101 -0
  162. package/TypedCircuitExecutor.d.ts +6 -6
  163. package/Value.d.mts +73 -0
  164. package/Value.d.ts +1 -1
  165. package/VideoConfig.d.mts +15 -0
  166. package/Voxelizer.d.mts +58 -0
  167. package/Voxelizer.d.ts +4 -4
  168. package/WorldChunkView.d.mts +75 -0
  169. package/WorldChunkView.d.ts +2 -2
  170. package/WorldGenerator.d.mts +75 -0
  171. package/WorldGenerator.d.ts +75 -0
  172. package/WorldGenerator.mjs +255 -0
  173. package/WorldSink.d.mts +50 -0
  174. package/WorldSink.d.ts +2 -2
  175. package/WorldStream.d.mts +45 -0
  176. package/WorldStream.d.ts +2 -2
  177. package/WsPartitionHints.d.mts +29 -0
  178. package/WsPartitionHints.d.ts +1 -1
  179. package/WsProfile.d.mts +46 -0
  180. package/WsProfile.d.ts +1 -1
  181. package/WsRunResult.d.mts +83 -0
  182. package/WsRunResult.d.ts +5 -5
  183. package/WsSegmentJob.d.mts +28 -0
  184. package/WsSegmentJob.d.ts +1 -1
  185. package/diplomat-runtime.d.mts +15 -0
  186. package/index.d.mts +177 -0
  187. package/index.d.ts +106 -70
  188. package/index.mjs +37 -1
  189. package/nucleation.wasm +0 -0
  190. package/package.json +2 -1
@@ -0,0 +1,46 @@
1
+ // generated by diplomat-tool
2
+ import type { Brush } from "./Brush.mjs"
3
+ import type { NucleationError } from "./NucleationError.mjs"
4
+ import type { Schematic } from "./Schematic.mjs"
5
+ import type { Shape } from "./Shape.mjs"
6
+ import type { pointer, codepoint } from "./diplomat-runtime.d.ts";
7
+
8
+
9
+
10
+ /**
11
+ * Namespace for the fill operations that combine a schematic, a shape and a
12
+ * brush (the old `buildingtool_*` free functions).
13
+ */
14
+ export class BuildingTool {
15
+ /** @internal */
16
+ get ffiValue(): pointer;
17
+ /** @internal */
18
+ constructor();
19
+
20
+
21
+ /**
22
+ * Fill `shape` into `schematic` using `brush`.
23
+ */
24
+ static fill(schematic: Schematic, shape: Shape, brush: Brush): void;
25
+
26
+ /**
27
+ * Fill `count` copies of `shape`, each offset by `offset * i`.
28
+ */
29
+ static rstack(schematic: Schematic, shape: Shape, brush: Brush, count: number, offsetX: number, offsetY: number, offsetZ: number): void;
30
+
31
+ /**
32
+ * Masked fill that preserves everything already placed: `brush` is
33
+ * only written where `schematic` currently has air (or nothing at
34
+ * all), so existing structures inside `shape` survive untouched.
35
+ */
36
+ static fillOnlyAir(schematic: Schematic, shape: Shape, brush: Brush): void;
37
+
38
+ /**
39
+ * Masked fill that only overwrites the listed blocks: `targets_json`
40
+ * is a JSON array of block ids (e.g. `["minecraft:stone"]`, state
41
+ * properties ignored) and every cell of `shape` whose current block
42
+ * id is in the list is replaced by `brush` — everything else,
43
+ * including air, is left alone.
44
+ */
45
+ static fillReplacing(schematic: Schematic, shape: Shape, brush: Brush, targetsJson: string): void;
46
+ }
package/BuildingTool.d.ts CHANGED
@@ -1,8 +1,8 @@
1
1
  // generated by diplomat-tool
2
- import type { Brush } from "./Brush"
3
- import type { NucleationError } from "./NucleationError"
4
- import type { Schematic } from "./Schematic"
5
- import type { Shape } from "./Shape"
2
+ import type { Brush } from "./Brush.mjs"
3
+ import type { NucleationError } from "./NucleationError.mjs"
4
+ import type { Schematic } from "./Schematic.mjs"
5
+ import type { Shape } from "./Shape.mjs"
6
6
  import type { pointer, codepoint } from "./diplomat-runtime.d.ts";
7
7
 
8
8
 
@@ -0,0 +1,22 @@
1
+ // generated by diplomat-tool
2
+ import type { NucleationError } from "./NucleationError.mjs"
3
+ import type { pointer, codepoint } from "./diplomat-runtime.d.ts";
4
+
5
+
6
+
7
+ /**
8
+ * Immutable hashed-cell variation shared by coordinated SDF source layers.
9
+ */
10
+ export class CellularSdfConfig {
11
+ /** @internal */
12
+ get ffiValue(): pointer;
13
+ /** @internal */
14
+ constructor();
15
+
16
+
17
+ /**
18
+ * Validates every field up front, so a config that constructs here is
19
+ * never rejected for its own values by a later `cellular_sdf` call.
20
+ */
21
+ static create(cellSizeX: number, cellSizeZ: number, seed: bigint, maxJitterX: number, maxJitterZ: number, maxYawDegrees: number, minScale: number, maxScale: number, minYOffset: number, maxYOffset: number, presenceNumerator: number, presenceDenominator: number, featureSalt: bigint): CellularSdfConfig;
22
+ }
@@ -0,0 +1,22 @@
1
+ // generated by diplomat-tool
2
+ import type { NucleationError } from "./NucleationError.mjs"
3
+ import type { pointer, codepoint } from "./diplomat-runtime.d.ts";
4
+
5
+
6
+
7
+ /**
8
+ * Immutable hashed-cell variation shared by coordinated SDF source layers.
9
+ */
10
+ export class CellularSdfConfig {
11
+ /** @internal */
12
+ get ffiValue(): pointer;
13
+ /** @internal */
14
+ constructor();
15
+
16
+
17
+ /**
18
+ * Validates every field up front, so a config that constructs here is
19
+ * never rejected for its own values by a later `cellular_sdf` call.
20
+ */
21
+ static create(cellSizeX: number, cellSizeZ: number, seed: bigint, maxJitterX: number, maxJitterZ: number, maxYawDegrees: number, minScale: number, maxScale: number, minYOffset: number, maxYOffset: number, presenceNumerator: number, presenceDenominator: number, featureSalt: bigint): CellularSdfConfig;
22
+ }
@@ -0,0 +1,69 @@
1
+ // generated by diplomat-tool
2
+ import { NucleationError } from "./NucleationError.mjs"
3
+ import wasm from "./diplomat-wasm.mjs";
4
+ import * as diplomatRuntime from "./diplomat-runtime.mjs";
5
+
6
+ const CellularSdfConfig_box_destroy_registry = new FinalizationRegistry((ptr) => {
7
+ wasm.CellularSdfConfig_destroy(ptr);
8
+ });
9
+
10
+ /**
11
+ * Immutable hashed-cell variation shared by coordinated SDF source layers.
12
+ */
13
+ export class CellularSdfConfig {
14
+ // Internal ptr reference:
15
+ #ptr = null;
16
+
17
+ // Lifetimes are only to keep dependencies alive.
18
+ // Since JS won't garbage collect until there are no incoming edges.
19
+ #selfEdge = [];
20
+
21
+ #internalConstructor(symbol, ptr, selfEdge) {
22
+ if (symbol !== diplomatRuntime.internalConstructor) {
23
+ console.error("CellularSdfConfig is an Opaque type. You cannot call its constructor.");
24
+ return;
25
+ }
26
+ this.#ptr = ptr;
27
+ this.#selfEdge = selfEdge;
28
+
29
+ // Are we being borrowed? If not, we can register.
30
+ if (this.#selfEdge.length === 0) {
31
+ CellularSdfConfig_box_destroy_registry.register(this, this.#ptr);
32
+ }
33
+
34
+ return this;
35
+ }
36
+ /** @internal */
37
+ get ffiValue() {
38
+ return this.#ptr;
39
+ }
40
+
41
+
42
+ /**
43
+ * Validates every field up front, so a config that constructs here is
44
+ * never rejected for its own values by a later `cellular_sdf` call.
45
+ */
46
+ static create(cellSizeX, cellSizeZ, seed, maxJitterX, maxJitterZ, maxYawDegrees, minScale, maxScale, minYOffset, maxYOffset, presenceNumerator, presenceDenominator, featureSalt) {
47
+ const diplomatReceive = new diplomatRuntime.DiplomatReceiveBuf(wasm, 5, 4, true);
48
+
49
+
50
+ const result = wasm.CellularSdfConfig_create(diplomatReceive.buffer, cellSizeX, cellSizeZ, seed, maxJitterX, maxJitterZ, maxYawDegrees, minScale, maxScale, minYOffset, maxYOffset, presenceNumerator, presenceDenominator, featureSalt);
51
+
52
+ try {
53
+ if (!diplomatReceive.resultFlag) {
54
+ const cause = new NucleationError(diplomatRuntime.internalConstructor, diplomatRuntime.enumDiscriminant(wasm, diplomatReceive.buffer));
55
+ throw new globalThis.Error('NucleationError.' + cause.value, { cause });
56
+ }
57
+ return new CellularSdfConfig(diplomatRuntime.internalConstructor, diplomatRuntime.ptrRead(wasm, diplomatReceive.buffer), []);
58
+ }
59
+
60
+ finally {
61
+ diplomatRuntime.FUNCTION_PARAM_ALLOC.clean();
62
+ diplomatReceive.free();
63
+ }
64
+ }
65
+
66
+ constructor(symbol, ptr, selfEdge) {
67
+ return this.#internalConstructor(...arguments)
68
+ }
69
+ }
@@ -0,0 +1,75 @@
1
+ // generated by diplomat-tool
2
+ import type { BlockPos } from "./BlockPos.mjs"
3
+ import type { MeshConfig } from "./MeshConfig.mjs"
4
+ import type { MeshResult } from "./MeshResult.mjs"
5
+ import type { NucleationError } from "./NucleationError.mjs"
6
+ import type { ResourcePack } from "./ResourcePack.mjs"
7
+ import type { Schematic } from "./Schematic.mjs"
8
+ import type { TextureAtlas } from "./TextureAtlas.mjs"
9
+ import type { pointer, codepoint } from "./diplomat-runtime.d.ts";
10
+
11
+
12
+
13
+ /**
14
+ * Per-chunk mesh results. Wraps {@link crate::meshing::ChunkMeshResult}.
15
+ */
16
+ export class ChunkMeshResult {
17
+ /** @internal */
18
+ get ffiValue(): pointer;
19
+ /** @internal */
20
+ constructor();
21
+
22
+
23
+ /**
24
+ * Mesh with the default chunk size (old ABI: `schematic_mesh_by_chunk`).
25
+ */
26
+ static create(schematic: Schematic, pack: ResourcePack, config: MeshConfig): ChunkMeshResult;
27
+
28
+ /**
29
+ * Mesh with an explicit chunk size (old ABI: `schematic_mesh_by_chunk_size`).
30
+ */
31
+ static createWithSize(schematic: Schematic, pack: ResourcePack, config: MeshConfig, chunkSize: number): ChunkMeshResult;
32
+
33
+ /**
34
+ * Mesh chunks against a pre-built shared atlas, synchronously
35
+ * (old ABI: `schematic_mesh_chunks_with_atlas`). For progress
36
+ * reporting use {@link MeshJob::start} instead.
37
+ */
38
+ static createWithAtlas(schematic: Schematic, pack: ResourcePack, config: MeshConfig, chunkSize: number, atlas: TextureAtlas): ChunkMeshResult;
39
+
40
+ /**
41
+ * Number of chunk meshes.
42
+ */
43
+ chunkCount(): number;
44
+
45
+ /**
46
+ * Coordinate of the `index`-th chunk (old ABI:
47
+ * `chunkmeshresult_chunk_coordinates` returned all of them flat).
48
+ */
49
+ chunkCoordinateAt(index: number): BlockPos;
50
+
51
+ /**
52
+ * The mesh for one chunk coordinate (cloned).
53
+ */
54
+ getMesh(cx: number, cy: number, cz: number): MeshResult;
55
+
56
+ /**
57
+ * Total vertex count across all chunk meshes.
58
+ */
59
+ totalVertexCount(): number;
60
+
61
+ /**
62
+ * Total triangle count across all chunk meshes.
63
+ */
64
+ totalTriangleCount(): number;
65
+
66
+ /**
67
+ * All chunk meshes serialized in the NUCM cache format, base64-encoded.
68
+ */
69
+ nucmDataB64(): string;
70
+
71
+ /**
72
+ * NUCM v2 with a shared atlas, base64-encoded.
73
+ */
74
+ nucmDataWithAtlasB64(atlas: TextureAtlas): string;
75
+ }
@@ -1,11 +1,11 @@
1
1
  // generated by diplomat-tool
2
- import type { BlockPos } from "./BlockPos"
3
- import type { MeshConfig } from "./MeshConfig"
4
- import type { MeshResult } from "./MeshResult"
5
- import type { NucleationError } from "./NucleationError"
6
- import type { ResourcePack } from "./ResourcePack"
7
- import type { Schematic } from "./Schematic"
8
- import type { TextureAtlas } from "./TextureAtlas"
2
+ import type { BlockPos } from "./BlockPos.mjs"
3
+ import type { MeshConfig } from "./MeshConfig.mjs"
4
+ import type { MeshResult } from "./MeshResult.mjs"
5
+ import type { NucleationError } from "./NucleationError.mjs"
6
+ import type { ResourcePack } from "./ResourcePack.mjs"
7
+ import type { Schematic } from "./Schematic.mjs"
8
+ import type { TextureAtlas } from "./TextureAtlas.mjs"
9
9
  import type { pointer, codepoint } from "./diplomat-runtime.d.ts";
10
10
 
11
11
 
@@ -0,0 +1,118 @@
1
+ // generated by diplomat-tool
2
+ import type { IoType } from "./IoType.mjs"
3
+ import type { LayoutFunction } from "./LayoutFunction.mjs"
4
+ import type { NucleationError } from "./NucleationError.mjs"
5
+ import type { Schematic } from "./Schematic.mjs"
6
+ import type { SortStrategy } from "./SortStrategy.mjs"
7
+ import type { TypedCircuitExecutor } from "./TypedCircuitExecutor.mjs"
8
+ import type { pointer, codepoint } from "./diplomat-runtime.d.ts";
9
+
10
+
11
+
12
+ /**
13
+ * High-level circuit builder. `build`/`build_validated` consume it
14
+ * (PORTING rule 11). Regions are given as flat `[x,y,z,...]` positions
15
+ * (see module notes).
16
+ */
17
+ export class CircuitBuilder {
18
+ /** @internal */
19
+ get ffiValue(): pointer;
20
+ /** @internal */
21
+ constructor();
22
+
23
+
24
+ /**
25
+ * Create a builder for a schematic (cloned; no IO defined yet).
26
+ */
27
+ static create(schematic: Schematic): CircuitBuilder;
28
+
29
+ /**
30
+ * Create a builder pre-populated from Insign annotations.
31
+ */
32
+ static fromInsign(schematic: Schematic): CircuitBuilder;
33
+
34
+ /**
35
+ * Add an input with full control.
36
+ */
37
+ withInput(name: string, ioType: IoType, layout: LayoutFunction, regionPositions: Array<number>): void;
38
+
39
+ /**
40
+ * Add an input with full control and a custom sort strategy.
41
+ */
42
+ withInputSorted(name: string, ioType: IoType, layout: LayoutFunction, regionPositions: Array<number>, sort: SortStrategy): void;
43
+
44
+ /**
45
+ * Add an input with automatic layout inference.
46
+ */
47
+ withInputAuto(name: string, ioType: IoType, regionPositions: Array<number>): void;
48
+
49
+ /**
50
+ * Add an input with automatic layout inference and a custom sort.
51
+ */
52
+ withInputAutoSorted(name: string, ioType: IoType, regionPositions: Array<number>, sort: SortStrategy): void;
53
+
54
+ /**
55
+ * Add an output with full control.
56
+ */
57
+ withOutput(name: string, ioType: IoType, layout: LayoutFunction, regionPositions: Array<number>): void;
58
+
59
+ /**
60
+ * Add an output with full control and a custom sort strategy.
61
+ */
62
+ withOutputSorted(name: string, ioType: IoType, layout: LayoutFunction, regionPositions: Array<number>, sort: SortStrategy): void;
63
+
64
+ /**
65
+ * Add an output with automatic layout inference.
66
+ */
67
+ withOutputAuto(name: string, ioType: IoType, regionPositions: Array<number>): void;
68
+
69
+ /**
70
+ * Add an output with automatic layout inference and a custom sort.
71
+ */
72
+ withOutputAutoSorted(name: string, ioType: IoType, regionPositions: Array<number>, sort: SortStrategy): void;
73
+
74
+ /**
75
+ * Set simulation options.
76
+ */
77
+ withOptions(optimize: boolean, ioOnly: boolean): void;
78
+
79
+ /**
80
+ * Set the state mode ("stateless" | "stateful" | "manual").
81
+ */
82
+ withStateMode(mode: string): void;
83
+
84
+ /**
85
+ * Validate the configuration without consuming the builder.
86
+ */
87
+ validate(): void;
88
+
89
+ /**
90
+ * Build the executor. Consumes the builder.
91
+ */
92
+ build(): TypedCircuitExecutor;
93
+
94
+ /**
95
+ * Build the executor with validation. Consumes the builder.
96
+ */
97
+ buildValidated(): TypedCircuitExecutor;
98
+
99
+ /**
100
+ * Number of inputs defined so far (0 if the builder was consumed).
101
+ */
102
+ inputCount(): number;
103
+
104
+ /**
105
+ * Number of outputs defined so far (0 if the builder was consumed).
106
+ */
107
+ outputCount(): number;
108
+
109
+ /**
110
+ * Input names as a JSON array string.
111
+ */
112
+ inputNamesJson(): string;
113
+
114
+ /**
115
+ * Output names as a JSON array string.
116
+ */
117
+ outputNamesJson(): string;
118
+ }
@@ -1,10 +1,10 @@
1
1
  // generated by diplomat-tool
2
- import type { IoType } from "./IoType"
3
- import type { LayoutFunction } from "./LayoutFunction"
4
- import type { NucleationError } from "./NucleationError"
5
- import type { Schematic } from "./Schematic"
6
- import type { SortStrategy } from "./SortStrategy"
7
- import type { TypedCircuitExecutor } from "./TypedCircuitExecutor"
2
+ import type { IoType } from "./IoType.mjs"
3
+ import type { LayoutFunction } from "./LayoutFunction.mjs"
4
+ import type { NucleationError } from "./NucleationError.mjs"
5
+ import type { Schematic } from "./Schematic.mjs"
6
+ import type { SortStrategy } from "./SortStrategy.mjs"
7
+ import type { TypedCircuitExecutor } from "./TypedCircuitExecutor.mjs"
8
8
  import type { pointer, codepoint } from "./diplomat-runtime.d.ts";
9
9
 
10
10
 
package/Curve3D.d.mts ADDED
@@ -0,0 +1,27 @@
1
+ // generated by diplomat-tool
2
+ import type { NucleationError } from "./NucleationError.mjs"
3
+ import type { pointer, codepoint } from "./diplomat-runtime.d.ts";
4
+
5
+
6
+
7
+ /**
8
+ * A sampled 3D polyline. Closed curves include the final segment back to
9
+ * the first point and retain arc-length parameterisation for animation.
10
+ * Oversized point sets and overflowing segment lengths are rejected.
11
+ */
12
+ export class Curve3D {
13
+ /** @internal */
14
+ get ffiValue(): pointer;
15
+ /** @internal */
16
+ constructor();
17
+
18
+
19
+ /**
20
+ * Create a curve from flat `[x0, y0, z0, x1, y1, z1, …]` coordinates.
21
+ */
22
+ static fromPoints(coordinates: Array<number>, closed: boolean): Curve3D;
23
+
24
+ pointCount(): number;
25
+
26
+ isClosed(): boolean;
27
+ }
package/Curve3D.d.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  // generated by diplomat-tool
2
- import type { NucleationError } from "./NucleationError"
2
+ import type { NucleationError } from "./NucleationError.mjs"
3
3
  import type { pointer, codepoint } from "./diplomat-runtime.d.ts";
4
4
 
5
5