@visactor/vrender 0.22.2 → 0.22.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.
- package/cjs/index.d.ts +1 -1
- package/cjs/index.js +1 -1
- package/cjs/index.js.map +1 -1
- package/dist/index.es.js +12 -9
- package/dist/index.js +12 -9
- package/dist/index.min.js +1 -1
- package/es/index.d.ts +1 -1
- package/es/index.js +1 -1
- package/es/index.js.map +1 -1
- package/package.json +5 -5
package/cjs/index.d.ts
CHANGED
package/cjs/index.js
CHANGED
|
@@ -21,7 +21,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
21
21
|
|
|
22
22
|
const vrender_core_1 = require("@visactor/vrender-core"), vrender_kits_1 = require("@visactor/vrender-kits"), vrender_kits_2 = require("@visactor/vrender-kits");
|
|
23
23
|
|
|
24
|
-
exports.version = "0.22.
|
|
24
|
+
exports.version = "0.22.3", (0, vrender_core_1.preLoadAllModule)(), (0, vrender_core_1.isBrowserEnv)() ? (0,
|
|
25
25
|
vrender_kits_1.loadBrowserEnv)(vrender_core_1.container) : (0, vrender_core_1.isNodeEnv)() && (0,
|
|
26
26
|
vrender_kits_1.loadNodeEnv)(vrender_core_1.container), (0, vrender_kits_2.registerArc)(),
|
|
27
27
|
(0, vrender_kits_2.registerArc3d)(), (0, vrender_kits_2.registerArea)(), (0, vrender_kits_2.registerCircle)(),
|
package/cjs/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AAAA,kCAAgC;AAChC,yDAWgC;AAChC,yDAAqE;AACrE,yDAmBgC;AAEnB,QAAA,OAAO,GAAG,QAAQ,CAAC;AAEhC,IAAA,+BAAgB,GAAE,CAAC;AAEnB,IAAI,IAAA,2BAAY,GAAE,EAAE;IAClB,IAAA,6BAAc,EAAC,wBAAS,CAAC,CAAC;CAC3B;KAAM,IAAI,IAAA,wBAAS,GAAE,EAAE;IACtB,IAAA,0BAAW,EAAC,wBAAS,CAAC,CAAC;CACxB;AACD,IAAA,0BAAW,GAAE,CAAC;AACd,IAAA,4BAAa,GAAE,CAAC;AAChB,IAAA,2BAAY,GAAE,CAAC;AACf,IAAA,6BAAc,GAAE,CAAC;AACjB,IAAA,4BAAa,GAAE,CAAC;AAChB,IAAA,4BAAa,GAAE,CAAC;AAChB,IAAA,4BAAa,GAAE,CAAC;AAChB,IAAA,2BAAY,GAAE,CAAC;AACf,IAAA,2BAAY,GAAE,CAAC;AACf,IAAA,8BAAe,GAAE,CAAC;AAClB,IAAA,gCAAiB,GAAE,CAAC;AACpB,IAAA,2BAAY,GAAE,CAAC;AACf,IAAA,6BAAc,GAAE,CAAC;AACjB,IAAA,+BAAgB,GAAE,CAAC;AACnB,IAAA,iCAAkB,GAAE,CAAC;AACrB,IAAA,6BAAc,GAAE,CAAC;AACjB,IAAA,2BAAY,GAAE,CAAC;AACf,IAAA,+BAAgB,GAAE,CAAC;AAEnB,IAAA,uCAAwB,GAAE,CAAC;AAC3B,IAAA,4CAA6B,GAAE,CAAC;AAChC,IAAA,0CAA2B,GAAE,CAAC;AAC9B,IAAA,2CAA4B,GAAE,CAAC;AAC/B,IAAA,uCAAwB,GAAE,CAAC;AAC3B,IAAA,kCAAmB,GAAE,CAAC;AACtB,yDAAuC;AACvC,yDAAuC","file":"index.js","sourcesContent":["import '@visactor/vrender-core';\nimport {\n container,\n isBrowserEnv,\n isNodeEnv,\n preLoadAllModule,\n registerFlexLayoutPlugin,\n registerViewTransform3dPlugin,\n registerHtmlAttributePlugin,\n registerReactAttributePlugin,\n registerDirectionalLight,\n registerOrthoCamera\n} from '@visactor/vrender-core';\nimport { loadBrowserEnv, loadNodeEnv } from '@visactor/vrender-kits';\nimport {\n registerArc,\n registerArc3d,\n registerArea,\n registerCircle,\n registerGlyph,\n registerGroup,\n registerImage,\n registerLine,\n registerPath,\n registerPolygon,\n registerPyramid3d,\n registerRect,\n registerRect3d,\n registerRichtext,\n registerShadowRoot,\n registerSymbol,\n registerText,\n registerWrapText\n} from '@visactor/vrender-kits';\n// 导出版本号\nexport const version = \"0.22.
|
|
1
|
+
{"version":3,"sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AAAA,kCAAgC;AAChC,yDAWgC;AAChC,yDAAqE;AACrE,yDAmBgC;AAEnB,QAAA,OAAO,GAAG,QAAQ,CAAC;AAEhC,IAAA,+BAAgB,GAAE,CAAC;AAEnB,IAAI,IAAA,2BAAY,GAAE,EAAE;IAClB,IAAA,6BAAc,EAAC,wBAAS,CAAC,CAAC;CAC3B;KAAM,IAAI,IAAA,wBAAS,GAAE,EAAE;IACtB,IAAA,0BAAW,EAAC,wBAAS,CAAC,CAAC;CACxB;AACD,IAAA,0BAAW,GAAE,CAAC;AACd,IAAA,4BAAa,GAAE,CAAC;AAChB,IAAA,2BAAY,GAAE,CAAC;AACf,IAAA,6BAAc,GAAE,CAAC;AACjB,IAAA,4BAAa,GAAE,CAAC;AAChB,IAAA,4BAAa,GAAE,CAAC;AAChB,IAAA,4BAAa,GAAE,CAAC;AAChB,IAAA,2BAAY,GAAE,CAAC;AACf,IAAA,2BAAY,GAAE,CAAC;AACf,IAAA,8BAAe,GAAE,CAAC;AAClB,IAAA,gCAAiB,GAAE,CAAC;AACpB,IAAA,2BAAY,GAAE,CAAC;AACf,IAAA,6BAAc,GAAE,CAAC;AACjB,IAAA,+BAAgB,GAAE,CAAC;AACnB,IAAA,iCAAkB,GAAE,CAAC;AACrB,IAAA,6BAAc,GAAE,CAAC;AACjB,IAAA,2BAAY,GAAE,CAAC;AACf,IAAA,+BAAgB,GAAE,CAAC;AAEnB,IAAA,uCAAwB,GAAE,CAAC;AAC3B,IAAA,4CAA6B,GAAE,CAAC;AAChC,IAAA,0CAA2B,GAAE,CAAC;AAC9B,IAAA,2CAA4B,GAAE,CAAC;AAC/B,IAAA,uCAAwB,GAAE,CAAC;AAC3B,IAAA,kCAAmB,GAAE,CAAC;AACtB,yDAAuC;AACvC,yDAAuC","file":"index.js","sourcesContent":["import '@visactor/vrender-core';\nimport {\n container,\n isBrowserEnv,\n isNodeEnv,\n preLoadAllModule,\n registerFlexLayoutPlugin,\n registerViewTransform3dPlugin,\n registerHtmlAttributePlugin,\n registerReactAttributePlugin,\n registerDirectionalLight,\n registerOrthoCamera\n} from '@visactor/vrender-core';\nimport { loadBrowserEnv, loadNodeEnv } from '@visactor/vrender-kits';\nimport {\n registerArc,\n registerArc3d,\n registerArea,\n registerCircle,\n registerGlyph,\n registerGroup,\n registerImage,\n registerLine,\n registerPath,\n registerPolygon,\n registerPyramid3d,\n registerRect,\n registerRect3d,\n registerRichtext,\n registerShadowRoot,\n registerSymbol,\n registerText,\n registerWrapText\n} from '@visactor/vrender-kits';\n// 导出版本号\nexport const version = \"0.22.3\";\n\npreLoadAllModule();\n\nif (isBrowserEnv()) {\n loadBrowserEnv(container);\n} else if (isNodeEnv()) {\n loadNodeEnv(container);\n}\nregisterArc();\nregisterArc3d();\nregisterArea();\nregisterCircle();\nregisterGlyph();\nregisterGroup();\nregisterImage();\nregisterLine();\nregisterPath();\nregisterPolygon();\nregisterPyramid3d();\nregisterRect();\nregisterRect3d();\nregisterRichtext();\nregisterShadowRoot();\nregisterSymbol();\nregisterText();\nregisterWrapText();\n\nregisterFlexLayoutPlugin();\nregisterViewTransform3dPlugin();\nregisterHtmlAttributePlugin();\nregisterReactAttributePlugin();\nregisterDirectionalLight();\nregisterOrthoCamera();\nexport * from '@visactor/vrender-core';\nexport * from '@visactor/vrender-kits';\n"]}
|
package/dist/index.es.js
CHANGED
|
@@ -20437,7 +20437,8 @@ function getDefaultCharacterConfig(attribute) {
|
|
|
20437
20437
|
stroke = !1,
|
|
20438
20438
|
fontWeight = "normal",
|
|
20439
20439
|
lineHeight: lineHeight,
|
|
20440
|
-
fontFamily = "Arial"
|
|
20440
|
+
fontFamily = "Arial",
|
|
20441
|
+
textAlign: textAlign
|
|
20441
20442
|
} = attribute;
|
|
20442
20443
|
let {
|
|
20443
20444
|
fontSize = 12
|
|
@@ -20448,7 +20449,8 @@ function getDefaultCharacterConfig(attribute) {
|
|
|
20448
20449
|
fontSize: fontSize,
|
|
20449
20450
|
fontWeight: fontWeight,
|
|
20450
20451
|
fontFamily: fontFamily,
|
|
20451
|
-
lineHeight: lineHeight
|
|
20452
|
+
lineHeight: lineHeight,
|
|
20453
|
+
textAlign: textAlign
|
|
20452
20454
|
};
|
|
20453
20455
|
}
|
|
20454
20456
|
function findConfigIndexByCursorIdx(textConfig, cursorIndex) {
|
|
@@ -20497,9 +20499,9 @@ class EditModule {
|
|
|
20497
20499
|
} else {
|
|
20498
20500
|
const configIdx = this.composingConfigIdx,
|
|
20499
20501
|
lastConfig = textConfig[configIdx] || textConfig[configIdx - 1];
|
|
20500
|
-
textConfig.splice(configIdx, 0, Object.assign(Object.assign({
|
|
20502
|
+
textConfig.splice(configIdx, 0, Object.assign(Object.assign(Object.assign({
|
|
20501
20503
|
fill: "black"
|
|
20502
|
-
}, lastConfig), {
|
|
20504
|
+
}, getDefaultCharacterConfig(this.currRt.attribute)), lastConfig), {
|
|
20503
20505
|
text: ""
|
|
20504
20506
|
}));
|
|
20505
20507
|
}
|
|
@@ -20893,6 +20895,7 @@ class RichTextEditPlugin {
|
|
|
20893
20895
|
boundsStrokeWhenInput: boundsStrokeWhenInput
|
|
20894
20896
|
} = editOptions;
|
|
20895
20897
|
if (!editOptions || !boundsStrokeWhenInput) return;
|
|
20898
|
+
this.offsetShadowRoot();
|
|
20896
20899
|
const b = this.getRichTextAABBBounds(this.currRt),
|
|
20897
20900
|
height = b.height(),
|
|
20898
20901
|
width = b.width();
|
|
@@ -20907,7 +20910,7 @@ class RichTextEditPlugin {
|
|
|
20907
20910
|
zIndex: -1
|
|
20908
20911
|
});
|
|
20909
20912
|
const shadow = this.getShadow(this.currRt);
|
|
20910
|
-
this.addEditLineOrBgOrBounds(this.shadowBounds, shadow), this.offsetLineBgAndShadowBounds()
|
|
20913
|
+
this.addEditLineOrBgOrBounds(this.shadowBounds, shadow), this.offsetLineBgAndShadowBounds();
|
|
20911
20914
|
}
|
|
20912
20915
|
trySyncPlaceholderToTextConfig() {
|
|
20913
20916
|
if (!this.currRt) return;
|
|
@@ -21170,8 +21173,8 @@ class RichTextEditPlugin {
|
|
|
21170
21173
|
getShadow(rt) {
|
|
21171
21174
|
const sr = rt.shadowRoot || rt.attachShadow();
|
|
21172
21175
|
return sr.setAttributes({
|
|
21173
|
-
width:
|
|
21174
|
-
height:
|
|
21176
|
+
width: 0,
|
|
21177
|
+
height: 0
|
|
21175
21178
|
}), sr;
|
|
21176
21179
|
}
|
|
21177
21180
|
getLineByPoint(cache, p1) {
|
|
@@ -25021,7 +25024,7 @@ class Gesture extends EventEmitter {
|
|
|
25021
25024
|
let config = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
|
25022
25025
|
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
25023
25026
|
super(), this.cachedEvents = [], this.startPoints = [], this.processEvent = {}, this.throttleTimer = 0, this.emitThrottles = [], this.lastTapTarget = null, this.onStart = ev => {
|
|
25024
|
-
this.
|
|
25027
|
+
this.startTime = clock.now();
|
|
25025
25028
|
const {
|
|
25026
25029
|
cachedEvents: cachedEvents,
|
|
25027
25030
|
startPoints: startPoints
|
|
@@ -31610,7 +31613,7 @@ function particleEffect(ctx, row, column, rowCount, columnCount, ratio, graphic)
|
|
|
31610
31613
|
|
|
31611
31614
|
const roughModule = _roughModule;
|
|
31612
31615
|
|
|
31613
|
-
const version = "0.22.
|
|
31616
|
+
const version = "0.22.3";
|
|
31614
31617
|
preLoadAllModule();
|
|
31615
31618
|
if (isBrowserEnv()) {
|
|
31616
31619
|
loadBrowserEnv(container);
|
package/dist/index.js
CHANGED
|
@@ -20443,7 +20443,8 @@
|
|
|
20443
20443
|
stroke = !1,
|
|
20444
20444
|
fontWeight = "normal",
|
|
20445
20445
|
lineHeight: lineHeight,
|
|
20446
|
-
fontFamily = "Arial"
|
|
20446
|
+
fontFamily = "Arial",
|
|
20447
|
+
textAlign: textAlign
|
|
20447
20448
|
} = attribute;
|
|
20448
20449
|
let {
|
|
20449
20450
|
fontSize = 12
|
|
@@ -20454,7 +20455,8 @@
|
|
|
20454
20455
|
fontSize: fontSize,
|
|
20455
20456
|
fontWeight: fontWeight,
|
|
20456
20457
|
fontFamily: fontFamily,
|
|
20457
|
-
lineHeight: lineHeight
|
|
20458
|
+
lineHeight: lineHeight,
|
|
20459
|
+
textAlign: textAlign
|
|
20458
20460
|
};
|
|
20459
20461
|
}
|
|
20460
20462
|
function findConfigIndexByCursorIdx(textConfig, cursorIndex) {
|
|
@@ -20503,9 +20505,9 @@
|
|
|
20503
20505
|
} else {
|
|
20504
20506
|
const configIdx = this.composingConfigIdx,
|
|
20505
20507
|
lastConfig = textConfig[configIdx] || textConfig[configIdx - 1];
|
|
20506
|
-
textConfig.splice(configIdx, 0, Object.assign(Object.assign({
|
|
20508
|
+
textConfig.splice(configIdx, 0, Object.assign(Object.assign(Object.assign({
|
|
20507
20509
|
fill: "black"
|
|
20508
|
-
}, lastConfig), {
|
|
20510
|
+
}, getDefaultCharacterConfig(this.currRt.attribute)), lastConfig), {
|
|
20509
20511
|
text: ""
|
|
20510
20512
|
}));
|
|
20511
20513
|
}
|
|
@@ -20899,6 +20901,7 @@
|
|
|
20899
20901
|
boundsStrokeWhenInput: boundsStrokeWhenInput
|
|
20900
20902
|
} = editOptions;
|
|
20901
20903
|
if (!editOptions || !boundsStrokeWhenInput) return;
|
|
20904
|
+
this.offsetShadowRoot();
|
|
20902
20905
|
const b = this.getRichTextAABBBounds(this.currRt),
|
|
20903
20906
|
height = b.height(),
|
|
20904
20907
|
width = b.width();
|
|
@@ -20913,7 +20916,7 @@
|
|
|
20913
20916
|
zIndex: -1
|
|
20914
20917
|
});
|
|
20915
20918
|
const shadow = this.getShadow(this.currRt);
|
|
20916
|
-
this.addEditLineOrBgOrBounds(this.shadowBounds, shadow), this.offsetLineBgAndShadowBounds()
|
|
20919
|
+
this.addEditLineOrBgOrBounds(this.shadowBounds, shadow), this.offsetLineBgAndShadowBounds();
|
|
20917
20920
|
}
|
|
20918
20921
|
trySyncPlaceholderToTextConfig() {
|
|
20919
20922
|
if (!this.currRt) return;
|
|
@@ -21176,8 +21179,8 @@
|
|
|
21176
21179
|
getShadow(rt) {
|
|
21177
21180
|
const sr = rt.shadowRoot || rt.attachShadow();
|
|
21178
21181
|
return sr.setAttributes({
|
|
21179
|
-
width:
|
|
21180
|
-
height:
|
|
21182
|
+
width: 0,
|
|
21183
|
+
height: 0
|
|
21181
21184
|
}), sr;
|
|
21182
21185
|
}
|
|
21183
21186
|
getLineByPoint(cache, p1) {
|
|
@@ -25027,7 +25030,7 @@
|
|
|
25027
25030
|
let config = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
|
25028
25031
|
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
25029
25032
|
super(), this.cachedEvents = [], this.startPoints = [], this.processEvent = {}, this.throttleTimer = 0, this.emitThrottles = [], this.lastTapTarget = null, this.onStart = ev => {
|
|
25030
|
-
this.
|
|
25033
|
+
this.startTime = clock.now();
|
|
25031
25034
|
const {
|
|
25032
25035
|
cachedEvents: cachedEvents,
|
|
25033
25036
|
startPoints: startPoints
|
|
@@ -31616,7 +31619,7 @@
|
|
|
31616
31619
|
|
|
31617
31620
|
const roughModule = _roughModule;
|
|
31618
31621
|
|
|
31619
|
-
const version = "0.22.
|
|
31622
|
+
const version = "0.22.3";
|
|
31620
31623
|
preLoadAllModule();
|
|
31621
31624
|
if (isBrowserEnv()) {
|
|
31622
31625
|
loadBrowserEnv(container);
|