@antv/g 5.16.13 → 5.16.15

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.umd.js CHANGED
@@ -8633,7 +8633,7 @@
8633
8633
  // : INHERITABLE_BASE_STYLE_PROPS,
8634
8634
  };if(runtime.enableCSSParsing){// @ts-ignore
8635
8635
  options.usedAttributes=INHERITABLE_STYLE_PROPS;}// account for FCP, process properties as less as possible
8636
- runtime.styleValueRegistry.processProperties(this,attributes,options);// redraw at next frame
8636
+ var formattedAttributes={};for(var name in attributes){var attributeName=formatAttributeName(name);formattedAttributes[attributeName]=attributes[name];}runtime.styleValueRegistry.processProperties(this,formattedAttributes,options);// redraw at next frame
8637
8637
  renderable.dirty=true;};_proto.setAttribute=function setAttribute(name,value,force){if(force===void 0){force=false;}var attributeName=formatAttributeName(name);// ignore undefined value
8638
8638
  if(isUndefined(value)){return;}if(force||value!==this.attributes[attributeName]){this.internalSetAttribute(attributeName,value);_Element.prototype.setAttribute.call(this,attributeName,value);}}/**
8639
8639
  * called when attributes get changed or initialized
@@ -8883,7 +8883,9 @@
8883
8883
  */n:'fill',int:true,k:['none'],d:'none',syntax:exports.PropertySyntax.PAINT},{n:'fillRule',k:['nonzero','evenodd'],d:'nonzero'},/**
8884
8884
  * default to none
8885
8885
  * @see https://developer.mozilla.org/en-US/docs/Web/SVG/Attribute/stroke#usage_notes
8886
- */{n:'stroke',int:true,k:['none'],d:'none',syntax:exports.PropertySyntax.PAINT},{n:'shadowType',k:['inner','outer','both'],d:'outer',l:true},{n:'shadowColor',int:true,syntax:exports.PropertySyntax.COLOR},{n:'shadowOffsetX',int:true,l:true,d:'0',syntax:exports.PropertySyntax.LENGTH_PERCENTAGE},{n:'shadowOffsetY',int:true,l:true,d:'0',syntax:exports.PropertySyntax.LENGTH_PERCENTAGE},{n:'shadowBlur',int:true,l:true,d:'0',syntax:exports.PropertySyntax.SHADOW_BLUR},{/**
8886
+ */{n:'stroke',int:true,k:['none'],d:'none',syntax:exports.PropertySyntax.PAINT,/**
8887
+ * Stroke 'none' won't affect geometry but others will.
8888
+ */l:true},{n:'shadowType',k:['inner','outer','both'],d:'outer',l:true},{n:'shadowColor',int:true,syntax:exports.PropertySyntax.COLOR},{n:'shadowOffsetX',int:true,l:true,d:'0',syntax:exports.PropertySyntax.LENGTH_PERCENTAGE},{n:'shadowOffsetY',int:true,l:true,d:'0',syntax:exports.PropertySyntax.LENGTH_PERCENTAGE},{n:'shadowBlur',int:true,l:true,d:'0',syntax:exports.PropertySyntax.SHADOW_BLUR},{/**
8887
8889
  * @see https://developer.mozilla.org/en-US/docs/Web/SVG/Attribute/stroke-width
8888
8890
  */n:'lineWidth',int:true,inh:true,d:'1',l:true,a:['strokeWidth'],syntax:exports.PropertySyntax.LENGTH_PERCENTAGE},{n:'increasedLineWidthForHitTesting',inh:true,d:'0',l:true,syntax:exports.PropertySyntax.LENGTH_PERCENTAGE},{n:'lineJoin',inh:true,l:true,a:['strokeLinejoin'],k:['miter','bevel','round'],d:'miter'},{n:'lineCap',inh:true,l:true,a:['strokeLinecap'],k:['butt','round','square'],d:'butt'},{n:'lineDash',int:true,inh:true,k:['none'],a:['strokeDasharray'],syntax:exports.PropertySyntax.LENGTH_PERCENTAGE_12},{n:'lineDashOffset',int:true,inh:true,d:'0',a:['strokeDashoffset'],syntax:exports.PropertySyntax.LENGTH_PERCENTAGE},{n:'offsetPath',syntax:exports.PropertySyntax.DEFINED_PATH},{n:'offsetDistance',int:true,syntax:exports.PropertySyntax.OFFSET_DISTANCE},{n:'dx',int:true,l:true,d:'0',syntax:exports.PropertySyntax.LENGTH_PERCENTAGE},{n:'dy',int:true,l:true,d:'0',syntax:exports.PropertySyntax.LENGTH_PERCENTAGE},{n:'zIndex',ind:true,int:true,d:'0',k:['auto'],syntax:exports.PropertySyntax.Z_INDEX},{n:'visibility',k:['visible','hidden'],ind:true,inh:true,/**
8889
8891
  * support interpolation
@@ -8927,14 +8929,7 @@
8927
8929
  *
8928
8930
  * * calculate used value
8929
8931
  * * post process
8930
- */;_proto.processProperties=function processProperties(object,attributes,options){var _this2=this;if(options===void 0){options={skipUpdateAttribute:false,skipParse:false,forceUpdateGeometry:false,usedAttributes:[]};}if(!runtime.enableCSSParsing){// alias
8931
- // @ts-ignore
8932
- if(attributes.src){// @ts-ignore
8933
- attributes.img=attributes.src;}// @ts-ignore
8934
- if(attributes.d){// @ts-ignore
8935
- attributes.path=attributes.d;}if(attributes.strokeDasharray){attributes.lineDash=attributes.strokeDasharray;}if(attributes.strokeWidth){attributes.lineWidth=attributes.strokeWidth;}// @ts-ignore
8936
- if(attributes.textAnchor){// @ts-ignore
8937
- attributes.textAlign=attributes.textAnchor;}Object.assign(object.attributes,attributes);var _attributeNames=Object.keys(attributes);// clipPath
8932
+ */;_proto.processProperties=function processProperties(object,attributes,options){var _this2=this;if(options===void 0){options={skipUpdateAttribute:false,skipParse:false,forceUpdateGeometry:false,usedAttributes:[]};}if(!runtime.enableCSSParsing){Object.assign(object.attributes,attributes);var _attributeNames=Object.keys(attributes);// clipPath
8938
8933
  var oldClipPath=object.parsedStyle.clipPath;var oldOffsetPath=object.parsedStyle.offsetPath;object.parsedStyle=Object.assign(object.parsedStyle,attributes);var _needUpdateGeometry=!!options.forceUpdateGeometry;if(!_needUpdateGeometry){for(var i=0;i<GEOMETRY_ATTRIBUTE_NAMES.length;i++){if(GEOMETRY_ATTRIBUTE_NAMES[i]in attributes){_needUpdateGeometry=true;break;}}}if(attributes.fill){object.parsedStyle.fill=parseColor(attributes.fill);}if(attributes.stroke){object.parsedStyle.stroke=parseColor(attributes.stroke);}if(attributes.shadowColor){object.parsedStyle.shadowColor=parseColor(attributes.shadowColor);}if(attributes.filter){object.parsedStyle.filter=parseFilter(attributes.filter);}// Rect
8939
8934
  // @ts-ignore
8940
8935
  if(!isNil(attributes.radius)){// @ts-ignore
@@ -8976,7 +8971,7 @@
8976
8971
  !isNil(attributes.y2)||// @ts-ignore
8977
8972
  !isNil(attributes.z2))){runtime.CSSPropertySyntaxFactory['<coordinate>'].postProcessor(object,_attributeNames);}if(!isNil(attributes.zIndex)){runtime.CSSPropertySyntaxFactory['<z-index>'].postProcessor(object,_attributeNames);}// @ts-ignore
8978
8973
  if(attributes.path){runtime.CSSPropertySyntaxFactory['<path>'].postProcessor(object,_attributeNames);}// @ts-ignore
8979
- if(attributes.points){runtime.CSSPropertySyntaxFactory['<list-of-points>'].postProcessor(object,_attributeNames);}if(!isNil(attributes.offsetDistance)){runtime.CSSPropertySyntaxFactory['<offset-distance>'].postProcessor(object,_attributeNames);}if(attributes.transform){runtime.CSSPropertySyntaxFactory['<transform>'].postProcessor(object,_attributeNames);}if(_needUpdateGeometry){this.updateGeometry(object);}return;}var _options=options,skipUpdateAttribute=_options.skipUpdateAttribute,skipParse=_options.skipParse,forceUpdateGeometry=_options.forceUpdateGeometry,usedAttributes=_options.usedAttributes;var needUpdateGeometry=forceUpdateGeometry;var attributeNames=Object.keys(attributes);attributeNames.forEach(function(attributeName){var _propertyMetadataCach;var name=formatAttributeName(attributeName);if(!skipUpdateAttribute){object.attributes[name]=attributes[attributeName];}if(!needUpdateGeometry&&((_propertyMetadataCach=propertyMetadataCache[name])===null||_propertyMetadataCach===void 0?void 0:_propertyMetadataCach.l)){needUpdateGeometry=true;}});if(!skipParse){attributeNames.forEach(function(name){object.computedStyle[name]=_this2.parseProperty(name,object.attributes[name],object);});}// let hasUnresolvedProperties = false;
8974
+ if(attributes.points){runtime.CSSPropertySyntaxFactory['<list-of-points>'].postProcessor(object,_attributeNames);}if(!isNil(attributes.offsetDistance)){runtime.CSSPropertySyntaxFactory['<offset-distance>'].postProcessor(object,_attributeNames);}if(attributes.transform){runtime.CSSPropertySyntaxFactory['<transform>'].postProcessor(object,_attributeNames);}if(_needUpdateGeometry){this.updateGeometry(object);}return;}var _options=options,skipUpdateAttribute=_options.skipUpdateAttribute,skipParse=_options.skipParse,forceUpdateGeometry=_options.forceUpdateGeometry,usedAttributes=_options.usedAttributes;var needUpdateGeometry=forceUpdateGeometry;var attributeNames=Object.keys(attributes);attributeNames.forEach(function(attributeName){var _propertyMetadataCach;if(!skipUpdateAttribute){object.attributes[attributeName]=attributes[attributeName];}if(!needUpdateGeometry&&((_propertyMetadataCach=propertyMetadataCache[attributeName])===null||_propertyMetadataCach===void 0?void 0:_propertyMetadataCach.l)){needUpdateGeometry=true;}});if(!skipParse){attributeNames.forEach(function(name){object.computedStyle[name]=_this2.parseProperty(name,object.attributes[name],object);});}// let hasUnresolvedProperties = false;
8980
8975
  // parse according to priority
8981
8976
  // path 50
8982
8977
  // points 50
@@ -10018,1197 +10013,6 @@
10018
10013
  }(Camera);
10019
10014
  runtime.CameraContribution = AdvancedCamera;
10020
10015
 
10021
- // export const ContextNode = Syringe.defineToken('');
10022
- var FragmentResult = function FragmentResult(_layoutContext, _node, options) {
10023
- this._layoutContext = void 0;
10024
- this._node = void 0;
10025
- this.options = void 0;
10026
- this.layoutContext = void 0;
10027
- this.inlineSize = void 0;
10028
- this.blockSize = void 0;
10029
- this.node = void 0;
10030
- this.childFragments = void 0;
10031
- this.data = void 0;
10032
- this._layoutContext = _layoutContext;
10033
- this._node = _node;
10034
- this.options = options;
10035
- this.layoutContext = _layoutContext;
10036
- this.inlineSize = options === null || options === void 0 ? void 0 : options.inlineSize;
10037
- this.blockSize = options === null || options === void 0 ? void 0 : options.blockSize;
10038
- this.childFragments = options === null || options === void 0 ? void 0 : options.childFragments;
10039
- this.data = options.data;
10040
- this.node = _node;
10041
- };
10042
-
10043
- (function (LayoutTaskType) {
10044
- LayoutTaskType["Layout"] = "layout";
10045
- LayoutTaskType["IntrinsicSizes"] = "intrinsic-sizes";
10046
- })(exports.LayoutTaskType || (exports.LayoutTaskType = {}));
10047
- var ChildDisplayType;
10048
- (function (ChildDisplayType) {
10049
- ChildDisplayType[ChildDisplayType["block"] = 0] = "block";
10050
- ChildDisplayType[ChildDisplayType["normal"] = 1] = "normal";
10051
- })(ChildDisplayType || (ChildDisplayType = {}));
10052
- var LayoutSizingMode;
10053
- (function (LayoutSizingMode) {
10054
- LayoutSizingMode[LayoutSizingMode["block-like"] = 0] = "block-like";
10055
- LayoutSizingMode[LayoutSizingMode["manual"] = 1] = "manual";
10056
- })(LayoutSizingMode || (LayoutSizingMode = {}));
10057
-
10058
- (function (PropertyName) {
10059
- PropertyName["LAYOUT"] = "display";
10060
- PropertyName["LEFT"] = "left";
10061
- PropertyName["TOP"] = "top";
10062
- PropertyName["BOTTOM"] = "bottom";
10063
- PropertyName["RIGHT"] = "right";
10064
- PropertyName["WIDTH"] = "width";
10065
- PropertyName["HEIGHT"] = "height";
10066
- PropertyName["MIN_WIDTH"] = "minWidth";
10067
- PropertyName["MAX_WIDTH"] = "maxWidth";
10068
- PropertyName["MIN_HEIGHT"] = "minHeight";
10069
- PropertyName["MAX_HEIGHT"] = "maxHeight";
10070
- PropertyName["BOX_SIZING"] = "boxSizing";
10071
- PropertyName["PADDING"] = "padding";
10072
- PropertyName["PADDING_TOP"] = "paddingTop";
10073
- PropertyName["PADDING_BOTTOM"] = "paddingBottom";
10074
- PropertyName["PADDING_START"] = "paddingLeft";
10075
- PropertyName["PADDING_END"] = "paddingRight";
10076
- PropertyName["MARGIN"] = "margin";
10077
- PropertyName["MARGIN_TOP"] = "marginTop";
10078
- PropertyName["MARGIN_BOTTOM"] = "marginBottom";
10079
- PropertyName["MARGIN_START"] = "marginLeft";
10080
- PropertyName["MARGIN_END"] = "marginRight";
10081
- PropertyName["BORDER"] = "border";
10082
- PropertyName["BORDER_TOP"] = "borderTop";
10083
- PropertyName["BORDER_BOTTOM"] = "borderBottom";
10084
- PropertyName["BORDER_START"] = "borderLeft";
10085
- PropertyName["BORDER_END"] = "borderRight";
10086
- PropertyName["FLEX_DIRECTION"] = "flexDirection";
10087
- PropertyName["FLEX_WRAP"] = "flexWrap";
10088
- PropertyName["FLEX_FLOW"] = "flexFlow";
10089
- PropertyName["ALIGN_ITEMS"] = "alignItems";
10090
- PropertyName["ALIGN_CONTENT"] = "alignContent";
10091
- PropertyName["JUSTIFY_CONTENT"] = "justifyContent";
10092
- PropertyName["FLEX"] = "flex";
10093
- PropertyName["ALIGN_SELF"] = "alignSelf";
10094
- PropertyName["FLEX_SHRINK"] = "flexShrink";
10095
- PropertyName["FLEX_BASIS"] = "flexBasis";
10096
- PropertyName["FLEX_GROW"] = "flexGrow";
10097
- PropertyName["OFFSET_WIDTH"] = "offsetWidth";
10098
- PropertyName["OFFSET_HEIGHT"] = "offsetHeight";
10099
- PropertyName["ORDER"] = "order";
10100
- })(exports.PropertyName || (exports.PropertyName = {}));
10101
- function _regeneratorRuntime$1() {
10102
- _regeneratorRuntime$1 = function _regeneratorRuntime() {
10103
- return exports;
10104
- };
10105
- var exports = {},
10106
- Op = Object.prototype,
10107
- hasOwn = Op.hasOwnProperty,
10108
- defineProperty = Object.defineProperty || function (obj, key, desc) {
10109
- obj[key] = desc.value;
10110
- },
10111
- $Symbol = "function" == typeof Symbol ? Symbol : {},
10112
- iteratorSymbol = $Symbol.iterator || "@@iterator",
10113
- asyncIteratorSymbol = $Symbol.asyncIterator || "@@asyncIterator",
10114
- toStringTagSymbol = $Symbol.toStringTag || "@@toStringTag";
10115
- function define(obj, key, value) {
10116
- return Object.defineProperty(obj, key, {
10117
- value: value,
10118
- enumerable: !0,
10119
- configurable: !0,
10120
- writable: !0
10121
- }), obj[key];
10122
- }
10123
- try {
10124
- define({}, "");
10125
- } catch (err) {
10126
- define = function define(obj, key, value) {
10127
- return obj[key] = value;
10128
- };
10129
- }
10130
- function wrap(innerFn, outerFn, self, tryLocsList) {
10131
- var protoGenerator = outerFn && outerFn.prototype instanceof Generator ? outerFn : Generator,
10132
- generator = Object.create(protoGenerator.prototype),
10133
- context = new Context(tryLocsList || []);
10134
- return defineProperty(generator, "_invoke", {
10135
- value: makeInvokeMethod(innerFn, self, context)
10136
- }), generator;
10137
- }
10138
- function tryCatch(fn, obj, arg) {
10139
- try {
10140
- return {
10141
- type: "normal",
10142
- arg: fn.call(obj, arg)
10143
- };
10144
- } catch (err) {
10145
- return {
10146
- type: "throw",
10147
- arg: err
10148
- };
10149
- }
10150
- }
10151
- exports.wrap = wrap;
10152
- var ContinueSentinel = {};
10153
- function Generator() {}
10154
- function GeneratorFunction() {}
10155
- function GeneratorFunctionPrototype() {}
10156
- var IteratorPrototype = {};
10157
- define(IteratorPrototype, iteratorSymbol, function () {
10158
- return this;
10159
- });
10160
- var getProto = Object.getPrototypeOf,
10161
- NativeIteratorPrototype = getProto && getProto(getProto(values([])));
10162
- NativeIteratorPrototype && NativeIteratorPrototype !== Op && hasOwn.call(NativeIteratorPrototype, iteratorSymbol) && (IteratorPrototype = NativeIteratorPrototype);
10163
- var Gp = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(IteratorPrototype);
10164
- function defineIteratorMethods(prototype) {
10165
- ["next", "throw", "return"].forEach(function (method) {
10166
- define(prototype, method, function (arg) {
10167
- return this._invoke(method, arg);
10168
- });
10169
- });
10170
- }
10171
- function AsyncIterator(generator, PromiseImpl) {
10172
- function invoke(method, arg, resolve, reject) {
10173
- var record = tryCatch(generator[method], generator, arg);
10174
- if ("throw" !== record.type) {
10175
- var result = record.arg,
10176
- value = result.value;
10177
- return value && "object" == typeof value && hasOwn.call(value, "__await") ? PromiseImpl.resolve(value.__await).then(function (value) {
10178
- invoke("next", value, resolve, reject);
10179
- }, function (err) {
10180
- invoke("throw", err, resolve, reject);
10181
- }) : PromiseImpl.resolve(value).then(function (unwrapped) {
10182
- result.value = unwrapped, resolve(result);
10183
- }, function (error) {
10184
- return invoke("throw", error, resolve, reject);
10185
- });
10186
- }
10187
- reject(record.arg);
10188
- }
10189
- var previousPromise;
10190
- defineProperty(this, "_invoke", {
10191
- value: function value(method, arg) {
10192
- function callInvokeWithMethodAndArg() {
10193
- return new PromiseImpl(function (resolve, reject) {
10194
- invoke(method, arg, resolve, reject);
10195
- });
10196
- }
10197
- return previousPromise = previousPromise ? previousPromise.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg();
10198
- }
10199
- });
10200
- }
10201
- function makeInvokeMethod(innerFn, self, context) {
10202
- var state = "suspendedStart";
10203
- return function (method, arg) {
10204
- if ("executing" === state) throw new Error("Generator is already running");
10205
- if ("completed" === state) {
10206
- if ("throw" === method) throw arg;
10207
- return doneResult();
10208
- }
10209
- for (context.method = method, context.arg = arg;;) {
10210
- var delegate = context.delegate;
10211
- if (delegate) {
10212
- var delegateResult = maybeInvokeDelegate(delegate, context);
10213
- if (delegateResult) {
10214
- if (delegateResult === ContinueSentinel) continue;
10215
- return delegateResult;
10216
- }
10217
- }
10218
- if ("next" === context.method) context.sent = context._sent = context.arg;else if ("throw" === context.method) {
10219
- if ("suspendedStart" === state) throw state = "completed", context.arg;
10220
- context.dispatchException(context.arg);
10221
- } else "return" === context.method && context.abrupt("return", context.arg);
10222
- state = "executing";
10223
- var record = tryCatch(innerFn, self, context);
10224
- if ("normal" === record.type) {
10225
- if (state = context.done ? "completed" : "suspendedYield", record.arg === ContinueSentinel) continue;
10226
- return {
10227
- value: record.arg,
10228
- done: context.done
10229
- };
10230
- }
10231
- "throw" === record.type && (state = "completed", context.method = "throw", context.arg = record.arg);
10232
- }
10233
- };
10234
- }
10235
- function maybeInvokeDelegate(delegate, context) {
10236
- var methodName = context.method,
10237
- method = delegate.iterator[methodName];
10238
- if (undefined === method) return context.delegate = null, "throw" === methodName && delegate.iterator.return && (context.method = "return", context.arg = undefined, maybeInvokeDelegate(delegate, context), "throw" === context.method) || "return" !== methodName && (context.method = "throw", context.arg = new TypeError("The iterator does not provide a '" + methodName + "' method")), ContinueSentinel;
10239
- var record = tryCatch(method, delegate.iterator, context.arg);
10240
- if ("throw" === record.type) return context.method = "throw", context.arg = record.arg, context.delegate = null, ContinueSentinel;
10241
- var info = record.arg;
10242
- return info ? info.done ? (context[delegate.resultName] = info.value, context.next = delegate.nextLoc, "return" !== context.method && (context.method = "next", context.arg = undefined), context.delegate = null, ContinueSentinel) : info : (context.method = "throw", context.arg = new TypeError("iterator result is not an object"), context.delegate = null, ContinueSentinel);
10243
- }
10244
- function pushTryEntry(locs) {
10245
- var entry = {
10246
- tryLoc: locs[0]
10247
- };
10248
- 1 in locs && (entry.catchLoc = locs[1]), 2 in locs && (entry.finallyLoc = locs[2], entry.afterLoc = locs[3]), this.tryEntries.push(entry);
10249
- }
10250
- function resetTryEntry(entry) {
10251
- var record = entry.completion || {};
10252
- record.type = "normal", delete record.arg, entry.completion = record;
10253
- }
10254
- function Context(tryLocsList) {
10255
- this.tryEntries = [{
10256
- tryLoc: "root"
10257
- }], tryLocsList.forEach(pushTryEntry, this), this.reset(!0);
10258
- }
10259
- function values(iterable) {
10260
- if (iterable) {
10261
- var iteratorMethod = iterable[iteratorSymbol];
10262
- if (iteratorMethod) return iteratorMethod.call(iterable);
10263
- if ("function" == typeof iterable.next) return iterable;
10264
- if (!isNaN(iterable.length)) {
10265
- var i = -1,
10266
- next = function next() {
10267
- for (; ++i < iterable.length;) if (hasOwn.call(iterable, i)) return next.value = iterable[i], next.done = !1, next;
10268
- return next.value = undefined, next.done = !0, next;
10269
- };
10270
- return next.next = next;
10271
- }
10272
- }
10273
- return {
10274
- next: doneResult
10275
- };
10276
- }
10277
- function doneResult() {
10278
- return {
10279
- value: undefined,
10280
- done: !0
10281
- };
10282
- }
10283
- return GeneratorFunction.prototype = GeneratorFunctionPrototype, defineProperty(Gp, "constructor", {
10284
- value: GeneratorFunctionPrototype,
10285
- configurable: !0
10286
- }), defineProperty(GeneratorFunctionPrototype, "constructor", {
10287
- value: GeneratorFunction,
10288
- configurable: !0
10289
- }), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, toStringTagSymbol, "GeneratorFunction"), exports.isGeneratorFunction = function (genFun) {
10290
- var ctor = "function" == typeof genFun && genFun.constructor;
10291
- return !!ctor && (ctor === GeneratorFunction || "GeneratorFunction" === (ctor.displayName || ctor.name));
10292
- }, exports.mark = function (genFun) {
10293
- return Object.setPrototypeOf ? Object.setPrototypeOf(genFun, GeneratorFunctionPrototype) : (genFun.__proto__ = GeneratorFunctionPrototype, define(genFun, toStringTagSymbol, "GeneratorFunction")), genFun.prototype = Object.create(Gp), genFun;
10294
- }, exports.awrap = function (arg) {
10295
- return {
10296
- __await: arg
10297
- };
10298
- }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, asyncIteratorSymbol, function () {
10299
- return this;
10300
- }), exports.AsyncIterator = AsyncIterator, exports.async = function (innerFn, outerFn, self, tryLocsList, PromiseImpl) {
10301
- void 0 === PromiseImpl && (PromiseImpl = Promise);
10302
- var iter = new AsyncIterator(wrap(innerFn, outerFn, self, tryLocsList), PromiseImpl);
10303
- return exports.isGeneratorFunction(outerFn) ? iter : iter.next().then(function (result) {
10304
- return result.done ? result.value : iter.next();
10305
- });
10306
- }, defineIteratorMethods(Gp), define(Gp, toStringTagSymbol, "Generator"), define(Gp, iteratorSymbol, function () {
10307
- return this;
10308
- }), define(Gp, "toString", function () {
10309
- return "[object Generator]";
10310
- }), exports.keys = function (val) {
10311
- var object = Object(val),
10312
- keys = [];
10313
- for (var key in object) keys.push(key);
10314
- return keys.reverse(), function next() {
10315
- for (; keys.length;) {
10316
- var key = keys.pop();
10317
- if (key in object) return next.value = key, next.done = !1, next;
10318
- }
10319
- return next.done = !0, next;
10320
- };
10321
- }, exports.values = values, Context.prototype = {
10322
- constructor: Context,
10323
- reset: function reset(skipTempReset) {
10324
- if (this.prev = 0, this.next = 0, this.sent = this._sent = undefined, this.done = !1, this.delegate = null, this.method = "next", this.arg = undefined, this.tryEntries.forEach(resetTryEntry), !skipTempReset) for (var name in this) "t" === name.charAt(0) && hasOwn.call(this, name) && !isNaN(+name.slice(1)) && (this[name] = undefined);
10325
- },
10326
- stop: function stop() {
10327
- this.done = !0;
10328
- var rootRecord = this.tryEntries[0].completion;
10329
- if ("throw" === rootRecord.type) throw rootRecord.arg;
10330
- return this.rval;
10331
- },
10332
- dispatchException: function dispatchException(exception) {
10333
- if (this.done) throw exception;
10334
- var context = this;
10335
- function handle(loc, caught) {
10336
- return record.type = "throw", record.arg = exception, context.next = loc, caught && (context.method = "next", context.arg = undefined), !!caught;
10337
- }
10338
- for (var i = this.tryEntries.length - 1; i >= 0; --i) {
10339
- var entry = this.tryEntries[i],
10340
- record = entry.completion;
10341
- if ("root" === entry.tryLoc) return handle("end");
10342
- if (entry.tryLoc <= this.prev) {
10343
- var hasCatch = hasOwn.call(entry, "catchLoc"),
10344
- hasFinally = hasOwn.call(entry, "finallyLoc");
10345
- if (hasCatch && hasFinally) {
10346
- if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0);
10347
- if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc);
10348
- } else if (hasCatch) {
10349
- if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0);
10350
- } else {
10351
- if (!hasFinally) throw new Error("try statement without catch or finally");
10352
- if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc);
10353
- }
10354
- }
10355
- }
10356
- },
10357
- abrupt: function abrupt(type, arg) {
10358
- for (var i = this.tryEntries.length - 1; i >= 0; --i) {
10359
- var entry = this.tryEntries[i];
10360
- if (entry.tryLoc <= this.prev && hasOwn.call(entry, "finallyLoc") && this.prev < entry.finallyLoc) {
10361
- var finallyEntry = entry;
10362
- break;
10363
- }
10364
- }
10365
- finallyEntry && ("break" === type || "continue" === type) && finallyEntry.tryLoc <= arg && arg <= finallyEntry.finallyLoc && (finallyEntry = null);
10366
- var record = finallyEntry ? finallyEntry.completion : {};
10367
- return record.type = type, record.arg = arg, finallyEntry ? (this.method = "next", this.next = finallyEntry.finallyLoc, ContinueSentinel) : this.complete(record);
10368
- },
10369
- complete: function complete(record, afterLoc) {
10370
- if ("throw" === record.type) throw record.arg;
10371
- return "break" === record.type || "continue" === record.type ? this.next = record.arg : "return" === record.type ? (this.rval = this.arg = record.arg, this.method = "return", this.next = "end") : "normal" === record.type && afterLoc && (this.next = afterLoc), ContinueSentinel;
10372
- },
10373
- finish: function finish(finallyLoc) {
10374
- for (var i = this.tryEntries.length - 1; i >= 0; --i) {
10375
- var entry = this.tryEntries[i];
10376
- if (entry.finallyLoc === finallyLoc) return this.complete(entry.completion, entry.afterLoc), resetTryEntry(entry), ContinueSentinel;
10377
- }
10378
- },
10379
- catch: function _catch(tryLoc) {
10380
- for (var i = this.tryEntries.length - 1; i >= 0; --i) {
10381
- var entry = this.tryEntries[i];
10382
- if (entry.tryLoc === tryLoc) {
10383
- var record = entry.completion;
10384
- if ("throw" === record.type) {
10385
- var thrown = record.arg;
10386
- resetTryEntry(entry);
10387
- }
10388
- return thrown;
10389
- }
10390
- }
10391
- throw new Error("illegal catch attempt");
10392
- },
10393
- delegateYield: function delegateYield(iterable, resultName, nextLoc) {
10394
- return this.delegate = {
10395
- iterator: values(iterable),
10396
- resultName: resultName,
10397
- nextLoc: nextLoc
10398
- }, "next" === this.method && (this.arg = undefined), ContinueSentinel;
10399
- }
10400
- }, exports;
10401
- }
10402
- function asyncGeneratorStep$1(gen, resolve, reject, _next, _throw, key, arg) {
10403
- try {
10404
- var info = gen[key](arg);
10405
- var value = info.value;
10406
- } catch (error) {
10407
- reject(error);
10408
- return;
10409
- }
10410
- if (info.done) {
10411
- resolve(value);
10412
- } else {
10413
- Promise.resolve(value).then(_next, _throw);
10414
- }
10415
- }
10416
- function _asyncToGenerator$1(fn) {
10417
- return function () {
10418
- var self = this,
10419
- args = arguments;
10420
- return new Promise(function (resolve, reject) {
10421
- var gen = fn.apply(self, args);
10422
- function _next(value) {
10423
- asyncGeneratorStep$1(gen, resolve, reject, _next, _throw, "next", value);
10424
- }
10425
- function _throw(err) {
10426
- asyncGeneratorStep$1(gen, resolve, reject, _next, _throw, "throw", err);
10427
- }
10428
- _next(undefined);
10429
- });
10430
- };
10431
- }
10432
- function _defineProperties$1(target, props) {
10433
- for (var i = 0; i < props.length; i++) {
10434
- var descriptor = props[i];
10435
- descriptor.enumerable = descriptor.enumerable || false;
10436
- descriptor.configurable = true;
10437
- if ("value" in descriptor) descriptor.writable = true;
10438
- Object.defineProperty(target, _toPropertyKey$1(descriptor.key), descriptor);
10439
- }
10440
- }
10441
- function _createClass$1(Constructor, protoProps, staticProps) {
10442
- if (protoProps) _defineProperties$1(Constructor.prototype, protoProps);
10443
- if (staticProps) _defineProperties$1(Constructor, staticProps);
10444
- Object.defineProperty(Constructor, "prototype", {
10445
- writable: false
10446
- });
10447
- return Constructor;
10448
- }
10449
- function _toPrimitive$1(input, hint) {
10450
- if (typeof input !== "object" || input === null) return input;
10451
- var prim = input[Symbol.toPrimitive];
10452
- if (prim !== undefined) {
10453
- var res = prim.call(input, hint || "default");
10454
- if (typeof res !== "object") return res;
10455
- throw new TypeError("@@toPrimitive must return a primitive value.");
10456
- }
10457
- return (hint === "string" ? String : Number)(input);
10458
- }
10459
- function _toPropertyKey$1(arg) {
10460
- var key = _toPrimitive$1(arg, "string");
10461
- return typeof key === "symbol" ? key : String(key);
10462
- }
10463
-
10464
- /**
10465
- * This function allow you to modify a JS Promise by adding some status properties.
10466
- * Based on: http://stackoverflow.com/questions/21485545/is-there-a-way-to-tell-if-an-es6-promise-is-fulfilled-rejected-resolved
10467
- * But modified according to the specs of promises : https://promisesaplus.com/
10468
- */
10469
- var makeQuerablePromise = function makeQuerablePromise(promise) {
10470
- // Don't modify any promise that has been already modified.
10471
- if (promise.isRejected || promise.isFulfilled) return promise;
10472
- // Set initial state
10473
- var isPending = true;
10474
- var isRejected = false;
10475
- var isFulfilled = false;
10476
- var fullFilledValue;
10477
- // Observe the promise, saving the fulfillment in a closure scope.
10478
- var result = promise.then(function (v) {
10479
- isFulfilled = true;
10480
- isPending = false;
10481
- fullFilledValue = v;
10482
- return v;
10483
- }, function (e) {
10484
- isRejected = true;
10485
- isPending = false;
10486
- throw e;
10487
- });
10488
- result.isFulfilled = function () {
10489
- return isFulfilled;
10490
- };
10491
- result.isPending = function () {
10492
- return isPending;
10493
- };
10494
- result.isRejected = function () {
10495
- return isRejected;
10496
- };
10497
- result.getFullFilledValue = function () {
10498
- return fullFilledValue;
10499
- };
10500
- return result;
10501
- };
10502
- /**
10503
- * Simple implementation of the deferred pattern.
10504
- * An object that exposes a promise and functions to resolve and reject it.
10505
- */
10506
- var Deferred = function Deferred() {
10507
- var _this = this;
10508
- this.resolve = void 0;
10509
- this.reject = void 0;
10510
- this.promise = new Promise(function (resolve, reject) {
10511
- _this.resolve = resolve;
10512
- _this.reject = reject;
10513
- });
10514
- };
10515
- var LayoutChildren = /*#__PURE__*/function () {
10516
- function LayoutChildren(_layoutContext, options) {
10517
- this._layoutContext = void 0;
10518
- this.options = void 0;
10519
- this.node = void 0;
10520
- this.styleMap = void 0;
10521
- this.layoutContext = void 0;
10522
- this._layoutContext = _layoutContext;
10523
- this.options = options;
10524
- this.layoutContext = _layoutContext;
10525
- this.node = options.node;
10526
- this.styleMap = options.node.getAllStyle();
10527
- }
10528
- var _proto = LayoutChildren.prototype;
10529
- _proto.intrinsicSizes = function intrinsicSizes() {
10530
- // if (this.contextId !== this.layoutContext.contextId) {
10531
- // throw new Error('Invalid State: wrong layout context');
10532
- // }
10533
- var deferred = new Deferred();
10534
- this.layoutContext.appendWorkTask({
10535
- layoutChild: this,
10536
- taskType: exports.LayoutTaskType.IntrinsicSizes,
10537
- deferred: deferred
10538
- });
10539
- return deferred.promise;
10540
- };
10541
- _proto.layoutNextFragment = function layoutNextFragment(constraints) {
10542
- // if (this.layoutContext.contextId !== this.layoutContext.contextId) {
10543
- // throw new Error('Invalid State: wrong layout context');
10544
- // }
10545
- if (this.layoutContext.mode === exports.LayoutTaskType.IntrinsicSizes) {
10546
- throw new Error('Not Supported: cant call layoutNextFragment in intrinsicSizes');
10547
- }
10548
- var deferred = new Deferred();
10549
- this.layoutContext.appendWorkTask({
10550
- layoutConstraints: constraints,
10551
- layoutChild: this,
10552
- taskType: exports.LayoutTaskType.Layout,
10553
- deferred: deferred
10554
- });
10555
- return deferred.promise;
10556
- };
10557
- return LayoutChildren;
10558
- }();
10559
- var guid = 0;
10560
- /**
10561
- * 每次layout 有单独的 context
10562
- */
10563
- var LayoutContext = /*#__PURE__*/function () {
10564
- function LayoutContext(options) {
10565
- this.options = void 0;
10566
- this.contextId = void 0;
10567
- this.workQueue = [];
10568
- this.mode = void 0;
10569
- this.layoutChildrenFactory = void 0;
10570
- this.fragmentResultFactory = void 0;
10571
- this.layoutFragmentFactory = void 0;
10572
- this.options = options;
10573
- this.contextId = "" + guid++;
10574
- this.mode = options.mode;
10575
- this.layoutChildrenFactory = options.layoutChildrenFactory;
10576
- this.fragmentResultFactory = options.fragmentResultFactory;
10577
- this.layoutFragmentFactory = options.layoutFragmentFactory;
10578
- }
10579
- var _proto = LayoutContext.prototype;
10580
- _proto.appendWorkTask = function appendWorkTask(work) {
10581
- this.workQueue.push(work);
10582
- };
10583
- _proto.clearWorkQueue = function clearWorkQueue() {
10584
- this.workQueue = [];
10585
- };
10586
- return LayoutContext;
10587
- }();
10588
- var AbstractLayoutDefinition = function AbstractLayoutDefinition() {};
10589
- AbstractLayoutDefinition.inputProperties = void 0;
10590
- AbstractLayoutDefinition.childrenInputProperties = void 0;
10591
- AbstractLayoutDefinition.layoutOptions = void 0;
10592
- var SCROLLBAR_SIZES = [0, 0, 0, 0];
10593
- /**
10594
- * https://drafts.css-houdini.org/css-layout-api/#layoutedges
10595
- * the size of border, scrollbar, padding
10596
- */
10597
- var LayoutEdges =
10598
- // Convenience attributes for the sum in one direction.
10599
-
10600
- function LayoutEdges(options) {
10601
- var _styleMap$get$value, _styleMap$get, _styleMap$get$value2, _styleMap$get2, _styleMap$get$value3, _styleMap$get3, _styleMap$get$value4, _styleMap$get4, _styleMap$get$value5, _styleMap$get5, _styleMap$get$value6, _styleMap$get6, _styleMap$get$value7, _styleMap$get7, _styleMap$get$value8, _styleMap$get8;
10602
- this.options = void 0;
10603
- this.inlineStart = void 0;
10604
- this.inlineEnd = void 0;
10605
- this.blockStart = void 0;
10606
- this.blockEnd = void 0;
10607
- this.inline = void 0;
10608
- this.block = void 0;
10609
- this.options = options;
10610
- var node = options.node;
10611
- var styleMap = node.getAllStyle();
10612
- var borderTopWidth = (_styleMap$get$value = (_styleMap$get = styleMap.get(exports.PropertyName.PADDING_TOP)) === null || _styleMap$get === void 0 ? void 0 : _styleMap$get.value) !== null && _styleMap$get$value !== void 0 ? _styleMap$get$value : 0;
10613
- var borderRightWidth = (_styleMap$get$value2 = (_styleMap$get2 = styleMap.get(exports.PropertyName.PADDING_END)) === null || _styleMap$get2 === void 0 ? void 0 : _styleMap$get2.value) !== null && _styleMap$get$value2 !== void 0 ? _styleMap$get$value2 : 0;
10614
- var borderBottomWidth = (_styleMap$get$value3 = (_styleMap$get3 = styleMap.get(exports.PropertyName.PADDING_BOTTOM)) === null || _styleMap$get3 === void 0 ? void 0 : _styleMap$get3.value) !== null && _styleMap$get$value3 !== void 0 ? _styleMap$get$value3 : 0;
10615
- var borderLeftWidth = (_styleMap$get$value4 = (_styleMap$get4 = styleMap.get(exports.PropertyName.PADDING_START)) === null || _styleMap$get4 === void 0 ? void 0 : _styleMap$get4.value) !== null && _styleMap$get$value4 !== void 0 ? _styleMap$get$value4 : 0;
10616
- var paddingTopWidth = (_styleMap$get$value5 = (_styleMap$get5 = styleMap.get(exports.PropertyName.PADDING_TOP)) === null || _styleMap$get5 === void 0 ? void 0 : _styleMap$get5.value) !== null && _styleMap$get$value5 !== void 0 ? _styleMap$get$value5 : 0;
10617
- var paddingRightWidth = (_styleMap$get$value6 = (_styleMap$get6 = styleMap.get(exports.PropertyName.PADDING_END)) === null || _styleMap$get6 === void 0 ? void 0 : _styleMap$get6.value) !== null && _styleMap$get$value6 !== void 0 ? _styleMap$get$value6 : 0;
10618
- var paddingBottomWidth = (_styleMap$get$value7 = (_styleMap$get7 = styleMap.get(exports.PropertyName.PADDING_BOTTOM)) === null || _styleMap$get7 === void 0 ? void 0 : _styleMap$get7.value) !== null && _styleMap$get$value7 !== void 0 ? _styleMap$get$value7 : 0;
10619
- var paddingLeftWidth = (_styleMap$get$value8 = (_styleMap$get8 = styleMap.get(exports.PropertyName.PADDING_START)) === null || _styleMap$get8 === void 0 ? void 0 : _styleMap$get8.value) !== null && _styleMap$get$value8 !== void 0 ? _styleMap$get$value8 : 0;
10620
- this.blockStart = borderTopWidth + SCROLLBAR_SIZES[0] + paddingTopWidth;
10621
- this.inlineStart = borderRightWidth + SCROLLBAR_SIZES[1] + paddingRightWidth;
10622
- this.blockEnd = borderBottomWidth + SCROLLBAR_SIZES[2] + paddingBottomWidth;
10623
- this.inlineEnd = borderLeftWidth + SCROLLBAR_SIZES[3] + paddingLeftWidth;
10624
- this.block = this.blockStart + this.blockEnd;
10625
- this.inline = this.inlineStart + this.inlineEnd;
10626
- };
10627
- var delay = function delay(minisecond) {
10628
- if (minisecond === void 0) {
10629
- minisecond = 0;
10630
- }
10631
- return new Promise(function (resolve) {
10632
- setTimeout(function () {
10633
- resolve();
10634
- }, minisecond);
10635
- });
10636
- };
10637
- var LayoutEngine = /*#__PURE__*/function () {
10638
- function LayoutEngine(_layoutRegistry, _layoutContextFactory, _layoutEdgesFactory) {
10639
- this._layoutRegistry = void 0;
10640
- this._layoutContextFactory = void 0;
10641
- this._layoutEdgesFactory = void 0;
10642
- this.layoutRegistry = void 0;
10643
- this.layoutContextFactory = void 0;
10644
- this.layoutEdgesFactory = void 0;
10645
- this._layoutRegistry = _layoutRegistry;
10646
- this._layoutContextFactory = _layoutContextFactory;
10647
- this._layoutEdgesFactory = _layoutEdgesFactory;
10648
- this.layoutRegistry = _layoutRegistry;
10649
- this.layoutContextFactory = _layoutContextFactory;
10650
- this.layoutEdgesFactory = _layoutEdgesFactory;
10651
- // layoutContributions.getContributions().forEach((layoutContrib) => {
10652
- // layoutContrib.registerLayout(_layoutRegistry);
10653
- // });
10654
- }
10655
- /**
10656
- * This function takes the root of the box-tree, a LayoutConstraints object, and compute the position of every node in the tree
10657
- * @param rootNode root node of the layout object tree
10658
- * @param rootPageConstraints layout constraints
10659
- * @returns
10660
- */
10661
- var _proto = LayoutEngine.prototype;
10662
- _proto.computeLayout = /*#__PURE__*/
10663
- function () {
10664
- var _computeLayout = _asyncToGenerator$1( /*#__PURE__*/_regeneratorRuntime$1().mark(function _callee(rootNode, rootPageConstraints) {
10665
- return _regeneratorRuntime$1().wrap(function _callee$(_context) {
10666
- while (1) switch (_context.prev = _context.next) {
10667
- case 0:
10668
- _context.next = 2;
10669
- return this.determineIntrinsicSizes(rootNode, rootNode.children);
10670
- case 2:
10671
- _context.next = 4;
10672
- return this.calculateLayout(rootNode, rootNode.children, rootPageConstraints);
10673
- case 4:
10674
- case "end":
10675
- return _context.stop();
10676
- }
10677
- }, _callee, this);
10678
- }));
10679
- function computeLayout(_x, _x2) {
10680
- return _computeLayout.apply(this, arguments);
10681
- }
10682
- return computeLayout;
10683
- }()
10684
- /**
10685
- * calculate intrinsicSize of node tree, use depth dirst / post order traversal
10686
- * @param rootNode
10687
- */;
10688
-
10689
- _proto.determineAllIntrinsicSizes = /*#__PURE__*/
10690
- function () {
10691
- var _determineAllIntrinsicSizes = _asyncToGenerator$1( /*#__PURE__*/_regeneratorRuntime$1().mark(function _callee2(rootNode) {
10692
- return _regeneratorRuntime$1().wrap(function _callee2$(_context2) {
10693
- while (1) switch (_context2.prev = _context2.next) {
10694
- case 0:
10695
- case "end":
10696
- return _context2.stop();
10697
- }
10698
- }, _callee2);
10699
- }));
10700
- function determineAllIntrinsicSizes(_x3) {
10701
- return _determineAllIntrinsicSizes.apply(this, arguments);
10702
- }
10703
- return determineAllIntrinsicSizes;
10704
- }();
10705
- _proto.getLayoutDefinitionName = function getLayoutDefinitionName(node) {
10706
- var layoutStyle = node.getAllStyle().get(exports.PropertyName.LAYOUT);
10707
- if (!layoutStyle) {
10708
- throw new Error('layout property not found');
10709
- }
10710
- return layoutStyle.value;
10711
- }
10712
- /**
10713
- * calculate the min/max content size of node
10714
- * @param node current layout object
10715
- * @param childNodes children of the current node
10716
- */;
10717
- _proto.determineIntrinsicSizes = /*#__PURE__*/
10718
- function () {
10719
- var _determineIntrinsicSizes = _asyncToGenerator$1( /*#__PURE__*/_regeneratorRuntime$1().mark(function _callee3(node, childNodes) {
10720
- var layoutName;
10721
- return _regeneratorRuntime$1().wrap(function _callee3$(_context3) {
10722
- while (1) switch (_context3.prev = _context3.next) {
10723
- case 0:
10724
- layoutName = this.getLayoutDefinitionName(node);
10725
- _context3.next = 3;
10726
- return this.invokeIntrinsicSizesCallback(layoutName, node, childNodes);
10727
- case 3:
10728
- case "end":
10729
- return _context3.stop();
10730
- }
10731
- }, _callee3, this);
10732
- }));
10733
- function determineIntrinsicSizes(_x4, _x5) {
10734
- return _determineIntrinsicSizes.apply(this, arguments);
10735
- }
10736
- return determineIntrinsicSizes;
10737
- }();
10738
- _proto.invokeIntrinsicSizesCallback = /*#__PURE__*/function () {
10739
- var _invokeIntrinsicSizesCallback = _asyncToGenerator$1( /*#__PURE__*/_regeneratorRuntime$1().mark(function _callee4(layoutName, node, childNodes) {
10740
- var LayoutDef, layoutInstance, context, _LayoutDef$inputPrope, inputProperties, children, edges, styleMap, value, generator, intrinsicSizesValue;
10741
- return _regeneratorRuntime$1().wrap(function _callee4$(_context4) {
10742
- while (1) switch (_context4.prev = _context4.next) {
10743
- case 0:
10744
- LayoutDef = this.layoutRegistry.getLayout(layoutName);
10745
- layoutInstance = new LayoutDef();
10746
- context = this.layoutContextFactory({
10747
- mode: exports.LayoutTaskType.IntrinsicSizes
10748
- });
10749
- _LayoutDef$inputPrope = LayoutDef.inputProperties, inputProperties = _LayoutDef$inputPrope === void 0 ? [] : _LayoutDef$inputPrope;
10750
- children = [];
10751
- childNodes.forEach(function (childNode) {
10752
- var layoutChild = context.layoutChildrenFactory({
10753
- node: childNode
10754
- });
10755
- children.push(layoutChild);
10756
- });
10757
- edges = this.layoutEdgesFactory({
10758
- node: node
10759
- });
10760
- styleMap = node.getStyle.apply(node, inputProperties); // TODO compare to cache ( children edges styleMap )
10761
- value = layoutInstance.intrinsicSizes(children, edges, styleMap);
10762
- generator = this.runWorkQueue(value, context.workQueue);
10763
- generator.next();
10764
- _context4.next = 13;
10765
- return delay();
10766
- case 13:
10767
- intrinsicSizesValue = generator.next().value;
10768
- context.clearWorkQueue();
10769
- node.setIntrisicSizes(intrinsicSizesValue);
10770
- case 16:
10771
- case "end":
10772
- return _context4.stop();
10773
- }
10774
- }, _callee4, this);
10775
- }));
10776
- function invokeIntrinsicSizesCallback(_x6, _x7, _x8) {
10777
- return _invokeIntrinsicSizesCallback.apply(this, arguments);
10778
- }
10779
- return invokeIntrinsicSizesCallback;
10780
- }();
10781
- _proto.calculateLayout = /*#__PURE__*/function () {
10782
- var _calculateLayout = _asyncToGenerator$1( /*#__PURE__*/_regeneratorRuntime$1().mark(function _callee5(node, childNodes, layoutConstraints) {
10783
- var layoutName;
10784
- return _regeneratorRuntime$1().wrap(function _callee5$(_context5) {
10785
- while (1) switch (_context5.prev = _context5.next) {
10786
- case 0:
10787
- layoutName = this.getLayoutDefinitionName(node);
10788
- _context5.next = 3;
10789
- return this.invokeLayoutCallback(layoutName, node, childNodes, layoutConstraints);
10790
- case 3:
10791
- case "end":
10792
- return _context5.stop();
10793
- }
10794
- }, _callee5, this);
10795
- }));
10796
- function calculateLayout(_x9, _x10, _x11) {
10797
- return _calculateLayout.apply(this, arguments);
10798
- }
10799
- return calculateLayout;
10800
- }();
10801
- _proto.invokeLayoutCallback = /*#__PURE__*/function () {
10802
- var _invokeLayoutCallback = _asyncToGenerator$1( /*#__PURE__*/_regeneratorRuntime$1().mark(function _callee6(layoutName, node, childNodes, layoutConstraints) {
10803
- var LayoutDef, layoutInstance, context, _LayoutDef$inputPrope2, inputProperties, children, edges, styleMap, value, generator, fragmentResultvalue, fragmentResult, layoutFragment;
10804
- return _regeneratorRuntime$1().wrap(function _callee6$(_context6) {
10805
- while (1) switch (_context6.prev = _context6.next) {
10806
- case 0:
10807
- LayoutDef = this.layoutRegistry.getLayout(layoutName);
10808
- layoutInstance = new LayoutDef();
10809
- context = this.layoutContextFactory({
10810
- mode: exports.LayoutTaskType.Layout
10811
- });
10812
- _LayoutDef$inputPrope2 = LayoutDef.inputProperties, inputProperties = _LayoutDef$inputPrope2 === void 0 ? [] : _LayoutDef$inputPrope2;
10813
- children = [];
10814
- childNodes.forEach(function (childNode) {
10815
- var layoutChild = context.layoutChildrenFactory({
10816
- node: childNode
10817
- });
10818
- children.push(layoutChild);
10819
- });
10820
- edges = this.layoutEdgesFactory({
10821
- node: node
10822
- });
10823
- styleMap = node.getStyle.apply(node, inputProperties); // TODO compare to cache ( children styleMap layoutConstraints )
10824
- value = layoutInstance.layout(children, edges, layoutConstraints, styleMap);
10825
- generator = this.runWorkQueue(value, context.workQueue);
10826
- generator.next();
10827
- _context6.next = 13;
10828
- return delay();
10829
- case 13:
10830
- fragmentResultvalue = generator.next().value;
10831
- context.clearWorkQueue();
10832
- fragmentResult = fragmentResultvalue instanceof FragmentResult ? fragmentResultvalue : context.fragmentResultFactory(fragmentResultvalue);
10833
- layoutFragment = context.layoutFragmentFactory({
10834
- inlineSize: fragmentResult.inlineSize,
10835
- blockSize: fragmentResult.blockSize,
10836
- data: fragmentResult.data
10837
- });
10838
- node.setComputedLayout(layoutFragment);
10839
- childNodes.forEach(function (childNode, index) {
10840
- childNode.setComputedLayout(fragmentResult.childFragments[index]);
10841
- });
10842
- case 19:
10843
- case "end":
10844
- return _context6.stop();
10845
- }
10846
- }, _callee6, this);
10847
- }));
10848
- function invokeLayoutCallback(_x12, _x13, _x14, _x15) {
10849
- return _invokeLayoutCallback.apply(this, arguments);
10850
- }
10851
- return invokeLayoutCallback;
10852
- }();
10853
- _proto.runWorkQueue = /*#__PURE__*/_regeneratorRuntime$1().mark(function runWorkQueue(promise, workQueue) {
10854
- var _this = this;
10855
- var querablePromise;
10856
- return _regeneratorRuntime$1().wrap(function runWorkQueue$(_context7) {
10857
- while (1) switch (_context7.prev = _context7.next) {
10858
- case 0:
10859
- querablePromise = makeQuerablePromise(promise);
10860
- if (workQueue.length > 0 && querablePromise.isPending()) {
10861
- workQueue.forEach(function (workTask) {
10862
- if (workTask.taskType === exports.LayoutTaskType.IntrinsicSizes) {
10863
- var layoutChild = workTask.layoutChild,
10864
- deferred = workTask.deferred;
10865
- var node = layoutChild.node;
10866
- deferred.resolve(_this.getNodeIntrisicSizes(node));
10867
- }
10868
- if (workTask.taskType === exports.LayoutTaskType.Layout) {
10869
- var _layoutChild = workTask.layoutChild,
10870
- _deferred = workTask.deferred,
10871
- layoutConstraints = workTask.layoutConstraints;
10872
- var _node = _layoutChild.node,
10873
- layoutContext = _layoutChild.layoutContext;
10874
- var fragment = _this.getNodeFragment(_node, layoutConstraints);
10875
- _deferred.resolve(layoutContext.layoutFragmentFactory(fragment));
10876
- }
10877
- });
10878
- }
10879
- // wait promise to resolve
10880
- _context7.next = 4;
10881
- return;
10882
- case 4:
10883
- if (querablePromise.isFulfilled()) {
10884
- _context7.next = 6;
10885
- break;
10886
- }
10887
- throw new Error('promise not fullfilled!');
10888
- case 6:
10889
- return _context7.abrupt("return", querablePromise.getFullFilledValue());
10890
- case 7:
10891
- case "end":
10892
- return _context7.stop();
10893
- }
10894
- }, runWorkQueue);
10895
- });
10896
- _proto.getNodeIntrisicSizes = function getNodeIntrisicSizes(node) {
10897
- var _styleMap$get, _node$intrisicSizes, _styleMap$get2, _styleMap$get3, _node$intrisicSizes2, _styleMap$get4, _styleMap$get5, _node$intrisicSizes3, _styleMap$get6, _styleMap$get7, _node$intrisicSizes4, _styleMap$get8;
10898
- // calculate from border box, depend on writing mode of current layout
10899
- var styleMap = node.getAllStyle();
10900
- var minWidth = ((_styleMap$get = styleMap.get(exports.PropertyName.MIN_WIDTH)) === null || _styleMap$get === void 0 ? void 0 : _styleMap$get.value) || ((_node$intrisicSizes = node.intrisicSizes) === null || _node$intrisicSizes === void 0 ? void 0 : _node$intrisicSizes.minContentInlineSize) || ((_styleMap$get2 = styleMap.get(exports.PropertyName.WIDTH)) === null || _styleMap$get2 === void 0 ? void 0 : _styleMap$get2.value) || 0;
10901
- var maxWidth = ((_styleMap$get3 = styleMap.get(exports.PropertyName.MAX_WIDTH)) === null || _styleMap$get3 === void 0 ? void 0 : _styleMap$get3.value) || ((_node$intrisicSizes2 = node.intrisicSizes) === null || _node$intrisicSizes2 === void 0 ? void 0 : _node$intrisicSizes2.maxContentInlineSize) || ((_styleMap$get4 = styleMap.get(exports.PropertyName.WIDTH)) === null || _styleMap$get4 === void 0 ? void 0 : _styleMap$get4.value) || 0;
10902
- var minHeight = ((_styleMap$get5 = styleMap.get(exports.PropertyName.MIN_HEIGHT)) === null || _styleMap$get5 === void 0 ? void 0 : _styleMap$get5.value) || ((_node$intrisicSizes3 = node.intrisicSizes) === null || _node$intrisicSizes3 === void 0 ? void 0 : _node$intrisicSizes3.minContentBlockSize) || ((_styleMap$get6 = styleMap.get(exports.PropertyName.HEIGHT)) === null || _styleMap$get6 === void 0 ? void 0 : _styleMap$get6.value) || 0;
10903
- var maxHeight = ((_styleMap$get7 = styleMap.get(exports.PropertyName.MAX_HEIGHT)) === null || _styleMap$get7 === void 0 ? void 0 : _styleMap$get7.value) || ((_node$intrisicSizes4 = node.intrisicSizes) === null || _node$intrisicSizes4 === void 0 ? void 0 : _node$intrisicSizes4.maxContentBlockSize) || ((_styleMap$get8 = styleMap.get(exports.PropertyName.HEIGHT)) === null || _styleMap$get8 === void 0 ? void 0 : _styleMap$get8.value) || 0;
10904
- return {
10905
- minContentInlineSize: minWidth,
10906
- maxContentInlineSize: maxWidth,
10907
- minContentBlockSize: minHeight,
10908
- maxContentBlockSize: maxHeight
10909
- };
10910
- };
10911
- _proto.getNodeFragment = function getNodeFragment(node, constraints) {
10912
- var _node$getComputedLayo, _node$getAllStyle$get, _node$getAllStyle$get2, _node$getComputedLayo2, _node$getAllStyle$get3, _node$getAllStyle$get4;
10913
- // TODO
10914
- var width = ((_node$getComputedLayo = node.getComputedLayout()) === null || _node$getComputedLayo === void 0 ? void 0 : _node$getComputedLayo.inlineSize) || ((_node$getAllStyle$get = node.getAllStyle().get(exports.PropertyName.MIN_WIDTH)) === null || _node$getAllStyle$get === void 0 ? void 0 : _node$getAllStyle$get.value) || ((_node$getAllStyle$get2 = node.getAllStyle().get(exports.PropertyName.WIDTH)) === null || _node$getAllStyle$get2 === void 0 ? void 0 : _node$getAllStyle$get2.value) || 0;
10915
- var height = ((_node$getComputedLayo2 = node.getComputedLayout()) === null || _node$getComputedLayo2 === void 0 ? void 0 : _node$getComputedLayo2.blockSize) || ((_node$getAllStyle$get3 = node.getAllStyle().get(exports.PropertyName.MIN_HEIGHT)) === null || _node$getAllStyle$get3 === void 0 ? void 0 : _node$getAllStyle$get3.value) || ((_node$getAllStyle$get4 = node.getAllStyle().get(exports.PropertyName.HEIGHT)) === null || _node$getAllStyle$get4 === void 0 ? void 0 : _node$getAllStyle$get4.value) || 0;
10916
- return {
10917
- inlineSize: width,
10918
- blockSize: height,
10919
- data: constraints.data
10920
- };
10921
- };
10922
- return LayoutEngine;
10923
- }();
10924
-
10925
- /**
10926
- * 布局的结果
10927
- */
10928
- var LayoutFragment = function LayoutFragment(_layoutContext, options) {
10929
- this._layoutContext = void 0;
10930
- this.options = void 0;
10931
- this.layoutContext = void 0;
10932
- this.inlineSize = void 0;
10933
- this.blockSize = void 0;
10934
- this.inlineOffset = void 0;
10935
- this.blockOffset = void 0;
10936
- this.data = void 0;
10937
- this._layoutContext = _layoutContext;
10938
- this.options = options;
10939
- this.layoutContext = _layoutContext;
10940
- this.inlineSize = options.inlineSize;
10941
- this.blockSize = options.blockSize;
10942
- this.inlineOffset = 0;
10943
- this.blockOffset = 0;
10944
- this.data = options.data;
10945
- };
10946
- var id$1 = 1;
10947
- var LayoutObject = /*#__PURE__*/function () {
10948
- function LayoutObject(style) {
10949
- if (style === void 0) {
10950
- style = new Map();
10951
- }
10952
- this.id = void 0;
10953
- this.style = void 0;
10954
- this.dirty = void 0;
10955
- this.parent = void 0;
10956
- this.children = void 0;
10957
- this.internalIntrisicSizes = void 0;
10958
- this.computedLayout = void 0;
10959
- this.measureFn = void 0;
10960
- this.id = id$1++;
10961
- this.style = style;
10962
- this.parent = undefined;
10963
- this.children = [];
10964
- this.dirty = false;
10965
- }
10966
- /**
10967
- * set the intrinsic size of leaf node, different basic shape has different size, compsed shape has
10968
- * @param measure measure function
10969
- */
10970
- var _proto = LayoutObject.prototype;
10971
- _proto.setMeasure = function setMeasure(measure) {
10972
- this.measureFn = measure;
10973
- };
10974
- _proto.setIntrisicSizes = function setIntrisicSizes(intrisicSizes) {
10975
- this.internalIntrisicSizes = intrisicSizes;
10976
- };
10977
- _proto.addChild = function addChild(child) {
10978
- var _this$children;
10979
- (_this$children = this.children) === null || _this$children === void 0 ? void 0 : _this$children.push(child);
10980
- };
10981
- _proto.insertChild = function insertChild(index, child) {
10982
- this.children.splice(index, 0, child);
10983
- };
10984
- _proto.removeChild = function removeChild(child) {
10985
- var _this$children2;
10986
- var index = (_this$children2 = this.children) === null || _this$children2 === void 0 ? void 0 : _this$children2.findIndex(function (node) {
10987
- return node.id === child.id;
10988
- });
10989
- this.removeChildAtIndex(index);
10990
- };
10991
- _proto.removeChildAtIndex = function removeChildAtIndex(index) {
10992
- this.children.splice(index, 1);
10993
- };
10994
- _proto.replaceChildAtIndex = function replaceChildAtIndex(index, child) {
10995
- this.children.splice(index, 1, child);
10996
- };
10997
- _proto.setStyle = function setStyle(property, value) {
10998
- this.style.set(property, value);
10999
- }
11000
- // setStyles(styles: Record<StyleProperty, StyleInputValue>) {
11001
- // this.style = StylePropertyMap.create({ styles }).styles;
11002
- // }
11003
- ;
11004
-
11005
- _proto.getStyle = function getStyle() {
11006
- var _this = this;
11007
- var returnStyle = new Map();
11008
- for (var _len = arguments.length, properties = new Array(_len), _key = 0; _key < _len; _key++) {
11009
- properties[_key] = arguments[_key];
11010
- }
11011
- properties.forEach(function (prop) {
11012
- var propertyValue = _this.style.get(prop);
11013
- if (propertyValue) {
11014
- returnStyle.set(prop, propertyValue);
11015
- }
11016
- });
11017
- return returnStyle;
11018
- };
11019
- _proto.getAllStyle = function getAllStyle() {
11020
- return this.style;
11021
- };
11022
- _proto.markDirty = function markDirty() {
11023
- this.dirty = true;
11024
- };
11025
- _proto.idDirty = function idDirty() {
11026
- return this.dirty;
11027
- };
11028
- _proto.getSize = function getSize() {
11029
- var _this$style$get$value, _this$style$get, _this$style$get$value2, _this$style$get2;
11030
- var width = (_this$style$get$value = (_this$style$get = this.style.get(exports.PropertyName.WIDTH)) === null || _this$style$get === void 0 ? void 0 : _this$style$get.value) !== null && _this$style$get$value !== void 0 ? _this$style$get$value : 0;
11031
- var height = (_this$style$get$value2 = (_this$style$get2 = this.style.get(exports.PropertyName.HEIGHT)) === null || _this$style$get2 === void 0 ? void 0 : _this$style$get2.value) !== null && _this$style$get$value2 !== void 0 ? _this$style$get$value2 : 0;
11032
- return {
11033
- width: width,
11034
- height: height
11035
- };
11036
- };
11037
- _proto.computeLayout = /*#__PURE__*/function () {
11038
- var _computeLayout = _asyncToGenerator$1( /*#__PURE__*/_regeneratorRuntime$1().mark(function _callee() {
11039
- var size;
11040
- return _regeneratorRuntime$1().wrap(function _callee$(_context) {
11041
- while (1) switch (_context.prev = _context.next) {
11042
- case 0:
11043
- size = this.getSize();
11044
- _context.next = 3;
11045
- return layoutEngine.computeLayout(this, {
11046
- availableInlineSize: size.width,
11047
- availableBlockSize: size.height,
11048
- fixedInlineSize: size.width,
11049
- fixedBlockSize: size.height,
11050
- percentageInlineSize: size.width,
11051
- percentageBlockSize: size.height,
11052
- data: undefined
11053
- });
11054
- case 3:
11055
- case "end":
11056
- return _context.stop();
11057
- }
11058
- }, _callee, this);
11059
- }));
11060
- function computeLayout() {
11061
- return _computeLayout.apply(this, arguments);
11062
- }
11063
- return computeLayout;
11064
- }();
11065
- _proto.setComputedLayout = function setComputedLayout(computedLayout) {
11066
- this.computedLayout = computedLayout;
11067
- };
11068
- _proto.getComputedLayout = function getComputedLayout() {
11069
- return this.computedLayout;
11070
- };
11071
- _proto.getAllComputedLayout = function getAllComputedLayout() {};
11072
- _proto.toString = function toString() {
11073
- return "LayoutObject " + this.id;
11074
- };
11075
- _createClass$1(LayoutObject, [{
11076
- key: "intrisicSizes",
11077
- get: function get() {
11078
- return this.internalIntrisicSizes;
11079
- }
11080
- }, {
11081
- key: "childCount",
11082
- get: function get() {
11083
- return this.children.length;
11084
- }
11085
- }]);
11086
- return LayoutObject;
11087
- }();
11088
- var DefaultLayoutRegistry = /*#__PURE__*/function () {
11089
- function DefaultLayoutRegistry() {
11090
- this.registry = new Map();
11091
- }
11092
- var _proto = DefaultLayoutRegistry.prototype;
11093
- _proto.hasLayout = function hasLayout(name) {
11094
- return this.registry.has(name);
11095
- }
11096
- /**
11097
- *
11098
- * @param name layout name, default to 'absolute'
11099
- * @returns layout object
11100
- */;
11101
- _proto.getLayout = function getLayout(name) {
11102
- if (name === void 0) {
11103
- name = 'absolute';
11104
- }
11105
- if (!this.hasLayout(name)) {
11106
- throw new Error("invalid layout property: " + name);
11107
- }
11108
- return this.registry.get(name);
11109
- };
11110
- _proto.updateLayout = function updateLayout(name, layout) {
11111
- this.registry.set(name, layout);
11112
- };
11113
- _proto.registerLayout = function registerLayout(name, layout) {
11114
- if (name === '') {
11115
- throw new TypeError("layout name cant't be empty");
11116
- }
11117
- if (DefaultLayoutRegistry.reservedLayout.includes(name)) {
11118
- throw new Error("layout name '" + name + "' is a system reserved layout name, please use another name");
11119
- }
11120
- if (this.hasLayout(name)) {
11121
- throw new Error("layout '" + name + "' already exist.");
11122
- }
11123
- this.registry.set(name, layout);
11124
- };
11125
- _proto.deleteLayout = function deleteLayout(name) {
11126
- this.registry.delete(name);
11127
- };
11128
- _createClass$1(DefaultLayoutRegistry, [{
11129
- key: "size",
11130
- get: function get() {
11131
- return this.registry.size;
11132
- }
11133
- }]);
11134
- return DefaultLayoutRegistry;
11135
- }();
11136
- // 系统保留的布局名称,外部用户不能使用
11137
- // private static reservedLayout = ['relative', 'absolute', 'fixed', 'flex', 'dagre', 'autolayout'];
11138
- DefaultLayoutRegistry.reservedLayout = [];
11139
-
11140
- // import { LayoutEdges, LayoutEdgesOptions } from './LayoutEdges';
11141
- // const layoutRegistry = new DefaultLayoutRegistry();
11142
- // const layoutEdgesFactory = (options: LayoutEdgesOptions) => {
11143
- // return new LayoutEdges(options);
11144
- // };
11145
- // const layoutContextFactory = (options: LayoutEdgesOptions) => {
11146
- // // const layoutChildrenFactory = (childOptions: LayoutChildrenOptions) => {
11147
- // // return new LayoutChildren(childOptions);
11148
- // // };
11149
- // // container.register({
11150
- // // token: LayoutChildrenFactory,
11151
- // // useFactory: (childContext) => {
11152
- // // return (childOptions: LayoutChildrenOptions) => {
11153
- // // const childContainer = childContext.container.createChild();
11154
- // // childContainer.register({
11155
- // // token: LayoutChildrenOptions,
11156
- // // useValue: childOptions,
11157
- // // });
11158
- // // return childContainer.get(LayoutChildren);
11159
- // // };
11160
- // // },
11161
- // // });
11162
- // // container.register(FragmentResult);
11163
- // // container.register({
11164
- // // token: FragmentResultFactory,
11165
- // // useFactory: (childContext) => {
11166
- // // return (childOptions, node) => {
11167
- // // const childContainer = childContext.container.createChild();
11168
- // // childContainer.register({
11169
- // // token: FragmentResultOptions,
11170
- // // useValue: childOptions,
11171
- // // });
11172
- // // childContainer.register({
11173
- // // token: ContextNode,
11174
- // // useValue: node,
11175
- // // });
11176
- // // return childContainer.get(FragmentResult);
11177
- // // };
11178
- // // },
11179
- // // });
11180
- // // container.register(LayoutFragment);
11181
- // // container.register({
11182
- // // token: LayoutFragmentFactory,
11183
- // // useFactory: (childContext) => {
11184
- // // return (childOptions) => {
11185
- // // const childContainer = childContext.container.createChild();
11186
- // // childContainer.register({
11187
- // // token: LayoutFragmentOptions,
11188
- // // useValue: childOptions,
11189
- // // });
11190
- // // return childContainer.get(LayoutFragment);
11191
- // // };
11192
- // // },
11193
- // // });
11194
- // // const layoutChildrenFactory = container.get(LayoutChildrenFactory);
11195
- // // const layoutFragmentFactory = (childContext) => {
11196
- // // return (childOptions) => {
11197
- // // return new LayoutFragment(childOptions);
11198
- // // };
11199
- // // };
11200
- // // const fragmentResultFactory = container.get(FragmentResultFactory);
11201
- // // const layoutContext = new LayoutContext({
11202
- // // ...options,
11203
- // // layoutChildrenFactory,
11204
- // // layoutFragmentFactory,
11205
- // // fragmentResultFactory,
11206
- // // });
11207
- // // return layoutContext;
11208
- // }
11209
- // export const layoutEngine = new LayoutEngine(layoutRegistry);
11210
- var layoutEngine = null;
11211
-
11212
10016
  var MutationRecord = /*#__PURE__*/function () {
11213
10017
  MutationRecord.copy = function copy(original) {
11214
10018
  var record = new MutationRecord(original.type, original.target);
@@ -11605,18 +10409,18 @@
11605
10409
  if (anyNonEmpty) dispatchCallbacks();
11606
10410
  }
11607
10411
 
11608
- function _defineProperties$2(target, props) {
10412
+ function _defineProperties$1(target, props) {
11609
10413
  for (var i = 0; i < props.length; i++) {
11610
10414
  var descriptor = props[i];
11611
10415
  descriptor.enumerable = descriptor.enumerable || false;
11612
10416
  descriptor.configurable = true;
11613
10417
  if ("value" in descriptor) descriptor.writable = true;
11614
- Object.defineProperty(target, _toPropertyKey$2(descriptor.key), descriptor);
10418
+ Object.defineProperty(target, _toPropertyKey$1(descriptor.key), descriptor);
11615
10419
  }
11616
10420
  }
11617
- function _createClass$2(Constructor, protoProps, staticProps) {
11618
- if (protoProps) _defineProperties$2(Constructor.prototype, protoProps);
11619
- if (staticProps) _defineProperties$2(Constructor, staticProps);
10421
+ function _createClass$1(Constructor, protoProps, staticProps) {
10422
+ if (protoProps) _defineProperties$1(Constructor.prototype, protoProps);
10423
+ if (staticProps) _defineProperties$1(Constructor, staticProps);
11620
10424
  Object.defineProperty(Constructor, "prototype", {
11621
10425
  writable: false
11622
10426
  });
@@ -11634,7 +10438,7 @@
11634
10438
  };
11635
10439
  return _setPrototypeOf$2(o, p);
11636
10440
  }
11637
- function _toPrimitive$2(input, hint) {
10441
+ function _toPrimitive$1(input, hint) {
11638
10442
  if (typeof input !== "object" || input === null) return input;
11639
10443
  var prim = input[Symbol.toPrimitive];
11640
10444
  if (prim !== undefined) {
@@ -11644,8 +10448,8 @@
11644
10448
  }
11645
10449
  return (hint === "string" ? String : Number)(input);
11646
10450
  }
11647
- function _toPropertyKey$2(arg) {
11648
- var key = _toPrimitive$2(arg, "string");
10451
+ function _toPropertyKey$1(arg) {
10452
+ var key = _toPrimitive$1(arg, "string");
11649
10453
  return typeof key === "symbol" ? key : String(key);
11650
10454
  }
11651
10455
 
@@ -11961,7 +10765,7 @@
11961
10765
  this._finishedFlag = false;
11962
10766
  }
11963
10767
  };
11964
- _createClass$2(Animation, [{
10768
+ _createClass$1(Animation, [{
11965
10769
  key: "pending",
11966
10770
  get:
11967
10771
  // animation: InternalAnimation | null;
@@ -12869,7 +11673,7 @@
12869
11673
  this.currentIteration = null;
12870
11674
  this.progress = null;
12871
11675
  }
12872
- _createClass$2(AnimationEffectTiming, [{
11676
+ _createClass$1(AnimationEffectTiming, [{
12873
11677
  key: "easing",
12874
11678
  get: function get() {
12875
11679
  return this._easing;
@@ -13354,7 +12158,6 @@
13354
12158
  runtime.AnimationTimeline = AnimationTimeline;
13355
12159
 
13356
12160
  exports.AABB = AABB;
13357
- exports.AbstractLayoutDefinition = AbstractLayoutDefinition;
13358
12161
  exports.AbstractRenderer = AbstractRenderer;
13359
12162
  exports.AbstractRendererPlugin = AbstractRendererPlugin;
13360
12163
  exports.AdvancedCamera = AdvancedCamera;
@@ -13376,7 +12179,6 @@
13376
12179
  exports.CustomElement = CustomElement;
13377
12180
  exports.CustomElementRegistry = CustomElementRegistry;
13378
12181
  exports.CustomEvent = CustomEvent;
13379
- exports.DefaultLayoutRegistry = DefaultLayoutRegistry;
13380
12182
  exports.DefaultSceneGraphSelector = DefaultSceneGraphSelector;
13381
12183
  exports.DefaultSceneGraphService = DefaultSceneGraphService;
13382
12184
  exports.DisplayObject = DisplayObject;
@@ -13392,18 +12194,11 @@
13392
12194
  exports.FederatedMouseEvent = FederatedMouseEvent;
13393
12195
  exports.FederatedPointerEvent = FederatedPointerEvent;
13394
12196
  exports.FederatedWheelEvent = FederatedWheelEvent;
13395
- exports.FragmentResult = FragmentResult;
13396
12197
  exports.Frustum = Frustum;
13397
12198
  exports.Group = Group;
13398
12199
  exports.HTML = HTML;
13399
12200
  exports.Image = Image;
13400
12201
  exports.KeyframeEffect = KeyframeEffect;
13401
- exports.LayoutChildren = LayoutChildren;
13402
- exports.LayoutContext = LayoutContext;
13403
- exports.LayoutEdges = LayoutEdges;
13404
- exports.LayoutEngine = LayoutEngine;
13405
- exports.LayoutFragment = LayoutFragment;
13406
- exports.LayoutObject = LayoutObject;
13407
12202
  exports.Line = Line;
13408
12203
  exports.LineUpdater = LineUpdater;
13409
12204
  exports.MutationEvent = MutationEvent;
@@ -13450,7 +12245,6 @@
13450
12245
  exports.isFederatedEvent = isFederatedEvent;
13451
12246
  exports.isFillOrStrokeAffected = isFillOrStrokeAffected;
13452
12247
  exports.isPattern = isPattern;
13453
- exports.layoutEngine = layoutEngine;
13454
12248
  exports.makeTiming = makeTiming;
13455
12249
  exports.mergeColors = mergeColors;
13456
12250
  exports.normalizeKeyframes = normalizeKeyframes;