marko 6.0.59 → 6.0.61
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/debug/dom.js +278 -296
- package/dist/debug/dom.mjs +278 -296
- package/dist/debug/html.js +219 -219
- package/dist/debug/html.mjs +169 -169
- package/dist/dom/abort-signal.d.ts +2 -2
- package/dist/dom/control-flow.d.ts +8 -8
- package/dist/dom/controllable.d.ts +11 -11
- package/dist/dom/dom.d.ts +17 -18
- package/dist/dom/event.d.ts +1 -1
- package/dist/dom/queue.d.ts +1 -1
- package/dist/dom/renderer.d.ts +4 -4
- package/dist/dom/resume.d.ts +3 -3
- package/dist/dom/signals.d.ts +14 -14
- package/dist/dom/template.d.ts +1 -1
- package/dist/dom.d.ts +10 -10
- package/dist/dom.js +254 -265
- package/dist/dom.mjs +254 -265
- package/dist/html/attrs.d.ts +14 -14
- package/dist/html/compat.d.ts +5 -5
- package/dist/html/content.d.ts +4 -4
- package/dist/html/dynamic-tag.d.ts +3 -3
- package/dist/html/template.d.ts +1 -1
- package/dist/html/writer.d.ts +26 -26
- package/dist/html.d.ts +5 -5
- package/dist/html.js +210 -210
- package/dist/html.mjs +160 -160
- package/dist/translator/index.js +501 -483
- package/dist/translator/util/runtime.d.ts +8 -8
- package/dist/translator/util/signals.d.ts +1 -1
- package/package.json +1 -1
package/dist/html/attrs.d.ts
CHANGED
@@ -1,18 +1,18 @@
|
|
1
1
|
import { type Accessor } from "../common/types";
|
2
|
-
export declare function
|
3
|
-
export declare function
|
4
|
-
export declare function
|
5
|
-
export declare function
|
6
|
-
export declare function
|
7
|
-
export declare function
|
8
|
-
export declare function
|
9
|
-
export declare function
|
10
|
-
export declare function
|
11
|
-
export declare function
|
12
|
-
export declare function
|
13
|
-
export declare function
|
14
|
-
export declare function
|
15
|
-
export declare function
|
2
|
+
export declare function _attr_class(value: unknown): string;
|
3
|
+
export declare function _attr_style(value: unknown): string;
|
4
|
+
export declare function _attr_option_value(value: unknown): string;
|
5
|
+
export declare function _attr_select_value(scopeId: number, nodeAccessor: Accessor, value: unknown, valueChange: unknown, content?: () => void): void;
|
6
|
+
export declare function _attr_textarea_value(scopeId: number, nodeAccessor: Accessor, value: unknown, valueChange: unknown): string;
|
7
|
+
export declare function _attr_input_value(scopeId: number, nodeAccessor: Accessor, value: unknown, valueChange: unknown): string;
|
8
|
+
export declare function _attr_input_checked(scopeId: number, nodeAccessor: Accessor, checked: unknown, checkedChange: unknown): string;
|
9
|
+
export declare function _attr_input_checkedValue(scopeId: number, nodeAccessor: Accessor, checkedValue: unknown, checkedValueChange: unknown, value: unknown): string;
|
10
|
+
export declare function _attr_details_or_dialog_open(scopeId: number, nodeAccessor: Accessor, open: unknown, openChange: unknown): string;
|
11
|
+
export declare function _attr(name: string, value: unknown): string;
|
12
|
+
export declare function _attrs(data: Record<string, unknown>, nodeAccessor: Accessor, scopeId: number, tagName: string): string;
|
13
|
+
export declare function _attrs_content(data: Record<string, unknown>, nodeAccessor: Accessor, scopeId: number, tagName: string, serializeReason?: 1 | 0): void;
|
14
|
+
export declare function _attrs_partial(data: Record<string, unknown>, skip: Record<string, 1>, nodeAccessor: Accessor, scopeId: number, tagName: string): string;
|
15
|
+
export declare function _attrs_partial_content(data: Record<string, unknown>, skip: Record<string, 1>, nodeAccessor: Accessor, scopeId: number, tagName: string, serializeReason?: 1 | 0): void;
|
16
16
|
export declare function attrAssignment(value: string): string;
|
17
17
|
export declare function escapeSingleQuotedAttrValue(value: string): string;
|
18
18
|
export declare function escapeDoubleQuotedAttrValue(value: string): string;
|
package/dist/html/compat.d.ts
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
import { patchDynamicTag } from "./dynamic-tag";
|
2
2
|
import { type ServerRenderer } from "./template";
|
3
|
-
import {
|
3
|
+
import { _await, _html, _peek_scope_id, _scope_id, $global, Chunk, isInResumedBranch, State, writeScript } from "./writer";
|
4
4
|
export declare const compat: {
|
5
5
|
$global: typeof $global;
|
6
|
-
fork: typeof
|
7
|
-
write: typeof
|
6
|
+
fork: typeof _await;
|
7
|
+
write: typeof _html;
|
8
8
|
writeScript: typeof writeScript;
|
9
|
-
nextScopeId: typeof
|
10
|
-
peekNextScopeId: typeof
|
9
|
+
nextScopeId: typeof _scope_id;
|
10
|
+
peekNextScopeId: typeof _peek_scope_id;
|
11
11
|
isInResumedBranch: typeof isInResumedBranch;
|
12
12
|
ensureState($global: any): State;
|
13
13
|
isTagsAPI(fn: any): boolean;
|
package/dist/html/content.d.ts
CHANGED
@@ -1,5 +1,5 @@
|
|
1
|
-
export declare function
|
2
|
-
export declare function
|
1
|
+
export declare function _unescaped(val: unknown): string;
|
2
|
+
export declare function _escape(val: unknown): string;
|
3
3
|
export declare function escapeTextAreaValue(val: unknown): string;
|
4
|
-
export declare function
|
5
|
-
export declare function
|
4
|
+
export declare function _escape_script(val: unknown): string;
|
5
|
+
export declare function _escape_style(val: unknown): string;
|
@@ -4,8 +4,8 @@ interface BodyContentObject {
|
|
4
4
|
[x: PropertyKey]: unknown;
|
5
5
|
content: ServerRenderer;
|
6
6
|
}
|
7
|
-
export declare let
|
8
|
-
export declare function
|
9
|
-
export declare function
|
7
|
+
export declare let _dynamic_tag: (scopeId: number, accessor: Accessor, tag: unknown | string | ServerRenderer | BodyContentObject, inputOrArgs: unknown, content?: (() => void) | 0, inputIsArgs?: 1, serializeReason?: 1 | 0) => unknown;
|
8
|
+
export declare function _content(id: string, fn: ServerRenderer): ServerRenderer;
|
9
|
+
export declare function _content_resume(id: string, fn: ServerRenderer, scopeId?: number): ServerRenderer;
|
10
10
|
export declare function patchDynamicTag(patch: (scopeId: number, accessor: Accessor, tag: unknown | string | ServerRenderer | BodyContentObject) => unknown): void;
|
11
11
|
export {};
|
package/dist/html/template.d.ts
CHANGED
@@ -2,5 +2,5 @@ import type { Template } from "../common/types";
|
|
2
2
|
export type ServerRenderer = ((...args: unknown[]) => unknown) & {
|
3
3
|
___id?: string;
|
4
4
|
};
|
5
|
-
export declare const
|
5
|
+
export declare const _template: (templateId: string, renderer: ServerRenderer) => Template;
|
6
6
|
export declare function isTemplate(renderer: ServerRenderer | Template): renderer is ServerRenderer & Template;
|
package/dist/html/writer.d.ts
CHANGED
@@ -15,45 +15,45 @@ export declare function getChunk(): Chunk | undefined;
|
|
15
15
|
export declare function getContext(key: keyof NonNullable<Chunk["context"]>): unknown;
|
16
16
|
export declare function getState(): State;
|
17
17
|
export declare function getScopeId(scope: unknown): number | undefined;
|
18
|
-
export declare function
|
18
|
+
export declare function _html(html: string): void;
|
19
19
|
export declare function writeScript(script: string): void;
|
20
|
-
export declare function
|
21
|
-
export declare function
|
20
|
+
export declare function _script(scopeId: number, registryId: string): void;
|
21
|
+
export declare function _attr_content(nodeAccessor: Accessor, scopeId: number, content: unknown, serializeReason?: 1 | 0): void;
|
22
22
|
export declare function normalizeServerRender(value: unknown): ServerRenderer | undefined;
|
23
23
|
export declare function withContext<T>(key: PropertyKey, value: unknown, cb: () => T): T;
|
24
|
-
export declare function
|
25
|
-
export declare function
|
26
|
-
export declare function
|
27
|
-
export declare function
|
28
|
-
export declare function
|
24
|
+
export declare function _var(parentScopeId: number, scopeOffsetAccessor: Accessor, childScopeId: number, registryId: string): void;
|
25
|
+
export declare function _resume<T extends WeakKey>(val: T, id: string, scopeId?: number): T;
|
26
|
+
export declare function _id(): string;
|
27
|
+
export declare function _scope_id(): number;
|
28
|
+
export declare function _peek_scope_id(): number;
|
29
29
|
export declare function getScopeById(scopeId: number | undefined): PartialScope | undefined;
|
30
|
-
export declare function
|
31
|
-
export declare function
|
32
|
-
export declare function
|
33
|
-
export declare function
|
34
|
-
export declare function
|
35
|
-
export declare function
|
30
|
+
export declare function _serialize_if(condition: undefined | 1 | Record<string, 1>, key: string): 1 | undefined;
|
31
|
+
export declare function _serialize_guard(condition: undefined | 1 | Record<string, 1>, key: string): 0 | 1;
|
32
|
+
export declare function _el_resume(scopeId: number, accessor: Accessor, shouldResume?: 0 | 1): string;
|
33
|
+
export declare function _sep(shouldResume: 0 | 1): "" | "<!>";
|
34
|
+
export declare function _el(scopeId: number, id?: string): () => void;
|
35
|
+
export declare function _hoist(scopeId: number, id?: string): {
|
36
36
|
(): void;
|
37
37
|
[Symbol.iterator]: /*elided*/ any;
|
38
38
|
};
|
39
|
-
export declare function
|
39
|
+
export declare function _resume_branch(scopeId: number): void;
|
40
40
|
export declare function isInResumedBranch(): boolean;
|
41
41
|
export declare function withBranchId<T>(branchId: number, cb: () => T): T;
|
42
|
-
export declare function
|
43
|
-
export declare function
|
44
|
-
export declare function
|
45
|
-
export declare function
|
42
|
+
export declare function _for_of(list: Falsy | Iterable<unknown>, cb: (item: unknown, index: number) => void, by: Falsy | ((item: unknown, index: number) => unknown), scopeId: number, accessor: Accessor, serializeBranch?: 0 | 1, serializeMarker?: 0 | 1, parentEndTag?: string | 0, singleNode?: 1): void;
|
43
|
+
export declare function _for_in(obj: Falsy | {}, cb: (key: string, value: unknown) => void, by: Falsy | ((key: string, v: unknown) => unknown), scopeId: number, accessor: Accessor, serializeBranch?: 0 | 1, serializeMarker?: 0 | 1, parentEndTag?: string | 0, singleNode?: 1): void;
|
44
|
+
export declare function _for_to(to: number, from: number | Falsy, step: number | Falsy, cb: (index: number) => void, by: Falsy | ((v: number) => unknown), scopeId: number, accessor: Accessor, serializeBranch?: 0 | 1, serializeMarker?: 0 | 1, parentEndTag?: string | 0, singleNode?: 1): void;
|
45
|
+
export declare function _if(cb: () => void | number, scopeId: number, accessor: Accessor, serializeBranch?: 0 | 1, serializeMarker?: 0 | 1, parentEndTag?: string | 0, singleNode?: 1): void;
|
46
46
|
declare let writeScope: (scopeId: number, partialScope: PartialScope) => ScopeInternals;
|
47
47
|
export declare function writeScopeToState(state: State, scopeId: number, partialScope: PartialScope): ScopeInternals;
|
48
|
-
export { writeScope };
|
49
|
-
export declare function
|
50
|
-
export declare function
|
48
|
+
export { writeScope as _scope };
|
49
|
+
export declare function _existing_scope(scopeId: number): ScopeInternals;
|
50
|
+
export declare function _scope_with_id(scopeId: number): PartialScope;
|
51
51
|
export declare function $global(): $Global & {
|
52
52
|
renderId: string;
|
53
53
|
runtimeId: string;
|
54
54
|
};
|
55
|
-
export declare function
|
56
|
-
export declare function
|
55
|
+
export declare function _await<T>(scopeId: number, accessor: Accessor, promise: Promise<T> | T, content: (value: T) => void, serializeMarker?: 0 | 1): void;
|
56
|
+
export declare function _try(scopeId: number, accessor: Accessor, content: () => void, input: {
|
57
57
|
placeholder?: {
|
58
58
|
content?(): void;
|
59
59
|
};
|
@@ -127,8 +127,8 @@ export declare class Chunk {
|
|
127
127
|
flushScript(): this;
|
128
128
|
flushHTML(): string;
|
129
129
|
}
|
130
|
-
export declare function
|
130
|
+
export declare function _trailers(html: string): void;
|
131
131
|
type QueueCallback = (ticked: true) => void;
|
132
132
|
export declare function queueTick(cb: QueueCallback): void;
|
133
133
|
export declare function offTick(cb: QueueCallback): void;
|
134
|
-
export declare function
|
134
|
+
export declare function _subscribe(subscribers: Set<ScopeInternals>, scope: ScopeInternals): ScopeInternals;
|
package/dist/html.d.ts
CHANGED
@@ -1,8 +1,8 @@
|
|
1
1
|
export { attrTag, attrTags } from "./common/attr-tag";
|
2
|
-
export {
|
2
|
+
export { _attr, _attr_class, _attr_details_or_dialog_open as _attr_details_open, _attr_details_or_dialog_open as _attr_dialog_open, _attr_input_checked, _attr_input_checkedValue, _attr_input_value, _attr_option_value, _attr_select_value, _attr_style, _attr_textarea_value, _attrs, _attrs_content, _attrs_partial, _attrs_partial_content, } from "./html/attrs";
|
3
3
|
export { compat } from "./html/compat";
|
4
|
-
export {
|
5
|
-
export {
|
4
|
+
export { _escape, _escape_script, _escape_style, _unescaped, } from "./html/content";
|
5
|
+
export { _content, _content_resume, _dynamic_tag } from "./html/dynamic-tag";
|
6
6
|
export { forIn, forInBy, forOf, forOfBy, forTo, forToBy } from "./html/for";
|
7
|
-
export {
|
8
|
-
export {
|
7
|
+
export { _template } from "./html/template";
|
8
|
+
export { _attr_content, _await, _el, _el_resume, _existing_scope, _for_in, _for_of, _for_to, _hoist, _html, _id, _if, _peek_scope_id, _resume, _resume_branch, _scope, _scope_id, _scope_with_id, _script, _sep, _serialize_guard, _serialize_if, _subscribe, _trailers, _try, _var, $global, } from "./html/writer";
|