@wsxjs/wsx-core 0.0.18 → 0.0.20

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/jsx.js CHANGED
@@ -152,6 +152,186 @@ function parseHTMLToNodes(html) {
152
152
  }
153
153
 
154
154
  // src/jsx-factory.ts
155
+ function isStandardHTMLAttribute(key) {
156
+ const standardAttributes = /* @__PURE__ */ new Set([
157
+ // 全局属性
158
+ "id",
159
+ "class",
160
+ "className",
161
+ "style",
162
+ "title",
163
+ "lang",
164
+ "dir",
165
+ "hidden",
166
+ "tabindex",
167
+ "accesskey",
168
+ "contenteditable",
169
+ "draggable",
170
+ "spellcheck",
171
+ "translate",
172
+ "autocapitalize",
173
+ "autocorrect",
174
+ // 表单属性
175
+ "name",
176
+ "value",
177
+ "type",
178
+ "placeholder",
179
+ "required",
180
+ "disabled",
181
+ "readonly",
182
+ "checked",
183
+ "selected",
184
+ "multiple",
185
+ "min",
186
+ "max",
187
+ "step",
188
+ "autocomplete",
189
+ "autofocus",
190
+ "form",
191
+ "formaction",
192
+ "formenctype",
193
+ "formmethod",
194
+ "formnovalidate",
195
+ "formtarget",
196
+ // 链接属性
197
+ "href",
198
+ "target",
199
+ "rel",
200
+ "download",
201
+ "hreflang",
202
+ "ping",
203
+ // 媒体属性
204
+ "src",
205
+ "alt",
206
+ "width",
207
+ "height",
208
+ "poster",
209
+ "preload",
210
+ "controls",
211
+ "autoplay",
212
+ "loop",
213
+ "muted",
214
+ "playsinline",
215
+ "crossorigin",
216
+ // ARIA 属性(部分常见)
217
+ "role"
218
+ ]);
219
+ const lowerKey = key.toLowerCase();
220
+ if (standardAttributes.has(lowerKey)) {
221
+ return true;
222
+ }
223
+ if (lowerKey.startsWith("data-")) {
224
+ return true;
225
+ }
226
+ if (lowerKey.startsWith("aria-")) {
227
+ return true;
228
+ }
229
+ if (key.startsWith("xml:") || key.startsWith("xlink:")) {
230
+ return true;
231
+ }
232
+ return false;
233
+ }
234
+ function isSpecialProperty(key, value) {
235
+ return key === "ref" || key === "className" || key === "class" || key === "style" || key.startsWith("on") && typeof value === "function" || typeof value === "boolean" || key === "value";
236
+ }
237
+ function setSmartProperty(element, key, value, isSVG = false) {
238
+ if (isSpecialProperty(key, value)) {
239
+ return;
240
+ }
241
+ if (isStandardHTMLAttribute(key)) {
242
+ const attributeName = isSVG ? getSVGAttributeName(key) : key;
243
+ if (typeof value === "object" && value !== null) {
244
+ try {
245
+ const serialized = JSON.stringify(value);
246
+ if (serialized.length > 1024 * 1024) {
247
+ console.warn(
248
+ `[WSX] Attribute "${key}" value too large, consider using a non-standard property name instead`
249
+ );
250
+ }
251
+ element.setAttribute(attributeName, serialized);
252
+ } catch (error) {
253
+ console.warn(`[WSX] Cannot serialize attribute "${key}":`, error);
254
+ }
255
+ } else {
256
+ element.setAttribute(attributeName, String(value));
257
+ }
258
+ return;
259
+ }
260
+ if (element instanceof SVGElement) {
261
+ const attributeName = getSVGAttributeName(key);
262
+ if (typeof value === "object" && value !== null) {
263
+ try {
264
+ const serialized = JSON.stringify(value);
265
+ element.setAttribute(attributeName, serialized);
266
+ } catch (error) {
267
+ console.warn(`[WSX] Cannot serialize SVG attribute "${key}":`, error);
268
+ }
269
+ } else {
270
+ element.setAttribute(attributeName, String(value));
271
+ }
272
+ return;
273
+ }
274
+ const hasProperty = key in element || Object.prototype.hasOwnProperty.call(element, key);
275
+ if (hasProperty) {
276
+ let isReadOnly = false;
277
+ try {
278
+ const descriptor = Object.getOwnPropertyDescriptor(Object.getPrototypeOf(element), key);
279
+ if (descriptor) {
280
+ isReadOnly = descriptor.get !== void 0 && descriptor.set === void 0 || descriptor.writable === false && descriptor.set === void 0;
281
+ }
282
+ } catch {
283
+ }
284
+ if (isReadOnly) {
285
+ const attributeName = isSVG ? getSVGAttributeName(key) : key;
286
+ if (typeof value === "object" && value !== null) {
287
+ try {
288
+ const serialized = JSON.stringify(value);
289
+ element.setAttribute(attributeName, serialized);
290
+ } catch (error) {
291
+ console.warn(`[WSX] Cannot serialize readonly property "${key}":`, error);
292
+ }
293
+ } else {
294
+ element.setAttribute(attributeName, String(value));
295
+ }
296
+ } else {
297
+ try {
298
+ element[key] = value;
299
+ } catch {
300
+ const attributeName = isSVG ? getSVGAttributeName(key) : key;
301
+ if (typeof value === "object" && value !== null) {
302
+ try {
303
+ const serialized = JSON.stringify(value);
304
+ element.setAttribute(attributeName, serialized);
305
+ } catch (error) {
306
+ console.warn(
307
+ `[WSX] Cannot serialize property "${key}" for attribute:`,
308
+ error
309
+ );
310
+ }
311
+ } else {
312
+ element.setAttribute(attributeName, String(value));
313
+ }
314
+ }
315
+ }
316
+ } else {
317
+ const attributeName = isSVG ? getSVGAttributeName(key) : key;
318
+ if (typeof value === "object" && value !== null) {
319
+ try {
320
+ const serialized = JSON.stringify(value);
321
+ if (serialized.length > 1024 * 1024) {
322
+ console.warn(
323
+ `[WSX] Property "${key}" value too large for attribute, consider using a JavaScript property instead`
324
+ );
325
+ }
326
+ element.setAttribute(attributeName, serialized);
327
+ } catch (error) {
328
+ console.warn(`[WSX] Cannot serialize property "${key}" for attribute:`, error);
329
+ }
330
+ } else {
331
+ element.setAttribute(attributeName, String(value));
332
+ }
333
+ }
334
+ }
155
335
  function h(tag, props = {}, ...children) {
156
336
  if (typeof tag === "function") {
157
337
  return tag(props, children);
@@ -188,8 +368,7 @@ function h(tag, props = {}, ...children) {
188
368
  element.setAttribute(attributeName, String(value));
189
369
  }
190
370
  } else {
191
- const attributeName = isSVG ? getSVGAttributeName(key) : key;
192
- element.setAttribute(attributeName, String(value));
371
+ setSmartProperty(element, key, value, isSVG);
193
372
  }
194
373
  });
