marko 5.38.22 → 5.38.24
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.
|
@@ -7,7 +7,11 @@
|
|
|
7
7
|
}
|
|
8
8
|
};
|
|
9
9
|
module.exports = function (input) {
|
|
10
|
-
if (
|
|
11
|
-
|
|
10
|
+
if (input.toJSON) {
|
|
11
|
+
return input;
|
|
12
|
+
} else {
|
|
13
|
+
const newInput = { ...input };
|
|
14
|
+
Object.defineProperty(newInput, "toJSON", toJSONDescriptor);
|
|
15
|
+
return newInput;
|
|
12
16
|
}
|
|
13
17
|
};
|
package/dist/translator/index.js
CHANGED
|
@@ -426,6 +426,28 @@ const translate = exports.translate = {
|
|
|
426
426
|
);
|
|
427
427
|
}
|
|
428
428
|
|
|
429
|
+
let inputName = "input";
|
|
430
|
+
|
|
431
|
+
if (meta.implicitSplitComponent && isHTML) {
|
|
432
|
+
inputName = path.scope.generateUid(inputName);
|
|
433
|
+
renderBlock.unshiftContainer(
|
|
434
|
+
"body",
|
|
435
|
+
_compiler.types.variableDeclaration("const", [
|
|
436
|
+
_compiler.types.variableDeclarator(
|
|
437
|
+
_compiler.types.identifier("input"),
|
|
438
|
+
_compiler.types.callExpression(
|
|
439
|
+
(0, _babelUtils.importDefault)(
|
|
440
|
+
file,
|
|
441
|
+
"marko/src/runtime/helpers/skip-serialize.js",
|
|
442
|
+
"marko_skip_serialize"
|
|
443
|
+
),
|
|
444
|
+
[_compiler.types.identifier(inputName)]
|
|
445
|
+
)
|
|
446
|
+
)]
|
|
447
|
+
)
|
|
448
|
+
);
|
|
449
|
+
}
|
|
450
|
+
|
|
429
451
|
let rendererAssignment = _compiler.types.assignmentExpression(
|
|
430
452
|
"=",
|
|
431
453
|
templateRendererMember,
|
|
@@ -433,7 +455,7 @@ const translate = exports.translate = {
|
|
|
433
455
|
_compiler.types.functionExpression(
|
|
434
456
|
null,
|
|
435
457
|
[
|
|
436
|
-
_compiler.types.identifier(
|
|
458
|
+
_compiler.types.identifier(inputName),
|
|
437
459
|
_compiler.types.identifier("out"),
|
|
438
460
|
file._componentDefIdentifier,
|
|
439
461
|
file._componentInstanceIdentifier,
|
|
@@ -464,22 +486,6 @@ const translate = exports.translate = {
|
|
|
464
486
|
|
|
465
487
|
path.pushContainer("body", _compiler.types.expressionStatement(rendererAssignment));
|
|
466
488
|
|
|
467
|
-
if (meta.implicitSplitComponent && isHTML) {
|
|
468
|
-
renderBlock.unshiftContainer(
|
|
469
|
-
"body",
|
|
470
|
-
_compiler.types.expressionStatement(
|
|
471
|
-
_compiler.types.callExpression(
|
|
472
|
-
(0, _babelUtils.importDefault)(
|
|
473
|
-
file,
|
|
474
|
-
"marko/src/runtime/helpers/skip-serialize.js",
|
|
475
|
-
"marko_skip_serialize"
|
|
476
|
-
),
|
|
477
|
-
[_compiler.types.identifier("input")]
|
|
478
|
-
)
|
|
479
|
-
)
|
|
480
|
-
);
|
|
481
|
-
}
|
|
482
|
-
|
|
483
489
|
renderBlock.remove();
|
|
484
490
|
|
|
485
491
|
if (!isHTML) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "marko",
|
|
3
|
-
"version": "5.38.
|
|
3
|
+
"version": "5.38.24",
|
|
4
4
|
"description": "UI Components + streaming, async, high performance, HTML templating for Node.js and the browser.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"front-end",
|
|
@@ -70,7 +70,7 @@
|
|
|
70
70
|
},
|
|
71
71
|
"dependencies": {
|
|
72
72
|
"@marko/compiler": "^5.39.53",
|
|
73
|
-
"@marko/runtime-tags": "^6.0.
|
|
73
|
+
"@marko/runtime-tags": "^6.0.145",
|
|
74
74
|
"app-module-path": "^2.2.0",
|
|
75
75
|
"argly": "^1.2.0",
|
|
76
76
|
"browser-refresh-client": "1.1.4",
|
|
@@ -7,7 +7,11 @@ var toJSONDescriptor = {
|
|
|
7
7
|
},
|
|
8
8
|
};
|
|
9
9
|
module.exports = function (input) {
|
|
10
|
-
if (
|
|
11
|
-
|
|
10
|
+
if (input.toJSON) {
|
|
11
|
+
return input;
|
|
12
|
+
} else {
|
|
13
|
+
const newInput = { ...input };
|
|
14
|
+
Object.defineProperty(newInput, "toJSON", toJSONDescriptor);
|
|
15
|
+
return newInput;
|
|
12
16
|
}
|
|
13
17
|
};
|
package/src/translator/index.js
CHANGED
|
@@ -426,6 +426,28 @@ export const translate = {
|
|
|
426
426
|
);
|
|
427
427
|
}
|
|
428
428
|
|
|
429
|
+
let inputName = "input";
|
|
430
|
+
|
|
431
|
+
if (meta.implicitSplitComponent && isHTML) {
|
|
432
|
+
inputName = path.scope.generateUid(inputName);
|
|
433
|
+
renderBlock.unshiftContainer(
|
|
434
|
+
"body",
|
|
435
|
+
t.variableDeclaration("const", [
|
|
436
|
+
t.variableDeclarator(
|
|
437
|
+
t.identifier("input"),
|
|
438
|
+
t.callExpression(
|
|
439
|
+
importDefault(
|
|
440
|
+
file,
|
|
441
|
+
"marko/src/runtime/helpers/skip-serialize.js",
|
|
442
|
+
"marko_skip_serialize",
|
|
443
|
+
),
|
|
444
|
+
[t.identifier(inputName)],
|
|
445
|
+
),
|
|
446
|
+
),
|
|
447
|
+
]),
|
|
448
|
+
);
|
|
449
|
+
}
|
|
450
|
+
|
|
429
451
|
let rendererAssignment = t.assignmentExpression(
|
|
430
452
|
"=",
|
|
431
453
|
templateRendererMember,
|
|
@@ -433,7 +455,7 @@ export const translate = {
|
|
|
433
455
|
t.functionExpression(
|
|
434
456
|
null,
|
|
435
457
|
[
|
|
436
|
-
t.identifier(
|
|
458
|
+
t.identifier(inputName),
|
|
437
459
|
t.identifier("out"),
|
|
438
460
|
file._componentDefIdentifier,
|
|
439
461
|
file._componentInstanceIdentifier,
|
|
@@ -464,22 +486,6 @@ export const translate = {
|
|
|
464
486
|
|
|
465
487
|
path.pushContainer("body", t.expressionStatement(rendererAssignment));
|
|
466
488
|
|
|
467
|
-
if (meta.implicitSplitComponent && isHTML) {
|
|
468
|
-
renderBlock.unshiftContainer(
|
|
469
|
-
"body",
|
|
470
|
-
t.expressionStatement(
|
|
471
|
-
t.callExpression(
|
|
472
|
-
importDefault(
|
|
473
|
-
file,
|
|
474
|
-
"marko/src/runtime/helpers/skip-serialize.js",
|
|
475
|
-
"marko_skip_serialize",
|
|
476
|
-
),
|
|
477
|
-
[t.identifier("input")],
|
|
478
|
-
),
|
|
479
|
-
),
|
|
480
|
-
);
|
|
481
|
-
}
|
|
482
|
-
|
|
483
489
|
renderBlock.remove();
|
|
484
490
|
|
|
485
491
|
if (!isHTML) {
|
package/tags-html.d.ts
CHANGED
|
@@ -705,6 +705,12 @@ declare global {
|
|
|
705
705
|
}
|
|
706
706
|
interface Dfn extends HTMLAttributes<HTMLElement> {}
|
|
707
707
|
interface Dialog extends HTMLAttributes<HTMLDialogElement> {
|
|
708
|
+
/**
|
|
709
|
+
* Specifies the types of user actions that can be used to close the `<dialog>` element.
|
|
710
|
+
* @see https://html.spec.whatwg.org/multipage/interactive-elements.html#attr-dialog-closedby
|
|
711
|
+
*/
|
|
712
|
+
closedby?: AttrMissing | "any" | "closerequest" | "none";
|
|
713
|
+
|
|
708
714
|
/**
|
|
709
715
|
* Specifies whether the `<dialog>` element is open.
|
|
710
716
|
* @see https://html.spec.whatwg.org/multipage/interactive-elements.html#attr-dialog-open
|