@snaptrude/plugin-core 1.0.2-plainpoint-20261026.2 → 1.1.0-pbr-20261026.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/dist/api/core/camera/index.d.ts +4 -12
- package/dist/api/core/camera/index.d.ts.map +1 -1
- package/dist/api/core/comment/index.d.ts +3 -7
- package/dist/api/core/comment/index.d.ts.map +1 -1
- package/dist/api/core/geom/create/index.d.ts +21 -69
- package/dist/api/core/geom/create/index.d.ts.map +1 -1
- package/dist/api/core/geom/query/circle.d.ts +11 -31
- package/dist/api/core/geom/query/circle.d.ts.map +1 -1
- package/dist/api/core/geom/query/contour.d.ts +7 -19
- package/dist/api/core/geom/query/contour.d.ts.map +1 -1
- package/dist/api/core/geom/query/curve.d.ts +24 -72
- package/dist/api/core/geom/query/curve.d.ts.map +1 -1
- package/dist/api/core/geom/query/profile.d.ts +7 -19
- package/dist/api/core/geom/query/profile.d.ts.map +1 -1
- package/dist/api/core/geom/update/contour.d.ts +12 -36
- package/dist/api/core/geom/update/contour.d.ts.map +1 -1
- package/dist/api/core/geom/update/curve.d.ts +5 -13
- package/dist/api/core/geom/update/curve.d.ts.map +1 -1
- package/dist/api/core/geom/update/profile.d.ts +12 -36
- package/dist/api/core/geom/update/profile.d.ts.map +1 -1
- package/dist/api/core/io/import/index.d.ts +3 -7
- package/dist/api/core/io/import/index.d.ts.map +1 -1
- package/dist/api/core/math/quat.d.ts +2 -2
- package/dist/api/core/math/quat.d.ts.map +1 -1
- package/dist/api/core/math/vec3.d.ts +15 -15
- package/dist/api/core/math/vec3.d.ts.map +1 -1
- package/dist/api/design/boolean/index.d.ts +4 -20
- package/dist/api/design/boolean/index.d.ts.map +1 -1
- package/dist/api/design/create/bulk-items.d.ts +4 -20
- package/dist/api/design/create/bulk-items.d.ts.map +1 -1
- package/dist/api/design/create/index.d.ts +27 -67
- package/dist/api/design/create/index.d.ts.map +1 -1
- package/dist/api/design/delete/index.d.ts +7 -14
- package/dist/api/design/delete/index.d.ts.map +1 -1
- package/dist/api/design/dimensions.d.ts +6 -14
- package/dist/api/design/dimensions.d.ts.map +1 -1
- package/dist/api/design/edit/index.d.ts +3 -7
- package/dist/api/design/edit/index.d.ts.map +1 -1
- package/dist/api/design/erase/index.d.ts +2 -10
- package/dist/api/design/erase/index.d.ts.map +1 -1
- package/dist/api/design/family.d.ts +12 -5
- package/dist/api/design/family.d.ts.map +1 -1
- package/dist/api/design/index.d.ts +5 -0
- package/dist/api/design/index.d.ts.map +1 -1
- package/dist/api/design/lights/index.d.ts +504 -0
- package/dist/api/design/lights/index.d.ts.map +1 -0
- package/dist/api/design/lock.d.ts +0 -3
- package/dist/api/design/lock.d.ts.map +1 -1
- package/dist/api/design/materials/index.d.ts +63 -7
- package/dist/api/design/materials/index.d.ts.map +1 -1
- package/dist/api/design/transform/index.d.ts +8 -28
- package/dist/api/design/transform/index.d.ts.map +1 -1
- package/dist/api/design/windows/index.d.ts +34 -1
- package/dist/api/design/windows/index.d.ts.map +1 -1
- package/dist/api/entity/space.d.ts +6 -30
- package/dist/api/entity/space.d.ts.map +1 -1
- package/dist/api/presentation/drawings.d.ts +1 -1
- package/dist/handles.d.ts +0 -8
- package/dist/handles.d.ts.map +1 -1
- package/dist/index.cjs +2570 -2428
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +2553 -2427
- package/dist/index.js.map +1 -1
- package/package.json +13 -13
- package/src/api/core/camera/index.ts +5 -5
- package/src/api/core/comment/index.ts +3 -3
- package/src/api/core/geom/create/index.ts +25 -25
- package/src/api/core/geom/query/circle.ts +11 -11
- package/src/api/core/geom/query/contour.ts +6 -7
- package/src/api/core/geom/query/curve.ts +25 -25
- package/src/api/core/geom/query/profile.ts +6 -7
- package/src/api/core/geom/update/contour.ts +11 -12
- package/src/api/core/geom/update/curve.ts +5 -5
- package/src/api/core/geom/update/profile.ts +11 -12
- package/src/api/core/io/import/index.ts +2 -3
- package/src/api/core/math/quat.ts +2 -2
- package/src/api/core/math/vec3.ts +16 -16
- package/src/api/design/boolean/index.ts +2 -2
- package/src/api/design/create/bulk-items.ts +2 -3
- package/src/api/design/create/index.ts +26 -27
- package/src/api/design/delete/index.ts +7 -14
- package/src/api/design/dimensions.ts +4 -5
- package/src/api/design/edit/index.ts +3 -3
- package/src/api/design/erase/index.ts +2 -2
- package/src/api/design/family.ts +12 -2
- package/src/api/design/index.ts +5 -0
- package/src/api/design/lights/index.ts +406 -0
- package/src/api/design/lock.ts +0 -6
- package/src/api/design/materials/index.ts +58 -7
- package/src/api/design/transform/index.ts +7 -15
- package/src/api/design/windows/index.ts +38 -1
- package/src/api/entity/space.ts +4 -5
- package/src/handles.ts +0 -11
- package/api-manifest.json +0 -10607
- package/test/handles.test.mjs +0 -36
package/test/handles.test.mjs
DELETED
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
// Node built-in test runner suite for the handle schemas.
|
|
2
|
-
// Imports the BUILT package (dist) — run `pnpm build` first.
|
|
3
|
-
import test from "node:test"
|
|
4
|
-
import assert from "node:assert/strict"
|
|
5
|
-
import { Vec3Handle, Vec3Input, Handle, PluginDesignMoveArgs } from "../dist/index.js"
|
|
6
|
-
|
|
7
|
-
test("a vec3 handle parses in every inbound form, and only as a handle", () => {
|
|
8
|
-
for (const v of ["vec3_abc", new Handle("vec3_abc"), { __h: "vec3_abc" }, { id: "vec3_abc" }]) {
|
|
9
|
-
const out = Vec3Handle.parse(v)
|
|
10
|
-
assert.ok(out instanceof Handle)
|
|
11
|
-
assert.equal(out.id, "vec3_abc")
|
|
12
|
-
}
|
|
13
|
-
assert.equal(Vec3Handle.safeParse({ x: 1, y: 2, z: 3 }).success, false)
|
|
14
|
-
const bad = Vec3Handle.safeParse("profile_1")
|
|
15
|
-
assert.equal(bad.success, false)
|
|
16
|
-
assert.match(bad.error.issues[0].message, /expected a "vec3" handle/)
|
|
17
|
-
})
|
|
18
|
-
|
|
19
|
-
test("Vec3Input takes a handle or a plain { x, y, z } point", () => {
|
|
20
|
-
// Geometry reads return plain points; agents pass them back where a vec3 belongs.
|
|
21
|
-
const point = { x: 1, y: 2.5, z: -3 }
|
|
22
|
-
assert.deepEqual(Vec3Input.parse(point), point)
|
|
23
|
-
assert.ok(Vec3Input.parse("vec3_abc") instanceof Handle)
|
|
24
|
-
const args = PluginDesignMoveArgs.parse({ components: ["wl_1"], displacement: { x: 0, y: 0, z: 10 } })
|
|
25
|
-
assert.deepEqual(args.displacement, { x: 0, y: 0, z: 10 })
|
|
26
|
-
const handled = PluginDesignMoveArgs.parse({ components: ["wl_1"], displacement: "vec3_d" })
|
|
27
|
-
assert.equal(handled.displacement.id, "vec3_d")
|
|
28
|
-
})
|
|
29
|
-
|
|
30
|
-
test("Vec3Input still rejects non-points and wrong handles, with one message", () => {
|
|
31
|
-
for (const v of [{ x: 1, y: 2 }, { x: 1, y: Number.NaN, z: 3 }, { x: "1", y: 2, z: 3 }, "profile_1", null, 42]) {
|
|
32
|
-
const r = Vec3Input.safeParse(v)
|
|
33
|
-
assert.equal(r.success, false, JSON.stringify(v))
|
|
34
|
-
assert.equal(r.error.issues[0].message, 'expected a "vec3" handle or a plain { x, y, z } point')
|
|
35
|
-
}
|
|
36
|
-
})
|