@visactor/vrender-core 1.1.0-alpha.1 → 1.1.0-alpha.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (66) hide show
  1. package/cjs/canvas/constants.js +1 -2
  2. package/cjs/canvas/empty-context.js +2 -1
  3. package/cjs/common/diff.js +2 -1
  4. package/cjs/common/event-transformer.js +1 -2
  5. package/cjs/common/rect-utils.js +1 -1
  6. package/cjs/common/render-area.js +1 -1
  7. package/cjs/common/render-command-list.js +1 -1
  8. package/cjs/common/render-curve.js +1 -1
  9. package/cjs/common/render-utils.js +1 -1
  10. package/cjs/common/seg-context.js +2 -1
  11. package/cjs/common/simplify.js +1 -1
  12. package/cjs/common/sort.js +1 -1
  13. package/cjs/common/split-path.js +1 -1
  14. package/cjs/common/store.js +1 -1
  15. package/cjs/common/text.js +1 -1
  16. package/cjs/common/utils.js +1 -1
  17. package/cjs/core/application.js +1 -1
  18. package/cjs/core/camera.js +1 -1
  19. package/cjs/core/constants.js +1 -1
  20. package/cjs/core/core-modules.js +1 -1
  21. package/cjs/core/global-module.js +0 -2
  22. package/cjs/core/global.js +1 -1
  23. package/cjs/core/graphic-utils.js +1 -1
  24. package/cjs/core/index.js +1 -1
  25. package/cjs/core/layer-service.js +1 -2
  26. package/cjs/core/layer.js +1 -1
  27. package/cjs/core/light.js +1 -1
  28. package/cjs/core/stage.js +1 -1
  29. package/cjs/core/window.js +1 -1
  30. package/cjs/entries/app-context.js +1 -1
  31. package/cjs/graphic/graphic.js +6 -6
  32. package/cjs/graphic/graphic.js.map +1 -1
  33. package/dist/index.es.js +9 -7
  34. package/es/canvas/constants.js +1 -2
  35. package/es/canvas/empty-context.js +2 -1
  36. package/es/common/diff.js +2 -1
  37. package/es/common/event-transformer.js +1 -2
  38. package/es/common/rect-utils.js +1 -1
  39. package/es/common/render-area.js +1 -1
  40. package/es/common/render-command-list.js +1 -1
  41. package/es/common/render-curve.js +1 -1
  42. package/es/common/render-utils.js +1 -1
  43. package/es/common/seg-context.js +2 -1
  44. package/es/common/simplify.js +1 -1
  45. package/es/common/sort.js +1 -1
  46. package/es/common/split-path.js +1 -1
  47. package/es/common/store.js +1 -1
  48. package/es/common/text.js +1 -1
  49. package/es/common/utils.js +1 -1
  50. package/es/core/application.js +1 -1
  51. package/es/core/camera.js +1 -1
  52. package/es/core/constants.js +1 -1
  53. package/es/core/core-modules.js +1 -1
  54. package/es/core/global-module.js +0 -2
  55. package/es/core/global.js +1 -1
  56. package/es/core/graphic-utils.js +1 -1
  57. package/es/core/index.js +1 -1
  58. package/es/core/layer-service.js +1 -2
  59. package/es/core/layer.js +1 -1
  60. package/es/core/light.js +1 -1
  61. package/es/core/stage.js +1 -1
  62. package/es/core/window.js +1 -1
  63. package/es/entries/app-context.js +1 -1
  64. package/es/graphic/graphic.js +6 -6
  65. package/es/graphic/graphic.js.map +1 -1
  66. package/package.json +3 -3
package/dist/index.es.js CHANGED
@@ -10778,12 +10778,16 @@ class Graphic extends Node {
10778
10778
  };
10779
10779
  }
10780
10780
  const sharedCompiledDefinitions = boundScope.effectiveCompiledDefinitions;
10781
+ const sharedStateProxyModeKey = this.stateProxy ? 'shared-missing-only' : 'none';
10782
+ const sharedStateProxyEligibility = this.stateProxy
10783
+ ? (stateName) => !sharedCompiledDefinitions.has(stateName)
10784
+ : undefined;
10781
10785
  if (!hasStates) {
10782
10786
  this.localFallbackCompiledDefinitions = undefined;
10783
10787
  return {
10784
10788
  compiledDefinitions: sharedCompiledDefinitions,
10785
- stateProxyModeKey: this.stateProxy ? 'shared-disabled' : 'none',
10786
- stateProxyEligibility: this.stateProxy ? () => false : undefined
10789
+ stateProxyModeKey: sharedStateProxyModeKey,
10790
+ stateProxyEligibility: sharedStateProxyEligibility
10787
10791
  };
10788
10792
  }
