marko 6.3.55 → 6.4.0
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 +3 -2
- package/dist/common/accessor.d.ts +3 -0
- package/dist/common/accessor.debug.d.ts +3 -0
- package/dist/common/constants/accessor-prefix.d.ts +1 -0
- package/dist/common/constants/accessor-prefix.debug.d.ts +1 -0
- package/dist/common/constants/accessor-prop.d.ts +3 -0
- package/dist/common/constants/accessor-prop.debug.d.ts +3 -0
- package/dist/common/constants/closure-scopes-prop.d.ts +4 -0
- package/dist/common/constants/closure-scopes-prop.debug.d.ts +4 -0
- package/dist/common/types.d.ts +9 -3
- package/dist/debug/dom/catch.feat.js +12 -14
- package/dist/debug/dom/catch.feat.mjs +12 -14
- package/dist/debug/dom/controllable-input.feat.js +1 -1
- package/dist/debug/dom/controllable-input.feat.mjs +1 -1
- package/dist/debug/dom/controllable-open.feat.js +1 -1
- package/dist/debug/dom/controllable-open.feat.mjs +1 -1
- package/dist/debug/dom/controllable-select.feat.js +1 -1
- package/dist/debug/dom/controllable-select.feat.mjs +1 -1
- package/dist/debug/dom/controllable-textarea.feat.js +1 -1
- package/dist/debug/dom/controllable-textarea.feat.mjs +1 -1
- package/dist/debug/dom/controllable.feat.js +1 -1
- package/dist/debug/dom/controllable.feat.mjs +1 -1
- package/dist/debug/dom/dynamic-tag-script.feat.js +1 -1
- package/dist/debug/dom/dynamic-tag-script.feat.mjs +1 -1
- package/dist/debug/dom/dynamic-tag-var.feat.js +1 -1
- package/dist/debug/dom/dynamic-tag-var.feat.mjs +1 -1
- package/dist/debug/dom/lazy.feat.js +4 -0
- package/dist/debug/dom/lazy.feat.mjs +4 -0
- package/dist/debug/dom/placeholder.feat.js +1 -1
- package/dist/debug/dom/placeholder.feat.mjs +1 -1
- package/dist/debug/{dom-CI0Vojyk.js → dom-BRO5aArp.js} +248 -193
- package/dist/debug/{dom-tl43c2wO.mjs → dom-Btj2QJhk.mjs} +225 -176
- package/dist/debug/dom.js +15 -13
- package/dist/debug/dom.mjs +15 -13
- package/dist/debug/html.js +605 -523
- package/dist/debug/html.mjs +604 -524
- package/dist/dom/abort-signal.d.ts +2 -0
- package/dist/dom/catch.feat.js +6 -7
- package/dist/dom/catch.feat.mjs +5 -7
- package/dist/dom/control-flow.d.ts +3 -5
- package/dist/dom/controllable-input.feat.js +3 -2
- package/dist/dom/controllable-input.feat.mjs +1 -1
- package/dist/dom/controllable-open.feat.js +3 -2
- package/dist/dom/controllable-open.feat.mjs +1 -1
- package/dist/dom/controllable-select.feat.js +3 -2
- package/dist/dom/controllable-select.feat.mjs +1 -1
- package/dist/dom/controllable-textarea.feat.js +3 -2
- package/dist/dom/controllable-textarea.feat.mjs +1 -1
- package/dist/dom/controllable.feat.js +3 -2
- package/dist/dom/controllable.feat.mjs +1 -1
- package/dist/dom/dynamic-tag-script.feat.js +3 -2
- package/dist/dom/dynamic-tag-script.feat.mjs +1 -1
- package/dist/dom/dynamic-tag-var.feat.js +2 -1
- package/dist/dom/dynamic-tag-var.feat.mjs +1 -1
- package/dist/dom/lazy.feat.d.ts +1 -0
- package/dist/dom/lazy.feat.js +4 -0
- package/dist/dom/lazy.feat.mjs +4 -0
- package/dist/dom/load.d.ts +3 -3
- package/dist/dom/placeholder.feat.js +4 -3
- package/dist/dom/placeholder.feat.mjs +1 -1
- package/dist/dom/queue.d.ts +2 -4
- package/dist/dom/resume.d.ts +2 -2
- package/dist/dom/scope.d.ts +0 -1
- package/dist/dom/signals.d.ts +1 -1
- package/dist/{dom-4udEPZaj.mjs → dom-B-v8Gw6T.mjs} +122 -92
- package/dist/{dom-C1mr-TA7.js → dom-BSsI9OPC.js} +218 -187
- package/dist/dom.d.ts +1 -1
- package/dist/dom.js +59 -56
- package/dist/dom.mjs +35 -33
- package/dist/html/attrs.d.ts +2 -0
- package/dist/html/writer.d.ts +5 -11
- package/dist/html.d.ts +1 -1
- package/dist/html.js +367 -327
- package/dist/html.mjs +366 -327
- package/dist/translator/index.js +866 -748
- package/dist/translator/util/binding-has-prop.d.ts +2 -0
- package/dist/translator/util/entry-builder.d.ts +2 -0
- package/dist/translator/util/generate-uid.d.ts +5 -0
- package/dist/translator/util/optional.d.ts +1 -3
- package/dist/translator/util/references.d.ts +6 -2
- package/dist/translator/util/runtime.d.ts +3 -3
- package/dist/translator/util/sections.d.ts +8 -2
- package/dist/translator/util/serialize-reasons.d.ts +3 -1
- package/dist/translator/util/setup-work.d.ts +5 -0
- package/dist/translator/util/signals.d.ts +5 -7
- package/dist/translator/util/translate-attrs.d.ts +2 -1
- package/dist/translator/visitors/tag/native-tag.d.ts +1 -0
- package/package.json +3 -3
- package/tags-html.d.ts +4 -3
- package/dist/translator/util/setup-statements.d.ts +0 -5
|
@@ -1,6 +1,8 @@
|
|
|
1
|
+
import { types as t } from "@marko/compiler";
|
|
1
2
|
import { type Opt } from "./optional";
|
|
2
3
|
import type { Binding } from "./references";
|
|
3
4
|
import type { Section } from "./sections";
|
|
5
|
+
export declare function getSectionRendererIdentifier(section: Section): t.Identifier | undefined;
|
|
4
6
|
export declare function isSectionRendererElided(section: Section): boolean;
|
|
5
7
|
export declare function bindingHasProperty(binding: Binding, properties: Opt<string>): boolean;
|
|
6
8
|
export declare function getPropertyPathAlias(binding: Binding, properties: Opt<string>): Binding;
|
|
@@ -10,6 +10,8 @@ declare module "@marko/compiler/dist/types" {
|
|
|
10
10
|
interface EntryState {
|
|
11
11
|
init: boolean;
|
|
12
12
|
load: boolean;
|
|
13
|
+
/** Whether a reached template lazily imports another. */
|
|
14
|
+
lazy: boolean;
|
|
13
15
|
/** Depth of enclosing templates whose modules the bundle already loads:
|
|
14
16
|
* below a root everything arrives through its imports, and a lazy subtree
|
|
15
17
|
* is loaded by its own load entry. */
|
|
@@ -1,5 +1,10 @@
|
|
|
1
1
|
import { types as t } from "@marko/compiler";
|
|
2
2
|
import type { Section } from "./sections";
|
|
3
|
+
declare module "@marko/compiler/dist/types" {
|
|
4
|
+
interface ProgramExtra {
|
|
5
|
+
uidCounts?: Map<string, number>;
|
|
6
|
+
}
|
|
7
|
+
}
|
|
3
8
|
export declare function generateUid(name?: string): string;
|
|
4
9
|
export declare function generateUidIdentifier(name?: string): t.Identifier;
|
|
5
10
|
export declare function getSharedUid(name: string, section?: Section): string;
|
|
@@ -28,19 +28,17 @@ export declare function size<T>(data: Opt<T>): number;
|
|
|
28
28
|
export declare function filter<T>(data: Opt<T>, cb: (item: T) => boolean): Opt<T>;
|
|
29
29
|
export declare function forEach<T>(data: Opt<T>, cb: (item: T, index: number) => void): void;
|
|
30
30
|
export declare function fromIter<T>(data: Iterable<T>): T | Many<T> | undefined;
|
|
31
|
-
export declare function toIter<T>(data: Opt<T>): Iterable<T>;
|
|
32
|
-
export declare function includes<T>(data: Opt<T>, item: T): boolean;
|
|
33
31
|
export declare function find<T>(data: Opt<T>, cb: (item: T, index: number) => boolean): Opt<T>;
|
|
34
32
|
export declare function some<T>(data: Opt<T>, cb: (item: T, index: number) => boolean): boolean;
|
|
35
33
|
export declare function every<T>(data: Opt<T>, cb: (item: T, index: number) => boolean): boolean;
|
|
36
34
|
export declare function reduce<T, R>(data: Opt<T>, cb: (acc: R | undefined, item: T, index: number) => R | undefined): R | undefined;
|
|
37
35
|
export declare function reduce<T, R>(data: Opt<T>, cb: (acc: R, item: T, index: number) => R, initial: R): R;
|
|
38
36
|
export declare function toArray<T, R>(data: Opt<T>, cb: (item: T, index: number) => R): R[];
|
|
37
|
+
export declare function toSet<T>(data: Opt<T>): Set<T>;
|
|
39
38
|
export declare function mapToString<T>(data: Opt<T>, sep: string, cb: (item: T, index: number) => string): string;
|
|
40
39
|
export declare function findSorted<T>(compare: Compare<T>, data: T[], item: T): T | undefined;
|
|
41
40
|
export declare function findIndexSorted<T>(compare: Compare<T>, data: T[], item: T): number;
|
|
42
41
|
export declare function addSorted<T, U extends T[]>(compare: Compare<T>, data: U, item: T): U;
|
|
43
|
-
export declare function addUnique<T>(data: Opt<T>, item: T): OneMany<T>;
|
|
44
42
|
export declare function at<T>(data: Opt<T>, index: number): T | undefined;
|
|
45
43
|
export declare function first<T>(data: OneMany<T>): T;
|
|
46
44
|
export declare function rest<T>(data: OneMany<T>): Opt<T>;
|
|
@@ -36,6 +36,7 @@ export interface Binding {
|
|
|
36
36
|
sources: undefined | Sources;
|
|
37
37
|
/** The intersection whose work computes it, or the nearest one upstream. Set on alias roots only. */
|
|
38
38
|
upstreamIntersection: Intersection | undefined;
|
|
39
|
+
/** Complete only once `finalizeReferences` runs at program analyze exit. */
|
|
39
40
|
reads: Set<ReferencedExtra>;
|
|
40
41
|
aliases: Set<Binding>;
|
|
41
42
|
hoists: SortedOpt<Section>;
|
|
@@ -64,6 +65,7 @@ export interface Binding {
|
|
|
64
65
|
localClosures: Map<Section, Binding> | undefined;
|
|
65
66
|
declared: boolean;
|
|
66
67
|
nullable: boolean;
|
|
68
|
+
/** Settled only once `finalizeReferences` runs at program analyze exit. */
|
|
67
69
|
pruned: boolean | undefined;
|
|
68
70
|
exposed: boolean;
|
|
69
71
|
forcePersist: boolean;
|
|
@@ -163,6 +165,7 @@ declare module "@marko/compiler/dist/types" {
|
|
|
163
165
|
export declare function createBinding(name: string, type: Binding["type"], refSection: Section, upstreamAlias?: Binding["upstreamAlias"], property?: string, excludeProperties?: SortedOpt<string>, loc?: t.SourceLocation | null, refDeclared?: boolean): Binding;
|
|
164
166
|
export declare function getOrCreatePropertyAlias(binding: Binding, property: string): Binding;
|
|
165
167
|
export declare function getPropertyAlias(binding: Binding | undefined, properties: Opt<string>): Binding | undefined;
|
|
168
|
+
export declare function isTagVarRead(tag: t.NodePath<t.MarkoTag>): boolean;
|
|
166
169
|
export declare function trackDomVarReferences(tag: t.NodePath<t.MarkoTag>, binding: Binding): Binding | undefined;
|
|
167
170
|
export declare function trackVarReferences(tag: t.NodePath<t.MarkoTag>, type: BindingType, upstreamAlias?: Binding["upstreamAlias"]): Binding | undefined;
|
|
168
171
|
export declare function trackParamsReferences(body: t.NodePath<t.MarkoTagBody | t.Program>, type: BindingType): Binding | undefined;
|
|
@@ -198,16 +201,17 @@ export declare function getExpressionReads(exprExtra: ReferencedExtra): Opt<Read
|
|
|
198
201
|
export declare function addRead(exprExtra: ReferencedExtra, extra: t.NodeExtra, binding: Binding, section: Section, getter: Getter | undefined): Read;
|
|
199
202
|
export declare function dropNodes(node: t.Node | t.Node[]): void;
|
|
200
203
|
export declare function untrackNode(node: t.Node): void;
|
|
204
|
+
export declare function dropContent(body: t.MarkoTagBody): void;
|
|
201
205
|
export declare function getCanonicalBinding(binding: Binding): Binding;
|
|
202
206
|
export declare function someAlias<A>(binding: Binding, test: (binding: Binding, arg: A) => boolean, arg: A, directOnly?: boolean): boolean;
|
|
203
207
|
export declare function someUpstream<A>(binding: Binding | undefined, test: (binding: Binding, arg: A) => boolean, arg: A): boolean;
|
|
204
208
|
export declare function isDirectAlias(binding: Binding): boolean;
|
|
205
|
-
export declare function getAllTagReferenceNodes(tag: t.MarkoTag, referenceNodes?: t.Node[],
|
|
209
|
+
export declare function getAllTagReferenceNodes(tag: t.MarkoTag, referenceNodes?: t.Node[], collectAttrTag?: (attrTag: t.MarkoTag) => void): t.Node[];
|
|
206
210
|
export declare function getScopeAccessorLiteral(binding: Binding, encoded?: boolean, includeId?: boolean): t.NumericLiteral | t.StringLiteral;
|
|
207
211
|
export declare function getScopeAccessor(binding: Binding, encoded?: boolean, includeId?: boolean): string;
|
|
208
212
|
export declare function getLocalsScopeAccessor(binding: Binding): string;
|
|
209
213
|
export declare function getPrefixedScopeAccessor(binding: Binding, prefix: AccessorPrefix): string;
|
|
210
|
-
export declare function
|
|
214
|
+
export declare function getClosureAccessorLiteral(binding: Binding): t.NumericLiteral | t.StringLiteral;
|
|
211
215
|
export declare function getDebugScopeAccess(binding: Binding): {
|
|
212
216
|
root: Binding;
|
|
213
217
|
access: string;
|
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
import { types as t } from "@marko/compiler";
|
|
2
2
|
import type { Falsy } from "../../common/types";
|
|
3
|
-
import { _attr, _attr_class, _attr_style, _escape,
|
|
3
|
+
import { _attr, _attr_class, _attr_style, _escape, _escape_script, _escape_style, _unescaped } from "../../html";
|
|
4
4
|
export type DOMRuntimeHelpers = keyof typeof import("../../dom");
|
|
5
5
|
export type HTMLRuntimeHelpers = keyof typeof import("../../html");
|
|
6
6
|
export declare function importRuntime(name: DOMRuntimeHelpers | HTMLRuntimeHelpers): t.Identifier;
|
|
7
7
|
export declare function registerRuntimeValue(id: string, value: t.Expression): t.AssignmentExpression;
|
|
8
8
|
export declare function callRuntime(name: DOMRuntimeHelpers | HTMLRuntimeHelpers, ...args: Array<Parameters<typeof t.callExpression>[1][number] | Falsy>): t.CallExpression;
|
|
9
9
|
export declare function dynamicImport(request: string, ...handlers: Array<t.Expression | Falsy>): t.CallExpression;
|
|
10
|
-
export declare const domRuntimeFeatures: readonly ["catch", "controllable", "controllable-input", "controllable-open", "controllable-select", "controllable-textarea", "dynamic-tag-script", "dynamic-tag-var", "placeholder"];
|
|
10
|
+
export declare const domRuntimeFeatures: readonly ["catch", "controllable", "controllable-input", "controllable-open", "controllable-select", "controllable-textarea", "dynamic-tag-script", "dynamic-tag-var", "lazy", "placeholder"];
|
|
11
11
|
export type DOMRuntimeFeature = (typeof domRuntimeFeatures)[number];
|
|
12
12
|
export declare function importRuntimeFeature(feature: DOMRuntimeFeature): void;
|
|
13
|
+
export declare function getRuntimeFeatureImport(feature: DOMRuntimeFeature): t.ImportDeclaration;
|
|
13
14
|
export declare function getHTMLRuntime(): {
|
|
14
15
|
_escape: typeof _escape;
|
|
15
|
-
_escape_comment: typeof _escape_comment;
|
|
16
16
|
_unescaped: typeof _unescaped;
|
|
17
17
|
_attr: typeof _attr;
|
|
18
18
|
_attr_class: typeof _attr_class;
|
|
@@ -63,7 +63,6 @@ export interface Section {
|
|
|
63
63
|
referencedHoists: ReferencedBindings;
|
|
64
64
|
bindings: ReferencedBindings;
|
|
65
65
|
hoisted: ReferencedBindings;
|
|
66
|
-
hoistedTo: ReferencedBindings;
|
|
67
66
|
serializeReason: undefined | SerializeReason;
|
|
68
67
|
serializeReasons: Map<symbol, SerializeReason>;
|
|
69
68
|
/** Reasons any of the section's dom nodes resumes, as the analyzed reasons
|
|
@@ -80,7 +79,8 @@ export interface Section {
|
|
|
80
79
|
returnSerializeReason: SerializeReason | undefined;
|
|
81
80
|
isHoistThrough: true | undefined;
|
|
82
81
|
upstreamExpression: t.NodeExtra | undefined;
|
|
83
|
-
/** For a `<define>` body
|
|
82
|
+
/** For a `<define>` body or a template rendering itself, the sections whose
|
|
83
|
+
* direct calls render it. */
|
|
84
84
|
callSections: SortedOpt<Section>;
|
|
85
85
|
/** The content's rendering tag (its extra), and each child binding the
|
|
86
86
|
* content feeds, at `properties`. */
|
|
@@ -90,11 +90,16 @@ export interface Section {
|
|
|
90
90
|
properties: Opt<string>;
|
|
91
91
|
exprs: KnownExprs | undefined;
|
|
92
92
|
} | undefined;
|
|
93
|
+
/** Content a known child never reads, which no output renders. */
|
|
94
|
+
pruned: boolean;
|
|
93
95
|
hasAbortSignal: boolean;
|
|
94
96
|
/** Count of distinct `$signal` expression roots; analyze allocates each
|
|
95
97
|
* root's `abortId` from this so translates read, never re-derive. */
|
|
96
98
|
abortSignalExprs: number;
|
|
97
99
|
readsOwner: boolean;
|
|
100
|
+
/** Whether analysis found work keyed by setup in the section, or in a
|
|
101
|
+
* `<define>` body or template it calls in place. */
|
|
102
|
+
hasSetupWork: boolean;
|
|
98
103
|
isBranch: boolean;
|
|
99
104
|
content: null | {
|
|
100
105
|
startType: ContentType;
|
|
@@ -116,6 +121,7 @@ export declare const sectionUtil: Sorted<Section>;
|
|
|
116
121
|
export declare function startSection(path: t.NodePath<t.MarkoTagBody | t.Program>): Section | undefined;
|
|
117
122
|
export declare function getOrCreateSection(path: t.NodePath<any>): Section;
|
|
118
123
|
export declare function getSectionForBody(body: t.NodePath<t.MarkoTagBody | t.Program>): Section | undefined;
|
|
124
|
+
export declare function removePrunedContent(tag: t.NodePath<t.MarkoTag>): void;
|
|
119
125
|
export declare function getSection(path: t.NodePath): Section;
|
|
120
126
|
export declare const getScopeIdIdentifier: (section: Section) => t.Identifier;
|
|
121
127
|
export declare const getSectionParentIsOwner: (section: Section) => boolean, setSectionParentIsOwner: (section: Section, value: boolean) => void;
|
|
@@ -2,7 +2,7 @@ import { types as t } from "@marko/compiler";
|
|
|
2
2
|
import { AccessorPrefix, AccessorProp } from "../../common/types";
|
|
3
3
|
import { type Opt, Sorted, type SortedOneMany } from "./optional";
|
|
4
4
|
import { type Binding, type KnownExprs, type ReferencedBindings, type Sources } from "./references";
|
|
5
|
-
import { type Section } from "./sections";
|
|
5
|
+
import { type ParamSerializeReasonGroups, type Section } from "./sections";
|
|
6
6
|
export type SerializeReasons = SortedOneMany<Sources>;
|
|
7
7
|
export declare const sourcesUtil: Sorted<Sources>;
|
|
8
8
|
export type SerializeReason = Sources;
|
|
@@ -30,6 +30,8 @@ export declare function mapParamReason(program: Section, reason: Sources, exprs:
|
|
|
30
30
|
export declare function mergeSerializeReasons(a: SerializeReason, b: undefined | SerializeReason): SerializeReason;
|
|
31
31
|
export declare function mergeSerializeReasons(a: undefined | SerializeReason, b: SerializeReason): SerializeReason;
|
|
32
32
|
export declare function mergeSerializeReasons(a: undefined | SerializeReason, b: undefined | SerializeReason): SerializeReason | undefined;
|
|
33
|
+
export declare function isOwnResumeReason(reason: SerializeReason | undefined): boolean;
|
|
33
34
|
export declare function applySerializeExprs(section: Section): void;
|
|
34
35
|
export declare function finalizeSerializeReason(section: Section): void;
|
|
35
36
|
export declare function getSerializeReasonsVersion(): number;
|
|
37
|
+
export declare function setParamReasonGroups(section: Section, groups: ParamSerializeReasonGroups): void;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import type { types as t } from "@marko/compiler";
|
|
2
|
+
import { type Section } from "./sections";
|
|
3
|
+
export declare function addSetupWork(section: Section): void;
|
|
4
|
+
export declare function addSetupExpr(section: Section, node: t.Node | undefined): void;
|
|
5
|
+
export declare function finalizeSetupWork(): void;
|
|
@@ -12,22 +12,20 @@ export interface Signal {
|
|
|
12
12
|
referenced?: boolean;
|
|
13
13
|
values: Array<{
|
|
14
14
|
signal: Signal;
|
|
15
|
-
|
|
15
|
+
/** None for a signal that runs on the scope alone. */
|
|
16
|
+
value: t.Expression | undefined;
|
|
16
17
|
}>;
|
|
17
18
|
intersection: Opt<Signal>;
|
|
18
19
|
/** Signals this one forwards into: they must declare first when the
|
|
19
20
|
* forward simplifies to a bare, eagerly evaluated reference. */
|
|
20
21
|
forwards: Opt<Signal>;
|
|
21
|
-
/** Runs before `render`: registrations (eg `_var`) that an earlier tag's
|
|
22
|
-
* synchronous `_return` may reach before the registering tag's own setup. */
|
|
23
|
-
prepare: t.Statement[];
|
|
24
22
|
render: t.Statement[];
|
|
25
23
|
effect: t.Statement[];
|
|
26
24
|
hasHTMLEffect: boolean;
|
|
27
25
|
hasSideEffect: boolean;
|
|
28
26
|
forcePersist: boolean;
|
|
29
27
|
inline: {
|
|
30
|
-
value: t.Expression;
|
|
28
|
+
value: t.Expression | undefined;
|
|
31
29
|
} | undefined;
|
|
32
30
|
export: boolean;
|
|
33
31
|
extraArgs: t.Expression[] | undefined;
|
|
@@ -55,8 +53,8 @@ export declare function signalHasStatements(signal: Signal): boolean;
|
|
|
55
53
|
export declare function getSignalFn(signal: Signal): t.Expression;
|
|
56
54
|
export declare function getSignalValueIdentifier(signal: Signal): t.Identifier;
|
|
57
55
|
export declare function replaceNullishAndEmptyFunctionsWith0(args: (t.Expression | undefined | false)[]): t.Expression[];
|
|
58
|
-
export declare function addStatement(type: "
|
|
59
|
-
export declare function addValue(targetSection: Section, referencedBindings: ReferencedBindings, signal: Signal, value
|
|
56
|
+
export declare function addStatement(type: "render" | "effect", targetSection: Section, referencedBindings: ReferencedBindings, statement: t.Statement | t.Statement[], isPure?: boolean): void;
|
|
57
|
+
export declare function addValue(targetSection: Section, referencedBindings: ReferencedBindings, signal: Signal, value?: t.Expression): void;
|
|
60
58
|
export declare function getResumeRegisterId(section: Section, referencedBindings: string | ReferencedBindings, type?: string): string;
|
|
61
59
|
export declare function writeSignals(section: Section): Set<Signal>;
|
|
62
60
|
export declare function writeRegisteredFns(): void;
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import { types as t } from "@marko/compiler";
|
|
2
2
|
import { type BindingPropTree } from "./binding-prop-tree";
|
|
3
3
|
import { type AttrTagLookup } from "./nested-attribute-tags";
|
|
4
|
+
import { type SortedOpt } from "./optional";
|
|
4
5
|
type ContentKey = "renderBody" | "content";
|
|
5
|
-
export declare function translateAttrs(tag: t.NodePath<t.MarkoTag>, propTree?: BindingPropTree | true, skip?:
|
|
6
|
+
export declare function translateAttrs(tag: t.NodePath<t.MarkoTag>, propTree?: BindingPropTree | true, skip?: SortedOpt<string>, statements?: t.Statement[], contentKey?: ContentKey): {
|
|
6
7
|
properties: (t.ObjectMethod | t.ObjectProperty | t.SpreadElement)[];
|
|
7
8
|
statements: t.Statement[];
|
|
8
9
|
};
|
|
@@ -33,3 +33,4 @@ export declare function controllableClaimFor(tagName: string | undefined): "_con
|
|
|
33
33
|
* kind at run time, and a run-time tag name can be any of them. */
|
|
34
34
|
export declare function controllableFeatureFor(tagName: string | undefined): "controllable" | "controllable-input" | "controllable-open" | "controllable-select" | "controllable-textarea" | undefined;
|
|
35
35
|
export declare function enableControllable(feature: DOMRuntimeFeature | undefined): void;
|
|
36
|
+
export declare function isPageElement(tagName: string): boolean;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "marko",
|
|
3
|
-
"version": "6.
|
|
3
|
+
"version": "6.4.0",
|
|
4
4
|
"description": "Optimized runtime for Marko templates.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"api",
|
|
@@ -51,13 +51,13 @@
|
|
|
51
51
|
}
|
|
52
52
|
},
|
|
53
53
|
"dependencies": {
|
|
54
|
-
"@marko/compiler": "^5.42.
|
|
54
|
+
"@marko/compiler": "^5.42.10",
|
|
55
55
|
"csstype": "^3.2.3",
|
|
56
56
|
"fastest-levenshtein": "^1.0.16",
|
|
57
57
|
"magic-string": "^0.30.21"
|
|
58
58
|
},
|
|
59
59
|
"devDependencies": {
|
|
60
|
-
"@marko/runtime-tags": "npm:marko@6.
|
|
60
|
+
"@marko/runtime-tags": "npm:marko@6.4.0",
|
|
61
61
|
"marko": "5.39.44"
|
|
62
62
|
},
|
|
63
63
|
"engines": {
|
package/tags-html.d.ts
CHANGED
|
@@ -1662,7 +1662,8 @@ declare global {
|
|
|
1662
1662
|
*/
|
|
1663
1663
|
type?: AttrMissing | "context" | "toolbar";
|
|
1664
1664
|
}
|
|
1665
|
-
|
|
1665
|
+
// The one tag whose `content` is its HTML attribute instead of its body.
|
|
1666
|
+
interface Meta extends Omit<HTMLAttributes<HTMLMetaElement>, "content"> {
|
|
1666
1667
|
/**
|
|
1667
1668
|
* Specifies the character encoding for the HTML document.
|
|
1668
1669
|
* @see https://html.spec.whatwg.org/multipage/semantics.html#attr-meta-charset
|
|
@@ -4413,7 +4414,7 @@ declare global {
|
|
|
4413
4414
|
* @see Marko.Body
|
|
4414
4415
|
*/
|
|
4415
4416
|
content?:
|
|
4416
|
-
|
|
|
4417
|
+
| AttrMissing
|
|
4417
4418
|
| Marko.Body<[], void>
|
|
4418
4419
|
| Marko.Template<Record<any, never>, void>;
|
|
4419
4420
|
|
|
@@ -4466,7 +4467,7 @@ declare global {
|
|
|
4466
4467
|
* @see Marko.Body
|
|
4467
4468
|
*/
|
|
4468
4469
|
content?:
|
|
4469
|
-
|
|
|
4470
|
+
| AttrMissing
|
|
4470
4471
|
| Marko.Body<[], void>
|
|
4471
4472
|
| Marko.Template<Record<any, never>, void>;
|
|
4472
4473
|
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
import type { types as t } from "@marko/compiler";
|
|
2
|
-
import type { Section } from "./sections";
|
|
3
|
-
export declare function addSetupStatement(section: Section): void;
|
|
4
|
-
export declare function addSetupExpr(section: Section, node: t.Node | undefined): void;
|
|
5
|
-
export declare function sectionHasSetupStatements(section: Section): boolean;
|