@tscircuit/3d-viewer 0.0.339 → 0.0.340
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/index.js +37 -41
- package/package.json +2 -2
package/dist/index.js
CHANGED
|
@@ -14670,38 +14670,6 @@ import { z as z2 } from "zod";
|
|
|
14670
14670
|
import { z as z3 } from "zod";
|
|
14671
14671
|
import { z as z4 } from "zod";
|
|
14672
14672
|
import { z as z5 } from "zod";
|
|
14673
|
-
|
|
14674
|
-
// node_modules/nanoid/index.js
|
|
14675
|
-
import { webcrypto as crypto } from "crypto";
|
|
14676
|
-
|
|
14677
|
-
// node_modules/nanoid/url-alphabet/index.js
|
|
14678
|
-
var urlAlphabet = "useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict";
|
|
14679
|
-
|
|
14680
|
-
// node_modules/nanoid/index.js
|
|
14681
|
-
var POOL_SIZE_MULTIPLIER = 128;
|
|
14682
|
-
var pool;
|
|
14683
|
-
var poolOffset;
|
|
14684
|
-
function fillPool(bytes) {
|
|
14685
|
-
if (!pool || pool.length < bytes) {
|
|
14686
|
-
pool = Buffer.allocUnsafe(bytes * POOL_SIZE_MULTIPLIER);
|
|
14687
|
-
crypto.getRandomValues(pool);
|
|
14688
|
-
poolOffset = 0;
|
|
14689
|
-
} else if (poolOffset + bytes > pool.length) {
|
|
14690
|
-
crypto.getRandomValues(pool);
|
|
14691
|
-
poolOffset = 0;
|
|
14692
|
-
}
|
|
14693
|
-
poolOffset += bytes;
|
|
14694
|
-
}
|
|
14695
|
-
function nanoid(size2 = 21) {
|
|
14696
|
-
fillPool(size2 |= 0);
|
|
14697
|
-
let id = "";
|
|
14698
|
-
for (let i = poolOffset - size2; i < poolOffset; i++) {
|
|
14699
|
-
id += urlAlphabet[pool[i] & 63];
|
|
14700
|
-
}
|
|
14701
|
-
return id;
|
|
14702
|
-
}
|
|
14703
|
-
|
|
14704
|
-
// node_modules/circuit-json/dist/index.mjs
|
|
14705
14673
|
import { z as z6 } from "zod";
|
|
14706
14674
|
import { z as z9 } from "zod";
|
|
14707
14675
|
import { z as z7 } from "zod";
|
|
@@ -15052,8 +15020,15 @@ var size = z4.object({
|
|
|
15052
15020
|
height: z4.number()
|
|
15053
15021
|
});
|
|
15054
15022
|
expectTypesMatch(true);
|
|
15023
|
+
var randomId = (length4) => {
|
|
15024
|
+
const chars = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789";
|
|
15025
|
+
return Array.from(
|
|
15026
|
+
{ length: length4 },
|
|
15027
|
+
() => chars[Math.floor(Math.random() * chars.length)]
|
|
15028
|
+
).join("");
|
|
15029
|
+
};
|
|
15055
15030
|
var getZodPrefixedIdWithDefault = (prefix) => {
|
|
15056
|
-
return z5.string().optional().default(() => `${prefix}_${
|
|
15031
|
+
return z5.string().optional().default(() => `${prefix}_${randomId(10)}`);
|
|
15057
15032
|
};
|
|
15058
15033
|
var ninePointAnchor = z6.enum([
|
|
15059
15034
|
"top_left",
|
|
@@ -16475,17 +16450,38 @@ var cad_component = z93.object({
|
|
|
16475
16450
|
model_jscad: z93.any().optional()
|
|
16476
16451
|
}).describe("Defines a component on the PCB");
|
|
16477
16452
|
expectTypesMatch(true);
|
|
16478
|
-
var
|
|
16453
|
+
var wave_shape = z94.enum(["sinewave", "square", "triangle", "sawtooth"]);
|
|
16454
|
+
var simulation_dc_voltage_source = z94.object({
|
|
16479
16455
|
type: z94.literal("simulation_voltage_source"),
|
|
16480
16456
|
simulation_voltage_source_id: getZodPrefixedIdWithDefault(
|
|
16481
16457
|
"simulation_voltage_source"
|
|
16482
16458
|
),
|
|
16483
|
-
|
|
16484
|
-
|
|
16485
|
-
|
|
16486
|
-
|
|
16459
|
+
is_dc_source: z94.literal(true).optional().default(true),
|
|
16460
|
+
positive_source_port_id: z94.string().optional(),
|
|
16461
|
+
negative_source_port_id: z94.string().optional(),
|
|
16462
|
+
positive_source_net_id: z94.string().optional(),
|
|
16463
|
+
negative_source_net_id: z94.string().optional(),
|
|
16487
16464
|
voltage
|
|
16488
|
-
}).describe("Defines a voltage source for simulation");
|
|
16465
|
+
}).describe("Defines a DC voltage source for simulation");
|
|
16466
|
+
var simulation_ac_voltage_source = z94.object({
|
|
16467
|
+
type: z94.literal("simulation_voltage_source"),
|
|
16468
|
+
simulation_voltage_source_id: getZodPrefixedIdWithDefault(
|
|
16469
|
+
"simulation_voltage_source"
|
|
16470
|
+
),
|
|
16471
|
+
is_dc_source: z94.literal(false),
|
|
16472
|
+
terminal1_source_port_id: z94.string().optional(),
|
|
16473
|
+
terminal2_source_port_id: z94.string().optional(),
|
|
16474
|
+
terminal1_source_net_id: z94.string().optional(),
|
|
16475
|
+
terminal2_source_net_id: z94.string().optional(),
|
|
16476
|
+
voltage: voltage.optional(),
|
|
16477
|
+
frequency: frequency.optional(),
|
|
16478
|
+
peak_to_peak_voltage: voltage.optional(),
|
|
16479
|
+
wave_shape: wave_shape.optional(),
|
|
16480
|
+
phase: rotation.optional()
|
|
16481
|
+
}).describe("Defines an AC voltage source for simulation");
|
|
16482
|
+
var simulation_voltage_source = z94.union([simulation_dc_voltage_source, simulation_ac_voltage_source]).describe("Defines a voltage source for simulation");
|
|
16483
|
+
expectTypesMatch(true);
|
|
16484
|
+
expectTypesMatch(true);
|
|
16489
16485
|
expectTypesMatch(true);
|
|
16490
16486
|
var any_circuit_element = z95.union([
|
|
16491
16487
|
source_trace,
|
|
@@ -25344,7 +25340,7 @@ import * as THREE9 from "three";
|
|
|
25344
25340
|
// package.json
|
|
25345
25341
|
var package_default = {
|
|
25346
25342
|
name: "@tscircuit/3d-viewer",
|
|
25347
|
-
version: "0.0.
|
|
25343
|
+
version: "0.0.339",
|
|
25348
25344
|
main: "./dist/index.js",
|
|
25349
25345
|
module: "./dist/index.js",
|
|
25350
25346
|
type: "module",
|
|
@@ -25402,7 +25398,7 @@ var package_default = {
|
|
|
25402
25398
|
"@vitejs/plugin-react": "^4.3.4",
|
|
25403
25399
|
"bun-match-svg": "^0.0.9",
|
|
25404
25400
|
"bun-types": "1.2.1",
|
|
25405
|
-
"circuit-json": "^0.0.
|
|
25401
|
+
"circuit-json": "^0.0.232",
|
|
25406
25402
|
"circuit-to-svg": "^0.0.176",
|
|
25407
25403
|
debug: "^4.4.0",
|
|
25408
25404
|
"jscad-electronics": "^0.0.33",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tscircuit/3d-viewer",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.340",
|
|
4
4
|
"main": "./dist/index.js",
|
|
5
5
|
"module": "./dist/index.js",
|
|
6
6
|
"type": "module",
|
|
@@ -58,7 +58,7 @@
|
|
|
58
58
|
"@vitejs/plugin-react": "^4.3.4",
|
|
59
59
|
"bun-match-svg": "^0.0.9",
|
|
60
60
|
"bun-types": "1.2.1",
|
|
61
|
-
"circuit-json": "^0.0.
|
|
61
|
+
"circuit-json": "^0.0.232",
|
|
62
62
|
"circuit-to-svg": "^0.0.176",
|
|
63
63
|
"debug": "^4.4.0",
|
|
64
64
|
"jscad-electronics": "^0.0.33",
|