vislite 0.4.1-beta.0 → 0.4.1-beta.3

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.
Files changed (61) hide show
  1. package/CHANGELOG +4 -1
  2. package/lib/Buffer/index.umd.js +2 -2
  3. package/lib/Buffer/index.umd.min.js +2 -2
  4. package/lib/Canvas/index.umd.js +2 -2
  5. package/lib/Canvas/index.umd.min.js +2 -2
  6. package/lib/Cardinal/index.umd.js +2 -2
  7. package/lib/Cardinal/index.umd.min.js +2 -2
  8. package/lib/Eoap/index.umd.js +2 -2
  9. package/lib/Eoap/index.umd.min.js +2 -2
  10. package/lib/Hermite/index.umd.js +2 -2
  11. package/lib/Hermite/index.umd.min.js +2 -2
  12. package/lib/Matrix4/index.umd.js +2 -2
  13. package/lib/Matrix4/index.umd.min.js +2 -2
  14. package/lib/Mercator/index.umd.js +2 -2
  15. package/lib/Mercator/index.umd.min.js +2 -2
  16. package/lib/OralCanvas/index.es.js +2 -2
  17. package/lib/OralCanvas/index.es.min.js +2 -2
  18. package/lib/OralWebGL/index.es.js +2 -2
  19. package/lib/OralWebGL/index.es.min.js +2 -2
  20. package/lib/SVG/index.umd.js +6 -6
  21. package/lib/SVG/index.umd.min.js +3 -3
  22. package/lib/Shader/index.umd.js +2 -2
  23. package/lib/Shader/index.umd.min.js +2 -2
  24. package/lib/Texture/index.umd.js +2 -2
  25. package/lib/Texture/index.umd.min.js +2 -2
  26. package/lib/TreeLayout/index.umd.js +2 -2
  27. package/lib/TreeLayout/index.umd.min.js +2 -2
  28. package/lib/WebGL/index.umd.js +2 -2
  29. package/lib/WebGL/index.umd.min.js +2 -2
  30. package/lib/animation/index.umd.js +2 -2
  31. package/lib/animation/index.umd.min.js +2 -2
  32. package/lib/formatColor/index.umd.js +2 -2
  33. package/lib/formatColor/index.umd.min.js +2 -2
  34. package/lib/getLoopColors/index.umd.js +2 -2
  35. package/lib/getLoopColors/index.umd.min.js +2 -2
  36. package/lib/getWebGLContext/index.umd.js +2 -2
  37. package/lib/getWebGLContext/index.umd.min.js +2 -2
  38. package/lib/index.umd.js +9 -7
  39. package/lib/index.umd.min.js +3 -3
  40. package/lib/resizeObserver/index.umd.js +2 -2
  41. package/lib/resizeObserver/index.umd.min.js +2 -2
  42. package/lib/rotate/index.umd.js +2 -2
  43. package/lib/rotate/index.umd.min.js +2 -2
  44. package/lib/ruler/index.umd.js +2 -2
  45. package/lib/ruler/index.umd.min.js +2 -2
  46. package/lib/throttle/index.umd.js +5 -3
  47. package/lib/throttle/index.umd.min.js +3 -3
  48. package/lib/viewHandler/index.umd.js +2 -2
  49. package/lib/viewHandler/index.umd.min.js +2 -2
  50. package/package.json +9 -2
  51. package/src/common/canvas/painter.ts +4 -2
  52. package/src/common/svg/index.ts +316 -315
  53. package/src/throttle.ts +4 -2
  54. package/types/CanvasConfig.d.ts +6 -4
  55. package/types/Object3D.d.ts +4 -3
  56. package/types/SVGConfig.d.ts +6 -4
  57. package/types/Shader.d.ts +1 -1
  58. package/types/Tree.d.ts +32 -0
  59. package/types/TreeOption.d.ts +5 -2
  60. package/types/painterConfig.d.ts +3 -0
  61. package/types/throttleOption.d.ts +4 -2
