vis-core 0.33.4 → 0.33.5
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/asyncToGenerator-DAj9B9-Q.js +1 -0
- package/dist/editor.d.ts +32545 -0
- package/dist/editor.js +1 -0
- package/dist/index.d.ts +273 -311
- package/dist/index.js +1 -21
- package/dist/io.d.ts +24 -0
- package/dist/io.js +1 -0
- package/dist/json-CWeSNhIM.js +21 -0
- package/dist/jsonFetch-CZU-BFk-.js +1 -0
- package/package.json +19 -2
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{n as e,t}from"./asyncToGenerator-DAj9B9-Q.js";var s,n,r,i=new class{constructor(t=32,s=67108864){e(this,"pending",/* @__PURE__ */new Map),e(this,"values",/* @__PURE__ */new Map),e(this,"bytes",0),e(this,"maxEntries",void 0),e(this,"maxBytes",void 0),this.maxEntries=t,this.maxBytes=s}load(e,t){const s=this.values.get(e);if(s)return this.values.delete(e),this.values.set(e,s),Promise.resolve(s);const n=this.pending.get(e);if(n)return n;const r=Promise.resolve().then(t).then(t=>{if(this.pending.get(e)===r&&(this.pending.delete(e),this.maxEntries>0&&t.bytes<=this.maxBytes))for(this.values.set(e,t),this.bytes+=t.bytes;this.values.size>this.maxEntries||this.bytes>this.maxBytes;)this.deleteValue(this.values.keys().next().value);return t},t=>{throw this.pending.get(e)===r&&this.pending.delete(e),t});return this.pending.set(e,r),r}deleteValue(e){const t=this.values.get(e);t&&(this.bytes-=t.bytes),this.values.delete(e)}clear(e){void 0!==e?(this.pending.delete(e),this.deleteValue(e)):(this.pending.clear(),this.values.clear(),this.bytes=0)}},o=e=>!(!e.endsWith(".gzip")&&!e.endsWith(".gz")),a=(s=t(function*(e,t,s=o){const n=yield window.fetch(e);if(!n.ok){try{var r;yield null===(r=n.body)||void 0===r?void 0:r.cancel()}catch(h){}throw new Error("Network response was not ok.")}let i=n;if(t)try{i=((e,t)=>{const s=Number(e.headers.get("content-length"))||0;let n=0;return e.body?new globalThis.Response(e.body.pipeThrough(new globalThis.TransformStream({start(){t({percent:0,transferredBytes:0,totalBytes:s})},transform(e,r){n+=e.byteLength,t({percent:0===s?0:n/s,transferredBytes:n,totalBytes:s}),r.enqueue(e)},flush(){t({percent:1,transferredBytes:n,totalBytes:s})}})),{status:e.status,statusText:e.statusText,headers:e.headers}):(t({percent:1,totalBytes:s,transferredBytes:n}),new globalThis.Response(null,{status:e.status,statusText:e.statusText,headers:e.headers}))})(i,t)}catch(d){try{var a;yield null===(a=n.body)||void 0===a?void 0:a.cancel(d)}catch(u){}throw d}if(s(e)&&"gzip"!==i.headers.get("content-encoding")){const e=new DecompressionStream("gzip"),t=i.body.pipeThrough(e);i=new Response(t)}const l=yield i.text();return{json:JSON.parse(l),bytes:2*l.length}}),function(e,t){return s.apply(this,arguments)}),l=(n=t(function*(e,t,s=o,n){const r=((e,t)=>{const s=null==t?void 0:t.cache;if(!1===s)return{enabled:!1,key:e,clone:!1};if(!0===s)return{enabled:!0,key:e,clone:!0};if(s&&"object"==typeof s){var n,r,i;const t=null===(n=s.enabled)||void 0===n||n;return{enabled:t,key:null!==(r=s.key)&&void 0!==r?r:e,clone:!!t&&(null===(i=s.clone)||void 0===i||i)}}return{enabled:!1,key:e,clone:!1}})(e,n),l=()=>a(e,t,s),h=r.enabled?i.load(r.key,l):l();try{const e=(yield h).json;return{res:r.enabled&&r.clone?structuredClone(e):e,err:void 0}}catch(d){return{res:void 0,err:d}}}),function(e,t){return n.apply(this,arguments)}),h=/^(?:[a-z]+:)?\/\//i,d=(r=t(function*(e,t){const{res:s,err:n}=yield l(((e,t="")=>h.test(e)?e:`${t.endsWith("/")?t.slice(0,-1):t}${e.startsWith("/")?e:`/${e}`}`)(e,null==t?void 0:t.assetsPrefix),void 0,void 0,(null==t?void 0:t.fetchOptions)||{cache:!0});if(n)throw n;return s}),function(e,t){return r.apply(this,arguments)});export{l as n,d as r,o as t};
|
package/package.json
CHANGED
|
@@ -1,12 +1,29 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "vis-core",
|
|
3
|
-
"version": "0.33.
|
|
3
|
+
"version": "0.33.5",
|
|
4
4
|
"private": false,
|
|
5
5
|
"type": "module",
|
|
6
6
|
"prettier": "fe-stack/prettier.json",
|
|
7
7
|
"types": "dist/index.d.ts",
|
|
8
8
|
"main": "dist/index.js",
|
|
9
9
|
"module": "dist/index.js",
|
|
10
|
+
"exports": {
|
|
11
|
+
".": {
|
|
12
|
+
"types": "./dist/index.d.ts",
|
|
13
|
+
"import": "./dist/index.js",
|
|
14
|
+
"default": "./dist/index.js"
|
|
15
|
+
},
|
|
16
|
+
"./editor": {
|
|
17
|
+
"types": "./dist/editor.d.ts",
|
|
18
|
+
"import": "./dist/editor.js",
|
|
19
|
+
"default": "./dist/editor.js"
|
|
20
|
+
},
|
|
21
|
+
"./io": {
|
|
22
|
+
"types": "./dist/io.d.ts",
|
|
23
|
+
"import": "./dist/io.js",
|
|
24
|
+
"default": "./dist/io.js"
|
|
25
|
+
}
|
|
26
|
+
},
|
|
10
27
|
"files": [
|
|
11
28
|
"dist"
|
|
12
29
|
],
|
|
@@ -29,7 +46,7 @@
|
|
|
29
46
|
"esus-lite": "^0.2.8",
|
|
30
47
|
"events": "^3.3.0",
|
|
31
48
|
"geojson-cn": "^0.2.5",
|
|
32
|
-
"gl-draw": "0.19.
|
|
49
|
+
"gl-draw": "0.19.5",
|
|
33
50
|
"three": "0.186.1"
|
|
34
51
|
},
|
|
35
52
|
"devDependencies": {
|