@viewfly/platform-browser 3.0.2 → 3.0.3

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.
@@ -24,6 +24,7 @@ export declare class DomRenderer extends NativeRenderer<HTMLElement, Text> {
24
24
  unListen(node: HTMLElement, type: string, callback: (ev: any) => any): void;
25
25
  syncTextContent(target: Text, content: string): void;
26
26
  getNameSpace(type: string, namespace: ElementNamespace): string | void;
27
+ getChildrenNameSpace(type: string, namespace: ElementNamespace): string | void;
27
28
  /**
28
29
  * SVG / MathML 等非 HTML 下无 HTML5 的「反射 IDL」表;通常用属性字符串表示,false/空串/非数常表示不输出该属性。
29
30
  */
@@ -35,6 +35,7 @@ export declare class HTMLRenderer extends NativeRenderer<VDOMElement, VDOMText>
35
35
  syncTextContent(target: VDOMText, content: string): void;
36
36
  insertAfter(newNode: VDOMElement | VDOMText, ref: VDOMElement | VDOMText): void;
37
37
  getNameSpace(): void;
38
+ getChildrenNameSpace(): string | void;
38
39
  }
39
40
  /**
40
41
  * 轻量 DOM 转换为 HTML 字符串的转换器
package/dist/index.esm.js CHANGED
@@ -490,14 +490,15 @@ var DomRenderer = class DomRenderer extends NativeRenderer {
490
490
  target.textContent = content;
491
491
  }
492
492
  getNameSpace(type, namespace) {
493
- if (namespace === "svg") {
494
- if (type === "foreignObject") return;
495
- return namespace;
496
- }
493
+ if (namespace === "svg") return namespace;
497
494
  if (type === "svg") return type;
498
495
  if (type === "math") return "mathml";
499
496
  return namespace;
500
497
  }
498
+ getChildrenNameSpace(type, namespace) {
499
+ if (namespace === "svg" && type === "foreignObject") return;
500
+ return namespace;
501
+ }
501
502
  /**
502
503
  * SVG / MathML 等非 HTML 下无 HTML5 的「反射 IDL」表;通常用属性字符串表示,false/空串/非数常表示不输出该属性。
503
504
  */
@@ -661,6 +662,7 @@ var HTMLRenderer = class extends NativeRenderer {
661
662
  } else console.warn(`Element "${ref instanceof VDOMText ? ref.text : ref.name}" was accidentally deleted, and viewfly is unable to update the current view`);
662
663
  }
663
664
  getNameSpace() {}
665
+ getChildrenNameSpace() {}
664
666
  };
665
667
  /**
666
668
  * 轻量 DOM 转换为 HTML 字符串的转换器
package/dist/index.js CHANGED
@@ -491,14 +491,15 @@ var DomRenderer = class DomRenderer extends _viewfly_core.NativeRenderer {
491
491
  target.textContent = content;
492
492
  }
493
493
  getNameSpace(type, namespace) {
494
- if (namespace === "svg") {
495
- if (type === "foreignObject") return;
496
- return namespace;
497
- }
494
+ if (namespace === "svg") return namespace;
498
495
  if (type === "svg") return type;
499
496
  if (type === "math") return "mathml";
500
497
  return namespace;
501
498
  }
499
+ getChildrenNameSpace(type, namespace) {
500
+ if (namespace === "svg" && type === "foreignObject") return;
501
+ return namespace;
502
+ }
502
503
  /**
503
504
  * SVG / MathML 等非 HTML 下无 HTML5 的「反射 IDL」表;通常用属性字符串表示,false/空串/非数常表示不输出该属性。
504
505
  */
@@ -662,6 +663,7 @@ var HTMLRenderer = class extends _viewfly_core.NativeRenderer {
662
663
  } else console.warn(`Element "${ref instanceof VDOMText ? ref.text : ref.name}" was accidentally deleted, and viewfly is unable to update the current view`);
663
664
  }
664
665
  getNameSpace() {}
666
+ getChildrenNameSpace() {}
665
667
  };
666
668
  /**
667
669
  * 轻量 DOM 转换为 HTML 字符串的转换器
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@viewfly/platform-browser",
3
- "version": "3.0.2",
3
+ "version": "3.0.3",
4
4
  "description": "This project is used to enable the Viewfly framework to run in a browser.",
5
5
  "main": "./dist/index.js",
6
6
  "module": "./dist/index.esm.js",
@@ -18,7 +18,7 @@
18
18
  "license": "MIT",
19
19
  "keywords": [],
20
20
  "dependencies": {
21
- "@viewfly/core": "^3.0.2",
21
+ "@viewfly/core": "^3.0.3",
22
22
  "csstype": "^3.1.3"
23
23
  },
24
24
  "devDependencies": {