@zeus-js/web-c-runtime 0.1.1-beta.15 → 0.1.1-beta.16

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.
@@ -1,5 +1,5 @@
1
1
  /**
2
- * web-c-runtime v0.1.1-beta.15
2
+ * web-c-runtime v0.1.1-beta.16
3
3
  * (c) 2026 baicie
4
4
  * Released under the MIT License.
5
5
  **/
@@ -412,7 +412,7 @@ function createLazyElementClass(meta) {
412
412
  }
413
413
  ZeusLazyElement.formAssociated = Boolean(meta.formAssociated);
414
414
  installPropertyAccessors(ZeusLazyElement.prototype, meta.props);
415
- installMethodProxies(ZeusLazyElement.prototype, meta.methods);
415
+ installMethodProxies(ZeusLazyElement.prototype, meta.methods, meta.tagName);
416
416
  return ZeusLazyElement;
417
417
  }
418
418
  function dispatchFormCallback(hostRef, callback) {
@@ -422,10 +422,11 @@ function dispatchFormCallback(hostRef, callback) {
422
422
  }
423
423
  invokeFormCallback(hostRef, callback);
424
424
  }
425
- function installMethodProxies(proto, methods) {
425
+ function installMethodProxies(proto, methods, tagName) {
426
426
  if (!methods) return;
427
+ const reservedNames = new Set(Object.getOwnPropertyNames(proto));
427
428
  for (const name of methods) {
428
- if (name in proto) continue;
429
+ if (reservedNames.has(name)) throw new Error(`[ZEUS_WC_RESERVED_METHOD] Method "${name}" conflicts with a lazy element lifecycle/API method on <${tagName}>.`);
429
430
  Object.defineProperty(proto, name, {
430
431
  configurable: true,
431
432
  value: function() {
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@zeus-js/web-c-runtime",
3
3
  "type": "module",
4
- "version": "0.1.1-beta.15",
4
+ "version": "0.1.1-beta.16",
5
5
  "description": "Zeus Web-C lazy-loading runtime",
6
6
  "license": "MIT",
7
7
  "repository": {
@@ -26,7 +26,7 @@
26
26
  "dist"
27
27
  ],
28
28
  "dependencies": {
29
- "@zeus-js/runtime-dom": "0.1.1-beta.15"
29
+ "@zeus-js/runtime-dom": "0.1.1-beta.16"
30
30
  },
31
31
  "author": "Baicie",
32
32
  "buildOptions": {