clarity-visualize 0.8.52 → 0.8.54-beta

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.
@@ -16,20 +16,6 @@ PERFORMANCE OF THIS SOFTWARE.
16
16
  ***************************************************************************** */
17
17
  /* global Reflect, Promise */
18
18
 
19
- var extendStatics = function(d, b) {
20
- extendStatics = Object.setPrototypeOf ||
21
- ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
22
- function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
23
- return extendStatics(d, b);
24
- };
25
-
26
- function __extends(d, b) {
27
- if (typeof b !== "function" && b !== null)
28
- throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
29
- extendStatics(d, b);
30
- function __() { this.constructor = d; }
31
- d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
32
- }
33
19
 
34
20
  function __awaiter(thisArg, _arguments, P, generator) {
35
21
  function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
@@ -188,8 +174,10 @@ function hash (input, precision) {
188
174
  hash = Math.abs(hashOne + (hashTwo * 11579));
189
175
  return (precision ? hash % Math.pow(2, precision) : hash).toString(36);
190
176
  }
177
+ // Pre-computed exclude class names (replaces Constant.ExcludeClassNames.split())
178
+ var ExcludeClassNamesList = ["load", "active", "fixed", "visible", "focus", "show", "collaps", "animat"];
191
179
 
192
- var excludeClassNames = "load,active,fixed,visible,focus,show,collaps,animat" /* Constant.ExcludeClassNames */.split("," /* Constant.Comma */);
180
+ var excludeClassNames = ExcludeClassNamesList;
193
181
  var selectorMap = {};
194
182
  function reset$8() {
195
183
  selectorMap = {};
@@ -1459,14 +1447,16 @@ var LayoutHelper = /** @class */ (function () {
1459
1447
  }
1460
1448
  };
1461
1449
  this.customElement = function (event) {
1462
- if (!_this.state.window.customElements.get(event.data.name)) {
1463
- _this.state.window.customElements.define(event.data.name, /** @class */ (function (_super) {
1464
- __extends(class_1, _super);
1465
- function class_1() {
1466
- return _super !== null && _super.apply(this, arguments) || this;
1467
- }
1468
- return class_1;
1469
- }(_this.state.window.HTMLElement)));
1450
+ var tagName = event.data.name;
1451
+ if (!_this.state.window.customElements.get(tagName)) {
1452
+ try {
1453
+ // Use eval to create class in target window context (avoids ES5 transpilation issues)
1454
+ var EmptyElement = _this.state.window.eval('(class extends HTMLElement { constructor() { super(); } })');
1455
+ _this.state.window.customElements.define(tagName, EmptyElement);
1456
+ }
1457
+ catch (e) {
1458
+ console.error("Failed to define custom element ".concat(tagName, ":"), e);
1459
+ }
1470
1460
  }
1471
1461
  };
1472
1462
  this.exists = function (hash) {