@marko/runtime-tags 0.1.1
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/common/helpers.d.ts +4 -0
- package/dist/common/types.d.ts +90 -0
- package/dist/debug/dom.js +1411 -0
- package/dist/debug/dom.js.map +7 -0
- package/dist/debug/dom.mjs +1388 -0
- package/dist/debug/dom.mjs.map +7 -0
- package/dist/debug/html.js +1323 -0
- package/dist/debug/html.js.map +7 -0
- package/dist/debug/html.mjs +1263 -0
- package/dist/debug/html.mjs.map +7 -0
- package/dist/dom/abort-signal.d.ts +3 -0
- package/dist/dom/control-flow.d.ts +14 -0
- package/dist/dom/dom.d.ts +14 -0
- package/dist/dom/event.d.ts +3 -0
- package/dist/dom/queue.d.ts +10 -0
- package/dist/dom/reconcile-domdiff.d.ts +2 -0
- package/dist/dom/reconcile-listdiff.d.ts +2 -0
- package/dist/dom/reconcile-longest-increasing-subsequence.d.ts +2 -0
- package/dist/dom/reconcile.d.ts +1 -0
- package/dist/dom/renderer.d.ts +20 -0
- package/dist/dom/resume.d.ts +8 -0
- package/dist/dom/schedule.d.ts +2 -0
- package/dist/dom/scope.d.ts +13 -0
- package/dist/dom/signals.d.ts +31 -0
- package/dist/dom/template.d.ts +11 -0
- package/dist/dom/walker.d.ts +4 -0
- package/dist/dom.d.ts +11 -0
- package/dist/dom.js +904 -0
- package/dist/dom.js.map +7 -0
- package/dist/dom.mjs +884 -0
- package/dist/dom.mjs.map +7 -0
- package/dist/html/attrs.d.ts +4 -0
- package/dist/html/content.d.ts +5 -0
- package/dist/html/dynamic-tag.d.ts +12 -0
- package/dist/html/reorder-runtime.d.ts +1 -0
- package/dist/html/serializer.d.ts +38 -0
- package/dist/html/template.d.ts +9 -0
- package/dist/html/writer.d.ts +40 -0
- package/dist/html.d.ts +6 -0
- package/dist/html.js +933 -0
- package/dist/html.js.map +7 -0
- package/dist/html.mjs +876 -0
- package/dist/html.mjs.map +7 -0
- package/package.json +39 -0
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
import type { Renderer as ClientRenderer } from "../dom/renderer";
|
|
2
|
+
export type Renderer = (...args: unknown[]) => unknown;
|
|
3
|
+
export type CommentWalker = TreeWalker & Record<string, Comment>;
|
|
4
|
+
export type Scope<T extends {
|
|
5
|
+
[x: string | number]: unknown;
|
|
6
|
+
} = {
|
|
7
|
+
[x: string | number]: unknown;
|
|
8
|
+
}> = [...unknown[]] & {
|
|
9
|
+
___args: unknown;
|
|
10
|
+
___startNode: Node & ChildNode;
|
|
11
|
+
___endNode: Node & ChildNode;
|
|
12
|
+
___cleanup: Set<Scope> | undefined;
|
|
13
|
+
___client: boolean;
|
|
14
|
+
___bound: Map<unknown, unknown> | undefined;
|
|
15
|
+
___renderer: ClientRenderer | undefined;
|
|
16
|
+
___abortControllers: Map<string | number, AbortController> | undefined;
|
|
17
|
+
$global: Record<string, unknown>;
|
|
18
|
+
_: Scope | undefined;
|
|
19
|
+
[x: string | number]: any;
|
|
20
|
+
} & T;
|
|
21
|
+
export declare enum ResumeSymbol {
|
|
22
|
+
DefaultRuntimeId = "M",
|
|
23
|
+
SectionStart = "[",
|
|
24
|
+
SectionEnd = "]",
|
|
25
|
+
SectionSingleNodesEnd = "|",
|
|
26
|
+
Node = "*",
|
|
27
|
+
PlaceholderStart = "",
|
|
28
|
+
PlaceholderEnd = "",
|
|
29
|
+
ReplacementId = "",
|
|
30
|
+
VarResume = "$h",
|
|
31
|
+
VarReorderRuntime = "$r"
|
|
32
|
+
}
|
|
33
|
+
export declare enum AccessorChar {
|
|
34
|
+
Dynamic = "?",
|
|
35
|
+
Mark = "#",
|
|
36
|
+
Stale = "&",
|
|
37
|
+
Subscribers = "*",
|
|
38
|
+
LifecycleAbortController = "-",
|
|
39
|
+
TagVariable = "/",
|
|
40
|
+
ConditionalScope = "!",
|
|
41
|
+
ConditionalRenderer = "(",
|
|
42
|
+
LoopScopeArray = "!",
|
|
43
|
+
LoopScopeMap = "(",
|
|
44
|
+
LoopValue = ")",
|
|
45
|
+
PreviousAttributes = "~"
|
|
46
|
+
}
|
|
47
|
+
export declare enum NodeType {
|
|
48
|
+
Element = 1,
|
|
49
|
+
Text = 3,
|
|
50
|
+
Comment = 8,
|
|
51
|
+
DocumentFragment = 11
|
|
52
|
+
}
|
|
53
|
+
export declare enum WalkCode {
|
|
54
|
+
Get = 32,
|
|
55
|
+
Before = 33,
|
|
56
|
+
After = 35,
|
|
57
|
+
Inside = 36,
|
|
58
|
+
Replace = 37,
|
|
59
|
+
EndChild = 38,
|
|
60
|
+
BeginChild = 47,
|
|
61
|
+
Next = 67,
|
|
62
|
+
NextEnd = 91,
|
|
63
|
+
Over = 97,
|
|
64
|
+
OverEnd = 106,
|
|
65
|
+
Out = 107,
|
|
66
|
+
OutEnd = 116,
|
|
67
|
+
Multiplier = 117,
|
|
68
|
+
MultiplierEnd = 126
|
|
69
|
+
}
|
|
70
|
+
export declare enum WalkRangeSize {
|
|
71
|
+
Next = 20,// 67 through 91
|
|
72
|
+
Over = 10,// 97 through 106
|
|
73
|
+
Out = 10,// 107 through 116
|
|
74
|
+
Multiplier = 10
|
|
75
|
+
}
|
|
76
|
+
export type Accessor = string | number;
|
|
77
|
+
export type Input = Record<string, unknown>;
|
|
78
|
+
export type Context = Record<string, unknown>;
|
|
79
|
+
export interface Template {
|
|
80
|
+
_: unknown;
|
|
81
|
+
mount(input: Input, reference: ParentNode & Node, position?: InsertPosition): TemplateInstance;
|
|
82
|
+
render(input?: Input): RenderResult;
|
|
83
|
+
}
|
|
84
|
+
export interface TemplateInstance {
|
|
85
|
+
update(input: unknown): void;
|
|
86
|
+
destroy(): void;
|
|
87
|
+
}
|
|
88
|
+
export type RenderResult = Promise<string> & AsyncIterable<string> & {
|
|
89
|
+
toReadable(): ReadableStream;
|
|
90
|
+
};
|