gyosjs 0.5.1 → 0.5.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -34,7 +34,7 @@ GyosJS is not trying to replace a full SPA framework. If your app is primarily c
34
34
  Use the browser auto-init build when you want HTML-first usage with minimal setup.
35
35
 
36
36
  ```html
37
- <script src="https://cdn.jsdelivr.net/npm/gyosjs@0.5.1/dist/gyos.auto.min.js"></script>
37
+ <script src="https://cdn.jsdelivr.net/npm/gyosjs@0.5.2/dist/gyos.auto.min.js"></script>
38
38
  ```
39
39
 
40
40
  That build attaches `window.Gyos`, starts the router when `g-boost` exists, injects transition styles, and mounts scopes when the page is ready.
@@ -1 +1 @@
1
- {"version":3,"file":"reactive.d.ts","sourceRoot":"","sources":["../../src/core/reactive.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAUlC,eAAO,MAAM,aAAa,eAAmC,CAAC;AA0D9D,wBAAgB,SAAS,CAAC,CAAC,SAAS,MAAM,EAAE,GAAG,EAAE,CAAC,GAAG,CAAC,CAOrD;AAED,wBAAgB,aAAa,CAAC,GAAG,EAAE,GAAG,GAAG,OAAO,CAE/C;AAKD,wBAAgB,OAAO,CAAC,CAAC,SAAS,MAAM,EAAE,GAAG,EAAE,CAAC,GAAG,CAAC,CAOnD;AASD,wBAAgB,OAAO,CAAC,CAAC,SAAS,MAAM,EAAE,GAAG,EAAE,CAAC,GAAG,CAAC,CAOnD;AAiCD,wBAAgB,QAAQ,CAAC,CAAC,SAAS,MAAM,EAAE,GAAG,EAAE,CAAC,GAAG,CAAC,CAsMpD;AAED,wBAAgB,YAAY,CAAC,CAAC,SAAS,MAAM,EAAE,MAAM,EAAE,CAAC,GAAG,CAAC,CAgB3D;AAED;;;;GAIG;AACH,wBAAgB,eAAe,CAAC,MAAM,EAAE,GAAG,GAAG,MAAM,CAAC,MAAM,CAAC,GAAG,SAAS,CAEvE"}
1
+ {"version":3,"file":"reactive.d.ts","sourceRoot":"","sources":["../../src/core/reactive.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAUlC,eAAO,MAAM,aAAa,eAAmC,CAAC;AA0D9D,wBAAgB,SAAS,CAAC,CAAC,SAAS,MAAM,EAAE,GAAG,EAAE,CAAC,GAAG,CAAC,CAOrD;AAED,wBAAgB,aAAa,CAAC,GAAG,EAAE,GAAG,GAAG,OAAO,CAE/C;AAKD,wBAAgB,OAAO,CAAC,CAAC,SAAS,MAAM,EAAE,GAAG,EAAE,CAAC,GAAG,CAAC,CAOnD;AASD,wBAAgB,OAAO,CAAC,CAAC,SAAS,MAAM,EAAE,GAAG,EAAE,CAAC,GAAG,CAAC,CAOnD;AAiCD,wBAAgB,QAAQ,CAAC,CAAC,SAAS,MAAM,EAAE,GAAG,EAAE,CAAC,GAAG,CAAC,CA+MpD;AAED,wBAAgB,YAAY,CAAC,CAAC,SAAS,MAAM,EAAE,MAAM,EAAE,CAAC,GAAG,CAAC,CAgB3D;AAED;;;;GAIG;AACH,wBAAgB,eAAe,CAAC,MAAM,EAAE,GAAG,GAAG,MAAM,CAAC,MAAM,CAAC,GAAG,SAAS,CAEvE"}
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * GyosJS v0.5.1
2
+ * GyosJS v0.5.2
3
3
  * (c) 2026
4
4
  * @license MIT
5
5
  */
@@ -4089,7 +4089,7 @@ function processModel(element, scope, root) {
4089
4089
  // Set initial value (no pipes in v-model)
4090
4090
  const initialValue = evaluateExpression(expr, currentScope, false);
4091
4091
  if (inputElement.type === 'checkbox') {
4092
- inputElement.checked = !!initialValue;
4092
+ inputElement.checked = !!unref(initialValue);
4093
4093
  }
4094
4094
  else if (inputElement.type === 'radio') {
4095
4095
  inputElement.checked = String(unref(initialValue)) === inputElement.value;
@@ -4135,7 +4135,7 @@ function processModel(element, scope, root) {
4135
4135
  // No pipes in v-model reactive updates
4136
4136
  const newValue = evaluateExpression(expr, currentScope, false);
4137
4137
  if (inputElement.type === 'checkbox') {
4138
- inputElement.checked = !!newValue;
4138
+ inputElement.checked = !!unref(newValue);
4139
4139
  }
4140
4140
  else if (inputElement.type === 'radio') {
4141
4141
  inputElement.checked = String(unref(newValue)) === inputElement.value;
@@ -4366,6 +4366,15 @@ function reactive(raw) {
4366
4366
  // It's a getter - just return value, getter will track its own dependencies
4367
4367
  return value;
4368
4368
  }
4369
+ // Callable reactive values are data, not methods. Binding would drop
4370
+ // their identity and metadata used by g-model and the public APIs.
4371
+ if (isSignal(value) || isComputed(value)) {
4372
+ // Track the field as well as reads of its value so replacing the
4373
+ // signal/computed switches effects away from the old source.
4374
+ if (hasCurrentEffect())
4375
+ getFieldSignal(target, key, value).value;
4376
+ return value;
4377
+ }
4369
4378
  // function -> bind this = proxy
4370
4379
  if (typeof value === "function") {
4371
4380
  return value.bind(proxy);
@@ -8925,7 +8934,7 @@ const Gyos = {
8925
8934
  portalCreate,
8926
8935
  portalDestroy,
8927
8936
  setCspNonce,
8928
- version: '0.5.1'
8937
+ version: '0.5.2'
8929
8938
  };
8930
8939
 
8931
8940
  const standardExpressionRuntime = {