@papack/csr 0.0.3 → 1.0.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.
- package/dist/index.cjs +1 -1
- package/dist/index.d.cts +847 -125
- package/dist/index.d.mts +814 -129
- package/dist/index.d.mts.map +1 -1
- package/dist/index.mjs +1 -1
- package/dist/index.mjs.map +1 -1
- package/package.json +2 -2
- package/readme.md +108 -137
package/dist/index.d.mts
CHANGED
|
@@ -1,175 +1,860 @@
|
|
|
1
|
-
//#region core/destroy.d.ts
|
|
2
|
-
declare function destroy(root: Element): Promise<void>;
|
|
3
1
|
//#endregion
|
|
4
2
|
//#region core/signal.d.ts
|
|
5
3
|
type UUID = string;
|
|
6
|
-
type ReadFn<T> = ((cb?: (value:
|
|
4
|
+
type ReadFn<T$1> = ((cb?: (value: T$1) => void) => T$1) & {
|
|
7
5
|
type: "signal";
|
|
8
6
|
};
|
|
9
|
-
declare function signal<T>(
|
|
7
|
+
declare function signal<T$1>(initialValue: T$1): readonly [ReadFn<T$1>, (fn: (prev: T$1) => T$1 | Promise<T$1>) => Promise<void>];
|
|
10
8
|
interface ConnectorInterface {
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
getUuidByClbk
|
|
9
|
+
addTopic(uuid: UUID): void;
|
|
10
|
+
removeTopic(uuid: UUID): void;
|
|
11
|
+
registerClbk<T$1>(uuid: UUID, cb: (value: T$1) => void): void;
|
|
12
|
+
removeClbk<T$1>(uuid: UUID, cb: (value: T$1) => void): void;
|
|
13
|
+
update<T$1>(uuid: UUID, value: T$1): void;
|
|
14
|
+
getUuidByClbk<T$1>(cb: (value: T$1) => void): UUID;
|
|
17
15
|
}
|
|
18
16
|
declare class Connector implements ConnectorInterface {
|
|
19
|
-
private
|
|
20
|
-
private
|
|
17
|
+
private topics;
|
|
18
|
+
private callbackMap;
|
|
21
19
|
addTopic(uuid: UUID): void;
|
|
22
20
|
removeTopic(uuid: UUID): void;
|
|
23
|
-
registerClbk<T>(uuid:
|
|
24
|
-
removeClbk<T>(uuid: UUID, cb: (value: T) => void): void;
|
|
25
|
-
update<T>(uuid: UUID, value: T): void;
|
|
26
|
-
getUuidByClbk(
|
|
21
|
+
registerClbk<T$1>(uuid: UUID, cb: (value: T$1) => void): void;
|
|
22
|
+
removeClbk<T$1>(uuid: UUID, cb: (value: T$1) => void): void;
|
|
23
|
+
update<T$1>(uuid: UUID, value: T$1): void;
|
|
24
|
+
getUuidByClbk<T$1>(cb: (value: T$1) => void): UUID;
|
|
27
25
|
}
|
|
28
26
|
declare const connector: Connector;
|
|
29
27
|
//#endregion
|
|
30
28
|
//#region core/effect.d.ts
|
|
31
|
-
declare function effect<T>(readFn: ReadFn<T>, fn: (value: T) => Promise<
|
|
29
|
+
declare function effect<T$1>(readFn: ReadFn<T$1>, fn: (value: T$1) => void | Promise<void>): void;
|
|
30
|
+
//#endregion
|
|
31
|
+
//#region core/for.d.ts
|
|
32
|
+
type Uuid = string;
|
|
33
|
+
interface Keyed {
|
|
34
|
+
uuid: Uuid;
|
|
35
|
+
}
|
|
36
|
+
interface ForProps<T$1 extends Keyed> {
|
|
37
|
+
each: ReadFn<T$1[]>;
|
|
38
|
+
}
|
|
39
|
+
declare function For<T$1 extends Keyed>(p: ForProps<T$1>, [child]: any): null;
|
|
32
40
|
//#endregion
|
|
33
41
|
//#region core/fragment.d.ts
|
|
34
42
|
declare function fragment(p: null, ...childs: any): any;
|
|
35
43
|
//#endregion
|
|
44
|
+
//#region core/jsx.d.ts
|
|
45
|
+
type JsxNode = VElement | VText | VSignal;
|
|
46
|
+
declare global {
|
|
47
|
+
namespace JSX {
|
|
48
|
+
type Element = any;
|
|
49
|
+
interface IntrinsicElements {
|
|
50
|
+
[key: string]: any;
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
interface VElement {
|
|
55
|
+
kind: "element";
|
|
56
|
+
tag: string | ComponentFn;
|
|
57
|
+
props: Record<string, any>;
|
|
58
|
+
children: JsxNode[];
|
|
59
|
+
}
|
|
60
|
+
interface VText {
|
|
61
|
+
kind: "text";
|
|
62
|
+
value: string;
|
|
63
|
+
}
|
|
64
|
+
interface VSignal {
|
|
65
|
+
kind: "signal";
|
|
66
|
+
read: ReadFn<any>;
|
|
67
|
+
}
|
|
68
|
+
interface PropsInterface {
|
|
69
|
+
ctx?: any;
|
|
70
|
+
}
|
|
71
|
+
type ComponentFn = (props: PropsInterface, children: JsxNode[]) => JsxNode | null;
|
|
72
|
+
declare function jsx(tag: string | ComponentFn, props: any, ...rawChildren: any[]): VElement;
|
|
73
|
+
//#endregion
|
|
74
|
+
//#region core/lifecycle.d.ts
|
|
75
|
+
type MountCallback = (el: Element) => void | Promise<void>;
|
|
76
|
+
type UnmountCallback = () => void | Promise<void>;
|
|
77
|
+
declare function hasActiveMountSession(): boolean;
|
|
78
|
+
declare function beginMountSession(): void;
|
|
79
|
+
declare function endMountSession(root: Element): void;
|
|
80
|
+
declare function mount(cb: MountCallback): void;
|
|
81
|
+
declare function unmount(cb: UnmountCallback): void;
|
|
82
|
+
declare function runUnmountsForElement(el: Element): void;
|
|
83
|
+
//#endregion
|
|
36
84
|
//#region core/render.d.ts
|
|
37
85
|
interface RenderCtx {
|
|
38
86
|
parent: Node & ParentNode;
|
|
87
|
+
self?: Node;
|
|
39
88
|
[k: string]: any;
|
|
40
89
|
}
|
|
41
90
|
interface RenderResult {
|
|
42
91
|
el: Node;
|
|
43
92
|
}
|
|
44
|
-
declare function render(node:
|
|
93
|
+
declare function render(node: JsxNode | null, ctx: RenderCtx): RenderResult;
|
|
45
94
|
//#endregion
|
|
46
|
-
//#region core/
|
|
47
|
-
|
|
95
|
+
//#region core/show.d.ts
|
|
96
|
+
interface ShowPropsInterface {
|
|
97
|
+
when: ReadFn<boolean>;
|
|
98
|
+
}
|
|
99
|
+
declare function Show(p: ShowPropsInterface, children: any): null;
|
|
100
|
+
//#endregion
|
|
101
|
+
//#region helper/repeat.d.ts
|
|
102
|
+
type MaybeSignal$1<T$1> = T$1 | ReadFn<T$1>;
|
|
103
|
+
interface RepeatPropsInterface {
|
|
104
|
+
n: MaybeSignal$1<number>;
|
|
105
|
+
}
|
|
106
|
+
declare function Repeat(p: RepeatPropsInterface, children: any[]): any;
|
|
107
|
+
//#endregion
|
|
108
|
+
//#region style/breakpoint.d.ts
|
|
109
|
+
declare const breakpoint: {
|
|
110
|
+
mobile: number;
|
|
111
|
+
tablet: number;
|
|
112
|
+
laptop: number;
|
|
113
|
+
desktop: number;
|
|
114
|
+
large: number;
|
|
115
|
+
};
|
|
116
|
+
//#endregion
|
|
117
|
+
//#region hooks/use-breakpoint.d.ts
|
|
118
|
+
type BreakpointName = keyof typeof breakpoint;
|
|
119
|
+
declare function useBreakpoint(): ReadFn<BreakpointName>;
|
|
120
|
+
//#endregion
|
|
121
|
+
//#region hooks/use-custom-event.d.ts
|
|
122
|
+
type Handler<T$1> = (data: T$1) => void;
|
|
123
|
+
/**
|
|
124
|
+
* Creates a custom browser event emitter.
|
|
125
|
+
* If a handler is provided, it is automatically
|
|
126
|
+
* cleaned up on component unmount.
|
|
127
|
+
*/
|
|
128
|
+
declare function useCustomEvent<T$1 = any>(topic: string, handler?: Handler<T$1>): (data: T$1) => void;
|
|
129
|
+
//#endregion
|
|
130
|
+
//#region hooks/use-locale.d.ts
|
|
131
|
+
interface LocaleController {
|
|
132
|
+
locale: ReadFn<string>;
|
|
133
|
+
setLocale: (next: string) => void;
|
|
134
|
+
}
|
|
135
|
+
declare function useLocale(): LocaleController;
|
|
136
|
+
type Route = string;
|
|
137
|
+
declare function useRouter(): {
|
|
138
|
+
route: import_dist$1.ReadFn<string>;
|
|
139
|
+
navigate: (to: Route) => void;
|
|
140
|
+
};
|
|
141
|
+
//#endregion
|
|
142
|
+
//#region core/dom.d.ts
|
|
143
|
+
type CSSValue = string | number;
|
|
144
|
+
type MaybeSignal<T$1> = T$1 | ReadFn<T$1>;
|
|
48
145
|
interface DOMEvents {
|
|
49
|
-
onClick?:
|
|
50
|
-
onDblClick?:
|
|
51
|
-
onMouseDown?:
|
|
52
|
-
onMouseUp?:
|
|
53
|
-
onMouseMove?:
|
|
54
|
-
onMouseEnter?:
|
|
55
|
-
onMouseLeave?:
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
146
|
+
onClick?: (e: MouseEvent) => void;
|
|
147
|
+
onDblClick?: (e: MouseEvent) => void;
|
|
148
|
+
onMouseDown?: (e: MouseEvent) => void;
|
|
149
|
+
onMouseUp?: (e: MouseEvent) => void;
|
|
150
|
+
onMouseMove?: (e: MouseEvent) => void;
|
|
151
|
+
onMouseEnter?: (e: MouseEvent) => void;
|
|
152
|
+
onMouseLeave?: (e: MouseEvent) => void;
|
|
153
|
+
onMouseOver?: (e: MouseEvent) => void;
|
|
154
|
+
onMouseOut?: (e: MouseEvent) => void;
|
|
155
|
+
onPointerDown?: (e: PointerEvent) => void;
|
|
156
|
+
onPointerUp?: (e: PointerEvent) => void;
|
|
157
|
+
onPointerMove?: (e: PointerEvent) => void;
|
|
158
|
+
onPointerEnter?: (e: PointerEvent) => void;
|
|
159
|
+
onPointerLeave?: (e: PointerEvent) => void;
|
|
160
|
+
onPointerOver?: (e: PointerEvent) => void;
|
|
161
|
+
onPointerOut?: (e: PointerEvent) => void;
|
|
162
|
+
onKeyDown?: (e: KeyboardEvent) => void;
|
|
163
|
+
onKeyUp?: (e: KeyboardEvent) => void;
|
|
164
|
+
onFocus?: (e: FocusEvent) => void;
|
|
165
|
+
onBlur?: (e: FocusEvent) => void;
|
|
166
|
+
onInput?: (e: InputEvent) => void;
|
|
167
|
+
onChange?: (e: Event) => void;
|
|
168
|
+
onSubmit?: (e: SubmitEvent) => void;
|
|
169
|
+
onDragStart?: (e: DragEvent) => void;
|
|
170
|
+
onDragEnd?: (e: DragEvent) => void;
|
|
171
|
+
onDragOver?: (e: DragEvent) => void;
|
|
172
|
+
onDrop?: (e: DragEvent) => void;
|
|
173
|
+
}
|
|
174
|
+
interface DOMAttrs {
|
|
68
175
|
id?: string;
|
|
69
176
|
class?: string;
|
|
70
177
|
className?: string;
|
|
71
178
|
title?: string;
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
disabled?: MaybeSignal<boolean>;
|
|
76
|
-
children?: any;
|
|
179
|
+
role?: string;
|
|
180
|
+
tabIndex?: number;
|
|
181
|
+
[key: string]: any;
|
|
77
182
|
}
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
stroke?: MaybeSignal<string>;
|
|
85
|
-
strokeWidth?: MaybeSignal<number>;
|
|
86
|
-
d?: MaybeSignal<string>;
|
|
87
|
-
cx?: MaybeSignal<string | number>;
|
|
88
|
-
cy?: MaybeSignal<string | number>;
|
|
89
|
-
r?: MaybeSignal<string | number>;
|
|
90
|
-
x?: MaybeSignal<string | number>;
|
|
91
|
-
y?: MaybeSignal<string | number>;
|
|
92
|
-
width?: MaybeSignal<string | number>;
|
|
93
|
-
height?: MaybeSignal<string | number>;
|
|
183
|
+
//#endregion
|
|
184
|
+
//#region layout/box.d.ts
|
|
185
|
+
interface BoxProps extends DOMEvents, DOMAttrs {
|
|
186
|
+
/**
|
|
187
|
+
* Child nodes rendered inside the box
|
|
188
|
+
*/
|
|
94
189
|
children?: any;
|
|
190
|
+
/** Margin (all sides) */
|
|
191
|
+
m?: MaybeSignal<CSSValue>;
|
|
192
|
+
/** Margin-bottom */
|
|
193
|
+
mb?: MaybeSignal<CSSValue>;
|
|
194
|
+
/** Margin-left */
|
|
195
|
+
ml?: MaybeSignal<CSSValue>;
|
|
196
|
+
/** Margin-right */
|
|
197
|
+
mr?: MaybeSignal<CSSValue>;
|
|
198
|
+
/** Margin-top */
|
|
199
|
+
mt?: MaybeSignal<CSSValue>;
|
|
200
|
+
/** Margin horizontal (left + right) */
|
|
201
|
+
mx?: MaybeSignal<CSSValue>;
|
|
202
|
+
/** Margin vertical (top + bottom) */
|
|
203
|
+
my?: MaybeSignal<CSSValue>;
|
|
204
|
+
/** Padding (all sides) */
|
|
205
|
+
p?: MaybeSignal<CSSValue>;
|
|
206
|
+
/** Padding-bottom */
|
|
207
|
+
pb?: MaybeSignal<CSSValue>;
|
|
208
|
+
/** Padding-left */
|
|
209
|
+
pl?: MaybeSignal<CSSValue>;
|
|
210
|
+
/** Padding-right */
|
|
211
|
+
pr?: MaybeSignal<CSSValue>;
|
|
212
|
+
/** Padding-top */
|
|
213
|
+
pt?: MaybeSignal<CSSValue>;
|
|
214
|
+
/** Padding horizontal (left + right) */
|
|
215
|
+
px?: MaybeSignal<CSSValue>;
|
|
216
|
+
/** Padding vertical (top + bottom) */
|
|
217
|
+
py?: MaybeSignal<CSSValue>;
|
|
218
|
+
/** Border (all sides) */
|
|
219
|
+
b?: MaybeSignal<CSSValue>;
|
|
220
|
+
/** Border-top */
|
|
221
|
+
bt?: MaybeSignal<CSSValue>;
|
|
222
|
+
/** Border-right */
|
|
223
|
+
br?: MaybeSignal<CSSValue>;
|
|
224
|
+
/** Border-bottom */
|
|
225
|
+
bb?: MaybeSignal<CSSValue>;
|
|
226
|
+
/** Border-left */
|
|
227
|
+
bl?: MaybeSignal<CSSValue>;
|
|
228
|
+
/** Border horizontal (left + right) */
|
|
229
|
+
bx?: MaybeSignal<CSSValue>;
|
|
230
|
+
/** Border vertical (top + bottom) */
|
|
231
|
+
by?: MaybeSignal<CSSValue>;
|
|
232
|
+
/** Border radius (all corners) */
|
|
233
|
+
r?: MaybeSignal<CSSValue>;
|
|
234
|
+
/** Border-top radius */
|
|
235
|
+
rt?: MaybeSignal<CSSValue>;
|
|
236
|
+
/** Border-right radius */
|
|
237
|
+
rr?: MaybeSignal<CSSValue>;
|
|
238
|
+
/** Border-bottom radius */
|
|
239
|
+
rb?: MaybeSignal<CSSValue>;
|
|
240
|
+
/** Border-left radius */
|
|
241
|
+
rl?: MaybeSignal<CSSValue>;
|
|
242
|
+
/** Border-top-right radius */
|
|
243
|
+
rtr?: MaybeSignal<CSSValue>;
|
|
244
|
+
/** Border-top-left radius */
|
|
245
|
+
rtl?: MaybeSignal<CSSValue>;
|
|
246
|
+
/** Border-bottom-right radius */
|
|
247
|
+
rbr?: MaybeSignal<CSSValue>;
|
|
248
|
+
/** Border-bottom-left radius */
|
|
249
|
+
rbl?: MaybeSignal<CSSValue>;
|
|
250
|
+
/** Size shortcut (width + height) */
|
|
251
|
+
s?: MaybeSignal<CSSValue>;
|
|
252
|
+
/** Height */
|
|
253
|
+
h?: MaybeSignal<CSSValue>;
|
|
254
|
+
/** Width */
|
|
255
|
+
w?: MaybeSignal<CSSValue>;
|
|
256
|
+
/** Max height */
|
|
257
|
+
maxH?: MaybeSignal<CSSValue>;
|
|
258
|
+
/** Max width */
|
|
259
|
+
maxW?: MaybeSignal<CSSValue>;
|
|
260
|
+
/** Min height */
|
|
261
|
+
minH?: MaybeSignal<CSSValue>;
|
|
262
|
+
/** Min width */
|
|
263
|
+
minW?: MaybeSignal<CSSValue>;
|
|
264
|
+
/** Opacity (0–1) */
|
|
265
|
+
o?: MaybeSignal<CSSValue>;
|
|
266
|
+
/** Box shadow */
|
|
267
|
+
sh?: MaybeSignal<CSSValue>;
|
|
268
|
+
/** Background */
|
|
269
|
+
bg?: MaybeSignal<CSSValue>;
|
|
270
|
+
/**
|
|
271
|
+
* Additional inline styles (merged last)
|
|
272
|
+
* Values support signals
|
|
273
|
+
*/
|
|
274
|
+
style?: Record<string, MaybeSignal<CSSValue> | undefined>;
|
|
95
275
|
}
|
|
96
|
-
declare
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
circle: SVGAttributes;
|
|
125
|
-
rect: SVGAttributes;
|
|
126
|
-
g: SVGAttributes;
|
|
127
|
-
line: SVGAttributes;
|
|
128
|
-
polyline: SVGAttributes;
|
|
129
|
-
polygon: SVGAttributes;
|
|
130
|
-
text: SVGAttributes;
|
|
131
|
-
tspan: SVGAttributes;
|
|
132
|
-
}
|
|
133
|
-
}
|
|
276
|
+
declare function Box(p: BoxProps, children: any[]): any;
|
|
277
|
+
//#endregion
|
|
278
|
+
//#region layout/absolute.d.ts
|
|
279
|
+
/**
|
|
280
|
+
* Absolute positioned component
|
|
281
|
+
* Positions element absolutely within the nearest positioned ancestor
|
|
282
|
+
*/
|
|
283
|
+
interface AbsolutePropertiesInterface extends BoxProps {
|
|
284
|
+
/**
|
|
285
|
+
* Distance from top edge of containing block
|
|
286
|
+
* (e.g. "10px", "1rem", "5%")
|
|
287
|
+
*/
|
|
288
|
+
top?: string;
|
|
289
|
+
/**
|
|
290
|
+
* Distance from right edge of containing block
|
|
291
|
+
* (e.g. "10px", "1rem", "5%")
|
|
292
|
+
*/
|
|
293
|
+
right?: string;
|
|
294
|
+
/**
|
|
295
|
+
* Distance from bottom edge of containing block
|
|
296
|
+
* (e.g. "10px", "1rem", "5%")
|
|
297
|
+
*/
|
|
298
|
+
bottom?: string;
|
|
299
|
+
/**
|
|
300
|
+
* Distance from left edge of containing block
|
|
301
|
+
* (e.g. "10px", "1rem", "5%")
|
|
302
|
+
*/
|
|
303
|
+
left?: string;
|
|
134
304
|
}
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
305
|
+
declare function Absolute(p: AbsolutePropertiesInterface, children: any[]): any;
|
|
306
|
+
//#endregion
|
|
307
|
+
//#region layout/flex-item.d.ts
|
|
308
|
+
/**
|
|
309
|
+
* Flex item component
|
|
310
|
+
* Controls individual item behavior in flex containers
|
|
311
|
+
*/
|
|
312
|
+
interface FlexItemPropertiesInterface extends BoxProps {
|
|
313
|
+
/**
|
|
314
|
+
* Flex shorthand (grow, shrink, basis)
|
|
315
|
+
* e.g. "1", "none", "0 1 auto"
|
|
316
|
+
*/
|
|
317
|
+
flx?: string;
|
|
318
|
+
/**
|
|
319
|
+
* Align-self (cross-axis alignment)
|
|
320
|
+
*/
|
|
321
|
+
as?: "auto" | "flex-start" | "flex-end" | "center" | "baseline" | "stretch";
|
|
322
|
+
/**
|
|
323
|
+
* Flex grow factor
|
|
324
|
+
*/
|
|
325
|
+
flxGrow?: string;
|
|
326
|
+
/**
|
|
327
|
+
* Flex shrink factor
|
|
328
|
+
*/
|
|
329
|
+
flxShrink?: string;
|
|
330
|
+
/**
|
|
331
|
+
* Flex basis
|
|
332
|
+
*/
|
|
333
|
+
flxBasis?: string;
|
|
139
334
|
}
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
335
|
+
declare function FlexItem(p: FlexItemPropertiesInterface, children: any[]): any;
|
|
336
|
+
//#endregion
|
|
337
|
+
//#region layout/flex.d.ts
|
|
338
|
+
/**
|
|
339
|
+
* Flex container component
|
|
340
|
+
* Core flexbox layout primitive
|
|
341
|
+
*/
|
|
342
|
+
interface FlexPropertiesInterface extends FlexItemPropertiesInterface {
|
|
343
|
+
/**
|
|
344
|
+
* Justify-content (main axis alignment)
|
|
345
|
+
*/
|
|
346
|
+
jc?: "flex-start" | "flex-end" | "center" | "space-between" | "space-around" | "space-evenly";
|
|
347
|
+
/**
|
|
348
|
+
* Align-items (cross axis alignment)
|
|
349
|
+
*/
|
|
350
|
+
ai?: "stretch" | "flex-start" | "flex-end" | "center" | "baseline";
|
|
351
|
+
/**
|
|
352
|
+
* Align-content (multi-line alignment)
|
|
353
|
+
*/
|
|
354
|
+
ac?: "flex-start" | "flex-end" | "center" | "space-between" | "space-around" | "stretch";
|
|
355
|
+
/**
|
|
356
|
+
* Gap between items
|
|
357
|
+
*/
|
|
358
|
+
g?: string;
|
|
359
|
+
/**
|
|
360
|
+
* Flex direction
|
|
361
|
+
*/
|
|
362
|
+
flxDirection?: "row" | "row-reverse" | "column" | "column-reverse";
|
|
363
|
+
/**
|
|
364
|
+
* Flex wrap
|
|
365
|
+
*/
|
|
366
|
+
flxWrap?: "nowrap" | "wrap" | "wrap-reverse";
|
|
367
|
+
/**
|
|
368
|
+
* Flex-flow shorthand
|
|
369
|
+
*/
|
|
370
|
+
flxFlow?: `${"row" | "row-reverse" | "column" | "column-reverse"} ${"nowrap" | "wrap" | "wrap-reverse"}`;
|
|
143
371
|
}
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
372
|
+
declare function Flex(p: FlexPropertiesInterface, children: any[]): any;
|
|
373
|
+
//#endregion
|
|
374
|
+
//#region layout/center.d.ts
|
|
375
|
+
/**
|
|
376
|
+
* Center component
|
|
377
|
+
* Centers children horizontally and vertically using flexbox
|
|
378
|
+
*/
|
|
379
|
+
interface CenterPropertiesInterface extends FlexPropertiesInterface {}
|
|
380
|
+
declare function Center(p: CenterPropertiesInterface, children: any[]): any;
|
|
381
|
+
//#endregion
|
|
382
|
+
//#region layout/fixed.d.ts
|
|
383
|
+
/**
|
|
384
|
+
* Fixed positioned component
|
|
385
|
+
* Positions element relative to the viewport
|
|
386
|
+
*/
|
|
387
|
+
interface FixedPropertiesInterface extends BoxProps {
|
|
388
|
+
/** Top offset (e.g. "10px") */
|
|
389
|
+
top?: string;
|
|
390
|
+
/** Right offset */
|
|
391
|
+
right?: string;
|
|
392
|
+
/** Bottom offset */
|
|
393
|
+
bottom?: string;
|
|
394
|
+
/** Left offset */
|
|
395
|
+
left?: string;
|
|
396
|
+
/** Stacking order (z-index) */
|
|
397
|
+
zIndex?: string;
|
|
149
398
|
}
|
|
150
|
-
|
|
151
|
-
|
|
399
|
+
declare function Fixed(p: FixedPropertiesInterface, children: any[]): any;
|
|
400
|
+
//#endregion
|
|
401
|
+
//#region layout/grid-item.d.ts
|
|
402
|
+
/**
|
|
403
|
+
* Grid item component
|
|
404
|
+
* Controls individual item placement inside CSS Grid containers
|
|
405
|
+
*/
|
|
406
|
+
interface GridItemPropertiesInterface extends BoxProps {
|
|
407
|
+
/**
|
|
408
|
+
* Grid area name or shorthand
|
|
409
|
+
* (e.g. "header", "1 / 1 / 3 / 2")
|
|
410
|
+
*/
|
|
411
|
+
grdArea?: string;
|
|
412
|
+
/**
|
|
413
|
+
* Grid column placement
|
|
414
|
+
* (e.g. "1 / span 2", "sidebar")
|
|
415
|
+
*/
|
|
416
|
+
grdColumn?: string;
|
|
417
|
+
/**
|
|
418
|
+
* Grid row placement
|
|
419
|
+
* (e.g. "1 / span 3", "content")
|
|
420
|
+
*/
|
|
421
|
+
grdRow?: string;
|
|
152
422
|
}
|
|
153
|
-
|
|
154
|
-
declare function jsx(tag: string | ComponentFn, props: any, ...rawChildren: any[]): JsxNode;
|
|
423
|
+
declare function GridItem(p: GridItemPropertiesInterface, children: any[]): any;
|
|
155
424
|
//#endregion
|
|
156
|
-
//#region
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
425
|
+
//#region layout/grid.d.ts
|
|
426
|
+
/**
|
|
427
|
+
* Grid container component
|
|
428
|
+
* Core CSS Grid layout primitive
|
|
429
|
+
*/
|
|
430
|
+
interface GridPropertiesInterface extends GridItemPropertiesInterface {
|
|
431
|
+
/** Gap between grid items */
|
|
432
|
+
g?: string;
|
|
433
|
+
/** Align-items (block axis) */
|
|
434
|
+
ai?: "stretch" | "start" | "end" | "center" | "baseline";
|
|
435
|
+
/** Justify-items (inline axis) */
|
|
436
|
+
ji?: "stretch" | "start" | "end" | "center" | "baseline";
|
|
437
|
+
/** Align-self (container as grid item) */
|
|
438
|
+
as?: "auto" | "normal" | "stretch" | "center" | "start" | "end" | "self-start" | "self-end" | "flex-start" | "flex-end" | "left" | "right";
|
|
439
|
+
grdTemplateColumns?: string;
|
|
440
|
+
grdTemplateRows?: string;
|
|
441
|
+
grdTemplateAreas?: string;
|
|
442
|
+
grdTemplate?: string;
|
|
443
|
+
grdAutoColumns?: string;
|
|
444
|
+
grdAutoRows?: string;
|
|
445
|
+
grdAutoFlow?: "row" | "column" | "row dense" | "column dense";
|
|
446
|
+
grd?: string;
|
|
447
|
+
grdRowStart?: string;
|
|
448
|
+
grdColumnStart?: string;
|
|
449
|
+
grdRowEnd?: string;
|
|
450
|
+
grdColumnEnd?: string;
|
|
451
|
+
grdRow?: string;
|
|
452
|
+
grdColumn?: string;
|
|
453
|
+
grdRowGap?: string;
|
|
454
|
+
grdColumnGap?: string;
|
|
455
|
+
}
|
|
456
|
+
declare function Grid(p: GridPropertiesInterface, children: any[]): any;
|
|
164
457
|
//#endregion
|
|
165
|
-
//#region
|
|
166
|
-
|
|
167
|
-
|
|
458
|
+
//#region layout/relative.d.ts
|
|
459
|
+
/**
|
|
460
|
+
* Relative positioned component
|
|
461
|
+
* Establishes a positioning context for absolute children
|
|
462
|
+
*/
|
|
463
|
+
interface RelativePropertiesInterface extends BoxProps {
|
|
464
|
+
/**
|
|
465
|
+
* Stacking order (z-index)
|
|
466
|
+
* (e.g. "1", "auto", "var(--z-index-modal)")
|
|
467
|
+
*/
|
|
468
|
+
zIndex?: string;
|
|
168
469
|
}
|
|
169
|
-
declare function
|
|
470
|
+
declare function Relative(p: RelativePropertiesInterface, children: any[]): any;
|
|
170
471
|
//#endregion
|
|
171
|
-
//#region
|
|
172
|
-
|
|
472
|
+
//#region layout/scroll.d.ts
|
|
473
|
+
/**
|
|
474
|
+
* Scroll component
|
|
475
|
+
* Creates a scrollable container filling its parent
|
|
476
|
+
*/
|
|
477
|
+
interface ScrollPropertiesInterface extends BoxProps {}
|
|
478
|
+
declare function Scroll(p: ScrollPropertiesInterface, children: any[]): any;
|
|
479
|
+
//#endregion
|
|
480
|
+
//#region layout/stack.d.ts
|
|
481
|
+
/**
|
|
482
|
+
* Stack component
|
|
483
|
+
* Vertical layout primitive (flex-direction: column by default)
|
|
484
|
+
*/
|
|
485
|
+
interface StackPropertiesInterface extends FlexPropertiesInterface {}
|
|
486
|
+
declare function Stack(p: StackPropertiesInterface, children: any[]): any;
|
|
487
|
+
//#endregion
|
|
488
|
+
//#region layout/sticky.d.ts
|
|
489
|
+
/**
|
|
490
|
+
* Sticky positioned component
|
|
491
|
+
* Sticks to a position within its scroll container
|
|
492
|
+
*/
|
|
493
|
+
interface StickyPropertiesInterface extends BoxProps {
|
|
494
|
+
/** Top offset (e.g. "10px") */
|
|
495
|
+
top?: string;
|
|
496
|
+
/** Right offset */
|
|
497
|
+
right?: string;
|
|
498
|
+
/** Bottom offset */
|
|
499
|
+
bottom?: string;
|
|
500
|
+
/** Left offset */
|
|
501
|
+
left?: string;
|
|
502
|
+
/** Stacking order (z-index) */
|
|
503
|
+
zIndex?: string;
|
|
504
|
+
}
|
|
505
|
+
declare function Sticky(p: StickyPropertiesInterface, children: any[]): any;
|
|
506
|
+
/**
|
|
507
|
+
* Text component
|
|
508
|
+
* Typographic primitive for rendering text elements
|
|
509
|
+
*/
|
|
510
|
+
interface TextPropertiesInterface extends DOMAttrs, DOMEvents {
|
|
511
|
+
/** Text content */
|
|
512
|
+
children?: any;
|
|
513
|
+
/**
|
|
514
|
+
* HTML tag to render
|
|
515
|
+
* @default "p"
|
|
516
|
+
*/
|
|
517
|
+
tag?: "span" | "p" | "h1" | "h2" | "h3" | "h4" | "h5" | "h6";
|
|
518
|
+
/** Text alignment */
|
|
519
|
+
a?: "left" | "right" | "center" | "justify";
|
|
520
|
+
/** Font family */
|
|
521
|
+
ff?: string;
|
|
522
|
+
/** Font weight */
|
|
523
|
+
fw?: number;
|
|
524
|
+
/** Font size */
|
|
525
|
+
fs?: string;
|
|
526
|
+
/** Line height */
|
|
527
|
+
lh?: string;
|
|
528
|
+
/** Letter spacing */
|
|
529
|
+
ls?: string;
|
|
530
|
+
/** Font style */
|
|
531
|
+
s?: "normal" | "italic";
|
|
532
|
+
/** Text color */
|
|
533
|
+
c?: string;
|
|
534
|
+
m?: string;
|
|
535
|
+
mb?: string;
|
|
536
|
+
ml?: string;
|
|
537
|
+
mr?: string;
|
|
538
|
+
mt?: string;
|
|
539
|
+
mx?: string;
|
|
540
|
+
my?: string;
|
|
541
|
+
p?: string;
|
|
542
|
+
pb?: string;
|
|
543
|
+
pl?: string;
|
|
544
|
+
pr?: string;
|
|
545
|
+
pt?: string;
|
|
546
|
+
px?: string;
|
|
547
|
+
py?: string;
|
|
548
|
+
/** Background */
|
|
549
|
+
bg?: string;
|
|
550
|
+
}
|
|
551
|
+
declare function Text(p: TextPropertiesInterface, children: any[]): import_dist.VElement;
|
|
552
|
+
//#endregion
|
|
553
|
+
//#region style/color.d.ts
|
|
554
|
+
declare const color: {
|
|
555
|
+
brand: string;
|
|
556
|
+
onBrand: string;
|
|
557
|
+
gray0: string;
|
|
558
|
+
gray100: string;
|
|
559
|
+
gray200: string;
|
|
560
|
+
gray300: string;
|
|
561
|
+
gray400: string;
|
|
562
|
+
gray500: string;
|
|
563
|
+
gray600: string;
|
|
564
|
+
gray700: string;
|
|
565
|
+
gray800: string;
|
|
566
|
+
gray900: string;
|
|
567
|
+
red0: string;
|
|
568
|
+
red100: string;
|
|
569
|
+
red200: string;
|
|
570
|
+
red300: string;
|
|
571
|
+
red400: string;
|
|
572
|
+
red500: string;
|
|
573
|
+
red600: string;
|
|
574
|
+
red700: string;
|
|
575
|
+
red800: string;
|
|
576
|
+
red900: string;
|
|
577
|
+
pink0: string;
|
|
578
|
+
pink100: string;
|
|
579
|
+
pink200: string;
|
|
580
|
+
pink300: string;
|
|
581
|
+
pink400: string;
|
|
582
|
+
pink500: string;
|
|
583
|
+
pink600: string;
|
|
584
|
+
pink700: string;
|
|
585
|
+
pink800: string;
|
|
586
|
+
pink900: string;
|
|
587
|
+
grape0: string;
|
|
588
|
+
grape100: string;
|
|
589
|
+
grape200: string;
|
|
590
|
+
grape300: string;
|
|
591
|
+
grape400: string;
|
|
592
|
+
grape500: string;
|
|
593
|
+
grape600: string;
|
|
594
|
+
grape700: string;
|
|
595
|
+
grape800: string;
|
|
596
|
+
grape900: string;
|
|
597
|
+
violet0: string;
|
|
598
|
+
violet100: string;
|
|
599
|
+
violet200: string;
|
|
600
|
+
violet300: string;
|
|
601
|
+
violet400: string;
|
|
602
|
+
violet500: string;
|
|
603
|
+
violet600: string;
|
|
604
|
+
violet700: string;
|
|
605
|
+
violet800: string;
|
|
606
|
+
violet900: string;
|
|
607
|
+
indigo0: string;
|
|
608
|
+
indigo100: string;
|
|
609
|
+
indigo200: string;
|
|
610
|
+
indigo300: string;
|
|
611
|
+
indigo400: string;
|
|
612
|
+
indigo500: string;
|
|
613
|
+
indigo600: string;
|
|
614
|
+
indigo700: string;
|
|
615
|
+
indigo800: string;
|
|
616
|
+
indigo900: string;
|
|
617
|
+
blue0: string;
|
|
618
|
+
blue100: string;
|
|
619
|
+
blue200: string;
|
|
620
|
+
blue300: string;
|
|
621
|
+
blue400: string;
|
|
622
|
+
blue500: string;
|
|
623
|
+
blue600: string;
|
|
624
|
+
blue700: string;
|
|
625
|
+
blue800: string;
|
|
626
|
+
blue900: string;
|
|
627
|
+
cyan0: string;
|
|
628
|
+
cyan100: string;
|
|
629
|
+
cyan200: string;
|
|
630
|
+
cyan300: string;
|
|
631
|
+
cyan400: string;
|
|
632
|
+
cyan500: string;
|
|
633
|
+
cyan600: string;
|
|
634
|
+
cyan700: string;
|
|
635
|
+
cyan800: string;
|
|
636
|
+
cyan900: string;
|
|
637
|
+
teal0: string;
|
|
638
|
+
teal100: string;
|
|
639
|
+
teal200: string;
|
|
640
|
+
teal300: string;
|
|
641
|
+
teal400: string;
|
|
642
|
+
teal500: string;
|
|
643
|
+
teal600: string;
|
|
644
|
+
teal700: string;
|
|
645
|
+
teal800: string;
|
|
646
|
+
teal900: string;
|
|
647
|
+
green0: string;
|
|
648
|
+
green100: string;
|
|
649
|
+
green200: string;
|
|
650
|
+
green300: string;
|
|
651
|
+
green400: string;
|
|
652
|
+
green500: string;
|
|
653
|
+
green600: string;
|
|
654
|
+
green700: string;
|
|
655
|
+
green800: string;
|
|
656
|
+
green900: string;
|
|
657
|
+
lime0: string;
|
|
658
|
+
lime100: string;
|
|
659
|
+
lime200: string;
|
|
660
|
+
lime300: string;
|
|
661
|
+
lime400: string;
|
|
662
|
+
lime500: string;
|
|
663
|
+
lime600: string;
|
|
664
|
+
lime700: string;
|
|
665
|
+
lime800: string;
|
|
666
|
+
lime900: string;
|
|
667
|
+
yellow0: string;
|
|
668
|
+
yellow100: string;
|
|
669
|
+
yellow200: string;
|
|
670
|
+
yellow300: string;
|
|
671
|
+
yellow400: string;
|
|
672
|
+
yellow500: string;
|
|
673
|
+
yellow600: string;
|
|
674
|
+
yellow700: string;
|
|
675
|
+
yellow800: string;
|
|
676
|
+
yellow900: string;
|
|
677
|
+
orange0: string;
|
|
678
|
+
orange100: string;
|
|
679
|
+
orange200: string;
|
|
680
|
+
orange300: string;
|
|
681
|
+
orange400: string;
|
|
682
|
+
orange500: string;
|
|
683
|
+
orange600: string;
|
|
684
|
+
orange700: string;
|
|
685
|
+
orange800: string;
|
|
686
|
+
orange900: string;
|
|
687
|
+
};
|
|
688
|
+
//#endregion
|
|
689
|
+
//#region style/font.d.ts
|
|
690
|
+
declare const font: {
|
|
691
|
+
family: {
|
|
692
|
+
sans: string;
|
|
693
|
+
serif: string;
|
|
694
|
+
mono: string;
|
|
695
|
+
};
|
|
696
|
+
size: {
|
|
697
|
+
xs: string;
|
|
698
|
+
sm: string;
|
|
699
|
+
md: string;
|
|
700
|
+
lg: string;
|
|
701
|
+
xl: string;
|
|
702
|
+
"2xl": string;
|
|
703
|
+
"3xl": string;
|
|
704
|
+
"4xl": string;
|
|
705
|
+
"5xl": string;
|
|
706
|
+
"6xl": string;
|
|
707
|
+
"7xl": string;
|
|
708
|
+
"8xl": string;
|
|
709
|
+
"9xl": string;
|
|
710
|
+
};
|
|
711
|
+
weight: {
|
|
712
|
+
thin: number;
|
|
713
|
+
extralight: number;
|
|
714
|
+
light: number;
|
|
715
|
+
normal: number;
|
|
716
|
+
medium: number;
|
|
717
|
+
semibold: number;
|
|
718
|
+
bold: number;
|
|
719
|
+
extrabold: number;
|
|
720
|
+
black: number;
|
|
721
|
+
};
|
|
722
|
+
style: {
|
|
723
|
+
normal: string;
|
|
724
|
+
italic: string;
|
|
725
|
+
};
|
|
726
|
+
lineHeight: {
|
|
727
|
+
xs: string;
|
|
728
|
+
sm: string;
|
|
729
|
+
md: string;
|
|
730
|
+
lg: string;
|
|
731
|
+
xl: string;
|
|
732
|
+
"2xl": string;
|
|
733
|
+
"3xl": string;
|
|
734
|
+
"4xl": string;
|
|
735
|
+
"5xl": string;
|
|
736
|
+
"6xl": string;
|
|
737
|
+
"7xl": string;
|
|
738
|
+
"8xl": string;
|
|
739
|
+
"9xl": string;
|
|
740
|
+
};
|
|
741
|
+
letterSpacing: {
|
|
742
|
+
xs: string;
|
|
743
|
+
sm: string;
|
|
744
|
+
md: string;
|
|
745
|
+
lg: string;
|
|
746
|
+
xl: string;
|
|
747
|
+
"2xl": string;
|
|
748
|
+
"3xl": string;
|
|
749
|
+
"4xl": string;
|
|
750
|
+
"5xl": string;
|
|
751
|
+
"6xl": string;
|
|
752
|
+
"7xl": string;
|
|
753
|
+
"8xl": string;
|
|
754
|
+
"9xl": string;
|
|
755
|
+
};
|
|
756
|
+
};
|
|
757
|
+
//#endregion
|
|
758
|
+
//#region style/radius.d.ts
|
|
759
|
+
declare const radius: {
|
|
760
|
+
sm: string;
|
|
761
|
+
md: string;
|
|
762
|
+
lg: string;
|
|
763
|
+
xl: string;
|
|
764
|
+
"2xl": string;
|
|
765
|
+
"3xl": string;
|
|
766
|
+
full: string;
|
|
767
|
+
};
|
|
768
|
+
//#endregion
|
|
769
|
+
//#region style/shadow.d.ts
|
|
770
|
+
declare const shadow: {
|
|
771
|
+
sm: string;
|
|
772
|
+
md: string;
|
|
773
|
+
lg: string;
|
|
774
|
+
xl: string;
|
|
775
|
+
"2xl": string;
|
|
776
|
+
inner: string;
|
|
777
|
+
};
|
|
778
|
+
//#endregion
|
|
779
|
+
//#region style/size.d.ts
|
|
780
|
+
declare const size: {
|
|
781
|
+
xs: string;
|
|
782
|
+
sm: string;
|
|
783
|
+
md: string;
|
|
784
|
+
lg: string;
|
|
785
|
+
xl: string;
|
|
786
|
+
"2xl": string;
|
|
787
|
+
"3xl": string;
|
|
788
|
+
"4xl": string;
|
|
789
|
+
"5xl": string;
|
|
790
|
+
"6xl": string;
|
|
791
|
+
"7xl": string;
|
|
792
|
+
"8xl": string;
|
|
793
|
+
"9xl": string;
|
|
794
|
+
"1/12": string;
|
|
795
|
+
"2/12": string;
|
|
796
|
+
"3/12": string;
|
|
797
|
+
"4/12": string;
|
|
798
|
+
"5/12": string;
|
|
799
|
+
"6/12": string;
|
|
800
|
+
"7/12": string;
|
|
801
|
+
"8/12": string;
|
|
802
|
+
"9/12": string;
|
|
803
|
+
"10/12": string;
|
|
804
|
+
"11/12": string;
|
|
805
|
+
"1/5": string;
|
|
806
|
+
"2/5": string;
|
|
807
|
+
"3/5": string;
|
|
808
|
+
"4/5": string;
|
|
809
|
+
"1/4": string;
|
|
810
|
+
"3/4": string;
|
|
811
|
+
"1/3": string;
|
|
812
|
+
"2/3": string;
|
|
813
|
+
"1/2": string;
|
|
814
|
+
full: string;
|
|
815
|
+
};
|
|
816
|
+
//#endregion
|
|
817
|
+
//#region style/space.d.ts
|
|
818
|
+
declare const space: {
|
|
819
|
+
xs: string;
|
|
820
|
+
sm: string;
|
|
821
|
+
md: string;
|
|
822
|
+
lg: string;
|
|
823
|
+
xl: string;
|
|
824
|
+
xxl: string;
|
|
825
|
+
"3xl": string;
|
|
826
|
+
"4xl": string;
|
|
827
|
+
"5xl": string;
|
|
828
|
+
"6xl": string;
|
|
829
|
+
"7xl": string;
|
|
830
|
+
"8xl": string;
|
|
831
|
+
};
|
|
832
|
+
//#endregion
|
|
833
|
+
//#region style/style.d.ts
|
|
834
|
+
declare const style: {
|
|
835
|
+
normal: string;
|
|
836
|
+
italic: string;
|
|
837
|
+
};
|
|
838
|
+
//#endregion
|
|
839
|
+
//#region style/weight.d.ts
|
|
840
|
+
declare const weight: {
|
|
841
|
+
thin: number;
|
|
842
|
+
extralight: number;
|
|
843
|
+
light: number;
|
|
844
|
+
normal: number;
|
|
845
|
+
medium: number;
|
|
846
|
+
semibold: number;
|
|
847
|
+
bold: number;
|
|
848
|
+
extrabold: number;
|
|
849
|
+
black: number;
|
|
850
|
+
};
|
|
851
|
+
//#endregion
|
|
852
|
+
//#region style/z-index.d.ts
|
|
853
|
+
declare const zIndex: {
|
|
854
|
+
base: string;
|
|
855
|
+
background: string;
|
|
856
|
+
menu: string;
|
|
857
|
+
};
|
|
173
858
|
//#endregion
|
|
174
|
-
export { ComponentFn, ConnectorInterface,
|
|
859
|
+
export { Absolute, AbsolutePropertiesInterface, Box, BoxProps, BreakpointName, Center, CenterPropertiesInterface, ComponentFn, ConnectorInterface, Fixed, FixedPropertiesInterface, Flex, FlexItem, FlexItemPropertiesInterface, FlexPropertiesInterface, For, Grid, GridItem, GridItemPropertiesInterface, GridPropertiesInterface, JsxNode, LocaleController, MountCallback, PropsInterface, ReadFn, Relative, RelativePropertiesInterface, RenderCtx, RenderResult, Repeat, Scroll, ScrollPropertiesInterface, Show, Stack, StackPropertiesInterface, Sticky, StickyPropertiesInterface, Text, TextPropertiesInterface, UnmountCallback, VElement, VSignal, VText, beginMountSession, breakpoint, color, connector, effect, endMountSession, font, fragment, hasActiveMountSession, jsx, mount, radius, render, runUnmountsForElement, shadow, signal, size, space, style, unmount, useBreakpoint, useCustomEvent, useLocale, useRouter, weight, zIndex };
|
|
175
860
|
//# sourceMappingURL=index.d.mts.map
|