@marko/runtime-tags 0.3.40 → 0.3.41

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/debug/dom.js CHANGED
@@ -500,7 +500,17 @@ function controllable_input_checkedValue_effect(scope, nodeAccessor) {
500
500
  );
501
501
  run();
502
502
  if (scope[nodeAccessor + "=" /* ControlledType */] === 6 /* Pending */) {
503
- el.checked = !el.checked;
503
+ if (el.name && el.type[0] === "r") {
504
+ for (const radio of el.getRootNode().querySelectorAll(
505
+ `[type=radio][name=${CSS.escape(el.name)}]`
506
+ )) {
507
+ if (radio.form === el.form) {
508
+ radio.checked = Array.isArray(oldValue) ? oldValue.includes(radio.value) : oldValue === radio.value;
509
+ }
510
+ }
511
+ } else {
512
+ el.checked = !el.checked;
513
+ }
504
514
  }
505
515
  }
506
516
  });
@@ -414,7 +414,17 @@ function controllable_input_checkedValue_effect(scope, nodeAccessor) {
414
414
  );
415
415
  run();
416
416
  if (scope[nodeAccessor + "=" /* ControlledType */] === 6 /* Pending */) {
417
- el.checked = !el.checked;
417
+ if (el.name && el.type[0] === "r") {
418
+ for (const radio of el.getRootNode().querySelectorAll(
419
+ `[type=radio][name=${CSS.escape(el.name)}]`
420
+ )) {
421
+ if (radio.form === el.form) {
422
+ radio.checked = Array.isArray(oldValue) ? oldValue.includes(radio.value) : oldValue === radio.value;
423
+ }
424
+ }
425
+ } else {
426
+ el.checked = !el.checked;
427
+ }
418
428
  }
419
429
  }
420
430
  });
@@ -2328,7 +2328,7 @@ function controllable_input_checkedValue(scopeId, nodeAccessor, checkedValue, ch
2328
2328
  1 /* InputCheckedValue */,
2329
2329
  scopeId,
2330
2330
  nodeAccessor,
2331
- multiple ? checkedValue : void 0,
2331
+ checkedValue,
2332
2332
  checkedValueChange
2333
2333
  );
2334
2334
  }
@@ -2246,7 +2246,7 @@ function controllable_input_checkedValue(scopeId, nodeAccessor, checkedValue, ch
2246
2246
  1 /* InputCheckedValue */,
2247
2247
  scopeId,
2248
2248
  nodeAccessor,
2249
- multiple ? checkedValue : void 0,
2249
+ checkedValue,
2250
2250
  checkedValueChange
2251
2251
  );
2252
2252
  }
package/dist/dom.js CHANGED
@@ -351,9 +351,16 @@ function controllable_input_checkedValue_effect(scope, nodeAccessor) {
351
351
  let checkedValueChange = scope[nodeAccessor + ";" /* ControlledHandler */];
352
352
  if (checkedValueChange) {
353
353
  let oldValue = scope[nodeAccessor + ":" /* ControlledValue */];
354
- scope[nodeAccessor + "=" /* ControlledType */] = 6 /* Pending */, checkedValueChange(
354
+ if (scope[nodeAccessor + "=" /* ControlledType */] = 6 /* Pending */, checkedValueChange(
355
355
  Array.isArray(oldValue) ? updateList(oldValue, el.value, el.checked) : el.checked ? el.value : void 0
356
- ), run(), scope[nodeAccessor + "=" /* ControlledType */] === 6 /* Pending */ && (el.checked = !el.checked);
356
+ ), run(), scope[nodeAccessor + "=" /* ControlledType */] === 6 /* Pending */)
357
+ if (el.name && el.type[0] === "r")
358
+ for (let radio of el.getRootNode().querySelectorAll(
359
+ `[type=radio][name=${CSS.escape(el.name)}]`
360
+ ))
361
+ radio.form === el.form && (radio.checked = Array.isArray(oldValue) ? oldValue.includes(radio.value) : oldValue === radio.value);
362
+ else
363
+ el.checked = !el.checked;
357
364
  }
358
365
  });
359
366
  }
package/dist/dom.mjs CHANGED
@@ -268,9 +268,16 @@ function controllable_input_checkedValue_effect(scope, nodeAccessor) {
268
268
  let checkedValueChange = scope[nodeAccessor + ";" /* ControlledHandler */];
269
269
  if (checkedValueChange) {
270
270
  let oldValue = scope[nodeAccessor + ":" /* ControlledValue */];
271
- scope[nodeAccessor + "=" /* ControlledType */] = 6 /* Pending */, checkedValueChange(
271
+ if (scope[nodeAccessor + "=" /* ControlledType */] = 6 /* Pending */, checkedValueChange(
272
272
  Array.isArray(oldValue) ? updateList(oldValue, el.value, el.checked) : el.checked ? el.value : void 0
273
- ), run(), scope[nodeAccessor + "=" /* ControlledType */] === 6 /* Pending */ && (el.checked = !el.checked);
273
+ ), run(), scope[nodeAccessor + "=" /* ControlledType */] === 6 /* Pending */)
274
+ if (el.name && el.type[0] === "r")
275
+ for (let radio of el.getRootNode().querySelectorAll(
276
+ `[type=radio][name=${CSS.escape(el.name)}]`
277
+ ))
278
+ radio.form === el.form && (radio.checked = Array.isArray(oldValue) ? oldValue.includes(radio.value) : oldValue === radio.value);
279
+ else
280
+ el.checked = !el.checked;
274
281
  }
275
282
  });
276
283
  }
package/dist/html.js CHANGED
@@ -1503,7 +1503,7 @@ function controllable_input_checkedValue(scopeId, nodeAccessor, checkedValue, ch
1503
1503
  1 /* InputCheckedValue */,
1504
1504
  scopeId,
1505
1505
  nodeAccessor,
1506
- multiple ? checkedValue : void 0,
1506
+ checkedValue,
1507
1507
  checkedValueChange
1508
1508
  ), (multiple ? checkedValue.includes(value) : checkedValue === value) ? valueAttr + " checked" : valueAttr;
1509
1509
  }
package/dist/html.mjs CHANGED
@@ -1424,7 +1424,7 @@ function controllable_input_checkedValue(scopeId, nodeAccessor, checkedValue, ch
1424
1424
  1 /* InputCheckedValue */,
1425
1425
  scopeId,
1426
1426
  nodeAccessor,
1427
- multiple ? checkedValue : void 0,
1427
+ checkedValue,
1428
1428
  checkedValueChange
1429
1429
  ), (multiple ? checkedValue.includes(value) : checkedValue === value) ? valueAttr + " checked" : valueAttr;
1430
1430
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@marko/runtime-tags",
3
- "version": "0.3.40",
3
+ "version": "0.3.41",
4
4
  "description": "Optimized runtime for Marko templates.",
5
5
  "keywords": [
6
6
  "api",