@tscircuit/core 0.0.996 → 0.0.998
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 +6 -5
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -8228,7 +8228,7 @@ import {
|
|
|
8228
8228
|
} from "circuit-json";
|
|
8229
8229
|
|
|
8230
8230
|
// lib/components/base-components/NormalComponent/utils/isStaticAssetPath.ts
|
|
8231
|
-
var isStaticAssetPath = (s) => s.startsWith("/");
|
|
8231
|
+
var isStaticAssetPath = (s) => s.startsWith("/") || s.startsWith("./");
|
|
8232
8232
|
|
|
8233
8233
|
// lib/utils/resolveStaticFileImport.ts
|
|
8234
8234
|
import Debug4 from "debug";
|
|
@@ -8237,10 +8237,11 @@ var resolveStaticFileImportDebug = Debug4(
|
|
|
8237
8237
|
);
|
|
8238
8238
|
async function resolveStaticFileImport(path, platform) {
|
|
8239
8239
|
if (!path) return path;
|
|
8240
|
+
const normalizedPath = path.startsWith("./") ? path.slice(1) : path;
|
|
8240
8241
|
const resolver = platform?.resolveProjectStaticFileImportUrl;
|
|
8241
|
-
if (resolver && path.startsWith("/")) {
|
|
8242
|
+
if (resolver && (path.startsWith("/") || path.startsWith("./"))) {
|
|
8242
8243
|
try {
|
|
8243
|
-
const resolved = await resolver(
|
|
8244
|
+
const resolved = await resolver(normalizedPath);
|
|
8244
8245
|
if (resolved) return resolved;
|
|
8245
8246
|
} catch (error) {
|
|
8246
8247
|
resolveStaticFileImportDebug(
|
|
@@ -8249,7 +8250,7 @@ async function resolveStaticFileImport(path, platform) {
|
|
|
8249
8250
|
);
|
|
8250
8251
|
}
|
|
8251
8252
|
}
|
|
8252
|
-
return constructAssetUrl(
|
|
8253
|
+
return constructAssetUrl(normalizedPath, platform?.projectBaseUrl);
|
|
8253
8254
|
}
|
|
8254
8255
|
|
|
8255
8256
|
// lib/components/base-components/NormalComponent/NormalComponent_doInitialPcbFootprintStringRender.ts
|
|
@@ -21317,7 +21318,7 @@ import { identity as identity5 } from "transformation-matrix";
|
|
|
21317
21318
|
var package_default = {
|
|
21318
21319
|
name: "@tscircuit/core",
|
|
21319
21320
|
type: "module",
|
|
21320
|
-
version: "0.0.
|
|
21321
|
+
version: "0.0.997",
|
|
21321
21322
|
types: "dist/index.d.ts",
|
|
21322
21323
|
main: "dist/index.js",
|
|
21323
21324
|
module: "dist/index.js",
|