10789
10793
  const localStates = this.states;
@@ -10800,8 +10804,8 @@ class Graphic extends Node {
10800
10804
  this.localFallbackCompiledDefinitions = undefined;
10801
10805
  return {
10802
10806
  compiledDefinitions: sharedCompiledDefinitions,
10803
- stateProxyModeKey: this.stateProxy ? 'shared-disabled' : 'none',
10804
- stateProxyEligibility: this.stateProxy ? () => false : undefined
10807
+ stateProxyModeKey: sharedStateProxyModeKey,
10808
+ stateProxyEligibility: sharedStateProxyEligibility
10805
10809
  };
10806
10810
  }
10807
10811
  const localStatesVersion = this.getLocalStatesVersion();
@@ -10814,9 +10818,7 @@ class Graphic extends Node {
10814
10818
  return {
10815
10819
  compiledDefinitions: this.localFallbackCompiledDefinitions,
10816
10820
  stateProxyModeKey,
10817
- stateProxyEligibility: this.stateProxy
10818
- ? (stateName) => !sharedCompiledDefinitions.has(stateName)
10819
- : undefined
10821
+ stateProxyEligibility: sharedStateProxyEligibility
10820
10822
  };
10821
10823
  }
10822
10824
  recomputeCurrentStatePatch() {
@@ -1,4 +1,3 @@
1
1
  export const CanvasFactory = Symbol.for("CanvasFactory");
2
2
 
3
- export const Context2dFactory = Symbol.for("Context2dFactory");
4
- //# sourceMappingURL=constants.js.map
3
+ export const Context2dFactory = Symbol.for("Context2dFactory");
@@ -205,4 +205,5 @@ export class EmptyContext2d {
205
205
  release(...params) {
206
206
  this.stack.forEach((m => matrixAllocate.free(m))), this.stack.length = 0;
207
207
  }
208
- }
208
+ }
209
+ //# sourceMappingURL=empty-context.js.map
package/es/common/diff.js CHANGED
@@ -8,4 +8,5 @@ export function diff(oldAttrs, newAttrs, getAttr) {
8
8
  void 0 !== value && (diffObj[key] = value);
9
9
  }
10
10
  return diffObj;
11
- }
11
+ }
12
+ //# sourceMappingURL=diff.js.map
@@ -113,5 +113,4 @@ export function mapToCanvasPointForCanvas(nativeEvent) {
113
113
  x: nativeEvent._canvasX || 0,
114
114
  y: nativeEvent._canvasY || 0
115
115
  };
116
- }
117
- //# sourceMappingURL=event-transformer.js.map
116
+ }
@@ -17,4 +17,4 @@ export const normalizeRectAttributes = attribute => {
17
17
  height: height
18
18
  };
19
19
  };
20
- //# sourceMappingURL=rect-utils.js.map
20
+ //# sourceMappingURL=rect-utils.js.map
@@ -61,4 +61,4 @@ function drawAreaBlock(path, topList, bottomList, params) {
61
61
  }
62
62
  path.closePath();
63
63
  }
64
- //# sourceMappingURL=render-area.js.map
64
+ //# sourceMappingURL=render-area.js.map
@@ -6,4 +6,4 @@ export function renderCommandList(commandList, context, x = 0, y = 0, sx = 1, sy
6
6
  commandFuncs[command[0]](command, context, x, y, sx, sy, z);
7
7
  }
8
8
  }
9
- //# sourceMappingURL=render-command-list.js.map
9
+ //# sourceMappingURL=render-command-list.js.map
@@ -93,4 +93,4 @@ export function drawIncrementalAreaSegments(path, lastSeg, segments, params) {
93
93
  path.closePath();
94
94
  }));
95
95
  }
96
- //# sourceMappingURL=render-curve.js.map
96
+ //# sourceMappingURL=render-curve.js.map
@@ -11,4 +11,4 @@ export function drawSegItem(ctx, curve, endPercent, params) {
11
11
  ctx.lineTo(offsetX + p.x, offsetY + p.y, offsetZ);
12
12
  }
13
13
  }
14
- //# sourceMappingURL=render-utils.js.map
14
+ //# sourceMappingURL=render-utils.js.map
@@ -90,4 +90,5 @@ export class ReflectSegContext extends SegContext {
90
90
  clear() {
91
91
  return super.clear();
92
92
  }
93
- }
93
+ }
94
+ //# sourceMappingURL=seg-context.js.map
@@ -30,4 +30,4 @@ export function flatten_simplify(points, tolerance, highestQuality) {
30
30
  if (points.length <= 10) return points;
31
31
  return points = highestQuality ? points : simplifyRadialDist(points, void 0 !== tolerance ? tolerance * tolerance : 1);
32
32
  }
