@rindo/core 2.16.0 → 2.17.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.
Files changed (42) hide show
  1. package/cli/index.cjs +122 -16
  2. package/cli/index.js +122 -16
  3. package/cli/package.json +1 -1
  4. package/compiler/package.json +1 -1
  5. package/compiler/rindo.js +728 -263
  6. package/compiler/rindo.min.js +2 -2
  7. package/dependencies.json +1 -1
  8. package/dev-server/client/index.js +1 -1
  9. package/dev-server/client/package.json +1 -1
  10. package/dev-server/connector.html +3 -3
  11. package/dev-server/index.js +1 -1
  12. package/dev-server/package.json +1 -1
  13. package/dev-server/server-process.js +4 -2
  14. package/internal/app-data/package.json +1 -1
  15. package/internal/client/css-shim.js +1 -1
  16. package/internal/client/dom.js +1 -1
  17. package/internal/client/index.js +1 -1
  18. package/internal/client/package.json +1 -1
  19. package/internal/client/patch-browser.js +1 -1
  20. package/internal/client/patch-esm.js +1 -1
  21. package/internal/client/shadow-css.js +1 -1
  22. package/internal/hydrate/index.js +3 -3
  23. package/internal/hydrate/package.json +1 -1
  24. package/internal/package.json +1 -1
  25. package/internal/rindo-private.d.ts +4 -0
  26. package/internal/rindo-public-compiler.d.ts +3 -2
  27. package/internal/testing/index.js +1 -1
  28. package/internal/testing/package.json +1 -1
  29. package/mock-doc/index.cjs +142 -5
  30. package/mock-doc/index.d.ts +77 -1
  31. package/mock-doc/index.js +142 -5
  32. package/mock-doc/package.json +1 -1
  33. package/package.json +3 -1
  34. package/screenshot/index.js +2 -0
  35. package/screenshot/package.json +1 -1
  36. package/sys/node/index.js +325 -314
  37. package/sys/node/package.json +1 -1
  38. package/sys/node/worker.js +1 -1
  39. package/testing/index.d.ts +1 -1
  40. package/testing/index.js +105 -62
  41. package/testing/mocks.d.ts +22 -2
  42. package/testing/package.json +1 -1
@@ -11,7 +11,7 @@ let renderingRef = null;
11
11
  let queueCongestion = 0;
12
12
  let queuePending = false;
13
13
  /*
14
- Rindo Client Platform v2.16.0 | MIT Licensed | https://rindojs.web.app
14
+ Rindo Client Platform v2.17.0 | MIT Licensed | https://rindojs.web.app
15
15
  */
16
16
  import { BUILD, NAMESPACE } from '@rindo/core/internal/app-data';
17
17
  const win = typeof window !== 'undefined' ? window : {};
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rindo/core/internal/client",
3
- "version": "2.16.0",
3
+ "version": "2.17.0",
4
4
  "description": "Rindo internal client platform to be imported by the Rindo Compiler and internal runtime. Breaking changes can and will happen at any time.",
5
5
  "main": "./index.js",
6
6
  "private": true,
@@ -1,5 +1,5 @@
1
1
  /*
2
- Rindo Client Patch Browser v2.16.0 | MIT Licensed | https://rindojs.web.app
2
+ Rindo Client Patch Browser v2.17.0 | MIT Licensed | https://rindojs.web.app
3
3
  */
4
4
  import { BUILD, NAMESPACE } from '@rindo/core/internal/app-data';
5
5
  import { consoleDevInfo, plt, win, doc, promiseResolve, H } from '@rindo/core';
@@ -1,5 +1,5 @@
1
1
  /*
2
- Rindo Client Patch Esm v2.16.0 | MIT Licensed | https://rindojs.web.app
2
+ Rindo Client Patch Esm v2.17.0 | MIT Licensed | https://rindojs.web.app
3
3
  */
4
4
  import { BUILD } from '@rindo/core/internal/app-data';
