@ryupold/vode 1.7.2 → 1.7.4
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/vode.d.ts +359 -0
- package/package.json +12 -6
- package/tsconfig.json +1 -2
package/dist/vode.d.ts
ADDED
|
@@ -0,0 +1,359 @@
|
|
|
1
|
+
// Generated by dts-bundle-generator v9.5.1
|
|
2
|
+
|
|
3
|
+
export type Vode<S = PatchableState> = FullVode<S> | JustTagVode | NoPropsVode<S>;
|
|
4
|
+
export type FullVode<S = PatchableState> = [
|
|
5
|
+
tag: Tag,
|
|
6
|
+
props: Props<S>,
|
|
7
|
+
...children: ChildVode<S>[]
|
|
8
|
+
];
|
|
9
|
+
export type NoPropsVode<S = PatchableState> = [
|
|
10
|
+
tag: Tag,
|
|
11
|
+
...children: ChildVode<S>[]
|
|
12
|
+
] | (TextVode[]);
|
|
13
|
+
export type JustTagVode = [
|
|
14
|
+
tag: Tag
|
|
15
|
+
];
|
|
16
|
+
export type ChildVode<S = PatchableState> = Vode<S> | TextVode | NoVode | Component<S>;
|
|
17
|
+
export type TextVode = string & {};
|
|
18
|
+
export type NoVode = undefined | null | number | boolean | bigint | void;
|
|
19
|
+
export type AttachedVode<S> = Vode<S> & {
|
|
20
|
+
node: ChildNode;
|
|
21
|
+
} | Text & {
|
|
22
|
+
node?: never;
|
|
23
|
+
};
|
|
24
|
+
export type Tag = keyof (HTMLElementTagNameMap & SVGElementTagNameMap & MathMLElementTagNameMap) | (string & {});
|
|
25
|
+
export type Component<S> = (s: S) => ChildVode<S>;
|
|
26
|
+
export type Patch<S> = IgnoredPatch | RenderPatch<S> | Promise<Patch<S>> | Effect<S>;
|
|
27
|
+
export type IgnoredPatch = undefined | null | number | boolean | bigint | string | symbol | void;
|
|
28
|
+
export type RenderPatch<S> = {} | DeepPartial<S>;
|
|
29
|
+
export type AnimatedPatch<S> = Array<Patch<S>>;
|
|
30
|
+
export type DeepPartial<S> = {
|
|
31
|
+
[P in keyof S]?: S[P] extends Array<infer I> ? Array<DeepPartial<I>> : DeepPartial<S[P]>;
|
|
32
|
+
};
|
|
33
|
+
export type Effect<S> = (() => Patch<S>) | EventFunction<S> | Generator<Patch<S>> | AsyncGenerator<Patch<S>>;
|
|
34
|
+
export type EventFunction<S> = (state: S, evt: Event) => Patch<S>;
|
|
35
|
+
export interface Props<S> extends Partial<Omit<HTMLElement, keyof (DocumentFragment & ElementCSSInlineStyle & GlobalEventHandlers)> & {
|
|
36
|
+
[K in keyof EventsMap]: EventFunction<S> | Patch<S>;
|
|
37
|
+
}> {
|
|
38
|
+
[_: string]: unknown;
|
|
39
|
+
xmlns?: string | null;
|
|
40
|
+
class?: ClassProp;
|
|
41
|
+
style?: StyleProp;
|
|
42
|
+
onMount?: MountFunction<S>;
|
|
43
|
+
onUnmount?: MountFunction<S>;
|
|
44
|
+
catch?: ((s: S, error: any) => ChildVode<S>) | ChildVode<S>;
|
|
45
|
+
}
|
|
46
|
+
export type MountFunction<S> = ((s: S, node: HTMLElement) => Patch<S>) | ((s: S, node: SVGSVGElement) => Patch<S>) | ((s: S, node: MathMLElement) => Patch<S>);
|
|
47
|
+
export type ClassProp = "" | false | null | undefined | string | string[] | Record<string, boolean | undefined | null>;
|
|
48
|
+
export type StyleProp = (Record<number, never> & {
|
|
49
|
+
[K in keyof CSSStyleDeclaration]?: CSSStyleDeclaration[K] | null;
|
|
50
|
+
}) | string | "" | null | undefined;
|
|
51
|
+
export type EventsMapBase = {
|
|
52
|
+
[K in keyof HTMLElementEventMap as `on${K}`]: HTMLElementEventMap[K];
|
|
53
|
+
} & {
|
|
54
|
+
[K in keyof WindowEventMap as `on${K}`]: WindowEventMap[K];
|
|
55
|
+
} & {
|
|
56
|
+
[K in keyof SVGElementEventMap as `on${K}`]: SVGElementEventMap[K];
|
|
57
|
+
};
|
|
58
|
+
export interface EventsMap extends EventsMapBase {
|
|
59
|
+
}
|
|
60
|
+
export type PropertyValue<S> = string | boolean | null | undefined | void | StyleProp | ClassProp | Patch<S>;
|
|
61
|
+
export type Dispatch<S> = (action: Patch<S>) => void;
|
|
62
|
+
export interface Patchable<S = object> {
|
|
63
|
+
patch: Dispatch<S>;
|
|
64
|
+
}
|
|
65
|
+
export type PatchableState<S = object> = S & Patchable<S>;
|
|
66
|
+
export declare const globals: {
|
|
67
|
+
currentViewTransition: ViewTransition | null | undefined;
|
|
68
|
+
requestAnimationFrame: (cb: () => void) => void;
|
|
69
|
+
startViewTransition: ((callbackOptions?: ViewTransitionUpdateCallback | StartViewTransitionOptions) => ViewTransition) | null;
|
|
70
|
+
};
|
|
71
|
+
export interface ContainerNode<S = PatchableState> extends HTMLElement {
|
|
72
|
+
_vode: {
|
|
73
|
+
state: PatchableState<S>;
|
|
74
|
+
vode: AttachedVode<S>;
|
|
75
|
+
renderSync: () => void;
|
|
76
|
+
renderAsync: () => Promise<unknown>;
|
|
77
|
+
syncRenderer: (cb: () => void) => void;
|
|
78
|
+
asyncRenderer: ((cb: () => void) => ViewTransition) | null | undefined;
|
|
79
|
+
qSync: {} | undefined | null;
|
|
80
|
+
qAsync: {} | undefined | null;
|
|
81
|
+
isRendering: boolean;
|
|
82
|
+
isAnimating: boolean;
|
|
83
|
+
stats: {
|
|
84
|
+
patchCount: number;
|
|
85
|
+
liveEffectCount: number;
|
|
86
|
+
syncRenderPatchCount: number;
|
|
87
|
+
asyncRenderPatchCount: number;
|
|
88
|
+
syncRenderCount: number;
|
|
89
|
+
asyncRenderCount: number;
|
|
90
|
+
lastSyncRenderTime: number;
|
|
91
|
+
lastAsyncRenderTime: number;
|
|
92
|
+
};
|
|
93
|
+
};
|
|
94
|
+
}
|
|
95
|
+
export declare function vode<S = PatchableState>(tag: Tag | Vode<S>, props?: Props<S> | ChildVode<S>, ...children: ChildVode<S>[]): Vode<S>;
|
|
96
|
+
export declare function app<S extends PatchableState = PatchableState>(container: Element, state: Omit<S, "patch">, dom: (s: S) => Vode<S>, ...initialPatches: Patch<S>[]): Dispatch<S>;
|
|
97
|
+
export declare function defuse(container: ContainerNode<any>): void;
|
|
98
|
+
export declare function hydrate<S = PatchableState>(element: Element | Text, prepareForRender?: boolean): Vode<S> | string | AttachedVode<S> | undefined;
|
|
99
|
+
export declare function memo<S = PatchableState>(compare: any[], componentOrProps: Component<S> | ((s: S) => Props<S>)): typeof componentOrProps extends ((s: S) => Props<S>) ? ((s: S) => Props<S>) : Component<S>;
|
|
100
|
+
export declare function createState<S = PatchableState>(state: S): PatchableState<S>;
|
|
101
|
+
export declare function createPatch<S = PatchableState>(p: DeepPartial<S> | Effect<S> | IgnoredPatch): typeof p;
|
|
102
|
+
export declare function tag<S = PatchableState>(v: Vode<S> | TextVode | NoVode | AttachedVode<S>): Tag | "#text" | undefined;
|
|
103
|
+
export declare function props<S = PatchableState>(vode: ChildVode<S> | AttachedVode<S>): Props<S> | undefined;
|
|
104
|
+
export declare function children<S = PatchableState>(vode: ChildVode<S> | AttachedVode<S>): ChildVode<S>[] | null;
|
|
105
|
+
export declare function childCount<S = PatchableState>(vode: Vode<S>): number;
|
|
106
|
+
export declare function child<S = PatchableState>(vode: Vode<S>, index: number): ChildVode<S> | undefined;
|
|
107
|
+
export declare function childrenStart<S = PatchableState>(vode: ChildVode<S> | AttachedVode<S>): 1 | 2 | -1;
|
|
108
|
+
export declare const A: Tag;
|
|
109
|
+
export declare const ABBR: Tag;
|
|
110
|
+
export declare const ADDRESS: Tag;
|
|
111
|
+
export declare const AREA: Tag;
|
|
112
|
+
export declare const ARTICLE: Tag;
|
|
113
|
+
export declare const ASIDE: Tag;
|
|
114
|
+
export declare const AUDIO: Tag;
|
|
115
|
+
export declare const B: Tag;
|
|
116
|
+
export declare const BASE: Tag;
|
|
117
|
+
export declare const BDI: Tag;
|
|
118
|
+
export declare const BDO: Tag;
|
|
119
|
+
export declare const BLOCKQUOTE: Tag;
|
|
120
|
+
export declare const BODY: Tag;
|
|
121
|
+
export declare const BR: Tag;
|
|
122
|
+
export declare const BUTTON: Tag;
|
|
123
|
+
export declare const CANVAS: Tag;
|
|
124
|
+
export declare const CAPTION: Tag;
|
|
125
|
+
export declare const CITE: Tag;
|
|
126
|
+
export declare const CODE: Tag;
|
|
127
|
+
export declare const COL: Tag;
|
|
128
|
+
export declare const COLGROUP: Tag;
|
|
129
|
+
export declare const DATA: Tag;
|
|
130
|
+
export declare const DATALIST: Tag;
|
|
131
|
+
export declare const DD: Tag;
|
|
132
|
+
export declare const DEL: Tag;
|
|
133
|
+
export declare const DETAILS: Tag;
|
|
134
|
+
export declare const DFN: Tag;
|
|
135
|
+
export declare const DIALOG: Tag;
|
|
136
|
+
export declare const DIV: Tag;
|
|
137
|
+
export declare const DL: Tag;
|
|
138
|
+
export declare const DT: Tag;
|
|
139
|
+
export declare const EM: Tag;
|
|
140
|
+
export declare const EMBED: Tag;
|
|
141
|
+
export declare const FIELDSET: Tag;
|
|
142
|
+
export declare const FIGCAPTION: Tag;
|
|
143
|
+
export declare const FIGURE: Tag;
|
|
144
|
+
export declare const FOOTER: Tag;
|
|
145
|
+
export declare const FORM: Tag;
|
|
146
|
+
export declare const H1: Tag;
|
|
147
|
+
export declare const H2: Tag;
|
|
148
|
+
export declare const H3: Tag;
|
|
149
|
+
export declare const H4: Tag;
|
|
150
|
+
export declare const H5: Tag;
|
|
151
|
+
export declare const H6: Tag;
|
|
152
|
+
export declare const HEAD: Tag;
|
|
153
|
+
export declare const HEADER: Tag;
|
|
154
|
+
export declare const HGROUP: Tag;
|
|
155
|
+
export declare const HR: Tag;
|
|
156
|
+
export declare const HTML: Tag;
|
|
157
|
+
export declare const I: Tag;
|
|
158
|
+
export declare const IFRAME: Tag;
|
|
159
|
+
export declare const IMG: Tag;
|
|
160
|
+
export declare const INPUT: Tag;
|
|
161
|
+
export declare const INS: Tag;
|
|
162
|
+
export declare const KBD: Tag;
|
|
163
|
+
export declare const LABEL: Tag;
|
|
164
|
+
export declare const LEGEND: Tag;
|
|
165
|
+
export declare const LI: Tag;
|
|
166
|
+
export declare const LINK: Tag;
|
|
167
|
+
export declare const MAIN: Tag;
|
|
168
|
+
export declare const MAP: Tag;
|
|
169
|
+
export declare const MARK: Tag;
|
|
170
|
+
export declare const MENU: Tag;
|
|
171
|
+
export declare const META: Tag;
|
|
172
|
+
export declare const METER: Tag;
|
|
173
|
+
export declare const NAV: Tag;
|
|
174
|
+
export declare const NOSCRIPT: Tag;
|
|
175
|
+
export declare const OBJECT: Tag;
|
|
176
|
+
export declare const OL: Tag;
|
|
177
|
+
export declare const OPTGROUP: Tag;
|
|
178
|
+
export declare const OPTION: Tag;
|
|
179
|
+
export declare const OUTPUT: Tag;
|
|
180
|
+
export declare const P: Tag;
|
|
181
|
+
export declare const PICTURE: Tag;
|
|
182
|
+
export declare const PRE: Tag;
|
|
183
|
+
export declare const PROGRESS: Tag;
|
|
184
|
+
export declare const Q: Tag;
|
|
185
|
+
export declare const RP: Tag;
|
|
186
|
+
export declare const RT: Tag;
|
|
187
|
+
export declare const RUBY: Tag;
|
|
188
|
+
export declare const S: Tag;
|
|
189
|
+
export declare const SAMP: Tag;
|
|
190
|
+
export declare const SCRIPT: Tag;
|
|
191
|
+
export declare const SEARCH: Tag;
|
|
192
|
+
export declare const SECTION: Tag;
|
|
193
|
+
export declare const SELECT: Tag;
|
|
194
|
+
export declare const SLOT: Tag;
|
|
195
|
+
export declare const SMALL: Tag;
|
|
196
|
+
export declare const SOURCE: Tag;
|
|
197
|
+
export declare const SPAN: Tag;
|
|
198
|
+
export declare const STRONG: Tag;
|
|
199
|
+
export declare const STYLE: Tag;
|
|
200
|
+
export declare const SUB: Tag;
|
|
201
|
+
export declare const SUMMARY: Tag;
|
|
202
|
+
export declare const SUP: Tag;
|
|
203
|
+
export declare const TABLE: Tag;
|
|
204
|
+
export declare const TBODY: Tag;
|
|
205
|
+
export declare const TD: Tag;
|
|
206
|
+
export declare const TEMPLATE: Tag;
|
|
207
|
+
export declare const TEXTAREA: Tag;
|
|
208
|
+
export declare const TFOOT: Tag;
|
|
209
|
+
export declare const TH: Tag;
|
|
210
|
+
export declare const THEAD: Tag;
|
|
211
|
+
export declare const TIME: Tag;
|
|
212
|
+
export declare const TITLE: Tag;
|
|
213
|
+
export declare const TR: Tag;
|
|
214
|
+
export declare const TRACK: Tag;
|
|
215
|
+
export declare const U: Tag;
|
|
216
|
+
export declare const UL: Tag;
|
|
217
|
+
export declare const VAR: Tag;
|
|
218
|
+
export declare const VIDEO: Tag;
|
|
219
|
+
export declare const WBR: Tag;
|
|
220
|
+
export declare const ANIMATE: Tag;
|
|
221
|
+
export declare const ANIMATEMOTION: Tag;
|
|
222
|
+
export declare const ANIMATETRANSFORM: Tag;
|
|
223
|
+
export declare const CIRCLE: Tag;
|
|
224
|
+
export declare const CLIPPATH: Tag;
|
|
225
|
+
export declare const DEFS: Tag;
|
|
226
|
+
export declare const DESC: Tag;
|
|
227
|
+
export declare const ELLIPSE: Tag;
|
|
228
|
+
export declare const FEBLEND: Tag;
|
|
229
|
+
export declare const FECOLORMATRIX: Tag;
|
|
230
|
+
export declare const FECOMPONENTTRANSFER: Tag;
|
|
231
|
+
export declare const FECOMPOSITE: Tag;
|
|
232
|
+
export declare const FECONVOLVEMATRIX: Tag;
|
|
233
|
+
export declare const FEDIFFUSELIGHTING: Tag;
|
|
234
|
+
export declare const FEDISPLACEMENTMAP: Tag;
|
|
235
|
+
export declare const FEDISTANTLIGHT: Tag;
|
|
236
|
+
export declare const FEDROPSHADOW: Tag;
|
|
237
|
+
export declare const FEFLOOD: Tag;
|
|
238
|
+
export declare const FEFUNCA: Tag;
|
|
239
|
+
export declare const FEFUNCB: Tag;
|
|
240
|
+
export declare const FEFUNCG: Tag;
|
|
241
|
+
export declare const FEFUNCR: Tag;
|
|
242
|
+
export declare const FEGAUSSIANBLUR: Tag;
|
|
243
|
+
export declare const FEIMAGE: Tag;
|
|
244
|
+
export declare const FEMERGE: Tag;
|
|
245
|
+
export declare const FEMERGENODE: Tag;
|
|
246
|
+
export declare const FEMORPHOLOGY: Tag;
|
|
247
|
+
export declare const FEOFFSET: Tag;
|
|
248
|
+
export declare const FEPOINTLIGHT: Tag;
|
|
249
|
+
export declare const FESPECULARLIGHTING: Tag;
|
|
250
|
+
export declare const FESPOTLIGHT: Tag;
|
|
251
|
+
export declare const FETILE: Tag;
|
|
252
|
+
export declare const FETURBULENCE: Tag;
|
|
253
|
+
export declare const FILTER: Tag;
|
|
254
|
+
export declare const FOREIGNOBJECT: Tag;
|
|
255
|
+
export declare const G: Tag;
|
|
256
|
+
export declare const IMAGE: Tag;
|
|
257
|
+
export declare const LINE: Tag;
|
|
258
|
+
export declare const LINEARGRADIENT: Tag;
|
|
259
|
+
export declare const MARKER: Tag;
|
|
260
|
+
export declare const MASK: Tag;
|
|
261
|
+
export declare const METADATA: Tag;
|
|
262
|
+
export declare const MPATH: Tag;
|
|
263
|
+
export declare const PATH: Tag;
|
|
264
|
+
export declare const PATTERN: Tag;
|
|
265
|
+
export declare const POLYGON: Tag;
|
|
266
|
+
export declare const POLYLINE: Tag;
|
|
267
|
+
export declare const RADIALGRADIENT: Tag;
|
|
268
|
+
export declare const RECT: Tag;
|
|
269
|
+
export declare const SET: Tag;
|
|
270
|
+
export declare const STOP: Tag;
|
|
271
|
+
export declare const SVG: Tag;
|
|
272
|
+
export declare const SWITCH: Tag;
|
|
273
|
+
export declare const SYMBOL: Tag;
|
|
274
|
+
export declare const TEXT: Tag;
|
|
275
|
+
export declare const TEXTPATH: Tag;
|
|
276
|
+
export declare const TSPAN: Tag;
|
|
277
|
+
export declare const USE: Tag;
|
|
278
|
+
export declare const VIEW: Tag;
|
|
279
|
+
export declare const ANNOTATION: Tag;
|
|
280
|
+
export declare const ANNOTATION_XML: Tag;
|
|
281
|
+
export declare const MACTION: Tag;
|
|
282
|
+
export declare const MATH: Tag;
|
|
283
|
+
export declare const MERROR: Tag;
|
|
284
|
+
export declare const MFRAC: Tag;
|
|
285
|
+
export declare const MI: Tag;
|
|
286
|
+
export declare const MMULTISCRIPTS: Tag;
|
|
287
|
+
export declare const MN: Tag;
|
|
288
|
+
export declare const MO: Tag;
|
|
289
|
+
export declare const MOVER: Tag;
|
|
290
|
+
export declare const MPADDED: Tag;
|
|
291
|
+
export declare const MPHANTOM: Tag;
|
|
292
|
+
export declare const MPRESCRIPTS: Tag;
|
|
293
|
+
export declare const MROOT: Tag;
|
|
294
|
+
export declare const MROW: Tag;
|
|
295
|
+
export declare const MS: Tag;
|
|
296
|
+
export declare const MSPACE: Tag;
|
|
297
|
+
export declare const MSQRT: Tag;
|
|
298
|
+
export declare const MSTYLE: Tag;
|
|
299
|
+
export declare const MSUB: Tag;
|
|
300
|
+
export declare const MSUBSUP: Tag;
|
|
301
|
+
export declare const MSUP: Tag;
|
|
302
|
+
export declare const MTABLE: Tag;
|
|
303
|
+
export declare const MTD: Tag;
|
|
304
|
+
export declare const MTEXT: Tag;
|
|
305
|
+
export declare const MTR: Tag;
|
|
306
|
+
export declare const MUNDER: Tag;
|
|
307
|
+
export declare const MUNDEROVER: Tag;
|
|
308
|
+
export declare const SEMANTICS: Tag;
|
|
309
|
+
export declare function mergeClass(...classes: ClassProp[]): ClassProp;
|
|
310
|
+
export declare function mergeStyle(...props: StyleProp[]): StyleProp;
|
|
311
|
+
export interface StateContext<S extends PatchableState, SubState> extends SubStateContext<SubState> {
|
|
312
|
+
get state(): S;
|
|
313
|
+
}
|
|
314
|
+
export interface SubStateContext<SubState> {
|
|
315
|
+
get(): SubState | undefined;
|
|
316
|
+
put(value: SubState | DeepPartial<SubState> | undefined | null): void;
|
|
317
|
+
patch(value: SubState | DeepPartial<SubState> | Array<DeepPartial<SubState>> | undefined | null): void;
|
|
318
|
+
}
|
|
319
|
+
export type ProxyStateContext<S extends PatchableState, SubState> = StateContext<S, SubState> & {
|
|
320
|
+
[K in keyof SubState]-?: SubState[K] extends object ? ProxyStateContext<S, SubState[K]> : StateContext<S, SubState[K]>;
|
|
321
|
+
};
|
|
322
|
+
export type ProxySubContext<SubState> = SubStateContext<SubState> & {
|
|
323
|
+
[K in keyof SubState]-?: SubState[K] extends object ? ProxySubContext<SubState[K]> : SubStateContext<SubState[K]>;
|
|
324
|
+
};
|
|
325
|
+
export declare function context<S extends PatchableState>(state: S): ProxyStateContext<S, S>;
|
|
326
|
+
export declare class DelegateStateContext<S extends PatchableState, SubState> implements StateContext<S, SubState> {
|
|
327
|
+
readonly state: S;
|
|
328
|
+
readonly get: () => SubState | undefined;
|
|
329
|
+
readonly put: (value: SubState | DeepPartial<SubState> | undefined | null) => void;
|
|
330
|
+
readonly patch: (value: SubState | DeepPartial<SubState> | Array<DeepPartial<SubState>> | undefined | null) => void;
|
|
331
|
+
constructor(state: S, get: () => SubState | undefined, put: (value: SubState | DeepPartial<SubState> | undefined | null) => void, patch: (value: SubState | DeepPartial<SubState> | Array<DeepPartial<SubState>> | undefined | null) => void);
|
|
332
|
+
}
|
|
333
|
+
export type KeyPath<ObjectType extends object> = {
|
|
334
|
+
[Key in keyof ObjectType & (string | number)]: NonNullable$1<ObjectType[Key]> extends object ? `${Key}` | `${Key}.${KeyPath<NonNullable$1<ObjectType[Key]>>}` : `${Key}`;
|
|
335
|
+
}[keyof ObjectType & (string | number)];
|
|
336
|
+
export type PathValue<T, P extends string> = P extends `${infer Key}.${infer Rest}` ? Key extends keyof T ? PathValue<NonNullable$1<T[Key]>, Rest> : never : P extends keyof T ? T[P] : never;
|
|
337
|
+
export type KeyToSubState<S extends object, Sub, K = KeyPath<S>> = K extends KeyPath<S> ? [
|
|
338
|
+
NonNullable$1<PathValue<S, K>>
|
|
339
|
+
] extends [
|
|
340
|
+
Sub
|
|
341
|
+
] ? [
|
|
342
|
+
Sub
|
|
343
|
+
] extends [
|
|
344
|
+
NonNullable$1<PathValue<S, K>>
|
|
345
|
+
] ? K : never : never : never;
|
|
346
|
+
export declare class KeyStateContext<S extends PatchableState, SubState> implements StateContext<S, SubState> {
|
|
347
|
+
readonly state: S;
|
|
348
|
+
readonly path: KeyToSubState<S, SubState>;
|
|
349
|
+
private readonly keys;
|
|
350
|
+
constructor(state: S, path: KeyToSubState<S, SubState>);
|
|
351
|
+
get(): SubState | undefined;
|
|
352
|
+
put(value: SubState | DeepPartial<SubState> | undefined | null): void;
|
|
353
|
+
patch(value: SubState | DeepPartial<SubState> | Array<DeepPartial<SubState>> | undefined | null): void;
|
|
354
|
+
createPatch(value: SubState | DeepPartial<SubState> | undefined | null): RenderPatch<S>;
|
|
355
|
+
private putDeep;
|
|
356
|
+
}
|
|
357
|
+
type NonNullable$1<T> = T extends null | undefined ? never : T;
|
|
358
|
+
|
|
359
|
+
export {};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ryupold/vode",
|
|
3
|
-
"version": "1.7.
|
|
3
|
+
"version": "1.7.4",
|
|
4
4
|
"description": "a minimalist web framework",
|
|
5
5
|
"author": "Michael Scherbakow (ryupold)",
|
|
6
6
|
"license": "MIT",
|
|
@@ -26,19 +26,24 @@
|
|
|
26
26
|
"homepage": "https://github.com/ryupold/vode#readme",
|
|
27
27
|
"type": "module",
|
|
28
28
|
"main": "./dist/vode.mjs",
|
|
29
|
+
"types": "./dist/vode.d.ts",
|
|
29
30
|
"exports": {
|
|
30
|
-
"
|
|
31
|
-
|
|
32
|
-
|
|
31
|
+
".": {
|
|
32
|
+
"types": "./dist/vode.d.ts",
|
|
33
|
+
"import": "./dist/vode.min.mjs",
|
|
34
|
+
"require": "./dist/vode.amd.min.js",
|
|
35
|
+
"default": "./dist/vode.min.js"
|
|
36
|
+
}
|
|
33
37
|
},
|
|
34
38
|
"scripts": {
|
|
39
|
+
"types": "dts-bundle-generator -o ./dist/vode.d.ts ./index.ts --project tsconfig.json",
|
|
35
40
|
"build": "esbuild index.ts --bundle --format=esm --outfile=dist/vode.mjs",
|
|
36
41
|
"build-min": "esbuild index.ts --bundle --format=esm --minify --outfile=dist/vode.min.mjs",
|
|
37
42
|
"build-classic": "esbuild index.ts --outfile=dist/vode.js --bundle --format=iife --global-name=V",
|
|
38
43
|
"build-classic-min": "esbuild index.ts --outfile=dist/vode.min.js --bundle --format=iife --global-name=V --minify",
|
|
39
44
|
"babel": "npx babel dist/vode.mjs --out-file dist/vode.amd.min.js",
|
|
40
45
|
"babel-classic": "npx babel dist/vode.js --out-file dist/vode.es5.min.js",
|
|
41
|
-
"release": "npm run build && npm run build-min && npm run build-classic && npm run build-classic-min && npm run babel && npm run babel-classic",
|
|
46
|
+
"release": "npm run build && npm run build-min && npm run build-classic && npm run build-classic-min && npm run babel && npm run babel-classic && npm run types",
|
|
42
47
|
"publish": "npm publish --access public",
|
|
43
48
|
"clean": "tsc -b --clean && rm dist/*",
|
|
44
49
|
"watch": "tsc -b -w"
|
|
@@ -48,7 +53,8 @@
|
|
|
48
53
|
"@babel/core": "7.29.0",
|
|
49
54
|
"@babel/preset-env": "7.29.0",
|
|
50
55
|
"babel-preset-minify": "0.5.2",
|
|
56
|
+
"dts-bundle-generator": "9.5.1",
|
|
51
57
|
"esbuild": "0.27.3",
|
|
52
58
|
"typescript": "5.9.3"
|
|
53
59
|
}
|
|
54
|
-
}
|
|
60
|
+
}
|
package/tsconfig.json
CHANGED
|
@@ -5,10 +5,9 @@
|
|
|
5
5
|
"moduleResolution": "bundler",
|
|
6
6
|
"rootDir": ".",
|
|
7
7
|
"composite": true,
|
|
8
|
-
"declarationMap": true,
|
|
9
8
|
"removeComments": true,
|
|
10
9
|
"declaration": true,
|
|
11
|
-
"
|
|
10
|
+
"declarationDir": "./dist",
|
|
12
11
|
"strict": true,
|
|
13
12
|
"allowSyntheticDefaultImports": true,
|
|
14
13
|
"strictBindCallApply": true,
|