33
- //# sourceMappingURL=simplify.js.map
33
+ //# sourceMappingURL=simplify.js.map
package/es/common/sort.js CHANGED
@@ -94,4 +94,4 @@ export function findNextGraphic(graphic, id, defaultZIndex, reverse = !1) {
94
94
  !1)), reverse);
95
95
  return result;
96
96
  }
97
- //# sourceMappingURL=sort.js.map
97
+ //# sourceMappingURL=sort.js.map
@@ -248,4 +248,4 @@ export const splitPath = (path, count) => {
248
248
  }
249
249
  return res;
250
250
  };
251
- //# sourceMappingURL=split-path.js.map
251
+ //# sourceMappingURL=split-path.js.map
@@ -1,2 +1,2 @@
1
1
  class StageStore {}
2
- //# sourceMappingURL=store.js.map
2
+ //# sourceMappingURL=store.js.map
package/es/common/text.js CHANGED
@@ -24,4 +24,4 @@ export function textAttributesToStyle(attrs) {
24
24
  attrs.underline ? style["text-decoration"] = "underline" : attrs.lineThrough && (style["text-decoration"] = "line-through"),
25
25
  attrs.fill && isString(attrs.fill) && (style.color = attrs.fill), style;
26
26
  }
27
- //# sourceMappingURL=text.js.map
27
+ //# sourceMappingURL=text.js.map
@@ -148,4 +148,4 @@ export const calculateLineHeight = (lineHeight, fontSize) => {
148
148
  const _lh = _calculateLineHeight(lineHeight, fontSize);
149
149
  return isNaN(_lh) ? _lh : Math.max(fontSize, _lh);
150
150
  };
151
- //# sourceMappingURL=utils.js.map
151
+ //# sourceMappingURL=utils.js.map
@@ -1,2 +1,2 @@
1
1
  export const ApplicationContribution = Symbol("ApplicationContribution");
2
- //# sourceMappingURL=application.js.map
2
+ //# sourceMappingURL=application.js.map
package/es/core/camera.js CHANGED
@@ -66,4 +66,4 @@ export class OrthoCamera {
66
66
  export const registerOrthoCamera = () => {
67
67
  Factory.registerPlugin("OrthoCamera", OrthoCamera);
68
68
  };
69
- //# sourceMappingURL=camera.js.map
69
+ //# sourceMappingURL=camera.js.map
@@ -9,4 +9,4 @@ export const StaticLayerHandlerContribution = Symbol.for("StaticLayerHandlerCont
9
9
  export const DynamicLayerHandlerContribution = Symbol.for("DynamicLayerHandlerContribution");
10
10
 
11
11
  export const VirtualLayerHandlerContribution = Symbol.for("VirtualLayerHandlerContribution");
12
- //# sourceMappingURL=constants.js.map
12
+ //# sourceMappingURL=constants.js.map
@@ -21,4 +21,4 @@ export function bindCoreModules({bind: bind}) {
21
21
  }
22
22
 
23
23
  export default bindCoreModules;
24
- //# sourceMappingURL=core-modules.js.map
24
+ //# sourceMappingURL=core-modules.js.map
@@ -1,3 +1 @@
1
-
2
-
3
1
  //# sourceMappingURL=global-module.js.map
package/es/core/global.js CHANGED
@@ -222,4 +222,4 @@ export class DefaultGlobal extends EventListenerManager {
222
222
  return this._env || this.setEnv("browser"), this.envContribution.copyToClipBoard(text);
223
223
  }
224
224
  }
225
- //# sourceMappingURL=global.js.map
225
+ //# sourceMappingURL=global.js.map
@@ -162,4 +162,4 @@ export class DefaultTransformUtil {
162
162
  return this;
163
163
  }
164
164
  }
165
- //# sourceMappingURL=graphic-utils.js.map
165
+ //# sourceMappingURL=graphic-utils.js.map
package/es/core/index.js CHANGED
@@ -15,4 +15,4 @@ export * from "./layer-service";
15
15
  export * from "./constants";
16
16
 
17
17
  export * from "../interface/core";
18
- //# sourceMappingURL=index.js.map
18
+ //# sourceMappingURL=index.js.map
@@ -75,5 +75,4 @@ export class DefaultLayerService {
75
75
  }
76
76
  }
77
77
 
