@ryupold/vode 1.7.1 → 1.7.3

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 CHANGED
@@ -18,7 +18,8 @@ The use cases can be single page applications or isolated components with comple
18
18
  <!DOCTYPE html>
19
19
  <html>
20
20
  <head>
21
- <title>ESM Example</title>
21
+ <meta charset="utf-8">
22
+ <title>Vode ESM Example</title>
22
23
  </head>
23
24
  <body>
24
25
  <div id="app"></div>
@@ -51,18 +52,15 @@ Binds the library to the global `V` variable.
51
52
  ```html
52
53
  <!DOCTYPE html>
53
54
  <html>
54
-
55
55
  <head>
56
56
  <meta charset="utf-8">
57
57
  <script src="https://unpkg.com/@ryupold/vode/dist/vode.es5.min.js"></script>
58
- <title>Classic Script Example</title>
58
+ <title>Vode ES5 (iife) Script Example</title>
59
59
  </head>
60
-
61
60
  <body>
62
61
  <div id="app"></div>
63
62
  <script>
64
63
  var appNode = document.getElementById('app');
65
- appNode.innerHTML = 'initializing...';
66
64
 
67
65
  var state = { counter: 0 };
68
66
 
@@ -76,7 +74,7 @@ Binds the library to the global `V` variable.
76
74
  }
77
75
  ],
78
76
  ["br"],
79
- ["span", { style: { color: 'red' } }, s.counter + ''],
77
+ ["span", { style: { color: 'red' } }, '' + s.counter]
80
78
  ]
81
79
  });
82
80
  </script>
@@ -93,7 +91,8 @@ index.html
93
91
  ```html
94
92
  <html>
95
93
  <head>
96
- <title>Vode Example</title>
94
+ <meta charset="utf-8">
95
+ <title>Vode NPM Example</title>
97
96
  <script type="module" src="main.js"></script>
98
97
  </head>
99
98
  <body>
@@ -362,7 +361,7 @@ Also a `patch` function is added to the state object; it is the same function th
362
361
  A re-render happens when a patch object is supplied to the `patch` function or via event.
363
362
  When an object is passed to `patch`, its properties are recursively deep merged onto the state object.
364
363
 
365
- ```js
364
+ ```javascript
366
365
  const s = {
367
366
  counter: 0,
368
367
  pointing: false,
@@ -596,7 +595,7 @@ app(element, state,
596
595
  );
597
596
 
598
597
  function SettingsForm(ctx: SubStateContext<Settings>) {
599
- const settings = ctx.get()!; // { theme: 'dark', lang: 'en' }
598
+ const settings = ctx.get()!; // { theme: 'dark', lang: 'es' }
600
599
 
601
600
  return <Vode>[FORM,
602
601
  [P, "current theme:", settings.theme],
@@ -649,6 +648,7 @@ export function IsolatedVodeApp<OuterState, InnerState>(
649
648
  );
650
649
  }
651
650
  ```
651
+
652
652
  The memo with empty dependency array prevents further render calls from the outer app
653
653
  so rendering of the subtree inside is controlled by the inner app.
654
654
  Take note of the fact that the top-level element of the inner app refers to the surrounding element and will change its state accordingly.
@@ -662,7 +662,7 @@ Patching an empty array `[]` will skip the current view transition and set the q
662
662
 
663
663
  Scheduling behaviour can in theory be overridden with `containerNode._vode.asyncRenderer`.
664
664
 
665
- ```js
665
+ ```javascript
666
666
  // or globally disable view transitions for the vode framework
667
667
  import { globals } from '@ryupold/vode';
668
668
  globals.startViewTransition = null;
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.1",
3
+ "version": "1.7.3",
4
4
  "description": "a minimalist web framework",
5
5
  "author": "Michael Scherbakow (ryupold)",
6
6
  "license": "MIT",
@@ -24,25 +24,38 @@
24
24
  "url": "https://github.com/ryupold/vode/issues"
25
25
  },
26
26
  "homepage": "https://github.com/ryupold/vode#readme",
27
- "module": "index.ts",
27
+ "type": "module",
28
+ "main": "./dist/vode.mjs",
29
+ "types": "./dist/vode.d.ts",
30
+ "exports": {
31
+ ".": {
32
+ "browser": "./dist/vode.min.js",
33
+ "types": "./dist/vode.d.ts",
34
+ "import": "./dist/vode.min.mjs",
35
+ "require": "./dist/vode.amd.min.js",
36
+ "default": "./dist/vode.min.mjs"
37
+ }
38
+ },
28
39
  "scripts": {
40
+ "types": "dts-bundle-generator -o ./dist/vode.d.ts ./index.ts --project tsconfig.json",
29
41
  "build": "esbuild index.ts --bundle --format=esm --outfile=dist/vode.mjs",
30
42
  "build-min": "esbuild index.ts --bundle --format=esm --minify --outfile=dist/vode.min.mjs",
31
43
  "build-classic": "esbuild index.ts --outfile=dist/vode.js --bundle --format=iife --global-name=V",
32
44
  "build-classic-min": "esbuild index.ts --outfile=dist/vode.min.js --bundle --format=iife --global-name=V --minify",
33
45
  "babel": "npx babel dist/vode.mjs --out-file dist/vode.amd.min.js",
34
46
  "babel-classic": "npx babel dist/vode.js --out-file dist/vode.es5.min.js",
35
- "release": "npm run build && npm run build-min && npm run build-classic && npm run build-classic-min && npm run babel && npm run babel-classic",
47
+ "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",
36
48
  "publish": "npm publish --access public",
37
- "clean": "tsc -b --clean",
49
+ "clean": "tsc -b --clean && rm dist/*",
38
50
  "watch": "tsc -b -w"
39
51
  },
40
52
  "devDependencies": {
41
- "@babel/cli": "7.28.3",
42
- "@babel/core": "7.28.5",
43
- "@babel/preset-env": "7.28.5",
53
+ "@babel/cli": "7.28.6",
54
+ "@babel/core": "7.29.0",
55
+ "@babel/preset-env": "7.29.0",
44
56
  "babel-preset-minify": "0.5.2",
45
- "esbuild": "0.27.1",
57
+ "dts-bundle-generator": "9.5.1",
58
+ "esbuild": "0.27.3",
46
59
  "typescript": "5.9.3"
47
60
  }
48
- }
61
+ }
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
- "inlineSourceMap": true,
10
+ "declarationDir": "./dist",
12
11
  "strict": true,
13
12
  "allowSyntheticDefaultImports": true,
14
13
  "strictBindCallApply": true,