@visactor/vrender-kits 1.1.0 → 1.1.1
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.es.js
CHANGED
|
@@ -15279,9 +15279,10 @@ class Graphic extends Node {
|
|
|
15279
15279
|
} else assignFallbackAttr(this.getStateTransitionDefaultAttribute(key, staticTargetAttrs));
|
|
15280
15280
|
}), extraAttrs;
|
|
15281
15281
|
}
|
|
15282
|
-
syncObjectToSnapshot(target, snapshot) {
|
|
15282
|
+
syncObjectToSnapshot(target, snapshot, excludedKeys) {
|
|
15283
15283
|
const delta = new Map();
|
|
15284
15284
|
return new Set([...Object.keys(target), ...Object.keys(snapshot)]).forEach(key => {
|
|
15285
|
+
if (!0 === (null == excludedKeys ? void 0 : excludedKeys[key])) return;
|
|
15285
15286
|
const hasNext = Object.prototype.hasOwnProperty.call(snapshot, key),
|
|
15286
15287
|
previousValue = target[key];
|
|
15287
15288
|
if (!hasNext) return void (Object.prototype.hasOwnProperty.call(target, key) && (delta.set(key, {
|
|
@@ -15295,17 +15296,17 @@ class Graphic extends Node {
|
|
|
15295
15296
|
}), target[key] = cloneAttributeValue(nextValue));
|
|
15296
15297
|
}), delta;
|
|
15297
15298
|
}
|
|
15298
|
-
_syncAttribute() {
|
|
15299
|
+
_syncAttribute(excludedKeys) {
|
|
15299
15300
|
this.attribute === this.baseAttributes && this.resolvedStatePatch && this.detachAttributeFromBaseAttributes();
|
|
15300
15301
|
const snapshot = this.buildStaticAttributeSnapshot(),
|
|
15301
|
-
delta = this.syncObjectToSnapshot(this.attribute, snapshot);
|
|
15302
|
-
return this.valid = this.isValid(), this.attributeMayContainTransientAttrs =
|
|
15302
|
+
delta = this.syncObjectToSnapshot(this.attribute, snapshot, excludedKeys);
|
|
15303
|
+
return this.valid = this.isValid(), this.attributeMayContainTransientAttrs = !!excludedKeys, delta;
|
|
15303
15304
|
}
|
|
15304
|
-
_syncFinalAttributeFromStaticTruth() {
|
|
15305
|
+
_syncFinalAttributeFromStaticTruth(excludedKeys) {
|
|
15305
15306
|
const target = this.finalAttribute;
|
|
15306
15307
|
if (!target) return;
|
|
15307
15308
|
const snapshot = this.buildStaticAttributeSnapshot();
|
|
15308
|
-
this.syncObjectToSnapshot(target, snapshot);
|
|
15309
|
+
this.syncObjectToSnapshot(target, snapshot, excludedKeys);
|
|
15309
15310
|
}
|
|
15310
15311
|
mergeAttributeDeltaCategory(category, key, prev, next) {
|
|
15311
15312
|
var _a;
|
|
@@ -15362,6 +15363,25 @@ class Graphic extends Node {
|
|
|
15362
15363
|
this.getBaseAttributesStorage()[key] = params[key];
|
|
15363
15364
|
}
|
|
15364
15365
|
}
|
|
15366
|
+
_commitAnimationStaticAttributes(params, context) {
|
|
15367
|
+
if (!params) return;
|
|
15368
|
+
const source = params,
|
|
15369
|
+
baseAttributes = this.getBaseAttributesStorage(),
|
|
15370
|
+
target = this.attribute,
|
|
15371
|
+
delta = new Map();
|
|
15372
|
+
let hasKeys = !1;
|
|
15373
|
+
for (const key in source) {
|
|
15374
|
+
if (!Object.prototype.hasOwnProperty.call(source, key)) continue;
|
|
15375
|
+
hasKeys = !0;
|
|
15376
|
+
const previousValue = target[key],
|
|
15377
|
+
nextValue = source[key];
|
|
15378
|
+
baseAttributes[key] = nextValue, target[key] = nextValue, areAttributeValuesEqual(previousValue, nextValue) || delta.set(key, {
|
|
15379
|
+
prev: previousValue,
|
|
15380
|
+
next: nextValue
|
|
15381
|
+
});
|
|
15382
|
+
}
|
|
15383
|
+
hasKeys && (this.valid = this.isValid(), this.attributeMayContainTransientAttrs = !0, this.submitUpdateByDelta(delta), this.onAttributeUpdate(context));
|
|
15384
|
+
}
|
|
15365
15385
|
applyAnimationTransientAttributes(params, forceUpdateTag = !1, context) {
|
|
15366
15386
|
const source = params;
|
|
15367
15387
|
let target,
|
|
@@ -15384,9 +15404,9 @@ class Graphic extends Node {
|
|
|
15384
15404
|
}
|
|
15385
15405
|
delta.size && (this.attributeMayContainTransientAttrs = !0), this.valid = this.isValid(), this.submitUpdateByDelta(delta, forceUpdateTag), this.onAttributeUpdate(context);
|
|
15386
15406
|
}
|
|
15387
|
-
_restoreAttributeFromStaticTruth(context) {
|
|
15388
|
-
this._syncFinalAttributeFromStaticTruth();
|
|
15389
|
-
const delta = this._syncAttribute();
|
|
15407
|
+
_restoreAttributeFromStaticTruth(context, excludedKeys) {
|
|
15408
|
+
this._syncFinalAttributeFromStaticTruth(excludedKeys);
|
|
15409
|
+
const delta = this._syncAttribute(excludedKeys);
|
|
15390
15410
|
this.submitUpdateByDelta(delta), this.onAttributeUpdate(context);
|
|
15391
15411
|
}
|
|
15392
15412
|
collectStatePatchDeltaKeys(previousPatch, nextPatch) {
|
|
@@ -17133,14 +17153,18 @@ function bindContributionProvider(bind, id) {
|
|
|
17133
17153
|
}
|
|
17134
17154
|
class ContributionStore {
|
|
17135
17155
|
static getStore(id) {
|
|
17136
|
-
|
|
17156
|
+
var _a;
|
|
17157
|
+
return null === (_a = this.store.get(id)) || void 0 === _a ? void 0 : _a.values().next().value;
|
|
17137
17158
|
}
|
|
17138
17159
|
static setStore(id, cache) {
|
|
17139
|
-
this.store.
|
|
17160
|
+
let caches = this.store.get(id);
|
|
17161
|
+
caches || (caches = new Set(), this.store.set(id, caches)), caches.add(cache);
|
|
17140
17162
|
}
|
|
17141
17163
|
static refreshAllContributions() {
|
|
17142
|
-
this.store.forEach(
|
|
17143
|
-
|
|
17164
|
+
this.store.forEach(caches => {
|
|
17165
|
+
caches.forEach(cache => {
|
|
17166
|
+
cache.refresh();
|
|
17167
|
+
});
|
|
17144
17168
|
});
|
|
17145
17169
|
}
|
|
17146
17170
|
}
|
|
@@ -20766,6 +20790,9 @@ const defaultCircleRenderContribution = new DefaultCircleRenderContribution();
|
|
|
20766
20790
|
const defaultCircleTextureRenderContribution = defaultBaseTextureRenderContribution;
|
|
20767
20791
|
const defaultCircleBackgroundRenderContribution = defaultBaseBackgroundRenderContribution;
|
|
20768
20792
|
|
|
20793
|
+
function hasDisabledStrokeSide(stroke) {
|
|
20794
|
+
return Array.isArray(stroke) && stroke.some(s => !1 === s || null === s);
|
|
20795
|
+
}
|
|
20769
20796
|
class DefaultRectRenderContribution {
|
|
20770
20797
|
constructor() {
|
|
20771
20798
|
this.time = BaseRenderContributionTime.afterFillStroke, this.useStyle = !0, this.order = 0;
|
|
@@ -20821,7 +20848,7 @@ class SplitRectBeforeRenderContribution {
|
|
|
20821
20848
|
const {
|
|
20822
20849
|
stroke = groupAttribute.stroke
|
|
20823
20850
|
} = group.attribute;
|
|
20824
|
-
|
|
20851
|
+
hasDisabledStrokeSide(stroke) && (doFillOrStroke.doStroke = !1);
|
|
20825
20852
|
}
|
|
20826
20853
|
}
|
|
20827
20854
|
class SplitRectAfterRenderContribution {
|
|
@@ -20842,7 +20869,7 @@ class SplitRectAfterRenderContribution {
|
|
|
20842
20869
|
width: width,
|
|
20843
20870
|
height: height
|
|
20844
20871
|
} = rect.attribute;
|
|
20845
|
-
if (width = (null != width ? width : x1 - originX) || 0, height = (null != height ? height : y1 - originY) || 0,
|
|
20872
|
+
if (width = (null != width ? width : x1 - originX) || 0, height = (null != height ? height : y1 - originY) || 0, hasDisabledStrokeSide(stroke)) {
|
|
20846
20873
|
if (context.setStrokeStyle(rect, rect.attribute, x, y, groupAttribute), !(0 === cornerRadius || isArray(cornerRadius) && cornerRadius.every(num => 0 === num))) {
|
|
20847
20874
|
let lastStroke,
|
|
20848
20875
|
lastStrokeI = 0;
|
|
@@ -238,4 +238,4 @@ export class BrowserEnvContribution extends BaseEnvContribution {
|
|
|
238
238
|
return navigator.clipboard.writeText(text).then((() => {})).catch((err => {}));
|
|
239
239
|
}
|
|
240
240
|
}
|
|
241
|
-
//# sourceMappingURL=browser-contribution.js.map
|
|
241
|
+
//# sourceMappingURL=browser-contribution.js.map
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@visactor/vrender-kits",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.1",
|
|
4
4
|
"description": "",
|
|
5
5
|
"sideEffects": false,
|
|
6
6
|
"main": "cjs/index-node.js",
|
|
@@ -44,7 +44,7 @@
|
|
|
44
44
|
],
|
|
45
45
|
"dependencies": {
|
|
46
46
|
"@visactor/vutils": "~1.0.12",
|
|
47
|
-
"@visactor/vrender-core": "1.1.
|
|
47
|
+
"@visactor/vrender-core": "1.1.1",
|
|
48
48
|
"@resvg/resvg-js": "2.4.1",
|
|
49
49
|
"roughjs": "4.6.6",
|
|
50
50
|
"gifuct-js": "2.1.2",
|
|
@@ -69,9 +69,9 @@
|
|
|
69
69
|
"vite": "3.2.6",
|
|
70
70
|
"typescript": "4.9.5",
|
|
71
71
|
"cross-env": "^7.0.3",
|
|
72
|
-
"@internal/ts-config": "0.0.1",
|
|
73
72
|
"@internal/bundler": "0.0.1",
|
|
74
|
-
"@internal/eslint-config": "0.0.1"
|
|
73
|
+
"@internal/eslint-config": "0.0.1",
|
|
74
|
+
"@internal/ts-config": "0.0.1"
|
|
75
75
|
},
|
|
76
76
|
"keywords": [
|
|
77
77
|
"VisActor",
|