195
374
  }
package/dist/jsx.mjs CHANGED
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  Fragment,
3
3
  h
4
- } from "./chunk-UH5BDYGI.mjs";
4
+ } from "./chunk-7FXISNME.mjs";
5
5
  export {
6
6
  Fragment,
7
7
  h
@@ -1 +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"}
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","../../../node_modules/.pnpm/loglevel@1.9.2/node_modules/loglevel/index.d.ts","../../logger/dist/index.d.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__/smart-property-assignment.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":[[74],[76,79],[72,78],[76],[73,77],[75],[49,50,62],[50,57,62],[50,56,57,62],[50,62],[50,56,62],[62],[54,62],[50,51,53,54,56,57,58,62,63],[48,49,62],[50,53,55,62],[53,62],[50,51,53,55,62],[60,61],[60],[59],[52]],"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},"a2d11f94d9a2763a19430da7aa846ed2bddd53c76fa3f14d13d88bb4934f2579","d9378f1d2add3a8ef09a80ceb45c7538f791e4814486f6f87c1f75b8770f0087","19ecfd858f27b7e87d132d22bd2575f68018976e8c5eec44b7557660a54e08e1","752a4c5da1ed657428bfe7047a43b9166d20ac19c33d840eabce154f9f5df55b",{"version":"4aa7fdc017a0a097c71ada2ca187e1475c987b4f933960c0792eb143997e4709","impliedFormat":1},"65f3f541c306088b14dfde53f7f67f2eb6234597ba74801ee5a2e44df7f9d860","3bbe77bad784daab0ac850c6f8c2b023b3710db3060a3aeabe21c596dc5f0a4e","a06838dad2d7796480c030cb18248fcc2426fd4d375815605f11c541e8fae335","43b40612ad49a6037dd0ba70ff6756a2061c43a222b7662857aa2b050463b9b1","cdf1b6ea25f550c5b3a30c3586e2022659e21854056af3bca69206b4a74265f9","a53adc49fae50b1d885d47272fd7aea88ff0b94ad9a09a2a65974f5fe471850d","f33cac031ee04cafbc468177540c251ba1630f0e6f5f4eeeae2103b7ef7b4758","2261a58ed7f7ced3c20de3753f86aaf4cb80ca718340d532083f9dd8febe6a87","884a9ee6ee9ff94877b6819c427264ce8abd52a279707df0981e0beb520d08f7","3738a73aea7d44b8dc355a1d9412abe6a0493a22edb29a5f08e9b02667134b41","464b245ec63af0bc42fef5f74fc475b115fc9e93512fb0d13779ccf25f292a99","4c5dad0fedb9673bc9b978f89d8c735d822ab75dede69b2bff8f20675c06d5de",{"version":"a8b4590bd7202b0be959940994ef48c7e691c9b27d801b6a2ccf9cf9465343bf","affectsGlobalScope":true},"89fa01b584a104cc2e17900f8bcabaffbcab38908c8acc6422e24e27a7dbca5b","8873e9704caaf70f835f8394d09859b7543cb424cf30fb1d1949193f0d57da03","0417587f3573e747db27c92410d078affb8b8bbb9d74edf38209ec563bb1dcd5","084104d236d7263594343ab8be09e1472dfa8bc4a6787d7c73c8e362ae62b3c1","ee4d984eff6c775b61d5b0e50c9ba9b989a84d36929959d4b68ca5b33dae6310","b0c84003af094406e722c9519bb83d54e0609f488fa529fe430b1378a8c9db42",{"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,51],[54,60],[63,71]],"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":[[75,1],[80,2],[79,3],[77,4],[78,5],[76,6],[67,7],[68,8],[69,9],[70,10],[71,11],[63,12],[55,13],[59,14],[50,15],[64,10],[65,10],[57,16],[58,12],[51,12],[49,12],[66,12],[54,17],[48,12],[56,18],[62,19],[61,20],[60,21],[53,22]],"affectedFilesPendingEmit":[[67,51],[68,51],[69,51],[70,51],[71,51],[63,51],[55,51],[59,51],[50,51],[64,51],[65,51],[57,51],[58,51],[51,51],[49,51],[66,51],[54,51],[48,51],[56,51]],"emitSignatures":[48,49,50,51,54,55,56,57,58,59,63,64,65,66,67,68,69,70,71],"version":"5.8.3"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wsxjs/wsx-core",
3
- "version": "0.0.18",
3
+ "version": "0.0.20",
4
4
  "description": "Core WSXJS - Web Components with JSX syntax",
5
5
  "main": "./dist/index.js",
6
6
  "module": "./dist/index.mjs",
@@ -48,7 +48,7 @@
48
48
  "custom-elements"
49
49
  ],
