@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.
Files changed (44) hide show
  1. package/dist/common/helpers.d.ts +4 -0
  2. package/dist/common/types.d.ts +90 -0
  3. package/dist/debug/dom.js +1411 -0
  4. package/dist/debug/dom.js.map +7 -0
  5. package/dist/debug/dom.mjs +1388 -0
  6. package/dist/debug/dom.mjs.map +7 -0
  7. package/dist/debug/html.js +1323 -0
  8. package/dist/debug/html.js.map +7 -0
  9. package/dist/debug/html.mjs +1263 -0
  10. package/dist/debug/html.mjs.map +7 -0
  11. package/dist/dom/abort-signal.d.ts +3 -0
  12. package/dist/dom/control-flow.d.ts +14 -0
  13. package/dist/dom/dom.d.ts +14 -0
  14. package/dist/dom/event.d.ts +3 -0
  15. package/dist/dom/queue.d.ts +10 -0
  16. package/dist/dom/reconcile-domdiff.d.ts +2 -0
  17. package/dist/dom/reconcile-listdiff.d.ts +2 -0
  18. package/dist/dom/reconcile-longest-increasing-subsequence.d.ts +2 -0
  19. package/dist/dom/reconcile.d.ts +1 -0
  20. package/dist/dom/renderer.d.ts +20 -0
  21. package/dist/dom/resume.d.ts +8 -0
  22. package/dist/dom/schedule.d.ts +2 -0
  23. package/dist/dom/scope.d.ts +13 -0
  24. package/dist/dom/signals.d.ts +31 -0
  25. package/dist/dom/template.d.ts +11 -0
  26. package/dist/dom/walker.d.ts +4 -0
  27. package/dist/dom.d.ts +11 -0
  28. package/dist/dom.js +904 -0
  29. package/dist/dom.js.map +7 -0
  30. package/dist/dom.mjs +884 -0
  31. package/dist/dom.mjs.map +7 -0
  32. package/dist/html/attrs.d.ts +4 -0
  33. package/dist/html/content.d.ts +5 -0
  34. package/dist/html/dynamic-tag.d.ts +12 -0
  35. package/dist/html/reorder-runtime.d.ts +1 -0
  36. package/dist/html/serializer.d.ts +38 -0
  37. package/dist/html/template.d.ts +9 -0
  38. package/dist/html/writer.d.ts +40 -0
  39. package/dist/html.d.ts +6 -0
  40. package/dist/html.js +933 -0
  41. package/dist/html.js.map +7 -0
  42. package/dist/html.mjs +876 -0
  43. package/dist/html.mjs.map +7 -0
  44. package/package.json +39 -0
@@ -0,0 +1,4 @@
1
+ export declare function classValue(value: unknown): string;
2
+ export declare function styleValue(value: unknown): string;
3
+ export declare function isVoid(value: unknown): boolean;
4
+ export declare function alphaEncode(num: number): string;
@@ -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
+ };