@marko/runtime-tags 6.3.7 → 6.3.8
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 +3 -2
- package/dist/debug/dom.mjs +3 -2
- package/dist/dom.js +2 -2
- package/dist/dom.mjs +2 -2
- package/dist/translator/index.js +2 -2
- package/package.json +2 -2
package/dist/debug/dom.js
CHANGED
|
@@ -974,10 +974,11 @@ function _attr_input_checkedValue_script(scope, nodeAccessor) {
|
|
|
974
974
|
syncControllableFormInput(el, hasCheckboxChanged, () => {
|
|
975
975
|
const checkedValueChange = scope["ControlledHandler:" + nodeAccessor];
|
|
976
976
|
if (checkedValueChange) {
|
|
977
|
-
const
|
|
977
|
+
const controlledValueKey = "ControlledValue:" + nodeAccessor;
|
|
978
|
+
const oldValue = scope[controlledValueKey];
|
|
978
979
|
const newValue = Array.isArray(oldValue) ? updateList(oldValue, el.value, el.checked) : el.checked ? el.value : void 0;
|
|
979
980
|
if (el.name && el.type[0] === "r") {
|
|
980
|
-
for (const radio of document.querySelectorAll(`[type=radio][name=${CSS.escape(el.name)}]`)) if (radio.form === el.form) radio.checked = Array.isArray(oldValue) ? oldValue.includes(radio.value) : oldValue === radio.value;
|
|
981
|
+
for (const radio of document.querySelectorAll(`[type=radio][name=${CSS.escape(el.name)}]`)) if (radio.form === el.form) radio.checked = Array.isArray(oldValue) ? oldValue.includes(radio.value) : controlledValueKey in scope ? oldValue === radio.value : radio.defaultChecked;
|
|
981
982
|
} else el.checked = !el.checked;
|
|
982
983
|
checkedValueChange(newValue);
|
|
983
984
|
run();
|
package/dist/debug/dom.mjs
CHANGED
|
@@ -972,10 +972,11 @@ function _attr_input_checkedValue_script(scope, nodeAccessor) {
|
|
|
972
972
|
syncControllableFormInput(el, hasCheckboxChanged, () => {
|
|
973
973
|
const checkedValueChange = scope["ControlledHandler:" + nodeAccessor];
|
|
974
974
|
if (checkedValueChange) {
|
|
975
|
-
const
|
|
975
|
+
const controlledValueKey = "ControlledValue:" + nodeAccessor;
|
|
976
|
+
const oldValue = scope[controlledValueKey];
|
|
976
977
|
const newValue = Array.isArray(oldValue) ? updateList(oldValue, el.value, el.checked) : el.checked ? el.value : void 0;
|
|
977
978
|
if (el.name && el.type[0] === "r") {
|
|
978
|
-
for (const radio of document.querySelectorAll(`[type=radio][name=${CSS.escape(el.name)}]`)) if (radio.form === el.form) radio.checked = Array.isArray(oldValue) ? oldValue.includes(radio.value) : oldValue === radio.value;
|
|
979
|
+
for (const radio of document.querySelectorAll(`[type=radio][name=${CSS.escape(el.name)}]`)) if (radio.form === el.form) radio.checked = Array.isArray(oldValue) ? oldValue.includes(radio.value) : controlledValueKey in scope ? oldValue === radio.value : radio.defaultChecked;
|
|
979
980
|
} else el.checked = !el.checked;
|
|
980
981
|
checkedValueChange(newValue);
|
|
981
982
|
run();
|
package/dist/dom.js
CHANGED
|
@@ -618,8 +618,8 @@ function _attr_input_checkedValue_script(scope, nodeAccessor) {
|
|
|
618
618
|
isResuming && el.defaultChecked && (scope["G" + nodeAccessor] ? scope["G" + nodeAccessor].push(el.value) : scope["G" + nodeAccessor] = el.value), syncControllableFormInput(el, hasCheckboxChanged, () => {
|
|
619
619
|
let checkedValueChange = scope["E" + nodeAccessor];
|
|
620
620
|
if (checkedValueChange) {
|
|
621
|
-
let
|
|
622
|
-
if (el.name && el.type[0] === "r") for (let radio of document.querySelectorAll(`[type=radio][name=${CSS.escape(el.name)}]`)) radio.form === el.form && (radio.checked = Array.isArray(oldValue) ? oldValue.includes(radio.value) : oldValue === radio.value);
|
|
621
|
+
let controlledValueKey = "G" + nodeAccessor, oldValue = scope[controlledValueKey], newValue = Array.isArray(oldValue) ? updateList(oldValue, el.value, el.checked) : el.checked ? el.value : void 0;
|
|
622
|
+
if (el.name && el.type[0] === "r") for (let radio of document.querySelectorAll(`[type=radio][name=${CSS.escape(el.name)}]`)) radio.form === el.form && (radio.checked = Array.isArray(oldValue) ? oldValue.includes(radio.value) : controlledValueKey in scope ? oldValue === radio.value : radio.defaultChecked);
|
|
623
623
|
else el.checked = !el.checked;
|
|
624
624
|
checkedValueChange(newValue), run();
|
|
625
625
|
}
|
package/dist/dom.mjs
CHANGED
|
@@ -617,8 +617,8 @@ function _attr_input_checkedValue_script(scope, nodeAccessor) {
|
|
|
617
617
|
isResuming && el.defaultChecked && (scope["G" + nodeAccessor] ? scope["G" + nodeAccessor].push(el.value) : scope["G" + nodeAccessor] = el.value), syncControllableFormInput(el, hasCheckboxChanged, () => {
|
|
618
618
|
let checkedValueChange = scope["E" + nodeAccessor];
|
|
619
619
|
if (checkedValueChange) {
|
|
620
|
-
let
|
|
621
|
-
if (el.name && el.type[0] === "r") for (let radio of document.querySelectorAll(`[type=radio][name=${CSS.escape(el.name)}]`)) radio.form === el.form && (radio.checked = Array.isArray(oldValue) ? oldValue.includes(radio.value) : oldValue === radio.value);
|
|
620
|
+
let controlledValueKey = "G" + nodeAccessor, oldValue = scope[controlledValueKey], newValue = Array.isArray(oldValue) ? updateList(oldValue, el.value, el.checked) : el.checked ? el.value : void 0;
|
|
621
|
+
if (el.name && el.type[0] === "r") for (let radio of document.querySelectorAll(`[type=radio][name=${CSS.escape(el.name)}]`)) radio.form === el.form && (radio.checked = Array.isArray(oldValue) ? oldValue.includes(radio.value) : controlledValueKey in scope ? oldValue === radio.value : radio.defaultChecked);
|
|
622
622
|
else el.checked = !el.checked;
|
|
623
623
|
checkedValueChange(newValue), run();
|
|
624
624
|
}
|
package/dist/translator/index.js
CHANGED
|
@@ -8676,9 +8676,9 @@ function buildStyleDecls(node) {
|
|
|
8676
8676
|
* `resolveVirtualDependency` hook.
|
|
8677
8677
|
*/
|
|
8678
8678
|
function getStyleImportPath(file, node, names) {
|
|
8679
|
-
const { resolveVirtualDependency } = file.markoOpts;
|
|
8679
|
+
const { resolveVirtualDependency, sourceMaps } = file.markoOpts;
|
|
8680
8680
|
if (!resolveVirtualDependency) return;
|
|
8681
|
-
const { filename
|
|
8681
|
+
const { filename } = file.opts;
|
|
8682
8682
|
let ext = STYLE_EXT_REG.exec(node.rawValue || "")?.[1] || ".css";
|
|
8683
8683
|
if (node.var && !/\.module\./.test(ext)) ext = ".module" + ext;
|
|
8684
8684
|
const program = (0, _marko_compiler_babel_utils.getProgram)().node;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@marko/runtime-tags",
|
|
3
|
-
"version": "6.3.
|
|
3
|
+
"version": "6.3.8",
|
|
4
4
|
"description": "Optimized runtime for Marko templates.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"api",
|
|
@@ -51,7 +51,7 @@
|
|
|
51
51
|
"build": "node -r ~ts ./scripts/bundle.mts"
|
|
52
52
|
},
|
|
53
53
|
"dependencies": {
|
|
54
|
-
"@marko/compiler": "^5.41.
|
|
54
|
+
"@marko/compiler": "^5.41.2",
|
|
55
55
|
"csstype": "^3.2.3",
|
|
56
56
|
"fastest-levenshtein": "^1.0.16",
|
|
57
57
|
"magic-string": "^0.30.21"
|