@marko/runtime-tags 0.1.14 → 0.1.16
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/for.d.ts +5 -0
- package/dist/common/helpers.d.ts +1 -0
- package/dist/common/types.d.ts +0 -4
- package/dist/debug/dom.js +278 -284
- package/dist/debug/dom.mjs +278 -284
- package/dist/debug/html.js +77 -34
- package/dist/debug/html.mjs +72 -34
- package/dist/dom/control-flow.d.ts +8 -8
- package/dist/dom/parse-html.d.ts +5 -0
- package/dist/dom/reconcile.d.ts +2 -1
- package/dist/dom/renderer.d.ts +7 -5
- package/dist/dom/resume.d.ts +1 -2
- package/dist/dom/scope.d.ts +0 -5
- package/dist/dom/signals.d.ts +2 -2
- package/dist/dom/template.d.ts +2 -10
- package/dist/dom.d.ts +4 -3
- package/dist/dom.js +231 -236
- package/dist/dom.mjs +231 -236
- package/dist/html/compat.d.ts +2 -2
- package/dist/html/dynamic-tag.d.ts +6 -7
- package/dist/html/template.d.ts +3 -31
- package/dist/html/writer.d.ts +1 -0
- package/dist/html.d.ts +3 -1
- package/dist/html.js +56 -29
- package/dist/html.mjs +51 -29
- package/package.json +1 -1
- package/dist/dom/reconcile-domdiff.d.ts +0 -2
- package/dist/dom/reconcile-listdiff.d.ts +0 -2
- package/dist/dom/reconcile-longest-increasing-subsequence.d.ts +0 -2
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
type Falsy = undefined | null | false | 0 | "";
|
|
2
|
+
export declare function forIn<V extends {}>(obj: Falsy | V, cb: <K extends keyof V>(key: K, value: V[K]) => void): void;
|
|
3
|
+
export declare function forOf<T, V extends Iterable<T>>(list: Falsy | V, cb: (item: T, index: number) => void): void;
|
|
4
|
+
export declare function forTo(to: number, from: number | Falsy, step: number | Falsy, cb: (index: number) => void): void;
|
|
5
|
+
export {};
|
package/dist/common/helpers.d.ts
CHANGED
|
@@ -2,3 +2,4 @@ export declare function classValue(value: unknown): string;
|
|
|
2
2
|
export declare function styleValue(value: unknown): string;
|
|
3
3
|
export declare function isVoid(value: unknown): value is false | null | undefined;
|
|
4
4
|
export declare function alphaEncode(num: number): string;
|
|
5
|
+
export declare function normalizeDynamicRenderer<Renderer>(value: any): Renderer | string | undefined;
|
package/dist/common/types.d.ts
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import type { Renderer as ClientRenderer } from "../dom/renderer";
|
|
2
|
-
export type Renderer = (...args: unknown[]) => unknown;
|
|
3
2
|
export type CommentWalker = TreeWalker & Record<string, Comment>;
|
|
4
3
|
export type Scope<T extends {
|
|
5
4
|
[x: string | number]: unknown;
|
|
@@ -47,8 +46,6 @@ export declare enum NodeType {
|
|
|
47
46
|
}
|
|
48
47
|
export declare enum WalkCode {
|
|
49
48
|
Get = 32,
|
|
50
|
-
Before = 33,
|
|
51
|
-
After = 35,
|
|
52
49
|
Inside = 36,
|
|
53
50
|
Replace = 37,
|
|
54
51
|
EndChild = 38,
|
|
@@ -83,7 +80,6 @@ export interface TemplateInput extends Input {
|
|
|
83
80
|
$global?: $Global;
|
|
84
81
|
}
|
|
85
82
|
export interface Template {
|
|
86
|
-
_: unknown;
|
|
87
83
|
mount(input: Input, reference: ParentNode & Node, position?: InsertPosition): TemplateInstance;
|
|
88
84
|
render(input?: Input): RenderResult;
|
|
89
85
|
}
|