@@ -1,12 +1,12 @@
1
1
  /*!
2
- * VISLite JavaScript Library v0.4.1-beta.0
2
+ * VISLite JavaScript Library v0.4.1-beta.3
3
3
  * git+https://github.com/oi-contrib/VISLite.git
4
4
  *
5
5
  * Copyright zxl20070701
6
6
  * Released under the MIT license
7
7
  * https://zxl20070701.github.io/notebook/home.html
8
8
  *
9
- * Publish Date: Wed Aug 23 2023 22:06:27 GMT+0800 (中国标准时间)
9
+ * Publish Date: Fri Sep 01 2023 00:05:31 GMT+0800 (中国标准时间)
10
10
  */
11
11
  (function (global, factory) {
12
12
  typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :
@@ -1,11 +1,11 @@
1
1
  /*!
2
- * VISLite JavaScript Library v0.4.1-beta.0
2
+ * VISLite JavaScript Library v0.4.1-beta.3
3
3
  * git+https://github.com/oi-contrib/VISLite.git
4
4
  *
5
5
  * Copyright zxl20070701
6
6
  * Released under the MIT license
7
7
  * https://zxl20070701.github.io/notebook/home.html
8
8
  *
9
- * Publish Date: Wed Aug 23 2023 22:06:27 GMT+0800 (中国标准时间)
9
+ * Publish Date: Fri Sep 01 2023 00:05:31 GMT+0800 (中国标准时间)
10
10
  */
11
11
  var n,r;n=this,r=function(){"use strict";return function(n,r,e,t){if(n<r){var i=r;r=n,n=i}else if(n==r)return[n];var f=function(n){for(var r=n<100&&n>-100?10:.1,e=-1,t=n;10==r?t>=-100&&t<=100:t<=-100||t>=100;)e+=1,t*=r;if(10==r)return Math.pow(10,e);for(var i="0.",f=1;f<e;f++)i+="0";return+(i+"1")}(n-r),u=Math.ceil((n-r)*f/e),o=function(e){var t=({3:2,4:5,6:5,7:5,8:10,9:10,11:10,12:10,13:15,14:15,16:15,17:15,18:20,19:20,21:20,22:20,23:25,24:25,26:25,27:25}[u+e]||u+e)/f,i=Math.floor(r/t)*t,o=[];o.push(i);for(var a=1;o[o.length-1]<n;a++)o.push(i+t*a);return o},a=o(0),m=function(){for(var n=[],e=a[a.length-1]-t.max,i=0;i<a.length;i++)i+1<a.length&&a[i+1]-e<r||n.push(a[i]-e);return n},l=function(){for(var r=[],e=a[0]-t.min,i=0;i<a.length&&(r[i]=a[i]-e,!(n<=r[i]));i++);return r};if(t){if("max"in t&&"min"in t&&t.max>=n&&t.min<=r){var h=function(){if(a[0]>=t.min&&a[a.length-1]<=t.max)return!0;var n=m();if(n[0]>=t.min&&n[n.length-1]<=t.max)return a=n,!0;var r=l();return r[0]>=t.min&&r[n.length-1]<=t.max?(a=r,!0):void 0};if(h())return a;for(var v=1;v<100;v++){if(a=o(v),h())return a;if(a=o(-v),h())return a}}"max"in t&&t.max>=n?t.max<a[a.length-1]&&(a=m()):"min"in t&&t.min<=r&&t.min>a[0]&&(a=l())}return a}},"object"==typeof exports&&"undefined"!=typeof module?module.exports=r():"function"==typeof define&&define.amd?define(r):(n="undefined"!=typeof globalThis?globalThis:n||self).VISLite_ruler=r();
@@ -1,12 +1,12 @@
1
1
  /*!
2
- * VISLite JavaScript Library v0.4.1-beta.0
2
+ * VISLite JavaScript Library v0.4.1-beta.3
3
3
  * git+https://github.com/oi-contrib/VISLite.git
4
4
  *
5
5
  * Copyright zxl20070701
6
6
  * Released under the MIT license
7
7
  * https://zxl20070701.github.io/notebook/home.html
8
8
  *
9
- * Publish Date: Wed Aug 23 2023 22:06:27 GMT+0800 (中国标准时间)
9
+ * Publish Date: Fri Sep 01 2023 00:05:31 GMT+0800 (中国标准时间)
10
10
  */
11
11
  (function (global, factory) {
12
12
  typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :
@@ -31,8 +31,10 @@
31
31
  var hadInterval = false;
32
32
  var hadClick = false;
33
33
  var oneClick = false;
34
+ var arg;
34
35
  return function () {
35
- var _this = this, arg = arguments;
36
+ var _this = this;
37
+ arg = arguments;
36
38
  if (!hadInterval) {
37
39
  if (option.opportunity != 'end') {
38
40
  callback.apply(_this, arg);
@@ -1,11 +1,11 @@
1
1
  /*!
2
- * VISLite JavaScript Library v0.4.1-beta.0
2
+ * VISLite JavaScript Library v0.4.1-beta.3
3
3
  * git+https://github.com/oi-contrib/VISLite.git
4
4
  *
5
5
  * Copyright zxl20070701
6
6
  * Released under the MIT license
7
7
  * https://zxl20070701.github.io/notebook/home.html
8
8
  *
9
- * Publish Date: Wed Aug 23 2023 22:06:27 GMT+0800 (中国标准时间)
9
+ * Publish Date: Fri Sep 01 2023 00:05:31 GMT+0800 (中国标准时间)
10
10
  */
11
- var e,t;e=this,t=function(){"use strict";return function(e,t){void 0===t&&(t={}),t=function(e,t){for(var n in e)t[n]=e[n];return t}(t,{time:200,keep:!1,opportunity:"end"});var n=!1,o=!1,i=!1;return function(){var r=this,p=arguments;if(n)o=!0,i=!0;else{"end"!=t.opportunity&&e.apply(r,p),n=!0;var f=setInterval((function(){o?t.keep||e.apply(r,p):("begin"!=t.opportunity&&(i||"end"==t.opportunity)&&e.apply(r,p),n=!1,i=!1,clearInterval(f)),o=!1}),t.time)}}}},"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(e="undefined"!=typeof globalThis?globalThis:e||self).VISLite_throttle=t();
11
+ var e,t;e=this,t=function(){"use strict";return function(e,t){void 0===t&&(t={}),t=function(e,t){for(var n in e)t[n]=e[n];return t}(t,{time:200,keep:!1,opportunity:"end"});var n,o=!1,i=!1,r=!1;return function(){var p=this;if(n=arguments,o)i=!0,r=!0;else{"end"!=t.opportunity&&e.apply(p,n),o=!0;var f=setInterval((function(){i?t.keep||e.apply(p,n):("begin"!=t.opportunity&&(r||"end"==t.opportunity)&&e.apply(p,n),o=!1,r=!1,clearInterval(f)),i=!1}),t.time)}}}},"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(e="undefined"!=typeof globalThis?globalThis:e||self).VISLite_throttle=t();
@@ -1,12 +1,12 @@
1
1
  /*!
2
- * VISLite JavaScript Library v0.4.1-beta.0
2
+ * VISLite JavaScript Library v0.4.1-beta.3
3
3
  * git+https://github.com/oi-contrib/VISLite.git
4
4
  *
5
5
  * Copyright zxl20070701
6
6
  * Released under the MIT license
7
7
  * https://zxl20070701.github.io/notebook/home.html
8
8
  *
9
- * Publish Date: Wed Aug 23 2023 22:06:27 GMT+0800 (中国标准时间)
9
+ * Publish Date: Fri Sep 01 2023 00:05:31 GMT+0800 (中国标准时间)
10
10
  */
11
11
  (function (global, factory) {
12
12
  typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :
@@ -1,11 +1,11 @@
1
1
  /*!
2
- * VISLite JavaScript Library v0.4.1-beta.0
2
+ * VISLite JavaScript Library v0.4.1-beta.3
3
3
  * git+https://github.com/oi-contrib/VISLite.git
4
4
  *
5
5
  * Copyright zxl20070701
6
6
  * Released under the MIT license
7
7
  * https://zxl20070701.github.io/notebook/home.html
8
8
  *
9
- * Publish Date: Wed Aug 23 2023 22:06:27 GMT+0800 (中国标准时间)
9
+ * Publish Date: Fri Sep 01 2023 00:05:31 GMT+0800 (中国标准时间)
10
10
  */
11
11
  var e,n;e=this,n=function(){"use strict";var e=function(e,n){var t=e.getBoundingClientRect();return{x:n.clientX-t.left,y:n.clientY-t.top}};return function(n){var t=document.getElementsByTagName("body")[0];t.addEventListener("keydown",(function(e){var t=function(e){return{37:"left",38:"up",39:"right",40:"down"}[e.keyCode||e.which]}(e);"up"==t?n({type:"lookUp",normal:[],value:.1,event:e}):"down"==t?n({type:"lookDown",normal:[],value:.1,event:e}):"left"==t?n({type:"lookLeft",normal:[],value:.1,event:e}):"right"==t&&n({type:"lookRight",normal:[],value:.1,event:e})}));var o=null,i=function(i){if(null==o)n({type:"hover",normal:[],value:0,event:i});else{var u=e(t,i),l=[u.x-o.x,u.y-o.y],a=[l[1],l[0],0];if(0==a[0]&&0==a[1])return;n({type:"rotate",normal:a,value:.01*(Math.abs(u.x-o.x)+Math.abs(u.y-o.y)),event:i}),o=u}};t.addEventListener("mousedown",(function(n){o=e(t,n)})),t.addEventListener("mouseup",(function(e){o=null})),t.addEventListener("mousemove",(function(e){i(e)})),t.addEventListener("touchend",(function(e){o=null})),t.addEventListener("touchstart",(function(n){o=e(t,n)})),t.addEventListener("touchmove",(function(e){i(e.touches[0])}));var u=function(e,t){0!=e&&n({type:"scale",value:e<0?.899:1.101,normal:[],event:t})};t.addEventListener("mousewheel",(function(e){u(e.wheelDelta,e)})),window.addEventListener&&window.addEventListener("DOMMouseScroll",(function(e){u(-1*e.detail,e)}),!1)}},"object"==typeof exports&&"undefined"!=typeof module?module.exports=n():"function"==typeof define&&define.amd?define(n):(e="undefined"!=typeof globalThis?globalThis:e||self).VISLite_viewHandler=n();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "vislite",
3
- "version": "0.4.1-beta.0",
3
+ "version": "0.4.1-beta.3",
4
4
  "description": "灵活、快速、简单的数据可视化交互式跨端前端库",
5
5
  "main": "./lib/index.umd.min.js",
6
6
  "typings": "./types/index.d.ts",
@@ -27,7 +27,14 @@
27
27
  "miniprogram",
28
28
  "image2d",
29
29
  "image3d",
30
- "vislite"
30
+ "vislite",
31
+ "d3",
32
+ "three",
33
+ "echarts",
34
+ "datav",
35
+ "webgpu",
36
+ "layout",
37
+ "algorithm"
31
38
  ],
32
39
  "author": {
33
40
  "name": "zxl20070701",
@@ -1,3 +1,5 @@
1
+ import type { arcCapType } from '../../../types/painterConfig'
2
+
1
3
  import { initText, initArc, initCircle, initRect } from './config'
2
4
  import texts from './texts'
3
5
 
@@ -36,10 +38,10 @@ class Painter {
36
38
  "fontStyle": "normal",
37
39
 
38
40
  // 圆弧开始端闭合方式("butt"直线闭合、"round"圆帽闭合)
39
- "arcStartCap": 'butt',
41
+ "arcStartCap": <arcCapType>'butt',
40
42
 
41
43
  // 圆弧结束端闭合方式,和上一个类似
42
- "arcEndCap": 'butt'
44
+ "arcEndCap": <arcCapType>'butt'
43
45
  }
44
46
 
45
47
  private __initConfig = {