@tscircuit/pcb-viewer 1.11.8 → 1.11.10

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 CHANGED
@@ -683,7 +683,7 @@ var makeIssue = (params) => {
683
683
  };
684
684
  }
685
685
  let errorMessage = "";
686
- const maps = errorMaps.filter((m2) => !!m2).slice().reverse();
686
+ const maps = errorMaps.filter((m) => !!m).slice().reverse();
687
687
  for (const map of maps) {
688
688
  errorMessage = map(fullIssue, { data, defaultError: errorMessage }).message;
689
689
  }
@@ -4360,35 +4360,18 @@ var z = /* @__PURE__ */ Object.freeze({
4360
4360
  ZodError
4361
4361
  });
4362
4362
 
4363
- // node_modules/nanoid/index.js
4364
- import { webcrypto as crypto } from "node:crypto";
4365
-
4366
4363
  // node_modules/nanoid/url-alphabet/index.js
4367
4364
  var urlAlphabet = "useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict";
4368
4365
 
4369
- // node_modules/nanoid/index.js
4370
- var POOL_SIZE_MULTIPLIER = 128;
4371
- var pool;
4372
- var poolOffset;
4373
- function fillPool(bytes) {
4374
- if (!pool || pool.length < bytes) {
4375
- pool = Buffer.allocUnsafe(bytes * POOL_SIZE_MULTIPLIER);
4376
- crypto.getRandomValues(pool);
4377
- poolOffset = 0;
4378
- } else if (poolOffset + bytes > pool.length) {
4379
- crypto.getRandomValues(pool);
4380
- poolOffset = 0;
4381
- }
4382
- poolOffset += bytes;
4383
- }
4384
- function nanoid(size2 = 21) {
4385
- fillPool(size2 |= 0);
4366
+ // node_modules/nanoid/index.browser.js
4367
+ var nanoid = (size2 = 21) => {
4386
4368
  let id = "";
4387
- for (let i = poolOffset - size2; i < poolOffset; i++) {
4388
- id += urlAlphabet[pool[i] & 63];
4369
+ let bytes = crypto.getRandomValues(new Uint8Array(size2 |= 0));
4370
+ while (size2--) {
4371
+ id += urlAlphabet[bytes[size2] & 63];
4389
4372
  }
4390
4373
  return id;
4391
- }
4374
+ };
4392
4375
 
4393
4376
  // node_modules/circuit-json/dist/index.mjs
4394
4377
  var unitMappings = {
@@ -8209,14 +8192,14 @@ import { css } from "@emotion/css";
8209
8192
  // package.json
8210
8193
  var package_default = {
8211
8194
  name: "@tscircuit/pcb-viewer",
8212
- version: "1.11.7",
8195
+ version: "1.11.9",
8213
8196
  main: "dist/index.js",
8214
8197
  type: "module",
8215
8198
  repository: "tscircuit/pcb-viewer",
8216
8199
  license: "MIT",
8217
8200
  scripts: {
8218
8201
  start: "storybook dev -p 6006",
8219
- build: "tsup ./src/index.tsx --dts --sourcemap --format esm --outDir dist",
8202
+ build: "tsup ./src/index.tsx --platform browser --dts --sourcemap --format esm --outDir dist",
8220
8203
  yalc: "npm run build && yalc push",
8221
8204
  storybook: "storybook dev -p 6006",
8222
8205
  "build-storybook": "storybook build",
@@ -8237,7 +8220,7 @@ var package_default = {
8237
8220
  "@swc/core": "^1.4.12",
8238
8221
  "@tscircuit/core": "0.0.255",
8239
8222
  "@tscircuit/eagle-xml-converter": "^0.0.7",
8240
- "@tscircuit/props": "^0.0.124",
8223
+ "@tscircuit/props": "^0.0.128",
8241
8224
  "@tscircuit/soup-util": "^0.0.38",
8242
8225
  "@types/color": "^3.0.6",
8243
8226
  "@types/node": "18.7.23",