@visactor/vrender 1.1.0 → 1.1.1-alpha.0
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/entries/browser.js +5 -3
- package/cjs/entries/browser.js.map +1 -1
- package/cjs/entries/miniapp.js +5 -3
- package/cjs/entries/miniapp.js.map +1 -1
- package/cjs/entries/node.js +5 -3
- package/cjs/entries/node.js.map +1 -1
- package/cjs/entries/runtime-contribution.d.ts +19 -0
- package/cjs/entries/runtime-contribution.js +78 -0
- package/cjs/entries/runtime-contribution.js.map +1 -0
- package/cjs/entries/shared-browser-lite.js +6 -3
- package/cjs/entries/shared-browser-lite.js.map +1 -1
- package/cjs/entries/shared-browser.js +5 -3
- package/cjs/entries/shared-browser.js.map +1 -1
- package/cjs/entries/shared-registry.d.ts +1 -0
- package/cjs/entries/shared-registry.js +12 -2
- package/cjs/entries/shared-registry.js.map +1 -1
- 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 +209 -84
- package/dist/index.js +209 -83
- package/dist/index.min.js +1 -1
- package/es/entries/browser.js +4 -2
- package/es/entries/browser.js.map +1 -1
- package/es/entries/miniapp.js +4 -2
- package/es/entries/miniapp.js.map +1 -1
- package/es/entries/node.js +4 -2
- package/es/entries/node.js.map +1 -1
- package/es/entries/runtime-contribution.d.ts +19 -0
- package/es/entries/runtime-contribution.js +49 -0
- package/es/entries/runtime-contribution.js.map +1 -0
- package/es/entries/shared-browser-lite.js +5 -2
- package/es/entries/shared-browser-lite.js.map +1 -1
- package/es/entries/shared-browser.js +5 -2
- package/es/entries/shared-browser.js.map +1 -1
- package/es/entries/shared-registry.d.ts +1 -0
- package/es/entries/shared-registry.js +10 -0
- package/es/entries/shared-registry.js.map +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 +12 -7
package/dist/index.js
CHANGED
|
@@ -8575,9 +8575,10 @@
|
|
|
8575
8575
|
} else assignFallbackAttr(this.getStateTransitionDefaultAttribute(key, staticTargetAttrs));
|
|
8576
8576
|
}), extraAttrs;
|
|
8577
8577
|
}
|
|
8578
|
-
syncObjectToSnapshot(target, snapshot) {
|
|
8578
|
+
syncObjectToSnapshot(target, snapshot, excludedKeys) {
|
|
8579
8579
|
const delta = new Map();
|
|
8580
8580
|
return new Set([...Object.keys(target), ...Object.keys(snapshot)]).forEach(key => {
|
|
8581
|
+
if (!0 === (null == excludedKeys ? void 0 : excludedKeys[key])) return;
|
|
8581
8582
|
const hasNext = Object.prototype.hasOwnProperty.call(snapshot, key),
|
|
8582
8583
|
previousValue = target[key];
|
|
8583
8584
|
if (!hasNext) return void (Object.prototype.hasOwnProperty.call(target, key) && (delta.set(key, {
|
|
@@ -8591,17 +8592,17 @@
|
|
|
8591
8592
|
}), target[key] = cloneAttributeValue(nextValue));
|
|
8592
8593
|
}), delta;
|
|
8593
8594
|
}
|
|
8594
|
-
_syncAttribute() {
|
|
8595
|
+
_syncAttribute(excludedKeys) {
|
|
8595
8596
|
this.attribute === this.baseAttributes && this.resolvedStatePatch && this.detachAttributeFromBaseAttributes();
|
|
8596
8597
|
const snapshot = this.buildStaticAttributeSnapshot(),
|
|
8597
|
-
delta = this.syncObjectToSnapshot(this.attribute, snapshot);
|
|
8598
|
-
return this.valid = this.isValid(), this.attributeMayContainTransientAttrs =
|
|
8598
|
+
delta = this.syncObjectToSnapshot(this.attribute, snapshot, excludedKeys);
|
|
8599
|
+
return this.valid = this.isValid(), this.attributeMayContainTransientAttrs = !!excludedKeys, delta;
|
|
8599
8600
|
}
|
|
8600
|
-
_syncFinalAttributeFromStaticTruth() {
|
|
8601
|
+
_syncFinalAttributeFromStaticTruth(excludedKeys) {
|
|
8601
8602
|
const target = this.finalAttribute;
|
|
8602
8603
|
if (!target) return;
|
|
8603
8604
|
const snapshot = this.buildStaticAttributeSnapshot();
|
|
8604
|
-
this.syncObjectToSnapshot(target, snapshot);
|
|
8605
|
+
this.syncObjectToSnapshot(target, snapshot, excludedKeys);
|
|
8605
8606
|
}
|
|
8606
8607
|
mergeAttributeDeltaCategory(category, key, prev, next) {
|
|
8607
8608
|
var _a;
|
|
@@ -8658,6 +8659,25 @@
|
|
|
8658
8659
|
this.getBaseAttributesStorage()[key] = params[key];
|
|
8659
8660
|
}
|
|
8660
8661
|
}
|
|
8662
|
+
_commitAnimationStaticAttributes(params, context) {
|
|
8663
|
+
if (!params) return;
|
|
8664
|
+
const source = params,
|
|
8665
|
+
baseAttributes = this.getBaseAttributesStorage(),
|
|
8666
|
+
target = this.attribute,
|
|
8667
|
+
delta = new Map();
|
|
8668
|
+
let hasKeys = !1;
|
|
8669
|
+
for (const key in source) {
|
|
8670
|
+
if (!Object.prototype.hasOwnProperty.call(source, key)) continue;
|
|
8671
|
+
hasKeys = !0;
|
|
8672
|
+
const previousValue = target[key],
|
|
8673
|
+
nextValue = source[key];
|
|
8674
|
+
baseAttributes[key] = nextValue, target[key] = nextValue, areAttributeValuesEqual(previousValue, nextValue) || delta.set(key, {
|
|
8675
|
+
prev: previousValue,
|
|
8676
|
+
next: nextValue
|
|
8677
|
+
});
|
|
8678
|
+
}
|
|
8679
|
+
hasKeys && (this.valid = this.isValid(), this.attributeMayContainTransientAttrs = !0, this.submitUpdateByDelta(delta), this.onAttributeUpdate(context));
|
|
8680
|
+
}
|
|
8661
8681
|
applyAnimationTransientAttributes(params, forceUpdateTag = !1, context) {
|
|
8662
8682
|
const source = params;
|
|
8663
8683
|
let target,
|
|
@@ -8680,9 +8700,9 @@
|
|
|
8680
8700
|
}
|
|
8681
8701
|
delta.size && (this.attributeMayContainTransientAttrs = !0), this.valid = this.isValid(), this.submitUpdateByDelta(delta, forceUpdateTag), this.onAttributeUpdate(context);
|
|
8682
8702
|
}
|
|
8683
|
-
_restoreAttributeFromStaticTruth(context) {
|
|
8684
|
-
this._syncFinalAttributeFromStaticTruth();
|
|
8685
|
-
const delta = this._syncAttribute();
|
|
8703
|
+
_restoreAttributeFromStaticTruth(context, excludedKeys) {
|
|
8704
|
+
this._syncFinalAttributeFromStaticTruth(excludedKeys);
|
|
8705
|
+
const delta = this._syncAttribute(excludedKeys);
|
|
8686
8706
|
this.submitUpdateByDelta(delta), this.onAttributeUpdate(context);
|
|
8687
8707
|
}
|
|
8688
8708
|
collectStatePatchDeltaKeys(previousPatch, nextPatch) {
|
|
@@ -15493,14 +15513,18 @@
|
|
|
15493
15513
|
}
|
|
15494
15514
|
class ContributionStore {
|
|
15495
15515
|
static getStore(id) {
|
|
15496
|
-
|
|
15516
|
+
var _a;
|
|
15517
|
+
return null === (_a = this.store.get(id)) || void 0 === _a ? void 0 : _a.values().next().value;
|
|
15497
15518
|
}
|
|
15498
15519
|
static setStore(id, cache) {
|
|
15499
|
-
this.store.
|
|
15520
|
+
let caches = this.store.get(id);
|
|
15521
|
+
caches || (caches = new Set(), this.store.set(id, caches)), caches.add(cache);
|
|
15500
15522
|
}
|
|
15501
15523
|
static refreshAllContributions() {
|
|
15502
|
-
this.store.forEach(
|
|
15503
|
-
|
|
15524
|
+
this.store.forEach(caches => {
|
|
15525
|
+
caches.forEach(cache => {
|
|
15526
|
+
cache.refresh();
|
|
15527
|
+
});
|
|
15504
15528
|
});
|
|
15505
15529
|
}
|
|
15506
15530
|
}
|
|
@@ -16801,6 +16825,9 @@
|
|
|
16801
16825
|
}
|
|
16802
16826
|
const defaultGroupBackgroundRenderContribution = new DefaultGroupBackgroundRenderContribution();
|
|
16803
16827
|
|
|
16828
|
+
function hasDisabledStrokeSide(stroke) {
|
|
16829
|
+
return Array.isArray(stroke) && stroke.some(s => !1 === s || null === s);
|
|
16830
|
+
}
|
|
16804
16831
|
class DefaultRectRenderContribution {
|
|
16805
16832
|
constructor() {
|
|
16806
16833
|
this.time = exports.BaseRenderContributionTime.afterFillStroke, this.useStyle = !0, this.order = 0;
|
|
@@ -16856,7 +16883,7 @@
|
|
|
16856
16883
|
const {
|
|
16857
16884
|
stroke = groupAttribute.stroke
|
|
16858
16885
|
} = group.attribute;
|
|
16859
|
-
|
|
16886
|
+
hasDisabledStrokeSide(stroke) && (doFillOrStroke.doStroke = !1);
|
|
16860
16887
|
}
|
|
16861
16888
|
}
|
|
16862
16889
|
class SplitRectAfterRenderContribution {
|
|
@@ -16877,7 +16904,7 @@
|
|
|
16877
16904
|
width: width,
|
|
16878
16905
|
height: height
|
|
16879
16906
|
} = rect.attribute;
|
|
16880
|
-
if (width = (null != width ? width : x1 - originX) || 0, height = (null != height ? height : y1 - originY) || 0,
|
|
16907
|
+
if (width = (null != width ? width : x1 - originX) || 0, height = (null != height ? height : y1 - originY) || 0, hasDisabledStrokeSide(stroke)) {
|
|
16881
16908
|
if (context.setStrokeStyle(rect, rect.attribute, x, y, groupAttribute), !(0 === cornerRadius || isArray$1(cornerRadius) && cornerRadius.every(num => 0 === num))) {
|
|
16882
16909
|
let lastStroke,
|
|
16883
16910
|
lastStrokeI = 0;
|
|
@@ -19676,8 +19703,13 @@
|
|
|
19676
19703
|
const runtimeInstallerContext = createLegacyBindingContext();
|
|
19677
19704
|
let runtimeGlobal,
|
|
19678
19705
|
runtimeInstallerPreloaded = !1;
|
|
19679
|
-
const
|
|
19680
|
-
|
|
19706
|
+
const RUNTIME_RENDERER_NAMESPACE = "vrender:runtime-renderer",
|
|
19707
|
+
RUNTIME_PICKER_NAMESPACE = "vrender:runtime-picker",
|
|
19708
|
+
runtimeEntryKeys = new WeakMap(),
|
|
19709
|
+
runtimeDrawContributions = new WeakMap(),
|
|
19710
|
+
loadedRuntimeContributionModules = new WeakMap(),
|
|
19711
|
+
DEFAULT_RUNTIME_CONTRIBUTION_TARGETS = ["graphic-renderer"],
|
|
19712
|
+
noopUnbindRuntimeContributionService = () => {};
|
|
19681
19713
|
function ensureRuntimeInstallerPreloaded() {
|
|
19682
19714
|
runtimeInstallerPreloaded || (runtimeInstallerPreloaded = !0, bindCoreModules({
|
|
19683
19715
|
bind: runtimeInstallerContext.bind
|
|
@@ -19738,11 +19770,11 @@
|
|
|
19738
19770
|
const bindingContext = getRuntimeInstallerBindingContext();
|
|
19739
19771
|
refreshRuntimeInstallerContributions();
|
|
19740
19772
|
const renderers = bindingContext.getAll(GraphicRender),
|
|
19741
|
-
registeredKeys = getTrackedEntryKeys$1(app.registry.renderer,
|
|
19742
|
-
clearTrackedEntryKeys$1(app.registry.renderer,
|
|
19773
|
+
registeredKeys = getTrackedEntryKeys$1(app.registry.renderer, RUNTIME_RENDERER_NAMESPACE);
|
|
19774
|
+
clearTrackedEntryKeys$1(app.registry.renderer, RUNTIME_RENDERER_NAMESPACE, null === (_a = app.registry.renderer.unregister) || void 0 === _a ? void 0 : _a.bind(app.registry.renderer)), registerRuntimeEntries((key, renderer) => {
|
|
19743
19775
|
var _a;
|
|
19744
19776
|
null === (_a = null == renderer ? void 0 : renderer.reInit) || void 0 === _a || _a.call(renderer), app.registry.renderer.register(key, renderer), registeredKeys.add(key);
|
|
19745
|
-
}, renderers,
|
|
19777
|
+
}, renderers, RUNTIME_RENDERER_NAMESPACE);
|
|
19746
19778
|
}
|
|
19747
19779
|
function installRuntimeDrawContributionsToApp(app) {
|
|
19748
19780
|
var _a;
|
|
@@ -19764,10 +19796,45 @@
|
|
|
19764
19796
|
const bindingContext = getRuntimeInstallerBindingContext();
|
|
19765
19797
|
refreshRuntimeInstallerContributions();
|
|
19766
19798
|
const pickers = bindingContext.getAll(serviceIdentifier),
|
|
19767
|
-
registeredKeys = getTrackedEntryKeys$1(app.registry.picker,
|
|
19768
|
-
clearTrackedEntryKeys$1(app.registry.picker,
|
|
19799
|
+
registeredKeys = getTrackedEntryKeys$1(app.registry.picker, RUNTIME_PICKER_NAMESPACE);
|
|
19800
|
+
clearTrackedEntryKeys$1(app.registry.picker, RUNTIME_PICKER_NAMESPACE, null === (_a = app.registry.picker.unregister) || void 0 === _a ? void 0 : _a.bind(app.registry.picker)), registerRuntimeEntries((key, picker) => {
|
|
19769
19801
|
app.registry.picker.register(key, picker), registeredKeys.add(key);
|
|
19770
|
-
}, pickers,
|
|
19802
|
+
}, pickers, RUNTIME_PICKER_NAMESPACE);
|
|
19803
|
+
}
|
|
19804
|
+
function getRuntimeContributionModuleIdentity(module) {
|
|
19805
|
+
return module;
|
|
19806
|
+
}
|
|
19807
|
+
function hasLoadedRuntimeContributionModule(context, module) {
|
|
19808
|
+
var _a, _b;
|
|
19809
|
+
return null !== (_b = null === (_a = loadedRuntimeContributionModules.get(context)) || void 0 === _a ? void 0 : _a.has(getRuntimeContributionModuleIdentity(module))) && void 0 !== _b && _b;
|
|
19810
|
+
}
|
|
19811
|
+
function markRuntimeContributionModuleLoaded(context, module) {
|
|
19812
|
+
let modules = loadedRuntimeContributionModules.get(context);
|
|
19813
|
+
modules || (modules = new WeakSet(), loadedRuntimeContributionModules.set(context, modules)), modules.add(getRuntimeContributionModuleIdentity(module));
|
|
19814
|
+
}
|
|
19815
|
+
function loadRuntimeContributionModuleToContext(context, module) {
|
|
19816
|
+
hasLoadedRuntimeContributionModule(context, module) || ("function" == typeof module ? module(context) : module.registry(context.bind, noopUnbindRuntimeContributionService, context.isBound, context.rebind), markRuntimeContributionModuleLoaded(context, module));
|
|
19817
|
+
}
|
|
19818
|
+
function isRuntimePickerTarget(target) {
|
|
19819
|
+
return "object" == typeof target && null !== target && "picker" in target;
|
|
19820
|
+
}
|
|
19821
|
+
function installRuntimeContributionTargetsToApp(app, targets) {
|
|
19822
|
+
const resolvedTargets = null != targets ? targets : DEFAULT_RUNTIME_CONTRIBUTION_TARGETS;
|
|
19823
|
+
let installGraphicRenderers = !1,
|
|
19824
|
+
installDrawContributions = !1;
|
|
19825
|
+
const pickerTargets = new Set();
|
|
19826
|
+
resolvedTargets.forEach(target => {
|
|
19827
|
+
"graphic-renderer" === target ? installGraphicRenderers = !0 : "draw-contribution" === target ? installDrawContributions = !0 : isRuntimePickerTarget(target) && pickerTargets.add(target.picker);
|
|
19828
|
+
}), installDrawContributions && installRuntimeDrawContributionsToApp(app), installGraphicRenderers && installRuntimeGraphicRenderersToApp(app), pickerTargets.forEach(serviceIdentifier => {
|
|
19829
|
+
installRuntimePickersToApp(app, serviceIdentifier);
|
|
19830
|
+
});
|
|
19831
|
+
}
|
|
19832
|
+
function installRuntimeContributionModule(module, {
|
|
19833
|
+
app: app,
|
|
19834
|
+
legacy = !0,
|
|
19835
|
+
targets: targets
|
|
19836
|
+
} = {}) {
|
|
19837
|
+
loadRuntimeContributionModuleToContext(getRuntimeInstallerBindingContext(), module), legacy && (preLoadAllModule(), loadRuntimeContributionModuleToContext(getLegacyBindingContext(), module)), refreshRuntimeInstallerContributions(), app && installRuntimeContributionTargetsToApp(app, targets);
|
|
19771
19838
|
}
|
|
19772
19839
|
|
|
19773
19840
|
function simplifyRadialDist(points, sqTolerance) {
|
|
@@ -23152,6 +23219,7 @@
|
|
|
23152
23219
|
identityMat4: identityMat4,
|
|
23153
23220
|
imageModule: imageModule,
|
|
23154
23221
|
incrementalAddTo: incrementalAddTo,
|
|
23222
|
+
installRuntimeContributionModule: installRuntimeContributionModule,
|
|
23155
23223
|
installRuntimeDrawContributionsToApp: installRuntimeDrawContributionsToApp,
|
|
23156
23224
|
installRuntimeGraphicRenderersToApp: installRuntimeGraphicRenderersToApp,
|
|
23157
23225
|
installRuntimePickersToApp: installRuntimePickersToApp,
|
|
@@ -32869,6 +32937,24 @@
|
|
|
32869
32937
|
for (const key in record) Object.prototype.hasOwnProperty.call(record, key) && !includesKey(keys, key) && (nextRecord[key] = record[key]);
|
|
32870
32938
|
return nextRecord;
|
|
32871
32939
|
}
|
|
32940
|
+
function collectActiveSiblingAttrKeys(target, currentAnimate) {
|
|
32941
|
+
var _a;
|
|
32942
|
+
const getTrackedAnimates = null == target ? void 0 : target.getTrackedAnimates;
|
|
32943
|
+
if ("function" == typeof getTrackedAnimates) {
|
|
32944
|
+
const trackedAnimates = getTrackedAnimates.call(target);
|
|
32945
|
+
if (trackedAnimates && trackedAnimates.size <= 1) return;
|
|
32946
|
+
}
|
|
32947
|
+
const forEachTrackedAnimate = null == target ? void 0 : target.forEachTrackedAnimate;
|
|
32948
|
+
if ("function" != typeof forEachTrackedAnimate) return;
|
|
32949
|
+
let keys;
|
|
32950
|
+
const currentEndProps = null === (_a = currentAnimate.getEndProps) || void 0 === _a ? void 0 : _a.call(currentAnimate);
|
|
32951
|
+
return forEachTrackedAnimate.call(target, animate => {
|
|
32952
|
+
var _a;
|
|
32953
|
+
if (animate === currentAnimate || animate.status === exports.AnimateStatus.END) return;
|
|
32954
|
+
const endProps = null === (_a = animate.getEndProps) || void 0 === _a ? void 0 : _a.call(animate);
|
|
32955
|
+
if (endProps) for (const key in endProps) !Object.prototype.hasOwnProperty.call(endProps, key) || currentEndProps && Object.prototype.hasOwnProperty.call(currentEndProps, key) || ((null != keys ? keys : keys = Object.create(null))[key] = !0);
|
|
32956
|
+
}), keys;
|
|
32957
|
+
}
|
|
32872
32958
|
class Animate {
|
|
32873
32959
|
constructor(id = Generator.GenAutoIncrementId(), timeline = defaultTimeline, slience) {
|
|
32874
32960
|
this.id = id, this.status = exports.AnimateStatus.INITIAL, this._timeline = timeline, timeline.addAnimate(this), this.slience = slience, this._startTime = 0, this._duration = 0, this._totalDuration = 0, this._loopCount = 0, this._currentLoop = 0, this._bounce = !1, this._firstStep = null, this._lastStep = null, this._startProps = {}, this._endProps = {}, this._preventAttrs = new Set(), this.currentTime = 0, this.interpolateUpdateFunction = null, this.priority = 0;
|
|
@@ -32892,7 +32978,7 @@
|
|
|
32892
32978
|
this.target = target;
|
|
32893
32979
|
const trackerTarget = this.target;
|
|
32894
32980
|
return trackerTarget.detachAttributeFromBaseAttributes(), trackerTarget.trackAnimate(this), this.onRemove(() => {
|
|
32895
|
-
this.stop(), this.__skipRestoreStaticAttributeOnRemove || trackerTarget.restoreStaticAttribute(), trackerTarget.untrackAnimate(this.id);
|
|
32981
|
+
this.stop(), this.__skipRestoreStaticAttributeOnRemove || trackerTarget.restoreStaticAttribute(collectActiveSiblingAttrKeys(trackerTarget, this)), trackerTarget.untrackAnimate(this.id);
|
|
32896
32982
|
}), this.target.onAnimateBind && !this.slience && this.target.onAnimateBind(this), this.target.animationAttribute || (this.target.animationAttribute = {}), this;
|
|
32897
32983
|
}
|
|
32898
32984
|
to(props, duration = 300, easing = "linear") {
|
|
@@ -33029,7 +33115,8 @@
|
|
|
33029
33115
|
if (nextTime < this._startTime) return void (this.currentTime = nextTime);
|
|
33030
33116
|
if (nextTime >= this._startTime + this._totalDuration) {
|
|
33031
33117
|
null === (_a = this._lastStep) || void 0 === _a || _a.onUpdate(!0, 1, {}), null === (_b = this._lastStep) || void 0 === _b || _b.onEnd(), this.onEnd(), this.status = exports.AnimateStatus.END;
|
|
33032
|
-
|
|
33118
|
+
const trackerTarget = this.target;
|
|
33119
|
+
return trackerTarget.restoreStaticAttribute(collectActiveSiblingAttrKeys(trackerTarget, this)), void (this.__skipRestoreStaticAttributeOnRemove = !0);
|
|
33033
33120
|
}
|
|
33034
33121
|
this.status = exports.AnimateStatus.RUNNING, this.currentTime <= this._startTime && this.onStart(), this.currentTime = nextTime;
|
|
33035
33122
|
let cycleTime = nextTime - this._startTime,
|
|
@@ -33366,6 +33453,30 @@
|
|
|
33366
33453
|
return 2;
|
|
33367
33454
|
}
|
|
33368
33455
|
|
|
33456
|
+
function buildAnimationStaticCommitAttrs(target, keys, animate, fallbackAttrs) {
|
|
33457
|
+
var _a;
|
|
33458
|
+
const commitTarget = target,
|
|
33459
|
+
contextFinalAttrs = null === (_a = commitTarget.context) || void 0 === _a ? void 0 : _a.finalAttrs,
|
|
33460
|
+
finalAttribute = commitTarget.getFinalAttribute();
|
|
33461
|
+
let commitAttrs = null;
|
|
33462
|
+
for (let i = 0; i < keys.length; i++) {
|
|
33463
|
+
const key = keys[i];
|
|
33464
|
+
animate && !animate.validAttr(key) || (contextFinalAttrs && Object.prototype.hasOwnProperty.call(contextFinalAttrs, key) ? (null != commitAttrs || (commitAttrs = {}), commitAttrs[key] = contextFinalAttrs[key]) : finalAttribute && Object.prototype.hasOwnProperty.call(finalAttribute, key) ? (null != commitAttrs || (commitAttrs = {}), commitAttrs[key] = finalAttribute[key]) : fallbackAttrs && Object.prototype.hasOwnProperty.call(fallbackAttrs, key) && (null != commitAttrs || (commitAttrs = {}), commitAttrs[key] = fallbackAttrs[key]));
|
|
33465
|
+
}
|
|
33466
|
+
return commitAttrs;
|
|
33467
|
+
}
|
|
33468
|
+
function commitAnimationStaticAttrs(target, keys, animate, fallbackAttrs) {
|
|
33469
|
+
const commitAttrs = buildAnimationStaticCommitAttrs(target, keys, animate, fallbackAttrs);
|
|
33470
|
+
if (!commitAttrs) return !1;
|
|
33471
|
+
target.setFinalAttributes(commitAttrs);
|
|
33472
|
+
const commitStaticAttributes = target._commitAnimationStaticAttributes;
|
|
33473
|
+
return "function" == typeof commitStaticAttributes ? commitStaticAttributes.call(target, commitAttrs, {
|
|
33474
|
+
type: exports.AttributeUpdateType.ANIMATE_END
|
|
33475
|
+
}) : target.setAttributes(commitAttrs, !1, {
|
|
33476
|
+
type: exports.AttributeUpdateType.ANIMATE_END
|
|
33477
|
+
}), !0;
|
|
33478
|
+
}
|
|
33479
|
+
|
|
33369
33480
|
class AnimateExecutor {
|
|
33370
33481
|
static registerBuiltInAnimate(name, animate) {
|
|
33371
33482
|
AnimateExecutor.builtInAnimateMap[name] = animate;
|
|
@@ -33545,7 +33656,7 @@
|
|
|
33545
33656
|
props = params.to,
|
|
33546
33657
|
from = params.from;
|
|
33547
33658
|
const commitAttrOutChannel = this.shouldCommitAttrOutChannel(type);
|
|
33548
|
-
props || (parsedFromProps || (parsedFromProps = this.createPropsFromChannel(channel, graphic, commitAttrOutChannel, this.getAttrOutChannelExcludedKeys(graphic))), props = parsedFromProps.props), from || (parsedFromProps || (parsedFromProps = this.createPropsFromChannel(channel, graphic, commitAttrOutChannel, this.getAttrOutChannelExcludedKeys(graphic))), from = parsedFromProps.from), parsedFromProps.attrOutChannel && graphic.setAttributes(parsedFromProps.attrOutChannel), this._handleRunAnimate(animate, custom, customType, from, props, duration, easing, customParameters, controlOptions, options, type, graphic);
|
|
33659
|
+
props || (parsedFromProps || (parsedFromProps = this.createPropsFromChannel(channel, graphic, commitAttrOutChannel, this.getAttrOutChannelExcludedKeys(graphic))), props = parsedFromProps.props), from || (parsedFromProps || (parsedFromProps = this.createPropsFromChannel(channel, graphic, commitAttrOutChannel, this.getAttrOutChannelExcludedKeys(graphic))), from = parsedFromProps.from), parsedFromProps.attrOutChannel && graphic.setAttributes(parsedFromProps.attrOutChannel), this._handleRunAnimate(animate, custom, customType, from, props, duration, easing, customParameters, controlOptions, options, type, graphic), this.commitAnimatedUpdateDiffAttrsOnEnd(animate, graphic, type, props);
|
|
33549
33660
|
let totalDelay = 0;
|
|
33550
33661
|
oneByOneDelay && (totalDelay = oneByOneDelay * (count - index - 1));
|
|
33551
33662
|
const delayAfterValue = isFunction$1(delayAfter) ? delayAfter(null === (_h = null === (_g = graphic.context) || void 0 === _g ? void 0 : _g.data) || void 0 === _h ? void 0 : _h[0], graphic, {}) : delayAfter;
|
|
@@ -33627,6 +33738,25 @@
|
|
|
33627
33738
|
shouldCommitAttrOutChannel(type) {
|
|
33628
33739
|
return "update" !== type;
|
|
33629
33740
|
}
|
|
33741
|
+
commitAnimatedUpdateDiffAttrsOnEnd(animate, graphic, type, props) {
|
|
33742
|
+
if ("update" === type || !props || !this.isUpdateDiffContext(graphic)) return;
|
|
33743
|
+
const keys = this.collectAnimatedUpdateDiffAttrKeys(graphic, props);
|
|
33744
|
+
(null == keys ? void 0 : keys.length) && animate.onEnd(() => {
|
|
33745
|
+
commitAnimationStaticAttrs(graphic, keys, animate, props);
|
|
33746
|
+
});
|
|
33747
|
+
}
|
|
33748
|
+
isUpdateDiffContext(graphic) {
|
|
33749
|
+
const context = graphic.context;
|
|
33750
|
+
return "update" === (null == context ? void 0 : context.diffState) || "update" === (null == context ? void 0 : context.animationState);
|
|
33751
|
+
}
|
|
33752
|
+
collectAnimatedUpdateDiffAttrKeys(graphic, props) {
|
|
33753
|
+
var _a;
|
|
33754
|
+
const diffAttrs = null === (_a = graphic.context) || void 0 === _a ? void 0 : _a.diffAttrs;
|
|
33755
|
+
if (!diffAttrs) return null;
|
|
33756
|
+
let keys = null;
|
|
33757
|
+
for (const key in props) Object.prototype.hasOwnProperty.call(props, key) && Object.prototype.hasOwnProperty.call(diffAttrs, key) && void 0 !== diffAttrs[key] && (null != keys || (keys = []), keys.push(key));
|
|
33758
|
+
return keys;
|
|
33759
|
+
}
|
|
33630
33760
|
createCustomAnimation(animate, CustomAnimateConstructor, from, props, duration, easing, customParams) {
|
|
33631
33761
|
const customAnimate = new CustomAnimateConstructor(from, props, duration, easing, customParams);
|
|
33632
33762
|
animate.play(customAnimate);
|
|
@@ -34015,10 +34145,10 @@
|
|
|
34015
34145
|
type: exports.AttributeUpdateType.ANIMATE_BIND
|
|
34016
34146
|
});
|
|
34017
34147
|
}
|
|
34018
|
-
restoreStaticAttribute() {
|
|
34148
|
+
restoreStaticAttribute(excludedKeys) {
|
|
34019
34149
|
this._restoreAttributeFromStaticTruth({
|
|
34020
34150
|
type: exports.AttributeUpdateType.ANIMATE_END
|
|
34021
|
-
});
|
|
34151
|
+
}, excludedKeys);
|
|
34022
34152
|
}
|
|
34023
34153
|
executeAnimation(config) {
|
|
34024
34154
|
return this.initAnimateExecutor(), this._animateExecutor.execute(config), this;
|
|
@@ -34685,25 +34815,6 @@
|
|
|
34685
34815
|
}
|
|
34686
34816
|
}
|
|
34687
34817
|
|
|
34688
|
-
function buildAnimationStaticCommitAttrs(target, keys, animate, fallbackAttrs) {
|
|
34689
|
-
var _a;
|
|
34690
|
-
const commitTarget = target,
|
|
34691
|
-
contextFinalAttrs = null === (_a = commitTarget.context) || void 0 === _a ? void 0 : _a.finalAttrs,
|
|
34692
|
-
finalAttribute = commitTarget.getFinalAttribute();
|
|
34693
|
-
let commitAttrs = null;
|
|
34694
|
-
for (let i = 0; i < keys.length; i++) {
|
|
34695
|
-
const key = keys[i];
|
|
34696
|
-
animate && !animate.validAttr(key) || (contextFinalAttrs && Object.prototype.hasOwnProperty.call(contextFinalAttrs, key) ? (null != commitAttrs || (commitAttrs = {}), commitAttrs[key] = contextFinalAttrs[key]) : finalAttribute && Object.prototype.hasOwnProperty.call(finalAttribute, key) ? (null != commitAttrs || (commitAttrs = {}), commitAttrs[key] = finalAttribute[key]) : fallbackAttrs && Object.prototype.hasOwnProperty.call(fallbackAttrs, key) && (null != commitAttrs || (commitAttrs = {}), commitAttrs[key] = fallbackAttrs[key]));
|
|
34697
|
-
}
|
|
34698
|
-
return commitAttrs;
|
|
34699
|
-
}
|
|
34700
|
-
function commitAnimationStaticAttrs(target, keys, animate, fallbackAttrs) {
|
|
34701
|
-
const commitAttrs = buildAnimationStaticCommitAttrs(target, keys, animate, fallbackAttrs);
|
|
34702
|
-
return !!commitAttrs && (target.setFinalAttributes(commitAttrs), target.setAttributes(commitAttrs, !1, {
|
|
34703
|
-
type: exports.AttributeUpdateType.ANIMATE_END
|
|
34704
|
-
}), !0);
|
|
34705
|
-
}
|
|
34706
|
-
|
|
34707
34818
|
class TagPointsUpdate extends ACustomAnimate {
|
|
34708
34819
|
constructor(from, to, duration, easing, params) {
|
|
34709
34820
|
var _a, _b;
|
|
@@ -55143,41 +55254,6 @@
|
|
|
55143
55254
|
return e.name = "SuppressedError", e.error = error, e.suppressed = suppressed, e;
|
|
55144
55255
|
};
|
|
55145
55256
|
|
|
55146
|
-
function createBrowserVRenderApp(options = {}) {
|
|
55147
|
-
const { envParams } = options, entryOptions = __rest(options, ["envParams"]);
|
|
55148
|
-
return bootstrapVRenderBrowserApp(createBrowserApp(entryOptions), envParams);
|
|
55149
|
-
}
|
|
55150
|
-
|
|
55151
|
-
const { createMiniappApp } = VRenderCore;
|
|
55152
|
-
function createMiniEnvVRenderApp(env, options = {}) {
|
|
55153
|
-
const { envParams } = options, entryOptions = __rest(options, ["envParams"]);
|
|
55154
|
-
return bootstrapVRenderMiniApp(createMiniappApp(entryOptions), env, envParams);
|
|
55155
|
-
}
|
|
55156
|
-
function createTaroVRenderApp(options = {}) {
|
|
55157
|
-
return createMiniEnvVRenderApp('taro', options);
|
|
55158
|
-
}
|
|
55159
|
-
function createFeishuVRenderApp(options = {}) {
|
|
55160
|
-
return createMiniEnvVRenderApp('feishu', options);
|
|
55161
|
-
}
|
|
55162
|
-
function createTTVRenderApp(options = {}) {
|
|
55163
|
-
return createMiniEnvVRenderApp('tt', options);
|
|
55164
|
-
}
|
|
55165
|
-
function createWxVRenderApp(options = {}) {
|
|
55166
|
-
return createMiniEnvVRenderApp('wx', options);
|
|
55167
|
-
}
|
|
55168
|
-
function createLynxVRenderApp(options = {}) {
|
|
55169
|
-
return createMiniEnvVRenderApp('lynx', options);
|
|
55170
|
-
}
|
|
55171
|
-
function createHarmonyVRenderApp(options = {}) {
|
|
55172
|
-
return createMiniEnvVRenderApp('harmony', options);
|
|
55173
|
-
}
|
|
55174
|
-
|
|
55175
|
-
const { createNodeApp } = VRenderCore;
|
|
55176
|
-
function createNodeVRenderApp(options = {}) {
|
|
55177
|
-
const { envParams } = options, entryOptions = __rest(options, ["envParams"]);
|
|
55178
|
-
return bootstrapVRenderNodeApp(createNodeApp(entryOptions), envParams);
|
|
55179
|
-
}
|
|
55180
|
-
|
|
55181
55257
|
const DEFAULT_SHARED_APP_KEY = 'default';
|
|
55182
55258
|
const SHARED_APP_REGISTRY_KEY = Symbol.for('visactor.vrender.sharedAppRegistry');
|
|
55183
55259
|
function getSharedAppRegistry() {
|
|
@@ -55285,6 +55361,55 @@
|
|
|
55285
55361
|
}
|
|
55286
55362
|
}
|
|
55287
55363
|
|
|
55364
|
+
const installCoreRuntimeContributionModule = installRuntimeContributionModule;
|
|
55365
|
+
const pendingRuntimeContributionModules = [];
|
|
55366
|
+
function installPendingRuntimeContributionModulesToApp(app) {
|
|
55367
|
+
pendingRuntimeContributionModules.forEach(({ module, options }) => {
|
|
55368
|
+
installCoreRuntimeContributionModule(module, Object.assign(Object.assign({}, options), { app }));
|
|
55369
|
+
});
|
|
55370
|
+
}
|
|
55371
|
+
|
|
55372
|
+
function createBrowserVRenderApp(options = {}) {
|
|
55373
|
+
const { envParams } = options, entryOptions = __rest(options, ["envParams"]);
|
|
55374
|
+
const app = bootstrapVRenderBrowserApp(createBrowserApp(entryOptions), envParams);
|
|
55375
|
+
installPendingRuntimeContributionModulesToApp(app);
|
|
55376
|
+
return app;
|
|
55377
|
+
}
|
|
55378
|
+
|
|
55379
|
+
const { createMiniappApp } = VRenderCore;
|
|
55380
|
+
function createMiniEnvVRenderApp(env, options = {}) {
|
|
55381
|
+
const { envParams } = options, entryOptions = __rest(options, ["envParams"]);
|
|
55382
|
+
const app = bootstrapVRenderMiniApp(createMiniappApp(entryOptions), env, envParams);
|
|
55383
|
+
installPendingRuntimeContributionModulesToApp(app);
|
|
55384
|
+
return app;
|
|
55385
|
+
}
|
|
55386
|
+
function createTaroVRenderApp(options = {}) {
|
|
55387
|
+
return createMiniEnvVRenderApp('taro', options);
|
|
55388
|
+
}
|
|
55389
|
+
function createFeishuVRenderApp(options = {}) {
|
|
55390
|
+
return createMiniEnvVRenderApp('feishu', options);
|
|
55391
|
+
}
|
|
55392
|
+
function createTTVRenderApp(options = {}) {
|
|
55393
|
+
return createMiniEnvVRenderApp('tt', options);
|
|
55394
|
+
}
|
|
55395
|
+
function createWxVRenderApp(options = {}) {
|
|
55396
|
+
return createMiniEnvVRenderApp('wx', options);
|
|
55397
|
+
}
|
|
55398
|
+
function createLynxVRenderApp(options = {}) {
|
|
55399
|
+
return createMiniEnvVRenderApp('lynx', options);
|
|
55400
|
+
}
|
|
55401
|
+
function createHarmonyVRenderApp(options = {}) {
|
|
55402
|
+
return createMiniEnvVRenderApp('harmony', options);
|
|
55403
|
+
}
|
|
55404
|
+
|
|
55405
|
+
const { createNodeApp } = VRenderCore;
|
|
55406
|
+
function createNodeVRenderApp(options = {}) {
|
|
55407
|
+
const { envParams } = options, entryOptions = __rest(options, ["envParams"]);
|
|
55408
|
+
const app = bootstrapVRenderNodeApp(createNodeApp(entryOptions), envParams);
|
|
55409
|
+
installPendingRuntimeContributionModulesToApp(app);
|
|
55410
|
+
return app;
|
|
55411
|
+
}
|
|
55412
|
+
|
|
55288
55413
|
function createAppForSharedEnv(options) {
|
|
55289
55414
|
const { env } = options;
|
|
55290
55415
|
const entryOptions = Object.assign({}, options);
|
|
@@ -55337,7 +55462,7 @@
|
|
|
55337
55462
|
return resolveLegacyApp().createStage(params);
|
|
55338
55463
|
}
|
|
55339
55464
|
|
|
55340
|
-
const version = "1.1.0";
|
|
55465
|
+
const version = "1.1.1-alpha.0";
|
|
55341
55466
|
|
|
55342
55467
|
exports.AComponentAnimate = AComponentAnimate;
|
|
55343
55468
|
exports.ACustomAnimate = ACustomAnimate;
|
|
@@ -56100,6 +56225,7 @@
|
|
|
56100
56225
|
exports.installNodeEnvToApp = installNodeEnvToApp;
|
|
56101
56226
|
exports.installNodePickersToApp = installNodePickersToApp;
|
|
56102
56227
|
exports.installPoptipToApp = installPoptipToApp;
|
|
56228
|
+
exports.installRuntimeContributionModule = installRuntimeContributionModule;
|
|
56103
56229
|
exports.installRuntimeDrawContributionsToApp = installRuntimeDrawContributionsToApp;
|
|
56104
56230
|
exports.installRuntimeGraphicRenderersToApp = installRuntimeGraphicRenderersToApp;
|
|
56105
56231
|
exports.installRuntimePickersToApp = installRuntimePickersToApp;
|