lilact 0.27.1 → 0.27.2

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 (70) hide show
  1. package/dist/lilact.development.js +221 -121
  2. package/dist/lilact.development.js.map +3 -3
  3. package/dist/lilact.development.min.js +57 -57
  4. package/dist/lilact.development.min.js.map +3 -3
  5. package/dist/lilact.production.min.js +57 -57
  6. package/docs/classes/accessories.ErrorBoundary.html +3 -3
  7. package/docs/classes/accessories.Suspense.html +2 -2
  8. package/docs/classes/components.Component.html +3 -3
  9. package/docs/classes/components.HTMLComponent.html +4 -4
  10. package/docs/classes/components.RootComponent.html +5 -5
  11. package/docs/functions/components.cloneComponent.html +1 -1
  12. package/docs/functions/components.createComponent.html +1 -1
  13. package/docs/functions/components.createPortal.html +1 -1
  14. package/docs/functions/components.createRoot.html +1 -1
  15. package/docs/functions/components.memo.html +1 -1
  16. package/docs/functions/components.render.html +1 -1
  17. package/docs/functions/hooks.startTransition.html +1 -1
  18. package/docs/functions/hooks.useActionState.html +1 -1
  19. package/docs/functions/hooks.useDebugValue.html +1 -1
  20. package/docs/functions/hooks.useDeferredValue.html +1 -1
  21. package/docs/functions/hooks.useEffect.html +1 -1
  22. package/docs/functions/hooks.useId.html +1 -1
  23. package/docs/functions/hooks.useImperativeHandle.html +1 -1
  24. package/docs/functions/hooks.useInsertionEffect.html +1 -1
  25. package/docs/functions/hooks.useLayoutEffect.html +1 -1
  26. package/docs/functions/hooks.useLocalStorage.html +1 -1
  27. package/docs/functions/hooks.useMemo.html +1 -1
  28. package/docs/functions/hooks.useReducer.html +1 -1
  29. package/docs/functions/hooks.useRef.html +1 -1
  30. package/docs/functions/hooks.useTransition.html +1 -1
  31. package/docs/functions/misc.Fragment.html +2 -2
  32. package/docs/functions/misc.Portal.html +2 -2
  33. package/docs/functions/misc.deepEqual.html +1 -1
  34. package/docs/functions/misc.findDOMNode.html +1 -1
  35. package/docs/functions/misc.forwardRef.html +1 -1
  36. package/docs/functions/misc.getComponentByPointer.html +1 -1
  37. package/docs/functions/misc.isAsync.html +1 -1
  38. package/docs/functions/misc.isClass.html +1 -1
  39. package/docs/functions/misc.isEmpty.html +1 -1
  40. package/docs/functions/misc.isError.html +1 -1
  41. package/docs/functions/misc.isThenable.html +1 -1
  42. package/docs/functions/misc.shallowEqual.html +1 -1
  43. package/docs/functions/misc.toBool.html +1 -1
  44. package/docs/functions/run.lazy.html +1 -1
  45. package/docs/functions/run.require.html +1 -1
  46. package/docs/functions/run.run.html +1 -1
  47. package/docs/functions/run.runScripts.html +1 -1
  48. package/docs/functions/timers.timeoutPromise.html +10 -10
  49. package/docs/static/index.html +1 -1
  50. package/docs/static/lilact.development.js +221 -121
  51. package/docs/static/lilact.development.js.map +3 -3
  52. package/docs/static/lilact.development.min.js +57 -57
  53. package/docs/static/lilact.development.min.js.map +3 -3
  54. package/docs/static/lilact.production.min.js +57 -57
  55. package/docs/variables/components.cloneElement.html +1 -1
  56. package/docs/variables/misc.Children.html +10 -10
  57. package/docs/variables/misc.isValidElement.html +1 -1
  58. package/docs/variables/run.required_scripts.html +1 -1
  59. package/examples/index.html +1 -1
  60. package/examples/lilact.development.js +221 -121
  61. package/examples/lilact.development.js.map +3 -3
  62. package/examples/lilact.development.min.js +57 -57
  63. package/examples/lilact.development.min.js.map +3 -3
  64. package/examples/lilact.production.min.js +57 -57
  65. package/package.json +1 -1
  66. package/src/components.jsx +24 -13
  67. package/src/errors.jsx +310 -310
  68. package/src/hooks.jsx +46 -50
  69. package/src/misc.jsx +46 -18
  70. package/src/run.jsx +405 -290