5
5
  import { CSS, plt, win, promiseResolve } from '@rindo/core';
@@ -1,5 +1,5 @@
1
1
  /*
2
- Rindo Client Platform v2.16.0 | MIT Licensed | https://rindojs.web.app
2
+ Rindo Client Platform v2.17.0 | MIT Licensed | https://rindojs.web.app
3
3
  */
4
4
  /**
5
5
  * @license
@@ -59,9 +59,9 @@ function hydrateApp(e, t, o, n, s) {
59
59
  enumerable: !0
60
60
  });
61
61
  } else 64 & l && Object.defineProperty(e, n, {
62
- value() {
63
- const e = getHostRef(this), t = arguments;
64
- return e.$onInstancePromise$.then((() => e.$lazyInstance$[n].apply(e.$lazyInstance$, t))).catch(consoleError);
62
+ value(...e) {
63
+ const t = getHostRef(this);
64
+ return t.$onInstancePromise$.then((() => t.$lazyInstance$[n](...e))).catch(consoleError);
65
65
  }
66
66
  });
67
67
  }));
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rindo/core/internal/hydrate",
3
- "version": "2.16.0",
3
+ "version": "2.17.0",
4
4
  "description": "Rindo internal hydrate platform to be imported by the Rindo Compiler. Breaking changes can and will happen at any time.",
5
5
  "main": "./index.js",
6
6
  "private": true
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rindo/core/internal",
3
- "version": "2.16.0",
3
+ "version": "2.17.0",
4
4
  "description": "Rindo internals only to be imported by the Rindo Compiler. Breaking changes can and will happen at any time.",
5
5
  "main": "./index.js",
6
6
  "types": "./index.d.ts",
@@ -1729,6 +1729,9 @@ export interface CssToEsmImportData {
1729
1729
  url: string;
1730
1730
  filePath: string;
1731
1731
  }
1732
+ /**
1733
+ * Input CSS to be transformed into ESM
1734
+ */
1732
1735
  export interface TransformCssToEsmInput {
1733
1736
  input: string;
1734
1737
  module?: 'cjs' | 'esm' | string;
@@ -2272,6 +2275,7 @@ export interface TrackableData {
2272
2275
  build: string;
2273
2276
  rindo: string;
2274
2277
  has_app_pwa_config: boolean;
2278
+ config: Config;
2275
2279
  }
2276
2280
  /**
2277
2281
  * Used as the object sent to the server. Value is the data tracked.
@@ -525,10 +525,11 @@ export interface ConfigFlags {
525
525
  e2e?: boolean;
526
526
  emulate?: string;
527
527
  es5?: boolean;
528
+ esm?: boolean;
528
529
  headless?: boolean;
529
530
  help?: boolean;
530
531
  log?: boolean;
531
- logLevel?: string;
532
+ logLevel?: LogLevel;
532
533
  verbose?: boolean;
533
534
  maxWorkers?: number;
534
535
  open?: boolean;
@@ -1652,7 +1653,7 @@ export interface EmulateViewport {
1652
1653
  */
1653
1654
  isLandscape?: boolean;
1654
1655
  }
1655
- export declare type LogLevel = 'debug' | 'info' | 'warn' | 'error' | string;
1656
+ export declare type LogLevel = 'debug' | 'info' | 'warn' | 'error';
1656
1657
  /**
1657
1658
  * Common logger to be used by the compiler, dev-server and CLI. The CLI will use a
1658
1659
  * NodeJS based console logging and colors, and the web will use browser based
@@ -98,7 +98,7 @@ const defaultConsoleError = e => {
98
98
  caughtErrors.push(new Error(e.join(", ")));
99
99
  }, consoleDevWarn = (...e) => {
100
100
  const t = e.filter((e => "string" == typeof e || "number" == typeof e || "boolean" == typeof e));
101
- console.warn.apply(console, t);
101
+ console.warn(...t);
102
102
  }, nextTick = e => {
103
103
  queuedTicks.push(e);
104
104
  }, win = mockDoc.setupGlobal(global), doc = win.document;
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rindo/core/internal/testing",
3
- "version": "2.16.0",
3
+ "version": "2.17.0",
4
4
  "description": "Rindo internal testing platform to be imported by the Rindo Compiler. Breaking changes can and will happen at any time.",
5
5
  "main": "./index.js",
6
6
  "private": true
@@ -1,5 +1,5 @@
1
1
  /*!
2
- Rindo Mock Doc (CommonJS) v2.16.0 | MIT Licensed | https://rindojs.web.app
2
+ Rindo Mock Doc (CommonJS) v2.17.0 | MIT Licensed | https://rindojs.web.app
3
3
  */
