@marko/runtime-tags 0.1.7 → 0.1.9

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.
@@ -0,0 +1,2 @@
1
+ export declare const RENDERER_REGISTER_ID: string;
2
+ export declare const SET_SCOPE_REGISTER_ID: string;
@@ -1,4 +1,4 @@
1
1
  export declare function classValue(value: unknown): string;
2
2
  export declare function styleValue(value: unknown): string;
3
- export declare function isVoid(value: unknown): boolean;
3
+ export declare function isVoid(value: unknown): value is false | null | undefined;
4
4
  export declare function alphaEncode(num: number): string;
@@ -0,0 +1,2 @@
1
+ export declare const DEFAULT_RUNTIME_ID = "M";
2
+ export declare const DEFAULT_RENDER_ID = "_";
@@ -27,7 +27,6 @@ export declare enum ResumeSymbol {
27
27
  PlaceholderStart = "",
28
28
  PlaceholderEnd = "",
29
29
  ReplacementId = "",
30
- VarResume = "$h",
31
30
  VarReorderRuntime = "$r"
32
31
  }
33
32
  export declare enum AccessorChar {
@@ -75,8 +74,19 @@ export declare enum WalkRangeSize {
75
74
  Multiplier = 10
76
75
  }
77
76
  export type Accessor = string | number;
78
- export type Input = Record<string, unknown>;
79
- export type Context = Record<string, unknown>;
77
+ export interface $Global {
78
+ [x: PropertyKey]: unknown;
79
+ signal?: AbortSignal;
80
+ cspNonce?: string;
81
+ renderId?: string;
82
+ runtimeId?: string;
83
+ }
84
+ export interface Input {
85
+ [x: PropertyKey]: unknown;
86
+ }
87
+ export interface TemplateInput extends Input {
88
+ $global?: $Global;
89
+ }
80
90
  export interface Template {
81
91
  _: unknown;
82
92
  mount(input: Input, reference: ParentNode & Node, position?: InsertPosition): TemplateInstance;
@@ -86,6 +96,6 @@ export interface TemplateInstance {
86
96
  update(input: unknown): void;
87
97
  destroy(): void;
88
98
  }
89
- export type RenderResult = Promise<string> & AsyncIterable<string> & {
99
+ export type RenderResult = PromiseLike<string> & AsyncIterable<string> & {
90
100
  toReadable(): ReadableStream;
91
101
  };