@colletdev/core 0.1.6 → 0.1.7
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/generated/index.js +1 -1
- package/package.json +1 -1
- package/src/runtime.js +4 -2
package/generated/index.js
CHANGED
|
@@ -23,7 +23,7 @@
|
|
|
23
23
|
import { initWasm, loadSharedStyles, loadInlineSharedStyles, loadMotionStyles, loadInlineMotionStyles, injectTokensToHead, injectFoucPrevention, CxElement, CxFormElement } from '../src/runtime.js';
|
|
24
24
|
|
|
25
25
|
// Package version — used for CDN fallback URL
|
|
26
|
-
const PKG_VERSION = '0.1.
|
|
26
|
+
const PKG_VERSION = '0.1.6';
|
|
27
27
|
|
|
28
28
|
// ─── Lazy WASM + CSS ───
|
|
29
29
|
// WASM glue and CSS strings are NOT imported at module level.
|
package/package.json
CHANGED
package/src/runtime.js
CHANGED
|
@@ -785,9 +785,11 @@ export class CxFormElement extends CxElement {
|
|
|
785
785
|
get value() { return this.getAttribute?.('value') ?? ''; }
|
|
786
786
|
set value(v) { if (v == null) this.removeAttribute('value'); else this.setAttribute('value', String(v)); }
|
|
787
787
|
get disabled() { return this.hasAttribute('disabled'); }
|
|
788
|
-
|
|
788
|
+
// React 19 sets boolean DOM properties directly (element.disabled = "").
|
|
789
|
+
// Empty string "" is falsy — must check explicitly for false/null/undefined.
|
|
790
|
+
set disabled(v) { if (v === false || v == null) this.removeAttribute('disabled'); else this.setAttribute('disabled', ''); }
|
|
789
791
|
get required() { return this.hasAttribute('required'); }
|
|
790
|
-
set required(v) { if (v) this.
|
|
792
|
+
set required(v) { if (v === false || v == null) this.removeAttribute('required'); else this.setAttribute('required', ''); }
|
|
791
793
|
get validity() { return this.#internals?.validity ?? null; }
|
|
792
794
|
get validationMessage() { return this.#internals?.validationMessage ?? ''; }
|
|
793
795
|
get willValidate() { return this.#internals?.willValidate ?? false; }
|