@teambit/ui-foundation.ui.rendering.html 0.0.94 → 0.0.96

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/dev-tools.js CHANGED
@@ -3,12 +3,11 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
3
3
  return (mod && mod.__esModule) ? mod : { "default": mod };
4
4
  };
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
- exports.CrossIframeDevTools = void 0;
6
+ exports.CrossIframeDevTools = CrossIframeDevTools;
7
7
  const react_1 = __importDefault(require("react"));
8
8
  function CrossIframeDevTools() {
9
9
  return (react_1.default.createElement("script", null,
10
10
  '/* Allow to use react dev-tools inside the examples */\n',
11
11
  'try { window.__REACT_DEVTOOLS_GLOBAL_HOOK__ = window.parent.__REACT_DEVTOOLS_GLOBAL_HOOK__; } catch {}'));
12
12
  }
13
- exports.CrossIframeDevTools = CrossIframeDevTools;
14
13
  //# sourceMappingURL=dev-tools.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"dev-tools.js","sourceRoot":"","sources":["../dev-tools.tsx"],"names":[],"mappings":";;;;;;AAAA,kDAA0B;AAE1B,SAAgB,mBAAmB;IACjC,OAAO,CACL;QACG,0DAA0D;QAC1D,wGAAwG,CAClG,CACV,CAAC;AACJ,CAAC;AAPD,kDAOC"}
1
+ {"version":3,"file":"dev-tools.js","sourceRoot":"","sources":["../dev-tools.tsx"],"names":[],"mappings":";;;;;AAEA,kDAOC;AATD,kDAA0B;AAE1B,SAAgB,mBAAmB;IACjC,OAAO,CACL;QACG,0DAA0D;QAC1D,wGAAwG,CAClG,CACV,CAAC;AACJ,CAAC"}
@@ -3,11 +3,10 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
3
3
  return (mod && mod.__esModule) ? mod : { "default": mod };
4
4
  };
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
- exports.FullHeightStyle = void 0;
6
+ exports.FullHeightStyle = FullHeightStyle;
7
7
  const react_1 = __importDefault(require("react"));
8
8
  function FullHeightStyle() {
9
9
  // return <style> {'html { height: 100%; } body { margin: 0; height: 100%; } #root { height: 100%; }'} </style>;
10
10
  return react_1.default.createElement("style", null, 'body { margin: 0; }');
11
11
  }
12
- exports.FullHeightStyle = FullHeightStyle;
13
12
  //# sourceMappingURL=full-height-style.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"full-height-style.js","sourceRoot":"","sources":["../full-height-style.tsx"],"names":[],"mappings":";;;;;;AAAA,kDAA0B;AAE1B,SAAgB,eAAe;IAC7B,gHAAgH;IAChH,OAAO,6CAAQ,qBAAqB,CAAS,CAAC;AAChD,CAAC;AAHD,0CAGC"}
1
+ {"version":3,"file":"full-height-style.js","sourceRoot":"","sources":["../full-height-style.tsx"],"names":[],"mappings":";;;;;AAEA,0CAGC;AALD,kDAA0B;AAE1B,SAAgB,eAAe;IAC7B,gHAAgH;IAChH,OAAO,6CAAQ,qBAAqB,CAAS,CAAC;AAChD,CAAC"}
package/dist/html.d.ts CHANGED
@@ -1,6 +1,7 @@
1
1
  import React from 'react';
2
2
  import { fillMountPoint } from './mount-point';
3
3
  export declare const LOAD_EVENT = "_DOM_LOADED_";
4
+ export declare const ERROR_EVENT = "_ERROR_OCCURRED_";
4
5
  export type Assets = Partial<{
5
6
  /** page title */
6
7
  title: string;
package/dist/html.js CHANGED
@@ -14,7 +14,9 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
14
14
  return (mod && mod.__esModule) ? mod : { "default": mod };
15
15
  };
16
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
- exports.ssrCleanup = exports.Html = exports.LOAD_EVENT = void 0;
17
+ exports.ERROR_EVENT = exports.LOAD_EVENT = void 0;
18
+ exports.Html = Html;
19
+ exports.ssrCleanup = ssrCleanup;
18
20
  const react_1 = __importDefault(require("react"));
19
21
  const dev_tools_1 = require("./dev-tools");