4
4
  var mockDoc = (function(exports) {
5
5
  'use strict';
@@ -1602,6 +1602,9 @@ class MockElement extends MockNode {
1602
1602
  this.shadowRoot = shadowRoot;
1603
1603
  return shadowRoot;
1604
1604
  }
1605
+ blur() {
1606
+ /**/
1607
+ }
1605
1608
  get shadowRoot() {
1606
1609
  return this.__shadowRoot || null;
1607
1610
  }
@@ -1670,6 +1673,7 @@ class MockElement extends MockNode {
1670
1673
  get firstElementChild() {
1671
1674
  return this.children[0] || null;
1672
1675
  }
1676
+ focus(_options) { }
1673
1677
  getAttribute(attrName) {
1674
1678
  if (attrName === 'style') {
1675
1679
  if (this.__style != null && this.__style.length > 0) {
@@ -2573,7 +2577,28 @@ function createElementNS(ownerDocument, namespaceURI, tagName) {
2573
2577
  return createElement(ownerDocument, tagName);
2574
2578
  }
2575
2579
  else if (namespaceURI === 'http://www.w3.org/2000/svg') {
2576
- return new MockSVGElement(ownerDocument, tagName);
2580
+ switch (tagName.toLowerCase()) {
2581
+ case 'text':
2582
+ case 'tspan':
2583
+ case 'tref':
2584
+ case 'altglyph':
2585
+ case 'textpath':
2586
+ return new MockSVGTextContentElement(ownerDocument, tagName);
2587
+ case 'circle':
2588
+ case 'ellipse':
2589
+ case 'image':
2590
+ case 'line':
2591
+ case 'path':
2592
+ case 'polygon':
2593
+ case 'polyline':
2594
+ case 'rect':
2595
+ case 'use':
2596
+ return new MockSVGGraphicsElement(ownerDocument, tagName);
2597
+ case 'svg':
2598
+ return new MockSVGSVGElement(ownerDocument, tagName);
2599
+ default:
2600
+ return new MockSVGElement(ownerDocument, tagName);
2601
+ }
2577
2602
  }
2578
2603
  else {
2579
2604
  return new MockElement(ownerDocument, tagName);
@@ -2720,6 +2745,98 @@ class MockScriptElement extends MockHTMLElement {
2720
2745
  patchPropAttributes(MockScriptElement.prototype, {
2721
2746
  type: String,
2722
2747
  });
2748
+ class MockDOMMatrix {
2749
+ constructor() {
2750
+ this.a = 1;
2751
+ this.b = 0;
2752
+ this.c = 0;
2753
+ this.d = 1;
2754
+ this.e = 0;
2755
+ this.f = 0;
2756
+ this.m11 = 1;
2757
+ this.m12 = 0;
2758
+ this.m13 = 0;
2759
+ this.m14 = 0;
2760
+ this.m21 = 0;
2761
+ this.m22 = 1;
2762
+ this.m23 = 0;
2763
+ this.m24 = 0;
2764
+ this.m31 = 0;
2765
+ this.m32 = 0;
2766
+ this.m33 = 1;
2767
+ this.m34 = 0;
2768
+ this.m41 = 0;
2769
+ this.m42 = 0;
2770
+ this.m43 = 0;
2771
+ this.m44 = 1;
2772
+ this.is2D = true;
2773
+ this.isIdentity = true;
2774
+ }
2775
+ static fromMatrix() {
2776
+ return new MockDOMMatrix();
2777
+ }
2778
+ inverse() {
2779
+ return new MockDOMMatrix();
2780
+ }
2781
+ flipX() {
2782
+ return new MockDOMMatrix();
2783
+ }
2784
+ flipY() {
2785
+ return new MockDOMMatrix();
2786
+ }
2787
+ multiply() {
2788
+ return new MockDOMMatrix();
2789
+ }
2790
+ rotate() {
2791
+ return new MockDOMMatrix();
2792
+ }
2793
+ rotateAxisAngle() {
2794
+ return new MockDOMMatrix();
2795
+ }
2796
+ rotateFromVector() {
2797
+ return new MockDOMMatrix();
2798
+ }
2799
+ scale() {
2800
+ return new MockDOMMatrix();
2801
+ }
2802
+ scaleNonUniform() {
2803
+ return new MockDOMMatrix();
2804
+ }
2805
+ skewX() {
2806
+ return new MockDOMMatrix();
2807
+ }
2808
+ skewY() {
2809
+ return new MockDOMMatrix();
2810
+ }
2811
+ toJSON() { }
2812
+ toString() { }
2813
+ transformPoint() {
2814
+ return new MockDOMPoint();
2815
+ }
2816
+ translate() {
2817
+ return new MockDOMMatrix();
2818
+ }
2819
+ }
2820
+ class MockDOMPoint {
2821
+ constructor() {
2822
+ this.w = 1;
2823
+ this.x = 0;
2824
+ this.y = 0;
2825
+ this.z = 0;
2826
+ }
2827
+ toJSON() { }
2828
+ matrixTransform() {
2829
+ return new MockDOMMatrix();
2830
+ }
2831
+ }
2832
+ class MockSVGRect {
2833
+ constructor() {
2834
+ this.height = 10;
2835
+ this.width = 10;
2836
+ this.x = 0;
2837
+ this.y = 0;
2838
+ }
2839
+ }
2723
2840
  class MockStyleElement extends MockHTMLElement {
2724
2841
  constructor(ownerDocument) {
2725
2842
  super(ownerDocument, 'style');
@@ -2752,9 +2869,6 @@ class MockSVGElement extends MockElement {
2752
2869
  get viewportElement() {
2753
2870
  return null;
2754
2871
  }
2755
- focus() {
2756
- /**/
2757
- }
2758
2872
  onunload() {
2759
2873
  /**/
2760
2874
  }
@@ -2772,6 +2886,27 @@ class MockSVGElement extends MockElement {
2772
2886
  return 0;
2773
2887
  }
2774
2888
  }
2889
+ class MockSVGGraphicsElement extends MockSVGElement {
2890
+ getBBox(_options) {
2891
+ return new MockSVGRect();
2892
+ }
2893
+ getCTM() {
2894
+ return new MockDOMMatrix();
2895
+ }
2896
+ getScreenCTM() {
2897
+ return new MockDOMMatrix();
2898
+ }
2899
+ }
2900
+ class MockSVGSVGElement extends MockSVGGraphicsElement {
2901
+ createSVGPoint() {
2902
+ return new MockDOMPoint();
2903
+ }
2904
+ }
2905
+ class MockSVGTextContentElement extends MockSVGGraphicsElement {
2906
+ getComputedTextLength() {
2907
+ return 0;
2908
+ }
2909
+ }
2775
2910
  class MockBaseElement extends MockHTMLElement {
2776
2911
  constructor(ownerDocument) {
2777
2912
  super(ownerDocument, 'base');
@@ -4268,9 +4403,11 @@ function cloneDocument(srcDoc) {
4268
4403
  const dstWin = cloneWindow(srcDoc.defaultView);
4269
4404
  return dstWin.document;
4270
4405
  }
4406
+ // TODO - Evaluate reconciling MockWindow, Window differences
4271
4407
  /**
4272
4408
  * Constrain setTimeout() to 1ms, but still async. Also
4273
4409
  * only allow setInterval() to fire once, also constrained to 1ms.
4410
+ * @param win the mock window instance to update
4274
4411
  */
4275
4412
  function constrainTimeouts(win) {
4276
4413
  win.__allowInterval = false;
@@ -199,6 +199,62 @@ declare class MockScriptElement extends MockHTMLElement {
199
199
  get src(): string;
200
200
  set src(value: string);
201
201
  }
202
+ declare class MockDOMMatrix {
203
+ static fromMatrix(): MockDOMMatrix;
204
+ a: number;
205
+ b: number;
206
+ c: number;
207
+ d: number;
208
+ e: number;
209
+ f: number;
210
+ m11: number;
211
+ m12: number;
212
+ m13: number;
213
+ m14: number;
214
+ m21: number;
215
+ m22: number;
216
+ m23: number;
217
+ m24: number;
218
+ m31: number;
219
+ m32: number;
220
+ m33: number;
221
+ m34: number;
222
+ m41: number;
223
+ m42: number;
224
+ m43: number;
225
+ m44: number;
226
+ is2D: boolean;
227
+ isIdentity: boolean;
228
+ inverse(): MockDOMMatrix;
229
+ flipX(): MockDOMMatrix;
230
+ flipY(): MockDOMMatrix;
231
+ multiply(): MockDOMMatrix;
232
+ rotate(): MockDOMMatrix;
233
+ rotateAxisAngle(): MockDOMMatrix;
234
+ rotateFromVector(): MockDOMMatrix;
235
+ scale(): MockDOMMatrix;
236
+ scaleNonUniform(): MockDOMMatrix;
237
+ skewX(): MockDOMMatrix;
238
+ skewY(): MockDOMMatrix;
239
+ toJSON(): void;
240
+ toString(): void;
241
+ transformPoint(): MockDOMPoint;
242
+ translate(): MockDOMMatrix;
243
+ }
244
+ declare class MockDOMPoint {
245
+ w: number;
246
+ x: number;
247
+ y: number;
248
+ z: number;
249
+ toJSON(): void;
250
+ matrixTransform(): MockDOMMatrix;
251
+ }
252
+ declare class MockSVGRect {
253
+ height: number;
254
+ width: number;
255
+ x: number;
256
+ y: number;
257
+ }
202
258
  declare class MockStyleElement extends MockHTMLElement {
203
259
  sheet: MockCSSStyleSheet;
204
260
  constructor(ownerDocument: any);
@@ -212,13 +268,28 @@ declare class MockStyleElement extends MockHTMLElement {
212
268
  declare class MockSVGElement extends MockElement {
213
269
  get ownerSVGElement(): SVGSVGElement;
214
270
  get viewportElement(): SVGElement;
215
- focus(): void;
216
271
  onunload(): void;
217
272
  get pathLength(): number;
218
273
  isPointInFill(_pt: DOMPoint): boolean;
219
274
  isPointInStroke(_pt: DOMPoint): boolean;
220
275
  getTotalLength(): number;
221
276
  }
277
+ declare class MockSVGGraphicsElement extends MockSVGElement {
278
+ getBBox(_options?: {
279
+ clipped: boolean;
280
+ fill: boolean;
281
+ markers: boolean;
282
+ stroke: boolean;
283
+ }): MockSVGRect;
284
+ getCTM(): MockDOMMatrix;
285
+ getScreenCTM(): MockDOMMatrix;
286
+ }
287
+ declare class MockSVGSVGElement extends MockSVGGraphicsElement {
288
+ createSVGPoint(): MockDOMPoint;
289
+ }
290
+ declare class MockSVGTextContentElement extends MockSVGGraphicsElement {
291
+ getComputedTextLength(): number;
292
+ }
222
293
  declare class MockBaseElement extends MockHTMLElement {
223
294
  constructor(ownerDocument: any);
224
295
  get href(): string;
@@ -438,6 +509,7 @@ declare class MockElement extends MockNode {
438
509
  constructor(ownerDocument: any, nodeName: string);
439
510
  addEventListener(type: string, handler: (ev?: any) => void): void;
440
511
  attachShadow(_opts: ShadowRootInit): any;
512
+ blur(): void;
441
513
  get shadowRoot(): any;
442
514
  set shadowRoot(shadowRoot: any);
443
515
  get attributes(): MockAttributeMap;
@@ -455,6 +527,9 @@ declare class MockElement extends MockNode {
455
527
  set dir(value: string);
456
528
  dispatchEvent(ev: MockEvent): boolean;
457
529
  get firstElementChild(): MockElement | null;
530
+ focus(_options?: {
531
+ preventScroll?: boolean;
532
+ }): void;
458
533
  getAttribute(attrName: string): any;
459
534
  getAttributeNS(namespaceURI: string, attrName: string): string;
460
535
  getBoundingClientRect(): {
@@ -923,6 +998,7 @@ declare function cloneDocument(srcDoc: Document): Document;
923
998
  /**
924
999
  * Constrain setTimeout() to 1ms, but still async. Also
925
1000
  * only allow setInterval() to fire once, also constrained to 1ms.
1001
+ * @param win the mock window instance to update
926
1002
  */
927
1003
  declare function constrainTimeouts(win: any): void;
928
1004
  export { MockAttr, MockAttributeMap, MockComment, MockCustomEvent, MockDocument, MockElement, MockHTMLElement, MockHeaders, MockKeyboardEvent, MockMouseEvent, MockNode, MockRequest, MockRequestInfo, MockRequestInit, MockResponse, MockResponseInit, MockTextNode, MockWindow, NODE_TYPES, SerializeNodeToHtmlOptions, cloneAttributes, cloneDocument, cloneWindow, constrainTimeouts, createDocument, createFragment, parseHtmlToDocument, parseHtmlToFragment, patchWindow, resetDocument, serializeNodeToHtml, setupGlobal, teardownGlobal }
package/mock-doc/index.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /*!
2
- Rindo Mock Doc v2.16.0 | MIT Licensed | https://rindojs.web.app
2
+ Rindo Mock Doc v2.17.0 | MIT Licensed | https://rindojs.web.app
3
3
  */
4
4
  const CONTENT_REF_ID = 'r';
5
5
  const ORG_LOCATION_ID = 'o';
@@ -1599,6 +1599,9 @@ class MockElement extends MockNode {
1599
1599
  this.shadowRoot = shadowRoot;
1600
1600
  return shadowRoot;
1601
1601
  }
1602
+ blur() {
1603
+ /**/
1604
+ }
1602
1605
  get shadowRoot() {
1603
1606
  return this.__shadowRoot || null;
1604
1607
  }
@@ -1667,6 +1670,7 @@ class MockElement extends MockNode {
1667
1670
  get firstElementChild() {
1668
1671
  return this.children[0] || null;
1669
1672
  }
1673
+ focus(_options) { }
1670
1674
  getAttribute(attrName) {
1671
1675
  if (attrName === 'style') {
1672
1676
  if (this.__style != null && this.__style.length > 0) {
@@ -2570,7 +2574,28 @@ function createElementNS(ownerDocument, namespaceURI, tagName) {
2570
2574
  return createElement(ownerDocument, tagName);
2571
2575
  }
2572
2576
  else if (namespaceURI === 'http://www.w3.org/2000/svg') {
2573
- return new MockSVGElement(ownerDocument, tagName);
2577
+ switch (tagName.toLowerCase()) {
2578
+ case 'text':
2579
+ case 'tspan':
2580
+ case 'tref':
2581
+ case 'altglyph':
2582
+ case 'textpath':
2583
+ return new MockSVGTextContentElement(ownerDocument, tagName);
2584
+ case 'circle':
2585
+ case 'ellipse':
2586
+ case 'image':
2587
+ case 'line':
2588
+ case 'path':
2589
+ case 'polygon':
2590
+ case 'polyline':
2591
+ case 'rect':
2592
+ case 'use':
2593
+ return new MockSVGGraphicsElement(ownerDocument, tagName);
2594
+ case 'svg':
2595
+ return new MockSVGSVGElement(ownerDocument, tagName);
2596
+ default:
2597
+ return new MockSVGElement(ownerDocument, tagName);
2598
+ }
2574
2599
  }
2575
2600
  else {
2576
2601
  return new MockElement(ownerDocument, tagName);
@@ -2717,6 +2742,98 @@ class MockScriptElement extends MockHTMLElement {
2717
2742
  patchPropAttributes(MockScriptElement.prototype, {
2718
2743
  type: String,
2719
2744
  });
2745
+ class MockDOMMatrix {
2746
+ constructor() {
2747
+ this.a = 1;
2748
+ this.b = 0;
2749
+ this.c = 0;
2750
+ this.d = 1;
2751
+ this.e = 0;
2752
+ this.f = 0;
2753
+ this.m11 = 1;
2754
+ this.m12 = 0;
2755
+ this.m13 = 0;
2756
+ this.m14 = 0;
2757
+ this.m21 = 0;
2758
+ this.m22 = 1;
2759
+ this.m23 = 0;
2760
+ this.m24 = 0;
2761
+ this.m31 = 0;
2762
+ this.m32 = 0;
2763
+ this.m33 = 1;
2764
+ this.m34 = 0;
2765
+ this.m41 = 0;
2766
+ this.m42 = 0;
2767
+ this.m43 = 0;
2768
+ this.m44 = 1;
2769
+ this.is2D = true;
2770
+ this.isIdentity = true;
2771
+ }
2772
+ static fromMatrix() {
2773
+ return new MockDOMMatrix();
2774
+ }
2775
+ inverse() {
2776
+ return new MockDOMMatrix();
2777
+ }
2778
+ flipX() {
2779
+ return new MockDOMMatrix();
2780
+ }
2781
+ flipY() {
2782
+ return new MockDOMMatrix();
2783
+ }
2784
+ multiply() {
2785
+ return new MockDOMMatrix();
2786
+ }
2787
+ rotate() {
2788
+ return new MockDOMMatrix();
2789
+ }
2790
+ rotateAxisAngle() {
2791
+ return new MockDOMMatrix();
2792
+ }
2793
+ rotateFromVector() {
2794
+ return new MockDOMMatrix();
2795
+ }
2796
+ scale() {
2797
+ return new MockDOMMatrix();
2798
+ }
2799
+ scaleNonUniform() {
2800
+ return new MockDOMMatrix();
2801
+ }
2802
+ skewX() {
2803
+ return new MockDOMMatrix();
2804
+ }
2805
+ skewY() {
2806
+ return new MockDOMMatrix();
2807
+ }
2808
+ toJSON() { }
2809
+ toString() { }
2810
+ transformPoint() {
2811
+ return new MockDOMPoint();
2812
+ }
2813
+ translate() {
2814
+ return new MockDOMMatrix();
2815
+ }
2816
+ }
2817
+ class MockDOMPoint {
2818
+ constructor() {
2819
+ this.w = 1;
2820
+ this.x = 0;
2821
+ this.y = 0;
2822
+ this.z = 0;
2823
+ }
2824
+ toJSON() { }
2825
+ matrixTransform() {
2826
+ return new MockDOMMatrix();
2827
+ }
2828
+ }
2829
+ class MockSVGRect {
2830
+ constructor() {
2831
+ this.height = 10;
2832
+ this.width = 10;
2833
+ this.x = 0;
2834
+ this.y = 0;
2835
+ }
2836
+ }
2720
2837
  class MockStyleElement extends MockHTMLElement {
2721
2838
  constructor(ownerDocument) {
2722
2839
  super(ownerDocument, 'style');
@@ -2749,9 +2866,6 @@ class MockSVGElement extends MockElement {
2749
2866
  get viewportElement() {
2750
2867
  return null;
2751
2868
  }
2752
- focus() {
2753
- /**/
2754
- }
2755
2869
  onunload() {
2756
2870
  /**/
2757
2871
  }
@@ -2769,6 +2883,27 @@ class MockSVGElement extends MockElement {
2769
2883
  return 0;
2770
2884
  }
2771
2885
  }
2886
+ class MockSVGGraphicsElement extends MockSVGElement {
2887
+ getBBox(_options) {
2888
+ return new MockSVGRect();
2889
+ }
2890
+ getCTM() {
2891
+ return new MockDOMMatrix();
2892
+ }
2893
+ getScreenCTM() {
2894
+ return new MockDOMMatrix();
2895
+ }
2896
+ }
2897
+ class MockSVGSVGElement extends MockSVGGraphicsElement {
2898
+ createSVGPoint() {
2899
+ return new MockDOMPoint();
2900
+ }
2901
+ }
2902
+ class MockSVGTextContentElement extends MockSVGGraphicsElement {
2903
+ getComputedTextLength() {
2904
+ return 0;
2905
+ }
2906
+ }
2772
2907
  class MockBaseElement extends MockHTMLElement {
2773
2908
  constructor(ownerDocument) {
2774
2909
  super(ownerDocument, 'base');
@@ -4265,9 +4400,11 @@ function cloneDocument(srcDoc) {
4265
4400
  const dstWin = cloneWindow(srcDoc.defaultView);
4266
4401
  return dstWin.document;
4267
4402
  }
4403
+ // TODO - Evaluate reconciling MockWindow, Window differences
4268
4404
  /**
4269
4405
  * Constrain setTimeout() to 1ms, but still async. Also
4270
4406
  * only allow setInterval() to fire once, also constrained to 1ms.
4407
+ * @param win the mock window instance to update
4271
4408
  */
4272
4409
  function constrainTimeouts(win) {
4273
4410
  win.__allowInterval = false;
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rindo/core/mock-doc",
3
- "version": "2.16.0",
3
+ "version": "2.17.0",
4
4
  "description": "Mock window, document and DOM outside of a browser environment.",
5
5
  "main": "./index.cjs",
6
6
  "module": "./index.js",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rindo/core",
3
- "version": "2.16.0",
3
+ "version": "2.17.0",
4
4
  "license": "MIT",
5
5
  "main": "./internal/rindo-core/index.cjs",
6
6
  "module": "./internal/rindo-core/index.js",
@@ -25,6 +25,7 @@
25
25
  ],
26
26
  "scripts": {
27
27
  "build": "node scripts --prepare && npm run tsc.prod && npm run rollup.prod.ci",
28
+ "changelog": "conventional-changelog -p angular -o -i CHANGELOG.md -s",
28
29
  "clean": "rm -rf build/ cli/ compiler/ dev-server/ internal/ mock-doc/ sys/ testing/ && npm run clean-scripts",
29
30
  "clean-scripts": "rm -rf scripts/build",
30
31
  "license": "node scripts --license",
@@ -86,6 +87,7 @@
86
87
  "dts-bundle-generator": "~5.3.0",
87
88
  "eslint": "^8.13.0",
88
89
  "eslint-config-prettier": "^8.5.0",
90
+ "eslint-plugin-jsdoc": "^39.3.1",
89
91
  "execa": "4.1.0",
90
92
  "exit": "^0.1.2",
91
93
  "fast-deep-equal": "3.1.3",