@rings-webgpu/core 1.0.24 → 1.0.25

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.
@@ -32705,9 +32705,32 @@ fn CsMain( @builtin(workgroup_id) workgroup_id : vec3<u32> , @builtin(global_inv
32705
32705
  return url.substring(0, s_pos);
32706
32706
  }
32707
32707
  static normalizePath(url) {
32708
- var tmp = url.replaceAll(`//`, `/`);
32709
- tmp = tmp.replaceAll(`\\`, `/`);
32710
- return tmp;
32708
+ if (!url) {
32709
+ return url;
32710
+ }
32711
+ let normalized = url.replace(/\\/g, "/");
32712
+ const preserveLeadingDoubleSlash = normalized.startsWith("//");
32713
+ const protectedTokens = [];
32714
+ let tokenIndex = 0;
32715
+ normalized = normalized.replace(
32716
+ /([a-zA-Z][a-zA-Z0-9+\-.]*):\/{2}/g,
32717
+ (match, scheme, offset) => {
32718
+ if (scheme.length === 1 && offset === 0) {
32719
+ return match;
32720
+ }
32721
+ const token = `__SCHEME_SLASH_${tokenIndex++}__`;
32722
+ protectedTokens.push(token);
32723
+ return `${scheme}:${token}`;
32724
+ }
32725
+ );
32726
+ normalized = normalized.replace(/\/{2,}/g, "/");
32727
+ protectedTokens.forEach((token) => {
32728
+ normalized = normalized.replace(token, "//");
32729
+ });
32730
+ if (preserveLeadingDoubleSlash) {
32731
+ normalized = `//${normalized.replace(/^\/+/, "")}`;
32732
+ }
32733
+ return normalized;
32711
32734
  }
32712
32735
  static getStringList(str, char = ";") {
32713
32736
  return str.split(char);
@@ -41272,7 +41295,7 @@ else if (typeof exports === 'object')
41272
41295
  }
41273
41296
  }
41274
41297
 
41275
- const version = "1.0.23";
41298
+ const version = "1.0.24";
41276
41299
 
41277
41300
  class Engine3D {
41278
41301
  /**
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rings-webgpu/core",
3
- "version": "1.0.24",
3
+ "version": "1.0.25",
4
4
  "description": "Rings webgpu Engine",
5
5
  "main": "index.js",
6
6
  "exports": {