50
50
  "dependencies": {
51
- "@wsxjs/wsx-logger": "0.0.18"
51
+ "@wsxjs/wsx-logger": "0.0.20"
52
52
  },
53
53
  "devDependencies": {
54
54
  "tsup": "^8.0.0",
@@ -14,6 +14,269 @@
14
14
  import { createElement, shouldUseSVGNamespace, getSVGAttributeName } from "./utils/svg-utils";
15
15
  import { parseHTMLToNodes } from "./utils/dom-utils";
16
16
 
17
+ /**
18
+ * 检查是否是 HTML 标准属性
19
+ * HTML First 策略的核心:优先识别标准属性
20
+ *
21
+ * @param key - 属性名
22
+ * @returns 是否是标准 HTML 属性
23
+ */
24
+ function isStandardHTMLAttribute(key: string): boolean {
25
+ // 标准 HTML 属性集合(常见属性)
26
+ const standardAttributes = new Set([
27
+ // 全局属性
28
+ "id",
29
+ "class",
30
+ "className",
31
+ "style",
32
+ "title",
33
+ "lang",
34
+ "dir",
35
+ "hidden",
36
+ "tabindex",
37
+ "accesskey",
38
+ "contenteditable",
39
+ "draggable",
40
+ "spellcheck",
41
+ "translate",
42
+ "autocapitalize",
43
+ "autocorrect",
44
+ // 表单属性
45
+ "name",
46
+ "value",
47
+ "type",
48
+ "placeholder",
49
+ "required",
50
+ "disabled",
51
+ "readonly",
52
+ "checked",
53
+ "selected",
54
+ "multiple",
55
+ "min",
56
+ "max",
57
+ "step",
58
+ "autocomplete",
59
+ "autofocus",
60
+ "form",
61
+ "formaction",
62
+ "formenctype",
63
+ "formmethod",
64
+ "formnovalidate",
65
+ "formtarget",
66
+ // 链接属性
67
+ "href",
68
+ "target",
69
+ "rel",
70
+ "download",
71
+ "hreflang",
72
+ "ping",
73
+ // 媒体属性
74
+ "src",
75
+ "alt",
76
+ "width",
77
+ "height",
78
+ "poster",
79
+ "preload",
80
+ "controls",
81
+ "autoplay",
82
+ "loop",
83
+ "muted",
84
+ "playsinline",
85
+ "crossorigin",
86
+ // ARIA 属性(部分常见)
87
+ "role",
88
+ ]);
89
+
90
+ const lowerKey = key.toLowerCase();
91
+
92
+ // 检查是否是标准属性
93
+ if (standardAttributes.has(lowerKey)) {
94
+ return true;
95
+ }
96
+
97
+ // 检查是否是 data-* 属性(必须使用连字符)
98
+ // 注意:单独的 "data" 不是标准属性,不在这个列表中
99
+ // data 可以检查 JavaScript 属性,data-* 只使用 setAttribute
100
+ if (lowerKey.startsWith("data-")) {
101
+ return true; // 标准属性,只使用 setAttribute,不检查对象属性
102
+ }
103
+
104
+ // 检查是否是 aria-* 属性
105
+ if (lowerKey.startsWith("aria-")) {
106
+ return true;
107
+ }
108
+
109
+ // 检查是否是 SVG 命名空间属性
110
+ if (key.startsWith("xml:") || key.startsWith("xlink:")) {
111
+ return true;
112
+ }
113
+
114
+ return false;
115
+ }
116
+
117
+ /**
118
+ * 检查是否是特殊属性(已有专门处理逻辑的属性)
119
+ * 这些属性不应该进入通用属性处理流程
120
+ */
121
+ function isSpecialProperty(key: string, value: unknown): boolean {
122
+ return (
123
+ key === "ref" ||
124
+ key === "className" ||
125
+ key === "class" ||
126
+ key === "style" ||
127
+ (key.startsWith("on") && typeof value === "function") ||
128
+ typeof value === "boolean" ||
129
+ key === "value"
130
+ );
131
+ }
132
+
133
+ /**
134
+ * 智能属性设置函数
135
+ * HTML First 策略:优先使用 HTML 属性,避免与标准属性冲突
136
+ *
137
+ * @param element - DOM 元素
138
+ * @param key - 属性名
139
+ * @param value - 属性值
140
+ * @param isSVG - 是否是 SVG 元素
141
+ */
142
+ function setSmartProperty(
143
+ element: HTMLElement | SVGElement,
144
+ key: string,
145
+ value: unknown,
146
+ isSVG: boolean = false
147
+ ): void {
148
+ // 1. 检查是否是特殊属性(已有处理逻辑的属性)
149
+ if (isSpecialProperty(key, value)) {
150
+ return; // 由现有逻辑处理
151
+ }
152
+
153
+ // 2. HTML First: 优先检查是否是 HTML 标准属性
154
+ if (isStandardHTMLAttribute(key)) {
155
+ // 标准 HTML 属性:直接使用 setAttribute,不检查 JavaScript 属性
156
+ const attributeName = isSVG ? getSVGAttributeName(key) : key;
157
+
158
+ // 对于复杂类型,尝试序列化
159
+ if (typeof value === "object" && value !== null) {
160
+ try {
161
+ const serialized = JSON.stringify(value);
162
+ // 检查长度限制(保守估计 1MB)
163
+ if (serialized.length > 1024 * 1024) {
164
+ console.warn(
165
+ `[WSX] Attribute "${key}" value too large, ` +
166
+ `consider using a non-standard property name instead`
167
+ );
168
+ }
169
+ element.setAttribute(attributeName, serialized);
170
+ } catch (error) {
171
+ // 无法序列化(如循环引用),警告并跳过
172
+ console.warn(`[WSX] Cannot serialize attribute "${key}":`, error);
173
+ }
174
+ } else {
175
+ element.setAttribute(attributeName, String(value));
176
+ }
177
+ // 重要:标准属性只使用 setAttribute,不使用 JavaScript 属性
178
+ return;
179
+ }
180
+
181
+ // 3. SVG 元素特殊处理:对于 SVG 元素,很多属性应该直接使用 setAttribute
182
+ // 因为 SVG 元素的很多属性是只读的(如 viewBox)
183
+ if (element instanceof SVGElement) {
184
+ const attributeName = getSVGAttributeName(key);
185
+ // 对于复杂类型,尝试序列化
186
+ if (typeof value === "object" && value !== null) {
187
+ try {
188
+ const serialized = JSON.stringify(value);
189
+ element.setAttribute(attributeName, serialized);
190
+ } catch (error) {
191
+ console.warn(`[WSX] Cannot serialize SVG attribute "${key}":`, error);
192
+ }
193
+ } else {
194
+ element.setAttribute(attributeName, String(value));
195
+ }
196
+ return;
197
+ }
198
+
199
+ // 4. 非标准属性:检查元素是否有该 JavaScript 属性
200
+ const hasProperty = key in element || Object.prototype.hasOwnProperty.call(element, key);
201
+
202
+ if (hasProperty) {
203
+ // 检查是否是只读属性
204
+ let isReadOnly = false;
205
+ try {
206
+ const descriptor = Object.getOwnPropertyDescriptor(Object.getPrototypeOf(element), key);
207
+ if (descriptor) {
208
+ isReadOnly =
209
+ (descriptor.get !== undefined && descriptor.set === undefined) ||
210
+ (descriptor.writable === false && descriptor.set === undefined);
211
+ }
212
+ } catch {
213
+ // 忽略错误,继续尝试设置
214
+ }
215
+
216
+ if (isReadOnly) {
217
+ // 只读属性使用 setAttribute
218
+ const attributeName = isSVG ? getSVGAttributeName(key) : key;
219
+ // 对于复杂类型,尝试序列化
220
+ if (typeof value === "object" && value !== null) {
221
+ try {
222
+ const serialized = JSON.stringify(value);
223
+ element.setAttribute(attributeName, serialized);
224
+ } catch (error) {
225
+ console.warn(`[WSX] Cannot serialize readonly property "${key}":`, error);
226
+ }
227
+ } else {
228
+ element.setAttribute(attributeName, String(value));
229
+ }
230
+ } else {
231
+ // 使用 JavaScript 属性赋值(支持任意类型)
232
+ try {
233
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
234
+ (element as any)[key] = value;
235
+ } catch {
236
+ // 如果赋值失败,回退到 setAttribute
237
+ const attributeName = isSVG ? getSVGAttributeName(key) : key;
238
+ // 对于复杂类型,尝试序列化
239
+ if (typeof value === "object" && value !== null) {
240
+ try {
241
+ const serialized = JSON.stringify(value);
242
+ element.setAttribute(attributeName, serialized);
243
+ } catch (error) {
244
+ console.warn(
245
+ `[WSX] Cannot serialize property "${key}" for attribute:`,
246
+ error
247
+ );
248
+ }
249
+ } else {
250
+ element.setAttribute(attributeName, String(value));
251
+ }
252
+ }
253
+ }
254
+ } else {
255
+ // 没有 JavaScript 属性,使用 setAttribute
256
+ const attributeName = isSVG ? getSVGAttributeName(key) : key;
257
+
258
+ // 对于复杂类型,尝试序列化
259
+ if (typeof value === "object" && value !== null) {
260
+ try {
261
+ const serialized = JSON.stringify(value);
262
+ // 检查长度限制
263
+ if (serialized.length > 1024 * 1024) {
264
+ console.warn(
265
+ `[WSX] Property "${key}" value too large for attribute, ` +
266
+ `consider using a JavaScript property instead`
267
+ );
268
+ }
269
+ element.setAttribute(attributeName, serialized);
270
+ } catch (error) {
271
+ // 无法序列化,警告并跳过
272
+ console.warn(`[WSX] Cannot serialize property "${key}" for attribute:`, error);
273
+ }
274
+ } else {
275
+ element.setAttribute(attributeName, String(value));
276
+ }
277
+ }
278
+ }
279
+
17
280
  // JSX子元素类型
18
281
  export type JSXChildren =
19
282
  | string
@@ -105,11 +368,9 @@ export function h(
105
368
  element.setAttribute(attributeName, String(value));
106
369
  }
107
370
  }
108
- // 处理其他属性
371
+ // 处理其他属性 - 使用智能属性设置函数
109
372
  else {
110
- // 对SVG元素使用正确的属性名
111
- const attributeName = isSVG ? getSVGAttributeName(key) : key;
112
- element.setAttribute(attributeName, String(value));
373
+ setSmartProperty(element, key, value, isSVG);
113
374
  }
114
375
  });
115
376
  }