marko 6.4.9 → 6.4.10
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/cheatsheet.md +1 -1
- package/dist/debug/dom/catch.feat.js +2 -3
- package/dist/debug/dom/catch.feat.mjs +2 -3
- package/dist/debug/dom/controllable-input.feat.js +2 -3
- package/dist/debug/dom/controllable-input.feat.mjs +2 -3
- package/dist/debug/dom/controllable-open.feat.js +2 -3
- package/dist/debug/dom/controllable-open.feat.mjs +2 -3
- package/dist/debug/dom/controllable-select.feat.js +2 -3
- package/dist/debug/dom/controllable-select.feat.mjs +2 -3
- package/dist/debug/dom/controllable-textarea.feat.js +2 -3
- package/dist/debug/dom/controllable-textarea.feat.mjs +2 -3
- package/dist/debug/dom/controllable.feat.js +2 -3
- package/dist/debug/dom/controllable.feat.mjs +2 -3
- package/dist/debug/dom/dynamic-tag-script.feat.js +2 -3
- package/dist/debug/dom/dynamic-tag-script.feat.mjs +2 -3
- package/dist/debug/dom/dynamic-tag-var.feat.js +2 -3
- package/dist/debug/dom/dynamic-tag-var.feat.mjs +2 -3
- package/dist/debug/dom/lazy.feat.js +2 -3
- package/dist/debug/dom/lazy.feat.mjs +2 -3
- package/dist/debug/dom/placeholder.feat.js +2 -3
- package/dist/debug/dom/placeholder.feat.mjs +2 -3
- package/dist/debug/{dom-VKjkbuuo.mjs → dom-C1V5vpFs.mjs} +24 -48
- package/dist/debug/{dom-QkYva5Qx.js → dom-DNB5yq3U.js} +24 -48
- package/dist/debug/dom.js +6 -11
- package/dist/debug/dom.mjs +6 -11
- package/dist/debug/html.js +19 -38
- package/dist/debug/html.mjs +19 -38
- package/dist/dom/catch.feat.js +2 -3
- package/dist/dom/catch.feat.mjs +2 -3
- package/dist/dom/controllable-input.feat.js +1 -2
- package/dist/dom/controllable-input.feat.mjs +1 -2
- package/dist/dom/controllable-open.feat.js +2 -3
- package/dist/dom/controllable-open.feat.mjs +2 -3
- package/dist/dom/controllable-select.feat.js +2 -3
- package/dist/dom/controllable-select.feat.mjs +2 -3
- package/dist/dom/controllable-textarea.feat.js +2 -3
- package/dist/dom/controllable-textarea.feat.mjs +2 -3
- package/dist/dom/controllable.feat.js +1 -2
- package/dist/dom/controllable.feat.mjs +1 -2
- package/dist/dom/dynamic-tag-script.feat.js +2 -3
- package/dist/dom/dynamic-tag-script.feat.mjs +2 -3
- package/dist/dom/dynamic-tag-var.feat.js +1 -2
- package/dist/dom/dynamic-tag-var.feat.mjs +1 -2
- package/dist/dom/lazy.feat.js +2 -3
- package/dist/dom/lazy.feat.mjs +2 -3
- package/dist/dom/placeholder.feat.js +2 -3
- package/dist/dom/placeholder.feat.mjs +2 -3
- package/dist/{dom-IujlfJ6b.js → dom-C2-Flitp.js} +40 -60
- package/dist/{dom-DtKQb840.mjs → dom-DsHYWMCR.mjs} +40 -61
- package/dist/dom.js +6 -10
- package/dist/dom.mjs +6 -11
- package/dist/html.js +39 -59
- package/dist/html.mjs +39 -60
- package/dist/translator/index.js +222 -355
- package/dist/translator/util/assert.d.ts +9 -2
- package/dist/translator/util/known-tag.d.ts +3 -0
- package/dist/translator/util/sources.d.ts +1 -1
- package/dist/translator/util/tag-name-type.d.ts +3 -0
- package/package.json +6 -6
- package/tags/lifecycle.d.marko +2 -0
|
@@ -1,8 +1,14 @@
|
|
|
1
1
|
import { types as t } from "@marko/compiler";
|
|
2
2
|
import { type ForType } from "./branch-tag";
|
|
3
3
|
export declare function assertNoSpreadAttrs(tag: t.NodePath<t.MarkoTag>): void;
|
|
4
|
-
export declare function assertOnlyValueAttr(tag: t.NodePath<t.MarkoTag>, required: true, change?: boolean, hint?: (attr: t.MarkoAttribute) => string | undefined):
|
|
5
|
-
|
|
4
|
+
export declare function assertOnlyValueAttr(tag: t.NodePath<t.MarkoTag>, required: true, change?: boolean, hint?: (attr: t.MarkoAttribute) => string | undefined): {
|
|
5
|
+
valueAttr: t.MarkoAttribute;
|
|
6
|
+
valueChangeAttr: t.MarkoAttribute | undefined;
|
|
7
|
+
};
|
|
8
|
+
export declare function assertOnlyValueAttr(tag: t.NodePath<t.MarkoTag>, required?: boolean, change?: boolean, hint?: (attr: t.MarkoAttribute) => string | undefined): {
|
|
9
|
+
valueAttr: t.MarkoAttribute | undefined;
|
|
10
|
+
valueChangeAttr: t.MarkoAttribute | undefined;
|
|
11
|
+
};
|
|
6
12
|
export declare function assertHasVar(tag: t.NodePath<t.MarkoTag>, hint?: string | ((tag: t.NodePath<t.MarkoTag>) => string)): void;
|
|
7
13
|
export declare function assertIdentifierVar(tag: t.NodePath<t.MarkoTag>): void;
|
|
8
14
|
export declare function assertNoTagVarMutation(tag: t.NodePath<t.MarkoTag>): void;
|
|
@@ -10,6 +16,7 @@ export declare function assertHasBody(tag: t.NodePath<t.MarkoTag>): void;
|
|
|
10
16
|
export declare function assertNoBodyContent(tag: t.NodePath<t.MarkoTag>): void;
|
|
11
17
|
export declare function buildAttrsError(tag: t.NodePath<t.MarkoTag>, attrs: t.MarkoTag["attributes"], msg: string): Error;
|
|
12
18
|
export declare function buildAttrNameError(tag: t.NodePath<t.MarkoTag>, attr: t.MarkoAttribute, msg: string): Error;
|
|
19
|
+
export declare function buildDuplicateAttrError(tag: t.NodePath<t.MarkoTag>, attr: t.MarkoAttribute): Error;
|
|
13
20
|
/** The loop a `<for>` tag's attributes run, which it requires. */
|
|
14
21
|
export declare function assertForType(tag: t.NodePath<t.MarkoTag>): ForType;
|
|
15
22
|
/** The attributes a loop of `type` takes, besides `by=`. */
|
|
@@ -6,6 +6,7 @@ import { type Section } from "./sections";
|
|
|
6
6
|
import { type Sources } from "./sources";
|
|
7
7
|
declare const kParamsTree: unique symbol;
|
|
8
8
|
declare const kKnownExprs: unique symbol;
|
|
9
|
+
declare const kPassesInput: unique symbol;
|
|
9
10
|
declare module "@marko/compiler/dist/types" {
|
|
10
11
|
interface MarkoTagExtra {
|
|
11
12
|
/** The dom binding a known tag holds its child's scope in. */
|
|
@@ -15,6 +16,8 @@ declare module "@marko/compiler/dist/types" {
|
|
|
15
16
|
/** The child's params tree the call site was analyzed against. */
|
|
16
17
|
[kParamsTree]?: ParamsTree;
|
|
17
18
|
[kKnownExprs]?: KnownExprs;
|
|
19
|
+
/** The call passes its input after its arguments, as written in source. */
|
|
20
|
+
[kPassesInput]?: boolean;
|
|
18
21
|
}
|
|
19
22
|
}
|
|
20
23
|
export interface KnownTagExtra extends t.MarkoTagExtra {
|
|
@@ -18,5 +18,5 @@ export declare function compareSources(a: Sources, b: Sources): number;
|
|
|
18
18
|
export declare function mergeSources(a: Sources, b: undefined | Sources): Sources;
|
|
19
19
|
export declare function mergeSources(a: undefined | Sources, b: Sources): Sources;
|
|
20
20
|
export declare function mergeSources(a: undefined | Sources, b: undefined | Sources): Sources | undefined;
|
|
21
|
-
export declare function isInParams(binding: Binding, params: Sources["param"]): boolean;
|
|
22
21
|
export declare function isSupersetSources(a: Binding, b: Binding): boolean;
|
|
22
|
+
export declare function isCoveredParam(binding: Binding | undefined, params: Sources["param"]): boolean;
|
|
@@ -28,6 +28,9 @@ declare module "@marko/compiler/dist/types" {
|
|
|
28
28
|
type TagNameType = TagNameType.Value;
|
|
29
29
|
export { TagNameType };
|
|
30
30
|
export default function analyzeTagNameType(tag: t.NodePath<t.MarkoTag>): TagNameType.Value;
|
|
31
|
+
/** A native element by its name alone: the tag lookup's verdict on a string, or
|
|
32
|
+
* a template literal without expressions. Loads no template, so pre-analyze may ask. */
|
|
33
|
+
export declare function isStaticNativeTag(tag: t.NodePath<t.MarkoTag>): boolean;
|
|
31
34
|
export declare function getTagRelativePath(tag: t.NodePath<t.MarkoTag>): string;
|
|
32
35
|
/**
|
|
33
36
|
* A known wrong tag that resolves to nothing, eg `interface P { id: number }`,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "marko",
|
|
3
|
-
"version": "6.4.
|
|
3
|
+
"version": "6.4.10",
|
|
4
4
|
"description": "Optimized runtime for Marko templates.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"api",
|
|
@@ -51,17 +51,17 @@
|
|
|
51
51
|
}
|
|
52
52
|
},
|
|
53
53
|
"dependencies": {
|
|
54
|
-
"@marko/compiler": "^5.42.
|
|
54
|
+
"@marko/compiler": "^5.42.16",
|
|
55
55
|
"csstype": "^3.2.3",
|
|
56
56
|
"fastest-levenshtein": "^1.0.16",
|
|
57
|
-
"magic-string": "^
|
|
57
|
+
"magic-string": "^1.4.5"
|
|
58
58
|
},
|
|
59
59
|
"devDependencies": {
|
|
60
|
-
"@marko/runtime-tags": "npm:marko@6.4.
|
|
61
|
-
"marko": "5.39.
|
|
60
|
+
"@marko/runtime-tags": "npm:marko@6.4.10",
|
|
61
|
+
"marko": "5.39.49"
|
|
62
62
|
},
|
|
63
63
|
"engines": {
|
|
64
|
-
"node": ">=22"
|
|
64
|
+
"node": ">=22.12.0"
|
|
65
65
|
},
|
|
66
66
|
"exports:override": {
|
|
67
67
|
".": {
|
package/tags/lifecycle.d.marko
CHANGED
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
/** File for types only, not actual implementation **/
|
|
2
2
|
|
|
3
|
+
/* `R` is inferred from what `onMount` returns, so a return value read from `this`
|
|
4
|
+
is circular; such a tag passes its type explicitly (`<lifecycle<{ … }>>`). */
|
|
3
5
|
export type Input<
|
|
4
6
|
T extends object,
|
|
5
7
|
R extends object = {},
|