@flashist/flibs 0.0.121 → 0.0.125

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.
@@ -1,4 +1,5 @@
1
1
  import { Point } from "../../index";
2
2
  export declare class HtmlTools {
3
3
  static getDocumentSize(): Point;
4
+ static createElementFromHTMLString(htmlString: string): ChildNode;
4
5
  }
@@ -5,6 +5,12 @@ var HtmlTools = /** @class */ (function () {
5
5
  HtmlTools.getDocumentSize = function () {
6
6
  return new Point(Math.max(document.documentElement.clientWidth, window.innerWidth), Math.max(document.documentElement.clientHeight, window.innerHeight));
7
7
  };
8
+ HtmlTools.createElementFromHTMLString = function (htmlString) {
9
+ var div = document.createElement('div');
10
+ div.innerHTML = htmlString.trim();
11
+ // Change this to div.childNodes to support multiple top-level nodes.
12
+ return div.firstChild;
13
+ };
8
14
  return HtmlTools;
9
15
  }());
10
16
  export { HtmlTools };
@@ -1 +1 @@
1
- {"version":3,"file":"HtmlTools.js","sourceRoot":"","sources":["../../../src/html/tools/HtmlTools.ts"],"names":[],"mappings":"AAAA,OAAO,EACH,KAAK,EACR,MAAM,aAAa,CAAC;AAErB;IAAA;IAOA,CAAC;IANU,yBAAe,GAAtB;QACI,OAAO,IAAI,KAAK,CACZ,IAAI,CAAC,GAAG,CAAC,QAAQ,CAAC,eAAe,CAAC,WAAW,EAAE,MAAM,CAAC,UAAU,CAAC,EACjE,IAAI,CAAC,GAAG,CAAC,QAAQ,CAAC,eAAe,CAAC,YAAY,EAAE,MAAM,CAAC,WAAW,CAAC,CACtE,CAAA;IACL,CAAC;IACL,gBAAC;AAAD,CAAC,AAPD,IAOC"}
1
+ {"version":3,"file":"HtmlTools.js","sourceRoot":"","sources":["../../../src/html/tools/HtmlTools.ts"],"names":[],"mappings":"AAAA,OAAO,EACH,KAAK,EACR,MAAM,aAAa,CAAC;AAErB;IAAA;IAeA,CAAC;IAdU,yBAAe,GAAtB;QACI,OAAO,IAAI,KAAK,CACZ,IAAI,CAAC,GAAG,CAAC,QAAQ,CAAC,eAAe,CAAC,WAAW,EAAE,MAAM,CAAC,UAAU,CAAC,EACjE,IAAI,CAAC,GAAG,CAAC,QAAQ,CAAC,eAAe,CAAC,YAAY,EAAE,MAAM,CAAC,WAAW,CAAC,CACtE,CAAA;IACL,CAAC;IAEM,qCAA2B,GAAlC,UAAmC,UAAkB;QACjD,IAAI,GAAG,GAAgB,QAAQ,CAAC,aAAa,CAAC,KAAK,CAAC,CAAC;QACrD,GAAG,CAAC,SAAS,GAAG,UAAU,CAAC,IAAI,EAAE,CAAC;QAElC,qEAAqE;QACrE,OAAO,GAAG,CAAC,UAAU,CAAC;IAC1B,CAAC;IACL,gBAAC;AAAD,CAAC,AAfD,IAeC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@flashist/flibs",
3
- "version": "0.0.121",
3
+ "version": "0.0.125",
4
4
  "scripts": {
5
5
  "build": "gulp",
6
6
  "publish:patch": "npm version patch && npm run build && cd ./dist && npm publish",