@wsxjs/wsx-core 0.0.17 → 0.0.18
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/LICENSE +2 -2
- package/dist/chunk-7AUYPTR5.mjs +277 -0
- package/dist/chunk-7WRSZQC3.mjs +256 -0
- package/dist/chunk-CBCT3PYF.mjs +250 -0
- package/dist/chunk-G23NXAPQ.mjs +237 -0
- package/dist/chunk-GOIGP2BR.mjs +271 -0
- package/dist/chunk-H6LR3P4O.mjs +256 -0
- package/dist/chunk-JV57DWHH.mjs +265 -0
- package/dist/chunk-UH5BDYGI.mjs +283 -0
- package/dist/index.js +170 -71
- package/dist/index.mjs +113 -69
- package/dist/jsx-runtime.js +56 -2
- package/dist/jsx-runtime.mjs +1 -1
- package/dist/jsx.js +56 -2
- package/dist/jsx.mjs +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -0
- package/package.json +15 -2
- package/src/base-component.ts +60 -11
- package/src/index.ts +3 -2
- package/src/jsx-factory.ts +80 -2
- package/src/light-component.ts +93 -28
- package/src/utils/dom-utils.ts +48 -0
- package/src/utils/logger.ts +2 -2
- package/src/utils/reactive.ts +1 -1
- package/src/web-component.ts +37 -22
- package/types/index.d.ts +6 -3
package/dist/index.mjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import {
|
|
2
2
|
Fragment,
|
|
3
3
|
h
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-UH5BDYGI.mjs";
|
|
5
5
|
|
|
6
6
|
// src/styles/style-manager.ts
|
|
7
7
|
var StyleManager = class {
|
|
@@ -43,48 +43,9 @@ var StyleManager = class {
|
|
|
43
43
|
};
|
|
44
44
|
StyleManager.styleSheets = /* @__PURE__ */ new Map();
|
|
45
45
|
|
|
46
|
-
// src/utils/logger.ts
|
|
47
|
-
var WSXLogger = class {
|
|
48
|
-
constructor(prefix = "[WSX]", enabled = true, level = "info") {
|
|
49
|
-
this.prefix = prefix;
|
|
50
|
-
this.enabled = enabled;
|
|
51
|
-
this.level = level;
|
|
52
|
-
}
|
|
53
|
-
shouldLog(level) {
|
|
54
|
-
if (!this.enabled) return false;
|
|
55
|
-
const levels = ["debug", "info", "warn", "error"];
|
|
56
|
-
const currentLevelIndex = levels.indexOf(this.level);
|
|
57
|
-
const messageLevelIndex = levels.indexOf(level);
|
|
58
|
-
return messageLevelIndex >= currentLevelIndex;
|
|
59
|
-
}
|
|
60
|
-
debug(message, ...args) {
|
|
61
|
-
if (this.shouldLog("debug")) {
|
|
62
|
-
console.debug(`${this.prefix} ${message}`, ...args);
|
|
63
|
-
}
|
|
64
|
-
}
|
|
65
|
-
info(message, ...args) {
|
|
66
|
-
if (this.shouldLog("info")) {
|
|
67
|
-
console.info(`${this.prefix} ${message}`, ...args);
|
|
68
|
-
}
|
|
69
|
-
}
|
|
70
|
-
warn(message, ...args) {
|
|
71
|
-
if (this.shouldLog("warn")) {
|
|
72
|
-
console.warn(`${this.prefix} ${message}`, ...args);
|
|
73
|
-
}
|
|
74
|
-
}
|
|
75
|
-
error(message, ...args) {
|
|
76
|
-
if (this.shouldLog("error")) {
|
|
77
|
-
console.error(`${this.prefix} ${message}`, ...args);
|
|
78
|
-
}
|
|
79
|
-
}
|
|
80
|
-
};
|
|
81
|
-
var logger = new WSXLogger();
|
|
82
|
-
function createLogger(componentName) {
|
|
83
|
-
return new WSXLogger(`[WSX:${componentName}]`);
|
|
84
|
-
}
|
|
85
|
-
|
|
86
46
|
// src/utils/reactive.ts
|
|
87
|
-
|
|
47
|
+
import { createLogger } from "@wsxjs/wsx-logger";
|
|
48
|
+
var logger = createLogger("ReactiveSystem");
|
|
88
49
|
var UpdateScheduler = class {
|
|
89
50
|
constructor() {
|
|
90
51
|
this.pendingCallbacks = /* @__PURE__ */ new Set();
|
|
@@ -113,7 +74,7 @@ var UpdateScheduler = class {
|
|
|
113
74
|
try {
|
|
114
75
|
callback();
|
|
115
76
|
} catch (error) {
|
|
116
|
-
|
|
77
|
+
logger.error("[WSX Reactive] Error in callback:", error);
|
|
117
78
|
}
|
|
118
79
|
});
|
|
119
80
|
}
|
|
@@ -255,7 +216,7 @@ var ReactiveDebug = {
|
|
|
255
216
|
*/
|
|
256
217
|
log(message, ...args) {
|
|
257
218
|
if (this.isEnabled()) {
|
|
258
|
-
|
|
219
|
+
logger.info(`[WSX Reactive] ${message}`, ...args);
|
|
259
220
|
}
|
|
260
221
|
}
|
|
261
222
|
};
|
|
@@ -325,6 +286,11 @@ var BaseComponent = class extends HTMLElement {
|
|
|
325
286
|
* @internal
|
|
326
287
|
*/
|
|
327
288
|
this._pendingRerender = false;
|
|
289
|
+
/**
|
|
290
|
+
* 正在渲染标志(防止在 _rerender() 执行期间再次触发 scheduleRerender())
|
|
291
|
+
* @internal
|
|
292
|
+
*/
|
|
293
|
+
this._isRendering = false;
|
|
328
294
|
/**
|
|
329
295
|
* 处理 blur 事件,在用户停止输入时执行待处理的重渲染
|
|
330
296
|
* @internal
|
|
@@ -339,9 +305,10 @@ var BaseComponent = class extends HTMLElement {
|
|
|
339
305
|
this._rerenderDebounceTimer = null;
|
|
340
306
|
}
|
|
341
307
|
requestAnimationFrame(() => {
|
|
342
|
-
if (this._pendingRerender && this.connected) {
|
|
308
|
+
if (this._pendingRerender && this.connected && !this._isRendering) {
|
|
343
309
|
this._pendingRerender = false;
|
|
344
|
-
this.
|
|
310
|
+
this._isRendering = true;
|
|
311
|
+
this._rerender();
|
|
345
312
|
}
|
|
346
313
|
});
|
|
347
314
|
}
|
|
@@ -420,6 +387,9 @@ var BaseComponent = class extends HTMLElement {
|
|
|
420
387
|
}
|
|
421
388
|
return;
|
|
422
389
|
}
|
|
390
|
+
if (this._isRendering) {
|
|
391
|
+
return;
|
|
392
|
+
}
|
|
423
393
|
const root = this.getActiveRoot();
|
|
424
394
|
let activeElement = null;
|
|
425
395
|
if (root instanceof ShadowRoot) {
|
|
@@ -445,12 +415,27 @@ var BaseComponent = class extends HTMLElement {
|
|
|
445
415
|
if (this._pendingRerender) {
|
|
446
416
|
this._pendingRerender = false;
|
|
447
417
|
}
|
|
448
|
-
|
|
449
|
-
if (this.connected) {
|
|
450
|
-
this.
|
|
418
|
+
requestAnimationFrame(() => {
|
|
419
|
+
if (this.connected && !this._isRendering) {
|
|
420
|
+
this._isRendering = true;
|
|
421
|
+
this._rerender();
|
|
422
|
+
} else if (!this.connected) {
|
|
423
|
+
this._isRendering = false;
|
|
451
424
|
}
|
|
452
425
|
});
|
|
453
426
|
}
|
|
427
|
+
/**
|
|
428
|
+
* 调度重渲染(公开 API)
|
|
429
|
+
*
|
|
430
|
+
* 与 scheduleRerender() 对齐:所有重渲染都通过统一的调度机制
|
|
431
|
+
* 使用异步调度机制,自动处理防抖和批量更新
|
|
432
|
+
*
|
|
433
|
+
* 注意:此方法现在是异步的,使用调度机制
|
|
434
|
+
* 如果需要同步执行,使用 _rerender()(不推荐,仅内部使用)
|
|
435
|
+
*/
|
|
436
|
+
rerender() {
|
|
437
|
+
this.scheduleRerender();
|
|
438
|
+
}
|
|
454
439
|
/**
|
|
455
440
|
* 清理资源(在组件断开连接时调用)
|
|
456
441
|
* @internal
|
|
@@ -656,7 +641,8 @@ var BaseComponent = class extends HTMLElement {
|
|
|
656
641
|
};
|
|
657
642
|
|
|
658
643
|
// src/web-component.ts
|
|
659
|
-
|
|
644
|
+
import { createLogger as createLogger2 } from "@wsxjs/wsx-logger";
|
|
645
|
+
var logger2 = createLogger2("WebComponent");
|
|
660
646
|
var WebComponent = class extends BaseComponent {
|
|
661
647
|
// Initialized by BaseComponent constructor
|
|
662
648
|
constructor(config = {}) {
|
|
@@ -699,8 +685,13 @@ var WebComponent = class extends BaseComponent {
|
|
|
699
685
|
}
|
|
700
686
|
this.initializeEventListeners();
|
|
701
687
|
this.onConnected?.();
|
|
688
|
+
if (hasActualContent === false || hasErrorElement) {
|
|
689
|
+
requestAnimationFrame(() => {
|
|
690
|
+
this.onRendered?.();
|
|
691
|
+
});
|
|
692
|
+
}
|
|
702
693
|
} catch (error) {
|
|
703
|
-
|
|
694
|
+
logger2.error(`Error in connectedCallback:`, error);
|
|
704
695
|
this.renderError(error);
|
|
705
696
|
}
|
|
706
697
|
}
|
|
@@ -731,11 +722,15 @@ var WebComponent = class extends BaseComponent {
|
|
|
731
722
|
return this.shadowRoot.querySelectorAll(selector);
|
|
732
723
|
}
|
|
733
724
|
/**
|
|
734
|
-
*
|
|
725
|
+
* 内部重渲染实现
|
|
726
|
+
* 包含从 rerender() 方法迁移的实际渲染逻辑
|
|
727
|
+
* WebComponent 使用 Shadow DOM,不存在 JSX children 问题
|
|
728
|
+
*
|
|
729
|
+
* @override
|
|
735
730
|
*/
|
|
736
|
-
|
|
731
|
+
_rerender() {
|
|
737
732
|
if (!this.connected) {
|
|
738
|
-
|
|
733
|
+
this._isRendering = false;
|
|
739
734
|
return;
|
|
740
735
|
}
|
|
741
736
|
const focusState = this.captureFocusState();
|
|
@@ -772,11 +767,14 @@ var WebComponent = class extends BaseComponent {
|
|
|
772
767
|
requestAnimationFrame(() => {
|
|
773
768
|
this.restoreFocusState(focusState);
|
|
774
769
|
this._pendingFocusState = null;
|
|
770
|
+
this.onRendered?.();
|
|
771
|
+
this._isRendering = false;
|
|
775
772
|
});
|
|
776
773
|
});
|
|
777
774
|
} catch (error) {
|
|
778
|
-
|
|
775
|
+
logger2.error("Error in _rerender:", error);
|
|
779
776
|
this.renderError(error);
|
|
777
|
+
this._isRendering = false;
|
|
780
778
|
}
|
|
781
779
|
}
|
|
782
780
|
/**
|
|
@@ -801,7 +799,8 @@ var WebComponent = class extends BaseComponent {
|
|
|
801
799
|
};
|
|
802
800
|
|
|
803
801
|
// src/light-component.ts
|
|
804
|
-
|
|
802
|
+
import { createLogger as createLogger3 } from "@wsxjs/wsx-logger";
|
|
803
|
+
var logger3 = createLogger3("LightComponent");
|
|
805
804
|
var LightComponent = class extends BaseComponent {
|
|
806
805
|
// Initialized by BaseComponent constructor
|
|
807
806
|
constructor(config = {}) {
|
|
@@ -831,9 +830,10 @@ var LightComponent = class extends BaseComponent {
|
|
|
831
830
|
(child) => child instanceof HTMLElement && child !== styleElement && child.style.color === "red" && child.textContent?.includes("Component Error")
|
|
832
831
|
);
|
|
833
832
|
const hasActualContent = Array.from(this.children).some(
|
|
834
|
-
(child) => child !== styleElement
|
|
833
|
+
(child) => child !== styleElement && !(child instanceof HTMLSlotElement)
|
|
835
834
|
);
|
|
836
835
|
if (hasActualContent && !hasErrorElement) {
|
|
836
|
+
this.markJSXChildren();
|
|
837
837
|
if (styleElement && styleElement !== this.firstChild) {
|
|
838
838
|
this.insertBefore(styleElement, this.firstChild);
|
|
839
839
|
}
|
|
@@ -850,8 +850,13 @@ var LightComponent = class extends BaseComponent {
|
|
|
850
850
|
}
|
|
851
851
|
this.initializeEventListeners();
|
|
852
852
|
this.onConnected?.();
|
|
853
|
+
if (hasActualContent === false || hasErrorElement) {
|
|
854
|
+
requestAnimationFrame(() => {
|
|
855
|
+
this.onRendered?.();
|
|
856
|
+
});
|
|
857
|
+
}
|
|
853
858
|
} catch (error) {
|
|
854
|
-
|
|
859
|
+
logger3.error(`[${this.constructor.name}] Error in connectedCallback:`, error);
|
|
855
860
|
this.renderError(error);
|
|
856
861
|
}
|
|
857
862
|
}
|
|
@@ -884,17 +889,20 @@ var LightComponent = class extends BaseComponent {
|
|
|
884
889
|
return HTMLElement.prototype.querySelectorAll.call(this, selector);
|
|
885
890
|
}
|
|
886
891
|
/**
|
|
887
|
-
*
|
|
892
|
+
* 内部重渲染实现
|
|
893
|
+
* 包含从 rerender() 方法迁移的实际渲染逻辑
|
|
894
|
+
* 处理 JSX children 的保留(Light DOM 特有)
|
|
895
|
+
*
|
|
896
|
+
* @override
|
|
888
897
|
*/
|
|
889
|
-
|
|
898
|
+
_rerender() {
|
|
890
899
|
if (!this.connected) {
|
|
891
|
-
|
|
892
|
-
`[${this.constructor.name}] Component is not connected, skipping rerender.`
|
|
893
|
-
);
|
|
900
|
+
this._isRendering = false;
|
|
894
901
|
return;
|
|
895
902
|
}
|
|
896
903
|
const focusState = this.captureFocusState();
|
|
897
904
|
this._pendingFocusState = focusState;
|
|
905
|
+
const jsxChildren = this.getJSXChildren();
|
|
898
906
|
try {
|
|
899
907
|
const content = this.render();
|
|
900
908
|
if (focusState && focusState.key && focusState.value !== void 0) {
|
|
@@ -908,8 +916,8 @@ var LightComponent = class extends BaseComponent {
|
|
|
908
916
|
}
|
|
909
917
|
}
|
|
910
918
|
const stylesToApply = this._autoStyles || this.config.styles;
|
|
919
|
+
const styleName = this.config.styleName || this.constructor.name;
|
|
911
920
|
if (stylesToApply) {
|
|
912
|
-
const styleName = this.config.styleName || this.constructor.name;
|
|
913
921
|
let styleElement = this.querySelector(
|
|
914
922
|
`style[data-wsx-light-component="${styleName}"]`
|
|
915
923
|
);
|
|
@@ -928,7 +936,10 @@ var LightComponent = class extends BaseComponent {
|
|
|
928
936
|
if (child === content) {
|
|
929
937
|
return false;
|
|
930
938
|
}
|
|
931
|
-
if (stylesToApply && child instanceof HTMLStyleElement && child.getAttribute("data-wsx-light-component") ===
|
|
939
|
+
if (stylesToApply && child instanceof HTMLStyleElement && child.getAttribute("data-wsx-light-component") === styleName) {
|
|
940
|
+
return false;
|
|
941
|
+
}
|
|
942
|
+
if (child instanceof HTMLElement && jsxChildren.includes(child)) {
|
|
932
943
|
return false;
|
|
933
944
|
}
|
|
934
945
|
return true;
|
|
@@ -936,7 +947,7 @@ var LightComponent = class extends BaseComponent {
|
|
|
936
947
|
oldChildren.forEach((child) => child.remove());
|
|
937
948
|
if (stylesToApply && this.children.length > 1) {
|
|
938
949
|
const styleElement = this.querySelector(
|
|
939
|
-
`style[data-wsx-light-component="${
|
|
950
|
+
`style[data-wsx-light-component="${styleName}"]`
|
|
940
951
|
);
|
|
941
952
|
if (styleElement && styleElement !== this.firstChild) {
|
|
942
953
|
this.insertBefore(styleElement, this.firstChild);
|
|
@@ -945,13 +956,42 @@ var LightComponent = class extends BaseComponent {
|
|
|
945
956
|
requestAnimationFrame(() => {
|
|
946
957
|
this.restoreFocusState(focusState);
|
|
947
958
|
this._pendingFocusState = null;
|
|
959
|
+
this.onRendered?.();
|
|
960
|
+
this._isRendering = false;
|
|
948
961
|
});
|
|
949
962
|
});
|
|
950
963
|
} catch (error) {
|
|
951
|
-
|
|
964
|
+
logger3.error(`[${this.constructor.name}] Error in _rerender:`, error);
|
|
952
965
|
this.renderError(error);
|
|
966
|
+
this._isRendering = false;
|
|
953
967
|
}
|
|
954
968
|
}
|
|
969
|
+
/**
|
|
970
|
+
* 获取 JSX children(通过 JSX factory 直接添加的 children)
|
|
971
|
+
*
|
|
972
|
+
* 在 Light DOM 中,JSX children 是通过 JSX factory 直接添加到组件元素的
|
|
973
|
+
* 这些 children 不是 render() 返回的内容,应该保留
|
|
974
|
+
*/
|
|
975
|
+
getJSXChildren() {
|
|
976
|
+
const jsxChildren = Array.from(this.children).filter(
|
|
977
|
+
(child) => child instanceof HTMLElement && child.getAttribute("data-wsx-jsx-child") === "true"
|
|
978
|
+
).map((child) => child);
|
|
979
|
+
return jsxChildren;
|
|
980
|
+
}
|
|
981
|
+
/**
|
|
982
|
+
* 标记 JSX children(在 connectedCallback 中调用)
|
|
983
|
+
*/
|
|
984
|
+
markJSXChildren() {
|
|
985
|
+
const styleName = this.config.styleName || this.constructor.name;
|
|
986
|
+
const styleElement = this.querySelector(
|
|
987
|
+
`style[data-wsx-light-component="${styleName}"]`
|
|
988
|
+
);
|
|
989
|
+
Array.from(this.children).forEach((child) => {
|
|
990
|
+
if (child instanceof HTMLElement && child !== styleElement && !(child instanceof HTMLSlotElement)) {
|
|
991
|
+
child.setAttribute("data-wsx-jsx-child", "true");
|
|
992
|
+
}
|
|
993
|
+
});
|
|
994
|
+
}
|
|
955
995
|
/**
|
|
956
996
|
* 渲染错误信息
|
|
957
997
|
*
|
|
@@ -1021,6 +1061,9 @@ function deriveTagName(className, prefix) {
|
|
|
1021
1061
|
return prefix ? `${prefix}${kebabCase}` : kebabCase;
|
|
1022
1062
|
}
|
|
1023
1063
|
|
|
1064
|
+
// src/index.ts
|
|
1065
|
+
import { WSXLogger, logger as logger4, createLogger as createLogger4, createLoggerWithConfig } from "@wsxjs/wsx-logger";
|
|
1066
|
+
|
|
1024
1067
|
// src/reactive-decorator.ts
|
|
1025
1068
|
function createBabelPluginError(propertyName) {
|
|
1026
1069
|
return `@state decorator on property "${propertyName}" MUST be processed by Babel plugin at compile time. It appears the Babel plugin is not configured in your build setup.
|
|
@@ -1100,11 +1143,12 @@ export {
|
|
|
1100
1143
|
WSXLogger,
|
|
1101
1144
|
WebComponent,
|
|
1102
1145
|
autoRegister,
|
|
1103
|
-
createLogger,
|
|
1146
|
+
createLogger4 as createLogger,
|
|
1147
|
+
createLoggerWithConfig,
|
|
1104
1148
|
h,
|
|
1105
1149
|
h as jsx,
|
|
1106
1150
|
h as jsxs,
|
|
1107
|
-
logger,
|
|
1151
|
+
logger4 as logger,
|
|
1108
1152
|
registerComponent,
|
|
1109
1153
|
state
|
|
1110
1154
|
};
|
package/dist/jsx-runtime.js
CHANGED
|
@@ -138,6 +138,20 @@ function getSVGAttributeName(attributeName) {
|
|
|
138
138
|
return SVG_ATTRIBUTE_MAP.get(attributeName) || attributeName;
|
|
139
139
|
}
|
|
140
140
|
|
|
141
|
+
// src/utils/dom-utils.ts
|
|
142
|
+
function parseHTMLToNodes(html) {
|
|
143
|
+
if (!html) return [];
|
|
144
|
+
const temp = document.createElement("div");
|
|
145
|
+
temp.innerHTML = html;
|
|
146
|
+
return Array.from(temp.childNodes).map((node) => {
|
|
147
|
+
if (node instanceof HTMLElement || node instanceof SVGElement) {
|
|
148
|
+
return node;
|
|
149
|
+
} else {
|
|
150
|
+
return node.textContent || "";
|
|
151
|
+
}
|
|
152
|
+
});
|
|
153
|
+
}
|
|
154
|
+
|
|
141
155
|
// src/jsx-factory.ts
|
|
142
156
|
function h(tag, props = {}, ...children) {
|
|
143
157
|
if (typeof tag === "function") {
|
|
@@ -195,13 +209,53 @@ function h(tag, props = {}, ...children) {
|
|
|
195
209
|
});
|
|
196
210
|
return element;
|
|
197
211
|
}
|
|
198
|
-
function
|
|
212
|
+
function isHTMLString(str) {
|
|
213
|
+
const trimmed = str.trim();
|
|
214
|
+
if (!trimmed) return false;
|
|
215
|
+
const htmlTagPattern = /<[a-z][a-z0-9]*(\s[^>]*)?(\/>|>)/i;
|
|
216
|
+
const looksLikeMath = /^[^<]*<[^>]*>[^>]*$/.test(trimmed) && !htmlTagPattern.test(trimmed);
|
|
217
|
+
if (looksLikeMath) return false;
|
|
218
|
+
return htmlTagPattern.test(trimmed);
|
|
219
|
+
}
|
|
220
|
+
function flattenChildren(children, skipHTMLDetection = false, depth = 0) {
|
|
221
|
+
if (depth > 10) {
|
|
222
|
+
console.warn(
|
|
223
|
+
"[WSX] flattenChildren: Maximum depth exceeded, treating remaining children as text"
|
|
224
|
+
);
|
|
225
|
+
return children.filter(
|
|
226
|
+
(child) => typeof child === "string" || typeof child === "number"
|
|
227
|
+
);
|
|
228
|
+
}
|
|
199
229
|
const result = [];
|
|
200
230
|
for (const child of children) {
|
|
201
231
|
if (child === null || child === void 0 || child === false) {
|
|
202
232
|
continue;
|
|
203
233
|
} else if (Array.isArray(child)) {
|
|
204
|
-
result.push(...flattenChildren(child));
|
|
234
|
+
result.push(...flattenChildren(child, skipHTMLDetection, depth + 1));
|
|
235
|
+
} else if (typeof child === "string") {
|
|
236
|
+
if (skipHTMLDetection) {
|
|
237
|
+
result.push(child);
|
|
238
|
+
} else if (isHTMLString(child)) {
|
|
239
|
+
try {
|
|
240
|
+
const nodes = parseHTMLToNodes(child);
|
|
241
|
+
if (nodes.length > 0) {
|
|
242
|
+
for (const node of nodes) {
|
|
243
|
+
if (typeof node === "string") {
|
|
244
|
+
result.push(node);
|
|
245
|
+
} else {
|
|
246
|
+
result.push(node);
|
|
247
|
+
}
|
|
248
|
+
}
|
|
249
|
+
} else {
|
|
250
|
+
result.push(child);
|
|
251
|
+
}
|
|
252
|
+
} catch (error) {
|
|
253
|
+
console.warn("[WSX] Failed to parse HTML string, treating as text:", error);
|
|
254
|
+
result.push(child);
|
|
255
|
+
}
|
|
256
|
+
} else {
|
|
257
|
+
result.push(child);
|
|
258
|
+
}
|
|
205
259
|
} else {
|
|
206
260
|
result.push(child);
|
|
207
261
|
}
|
package/dist/jsx-runtime.mjs
CHANGED
package/dist/jsx.js
CHANGED
|
@@ -137,6 +137,20 @@ function getSVGAttributeName(attributeName) {
|
|
|
137
137
|
return SVG_ATTRIBUTE_MAP.get(attributeName) || attributeName;
|
|
138
138
|
}
|
|
139
139
|
|
|
140
|
+
// src/utils/dom-utils.ts
|
|
141
|
+
function parseHTMLToNodes(html) {
|
|
142
|
+
if (!html) return [];
|
|
143
|
+
const temp = document.createElement("div");
|
|
144
|
+
temp.innerHTML = html;
|
|
145
|
+
return Array.from(temp.childNodes).map((node) => {
|
|
146
|
+
if (node instanceof HTMLElement || node instanceof SVGElement) {
|
|
147
|
+
return node;
|
|
148
|
+
} else {
|
|
149
|
+
return node.textContent || "";
|
|
150
|
+
}
|
|
151
|
+
});
|
|
152
|
+
}
|
|
153
|
+
|
|
140
154
|
// src/jsx-factory.ts
|
|
141
155
|
function h(tag, props = {}, ...children) {
|
|
142
156
|
if (typeof tag === "function") {
|
|
@@ -194,13 +208,53 @@ function h(tag, props = {}, ...children) {
|
|
|
194
208
|
});
|
|
195
209
|
return element;
|
|
196
210
|
}
|
|
197
|
-
function
|
|
211
|
+
function isHTMLString(str) {
|
|
212
|
+
const trimmed = str.trim();
|
|
213
|
+
if (!trimmed) return false;
|
|
214
|
+
const htmlTagPattern = /<[a-z][a-z0-9]*(\s[^>]*)?(\/>|>)/i;
|
|
215
|
+
const looksLikeMath = /^[^<]*<[^>]*>[^>]*$/.test(trimmed) && !htmlTagPattern.test(trimmed);
|
|
216
|
+
if (looksLikeMath) return false;
|
|
217
|
+
return htmlTagPattern.test(trimmed);
|
|
218
|
+
}
|
|
219
|
+
function flattenChildren(children, skipHTMLDetection = false, depth = 0) {
|
|
220
|
+
if (depth > 10) {
|
|
221
|
+
console.warn(
|
|
222
|
+
"[WSX] flattenChildren: Maximum depth exceeded, treating remaining children as text"
|
|
223
|
+
);
|
|
224
|
+
return children.filter(
|
|
225
|
+
(child) => typeof child === "string" || typeof child === "number"
|
|
226
|
+
);
|
|
227
|
+
}
|
|
198
228
|
const result = [];
|
|
199
229
|
for (const child of children) {
|
|
200
230
|
if (child === null || child === void 0 || child === false) {
|
|
201
231
|
continue;
|
|
202
232
|
} else if (Array.isArray(child)) {
|
|
203
|
-
result.push(...flattenChildren(child));
|
|
233
|
+
result.push(...flattenChildren(child, skipHTMLDetection, depth + 1));
|
|
234
|
+
} else if (typeof child === "string") {
|
|
235
|
+
if (skipHTMLDetection) {
|
|
236
|
+
result.push(child);
|
|
237
|
+
} else if (isHTMLString(child)) {
|
|
238
|
+
try {
|
|
239
|
+
const nodes = parseHTMLToNodes(child);
|
|
240
|
+
if (nodes.length > 0) {
|
|
241
|
+
for (const node of nodes) {
|
|
242
|
+
if (typeof node === "string") {
|
|
243
|
+
result.push(node);
|
|
244
|
+
} else {
|
|
245
|
+
result.push(node);
|
|
246
|
+
}
|
|
247
|
+
}
|
|
248
|
+
} else {
|
|
249
|
+
result.push(child);
|
|
250
|
+
}
|
|
251
|
+
} catch (error) {
|
|
252
|
+
console.warn("[WSX] Failed to parse HTML string, treating as text:", error);
|
|
253
|
+
result.push(child);
|
|
254
|
+
}
|
|
255
|
+
} else {
|
|
256
|
+
result.push(child);
|
|
257
|
+
}
|
|
204
258
|
} else {
|
|
205
259
|
result.push(child);
|
|
206
260
|
}
|
package/dist/jsx.mjs
CHANGED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"fileNames":["../../../node_modules/.pnpm/typescript@5.8.3/node_modules/typescript/lib/lib.es5.d.ts","../../../node_modules/.pnpm/typescript@5.8.3/node_modules/typescript/lib/lib.es2015.d.ts","../../../node_modules/.pnpm/typescript@5.8.3/node_modules/typescript/lib/lib.es2016.d.ts","../../../node_modules/.pnpm/typescript@5.8.3/node_modules/typescript/lib/lib.es2017.d.ts","../../../node_modules/.pnpm/typescript@5.8.3/node_modules/typescript/lib/lib.es2018.d.ts","../../../node_modules/.pnpm/typescript@5.8.3/node_modules/typescript/lib/lib.es2019.d.ts","../../../node_modules/.pnpm/typescript@5.8.3/node_modules/typescript/lib/lib.es2020.d.ts","../../../node_modules/.pnpm/typescript@5.8.3/node_modules/typescript/lib/lib.dom.d.ts","../../../node_modules/.pnpm/typescript@5.8.3/node_modules/typescript/lib/lib.dom.iterable.d.ts","../../../node_modules/.pnpm/typescript@5.8.3/node_modules/typescript/lib/lib.es2015.core.d.ts","../../../node_modules/.pnpm/typescript@5.8.3/node_modules/typescript/lib/lib.es2015.collection.d.ts","../../../node_modules/.pnpm/typescript@5.8.3/node_modules/typescript/lib/lib.es2015.generator.d.ts","../../../node_modules/.pnpm/typescript@5.8.3/node_modules/typescript/lib/lib.es2015.iterable.d.ts","../../../node_modules/.pnpm/typescript@5.8.3/node_modules/typescript/lib/lib.es2015.promise.d.ts","../../../node_modules/.pnpm/typescript@5.8.3/node_modules/typescript/lib/lib.es2015.proxy.d.ts","../../../node_modules/.pnpm/typescript@5.8.3/node_modules/typescript/lib/lib.es2015.reflect.d.ts","../../../node_modules/.pnpm/typescript@5.8.3/node_modules/typescript/lib/lib.es2015.symbol.d.ts","../../../node_modules/.pnpm/typescript@5.8.3/node_modules/typescript/lib/lib.es2015.symbol.wellknown.d.ts","../../../node_modules/.pnpm/typescript@5.8.3/node_modules/typescript/lib/lib.es2016.array.include.d.ts","../../../node_modules/.pnpm/typescript@5.8.3/node_modules/typescript/lib/lib.es2016.intl.d.ts","../../../node_modules/.pnpm/typescript@5.8.3/node_modules/typescript/lib/lib.es2017.arraybuffer.d.ts","../../../node_modules/.pnpm/typescript@5.8.3/node_modules/typescript/lib/lib.es2017.date.d.ts","../../../node_modules/.pnpm/typescript@5.8.3/node_modules/typescript/lib/lib.es2017.object.d.ts","../../../node_modules/.pnpm/typescript@5.8.3/node_modules/typescript/lib/lib.es2017.sharedmemory.d.ts","../../../node_modules/.pnpm/typescript@5.8.3/node_modules/typescript/lib/lib.es2017.string.d.ts","../../../node_modules/.pnpm/typescript@5.8.3/node_modules/typescript/lib/lib.es2017.intl.d.ts","../../../node_modules/.pnpm/typescript@5.8.3/node_modules/typescript/lib/lib.es2017.typedarrays.d.ts","../../../node_modules/.pnpm/typescript@5.8.3/node_modules/typescript/lib/lib.es2018.asyncgenerator.d.ts","../../../node_modules/.pnpm/typescript@5.8.3/node_modules/typescript/lib/lib.es2018.asynciterable.d.ts","../../../node_modules/.pnpm/typescript@5.8.3/node_modules/typescript/lib/lib.es2018.intl.d.ts","../../../node_modules/.pnpm/typescript@5.8.3/node_modules/typescript/lib/lib.es2018.promise.d.ts","../../../node_modules/.pnpm/typescript@5.8.3/node_modules/typescript/lib/lib.es2018.regexp.d.ts","../../../node_modules/.pnpm/typescript@5.8.3/node_modules/typescript/lib/lib.es2019.array.d.ts","../../../node_modules/.pnpm/typescript@5.8.3/node_modules/typescript/lib/lib.es2019.object.d.ts","../../../node_modules/.pnpm/typescript@5.8.3/node_modules/typescript/lib/lib.es2019.string.d.ts","../../../node_modules/.pnpm/typescript@5.8.3/node_modules/typescript/lib/lib.es2019.symbol.d.ts","../../../node_modules/.pnpm/typescript@5.8.3/node_modules/typescript/lib/lib.es2019.intl.d.ts","../../../node_modules/.pnpm/typescript@5.8.3/node_modules/typescript/lib/lib.es2020.bigint.d.ts","../../../node_modules/.pnpm/typescript@5.8.3/node_modules/typescript/lib/lib.es2020.date.d.ts","../../../node_modules/.pnpm/typescript@5.8.3/node_modules/typescript/lib/lib.es2020.promise.d.ts","../../../node_modules/.pnpm/typescript@5.8.3/node_modules/typescript/lib/lib.es2020.sharedmemory.d.ts","../../../node_modules/.pnpm/typescript@5.8.3/node_modules/typescript/lib/lib.es2020.string.d.ts","../../../node_modules/.pnpm/typescript@5.8.3/node_modules/typescript/lib/lib.es2020.symbol.wellknown.d.ts","../../../node_modules/.pnpm/typescript@5.8.3/node_modules/typescript/lib/lib.es2020.intl.d.ts","../../../node_modules/.pnpm/typescript@5.8.3/node_modules/typescript/lib/lib.es2020.number.d.ts","../../../node_modules/.pnpm/typescript@5.8.3/node_modules/typescript/lib/lib.decorators.d.ts","../../../node_modules/.pnpm/typescript@5.8.3/node_modules/typescript/lib/lib.decorators.legacy.d.ts","../src/utils/svg-utils.ts","../src/utils/dom-utils.ts","../src/jsx-factory.ts","../src/styles/style-manager.ts","../src/utils/reactive.ts","../src/base-component.ts","../src/web-component.ts","../src/light-component.ts","../src/reactive-decorator.ts","../src/index.ts","../types/wsx-types.d.ts","../types/jsx.d.ts","../types/jsx-runtime.d.ts","../src/auto-register.ts","../src/jsx-runtime.ts","../src/jsx.ts","../src/utils/logger.ts","../__tests__/jsx-factory.test.ts","../__tests__/light-component.test.ts","../__tests__/rerender-scheduling.test.ts","../__tests__/web-component.test.ts","../../../node_modules/.pnpm/@jest+expect-utils@29.7.0/node_modules/@jest/expect-utils/build/index.d.ts","../../../node_modules/.pnpm/chalk@4.1.2/node_modules/chalk/index.d.ts","../../../node_modules/.pnpm/@sinclair+typebox@0.27.8/node_modules/@sinclair/typebox/typebox.d.ts","../../../node_modules/.pnpm/@jest+schemas@29.6.3/node_modules/@jest/schemas/build/index.d.ts","../../../node_modules/.pnpm/pretty-format@29.7.0/node_modules/pretty-format/build/index.d.ts","../../../node_modules/.pnpm/jest-diff@29.7.0/node_modules/jest-diff/build/index.d.ts","../../../node_modules/.pnpm/jest-matcher-utils@29.7.0/node_modules/jest-matcher-utils/build/index.d.ts","../../../node_modules/.pnpm/expect@29.7.0/node_modules/expect/build/index.d.ts","../../../node_modules/.pnpm/@types+jest@29.5.14/node_modules/@types/jest/index.d.ts"],"fileIdsList":[[71],[73,76],[69,75],[73],[70,74],[72],[49,50,60],[50,55,60],[50,54,55,60],[50,54,60],[60],[52,60],[50,51,52,54,55,56,60,61],[48,49,60],[50,60],[50,53,60],[50,51,53,60],[58,59],[58],[57]],"fileInfos":[{"version":"69684132aeb9b5642cbcd9e22dff7818ff0ee1aa831728af0ecf97d3364d5546","affectsGlobalScope":true,"impliedFormat":1},{"version":"45b7ab580deca34ae9729e97c13cfd999df04416a79116c3bfb483804f85ded4","impliedFormat":1},{"version":"3facaf05f0c5fc569c5649dd359892c98a85557e3e0c847964caeb67076f4d75","impliedFormat":1},{"version":"e44bb8bbac7f10ecc786703fe0a6a4b952189f908707980ba8f3c8975a760962","impliedFormat":1},{"version":"5e1c4c362065a6b95ff952c0eab010f04dcd2c3494e813b493ecfd4fcb9fc0d8","impliedFormat":1},{"version":"68d73b4a11549f9c0b7d352d10e91e5dca8faa3322bfb77b661839c42b1ddec7","impliedFormat":1},{"version":"5efce4fc3c29ea84e8928f97adec086e3dc876365e0982cc8479a07954a3efd4","impliedFormat":1},{"version":"092c2bfe125ce69dbb1223c85d68d4d2397d7d8411867b5cc03cec902c233763","affectsGlobalScope":true,"impliedFormat":1},{"version":"07f073f19d67f74d732b1adea08e1dc66b1b58d77cb5b43931dee3d798a2fd53","affectsGlobalScope":true,"impliedFormat":1},{"version":"c57796738e7f83dbc4b8e65132f11a377649c00dd3eee333f672b8f0a6bea671","affectsGlobalScope":true,"impliedFormat":1},{"version":"dc2df20b1bcdc8c2d34af4926e2c3ab15ffe1160a63e58b7e09833f616efff44","affectsGlobalScope":true,"impliedFormat":1},{"version":"515d0b7b9bea2e31ea4ec968e9edd2c39d3eebf4a2d5cbd04e88639819ae3b71","affectsGlobalScope":true,"impliedFormat":1},{"version":"0559b1f683ac7505ae451f9a96ce4c3c92bdc71411651ca6ddb0e88baaaad6a3","affectsGlobalScope":true,"impliedFormat":1},{"version":"0dc1e7ceda9b8b9b455c3a2d67b0412feab00bd2f66656cd8850e8831b08b537","affectsGlobalScope":true,"impliedFormat":1},{"version":"ce691fb9e5c64efb9547083e4a34091bcbe5bdb41027e310ebba8f7d96a98671","affectsGlobalScope":true,"impliedFormat":1},{"version":"8d697a2a929a5fcb38b7a65594020fcef05ec1630804a33748829c5ff53640d0","affectsGlobalScope":true,"impliedFormat":1},{"version":"4ff2a353abf8a80ee399af572debb8faab2d33ad38c4b4474cff7f26e7653b8d","affectsGlobalScope":true,"impliedFormat":1},{"version":"936e80ad36a2ee83fc3caf008e7c4c5afe45b3cf3d5c24408f039c1d47bdc1df","affectsGlobalScope":true,"impliedFormat":1},{"version":"d15bea3d62cbbdb9797079416b8ac375ae99162a7fba5de2c6c505446486ac0a","affectsGlobalScope":true,"impliedFormat":1},{"version":"68d18b664c9d32a7336a70235958b8997ebc1c3b8505f4f1ae2b7e7753b87618","affectsGlobalScope":true,"impliedFormat":1},{"version":"eb3d66c8327153d8fa7dd03f9c58d351107fe824c79e9b56b462935176cdf12a","affectsGlobalScope":true,"impliedFormat":1},{"version":"38f0219c9e23c915ef9790ab1d680440d95419ad264816fa15009a8851e79119","affectsGlobalScope":true,"impliedFormat":1},{"version":"69ab18c3b76cd9b1be3d188eaf8bba06112ebbe2f47f6c322b5105a6fbc45a2e","affectsGlobalScope":true,"impliedFormat":1},{"version":"fef8cfad2e2dc5f5b3d97a6f4f2e92848eb1b88e897bb7318cef0e2820bceaab","affectsGlobalScope":true,"impliedFormat":1},{"version":"2f11ff796926e0832f9ae148008138ad583bd181899ab7dd768a2666700b1893","affectsGlobalScope":true,"impliedFormat":1},{"version":"4de680d5bb41c17f7f68e0419412ca23c98d5749dcaaea1896172f06435891fc","affectsGlobalScope":true,"impliedFormat":1},{"version":"954296b30da6d508a104a3a0b5d96b76495c709785c1d11610908e63481ee667","affectsGlobalScope":true,"impliedFormat":1},{"version":"ac9538681b19688c8eae65811b329d3744af679e0bdfa5d842d0e32524c73e1c","affectsGlobalScope":true,"impliedFormat":1},{"version":"0a969edff4bd52585473d24995c5ef223f6652d6ef46193309b3921d65dd4376","affectsGlobalScope":true,"impliedFormat":1},{"version":"9e9fbd7030c440b33d021da145d3232984c8bb7916f277e8ffd3dc2e3eae2bdb","affectsGlobalScope":true,"impliedFormat":1},{"version":"811ec78f7fefcabbda4bfa93b3eb67d9ae166ef95f9bff989d964061cbf81a0c","affectsGlobalScope":true,"impliedFormat":1},{"version":"717937616a17072082152a2ef351cb51f98802fb4b2fdabd32399843875974ca","affectsGlobalScope":true,"impliedFormat":1},{"version":"d7e7d9b7b50e5f22c915b525acc5a49a7a6584cf8f62d0569e557c5cfc4b2ac2","affectsGlobalScope":true,"impliedFormat":1},{"version":"71c37f4c9543f31dfced6c7840e068c5a5aacb7b89111a4364b1d5276b852557","affectsGlobalScope":true,"impliedFormat":1},{"version":"576711e016cf4f1804676043e6a0a5414252560eb57de9faceee34d79798c850","affectsGlobalScope":true,"impliedFormat":1},{"version":"89c1b1281ba7b8a96efc676b11b264de7a8374c5ea1e6617f11880a13fc56dc6","affectsGlobalScope":true,"impliedFormat":1},{"version":"74f7fa2d027d5b33eb0471c8e82a6c87216223181ec31247c357a3e8e2fddc5b","affectsGlobalScope":true,"impliedFormat":1},{"version":"d6d7ae4d1f1f3772e2a3cde568ed08991a8ae34a080ff1151af28b7f798e22ca","affectsGlobalScope":true,"impliedFormat":1},{"version":"063600664504610fe3e99b717a1223f8b1900087fab0b4cad1496a114744f8df","affectsGlobalScope":true,"impliedFormat":1},{"version":"934019d7e3c81950f9a8426d093458b65d5aff2c7c1511233c0fd5b941e608ab","affectsGlobalScope":true,"impliedFormat":1},{"version":"52ada8e0b6e0482b728070b7639ee42e83a9b1c22d205992756fe020fd9f4a47","affectsGlobalScope":true,"impliedFormat":1},{"version":"3bdefe1bfd4d6dee0e26f928f93ccc128f1b64d5d501ff4a8cf3c6371200e5e6","affectsGlobalScope":true,"impliedFormat":1},{"version":"59fb2c069260b4ba00b5643b907ef5d5341b167e7d1dbf58dfd895658bda2867","affectsGlobalScope":true,"impliedFormat":1},{"version":"639e512c0dfc3fad96a84caad71b8834d66329a1f28dc95e3946c9b58176c73a","affectsGlobalScope":true,"impliedFormat":1},{"version":"368af93f74c9c932edd84c58883e736c9e3d53cec1fe24c0b0ff451f529ceab1","affectsGlobalScope":true,"impliedFormat":1},{"version":"8e7f8264d0fb4c5339605a15daadb037bf238c10b654bb3eee14208f860a32ea","affectsGlobalScope":true,"impliedFormat":1},{"version":"782dec38049b92d4e85c1585fbea5474a219c6984a35b004963b00beb1aab538","affectsGlobalScope":true,"impliedFormat":1},{"version":"a2d11f94d9a2763a19430da7aa846ed2bddd53c76fa3f14d13d88bb4934f2579","signature":"cec6057e272abbdfc02d1433673336fd687aad580e163cdd627a90ad4ed716cf"},{"version":"d9378f1d2add3a8ef09a80ceb45c7538f791e4814486f6f87c1f75b8770f0087","signature":"5835dbaa110fe1c7ae6c7482f19867579825f5303f4066c7d2b80f0cea3a47ab"},{"version":"386fc96ef9997aa647f463f05a54a8d8e9a710e4680c327d5b01f98db8ddcf54","signature":"561fdc0c061685e2905e4133e9d88b620a10464797aaf7723bb2f3befd540daf"},{"version":"752a4c5da1ed657428bfe7047a43b9166d20ac19c33d840eabce154f9f5df55b","signature":"d95506b4fdfe57cd529b9c58a135874675e55ea61af695dced5c2470e06bf72e"},{"version":"3bbe77bad784daab0ac850c6f8c2b023b3710db3060a3aeabe21c596dc5f0a4e","signature":"c3c8bb1e674fa5487577749298939ce77343b64e559365de53efff5210368db8"},{"version":"a06838dad2d7796480c030cb18248fcc2426fd4d375815605f11c541e8fae335","signature":"4d0774c5c27bb1cb2e2cdb7fe8c38d26ad54843aea29abb45e18dc0b861936ca"},{"version":"43b40612ad49a6037dd0ba70ff6756a2061c43a222b7662857aa2b050463b9b1","signature":"5a198186bd2142e00dd9b832100c0842fd224b7eb8f77d60c3817b8a43fafa81"},{"version":"cdf1b6ea25f550c5b3a30c3586e2022659e21854056af3bca69206b4a74265f9","signature":"a6330560f70bacf120f1128385b63322e3dc0007fd7e8590cb52798adf183132"},{"version":"a53adc49fae50b1d885d47272fd7aea88ff0b94ad9a09a2a65974f5fe471850d","signature":"bd07eed78e47fb3f0f890786656a84b1fc16ac0619e58886b16ff3d06d431140"},{"version":"f33cac031ee04cafbc468177540c251ba1630f0e6f5f4eeeae2103b7ef7b4758","signature":"13ec2b73e77137696854373b8862fff1f0b662da0681c1c17aa5bf9c6e269bce"},"2261a58ed7f7ced3c20de3753f86aaf4cb80ca718340d532083f9dd8febe6a87","884a9ee6ee9ff94877b6819c427264ce8abd52a279707df0981e0beb520d08f7","3738a73aea7d44b8dc355a1d9412abe6a0493a22edb29a5f08e9b02667134b41",{"version":"464b245ec63af0bc42fef5f74fc475b115fc9e93512fb0d13779ccf25f292a99","signature":"baf4737d7be2e05100ff45f00af9af783a268b79098062f1fac9d4cdd43d5196"},{"version":"4c5dad0fedb9673bc9b978f89d8c735d822ab75dede69b2bff8f20675c06d5de","signature":"42d27d57ab8e0a9a6cbeb54b030b2032313d0bce1222ccff4fe72d4e6b0f0133"},{"version":"a8b4590bd7202b0be959940994ef48c7e691c9b27d801b6a2ccf9cf9465343bf","signature":"b3daf7395987bda21eaa9c923ffb52122f2bcb682764b11d2b5e7865148852c0","affectsGlobalScope":true},{"version":"89fa01b584a104cc2e17900f8bcabaffbcab38908c8acc6422e24e27a7dbca5b","signature":"73eb368e1869df22054db0bc98f6f9f0a50190991f5b6d9f360d420d3302159b"},{"version":"8873e9704caaf70f835f8394d09859b7543cb424cf30fb1d1949193f0d57da03","signature":"6d7c16825413c99fb96e7d4d88b967c58b1d50caf110db78753a7414ce464e47"},{"version":"0417587f3573e747db27c92410d078affb8b8bbb9d74edf38209ec563bb1dcd5","signature":"547b92a2ed1da7ef51dd3b2abab7c020a888a21af7e1d0b3700ecc84439ae6ee"},{"version":"3af9724fa424683973bf9be66b27befac549f06f74040a552aab203562195a9c","signature":"8f6081ae715501533ecbc79415de1736a1fb7f2a80b1b5d90a56a89c1ce8138a"},{"version":"b0c84003af094406e722c9519bb83d54e0609f488fa529fe430b1378a8c9db42","signature":"52136838102b6d8be32571c853cb0677776ad63509986c3299e8e03864757ea8"},{"version":"cdcc132f207d097d7d3aa75615ab9a2e71d6a478162dde8b67f88ea19f3e54de","impliedFormat":1},{"version":"0d14fa22c41fdc7277e6f71473b20ebc07f40f00e38875142335d5b63cdfc9d2","impliedFormat":1},{"version":"c085e9aa62d1ae1375794c1fb927a445fa105fed891a7e24edbb1c3300f7384a","impliedFormat":1},{"version":"f315e1e65a1f80992f0509e84e4ae2df15ecd9ef73df975f7c98813b71e4c8da","impliedFormat":1},{"version":"5b9586e9b0b6322e5bfbd2c29bd3b8e21ab9d871f82346cb71020e3d84bae73e","impliedFormat":1},{"version":"3e70a7e67c2cb16f8cd49097360c0309fe9d1e3210ff9222e9dac1f8df9d4fb6","impliedFormat":1},{"version":"ab68d2a3e3e8767c3fba8f80de099a1cfc18c0de79e42cb02ae66e22dfe14a66","impliedFormat":1},{"version":"d96cc6598148bf1a98fb2e8dcf01c63a4b3558bdaec6ef35e087fd0562eb40ec","impliedFormat":1},{"version":"f8db4fea512ab759b2223b90ecbbe7dae919c02f8ce95ec03f7fb1cf757cfbeb","affectsGlobalScope":true,"impliedFormat":1}],"root":[[48,58],[61,68]],"options":{"allowImportingTsExtensions":true,"composite":true,"declaration":true,"declarationMap":true,"emitDecoratorMetadata":true,"experimentalDecorators":true,"jsx":4,"jsxImportSource":"@wsxjs/wsx-core","module":99,"noFallthroughCasesInSwitch":true,"noUnusedLocals":true,"noUnusedParameters":true,"outDir":"./","skipLibCheck":true,"sourceMap":true,"strict":true,"target":7,"useDefineForClassFields":false},"referencedMap":[[72,1],[77,2],[76,3],[74,4],[75,5],[73,6],[65,7],[66,8],[67,9],[68,10],[61,11],[53,12],[57,13],[50,14],[62,15],[63,15],[55,16],[56,11],[51,11],[49,11],[64,11],[52,11],[48,11],[54,17],[60,18],[59,19],[58,20]],"semanticDiagnosticsPerFile":[[52,[{"start":116,"length":19,"code":7016,"category":1,"messageText":{"messageText":"Could not find a declaration file for module '@wsxjs/wsx-logger'. '/Volumes/ORICO/ws/prj/wsx/wsxjs/packages/logger/dist/index.js' implicitly has an 'any' type.","category":1,"code":7016,"next":[{"info":{"moduleReference":"@wsxjs/wsx-logger","mode":99}}]}}]],[54,[{"start":385,"length":19,"code":7016,"category":1,"messageText":{"messageText":"Could not find a declaration file for module '@wsxjs/wsx-logger'. '/Volumes/ORICO/ws/prj/wsx/wsxjs/packages/logger/dist/index.js' implicitly has an 'any' type.","category":1,"code":7016,"next":[{"info":{"moduleReference":"@wsxjs/wsx-logger","mode":99}}]}}]],[55,[{"start":319,"length":19,"code":7016,"category":1,"messageText":{"messageText":"Could not find a declaration file for module '@wsxjs/wsx-logger'. '/Volumes/ORICO/ws/prj/wsx/wsxjs/packages/logger/dist/index.js' implicitly has an 'any' type.","category":1,"code":7016,"next":[{"info":{"moduleReference":"@wsxjs/wsx-logger","mode":99}}]}}]],[57,[{"start":439,"length":19,"code":7016,"category":1,"messageText":{"messageText":"Could not find a declaration file for module '@wsxjs/wsx-logger'. '/Volumes/ORICO/ws/prj/wsx/wsxjs/packages/logger/dist/index.js' implicitly has an 'any' type.","category":1,"code":7016,"next":[{"info":{"moduleReference":"@wsxjs/wsx-logger","mode":99}}]}},{"start":498,"length":19,"code":7016,"category":1,"messageText":{"messageText":"Could not find a declaration file for module '@wsxjs/wsx-logger'. '/Volumes/ORICO/ws/prj/wsx/wsxjs/packages/logger/dist/index.js' implicitly has an 'any' type.","category":1,"code":7016,"next":[{"info":{"moduleReference":"@wsxjs/wsx-logger","mode":99}}]}}]]],"affectedFilesPendingEmit":[65,66,67,68,61,53,57,50,62,63,55,56,51,49,64,52,48,54],"emitSignatures":[48,49,50,51,52,53,54,55,56,57,61,62,63,64,65,66,67,68],"version":"5.8.3"}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wsxjs/wsx-core",
|
|
3
|
-
"version": "0.0.
|
|
4
|
-
"description": "Core
|
|
3
|
+
"version": "0.0.18",
|
|
4
|
+
"description": "Core WSXJS - Web Components with JSX syntax",
|
|
5
5
|
"main": "./dist/index.js",
|
|
6
6
|
"module": "./dist/index.mjs",
|
|
7
7
|
"types": "./types/index.d.ts",
|
|
@@ -22,6 +22,16 @@
|
|
|
22
22
|
"types": "./types/jsx-runtime.d.ts",
|
|
23
23
|
"import": "./dist/jsx-runtime.mjs",
|
|
24
24
|
"require": "./dist/jsx-runtime.js"
|
|
25
|
+
},
|
|
26
|
+
"./*.wsx": {
|
|
27
|
+
"types": "./types/wsx-types.d.ts"
|
|
28
|
+
}
|
|
29
|
+
},
|
|
30
|
+
"typesVersions": {
|
|
31
|
+
"*": {
|
|
32
|
+
"*.wsx": [
|
|
33
|
+
"./types/wsx-types.d.ts"
|
|
34
|
+
]
|
|
25
35
|
}
|
|
26
36
|
},
|
|
27
37
|
"files": [
|
|
@@ -37,6 +47,9 @@
|
|
|
37
47
|
"typescript",
|
|
38
48
|
"custom-elements"
|
|
39
49
|
],
|
|
50
|
+
"dependencies": {
|
|
51
|
+
"@wsxjs/wsx-logger": "0.0.18"
|
|
52
|
+
},
|
|
40
53
|
"devDependencies": {
|
|
41
54
|
"tsup": "^8.0.0",
|
|
42
55
|
"typescript": "^5.0.0",
|