automatick 0.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +20 -0
- package/README.md +106 -0
- package/dist/chunk-66FUVAAG.js +7 -0
- package/dist/chunk-AIKB2FNR.js +17 -0
- package/dist/chunk-HTH6FQ7C.js +192 -0
- package/dist/chunk-OA6FGXTP.js +9 -0
- package/dist/chunk-SK5SHIWY.js +13 -0
- package/dist/chunk-YNLOTPDY.js +206 -0
- package/dist/engine.cjs +231 -0
- package/dist/engine.d.cts +72 -0
- package/dist/engine.d.ts +72 -0
- package/dist/engine.js +8 -0
- package/dist/react/EngineContext.cjs +43 -0
- package/dist/react/EngineContext.d.cts +18 -0
- package/dist/react/EngineContext.d.ts +18 -0
- package/dist/react/EngineContext.js +6 -0
- package/dist/react/PerformanceOverlay.cjs +341 -0
- package/dist/react/PerformanceOverlay.d.cts +9 -0
- package/dist/react/PerformanceOverlay.d.ts +9 -0
- package/dist/react/PerformanceOverlay.js +290 -0
- package/dist/react/Simulation.cjs +481 -0
- package/dist/react/Simulation.d.cts +31 -0
- package/dist/react/Simulation.d.ts +31 -0
- package/dist/react/Simulation.js +235 -0
- package/dist/react/SimulationContext.cjs +41 -0
- package/dist/react/SimulationContext.d.cts +25 -0
- package/dist/react/SimulationContext.d.ts +25 -0
- package/dist/react/SimulationContext.js +6 -0
- package/dist/react/SimulationControls.cjs +298 -0
- package/dist/react/SimulationControls.d.cts +33 -0
- package/dist/react/SimulationControls.d.ts +33 -0
- package/dist/react/SimulationControls.js +80 -0
- package/dist/react/controlPrimitives.cjs +247 -0
- package/dist/react/controlPrimitives.d.cts +45 -0
- package/dist/react/controlPrimitives.d.ts +45 -0
- package/dist/react/controlPrimitives.js +22 -0
- package/dist/react/hooks.cjs +53 -0
- package/dist/react/hooks.d.cts +26 -0
- package/dist/react/hooks.d.ts +26 -0
- package/dist/react/hooks.js +7 -0
- package/dist/react/stableCallback.cjs +47 -0
- package/dist/react/stableCallback.d.cts +3 -0
- package/dist/react/stableCallback.d.ts +3 -0
- package/dist/react/stableCallback.js +6 -0
- package/dist/react/useSimulationCanvas.cjs +92 -0
- package/dist/react/useSimulationCanvas.d.cts +38 -0
- package/dist/react/useSimulationCanvas.d.ts +38 -0
- package/dist/react/useSimulationCanvas.js +53 -0
- package/dist/sim.cjs +32 -0
- package/dist/sim.d.cts +40 -0
- package/dist/sim.d.ts +40 -0
- package/dist/sim.js +7 -0
- package/dist/worker/createSimWorker.cjs +147 -0
- package/dist/worker/createSimWorker.d.cts +19 -0
- package/dist/worker/createSimWorker.d.ts +19 -0
- package/dist/worker/createSimWorker.js +122 -0
- package/dist/worker/protocol.cjs +18 -0
- package/dist/worker/protocol.d.cts +59 -0
- package/dist/worker/protocol.d.ts +59 -0
- package/dist/worker/protocol.js +0 -0
- package/dist/worker/workerRunner.cjs +100 -0
- package/dist/worker/workerRunner.d.cts +30 -0
- package/dist/worker/workerRunner.d.ts +30 -0
- package/dist/worker/workerRunner.js +73 -0
- package/package.json +102 -0
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
import { EngineSnapshot } from '../engine.cjs';
|
|
2
|
+
import '../sim.cjs';
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* Wire protocol types for main ↔ worker communication.
|
|
6
|
+
*
|
|
7
|
+
* These types define the message shapes exchanged via postMessage.
|
|
8
|
+
* The actual serialization boundary (where `unknown` and `as` casts live)
|
|
9
|
+
* is in serialize.ts — not here.
|
|
10
|
+
*/
|
|
11
|
+
|
|
12
|
+
/** Messages sent from the main thread to the worker. */
|
|
13
|
+
type MainToWorkerMessage<Params> = {
|
|
14
|
+
kind: 'init';
|
|
15
|
+
params: Params;
|
|
16
|
+
config: WorkerConfig;
|
|
17
|
+
} | {
|
|
18
|
+
kind: 'play';
|
|
19
|
+
} | {
|
|
20
|
+
kind: 'pause';
|
|
21
|
+
} | {
|
|
22
|
+
kind: 'stop';
|
|
23
|
+
} | {
|
|
24
|
+
kind: 'seek';
|
|
25
|
+
tick: number;
|
|
26
|
+
} | {
|
|
27
|
+
kind: 'advance';
|
|
28
|
+
count: number;
|
|
29
|
+
} | {
|
|
30
|
+
kind: 'setParams';
|
|
31
|
+
patch: Partial<Params>;
|
|
32
|
+
} | {
|
|
33
|
+
kind: 'resetWith';
|
|
34
|
+
patch?: Partial<Params>;
|
|
35
|
+
} | {
|
|
36
|
+
kind: 'destroy';
|
|
37
|
+
};
|
|
38
|
+
/** Messages sent from the worker to the main thread. */
|
|
39
|
+
type WorkerToMainMessage<Data, Params> = {
|
|
40
|
+
kind: 'snapshot';
|
|
41
|
+
snapshot: EngineSnapshot<Data, Params>;
|
|
42
|
+
} | {
|
|
43
|
+
kind: 'error';
|
|
44
|
+
error: {
|
|
45
|
+
message: string;
|
|
46
|
+
stack?: string;
|
|
47
|
+
};
|
|
48
|
+
} | {
|
|
49
|
+
kind: 'ready';
|
|
50
|
+
};
|
|
51
|
+
/** Worker-specific configuration passed at init time. */
|
|
52
|
+
type WorkerConfig = {
|
|
53
|
+
maxTime?: number;
|
|
54
|
+
delayMs?: number;
|
|
55
|
+
ticksPerFrame?: number;
|
|
56
|
+
snapshotIntervalMs?: number;
|
|
57
|
+
};
|
|
58
|
+
|
|
59
|
+
export type { MainToWorkerMessage, WorkerConfig, WorkerToMainMessage };
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
import { EngineSnapshot } from '../engine.js';
|
|
2
|
+
import '../sim.js';
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* Wire protocol types for main ↔ worker communication.
|
|
6
|
+
*
|
|
7
|
+
* These types define the message shapes exchanged via postMessage.
|
|
8
|
+
* The actual serialization boundary (where `unknown` and `as` casts live)
|
|
9
|
+
* is in serialize.ts — not here.
|
|
10
|
+
*/
|
|
11
|
+
|
|
12
|
+
/** Messages sent from the main thread to the worker. */
|
|
13
|
+
type MainToWorkerMessage<Params> = {
|
|
14
|
+
kind: 'init';
|
|
15
|
+
params: Params;
|
|
16
|
+
config: WorkerConfig;
|
|
17
|
+
} | {
|
|
18
|
+
kind: 'play';
|
|
19
|
+
} | {
|
|
20
|
+
kind: 'pause';
|
|
21
|
+
} | {
|
|
22
|
+
kind: 'stop';
|
|
23
|
+
} | {
|
|
24
|
+
kind: 'seek';
|
|
25
|
+
tick: number;
|
|
26
|
+
} | {
|
|
27
|
+
kind: 'advance';
|
|
28
|
+
count: number;
|
|
29
|
+
} | {
|
|
30
|
+
kind: 'setParams';
|
|
31
|
+
patch: Partial<Params>;
|
|
32
|
+
} | {
|
|
33
|
+
kind: 'resetWith';
|
|
34
|
+
patch?: Partial<Params>;
|
|
35
|
+
} | {
|
|
36
|
+
kind: 'destroy';
|
|
37
|
+
};
|
|
38
|
+
/** Messages sent from the worker to the main thread. */
|
|
39
|
+
type WorkerToMainMessage<Data, Params> = {
|
|
40
|
+
kind: 'snapshot';
|
|
41
|
+
snapshot: EngineSnapshot<Data, Params>;
|
|
42
|
+
} | {
|
|
43
|
+
kind: 'error';
|
|
44
|
+
error: {
|
|
45
|
+
message: string;
|
|
46
|
+
stack?: string;
|
|
47
|
+
};
|
|
48
|
+
} | {
|
|
49
|
+
kind: 'ready';
|
|
50
|
+
};
|
|
51
|
+
/** Worker-specific configuration passed at init time. */
|
|
52
|
+
type WorkerConfig = {
|
|
53
|
+
maxTime?: number;
|
|
54
|
+
delayMs?: number;
|
|
55
|
+
ticksPerFrame?: number;
|
|
56
|
+
snapshotIntervalMs?: number;
|
|
57
|
+
};
|
|
58
|
+
|
|
59
|
+
export type { MainToWorkerMessage, WorkerConfig, WorkerToMainMessage };
|
|
File without changes
|
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __export = (target, all) => {
|
|
7
|
+
for (var name in all)
|
|
8
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
+
};
|
|
10
|
+
var __copyProps = (to, from, except, desc) => {
|
|
11
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
+
for (let key of __getOwnPropNames(from))
|
|
13
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
+
}
|
|
16
|
+
return to;
|
|
17
|
+
};
|
|
18
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
+
|
|
20
|
+
// src/worker/workerRunner.ts
|
|
21
|
+
var workerRunner_exports = {};
|
|
22
|
+
__export(workerRunner_exports, {
|
|
23
|
+
createWorkerRunner: () => createWorkerRunner
|
|
24
|
+
});
|
|
25
|
+
module.exports = __toCommonJS(workerRunner_exports);
|
|
26
|
+
|
|
27
|
+
// src/worker/serialize.ts
|
|
28
|
+
function deserializeWorkerMessage(raw) {
|
|
29
|
+
return raw;
|
|
30
|
+
}
|
|
31
|
+
function serializeMainMessage(msg) {
|
|
32
|
+
return msg;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
// src/worker/workerRunner.ts
|
|
36
|
+
function createWorkerRunner(worker, config) {
|
|
37
|
+
const listeners = /* @__PURE__ */ new Set();
|
|
38
|
+
let currentSnapshot = {
|
|
39
|
+
data: void 0,
|
|
40
|
+
params: config.initialParams,
|
|
41
|
+
tick: 0,
|
|
42
|
+
status: "idle",
|
|
43
|
+
stepDurationMs: 0
|
|
44
|
+
};
|
|
45
|
+
let errorMessage = null;
|
|
46
|
+
function send(msg) {
|
|
47
|
+
worker.postMessage(serializeMainMessage(msg));
|
|
48
|
+
}
|
|
49
|
+
function emit() {
|
|
50
|
+
for (const l of listeners) {
|
|
51
|
+
l(currentSnapshot);
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
worker.onmessage = (event) => {
|
|
55
|
+
const msg = deserializeWorkerMessage(event.data);
|
|
56
|
+
switch (msg.kind) {
|
|
57
|
+
case "snapshot":
|
|
58
|
+
currentSnapshot = msg.snapshot;
|
|
59
|
+
emit();
|
|
60
|
+
break;
|
|
61
|
+
case "error":
|
|
62
|
+
errorMessage = msg.error.message;
|
|
63
|
+
currentSnapshot = { ...currentSnapshot, status: "stopped" };
|
|
64
|
+
emit();
|
|
65
|
+
break;
|
|
66
|
+
case "ready":
|
|
67
|
+
break;
|
|
68
|
+
}
|
|
69
|
+
};
|
|
70
|
+
worker.onerror = (event) => {
|
|
71
|
+
errorMessage = event.message ?? "Unknown worker error";
|
|
72
|
+
currentSnapshot = { ...currentSnapshot, status: "stopped" };
|
|
73
|
+
emit();
|
|
74
|
+
};
|
|
75
|
+
return {
|
|
76
|
+
getSnapshot: () => currentSnapshot,
|
|
77
|
+
subscribe(listener) {
|
|
78
|
+
listeners.add(listener);
|
|
79
|
+
return () => {
|
|
80
|
+
listeners.delete(listener);
|
|
81
|
+
};
|
|
82
|
+
},
|
|
83
|
+
play: () => send({ kind: "play" }),
|
|
84
|
+
pause: () => send({ kind: "pause" }),
|
|
85
|
+
stop: () => send({ kind: "stop" }),
|
|
86
|
+
seek: (tick) => send({ kind: "seek", tick }),
|
|
87
|
+
advance: (count = 1) => send({ kind: "advance", count }),
|
|
88
|
+
setParams: (patch) => send({ kind: "setParams", patch }),
|
|
89
|
+
resetWith: (patch) => send({ kind: "resetWith", patch }),
|
|
90
|
+
destroy() {
|
|
91
|
+
listeners.clear();
|
|
92
|
+
send({ kind: "destroy" });
|
|
93
|
+
worker.terminate();
|
|
94
|
+
}
|
|
95
|
+
};
|
|
96
|
+
}
|
|
97
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
98
|
+
0 && (module.exports = {
|
|
99
|
+
createWorkerRunner
|
|
100
|
+
});
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { EngineSnapshot } from '../engine.cjs';
|
|
2
|
+
import { WorkerConfig } from './protocol.cjs';
|
|
3
|
+
import '../sim.cjs';
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* Main-thread side of the worker runner.
|
|
7
|
+
*
|
|
8
|
+
* Creates a Web Worker, sends commands, and subscribes to snapshot updates.
|
|
9
|
+
* The worker owns the tick loop; this side is a passive subscriber.
|
|
10
|
+
*/
|
|
11
|
+
|
|
12
|
+
type WorkerRunnerConfig<Params> = {
|
|
13
|
+
initialParams: Params;
|
|
14
|
+
config: WorkerConfig;
|
|
15
|
+
};
|
|
16
|
+
type WorkerRunner<Data, Params> = {
|
|
17
|
+
getSnapshot: () => EngineSnapshot<Data, Params>;
|
|
18
|
+
subscribe: (listener: (snapshot: EngineSnapshot<Data, Params>) => void) => () => void;
|
|
19
|
+
play: () => void;
|
|
20
|
+
pause: () => void;
|
|
21
|
+
stop: () => void;
|
|
22
|
+
seek: (tick: number) => void;
|
|
23
|
+
advance: (count?: number) => void;
|
|
24
|
+
setParams: (patch: Partial<Params>) => void;
|
|
25
|
+
resetWith: (patch?: Partial<Params>) => void;
|
|
26
|
+
destroy: () => void;
|
|
27
|
+
};
|
|
28
|
+
declare function createWorkerRunner<Data, Params>(worker: Worker, config: WorkerRunnerConfig<Params>): WorkerRunner<Data, Params>;
|
|
29
|
+
|
|
30
|
+
export { type WorkerRunner, type WorkerRunnerConfig, createWorkerRunner };
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { EngineSnapshot } from '../engine.js';
|
|
2
|
+
import { WorkerConfig } from './protocol.js';
|
|
3
|
+
import '../sim.js';
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* Main-thread side of the worker runner.
|
|
7
|
+
*
|
|
8
|
+
* Creates a Web Worker, sends commands, and subscribes to snapshot updates.
|
|
9
|
+
* The worker owns the tick loop; this side is a passive subscriber.
|
|
10
|
+
*/
|
|
11
|
+
|
|
12
|
+
type WorkerRunnerConfig<Params> = {
|
|
13
|
+
initialParams: Params;
|
|
14
|
+
config: WorkerConfig;
|
|
15
|
+
};
|
|
16
|
+
type WorkerRunner<Data, Params> = {
|
|
17
|
+
getSnapshot: () => EngineSnapshot<Data, Params>;
|
|
18
|
+
subscribe: (listener: (snapshot: EngineSnapshot<Data, Params>) => void) => () => void;
|
|
19
|
+
play: () => void;
|
|
20
|
+
pause: () => void;
|
|
21
|
+
stop: () => void;
|
|
22
|
+
seek: (tick: number) => void;
|
|
23
|
+
advance: (count?: number) => void;
|
|
24
|
+
setParams: (patch: Partial<Params>) => void;
|
|
25
|
+
resetWith: (patch?: Partial<Params>) => void;
|
|
26
|
+
destroy: () => void;
|
|
27
|
+
};
|
|
28
|
+
declare function createWorkerRunner<Data, Params>(worker: Worker, config: WorkerRunnerConfig<Params>): WorkerRunner<Data, Params>;
|
|
29
|
+
|
|
30
|
+
export { type WorkerRunner, type WorkerRunnerConfig, createWorkerRunner };
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
// src/worker/serialize.ts
|
|
2
|
+
function deserializeWorkerMessage(raw) {
|
|
3
|
+
return raw;
|
|
4
|
+
}
|
|
5
|
+
function serializeMainMessage(msg) {
|
|
6
|
+
return msg;
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
// src/worker/workerRunner.ts
|
|
10
|
+
function createWorkerRunner(worker, config) {
|
|
11
|
+
const listeners = /* @__PURE__ */ new Set();
|
|
12
|
+
let currentSnapshot = {
|
|
13
|
+
data: void 0,
|
|
14
|
+
params: config.initialParams,
|
|
15
|
+
tick: 0,
|
|
16
|
+
status: "idle",
|
|
17
|
+
stepDurationMs: 0
|
|
18
|
+
};
|
|
19
|
+
let errorMessage = null;
|
|
20
|
+
function send(msg) {
|
|
21
|
+
worker.postMessage(serializeMainMessage(msg));
|
|
22
|
+
}
|
|
23
|
+
function emit() {
|
|
24
|
+
for (const l of listeners) {
|
|
25
|
+
l(currentSnapshot);
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
worker.onmessage = (event) => {
|
|
29
|
+
const msg = deserializeWorkerMessage(event.data);
|
|
30
|
+
switch (msg.kind) {
|
|
31
|
+
case "snapshot":
|
|
32
|
+
currentSnapshot = msg.snapshot;
|
|
33
|
+
emit();
|
|
34
|
+
break;
|
|
35
|
+
case "error":
|
|
36
|
+
errorMessage = msg.error.message;
|
|
37
|
+
currentSnapshot = { ...currentSnapshot, status: "stopped" };
|
|
38
|
+
emit();
|
|
39
|
+
break;
|
|
40
|
+
case "ready":
|
|
41
|
+
break;
|
|
42
|
+
}
|
|
43
|
+
};
|
|
44
|
+
worker.onerror = (event) => {
|
|
45
|
+
errorMessage = event.message ?? "Unknown worker error";
|
|
46
|
+
currentSnapshot = { ...currentSnapshot, status: "stopped" };
|
|
47
|
+
emit();
|
|
48
|
+
};
|
|
49
|
+
return {
|
|
50
|
+
getSnapshot: () => currentSnapshot,
|
|
51
|
+
subscribe(listener) {
|
|
52
|
+
listeners.add(listener);
|
|
53
|
+
return () => {
|
|
54
|
+
listeners.delete(listener);
|
|
55
|
+
};
|
|
56
|
+
},
|
|
57
|
+
play: () => send({ kind: "play" }),
|
|
58
|
+
pause: () => send({ kind: "pause" }),
|
|
59
|
+
stop: () => send({ kind: "stop" }),
|
|
60
|
+
seek: (tick) => send({ kind: "seek", tick }),
|
|
61
|
+
advance: (count = 1) => send({ kind: "advance", count }),
|
|
62
|
+
setParams: (patch) => send({ kind: "setParams", patch }),
|
|
63
|
+
resetWith: (patch) => send({ kind: "resetWith", patch }),
|
|
64
|
+
destroy() {
|
|
65
|
+
listeners.clear();
|
|
66
|
+
send({ kind: "destroy" });
|
|
67
|
+
worker.terminate();
|
|
68
|
+
}
|
|
69
|
+
};
|
|
70
|
+
}
|
|
71
|
+
export {
|
|
72
|
+
createWorkerRunner
|
|
73
|
+
};
|
package/package.json
ADDED
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "automatick",
|
|
3
|
+
"version": "0.0.1",
|
|
4
|
+
"description": "State-machine engine for tick-based simulations in React",
|
|
5
|
+
"author": "jckr",
|
|
6
|
+
"license": "MIT",
|
|
7
|
+
"repository": {
|
|
8
|
+
"type": "git",
|
|
9
|
+
"url": "git+https://github.com/jckr/automatick.git"
|
|
10
|
+
},
|
|
11
|
+
"type": "module",
|
|
12
|
+
"engines": {
|
|
13
|
+
"node": ">=22.12.0"
|
|
14
|
+
},
|
|
15
|
+
"files": [
|
|
16
|
+
"dist"
|
|
17
|
+
],
|
|
18
|
+
"sideEffects": false,
|
|
19
|
+
"peerDependencies": {
|
|
20
|
+
"react": "^18.0.0",
|
|
21
|
+
"react-dom": "^18.0.0"
|
|
22
|
+
},
|
|
23
|
+
"peerDependenciesMeta": {
|
|
24
|
+
"react": {
|
|
25
|
+
"optional": true
|
|
26
|
+
},
|
|
27
|
+
"react-dom": {
|
|
28
|
+
"optional": true
|
|
29
|
+
}
|
|
30
|
+
},
|
|
31
|
+
"scripts": {
|
|
32
|
+
"build": "tsup src/engine.ts src/sim.ts src/worker/workerRunner.ts src/worker/createSimWorker.ts src/worker/protocol.ts src/react/Simulation.tsx src/react/hooks.ts src/react/useSimulationCanvas.ts src/react/PerformanceOverlay.tsx src/react/SimulationContext.tsx src/react/EngineContext.tsx src/react/SimulationControls.tsx src/react/controlPrimitives.tsx src/react/stableCallback.ts --format esm,cjs --dts --clean --external react --external react-dom --external react/jsx-runtime",
|
|
33
|
+
"test": "vitest run"
|
|
34
|
+
},
|
|
35
|
+
"exports": {
|
|
36
|
+
".": {
|
|
37
|
+
"types": "./dist/engine.d.ts",
|
|
38
|
+
"import": "./dist/engine.js",
|
|
39
|
+
"require": "./dist/engine.cjs"
|
|
40
|
+
},
|
|
41
|
+
"./sim": {
|
|
42
|
+
"types": "./dist/sim.d.ts",
|
|
43
|
+
"import": "./dist/sim.js",
|
|
44
|
+
"require": "./dist/sim.cjs"
|
|
45
|
+
},
|
|
46
|
+
"./worker/runner": {
|
|
47
|
+
"types": "./dist/worker/workerRunner.d.ts",
|
|
48
|
+
"import": "./dist/worker/workerRunner.js",
|
|
49
|
+
"require": "./dist/worker/workerRunner.cjs"
|
|
50
|
+
},
|
|
51
|
+
"./worker/create": {
|
|
52
|
+
"types": "./dist/worker/createSimWorker.d.ts",
|
|
53
|
+
"import": "./dist/worker/createSimWorker.js",
|
|
54
|
+
"require": "./dist/worker/createSimWorker.cjs"
|
|
55
|
+
},
|
|
56
|
+
"./worker/protocol": {
|
|
57
|
+
"types": "./dist/worker/protocol.d.ts",
|
|
58
|
+
"import": "./dist/worker/protocol.js",
|
|
59
|
+
"require": "./dist/worker/protocol.cjs"
|
|
60
|
+
},
|
|
61
|
+
"./react/simulation": {
|
|
62
|
+
"types": "./dist/react/Simulation.d.ts",
|
|
63
|
+
"import": "./dist/react/Simulation.js",
|
|
64
|
+
"require": "./dist/react/Simulation.cjs"
|
|
65
|
+
},
|
|
66
|
+
"./react/hooks": {
|
|
67
|
+
"types": "./dist/react/hooks.d.ts",
|
|
68
|
+
"import": "./dist/react/hooks.js",
|
|
69
|
+
"require": "./dist/react/hooks.cjs"
|
|
70
|
+
},
|
|
71
|
+
"./react/controls": {
|
|
72
|
+
"types": "./dist/react/SimulationControls.d.ts",
|
|
73
|
+
"import": "./dist/react/SimulationControls.js",
|
|
74
|
+
"require": "./dist/react/SimulationControls.cjs"
|
|
75
|
+
},
|
|
76
|
+
"./react/control-primitives": {
|
|
77
|
+
"types": "./dist/react/controlPrimitives.d.ts",
|
|
78
|
+
"import": "./dist/react/controlPrimitives.js",
|
|
79
|
+
"require": "./dist/react/controlPrimitives.cjs"
|
|
80
|
+
},
|
|
81
|
+
"./react/context": {
|
|
82
|
+
"types": "./dist/react/SimulationContext.d.ts",
|
|
83
|
+
"import": "./dist/react/SimulationContext.js",
|
|
84
|
+
"require": "./dist/react/SimulationContext.cjs"
|
|
85
|
+
},
|
|
86
|
+
"./react/performance": {
|
|
87
|
+
"types": "./dist/react/PerformanceOverlay.d.ts",
|
|
88
|
+
"import": "./dist/react/PerformanceOverlay.js",
|
|
89
|
+
"require": "./dist/react/PerformanceOverlay.cjs"
|
|
90
|
+
},
|
|
91
|
+
"./react/canvas": {
|
|
92
|
+
"types": "./dist/react/useSimulationCanvas.d.ts",
|
|
93
|
+
"import": "./dist/react/useSimulationCanvas.js",
|
|
94
|
+
"require": "./dist/react/useSimulationCanvas.cjs"
|
|
95
|
+
},
|
|
96
|
+
"./react/stable-callback": {
|
|
97
|
+
"types": "./dist/react/stableCallback.d.ts",
|
|
98
|
+
"import": "./dist/react/stableCallback.js",
|
|
99
|
+
"require": "./dist/react/stableCallback.cjs"
|
|
100
|
+
}
|
|
101
|
+
}
|
|
102
|
+
}
|