20
22
  const mount_point_1 = require("./mount-point");
@@ -22,6 +24,7 @@ const stored_assets_1 = require("./stored-assets");
22
24
  const ssr_styles_1 = require("./ssr-styles");
23
25
  const full_height_style_1 = require("./full-height-style");
24
26
  exports.LOAD_EVENT = '_DOM_LOADED_';
27
+ exports.ERROR_EVENT = '_ERROR_OCCURRED_';
25
28
  const NotifyParentScript = () => (react_1.default.createElement("script", { dangerouslySetInnerHTML: {
26
29
  __html: `
27
30
  // only send loaded event when mounted in an iframe
@@ -52,11 +55,9 @@ function Html(_a) {
52
55
  assets.json && react_1.default.createElement(stored_assets_1.StoredAssets, { data: assets.json }), (_d = assets.js) === null || _d === void 0 ? void 0 :
53
56
  _d.map((x, idx) => react_1.default.createElement("script", { key: idx, src: x })))));
54
57
  }
55
- exports.Html = Html;
56
58
  Html.fillContent = mount_point_1.fillMountPoint;
57
59
  Html.popAssets = stored_assets_1.popAssets;
58
60
  function ssrCleanup() {
59
61
  (0, ssr_styles_1.removeSsrStyles)();
60
62
  }
61
- exports.ssrCleanup = ssrCleanup;
62
63
  //# sourceMappingURL=html.js.map
package/dist/html.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"html.js","sourceRoot":"","sources":["../html.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AAAA,kDAA0B;AAC1B,2CAAkD;AAClD,+CAA2D;AAC3D,mDAA0D;AAC1D,6CAA0D;AAC1D,2DAAsD;AAEzC,QAAA,UAAU,GAAG,cAAc,CAAC;AAuBzC,MAAM,kBAAkB,GAAG,GAAG,EAAE,CAAC,CAC/B,0CACE,uBAAuB,EAAE;QACvB,MAAM,EAAE;;;;kDAIoC,kBAAU;;;OAGrD;KACF,GACO,CACX,CAAC;AAEF,wDAAwD;AACxD,SAAgB,IAAI,CAAC,EAQT;;QARS,EACnB,MAAM,GAAG,EAAE,EACX,YAAY,GAAG,KAAK,EACpB,UAAU,EACV,GAAG,EACH,QAAQ,GAAG,8BAAC,wBAAU,OAAG,EACzB,kBAAkB,GAAG,IAAI,OAEf,EADP,IAAI,cAPY,iFAQpB,CADQ;IAEP,OAAO,CACL,s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AC,UAAU,GAAG,CAAC;YACzF,kBAAkB,IAAI,8BAAC,kBAAkB,OAAG,CACxC;QACP;YACG,QAAQ;YACR,MAAM,CAAC,IAAI,IAAI,8BAAC,4BAAY,IAAC,IAAI,EAAE,MAAM,CAAC,IAAI,GAAI,EAElD,MAAA,MAAM,CAAC,EAAE;eAAE,GAAG,CAAC,CAAC,CAAC,EAAE,GAAG,EAAE,EAAE,CAAC,0CAAQ,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,CAAC,GAAI,CAAC,CACpD,CACF,CACR,CAAC;AACJ,CAAC;AAED,IAAI,CAAC,WAAW,GAAG,4BAAc,CAAC;AAClC,IAAI,CAAC,SAAS,GAAG,yBAAS,CAAC;AAE3B,SAAgB,UAAU;IACxB,IAAA,4BAAe,GAAE,CAAC;AACpB,CAAC"}
package/dist/index.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- export { Html, ssrCleanup, LOAD_EVENT } from './html';
1
+ export { Html, ssrCleanup, LOAD_EVENT, ERROR_EVENT } from './html';
2
2
  export { MountPoint, mountPointId } from './mount-point';
3
3
  export { popAssets } from './stored-assets';
4
4
  export type { HtmlProps, Assets } from './html';
package/dist/index.js CHANGED
@@ -1,10 +1,11 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.popAssets = exports.mountPointId = exports.MountPoint = exports.LOAD_EVENT = exports.ssrCleanup = exports.Html = void 0;
3
+ exports.popAssets = exports.mountPointId = exports.MountPoint = exports.ERROR_EVENT = exports.LOAD_EVENT = exports.ssrCleanup = exports.Html = void 0;
4
4
  var html_1 = require("./html");
5
5
  Object.defineProperty(exports, "Html", { enumerable: true, get: function () { return html_1.Html; } });
6
6
  Object.defineProperty(exports, "ssrCleanup", { enumerable: true, get: function () { return html_1.ssrCleanup; } });
7
7
  Object.defineProperty(exports, "LOAD_EVENT", { enumerable: true, get: function () { return html_1.LOAD_EVENT; } });
8
+ Object.defineProperty(exports, "ERROR_EVENT", { enumerable: true, get: function () { return html_1.ERROR_EVENT; } });
8
9
  var mount_point_1 = require("./mount-point");
9
10
  Object.defineProperty(exports, "MountPoint", { enumerable: true, get: function () { return mount_point_1.MountPoint; } });
10
11
  Object.defineProperty(exports, "mountPointId", { enumerable: true, get: function () { return mount_point_1.mountPointId; } });
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../index.ts"],"names":[],"mappings":";;;AAAA,+BAAsD;AAA7C,4FAAA,IAAI,OAAA;AAAE,kGAAA,UAAU,OAAA;AAAE,kGAAA,UAAU,OAAA;AACrC,6CAAyD;AAAhD,yGAAA,UAAU,OAAA;AAAE,2GAAA,YAAY,OAAA;AACjC,iDAA4C;AAAnC,0GAAA,SAAS,OAAA"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../index.ts"],"names":[],"mappings":";;;AAAA,+BAAmE;AAA1D,4FAAA,IAAI,OAAA;AAAE,kGAAA,UAAU,OAAA;AAAE,kGAAA,UAAU,OAAA;AAAE,mGAAA,WAAW,OAAA;AAClD,6CAAyD;AAAhD,yGAAA,UAAU,OAAA;AAAE,2GAAA,YAAY,OAAA;AACjC,iDAA4C;AAAnC,0GAAA,SAAS,OAAA"}
@@ -1,4 +1,5 @@
1
- import React, { ReactNode } from 'react';
1
+ import type { ReactNode } from 'react';
2
+ import React from 'react';
2
3
  export declare const mountPointId = "root";
3
4
  export declare function MountPoint({ children }: {
4
5
  children?: ReactNode;
@@ -3,17 +3,17 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
3
3
  return (mod && mod.__esModule) ? mod : { "default": mod };
4
4
  };
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
- exports.fillMountPoint = exports.MountPoint = exports.mountPointId = void 0;
6
+ exports.mountPointId = void 0;
7
+ exports.MountPoint = MountPoint;
8
+ exports.fillMountPoint = fillMountPoint;
7
9
  const react_1 = __importDefault(require("react"));
8
10
  exports.mountPointId = 'root';
9
11
  const placeholderRegex = /<div id="root"><\/div>/;
10
12
  function MountPoint({ children }) {
11
13
  return react_1.default.createElement("div", { id: exports.mountPointId }, children);
12
14
  }
13
- exports.MountPoint = MountPoint;
14
15
  function fillMountPoint(htmlTemplate, content) {
15
16
  const filled = htmlTemplate.replace(placeholderRegex, content);
16
17
  return filled;
17
18
  }
18
- exports.fillMountPoint = fillMountPoint;
19
19
  //# sourceMappingURL=mount-point.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"mount-point.js","sourceRoot":"","sources":["../mount-point.tsx"],"names":[],"mappings":";;;;;;AAAA,kDAAyC;AAE5B,QAAA,YAAY,GAAG,MAAM,CAAC;AACnC,MAAM,gBAAgB,GAAG,wBAAwB,CAAC;AAElD,SAAgB,UAAU,CAAC,EAAE,QAAQ,EAA4B;IAC/D,OAAO,uCAAK,EAAE,EAAE,oBAAY,IAAG,QAAQ,CAAO,CAAC;AACjD,CAAC;AAFD,gCAEC;AAED,SAAgB,cAAc,CAAC,YAAoB,EAAE,OAAe;IAClE,MAAM,MAAM,GAAG,YAAY,CAAC,OAAO,CAAC,gBAAgB,EAAE,OAAO,CAAC,CAAC;IAC/D,OAAO,MAAM,CAAC;AAChB,CAAC;AAHD,wCAGC"}
1
+ {"version":3,"file":"mount-point.js","sourceRoot":"","sources":["../mount-point.tsx"],"names":[],"mappings":";;;;;;AAMA,gCAEC;AAED,wCAGC;AAZD,kDAA0B;AAEb,QAAA,YAAY,GAAG,MAAM,CAAC;AACnC,MAAM,gBAAgB,GAAG,wBAAwB,CAAC;AAElD,SAAgB,UAAU,CAAC,EAAE,QAAQ,EAA4B;IAC/D,OAAO,uCAAK,EAAE,EAAE,oBAAY,IAAG,QAAQ,CAAO,CAAC;AACjD,CAAC;AAED,SAAgB,cAAc,CAAC,YAAoB,EAAE,OAAe;IAClE,MAAM,MAAM,GAAG,YAAY,CAAC,OAAO,CAAC,gBAAgB,EAAE,OAAO,CAAC,CAAC;IAC/D,OAAO,MAAM,CAAC;AAChB,CAAC"}
@@ -3,7 +3,8 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
3
3
  return (mod && mod.__esModule) ? mod : { "default": mod };
4
4
  };
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
- exports.removeSsrStyles = exports.SsrStyles = void 0;
6
+ exports.SsrStyles = SsrStyles;
7
+ exports.removeSsrStyles = removeSsrStyles;
7
8
  const react_1 = __importDefault(require("react"));
8
9
  function SsrStyles() {
9
10
  return (react_1.default.createElement("style", { id: "before-hydrate-styles" },
@@ -12,10 +13,8 @@ function SsrStyles() {
12
13
  "display: none;",
13
14
  '}'));
14
15
  }
15
- exports.SsrStyles = SsrStyles;
16
16
  function removeSsrStyles() {
17
17
  var _a;
18
18
  (_a = document.getElementById('before-hydrate-styles')) === null || _a === void 0 ? void 0 : _a.remove();
19
19
  }
20
- exports.removeSsrStyles = removeSsrStyles;
21
20
  //# sourceMappingURL=ssr-styles.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"ssr-styles.js","sourceRoot":"","sources":["../ssr-styles.tsx"],"names":[],"mappings":";;;;;;AAAA,kDAA0B;AAE1B,SAAgB,SAAS;IACvB,OAAO,CACL,yCAAO,EAAE,EAAC,uBAAuB;;QAChB,GAAG;;QAEjB,GAAG,CACE,CACT,CAAC;AACJ,CAAC;AARD,8BAQC;AAED,SAAgB,eAAe;;IAC7B,MAAA,QAAQ,CAAC,cAAc,CAAC,uBAAuB,CAAC,0CAAE,MAAM,EAAE,CAAC;AAC7D,CAAC;AAFD,0CAEC"}
1
+ {"version":3,"file":"ssr-styles.js","sourceRoot":"","sources":["../ssr-styles.tsx"],"names":[],"mappings":";;;;;AAEA,8BAQC;AAED,0CAEC;AAdD,kDAA0B;AAE1B,SAAgB,SAAS;IACvB,OAAO,CACL,yCAAO,EAAE,EAAC,uBAAuB;;QAChB,GAAG;;QAEjB,GAAG,CACE,CACT,CAAC;AACJ,CAAC;AAED,SAAgB,eAAe;;IAC7B,MAAA,QAAQ,CAAC,cAAc,CAAC,uBAAuB,CAAC,0CAAE,MAAM,EAAE,CAAC;AAC7D,CAAC"}
@@ -3,14 +3,14 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
3
3
  return (mod && mod.__esModule) ? mod : { "default": mod };
4
4
  };
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
- exports.popAssets = exports.StoredAssets = void 0;
6
+ exports.StoredAssets = StoredAssets;
7
+ exports.popAssets = popAssets;
7
8
  const react_1 = __importDefault(require("react"));
8
9
  function StoredAssets({ data }) {
9
10
  return (react_1.default.createElement("div", { className: "state", style: { display: 'none' } }, Object.entries(data).map(([key, content]) => (
10
11
  // TODO - we falsely assume content is html safe
11
12
  react_1.default.createElement("script", { key: key, "data-aspect": key, type: "application/json", dangerouslySetInnerHTML: { __html: content } })))));
12
13
  }
13
- exports.StoredAssets = StoredAssets;
14
14
  /** read and remove stored data from the dom */
15
15
  function popAssets() {
16
16
  var _a;
@@ -25,5 +25,4 @@ function popAssets() {
25
25
  (_a = document.querySelector('body > .state')) === null || _a === void 0 ? void 0 : _a.remove();
26
26
  return rawAssets;
27
27
  }
28
- exports.popAssets = popAssets;
29
28
  //# sourceMappingURL=stored-assets.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"stored-assets.js","sourceRoot":"","sources":["../stored-assets.tsx"],"names":[],"mappings":";;;;;;AAAA,kDAA0B;AAE1B,SAAgB,YAAY,CAAC,EAAE,IAAI,EAAoC;IACrE,OAAO,CACL,uCAAK,SAAS,EAAC,OAAO,EAAC,KAAK,EAAE,EAAE,OAAO,EAAE,MAAM,EAAE,IAC9C,MAAM,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,GAAG,EAAE,OAAO,CAAC,EAAE,EAAE,CAAC;IAC5C,gDAAgD;IAChD,0CAAQ,GAAG,EAAE,GAAG,iBAAe,GAAG,EAAE,IAAI,EAAC,kBAAkB,EAAC,uBAAuB,EAAE,EAAE,MAAM,EAAE,OAAO,EAAE,GAAI,CAC7G,CAA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,EAAkB,CAAC;IAE5C,MAAM,KAAK,GAAG,KAAK,CAAC,IAAI,CAAC,QAAQ,CAAC,gBAAgB,CAAC,mBAAmB,CAAC,CAAC,CAAC;IAEzE,KAAK,CAAC,OAAO,CAAC,CAAC,IAAI,EAAE,EAAE;QACrB,MAAM,UAAU,GAAG,IAAI,CAAC,YAAY,CAAC,aAAa,CAAC,CAAC;QACpD,IAAI,CAAC,UAAU;YAAE,OAAO;QAExB,SAAS,CAAC,GAAG,CAAC,UAAU,EAAE,IAAI,CAAC,SAAS,CAAC,CAAC;IAC5C,CAAC,CAAC,CAAC;IAEH,MAAA,QAAQ,CAAC,aAAa,CAAC,eAAe,CAAC,0CAAE,MAAM,EAAE,CAAC;IAElD,OAAO,SAAS,CAAC;AACnB,CAAC"}
package/html.tsx CHANGED
@@ -6,6 +6,7 @@ import { SsrStyles, removeSsrStyles } from './ssr-styles';
6
6
  import { FullHeightStyle } from './full-height-style';
7
7
 
8
8
  export const LOAD_EVENT = '_DOM_LOADED_';
9
+ export const ERROR_EVENT = '_ERROR_OCCURRED_';
9
10
 
10
11
  export type Assets = Partial<{
11
12
  /** page title */
package/index.ts CHANGED
@@ -1,4 +1,4 @@
1
- export { Html, ssrCleanup, LOAD_EVENT } from './html';
1
+ export { Html, ssrCleanup, LOAD_EVENT, ERROR_EVENT } from './html';
2
2
  export { MountPoint, mountPointId } from './mount-point';
3
3
  export { popAssets } from './stored-assets';
4
4
  export type { HtmlProps, Assets } from './html';
package/mount-point.tsx CHANGED
@@ -1,4 +1,5 @@
1
- import React, { ReactNode } from 'react';
1
+ import type { ReactNode } from 'react';
2
+ import React from 'react';
2
3
 
3
4
  export const mountPointId = 'root';
4
5
  const placeholderRegex = /<div id="root"><\/div>/;
package/package.json CHANGED
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "name": "@teambit/ui-foundation.ui.rendering.html",
3
- "version": "0.0.94",
3
+ "version": "0.0.96",
4
4
  "homepage": "https://bit.cloud/teambit/ui-foundation/ui/rendering/html",
5
5
  "main": "dist/index.js",
6
6
  "componentId": {
7
7
  "scope": "teambit.ui-foundation",
8
8
  "name": "ui/rendering/html",
9
- "version": "0.0.94"
9
+ "version": "0.0.96"
10
10
  },
11
11
  "dependencies": {
12
12
  "core-js": "^3.0.0"