@monimesl/dot-core 0.1.0-alpha.10
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/README.md +1 -0
- package/dist/index.d.ts +975 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +1059 -0
- package/dist/index.js.map +1 -0
- package/package.json +43 -0
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,975 @@
|
|
|
1
|
+
//#region src/event/core.d.ts
|
|
2
|
+
interface DotEvent<Detail = unknown, Data = Readonly<Record<string, unknown>>> {
|
|
3
|
+
readonly type: string;
|
|
4
|
+
readonly detail: Detail;
|
|
5
|
+
readonly data: Data;
|
|
6
|
+
}
|
|
7
|
+
export declare function createEvent<Detail = Record<string, never>>(type: string, detail?: Detail, data?: Readonly<Record<string, unknown>>): DotEvent<Detail>;
|
|
8
|
+
//#endregion
|
|
9
|
+
//#region src/view/component.d.ts
|
|
10
|
+
interface PropTypes {
|
|
11
|
+
string: string;
|
|
12
|
+
number: number;
|
|
13
|
+
boolean: boolean;
|
|
14
|
+
any: unknown;
|
|
15
|
+
}
|
|
16
|
+
type PropType = keyof PropTypes | readonly string[];
|
|
17
|
+
type PropValue<T extends PropType> = T extends readonly string[] ? T[number] : T extends keyof PropTypes ? PropTypes[T] : never;
|
|
18
|
+
type ChildrenType = 'none' | 'text' | 'elements';
|
|
19
|
+
interface ComponentManifest<Name extends string = string, Props extends Record<string, PropType> = Record<string, PropType>, Events extends string = string, Children extends ChildrenType = ChildrenType> {
|
|
20
|
+
readonly name: Name;
|
|
21
|
+
readonly props: Props;
|
|
22
|
+
readonly events: readonly Events[];
|
|
23
|
+
readonly children: Children;
|
|
24
|
+
readonly inline?: boolean;
|
|
25
|
+
readonly overrides?: readonly PropOverride[];
|
|
26
|
+
}
|
|
27
|
+
interface PropOverride {
|
|
28
|
+
prop: string;
|
|
29
|
+
ignores: string;
|
|
30
|
+
because: string;
|
|
31
|
+
}
|
|
32
|
+
export declare function defineComponent<const Name extends string, const Props extends Record<string, PropType> = Record<never, PropType>, const Events extends string = never, const Children extends ChildrenType = ChildrenType>(manifest: {
|
|
33
|
+
name: Name;
|
|
34
|
+
props?: Props;
|
|
35
|
+
events?: readonly Events[];
|
|
36
|
+
children: Children;
|
|
37
|
+
inline?: boolean;
|
|
38
|
+
overrides?: readonly PropOverride[];
|
|
39
|
+
}): ComponentManifest<Name, Props, Events, Children>;
|
|
40
|
+
type EventProp<Event extends string> = `on${Capitalize<Event>}`;
|
|
41
|
+
export declare function eventProp<Event extends string>(event: Event): EventProp<Event>;
|
|
42
|
+
export declare function isEventProp(name: string): boolean;
|
|
43
|
+
export declare function eventName(prop: string): string;
|
|
44
|
+
type PropsOf<M extends ComponentManifest, Children = never> = { [K in keyof M['props']]?: PropValue<M['props'][K]> | undefined; } & { [E in M['events'][number] as EventProp<E>]?: ((event: DotEvent) => void) | undefined; } & (M['children'] extends 'none' ? unknown : {
|
|
45
|
+
children?: Children | undefined;
|
|
46
|
+
});
|
|
47
|
+
type ComponentRegistry = Readonly<Record<string, ComponentManifest>>;
|
|
48
|
+
export declare function componentRegistry(manifests: Iterable<ComponentManifest>): ComponentRegistry;
|
|
49
|
+
//#endregion
|
|
50
|
+
//#region src/theme/theme.d.ts
|
|
51
|
+
interface Theme {
|
|
52
|
+
scheme?: ColorScheme | 'system' | undefined;
|
|
53
|
+
colors?: ThemeColors | undefined;
|
|
54
|
+
density?: ThemeDensity | undefined;
|
|
55
|
+
shape?: ThemeShape | undefined;
|
|
56
|
+
}
|
|
57
|
+
type ThemeDensity = 'dense' | 'compact' | 'comfortable';
|
|
58
|
+
type ThemeShape = 'square' | 'subtle' | 'soft' | 'rounded';
|
|
59
|
+
interface ThemeColors {
|
|
60
|
+
primary?: SchemeColor | undefined;
|
|
61
|
+
background?: SchemeColor | undefined;
|
|
62
|
+
surface?: SchemeColor | undefined;
|
|
63
|
+
text?: SchemeColor | undefined;
|
|
64
|
+
}
|
|
65
|
+
interface SchemeColor {
|
|
66
|
+
light?: HexColor | undefined;
|
|
67
|
+
dark?: HexColor | undefined;
|
|
68
|
+
}
|
|
69
|
+
type HexColor = `#${string}`;
|
|
70
|
+
type ColorScheme = 'light' | 'dark';
|
|
71
|
+
//#endregion
|
|
72
|
+
//#region src/host/context.d.ts
|
|
73
|
+
type AppState = 'active' | 'background';
|
|
74
|
+
interface SystemContext {
|
|
75
|
+
readonly scheme: ColorScheme;
|
|
76
|
+
readonly appState: AppState;
|
|
77
|
+
}
|
|
78
|
+
export declare const DEFAULT_SYSTEM_CONTEXT: SystemContext;
|
|
79
|
+
//#endregion
|
|
80
|
+
//#region src/host/calls.d.ts
|
|
81
|
+
type HostErrorCode = 'unsupported' | 'denied' | 'cancelled' | 'timeout' | 'invalid' | 'failed';
|
|
82
|
+
export declare class HostError extends Error {
|
|
83
|
+
readonly name = "HostError";
|
|
84
|
+
readonly code: HostErrorCode;
|
|
85
|
+
constructor(code: HostErrorCode, message: string);
|
|
86
|
+
}
|
|
87
|
+
interface HostCallOptions {
|
|
88
|
+
timeout?: number | undefined;
|
|
89
|
+
}
|
|
90
|
+
interface HostRequest<T> extends Promise<T> {
|
|
91
|
+
cancel(): void;
|
|
92
|
+
}
|
|
93
|
+
type HostCaller = (method: string, params: unknown, options: HostCallOptions) => HostRequest<unknown>;
|
|
94
|
+
export declare function connectHost(caller: HostCaller | null): void;
|
|
95
|
+
export declare function callHost<Result>(method: string, params: unknown, options?: HostCallOptions): HostRequest<Result>;
|
|
96
|
+
export declare function createHostRequest<Result>(promise: Promise<Result>, cancel?: () => void): HostRequest<Result>;
|
|
97
|
+
//#endregion
|
|
98
|
+
//#region src/page/bars.d.ts
|
|
99
|
+
interface NavigationBarOptions {
|
|
100
|
+
title?: string | undefined;
|
|
101
|
+
hidden?: boolean | undefined;
|
|
102
|
+
backgroundColor?: string | undefined;
|
|
103
|
+
textColor?: string | undefined;
|
|
104
|
+
}
|
|
105
|
+
interface TabBarOptions {
|
|
106
|
+
hidden?: boolean | undefined;
|
|
107
|
+
}
|
|
108
|
+
interface PageConfigs {
|
|
109
|
+
navigationBar?: NavigationBarOptions | undefined;
|
|
110
|
+
tabBar?: TabBarOptions | undefined;
|
|
111
|
+
}
|
|
112
|
+
interface PageBars {
|
|
113
|
+
navigationBar: NavigationBarOptions;
|
|
114
|
+
tabBar: TabBarOptions;
|
|
115
|
+
}
|
|
116
|
+
export declare function checkNavigationBar(options: NavigationBarOptions): void;
|
|
117
|
+
export declare function checkTabBar(options: TabBarOptions): void;
|
|
118
|
+
export declare function checkConfigs(configs: PageConfigs): void;
|
|
119
|
+
export declare function mergeConfigs(...configs: (PageConfigs | undefined)[]): PageBars;
|
|
120
|
+
//#endregion
|
|
121
|
+
//#region src/page/navigation.d.ts
|
|
122
|
+
export declare const MAX_STACK_DEPTH = 8;
|
|
123
|
+
export declare function isPageId(value: string): boolean;
|
|
124
|
+
type PageLaunchOptions = Readonly<Record<string, string>>;
|
|
125
|
+
type Navigation = {
|
|
126
|
+
readonly action: 'push' | 'replace' | 'reset';
|
|
127
|
+
readonly page: string;
|
|
128
|
+
readonly options: PageLaunchOptions;
|
|
129
|
+
} | {
|
|
130
|
+
readonly action: 'back';
|
|
131
|
+
readonly delta: number;
|
|
132
|
+
};
|
|
133
|
+
interface StackEntry {
|
|
134
|
+
readonly instanceId: number;
|
|
135
|
+
readonly page: string;
|
|
136
|
+
readonly options: PageLaunchOptions;
|
|
137
|
+
}
|
|
138
|
+
export declare class NavigationStack {
|
|
139
|
+
#private;
|
|
140
|
+
readonly limit: number;
|
|
141
|
+
constructor(limit?: number);
|
|
142
|
+
get pages(): readonly StackEntry[];
|
|
143
|
+
get top(): StackEntry | undefined;
|
|
144
|
+
apply(navigation: Navigation): boolean;
|
|
145
|
+
}
|
|
146
|
+
//#endregion
|
|
147
|
+
//#region src/protocol/core.d.ts
|
|
148
|
+
type PageState = Record<string, unknown>;
|
|
149
|
+
interface UILayerMessages {
|
|
150
|
+
connect: Record<string, never>;
|
|
151
|
+
load: {
|
|
152
|
+
instanceId: number;
|
|
153
|
+
page: string;
|
|
154
|
+
options: PageLaunchOptions;
|
|
155
|
+
};
|
|
156
|
+
unload: {
|
|
157
|
+
instanceId: number;
|
|
158
|
+
};
|
|
159
|
+
show: {
|
|
160
|
+
instanceId: number;
|
|
161
|
+
};
|
|
162
|
+
hide: {
|
|
163
|
+
instanceId: number;
|
|
164
|
+
};
|
|
165
|
+
event: {
|
|
166
|
+
instanceId: number;
|
|
167
|
+
handler: string;
|
|
168
|
+
event: DotEvent;
|
|
169
|
+
};
|
|
170
|
+
}
|
|
171
|
+
interface LogicLayerMessages {
|
|
172
|
+
setTheme: {
|
|
173
|
+
theme: Theme;
|
|
174
|
+
};
|
|
175
|
+
initPageState: {
|
|
176
|
+
instanceId: number;
|
|
177
|
+
state: PageState;
|
|
178
|
+
};
|
|
179
|
+
setPageState: {
|
|
180
|
+
instanceId: number;
|
|
181
|
+
patchState: PageState;
|
|
182
|
+
};
|
|
183
|
+
error: {
|
|
184
|
+
instanceId?: number;
|
|
185
|
+
message: string;
|
|
186
|
+
};
|
|
187
|
+
navigate: Navigation & {
|
|
188
|
+
from: number;
|
|
189
|
+
};
|
|
190
|
+
hostCall: {
|
|
191
|
+
id: number;
|
|
192
|
+
method: string;
|
|
193
|
+
params: unknown;
|
|
194
|
+
timeout?: number;
|
|
195
|
+
};
|
|
196
|
+
hostCancel: {
|
|
197
|
+
id: number;
|
|
198
|
+
};
|
|
199
|
+
pageBars: {
|
|
200
|
+
instanceId: number;
|
|
201
|
+
} & PageBars;
|
|
202
|
+
}
|
|
203
|
+
interface HostLayerMessages {
|
|
204
|
+
syncStack: {
|
|
205
|
+
pages: readonly StackEntry[];
|
|
206
|
+
limit: number;
|
|
207
|
+
};
|
|
208
|
+
syncSystemContext: SystemContext;
|
|
209
|
+
hostResult: HostResult;
|
|
210
|
+
}
|
|
211
|
+
type HostResult = {
|
|
212
|
+
id: number;
|
|
213
|
+
value: unknown;
|
|
214
|
+
} | {
|
|
215
|
+
id: number;
|
|
216
|
+
error: {
|
|
217
|
+
code: HostErrorCode;
|
|
218
|
+
message: string;
|
|
219
|
+
};
|
|
220
|
+
};
|
|
221
|
+
interface Envelope<Type extends string = string, Payload = unknown> {
|
|
222
|
+
readonly type: Type;
|
|
223
|
+
readonly payload: Payload;
|
|
224
|
+
}
|
|
225
|
+
type MessageMap = object;
|
|
226
|
+
type MessageType<M extends MessageMap> = keyof M & string;
|
|
227
|
+
//#endregion
|
|
228
|
+
//#region src/view/renderer.d.ts
|
|
229
|
+
interface RenderContext<Node> {
|
|
230
|
+
readonly h: (type: string, props: Record<string, unknown> | null, ...children: (Node | string)[]) => Node;
|
|
231
|
+
readonly on: (handler: string, data?: Readonly<Record<string, unknown>>) => (event: DotEvent) => void;
|
|
232
|
+
readonly text: (value: unknown) => string;
|
|
233
|
+
readonly each: (items: unknown, render: (item: unknown, index: number) => (Node | string)[], key?: (item: unknown, index: number) => unknown) => Node;
|
|
234
|
+
}
|
|
235
|
+
type ViewRender = <Node>(state: PageState, context: RenderContext<Node>) => Node;
|
|
236
|
+
//#endregion
|
|
237
|
+
//#region src/view/values.d.ts
|
|
238
|
+
export declare function toText(value: unknown): string;
|
|
239
|
+
export declare function toList(value: unknown): readonly unknown[];
|
|
240
|
+
//#endregion
|
|
241
|
+
//#region src/view/components/amount-input.d.ts
|
|
242
|
+
export declare const AmountInput: ComponentManifest<"AmountInput", {
|
|
243
|
+
readonly value: "number";
|
|
244
|
+
readonly currency: "string";
|
|
245
|
+
readonly minorUnits: "number";
|
|
246
|
+
readonly unit: readonly ["minor", "major"];
|
|
247
|
+
readonly label: "string";
|
|
248
|
+
readonly placeholder: "string";
|
|
249
|
+
readonly hint: "string";
|
|
250
|
+
readonly error: "string";
|
|
251
|
+
readonly disabled: "boolean";
|
|
252
|
+
}, "change", "none">;
|
|
253
|
+
//#endregion
|
|
254
|
+
//#region src/view/components/button.d.ts
|
|
255
|
+
export declare const Button: ComponentManifest<"Button", {
|
|
256
|
+
readonly variant: readonly ["primary", "secondary"];
|
|
257
|
+
readonly disabled: "boolean";
|
|
258
|
+
readonly loading: "boolean";
|
|
259
|
+
}, "click", "text">;
|
|
260
|
+
//#endregion
|
|
261
|
+
//#region src/view/components/carousel.d.ts
|
|
262
|
+
export declare const Carousel: ComponentManifest<"Carousel", {
|
|
263
|
+
readonly padding: readonly ["none", "small", "medium", "large"];
|
|
264
|
+
readonly paddingTop: readonly ["none", "small", "medium", "large"];
|
|
265
|
+
readonly paddingStart: readonly ["none", "small", "medium", "large"];
|
|
266
|
+
readonly paddingEnd: readonly ["none", "small", "medium", "large"];
|
|
267
|
+
readonly paddingBottom: readonly ["none", "small", "medium", "large"];
|
|
268
|
+
readonly autoplay: "boolean";
|
|
269
|
+
readonly interval: "number";
|
|
270
|
+
readonly loop: "boolean";
|
|
271
|
+
readonly indicator: readonly ["dots", "none"];
|
|
272
|
+
readonly gap: readonly ["none", "small", "medium", "large"];
|
|
273
|
+
readonly effect: readonly ["slide", "scale"];
|
|
274
|
+
readonly index: "number";
|
|
275
|
+
}, "change", "elements">;
|
|
276
|
+
//#endregion
|
|
277
|
+
//#region src/view/components/chip.d.ts
|
|
278
|
+
export declare const Chip: ComponentManifest<"Chip", {
|
|
279
|
+
readonly label: "string";
|
|
280
|
+
readonly icon: readonly ["arrow-down", "arrow-left", "arrow-right", "arrow-up", "bank", "bell", "bolt", "calendar", "card", "cart", "cash", "check", "chevron-down", "chevron-left", "chevron-right", "chevron-up", "clock", "close", "copy", "download", "edit", "error", "external-link", "eye", "eye-off", "file", "gift", "globe", "grid", "headphones", "heart", "help", "history", "home", "image", "info", "link", "list", "location", "lock", "logout", "mail", "microphone", "minus", "mobile", "more", "music", "phone", "playlist", "plus", "qr-code", "receipt", "refresh", "search", "send", "settings", "share", "star", "success", "ticket", "trash", "upload", "user", "users", "video", "wallet", "warning", "water", "wifi"];
|
|
281
|
+
readonly selected: "boolean";
|
|
282
|
+
readonly disabled: "boolean";
|
|
283
|
+
}, "tap", "none">;
|
|
284
|
+
//#endregion
|
|
285
|
+
//#region src/view/components/code-input.d.ts
|
|
286
|
+
export declare const CodeInput: ComponentManifest<"CodeInput", {
|
|
287
|
+
readonly value: "string";
|
|
288
|
+
readonly length: "number";
|
|
289
|
+
readonly label: "string";
|
|
290
|
+
readonly hint: "string";
|
|
291
|
+
readonly error: "string";
|
|
292
|
+
readonly secure: "boolean";
|
|
293
|
+
readonly disabled: "boolean";
|
|
294
|
+
}, "change" | "complete", "none">;
|
|
295
|
+
//#endregion
|
|
296
|
+
//#region src/view/components/detail-row.d.ts
|
|
297
|
+
export declare const DetailRow: ComponentManifest<"DetailRow", {
|
|
298
|
+
readonly padding: readonly ["none", "small", "medium", "large"];
|
|
299
|
+
readonly paddingTop: readonly ["none", "small", "medium", "large"];
|
|
300
|
+
readonly paddingStart: readonly ["none", "small", "medium", "large"];
|
|
301
|
+
readonly paddingEnd: readonly ["none", "small", "medium", "large"];
|
|
302
|
+
readonly paddingBottom: readonly ["none", "small", "medium", "large"];
|
|
303
|
+
readonly label: "string";
|
|
304
|
+
readonly value: "string";
|
|
305
|
+
readonly tone: readonly ["default", "muted", "info", "success", "warning", "danger"];
|
|
306
|
+
readonly weight: readonly ["regular", "medium", "bold"];
|
|
307
|
+
}, never, "none">;
|
|
308
|
+
//#endregion
|
|
309
|
+
//#region src/view/components/divider.d.ts
|
|
310
|
+
export declare const Divider: ComponentManifest<"Divider", Record<never, PropType>, never, "none">;
|
|
311
|
+
//#endregion
|
|
312
|
+
//#region src/view/components/empty-state.d.ts
|
|
313
|
+
export declare const EmptyState: ComponentManifest<"EmptyState", {
|
|
314
|
+
readonly padding: readonly ["none", "small", "medium", "large"];
|
|
315
|
+
readonly paddingTop: readonly ["none", "small", "medium", "large"];
|
|
316
|
+
readonly paddingStart: readonly ["none", "small", "medium", "large"];
|
|
317
|
+
readonly paddingEnd: readonly ["none", "small", "medium", "large"];
|
|
318
|
+
readonly paddingBottom: readonly ["none", "small", "medium", "large"];
|
|
319
|
+
readonly icon: readonly ["arrow-down", "arrow-left", "arrow-right", "arrow-up", "bank", "bell", "bolt", "calendar", "card", "cart", "cash", "check", "chevron-down", "chevron-left", "chevron-right", "chevron-up", "clock", "close", "copy", "download", "edit", "error", "external-link", "eye", "eye-off", "file", "gift", "globe", "grid", "headphones", "heart", "help", "history", "home", "image", "info", "link", "list", "location", "lock", "logout", "mail", "microphone", "minus", "mobile", "more", "music", "phone", "playlist", "plus", "qr-code", "receipt", "refresh", "search", "send", "settings", "share", "star", "success", "ticket", "trash", "upload", "user", "users", "video", "wallet", "warning", "water", "wifi"];
|
|
320
|
+
readonly title: "string";
|
|
321
|
+
readonly text: "string";
|
|
322
|
+
}, never, "elements">;
|
|
323
|
+
//#endregion
|
|
324
|
+
//#region src/view/components/feedback.d.ts
|
|
325
|
+
export declare const Spinner: ComponentManifest<"Spinner", {
|
|
326
|
+
readonly size: readonly ["small", "medium", "large"];
|
|
327
|
+
}, never, "none">;
|
|
328
|
+
export declare const ProgressBar: ComponentManifest<"ProgressBar", {
|
|
329
|
+
readonly value: "number";
|
|
330
|
+
}, never, "none">;
|
|
331
|
+
export declare const Notice: ComponentManifest<"Notice", {
|
|
332
|
+
readonly padding: readonly ["none", "small", "medium", "large"];
|
|
333
|
+
readonly paddingTop: readonly ["none", "small", "medium", "large"];
|
|
334
|
+
readonly paddingStart: readonly ["none", "small", "medium", "large"];
|
|
335
|
+
readonly paddingEnd: readonly ["none", "small", "medium", "large"];
|
|
336
|
+
readonly paddingBottom: readonly ["none", "small", "medium", "large"];
|
|
337
|
+
readonly tone: readonly ["default", "info", "success", "warning", "danger"];
|
|
338
|
+
readonly title: "string";
|
|
339
|
+
}, never, "text">;
|
|
340
|
+
export declare const Badge: ComponentManifest<"Badge", {
|
|
341
|
+
readonly tone: readonly ["default", "info", "success", "warning", "danger"];
|
|
342
|
+
}, never, "text">;
|
|
343
|
+
//#endregion
|
|
344
|
+
//#region src/view/components/footer.d.ts
|
|
345
|
+
export declare const Footer: ComponentManifest<"Footer", {
|
|
346
|
+
readonly padding: readonly ["none", "small", "medium", "large"];
|
|
347
|
+
readonly paddingTop: readonly ["none", "small", "medium", "large"];
|
|
348
|
+
readonly paddingStart: readonly ["none", "small", "medium", "large"];
|
|
349
|
+
readonly paddingEnd: readonly ["none", "small", "medium", "large"];
|
|
350
|
+
readonly paddingBottom: readonly ["none", "small", "medium", "large"];
|
|
351
|
+
}, never, "elements">;
|
|
352
|
+
//#endregion
|
|
353
|
+
//#region src/view/components/grid.d.ts
|
|
354
|
+
export declare const Grid: ComponentManifest<"Grid", {
|
|
355
|
+
readonly padding: readonly ["none", "small", "medium", "large"];
|
|
356
|
+
readonly paddingTop: readonly ["none", "small", "medium", "large"];
|
|
357
|
+
readonly paddingStart: readonly ["none", "small", "medium", "large"];
|
|
358
|
+
readonly paddingEnd: readonly ["none", "small", "medium", "large"];
|
|
359
|
+
readonly paddingBottom: readonly ["none", "small", "medium", "large"];
|
|
360
|
+
readonly columns: "number";
|
|
361
|
+
readonly gap: readonly ["none", "small", "medium", "large"];
|
|
362
|
+
}, never, "elements">;
|
|
363
|
+
export declare const GridItem: ComponentManifest<"GridItem", {
|
|
364
|
+
readonly label: "string";
|
|
365
|
+
readonly icon: readonly ["arrow-down", "arrow-left", "arrow-right", "arrow-up", "bank", "bell", "bolt", "calendar", "card", "cart", "cash", "check", "chevron-down", "chevron-left", "chevron-right", "chevron-up", "clock", "close", "copy", "download", "edit", "error", "external-link", "eye", "eye-off", "file", "gift", "globe", "grid", "headphones", "heart", "help", "history", "home", "image", "info", "link", "list", "location", "lock", "logout", "mail", "microphone", "minus", "mobile", "more", "music", "phone", "playlist", "plus", "qr-code", "receipt", "refresh", "search", "send", "settings", "share", "star", "success", "ticket", "trash", "upload", "user", "users", "video", "wallet", "warning", "water", "wifi"];
|
|
366
|
+
readonly image: "string";
|
|
367
|
+
readonly badge: "string";
|
|
368
|
+
}, "tap", "none">;
|
|
369
|
+
//#endregion
|
|
370
|
+
//#region src/view/components/icon.d.ts
|
|
371
|
+
export declare const Icon: ComponentManifest<"Icon", {
|
|
372
|
+
readonly name: readonly ["arrow-down", "arrow-left", "arrow-right", "arrow-up", "bank", "bell", "bolt", "calendar", "card", "cart", "cash", "check", "chevron-down", "chevron-left", "chevron-right", "chevron-up", "clock", "close", "copy", "download", "edit", "error", "external-link", "eye", "eye-off", "file", "gift", "globe", "grid", "headphones", "heart", "help", "history", "home", "image", "info", "link", "list", "location", "lock", "logout", "mail", "microphone", "minus", "mobile", "more", "music", "phone", "playlist", "plus", "qr-code", "receipt", "refresh", "search", "send", "settings", "share", "star", "success", "ticket", "trash", "upload", "user", "users", "video", "wallet", "warning", "water", "wifi"];
|
|
373
|
+
readonly size: readonly ["small", "medium", "large"];
|
|
374
|
+
readonly tone: readonly ["default", "muted", "info", "success", "warning", "danger"];
|
|
375
|
+
}, never, "none">;
|
|
376
|
+
//#endregion
|
|
377
|
+
//#region src/view/components/image.d.ts
|
|
378
|
+
export declare const Image: ComponentManifest<"Image", {
|
|
379
|
+
readonly src: "string";
|
|
380
|
+
readonly alt: "string";
|
|
381
|
+
readonly width: "number";
|
|
382
|
+
readonly height: "number";
|
|
383
|
+
readonly fit: readonly ["cover", "contain"];
|
|
384
|
+
readonly shape: readonly ["rounded", "square", "circle"];
|
|
385
|
+
readonly aspect: readonly ["1:1", "4:3", "3:2", "16:9", "3:4", "2:3", "9:16"];
|
|
386
|
+
}, "error" | "load", "none">;
|
|
387
|
+
//#endregion
|
|
388
|
+
//#region src/view/components/input.d.ts
|
|
389
|
+
export declare const Input: ComponentManifest<"Input", {
|
|
390
|
+
readonly value: "string";
|
|
391
|
+
readonly placeholder: "string";
|
|
392
|
+
readonly label: "string";
|
|
393
|
+
readonly hint: "string";
|
|
394
|
+
readonly error: "string";
|
|
395
|
+
readonly prefix: "string";
|
|
396
|
+
readonly suffix: "string";
|
|
397
|
+
readonly type: readonly ["text", "number", "email", "phone", "password"];
|
|
398
|
+
readonly maxLength: "number";
|
|
399
|
+
readonly disabled: "boolean";
|
|
400
|
+
}, "change" | "submit", "none">;
|
|
401
|
+
//#endregion
|
|
402
|
+
//#region src/view/components/link.d.ts
|
|
403
|
+
export declare const Link: ComponentManifest<"Link", {
|
|
404
|
+
readonly href: "string";
|
|
405
|
+
readonly tone: readonly ["default", "muted", "info", "success", "warning", "danger"];
|
|
406
|
+
}, "tap", "text">;
|
|
407
|
+
//#endregion
|
|
408
|
+
//#region src/view/components/list.d.ts
|
|
409
|
+
export declare const List: ComponentManifest<"List", {
|
|
410
|
+
readonly padding: readonly ["none", "small", "medium", "large"];
|
|
411
|
+
readonly paddingTop: readonly ["none", "small", "medium", "large"];
|
|
412
|
+
readonly paddingStart: readonly ["none", "small", "medium", "large"];
|
|
413
|
+
readonly paddingEnd: readonly ["none", "small", "medium", "large"];
|
|
414
|
+
readonly paddingBottom: readonly ["none", "small", "medium", "large"];
|
|
415
|
+
readonly size: readonly ["sm", "md"];
|
|
416
|
+
}, "endReached", "elements">;
|
|
417
|
+
export declare const ListItem: ComponentManifest<"ListItem", {
|
|
418
|
+
readonly padding: readonly ["none", "small", "medium", "large"];
|
|
419
|
+
readonly paddingTop: readonly ["none", "small", "medium", "large"];
|
|
420
|
+
readonly paddingStart: readonly ["none", "small", "medium", "large"];
|
|
421
|
+
readonly paddingEnd: readonly ["none", "small", "medium", "large"];
|
|
422
|
+
readonly paddingBottom: readonly ["none", "small", "medium", "large"];
|
|
423
|
+
readonly title: "string";
|
|
424
|
+
readonly subtitle: "string";
|
|
425
|
+
readonly value: "string";
|
|
426
|
+
readonly icon: readonly ["arrow-down", "arrow-left", "arrow-right", "arrow-up", "bank", "bell", "bolt", "calendar", "card", "cart", "cash", "check", "chevron-down", "chevron-left", "chevron-right", "chevron-up", "clock", "close", "copy", "download", "edit", "error", "external-link", "eye", "eye-off", "file", "gift", "globe", "grid", "headphones", "heart", "help", "history", "home", "image", "info", "link", "list", "location", "lock", "logout", "mail", "microphone", "minus", "mobile", "more", "music", "phone", "playlist", "plus", "qr-code", "receipt", "refresh", "search", "send", "settings", "share", "star", "success", "ticket", "trash", "upload", "user", "users", "video", "wallet", "warning", "water", "wifi"];
|
|
427
|
+
readonly image: "string";
|
|
428
|
+
}, "tap", "elements">;
|
|
429
|
+
//#endregion
|
|
430
|
+
//#region src/view/components/overlays.d.ts
|
|
431
|
+
export declare const Sheet: ComponentManifest<"Sheet", {
|
|
432
|
+
readonly padding: readonly ["none", "small", "medium", "large"];
|
|
433
|
+
readonly paddingTop: readonly ["none", "small", "medium", "large"];
|
|
434
|
+
readonly paddingStart: readonly ["none", "small", "medium", "large"];
|
|
435
|
+
readonly paddingEnd: readonly ["none", "small", "medium", "large"];
|
|
436
|
+
readonly paddingBottom: readonly ["none", "small", "medium", "large"];
|
|
437
|
+
readonly open: "boolean";
|
|
438
|
+
readonly title: "string";
|
|
439
|
+
readonly showCloseIcon: "boolean";
|
|
440
|
+
}, "close", "elements">;
|
|
441
|
+
export declare const Toast: ComponentManifest<"Toast", {
|
|
442
|
+
readonly message: "string";
|
|
443
|
+
readonly tone: readonly ["default", "info", "success", "warning", "danger"];
|
|
444
|
+
readonly duration: "number";
|
|
445
|
+
}, "hide", "none">;
|
|
446
|
+
//#endregion
|
|
447
|
+
//#region src/view/components/qr-code.d.ts
|
|
448
|
+
export declare const QRCode: ComponentManifest<"QRCode", {
|
|
449
|
+
readonly value: "string";
|
|
450
|
+
readonly size: "number";
|
|
451
|
+
readonly label: "string";
|
|
452
|
+
}, never, "none">;
|
|
453
|
+
//#endregion
|
|
454
|
+
//#region src/view/components/select.d.ts
|
|
455
|
+
export declare const Select: ComponentManifest<"Select", {
|
|
456
|
+
readonly value: "string";
|
|
457
|
+
readonly label: "string";
|
|
458
|
+
readonly placeholder: "string";
|
|
459
|
+
readonly hint: "string";
|
|
460
|
+
readonly error: "string";
|
|
461
|
+
readonly disabled: "boolean";
|
|
462
|
+
}, "change", "elements">;
|
|
463
|
+
export declare const Option: ComponentManifest<"Option", {
|
|
464
|
+
readonly value: "string";
|
|
465
|
+
readonly label: "string";
|
|
466
|
+
}, never, "none">;
|
|
467
|
+
//#endregion
|
|
468
|
+
//#region src/view/components/scroll.d.ts
|
|
469
|
+
export declare const Scroll: ComponentManifest<"Scroll", {
|
|
470
|
+
readonly padding: readonly ["none", "small", "medium", "large"];
|
|
471
|
+
readonly paddingTop: readonly ["none", "small", "medium", "large"];
|
|
472
|
+
readonly paddingStart: readonly ["none", "small", "medium", "large"];
|
|
473
|
+
readonly paddingEnd: readonly ["none", "small", "medium", "large"];
|
|
474
|
+
readonly paddingBottom: readonly ["none", "small", "medium", "large"];
|
|
475
|
+
readonly gap: readonly ["none", "small", "medium", "large"];
|
|
476
|
+
readonly snap: readonly ["none", "start", "center"];
|
|
477
|
+
readonly index: "number";
|
|
478
|
+
}, "change", "elements">;
|
|
479
|
+
//#endregion
|
|
480
|
+
//#region src/view/components/skeleton.d.ts
|
|
481
|
+
export declare const Skeleton: ComponentManifest<"Skeleton", {
|
|
482
|
+
readonly shape: readonly ["text", "circle", "box"];
|
|
483
|
+
readonly lines: "number";
|
|
484
|
+
readonly height: "number";
|
|
485
|
+
}, never, "none">;
|
|
486
|
+
//#endregion
|
|
487
|
+
//#region src/view/components/tabs.d.ts
|
|
488
|
+
export declare const Tabs: ComponentManifest<"Tabs", {
|
|
489
|
+
readonly padding: readonly ["none", "small", "medium", "large"];
|
|
490
|
+
readonly paddingTop: readonly ["none", "small", "medium", "large"];
|
|
491
|
+
readonly paddingStart: readonly ["none", "small", "medium", "large"];
|
|
492
|
+
readonly paddingEnd: readonly ["none", "small", "medium", "large"];
|
|
493
|
+
readonly paddingBottom: readonly ["none", "small", "medium", "large"];
|
|
494
|
+
readonly value: "string";
|
|
495
|
+
readonly variant: readonly ["underline", "segmented"];
|
|
496
|
+
}, "change", "elements">;
|
|
497
|
+
export declare const Tab: ComponentManifest<"Tab", {
|
|
498
|
+
readonly value: "string";
|
|
499
|
+
readonly label: "string";
|
|
500
|
+
readonly badge: "number";
|
|
501
|
+
}, never, "none">;
|
|
502
|
+
//#endregion
|
|
503
|
+
//#region src/view/components/text.d.ts
|
|
504
|
+
export declare const Text: ComponentManifest<"Text", {
|
|
505
|
+
readonly padding: readonly ["none", "small", "medium", "large"];
|
|
506
|
+
readonly paddingTop: readonly ["none", "small", "medium", "large"];
|
|
507
|
+
readonly paddingStart: readonly ["none", "small", "medium", "large"];
|
|
508
|
+
readonly paddingEnd: readonly ["none", "small", "medium", "large"];
|
|
509
|
+
readonly paddingBottom: readonly ["none", "small", "medium", "large"];
|
|
510
|
+
readonly variant: readonly ["title", "body", "caption"];
|
|
511
|
+
readonly tone: readonly ["default", "muted", "info", "success", "warning", "danger"];
|
|
512
|
+
readonly weight: readonly ["regular", "medium", "bold"];
|
|
513
|
+
readonly align: readonly ["start", "center", "end"];
|
|
514
|
+
readonly maxLines: "number";
|
|
515
|
+
}, never, "text">;
|
|
516
|
+
//#endregion
|
|
517
|
+
//#region src/view/components/text-area.d.ts
|
|
518
|
+
export declare const TextArea: ComponentManifest<"TextArea", {
|
|
519
|
+
readonly value: "string";
|
|
520
|
+
readonly placeholder: "string";
|
|
521
|
+
readonly label: "string";
|
|
522
|
+
readonly hint: "string";
|
|
523
|
+
readonly error: "string";
|
|
524
|
+
readonly rows: "number";
|
|
525
|
+
readonly maxLength: "number";
|
|
526
|
+
readonly disabled: "boolean";
|
|
527
|
+
}, "change", "none">;
|
|
528
|
+
//#endregion
|
|
529
|
+
//#region src/view/components/toggles.d.ts
|
|
530
|
+
export declare const Switch: ComponentManifest<"Switch", {
|
|
531
|
+
readonly checked: "boolean";
|
|
532
|
+
readonly label: "string";
|
|
533
|
+
readonly disabled: "boolean";
|
|
534
|
+
}, "change", "none">;
|
|
535
|
+
export declare const Checkbox: ComponentManifest<"Checkbox", {
|
|
536
|
+
readonly checked: "boolean";
|
|
537
|
+
readonly label: "string";
|
|
538
|
+
readonly disabled: "boolean";
|
|
539
|
+
}, "change", "none">;
|
|
540
|
+
export declare const RadioGroup: ComponentManifest<"RadioGroup", {
|
|
541
|
+
readonly value: "string";
|
|
542
|
+
readonly label: "string";
|
|
543
|
+
readonly disabled: "boolean";
|
|
544
|
+
}, "change", "elements">;
|
|
545
|
+
export declare const Radio: ComponentManifest<"Radio", {
|
|
546
|
+
readonly value: "string";
|
|
547
|
+
readonly label: "string";
|
|
548
|
+
readonly disabled: "boolean";
|
|
549
|
+
}, never, "none">;
|
|
550
|
+
//#endregion
|
|
551
|
+
//#region src/view/components/view.d.ts
|
|
552
|
+
export declare const View: ComponentManifest<"View", {
|
|
553
|
+
readonly variant: readonly ["plain", "card"];
|
|
554
|
+
readonly padding: readonly ["none", "small", "medium", "large"];
|
|
555
|
+
readonly paddingTop: readonly ["none", "small", "medium", "large"];
|
|
556
|
+
readonly paddingStart: readonly ["none", "small", "medium", "large"];
|
|
557
|
+
readonly paddingEnd: readonly ["none", "small", "medium", "large"];
|
|
558
|
+
readonly paddingBottom: readonly ["none", "small", "medium", "large"];
|
|
559
|
+
readonly gap: readonly ["none", "small", "medium", "large"];
|
|
560
|
+
readonly direction: readonly ["column", "row"];
|
|
561
|
+
readonly align: readonly ["stretch", "start", "center", "end"];
|
|
562
|
+
readonly justify: readonly ["start", "center", "end", "between"];
|
|
563
|
+
readonly wrap: "boolean";
|
|
564
|
+
readonly grow: "boolean";
|
|
565
|
+
}, "tap", "elements">;
|
|
566
|
+
//#endregion
|
|
567
|
+
//#region src/view/components/options.d.ts
|
|
568
|
+
export declare const SIZES: readonly ["small", "medium", "large"];
|
|
569
|
+
export declare const SPACES: readonly ["none", "small", "medium", "large"];
|
|
570
|
+
export declare const PADDING_PROPS: {
|
|
571
|
+
readonly padding: readonly ["none", "small", "medium", "large"];
|
|
572
|
+
readonly paddingTop: readonly ["none", "small", "medium", "large"];
|
|
573
|
+
readonly paddingStart: readonly ["none", "small", "medium", "large"];
|
|
574
|
+
readonly paddingEnd: readonly ["none", "small", "medium", "large"];
|
|
575
|
+
readonly paddingBottom: readonly ["none", "small", "medium", "large"];
|
|
576
|
+
};
|
|
577
|
+
export declare const ASPECTS: readonly ["1:1", "4:3", "3:2", "16:9", "3:4", "2:3", "9:16"];
|
|
578
|
+
export declare const TONES: readonly ["default", "muted", "info", "success", "warning", "danger"];
|
|
579
|
+
export declare const STATUS_TONES: readonly ["default", "info", "success", "warning", "danger"];
|
|
580
|
+
export declare const ICON_NAMES: readonly ["arrow-down", "arrow-left", "arrow-right", "arrow-up", "bank", "bell", "bolt", "calendar", "card", "cart", "cash", "check", "chevron-down", "chevron-left", "chevron-right", "chevron-up", "clock", "close", "copy", "download", "edit", "error", "external-link", "eye", "eye-off", "file", "gift", "globe", "grid", "headphones", "heart", "help", "history", "home", "image", "info", "link", "list", "location", "lock", "logout", "mail", "microphone", "minus", "mobile", "more", "music", "phone", "playlist", "plus", "qr-code", "receipt", "refresh", "search", "send", "settings", "share", "star", "success", "ticket", "trash", "upload", "user", "users", "video", "wallet", "warning", "water", "wifi"];
|
|
581
|
+
type IconName = (typeof ICON_NAMES)[number];
|
|
582
|
+
//#endregion
|
|
583
|
+
//#region src/view/components/index.d.ts
|
|
584
|
+
export declare const builtinComponents: {
|
|
585
|
+
readonly AmountInput: ComponentManifest<"AmountInput", {
|
|
586
|
+
readonly value: "number";
|
|
587
|
+
readonly currency: "string";
|
|
588
|
+
readonly minorUnits: "number";
|
|
589
|
+
readonly unit: readonly ["minor", "major"];
|
|
590
|
+
readonly label: "string";
|
|
591
|
+
readonly placeholder: "string";
|
|
592
|
+
readonly hint: "string";
|
|
593
|
+
readonly error: "string";
|
|
594
|
+
readonly disabled: "boolean";
|
|
595
|
+
}, "change", "none">;
|
|
596
|
+
readonly Badge: ComponentManifest<"Badge", {
|
|
597
|
+
readonly tone: readonly ["default", "info", "success", "warning", "danger"];
|
|
598
|
+
}, never, "text">;
|
|
599
|
+
readonly Button: ComponentManifest<"Button", {
|
|
600
|
+
readonly variant: readonly ["primary", "secondary"];
|
|
601
|
+
readonly disabled: "boolean";
|
|
602
|
+
readonly loading: "boolean";
|
|
603
|
+
}, "click", "text">;
|
|
604
|
+
readonly Carousel: ComponentManifest<"Carousel", {
|
|
605
|
+
readonly padding: readonly ["none", "small", "medium", "large"];
|
|
606
|
+
readonly paddingTop: readonly ["none", "small", "medium", "large"];
|
|
607
|
+
readonly paddingStart: readonly ["none", "small", "medium", "large"];
|
|
608
|
+
readonly paddingEnd: readonly ["none", "small", "medium", "large"];
|
|
609
|
+
readonly paddingBottom: readonly ["none", "small", "medium", "large"];
|
|
610
|
+
readonly autoplay: "boolean";
|
|
611
|
+
readonly interval: "number";
|
|
612
|
+
readonly loop: "boolean";
|
|
613
|
+
readonly indicator: readonly ["dots", "none"];
|
|
614
|
+
readonly gap: readonly ["none", "small", "medium", "large"];
|
|
615
|
+
readonly effect: readonly ["slide", "scale"];
|
|
616
|
+
readonly index: "number";
|
|
617
|
+
}, "change", "elements">;
|
|
618
|
+
readonly Checkbox: ComponentManifest<"Checkbox", {
|
|
619
|
+
readonly checked: "boolean";
|
|
620
|
+
readonly label: "string";
|
|
621
|
+
readonly disabled: "boolean";
|
|
622
|
+
}, "change", "none">;
|
|
623
|
+
readonly Chip: ComponentManifest<"Chip", {
|
|
624
|
+
readonly label: "string";
|
|
625
|
+
readonly icon: readonly ["arrow-down", "arrow-left", "arrow-right", "arrow-up", "bank", "bell", "bolt", "calendar", "card", "cart", "cash", "check", "chevron-down", "chevron-left", "chevron-right", "chevron-up", "clock", "close", "copy", "download", "edit", "error", "external-link", "eye", "eye-off", "file", "gift", "globe", "grid", "headphones", "heart", "help", "history", "home", "image", "info", "link", "list", "location", "lock", "logout", "mail", "microphone", "minus", "mobile", "more", "music", "phone", "playlist", "plus", "qr-code", "receipt", "refresh", "search", "send", "settings", "share", "star", "success", "ticket", "trash", "upload", "user", "users", "video", "wallet", "warning", "water", "wifi"];
|
|
626
|
+
readonly selected: "boolean";
|
|
627
|
+
readonly disabled: "boolean";
|
|
628
|
+
}, "tap", "none">;
|
|
629
|
+
readonly CodeInput: ComponentManifest<"CodeInput", {
|
|
630
|
+
readonly value: "string";
|
|
631
|
+
readonly length: "number";
|
|
632
|
+
readonly label: "string";
|
|
633
|
+
readonly hint: "string";
|
|
634
|
+
readonly error: "string";
|
|
635
|
+
readonly secure: "boolean";
|
|
636
|
+
readonly disabled: "boolean";
|
|
637
|
+
}, "change" | "complete", "none">;
|
|
638
|
+
readonly DetailRow: ComponentManifest<"DetailRow", {
|
|
639
|
+
readonly padding: readonly ["none", "small", "medium", "large"];
|
|
640
|
+
readonly paddingTop: readonly ["none", "small", "medium", "large"];
|
|
641
|
+
readonly paddingStart: readonly ["none", "small", "medium", "large"];
|
|
642
|
+
readonly paddingEnd: readonly ["none", "small", "medium", "large"];
|
|
643
|
+
readonly paddingBottom: readonly ["none", "small", "medium", "large"];
|
|
644
|
+
readonly label: "string";
|
|
645
|
+
readonly value: "string";
|
|
646
|
+
readonly tone: readonly ["default", "muted", "info", "success", "warning", "danger"];
|
|
647
|
+
readonly weight: readonly ["regular", "medium", "bold"];
|
|
648
|
+
}, never, "none">;
|
|
649
|
+
readonly Divider: ComponentManifest<"Divider", Record<never, PropType>, never, "none">;
|
|
650
|
+
readonly EmptyState: ComponentManifest<"EmptyState", {
|
|
651
|
+
readonly padding: readonly ["none", "small", "medium", "large"];
|
|
652
|
+
readonly paddingTop: readonly ["none", "small", "medium", "large"];
|
|
653
|
+
readonly paddingStart: readonly ["none", "small", "medium", "large"];
|
|
654
|
+
readonly paddingEnd: readonly ["none", "small", "medium", "large"];
|
|
655
|
+
readonly paddingBottom: readonly ["none", "small", "medium", "large"];
|
|
656
|
+
readonly icon: readonly ["arrow-down", "arrow-left", "arrow-right", "arrow-up", "bank", "bell", "bolt", "calendar", "card", "cart", "cash", "check", "chevron-down", "chevron-left", "chevron-right", "chevron-up", "clock", "close", "copy", "download", "edit", "error", "external-link", "eye", "eye-off", "file", "gift", "globe", "grid", "headphones", "heart", "help", "history", "home", "image", "info", "link", "list", "location", "lock", "logout", "mail", "microphone", "minus", "mobile", "more", "music", "phone", "playlist", "plus", "qr-code", "receipt", "refresh", "search", "send", "settings", "share", "star", "success", "ticket", "trash", "upload", "user", "users", "video", "wallet", "warning", "water", "wifi"];
|
|
657
|
+
readonly title: "string";
|
|
658
|
+
readonly text: "string";
|
|
659
|
+
}, never, "elements">;
|
|
660
|
+
readonly Footer: ComponentManifest<"Footer", {
|
|
661
|
+
readonly padding: readonly ["none", "small", "medium", "large"];
|
|
662
|
+
readonly paddingTop: readonly ["none", "small", "medium", "large"];
|
|
663
|
+
readonly paddingStart: readonly ["none", "small", "medium", "large"];
|
|
664
|
+
readonly paddingEnd: readonly ["none", "small", "medium", "large"];
|
|
665
|
+
readonly paddingBottom: readonly ["none", "small", "medium", "large"];
|
|
666
|
+
}, never, "elements">;
|
|
667
|
+
readonly Grid: ComponentManifest<"Grid", {
|
|
668
|
+
readonly padding: readonly ["none", "small", "medium", "large"];
|
|
669
|
+
readonly paddingTop: readonly ["none", "small", "medium", "large"];
|
|
670
|
+
readonly paddingStart: readonly ["none", "small", "medium", "large"];
|
|
671
|
+
readonly paddingEnd: readonly ["none", "small", "medium", "large"];
|
|
672
|
+
readonly paddingBottom: readonly ["none", "small", "medium", "large"];
|
|
673
|
+
readonly columns: "number";
|
|
674
|
+
readonly gap: readonly ["none", "small", "medium", "large"];
|
|
675
|
+
}, never, "elements">;
|
|
676
|
+
readonly GridItem: ComponentManifest<"GridItem", {
|
|
677
|
+
readonly label: "string";
|
|
678
|
+
readonly icon: readonly ["arrow-down", "arrow-left", "arrow-right", "arrow-up", "bank", "bell", "bolt", "calendar", "card", "cart", "cash", "check", "chevron-down", "chevron-left", "chevron-right", "chevron-up", "clock", "close", "copy", "download", "edit", "error", "external-link", "eye", "eye-off", "file", "gift", "globe", "grid", "headphones", "heart", "help", "history", "home", "image", "info", "link", "list", "location", "lock", "logout", "mail", "microphone", "minus", "mobile", "more", "music", "phone", "playlist", "plus", "qr-code", "receipt", "refresh", "search", "send", "settings", "share", "star", "success", "ticket", "trash", "upload", "user", "users", "video", "wallet", "warning", "water", "wifi"];
|
|
679
|
+
readonly image: "string";
|
|
680
|
+
readonly badge: "string";
|
|
681
|
+
}, "tap", "none">;
|
|
682
|
+
readonly Icon: ComponentManifest<"Icon", {
|
|
683
|
+
readonly name: readonly ["arrow-down", "arrow-left", "arrow-right", "arrow-up", "bank", "bell", "bolt", "calendar", "card", "cart", "cash", "check", "chevron-down", "chevron-left", "chevron-right", "chevron-up", "clock", "close", "copy", "download", "edit", "error", "external-link", "eye", "eye-off", "file", "gift", "globe", "grid", "headphones", "heart", "help", "history", "home", "image", "info", "link", "list", "location", "lock", "logout", "mail", "microphone", "minus", "mobile", "more", "music", "phone", "playlist", "plus", "qr-code", "receipt", "refresh", "search", "send", "settings", "share", "star", "success", "ticket", "trash", "upload", "user", "users", "video", "wallet", "warning", "water", "wifi"];
|
|
684
|
+
readonly size: readonly ["small", "medium", "large"];
|
|
685
|
+
readonly tone: readonly ["default", "muted", "info", "success", "warning", "danger"];
|
|
686
|
+
}, never, "none">;
|
|
687
|
+
readonly Image: ComponentManifest<"Image", {
|
|
688
|
+
readonly src: "string";
|
|
689
|
+
readonly alt: "string";
|
|
690
|
+
readonly width: "number";
|
|
691
|
+
readonly height: "number";
|
|
692
|
+
readonly fit: readonly ["cover", "contain"];
|
|
693
|
+
readonly shape: readonly ["rounded", "square", "circle"];
|
|
694
|
+
readonly aspect: readonly ["1:1", "4:3", "3:2", "16:9", "3:4", "2:3", "9:16"];
|
|
695
|
+
}, "error" | "load", "none">;
|
|
696
|
+
readonly Input: ComponentManifest<"Input", {
|
|
697
|
+
readonly value: "string";
|
|
698
|
+
readonly placeholder: "string";
|
|
699
|
+
readonly label: "string";
|
|
700
|
+
readonly hint: "string";
|
|
701
|
+
readonly error: "string";
|
|
702
|
+
readonly prefix: "string";
|
|
703
|
+
readonly suffix: "string";
|
|
704
|
+
readonly type: readonly ["text", "number", "email", "phone", "password"];
|
|
705
|
+
readonly maxLength: "number";
|
|
706
|
+
readonly disabled: "boolean";
|
|
707
|
+
}, "change" | "submit", "none">;
|
|
708
|
+
readonly Link: ComponentManifest<"Link", {
|
|
709
|
+
readonly href: "string";
|
|
710
|
+
readonly tone: readonly ["default", "muted", "info", "success", "warning", "danger"];
|
|
711
|
+
}, "tap", "text">;
|
|
712
|
+
readonly List: ComponentManifest<"List", {
|
|
713
|
+
readonly padding: readonly ["none", "small", "medium", "large"];
|
|
714
|
+
readonly paddingTop: readonly ["none", "small", "medium", "large"];
|
|
715
|
+
readonly paddingStart: readonly ["none", "small", "medium", "large"];
|
|
716
|
+
readonly paddingEnd: readonly ["none", "small", "medium", "large"];
|
|
717
|
+
readonly paddingBottom: readonly ["none", "small", "medium", "large"];
|
|
718
|
+
readonly size: readonly ["sm", "md"];
|
|
719
|
+
}, "endReached", "elements">;
|
|
720
|
+
readonly ListItem: ComponentManifest<"ListItem", {
|
|
721
|
+
readonly padding: readonly ["none", "small", "medium", "large"];
|
|
722
|
+
readonly paddingTop: readonly ["none", "small", "medium", "large"];
|
|
723
|
+
readonly paddingStart: readonly ["none", "small", "medium", "large"];
|
|
724
|
+
readonly paddingEnd: readonly ["none", "small", "medium", "large"];
|
|
725
|
+
readonly paddingBottom: readonly ["none", "small", "medium", "large"];
|
|
726
|
+
readonly title: "string";
|
|
727
|
+
readonly subtitle: "string";
|
|
728
|
+
readonly value: "string";
|
|
729
|
+
readonly icon: readonly ["arrow-down", "arrow-left", "arrow-right", "arrow-up", "bank", "bell", "bolt", "calendar", "card", "cart", "cash", "check", "chevron-down", "chevron-left", "chevron-right", "chevron-up", "clock", "close", "copy", "download", "edit", "error", "external-link", "eye", "eye-off", "file", "gift", "globe", "grid", "headphones", "heart", "help", "history", "home", "image", "info", "link", "list", "location", "lock", "logout", "mail", "microphone", "minus", "mobile", "more", "music", "phone", "playlist", "plus", "qr-code", "receipt", "refresh", "search", "send", "settings", "share", "star", "success", "ticket", "trash", "upload", "user", "users", "video", "wallet", "warning", "water", "wifi"];
|
|
730
|
+
readonly image: "string";
|
|
731
|
+
}, "tap", "elements">;
|
|
732
|
+
readonly Notice: ComponentManifest<"Notice", {
|
|
733
|
+
readonly padding: readonly ["none", "small", "medium", "large"];
|
|
734
|
+
readonly paddingTop: readonly ["none", "small", "medium", "large"];
|
|
735
|
+
readonly paddingStart: readonly ["none", "small", "medium", "large"];
|
|
736
|
+
readonly paddingEnd: readonly ["none", "small", "medium", "large"];
|
|
737
|
+
readonly paddingBottom: readonly ["none", "small", "medium", "large"];
|
|
738
|
+
readonly tone: readonly ["default", "info", "success", "warning", "danger"];
|
|
739
|
+
readonly title: "string";
|
|
740
|
+
}, never, "text">;
|
|
741
|
+
readonly Option: ComponentManifest<"Option", {
|
|
742
|
+
readonly value: "string";
|
|
743
|
+
readonly label: "string";
|
|
744
|
+
}, never, "none">;
|
|
745
|
+
readonly ProgressBar: ComponentManifest<"ProgressBar", {
|
|
746
|
+
readonly value: "number";
|
|
747
|
+
}, never, "none">;
|
|
748
|
+
readonly QRCode: ComponentManifest<"QRCode", {
|
|
749
|
+
readonly value: "string";
|
|
750
|
+
readonly size: "number";
|
|
751
|
+
readonly label: "string";
|
|
752
|
+
}, never, "none">;
|
|
753
|
+
readonly Radio: ComponentManifest<"Radio", {
|
|
754
|
+
readonly value: "string";
|
|
755
|
+
readonly label: "string";
|
|
756
|
+
readonly disabled: "boolean";
|
|
757
|
+
}, never, "none">;
|
|
758
|
+
readonly RadioGroup: ComponentManifest<"RadioGroup", {
|
|
759
|
+
readonly value: "string";
|
|
760
|
+
readonly label: "string";
|
|
761
|
+
readonly disabled: "boolean";
|
|
762
|
+
}, "change", "elements">;
|
|
763
|
+
readonly Scroll: ComponentManifest<"Scroll", {
|
|
764
|
+
readonly padding: readonly ["none", "small", "medium", "large"];
|
|
765
|
+
readonly paddingTop: readonly ["none", "small", "medium", "large"];
|
|
766
|
+
readonly paddingStart: readonly ["none", "small", "medium", "large"];
|
|
767
|
+
readonly paddingEnd: readonly ["none", "small", "medium", "large"];
|
|
768
|
+
readonly paddingBottom: readonly ["none", "small", "medium", "large"];
|
|
769
|
+
readonly gap: readonly ["none", "small", "medium", "large"];
|
|
770
|
+
readonly snap: readonly ["none", "start", "center"];
|
|
771
|
+
readonly index: "number";
|
|
772
|
+
}, "change", "elements">;
|
|
773
|
+
readonly Select: ComponentManifest<"Select", {
|
|
774
|
+
readonly value: "string";
|
|
775
|
+
readonly label: "string";
|
|
776
|
+
readonly placeholder: "string";
|
|
777
|
+
readonly hint: "string";
|
|
778
|
+
readonly error: "string";
|
|
779
|
+
readonly disabled: "boolean";
|
|
780
|
+
}, "change", "elements">;
|
|
781
|
+
readonly Sheet: ComponentManifest<"Sheet", {
|
|
782
|
+
readonly padding: readonly ["none", "small", "medium", "large"];
|
|
783
|
+
readonly paddingTop: readonly ["none", "small", "medium", "large"];
|
|
784
|
+
readonly paddingStart: readonly ["none", "small", "medium", "large"];
|
|
785
|
+
readonly paddingEnd: readonly ["none", "small", "medium", "large"];
|
|
786
|
+
readonly paddingBottom: readonly ["none", "small", "medium", "large"];
|
|
787
|
+
readonly open: "boolean";
|
|
788
|
+
readonly title: "string";
|
|
789
|
+
readonly showCloseIcon: "boolean";
|
|
790
|
+
}, "close", "elements">;
|
|
791
|
+
readonly Skeleton: ComponentManifest<"Skeleton", {
|
|
792
|
+
readonly shape: readonly ["text", "circle", "box"];
|
|
793
|
+
readonly lines: "number";
|
|
794
|
+
readonly height: "number";
|
|
795
|
+
}, never, "none">;
|
|
796
|
+
readonly Spinner: ComponentManifest<"Spinner", {
|
|
797
|
+
readonly size: readonly ["small", "medium", "large"];
|
|
798
|
+
}, never, "none">;
|
|
799
|
+
readonly Switch: ComponentManifest<"Switch", {
|
|
800
|
+
readonly checked: "boolean";
|
|
801
|
+
readonly label: "string";
|
|
802
|
+
readonly disabled: "boolean";
|
|
803
|
+
}, "change", "none">;
|
|
804
|
+
readonly Tab: ComponentManifest<"Tab", {
|
|
805
|
+
readonly value: "string";
|
|
806
|
+
readonly label: "string";
|
|
807
|
+
readonly badge: "number";
|
|
808
|
+
}, never, "none">;
|
|
809
|
+
readonly Tabs: ComponentManifest<"Tabs", {
|
|
810
|
+
readonly padding: readonly ["none", "small", "medium", "large"];
|
|
811
|
+
readonly paddingTop: readonly ["none", "small", "medium", "large"];
|
|
812
|
+
readonly paddingStart: readonly ["none", "small", "medium", "large"];
|
|
813
|
+
readonly paddingEnd: readonly ["none", "small", "medium", "large"];
|
|
814
|
+
readonly paddingBottom: readonly ["none", "small", "medium", "large"];
|
|
815
|
+
readonly value: "string";
|
|
816
|
+
readonly variant: readonly ["underline", "segmented"];
|
|
817
|
+
}, "change", "elements">;
|
|
818
|
+
readonly Text: ComponentManifest<"Text", {
|
|
819
|
+
readonly padding: readonly ["none", "small", "medium", "large"];
|
|
820
|
+
readonly paddingTop: readonly ["none", "small", "medium", "large"];
|
|
821
|
+
readonly paddingStart: readonly ["none", "small", "medium", "large"];
|
|
822
|
+
readonly paddingEnd: readonly ["none", "small", "medium", "large"];
|
|
823
|
+
readonly paddingBottom: readonly ["none", "small", "medium", "large"];
|
|
824
|
+
readonly variant: readonly ["title", "body", "caption"];
|
|
825
|
+
readonly tone: readonly ["default", "muted", "info", "success", "warning", "danger"];
|
|
826
|
+
readonly weight: readonly ["regular", "medium", "bold"];
|
|
827
|
+
readonly align: readonly ["start", "center", "end"];
|
|
828
|
+
readonly maxLines: "number";
|
|
829
|
+
}, never, "text">;
|
|
830
|
+
readonly TextArea: ComponentManifest<"TextArea", {
|
|
831
|
+
readonly value: "string";
|
|
832
|
+
readonly placeholder: "string";
|
|
833
|
+
readonly label: "string";
|
|
834
|
+
readonly hint: "string";
|
|
835
|
+
readonly error: "string";
|
|
836
|
+
readonly rows: "number";
|
|
837
|
+
readonly maxLength: "number";
|
|
838
|
+
readonly disabled: "boolean";
|
|
839
|
+
}, "change", "none">;
|
|
840
|
+
readonly Toast: ComponentManifest<"Toast", {
|
|
841
|
+
readonly message: "string";
|
|
842
|
+
readonly tone: readonly ["default", "info", "success", "warning", "danger"];
|
|
843
|
+
readonly duration: "number";
|
|
844
|
+
}, "hide", "none">;
|
|
845
|
+
readonly View: ComponentManifest<"View", {
|
|
846
|
+
readonly variant: readonly ["plain", "card"];
|
|
847
|
+
readonly padding: readonly ["none", "small", "medium", "large"];
|
|
848
|
+
readonly paddingTop: readonly ["none", "small", "medium", "large"];
|
|
849
|
+
readonly paddingStart: readonly ["none", "small", "medium", "large"];
|
|
850
|
+
readonly paddingEnd: readonly ["none", "small", "medium", "large"];
|
|
851
|
+
readonly paddingBottom: readonly ["none", "small", "medium", "large"];
|
|
852
|
+
readonly gap: readonly ["none", "small", "medium", "large"];
|
|
853
|
+
readonly direction: readonly ["column", "row"];
|
|
854
|
+
readonly align: readonly ["stretch", "start", "center", "end"];
|
|
855
|
+
readonly justify: readonly ["start", "center", "end", "between"];
|
|
856
|
+
readonly wrap: "boolean";
|
|
857
|
+
readonly grow: "boolean";
|
|
858
|
+
}, "tap", "elements">;
|
|
859
|
+
};
|
|
860
|
+
export type BuiltinComponents = typeof builtinComponents;
|
|
861
|
+
export declare const builtinRegistry: Readonly<Record<string, ComponentManifest<string, Record<string, PropType>, string, ChildrenType>>>;
|
|
862
|
+
//#endregion
|
|
863
|
+
//#region src/source/location.d.ts
|
|
864
|
+
interface SourceLocation {
|
|
865
|
+
readonly line: number;
|
|
866
|
+
readonly column: number;
|
|
867
|
+
readonly offset: number;
|
|
868
|
+
}
|
|
869
|
+
export declare function createLocator(source: string): (offset: number) => SourceLocation;
|
|
870
|
+
export declare function locationAt(source: string, offset: number): SourceLocation;
|
|
871
|
+
export declare function locatedMessage(message: string, file?: string, location?: SourceLocation): string;
|
|
872
|
+
//#endregion
|
|
873
|
+
//#region src/source/error.d.ts
|
|
874
|
+
export declare class SourceError extends Error {
|
|
875
|
+
readonly reason: string;
|
|
876
|
+
readonly file: string | undefined;
|
|
877
|
+
readonly loc: SourceLocation | undefined;
|
|
878
|
+
constructor(reason: string, file?: string, location?: SourceLocation);
|
|
879
|
+
}
|
|
880
|
+
//#endregion
|
|
881
|
+
//#region src/event/emitter.d.ts
|
|
882
|
+
type Listener = (...args: never[]) => void;
|
|
883
|
+
export declare class EventEmitter<Events extends { [K in keyof Events]: Listener; }> {
|
|
884
|
+
#private;
|
|
885
|
+
on<K extends keyof Events>(name: K, listener: Events[K]): () => void;
|
|
886
|
+
emit<K extends keyof Events>(name: K, ...args: Parameters<Events[K]>): void;
|
|
887
|
+
}
|
|
888
|
+
//#endregion
|
|
889
|
+
//#region src/protocol/transport.d.ts
|
|
890
|
+
interface Transport {
|
|
891
|
+
post(message: unknown): void;
|
|
892
|
+
listen(listener: (message: unknown) => void): () => void;
|
|
893
|
+
}
|
|
894
|
+
interface TransportAdapter {
|
|
895
|
+
postMessage(message: unknown): void;
|
|
896
|
+
addEventListener(type: 'message', listener: (event: {
|
|
897
|
+
data: unknown;
|
|
898
|
+
}) => void): void;
|
|
899
|
+
removeEventListener(type: 'message', listener: (event: {
|
|
900
|
+
data: unknown;
|
|
901
|
+
}) => void): void;
|
|
902
|
+
}
|
|
903
|
+
export declare function createAdaptorTransport(adapter: TransportAdapter): Transport;
|
|
904
|
+
export declare function createTransportPair(): [Transport, Transport];
|
|
905
|
+
//#endregion
|
|
906
|
+
//#region src/host/host.d.ts
|
|
907
|
+
declare global {
|
|
908
|
+
var __hostTransport: Transport | undefined;
|
|
909
|
+
}
|
|
910
|
+
export declare function hostTransport(): Transport;
|
|
911
|
+
//#endregion
|
|
912
|
+
//#region src/host/permissions.d.ts
|
|
913
|
+
export declare const PERMISSIONS: readonly ["account"];
|
|
914
|
+
type DotPermission = (typeof PERMISSIONS)[number];
|
|
915
|
+
export declare function isPermission(value: string): value is DotPermission;
|
|
916
|
+
//#endregion
|
|
917
|
+
//#region src/host/files.d.ts
|
|
918
|
+
export declare const DOT_FILE_PATH_MAX_LENGTH = 512;
|
|
919
|
+
export declare function dotFilePathProblem(path: string, { allowRoot }?: {
|
|
920
|
+
allowRoot?: boolean | undefined;
|
|
921
|
+
}): string | null;
|
|
922
|
+
//#endregion
|
|
923
|
+
//#region src/host/network.d.ts
|
|
924
|
+
export declare const NETWORK_HOST_PATTERN: RegExp;
|
|
925
|
+
export declare const NETWORK_HOST_MAX_LENGTH = 253;
|
|
926
|
+
export declare function isNetworkHost(value: string): boolean;
|
|
927
|
+
export declare function allowsHost(hosts: readonly string[], host: string): boolean;
|
|
928
|
+
//#endregion
|
|
929
|
+
//#region src/host/react.d.ts
|
|
930
|
+
export declare const REACT_HOST_PATH = "/__dot/react/";
|
|
931
|
+
export declare const REACT_HOST_MODULES: {
|
|
932
|
+
readonly react: "react.js";
|
|
933
|
+
readonly 'react/jsx-runtime': "react-jsx-runtime.js";
|
|
934
|
+
readonly 'react-dom': "react-dom.js";
|
|
935
|
+
readonly 'react-dom/client': "react-dom-client.js";
|
|
936
|
+
};
|
|
937
|
+
export declare function reactHostUrl(dotReactVersion: string, file: string): string;
|
|
938
|
+
export declare function isReactCompatible(hostVersion: string, dotVersion: string): boolean;
|
|
939
|
+
export declare function newestReactOfMajor(versions: readonly string[], major: number): string | undefined;
|
|
940
|
+
//#endregion
|
|
941
|
+
//#region src/page/lifecycle.d.ts
|
|
942
|
+
interface PageHooks {
|
|
943
|
+
onLoad(options: PageLaunchOptions): void | Promise<void>;
|
|
944
|
+
onShow(): void | Promise<void>;
|
|
945
|
+
onHide(): void | Promise<void>;
|
|
946
|
+
onUnload(): void | Promise<void>;
|
|
947
|
+
}
|
|
948
|
+
interface DotHooks {
|
|
949
|
+
onLaunch(): void | Promise<void>;
|
|
950
|
+
onError(error: Error): void;
|
|
951
|
+
}
|
|
952
|
+
export declare const PAGE_HOOKS: readonly (keyof PageHooks)[];
|
|
953
|
+
//#endregion
|
|
954
|
+
//#region src/page/state.d.ts
|
|
955
|
+
export declare function applyChanges<T>(state: T, changes: Partial<T>): T;
|
|
956
|
+
//#endregion
|
|
957
|
+
//#region src/version/semantic-version.d.ts
|
|
958
|
+
export declare const SEMVER_PATTERN: RegExp;
|
|
959
|
+
export declare function isSemanticVersion(value: unknown): value is string;
|
|
960
|
+
export declare function majorVersion(version: string): number;
|
|
961
|
+
export declare function isVersionAtLeast(version: string, minimum: string): boolean;
|
|
962
|
+
export declare function compareVersions(left: string, right: string): number;
|
|
963
|
+
//#endregion
|
|
964
|
+
//#region src/messageChannel.d.ts
|
|
965
|
+
type MessageHandler<Payload> = (payload: Payload) => void;
|
|
966
|
+
export declare class MessageChannel<Outgoing extends MessageMap, Incoming extends MessageMap> {
|
|
967
|
+
#private;
|
|
968
|
+
constructor(transport: Transport);
|
|
969
|
+
send<T extends MessageType<Outgoing>>(type: T, payload: Outgoing[T]): void;
|
|
970
|
+
handle<T extends MessageType<Incoming>>(type: T, handler: MessageHandler<Incoming[T]>): MessageHandler<Incoming[T]> | undefined;
|
|
971
|
+
listen(onError: (error: unknown, message: Envelope) => void): () => void;
|
|
972
|
+
}
|
|
973
|
+
//#endregion
|
|
974
|
+
export type { AppState, ChildrenType, ColorScheme, ComponentManifest, ComponentRegistry, DotEvent, DotHooks, DotPermission, Envelope, EventProp, HexColor, HostCallOptions, HostCaller, HostErrorCode, HostLayerMessages, HostRequest, HostResult, IconName, LogicLayerMessages, MessageHandler, MessageMap, MessageType, Navigation, NavigationBarOptions, PageBars, PageConfigs, PageHooks, PageLaunchOptions, PageState, PropOverride, PropType, PropTypes, PropValue, PropsOf, RenderContext, SchemeColor, SourceLocation, StackEntry, SystemContext, TabBarOptions, Theme, ThemeColors, ThemeDensity, ThemeShape, Transport, TransportAdapter, UILayerMessages, ViewRender };
|
|
975
|
+
//# sourceMappingURL=index.d.ts.map
|