78
- DefaultLayerService.idprefix = "visactor_layer", DefaultLayerService.prefix_count = 0;
79
- //# sourceMappingURL=layer-service.js.map
78
+ DefaultLayerService.idprefix = "visactor_layer", DefaultLayerService.prefix_count = 0;
package/es/core/layer.js CHANGED
@@ -112,4 +112,4 @@ export class Layer extends Group {
112
112
  }, params)), this.afterDrawCbs.forEach((c => c(this)));
113
113
  }
114
114
  }
115
- //# sourceMappingURL=layer.js.map
115
+ //# sourceMappingURL=layer.js.map
package/es/core/light.js CHANGED
@@ -23,4 +23,4 @@ export class DirectionalLight {
23
23
  export const registerDirectionalLight = () => {
24
24
  Factory.registerPlugin("DirectionalLight", DirectionalLight);
25
25
  };
26
- //# sourceMappingURL=light.js.map
26
+ //# sourceMappingURL=light.js.map
package/es/core/stage.js CHANGED
@@ -605,4 +605,4 @@ export class Stage extends Group {
605
605
  this.renderService.reInit(), this.pickerService.reInit();
606
606
  }
607
607
  }
608
- //# sourceMappingURL=stage.js.map
608
+ //# sourceMappingURL=stage.js.map
package/es/core/window.js CHANGED
@@ -150,4 +150,4 @@ export class DefaultWindow extends EventListenerManager {
150
150
  return this._handler.getTopLeft(baseWindow);
151
151
  }
152
152
  }
153
- //# sourceMappingURL=window.js.map
153
+ //# sourceMappingURL=window.js.map
@@ -83,4 +83,4 @@ export class AppContext {
83
83
  };
84
84
  }
85
85
  }
86
- //# sourceMappingURL=app-context.js.map
86
+ //# sourceMappingURL=app-context.js.map
@@ -255,11 +255,11 @@ export class Graphic extends Node {
255
255
  stateProxyModeKey: this.stateProxy ? "legacy-all" : "none"
256
256
  };
257
257
  }
258
- const sharedCompiledDefinitions = boundScope.effectiveCompiledDefinitions;
258
+ const sharedCompiledDefinitions = boundScope.effectiveCompiledDefinitions, sharedStateProxyModeKey = this.stateProxy ? "shared-missing-only" : "none", sharedStateProxyEligibility = this.stateProxy ? stateName => !sharedCompiledDefinitions.has(stateName) : void 0;
259
259
  if (!hasStates) return this.localFallbackCompiledDefinitions = void 0, {
260
260
  compiledDefinitions: sharedCompiledDefinitions,
261
- stateProxyModeKey: this.stateProxy ? "shared-disabled" : "none",
262
- stateProxyEligibility: this.stateProxy ? () => !1 : void 0
261
+ stateProxyModeKey: sharedStateProxyModeKey,
262
+ stateProxyEligibility: sharedStateProxyEligibility
263
263
  };
264
264
  const localStates = this.states, missingLocalStateDefinitions = {}, missingStateNames = [];
265
265
  if (Object.keys(localStates).forEach((stateName => {
@@ -268,15 +268,15 @@ export class Graphic extends Node {
268
268
  })), !missingStateNames.length) return this.localFallbackCompiledDefinitions = void 0,
269
269
  {
270
270
  compiledDefinitions: sharedCompiledDefinitions,
271
- stateProxyModeKey: this.stateProxy ? "shared-disabled" : "none",
272
- stateProxyEligibility: this.stateProxy ? () => !1 : void 0
271
+ stateProxyModeKey: sharedStateProxyModeKey,
272
+ stateProxyEligibility: sharedStateProxyEligibility
273
273
  };
274
274
  const localStatesVersion = this.getLocalStatesVersion(), stateProxyModeKey = this.stateProxy ? `missing:${missingStateNames.sort().join("|")}` : "none", cacheKey = `shared:${boundScope.revision}:fallback:${localStatesVersion}:${stateProxyModeKey}`;
275
275
  return this.localFallbackCompiledDefinitions && this.compiledStateDefinitionsCacheKey === cacheKey || (this.localFallbackCompiledDefinitions = (new StateDefinitionCompiler).compile(Object.assign(Object.assign({}, boundScope.effectiveSourceDefinitions), missingLocalStateDefinitions)),
276
276
  this.compiledStateDefinitionsCacheKey = cacheKey), {
277
277
  compiledDefinitions: this.localFallbackCompiledDefinitions,
278
278
  stateProxyModeKey: stateProxyModeKey,
279
- stateProxyEligibility: this.stateProxy ? stateName => !sharedCompiledDefinitions.has(stateName) : void 0
279
+ stateProxyEligibility: sharedStateProxyEligibility
280
280
  };
281
281
  }
282
282
  recomputeCurrentStatePatch() {