agentic-numerical-control 0.1.8 → 0.2.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 +21 -21
- package/README.md +7 -6
- package/dist/engines/cncjs/LICENSES.txt +2593 -0
- package/dist/engines/cncjs/cncjs-headless.cjs +67988 -0
- package/dist/engines/cncjs/manifest.json +195 -0
- package/dist/engines/kiri/LICENSES.txt +1097 -0
- package/dist/engines/kiri/bin/dom-stub.mjs +30 -0
- package/dist/engines/kiri/bin/kiri-main.js +127342 -0
- package/dist/engines/kiri/bin/kiri-pool.js +83963 -0
- package/dist/engines/kiri/bin/kiri-work.js +136718 -0
- package/dist/engines/kiri/bin/runner.mjs +241 -0
- package/dist/engines/kiri/bin/worker-shim.mjs +32 -0
- package/dist/engines/kiri/manifest.json +356 -0
- package/dist/engines/kiri/wasm/manifold.wasm +0 -0
- package/dist/server/autostart.js +18 -18
- package/dist/server/cam.js +592 -0
- package/dist/server/cncjs.js +105 -81
- package/dist/server/server.js +225 -2
- package/dist/server/settings-import.js +237 -0
- package/dist/setup.html +1 -1
- package/dist/viewer.html +175 -178
- package/package.json +9 -5
- package/product.json +8 -8
- package/samples/demo-pocket-profile.nc +130 -130
- package/sim/virtual-port.cjs +134 -134
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
// Inert stand-ins for the browser objects that Kiri:Moto's app modules touch
|
|
2
|
+
// when imported. The engine imports them for its in-browser use; ANC never
|
|
3
|
+
// draws anything, so they only need to exist.
|
|
4
|
+
const inert = () => {
|
|
5
|
+
const fn = function () { return proxy; };
|
|
6
|
+
const proxy = new Proxy(fn, {
|
|
7
|
+
get(t, k) {
|
|
8
|
+
if (k === Symbol.toPrimitive) return () => '';
|
|
9
|
+
if (k === Symbol.iterator) return function* () {};
|
|
10
|
+
if (k === 'then') return undefined;
|
|
11
|
+
if (k === 'length') return 0;
|
|
12
|
+
if (k in t && k !== 'name' && k !== 'prototype') return t[k];
|
|
13
|
+
return proxy;
|
|
14
|
+
},
|
|
15
|
+
set() { return true; },
|
|
16
|
+
apply() { return proxy; },
|
|
17
|
+
construct() { return proxy; },
|
|
18
|
+
has() { return true; },
|
|
19
|
+
});
|
|
20
|
+
return proxy;
|
|
21
|
+
};
|
|
22
|
+
const store = new Map();
|
|
23
|
+
globalThis.window ??= globalThis;
|
|
24
|
+
globalThis.document ??= inert();
|
|
25
|
+
globalThis.localStorage ??= { getItem: k => store.get(k) ?? null, setItem: (k, v) => store.set(k, String(v)), removeItem: k => store.delete(k), clear: () => store.clear(), key: i => [...store.keys()][i] ?? null, get length() { return store.size; } };
|
|
26
|
+
globalThis.location ??= { hostname: 'localhost', host: 'localhost', port: '', protocol: 'http:', search: '', hash: '', href: 'http://localhost/', origin: 'http://localhost', pathname: '/' };
|
|
27
|
+
globalThis.addEventListener ??= () => {};
|
|
28
|
+
globalThis.removeEventListener ??= () => {};
|
|
29
|
+
globalThis.requestAnimationFrame ??= (f) => setTimeout(f, 16);
|
|
30
|
+
globalThis.HTMLElement ??= class {};
|