@@ -1760,7 +1760,9 @@ var typeOf = (input) => {
1760
1760
  return type;
1761
1761
  };
1762
1762
  var isValidComponent = (value) => {
1763
- return value[CORE] !== void 0 || value[TEXT] !== void 0;
1763
+ return Boolean(
1764
+ value && (value[CORE] !== void 0 || value[TEXT] !== void 0)
1765
+ );
1764
1766
  };
1765
1767
  var isValidElement = isValidComponent;
1766
1768
  var findDOMNode = (component) => {
@@ -1948,6 +1950,9 @@ function isEmpty(value) {
1948
1950
  return true;
1949
1951
  }
1950
1952
  var shallowEqual = (source, target, ignore) => {
1953
+ if (Object.is(source, target)) {
1954
+ return true;
1955
+ }
1951
1956
  if (typeOf(source) !== typeOf(target)) {
1952
1957
  return false;
1953
1958
  }
@@ -1955,13 +1960,24 @@ var shallowEqual = (source, target, ignore) => {
1955
1960
  if (source.length !== target.length) {
1956
1961
  return false;
1957
1962
  }
1958
- return source.every((el, index2) => el === target[index2] || index2 === ignore);
1959
- } else if (typeOf(source) === "object") {
1960
- return Object.keys(source).every((key) => source[key] === target[key] || key === ignore);
1961
- } else if (typeOf(source) === "date") {
1963
+ return source.every(
1964
+ (value, index2) => index2 === ignore || Object.is(value, target[index2])
1965
+ );
1966
+ }
1967
+ if (typeOf(source) === "object") {
1968
+ const sourceKeys = Object.keys(source).filter((key) => key !== ignore);
1969
+ const targetKeys = Object.keys(target).filter((key) => key !== ignore);
1970
+ if (sourceKeys.length !== targetKeys.length) {
1971
+ return false;
1972
+ }
1973
+ return sourceKeys.every(
1974
+ (key) => Object.prototype.hasOwnProperty.call(target, key) && Object.is(source[key], target[key])
1975
+ );
1976
+ }
1977
+ if (typeOf(source) === "date") {
1962
1978
  return source.getTime() === target.getTime();
1963
1979
  }
1964
- return source === target;
1980
+ return Object.is(source, target);
1965
1981
  };
1966
1982
  function deepEqual(source, target) {
1967
1983
  if (typeOf(source) !== typeOf(target)) {
@@ -2990,11 +3006,16 @@ var Component = class {
2990
3006
  * @type {string}
2991
3007
  */
2992
3008
  displayName() {
2993
- var _a, _b;
2994
- if ((_a = this[CORE].entity) == null ? void 0 : _a.displayName) return (_b = this[CORE].entity) == null ? void 0 : _b.displayName;
2995
- if (typeof this[CORE].entity === "string") return this[CORE].entity;
2996
- if (isClass(this[CORE].entity)) this[CORE].entity.constructor.name;
2997
- if (typeof this[CORE].entity === "function") return this[CORE].entity.name;
3009
+ const entity = this[CORE].entity;
3010
+ if (entity == null ? void 0 : entity.displayName) {
3011
+ return typeof entity.displayName === "function" ? entity.displayName() : entity.displayName;
3012
+ }
3013
+ if (typeof entity === "string") {
3014
+ return entity;
3015
+ }
3016
+ if (typeof entity === "function") {
3017
+ return entity.name || "Component";
3018
+ }
2998
3019
  return "Component";
2999
3020
  }
3000
3021
  constructor(props) {
@@ -3377,16 +3398,12 @@ function createContext(defaultValue) {
3377
3398
  };
3378
3399
  }
3379
3400
  function useContext(context2) {
3380
- var _a;
3381
- let core = lilact_default.current_component[0].parent;
3382
- while (core.entity !== context2.Provider && core.parent) {
3401
+ var _a, _b, _c;
3402
+ let core = (_a = lilact_default.current_component[0]) == null ? void 0 : _a.parent;
3403
+ while (core && core.entity !== context2.Provider) {
3383
3404
  core = core.parent;
3384
3405
  }
3385
- if (core.parent) {
3386
- let v = (_a = core.props) == null ? void 0 : _a.value;
3387
- return v != null ? v : v = context2.default;
3388
- }
3389
- return context2.default;
3406
+ return core ? (_c = (_b = core.props) == null ? void 0 : _b.value) != null ? _c : context2.default : context2.default;
3390
3407
  }
3391
3408
  function useId(prefix2 = "N") {
3392
3409
  const hk = useHook();
@@ -3404,10 +3421,13 @@ function useTransition() {
3404
3421
  core.component.forceUpdate();
3405
3422
  }
3406
3423
  hk2.count++;
3407
- await fn();
3408
- hk2.count--;
3409
- if (hk2.count === 0) {
3410
- core.component.forceUpdate();
3424
+ try {
3425
+ return await fn();
3426
+ } finally {
3427
+ hk2.count--;
3428
+ if (hk2.count === 0) {
3429
+ core.component.forceUpdate();
3430
+ }
3411
3431
  }
3412
3432
  }).bind(void 0, lilact_default.current_component[0], hk);
3413
3433
  }
@@ -3537,16 +3557,16 @@ function useActionState(action, initialState) {
3537
3557
  function useReducer(reducer, initialArg, init) {
3538
3558
  const hk = useHook();
3539
3559
  if (isEmpty(hk)) {
3540
- hk.reducer = reducer;
3541
3560
  hk.state = init ? init(initialArg) : initialArg;
3542
3561
  hk.dispatch = function(core, hk2, action) {
3543
- const newst = hk2.reducer(hk2.state, action);
3544
- if (!lilact_default.defaultIsEqual(newst, hk2.state)) {
3545
- hk2.state = newst;
3562
+ const newState = hk2.reducer(hk2.state, action);
3563
+ if (!lilact_default.defaultIsEqual(newState, hk2.state)) {
3564
+ hk2.state = newState;
3546
3565
  core.component.forceUpdate();
3547
3566
  }
3548
3567
  }.bind(void 0, lilact_default.current_component[0], hk);
3549
3568
  }
3569
+ hk.reducer = reducer;
3550
3570
  return [hk.state, hk.dispatch];
3551
3571
  }
3552
3572
  function useDeferredValue(value, initialValue) {
@@ -3608,11 +3628,16 @@ __export(run_exports, {
3608
3628
  function joinPaths(basePath, relativePath) {
3609
3629
  const absolute = relativePath.startsWith("/");
3610
3630
  const parts = (absolute ? "" : basePath).split("/").filter(Boolean);
3611
- if (!absolute && !basePath.endsWith("/")) parts.pop();
3631
+ if (!absolute && !basePath.endsWith("/")) {
3632
+ parts.pop();
3633
+ }
3612
3634
  for (const part of relativePath.split("/")) {
3613
3635
  if (!part || part === ".") continue;
3614
- if (part === "..") parts.pop();
3615
- else parts.push(part);
3636
+ if (part === "..") {
3637
+ parts.pop();
3638
+ } else {
3639
+ parts.push(part);
3640
+ }
3616
3641
  }
3617
3642
  return `${absolute ? "/" : ""}${parts.join("/")}`;
3618
3643
  }
@@ -3626,7 +3651,9 @@ function asError(value, fallback = "Unknown error") {
3626
3651
  if (value.name) error2.name = value.name;
3627
3652
  if (value.stack) error2.stack = value.stack;
3628
3653
  for (const key of Object.keys(value)) {
3629
- if (!(key in error2)) error2[key] = value[key];
3654
+ if (!(key in error2)) {
3655
+ error2[key] = value[key];
3656
+ }
3630
3657
  }
3631
3658
  }
3632
3659
  return error2;
@@ -3640,7 +3667,9 @@ function markSource(value, path2) {
3640
3667
  }
3641
3668
  function report(value, path2) {
3642
3669
  const error2 = markSource(value, path2);
3643
- if (error2.isTraced) return error2;
3670
+ if (error2.isTraced) {
3671
+ return error2;
3672
+ }
3644
3673
  if (typeof lilact_default.traceError === "function") {
3645
3674
  return lilact_default.traceError(error2, path2);
3646
3675
  }
@@ -3648,20 +3677,50 @@ function report(value, path2) {
3648
3677
  return error2;
3649
3678
  }
3650
3679
  var required_scripts = {};
3680
+ function createModule(path2, {
3681
+ code: code2 = "",
3682
+ isInline: isInline2 = false,
3683
+ isModule: isModule2 = true
3684
+ } = {}) {
3685
+ const module2 = {
3686
+ path: path2,
3687
+ code: String(code2),
3688
+ mappings: [],
3689
+ exports: {},
3690
+ isInline: isInline2,
3691
+ isModule: isModule2,
3692
+ // True only after the module has been successfully evaluated.
3693
+ loaded: false,
3694
+ // The promise for the request currently loading this resource.
3695
+ // This is deliberately stored on the module to deduplicate requests.
3696
+ request: void 0,
3697
+ error: void 0
3698
+ };
3699
+ required_scripts[path2] = module2;
3700
+ return module2;
3701
+ }
3651
3702
  function run(jsx, path = `InlineJSX-${++lilact_default.eval_num}`, {
3652
3703
  isInline = true,
3653
3704
  isModule = true
3654
3705
  } = {}) {
3655
3706
  var _a, _b;
3656
- const module = {
3657
- path,
3658
- code: String(jsx),
3659
- mappings: [],
3660
- exports: {},
3661
- isInline,
3662
- isModule
3663
- };
3664
- required_scripts[path] = module;
3707
+ let module = required_scripts[path];
3708
+ if (!module) {
3709
+ module = createModule(path, {
3710
+ code: jsx,
3711
+ isInline,
3712
+ isModule
3713
+ });
3714
+ } else {
3715
+ module.path = path;
3716
+ module.code = String(jsx);
3717
+ module.mappings = [];
3718
+ module.exports = {};
3719
+ module.isInline = isInline;
3720
+ module.isModule = isModule;
3721
+ module.loaded = false;
3722
+ module.error = void 0;
3723
+ }
3665
3724
  let processed;
3666
3725
  try {
3667
3726
  processed = lilact_default.transpileJSX(String(jsx), {
@@ -3691,6 +3750,7 @@ function run(jsx, path = `InlineJSX-${++lilact_default.eval_num}`, {
3691
3750
  globalThis.createComponent = lilact_default.createComponent;
3692
3751
  globalThis.Fragment = lilact_default.Fragment;
3693
3752
  const result = eval(processed);
3753
+ module.loaded = true;
3694
3754
  return isEmpty(module.exports) ? result : module.exports;
3695
3755
  } catch (value) {
3696
3756
  const error2 = report(value, path);
@@ -3699,8 +3759,64 @@ function run(jsx, path = `InlineJSX-${++lilact_default.eval_num}`, {
3699
3759
  throw error2;
3700
3760
  }
3701
3761
  }
3762
+ function getOrCreateModule(path2, options = {}) {
3763
+ return required_scripts[path2] || createModule(path2, options);
3764
+ }
3765
+ function loadAsyncResource(path2, module2) {
3766
+ var _a, _b;
3767
+ let source;
3768
+ try {
3769
+ const resolved = (_b = (_a = lilact_default).resolver) == null ? void 0 : _b.call(_a, path2);
3770
+ if (resolved == null) {
3771
+ if (module2.code && !module2.loaded) {
3772
+ source = Promise.resolve(module2.code);
3773
+ } else {
3774
+ source = fetch(path2).then((response) => {
3775
+ if (!response.ok) {
3776
+ throw report(
3777
+ new Error(
3778
+ `Unable to load ${path2}: HTTP ${response.status}`
3779
+ ),
3780
+ path2
3781
+ );
3782
+ }
3783
+ return response.text();
3784
+ });
3785
+ }
3786
+ } else {
3787
+ source = Promise.resolve(resolved);
3788
+ }
3789
+ } catch (value) {
3790
+ source = Promise.reject(report(value, path2));
3791
+ }
3792
+ let request;
3793
+ request = Promise.resolve(source).then((sourceText) => {
3794
+ module2.code = String(sourceText);
3795
+ if (path2.endsWith(".css")) {
3796
+ injectGlobal(module2.code);
3797
+ module2.loaded = true;
3798
+ return void 0;
3799
+ }
3800
+ return run(module2.code, path2, {
3801
+ isInline: false,
3802
+ isModule: true
3803
+ });
3804
+ }).then((result2) => {
3805
+ var _a2;
3806
+ return (_a2 = result2 == null ? void 0 : result2.default) != null ? _a2 : result2;
3807
+ }).catch((error2) => {
3808
+ module2.error = report(error2, path2);
3809
+ throw module2.error;
3810
+ }).finally(() => {
3811
+ if (module2.request === request) {
3812
+ module2.request = void 0;
3813
+ }
3814
+ });
3815
+ module2.request = request;
3816
+ return request;
3817
+ }
3702
3818
  function require2(path2) {
3703
- var _a, _b, _c, _d, _e, _f;
3819
+ var _a, _b, _c, _d;
3704
3820
  let options = {};
3705
3821
  if (arguments.length === 2 && arguments[1] && typeof arguments[1] === "object") {
3706
3822
  options = arguments[1];
@@ -3708,12 +3824,16 @@ function require2(path2) {
3708
3824
  if ((_a = lilact_default.importObjectPaths) == null ? void 0 : _a[path2]) {
3709
3825
  return lilact_default.importObjectPaths[path2];
3710
3826
  }
3711
- const loadAsync = Boolean(lilact_default[LAZY]) || Boolean(options.isLazy);
3712
3827
  if ((_b = options.requirer) == null ? void 0 : _b.path) {
3713
3828
  path2 = joinPaths(options.requirer.path, path2);
3714
3829
  }
3715
- if (required_scripts[path2] && !options.forceUpdate && !loadAsync) {
3716
- return required_scripts[path2].exports;
3830
+ const loadAsync = Boolean(lilact_default[LAZY]) || Boolean(options.isLazy);
3831
+ const module2 = getOrCreateModule(path2, {
3832
+ isInline: false,
3833
+ isModule: true
3834
+ });
3835
+ if (module2.loaded && !options.forceUpdate && !loadAsync) {
3836
+ return module2.exports;
3717
3837
  }
3718
3838
  if (path2.startsWith("#")) {
3719
3839
  const element = document.getElementById(path2.slice(1));
@@ -3727,49 +3847,18 @@ function require2(path2) {
3727
3847
  }
3728
3848
  if (loadAsync) {
3729
3849
  lilact_default[LAZY] = false;
3730
- let request2 = (_d = (_c = lilact_default).resolver) == null ? void 0 : _d.call(_c, path2);
3731
- if (request2 == null) {
3732
- if (required_scripts[path2] && !options.forceUpdate) {
3733
- request2 = Promise.resolve(required_scripts[path2].code);
3734
- } else {
3735
- request2 = fetch(path2).then((response) => {
3736
- if (!response.ok) {
3737
- throw report(
3738
- new Error(
3739
- `Unable to load ${path2}: HTTP ${response.status}`
3740
- ),
3741
- path2
3742
- );
3743
- }
3744
- return response.text();
3745
- });
3746
- }
3747
- } else {
3748
- request2 = Promise.resolve(request2);
3850
+ if (module2.request) {
3851
+ return module2.request;
3749
3852
  }
3750
- return request2.then((source) => {
3751
- if (path2.endsWith(".css")) {
3752
- injectGlobal(String(source));
3753
- return;
3754
- }
3755
- return run(String(source), path2, {
3756
- isInline: false,
3757
- isModule: true
3758
- });
3759
- }).then(
3760
- (result2) => {
3761
- var _a2;
3762
- return (_a2 = result2 == null ? void 0 : result2.default) != null ? _a2 : result2;
3763
- }
3764
- ).catch((error2) => {
3765
- throw report(error2, path2);
3766
- });
3853
+ return loadAsyncResource(path2, module2);
3767
3854
  }
3768
- const resolved = (_f = (_e = lilact_default).resolver) == null ? void 0 : _f.call(_e, path2);
3855
+ const resolved = (_d = (_c = lilact_default).resolver) == null ? void 0 : _d.call(_c, path2);
3769
3856
  if (resolved != null) {
3770
3857
  if (path2.endsWith(".css")) {
3771
3858
  injectGlobal(String(resolved));
3772
- return;
3859
+ module2.code = String(resolved);
3860
+ module2.loaded = true;
3861
+ return void 0;
3773
3862
  }
3774
3863
  return run(String(resolved), path2, {
3775
3864
  isInline: false,
@@ -3785,8 +3874,10 @@ function require2(path2) {
3785
3874
  }
3786
3875
  if (request.status >= 200 && request.status < 300) {
3787
3876
  if (path2.endsWith(".css")) {
3788
- injectGlobal(request.responseText);
3789
- return;
3877
+ module2.code = request.responseText;
3878
+ injectGlobal(module2.code);
3879
+ module2.loaded = true;
3880
+ return void 0;
3790
3881
  }
3791
3882
  return run(request.responseText, path2, {
3792
3883
  isInline: false,
@@ -3794,7 +3885,9 @@ function require2(path2) {
3794
3885
  });
3795
3886
  }
3796
3887
  throw report(
3797
- new Error(`Unable to load ${path2}: HTTP ${request.status || 0}`),
3888
+ new Error(
3889
+ `Unable to load ${path2}: HTTP ${request.status || 0}`
3890
+ ),
3798
3891
  path2
3799
3892
  );
3800
3893
  }
@@ -3823,8 +3916,12 @@ function lazy(factory) {
3823
3916
  status = "success";
3824
3917
  }
3825
3918
  function LazyComponent(props) {
3826
- if (status === "pending") throw result2;
3827
- if (status === "error") throw result2;
3919
+ if (status === "pending") {
3920
+ throw result2;
3921
+ }
3922
+ if (status === "error") {
3923
+ throw result2;
3924
+ }
3828
3925
  const Component2 = result2;
3829
3926
  return createComponent(Component2, { ...props });
3830
3927
  }
@@ -3840,8 +3937,11 @@ function scriptTags() {
3840
3937
  }
3841
3938
  async function runScripts() {
3842
3939
  for (const script of scriptTags()) {
3843
- if (script.src) await require2(script.src);
3844
- if (script.content) run(script.content);
3940
+ if (script.src) {
3941
+ await require2(script.src);
3942
+ } else if (script.content) {
3943
+ run(script.content);
3944
+ }
3845
3945
  }
3846
3946
  }
3847
3947
 
@@ -4671,47 +4771,47 @@ function globalErrorHandler(eventOrError) {
4671
4771
  error2.lineNumber
4672
4772
  );
4673
4773
  const className = css(`
4674
- background: linear-gradient(135deg, #fff2f2d4, #ffffffd4);
4675
- backdrop-filter: blur(10px);
4676
- border: 1px solid rgba(255,255,255,.25);
4677
- border-radius: 5px;
4678
- box-shadow: 0 10px 30px rgba(0,0,0,.35);
4679
- overflow: hidden;
4680
- min-width: 400px;
4681
- width: 66%;
4774
+ background: linear-gradient(135deg, #fff2f2d4, #ffffffd4);
4775
+ backdrop-filter: blur(10px);
4776
+ border: 1px solid rgba(255,255,255,.25);
4777
+ border-radius: 5px;
4778
+ box-shadow: 0 10px 30px rgba(0,0,0,.35);
4779
+ overflow: hidden;
4780
+ min-width: 400px;
4781
+ width: 66%;
4682
4782
 
4683
- red {
4684
- color: #d00;
4685
- }
4783
+ red {
4784
+ color: #d00;
4785
+ }
4686
4786
 
4687
- code {
4688
- border: 1px solid #0003;
4689
- overflow: auto;
4690
- padding: 10px;
4691
- display: block;
4692
- }
4693
- `);
4787
+ code {
4788
+ border: 1px solid #0003;
4789
+ overflow: auto;
4790
+ padding: 10px;
4791
+ display: block;
4792
+ }
4793
+ `);
4694
4794
  const dialog = document.createElement("dialog");
4695
4795
  dialog.className = className;
4696
4796
  const location = error2.fileName ? `At ${escapeHtml(error2.fileName)}` : "";
4697
4797
  const line2 = Number.isFinite(error2.lineNumber) ? `: Line ${error2.lineNumber + 1}` : "";
4698
4798
  const componentStack = ((_a = error2._error) == null ? void 0 : _a.componentStackLog) || ((_b = error2._error) == null ? void 0 : _b.componentStack) || "";
4699
4799
  dialog.innerHTML = `
4700
- <h3><red>Error!</red></h3>
4701
- <b>${location}${line2}</b><br><br>
4702
- <b>${escapeHtml(error2.name)}</b>:
4703
- <span>${escapeHtml(error2.message)}</span>
4704
- <br><br>
4800
+ <h3><red>Error!</red></h3>
4801
+ <b>${location}${line2}</b><br><br>
4802
+ <b>${escapeHtml(error2.name)}</b>:
4803
+ <span>${escapeHtml(error2.message)}</span>
4804
+ <br><br>
4705
4805
 
4706
- ${excerpt ? "<code><pre></pre><red><pre></pre></red><pre></pre></code>" : ""}
4806
+ ${excerpt ? "<code><pre></pre><red><pre></pre></red><pre></pre></code>" : ""}
4707
4807
 
4708
- ${componentStack ? `
4709
- <br>
4710
- Component Stack:
4711
- <br>
4712
- <code><pre>${escapeHtml(componentStack)}</pre></code>
4713
- ` : ""}
4714
- `;
4808
+ ${componentStack ? `
4809
+ <br>
4810
+ Component Stack:
4811
+ <br>
4812
+ <code><pre>${escapeHtml(componentStack)}</pre></code>
4813
+ ` : ""}
4814
+ `;
4715
4815
  if (excerpt) {
4716
4816
  const pre = dialog.querySelectorAll("pre");
4717
4817
  pre[0].innerText = excerpt.before;