elit 3.5.6 → 3.5.7

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.
Files changed (113) hide show
  1. package/Cargo.toml +1 -1
  2. package/README.md +1 -1
  3. package/desktop/build.rs +83 -0
  4. package/desktop/icon.rs +106 -0
  5. package/desktop/lib.rs +2 -0
  6. package/desktop/main.rs +235 -0
  7. package/desktop/native_main.rs +128 -0
  8. package/desktop/native_renderer/action_widgets.rs +184 -0
  9. package/desktop/native_renderer/app_models.rs +171 -0
  10. package/desktop/native_renderer/app_runtime.rs +140 -0
  11. package/desktop/native_renderer/container_rendering.rs +610 -0
  12. package/desktop/native_renderer/content_widgets.rs +634 -0
  13. package/desktop/native_renderer/css_models.rs +371 -0
  14. package/desktop/native_renderer/embedded_surfaces.rs +414 -0
  15. package/desktop/native_renderer/form_controls.rs +516 -0
  16. package/desktop/native_renderer/interaction_dispatch.rs +89 -0
  17. package/desktop/native_renderer/runtime_support.rs +135 -0
  18. package/desktop/native_renderer/utilities.rs +495 -0
  19. package/desktop/native_renderer/vector_drawing.rs +491 -0
  20. package/desktop/native_renderer.rs +4122 -0
  21. package/desktop/runtime/external.rs +422 -0
  22. package/desktop/runtime/mod.rs +67 -0
  23. package/desktop/runtime/quickjs.rs +106 -0
  24. package/desktop/window.rs +383 -0
  25. package/package.json +6 -3
  26. package/dist/build.d.mts +0 -20
  27. package/dist/chokidar.d.mts +0 -134
  28. package/dist/cli.d.mts +0 -81
  29. package/dist/config.d.mts +0 -254
  30. package/dist/coverage.d.mts +0 -85
  31. package/dist/database.d.mts +0 -52
  32. package/dist/desktop.d.mts +0 -68
  33. package/dist/dom.d.mts +0 -87
  34. package/dist/el.d.mts +0 -208
  35. package/dist/fs.d.mts +0 -255
  36. package/dist/hmr.d.mts +0 -38
  37. package/dist/http.d.mts +0 -169
  38. package/dist/https.d.mts +0 -108
  39. package/dist/index.d.mts +0 -13
  40. package/dist/mime-types.d.mts +0 -48
  41. package/dist/native.d.mts +0 -136
  42. package/dist/path.d.mts +0 -163
  43. package/dist/router.d.mts +0 -49
  44. package/dist/runtime.d.mts +0 -97
  45. package/dist/server-D0Dp4R5z.d.mts +0 -449
  46. package/dist/server.d.mts +0 -7
  47. package/dist/state.d.mts +0 -117
  48. package/dist/style.d.mts +0 -232
  49. package/dist/test-reporter.d.mts +0 -77
  50. package/dist/test-runtime.d.mts +0 -122
  51. package/dist/test.d.mts +0 -39
  52. package/dist/types.d.mts +0 -586
  53. package/dist/universal.d.mts +0 -21
  54. package/dist/ws.d.mts +0 -200
  55. package/dist/wss.d.mts +0 -108
  56. package/src/build.ts +0 -362
  57. package/src/chokidar.ts +0 -427
  58. package/src/cli.ts +0 -1162
  59. package/src/config.ts +0 -509
  60. package/src/coverage.ts +0 -1479
  61. package/src/database.ts +0 -1410
  62. package/src/desktop-auto-render.ts +0 -317
  63. package/src/desktop-cli.ts +0 -1533
  64. package/src/desktop.ts +0 -99
  65. package/src/dev-build.ts +0 -340
  66. package/src/dom.ts +0 -901
  67. package/src/el.ts +0 -183
  68. package/src/fs.ts +0 -609
  69. package/src/hmr.ts +0 -149
  70. package/src/http.ts +0 -856
  71. package/src/https.ts +0 -411
  72. package/src/index.ts +0 -16
  73. package/src/mime-types.ts +0 -222
  74. package/src/mobile-cli.ts +0 -2313
  75. package/src/native-background.ts +0 -444
  76. package/src/native-border.ts +0 -343
  77. package/src/native-canvas.ts +0 -260
  78. package/src/native-cli.ts +0 -414
  79. package/src/native-color.ts +0 -904
  80. package/src/native-estimation.ts +0 -194
  81. package/src/native-grid.ts +0 -590
  82. package/src/native-interaction.ts +0 -1289
  83. package/src/native-layout.ts +0 -568
  84. package/src/native-link.ts +0 -76
  85. package/src/native-render-support.ts +0 -361
  86. package/src/native-spacing.ts +0 -231
  87. package/src/native-state.ts +0 -318
  88. package/src/native-strings.ts +0 -46
  89. package/src/native-transform.ts +0 -120
  90. package/src/native-types.ts +0 -439
  91. package/src/native-typography.ts +0 -254
  92. package/src/native-units.ts +0 -441
  93. package/src/native-vector.ts +0 -910
  94. package/src/native.ts +0 -5606
  95. package/src/path.ts +0 -493
  96. package/src/pm-cli.ts +0 -2498
  97. package/src/preview-build.ts +0 -294
  98. package/src/render-context.ts +0 -138
  99. package/src/router.ts +0 -260
  100. package/src/runtime.ts +0 -97
  101. package/src/server.ts +0 -2294
  102. package/src/state.ts +0 -556
  103. package/src/style.ts +0 -1790
  104. package/src/test-globals.d.ts +0 -184
  105. package/src/test-reporter.ts +0 -609
  106. package/src/test-runtime.ts +0 -1359
  107. package/src/test.ts +0 -368
  108. package/src/types.ts +0 -381
  109. package/src/universal.ts +0 -81
  110. package/src/wapk-cli.ts +0 -3213
  111. package/src/workspace-package.ts +0 -102
  112. package/src/ws.ts +0 -648
  113. package/src/wss.ts +0 -241
package/dist/https.d.mts DELETED
@@ -1,108 +0,0 @@
1
- import { EventEmitter } from 'events';
2
- import { RequestOptions, IncomingMessage, ServerResponse, RequestListener } from './http.mjs';
3
- import 'node:events';
4
-
5
- /**
6
- * HTTPS module with unified API across runtimes
7
- * Optimized for maximum performance across Node.js, Bun, and Deno
8
- */
9
-
10
- /**
11
- * HTTPS Server options
12
- */
13
- interface ServerOptions {
14
- IncomingMessage?: typeof IncomingMessage;
15
- ServerResponse?: typeof ServerResponse;
16
- key?: string | Buffer | Array<string | Buffer>;
17
- cert?: string | Buffer | Array<string | Buffer>;
18
- ca?: string | Buffer | Array<string | Buffer>;
19
- passphrase?: string;
20
- pfx?: string | Buffer | Array<string | Buffer>;
21
- dhparam?: string | Buffer;
22
- ecdhCurve?: string;
23
- honorCipherOrder?: boolean;
24
- requestCert?: boolean;
25
- rejectUnauthorized?: boolean;
26
- NPNProtocols?: string[] | Buffer[] | Uint8Array[] | Buffer | Uint8Array;
27
- ALPNProtocols?: string[] | Buffer[] | Uint8Array[] | Buffer | Uint8Array;
28
- SNICallback?: (servername: string, cb: (err: Error | null, ctx?: any) => void) => void;
29
- sessionTimeout?: number;
30
- ticketKeys?: Buffer;
31
- tls?: {
32
- key?: string | Buffer;
33
- cert?: string | Buffer;
34
- ca?: string | Buffer;
35
- passphrase?: string;
36
- dhParamsFile?: string;
37
- };
38
- }
39
- /**
40
- * HTTPS Server - Optimized for each runtime
41
- */
42
- declare class Server extends EventEmitter {
43
- private nativeServer?;
44
- private requestListener?;
45
- _listening: boolean;
46
- private options;
47
- constructor(options: ServerOptions, requestListener?: RequestListener);
48
- listen(port?: number, hostname?: string, backlog?: number, listeningListener?: () => void): this;
49
- listen(port?: number, hostname?: string, listeningListener?: () => void): this;
50
- listen(port?: number, listeningListener?: () => void): this;
51
- listen(options?: {
52
- port?: number;
53
- hostname?: string;
54
- backlog?: number;
55
- }, listeningListener?: () => void): this;
56
- close(callback?: (err?: Error) => void): this;
57
- address(): {
58
- port: number;
59
- family: string;
60
- address: string;
61
- } | null;
62
- get listening(): boolean;
63
- }
64
- /**
65
- * Client request
66
- */
67
- declare class ClientRequest extends EventEmitter {
68
- constructor(_url: string | URL, _options?: RequestOptions);
69
- write(_chunk: any): boolean;
70
- end(callback?: () => void): void;
71
- }
72
- /**
73
- * HTTPS Agent
74
- */
75
- declare class Agent {
76
- options?: any | undefined;
77
- constructor(options?: any | undefined);
78
- }
79
- /**
80
- * Create HTTPS server
81
- */
82
- declare function createServer(options: ServerOptions, requestListener?: RequestListener): Server;
83
- /**
84
- * Make HTTPS request - optimized per runtime
85
- */
86
- declare function request(url: string | URL, options?: RequestOptions, callback?: (res: IncomingMessage) => void): ClientRequest;
87
- /**
88
- * Make HTTPS GET request
89
- */
90
- declare function get(url: string | URL, options?: RequestOptions, callback?: (res: IncomingMessage) => void): ClientRequest;
91
- /**
92
- * Get current runtime
93
- */
94
- declare function getRuntime(): 'node' | 'bun' | 'deno';
95
- /**
96
- * Default export
97
- */
98
- declare const _default: {
99
- createServer: typeof createServer;
100
- request: typeof request;
101
- get: typeof get;
102
- Server: typeof Server;
103
- Agent: typeof Agent;
104
- ClientRequest: typeof ClientRequest;
105
- getRuntime: typeof getRuntime;
106
- };
107
-
108
- export { Agent, ClientRequest, Server, type ServerOptions, createServer, _default as default, get, getRuntime, request };
package/dist/index.d.mts DELETED
@@ -1,13 +0,0 @@
1
- export { BuildOptions, BuildResult, Child, Children, ClientConfig, DevServer, DevServerOptions, ElementFactory, HMRMessage, JsonNode, PreviewOptions, Props, ProxyConfig, RefCallback, RefObject, State, StateManager, StateOptions, TestCoverageOptions, TestCoverageProvider, TestCoverageReporter, TestEnvironment, TestOptions, VNode, VNodeJson, VirtualListController, WebSocketConnection, WebSocketEndpointConfig, WebSocketEndpointContext, WebSocketEndpointHandler, WebSocketRequest, WorkerConfig } from './types.mjs';
2
- export { DomNode, dom, mount, render, renderToString } from './dom.mjs';
3
- export { ELIT_NATIVE_BINDING, NativeBindingKind, NativeBindingMetadata, SharedState, batchRender, bindChecked, bindValue, cleanupUnused, computed, createSharedState, createState, createVirtualList, debounce, effect, lazy, reactive, reactiveAs, renderChunked, sharedStateManager, text, throttle } from './state.mjs';
4
- export { CSSRule, CSSVariable, ContainerRule, CreateStyle, FontFace, KeyframeStep, Keyframes, LayerRule, MediaRule, NativeStyleResolveOptions, StyleSelectorTarget, SupportsRule, addAttribute, addClass, addContainer, addId, addName, addPseudoClass, addPseudoElement, addStyle, addTag, addVar, adjacentSibling, attrContains, attrContainsWord, attrEndsWith, attrEquals, attrStartsWith, childStyle, clearStyle, container, descendant, fontFace, generalSibling, getStyleVariables, getVar, importStyle, important, injectStyle, keyframe, keyframeFromTo, layer, layerOrder, mediaDark, mediaLight, mediaMaxWidth, mediaMinWidth, mediaPrint, mediaReducedMotion, mediaScreen, mediaStyle, multipleStyle, nesting, renderStyle, resolveClassStyles, default as styles, supportsStyle } from './style.mjs';
5
- export { a, abbr, address, area, article, aside, audio, b, base, bdi, bdo, blockquote, body, br, button, canvas, caption, cite, code, col, colgroup, commentNode, createEl, createElementFactory, createMathEl, createSvgEl, data, datalist, dd, del, details, dfn, dialog, div, dl, doc, dt, el, elements, em, embed, fieldset, figcaption, figure, footer, form, frag, fragment, getEl, getElClass, getElId, getElName, getElTag, getEls, h1, h2, h3, h4, h5, h6, head, header, hr, html, i, iframe, img, input, ins, kbd, label, legend, li, link, main, map, mark, mathMath, mathMfrac, mathMi, mathMn, mathMo, mathMroot, mathMrow, mathMs, mathMsqrt, mathMsub, mathMsup, mathMtext, menu, meta, meter, nav, noscript, object, ol, optgroup, option, output, p, param, picture, portal, pre, progress, q, rp, rt, ruby, s, samp, script, section, select, slot, small, source, span, strong, style, sub, summary, sup, svgAnimate, svgAnimateMotion, svgAnimateTransform, svgCircle, svgClipPath, svgDefs, svgEllipse, svgFeBlend, svgFeColorMatrix, svgFeComponentTransfer, svgFeComposite, svgFeConvolveMatrix, svgFeDiffuseLighting, svgFeDisplacementMap, svgFeFlood, svgFeGaussianBlur, svgFeMorphology, svgFeOffset, svgFeSpecularLighting, svgFeTile, svgFeTurbulence, svgFilter, svgForeignObject, svgG, svgImage, svgLine, svgLinearGradient, svgMarker, svgMask, svgPath, svgPattern, svgPolygon, svgPolyline, svgRadialGradient, svgRect, svgSet, svgStop, svgSvg, svgSymbol, svgText, svgTspan, svgUse, table, tbody, td, template, textNode, textarea, tfoot, th, thead, time, title, tr, track, u, ul, varElement, video, wbr } from './el.mjs';
6
- export { AndroidComposeOptions, NativeCanvasDrawOperation, NativeCanvasPoint, NativeElementNode, NativeNode, NativePlatform, NativePropObject, NativePropScalar, NativePropValue, NativeTextNode, NativeTransformOptions, NativeTree, SwiftUIOptions, materializeNativeTree, renderAndroidCompose, renderMaterializedNativeJson, renderMaterializedNativeTree, renderNativeJson, renderNativeTree, renderSwiftUI } from './native.mjs';
7
- export { UniversalBridgeOptions, UniversalPayload, createUniversalBridgeProps, createUniversalLinkProps, isExternalUniversalDestination, mergeUniversalProps } from './universal.mjs';
8
- export { Route, RouteLocation, RouteParams, Router, RouterOptions, createRouter, createRouterView, routerLink } from './router.mjs';
9
- export { HMRClient, default as hmr } from './hmr.mjs';
10
- import 'node:events';
11
- import 'events';
12
- import 'http';
13
- import 'ws';
@@ -1,48 +0,0 @@
1
- /**
2
- * MIME Types module with unified API across runtimes
3
- * Pure implementation without external dependencies
4
- * Compatible with 'mime-types' package API
5
- * Works on Node.js, Bun, and Deno
6
- */
7
- /**
8
- * Lookup MIME type from file path or extension
9
- */
10
- declare function lookup(path: string): string | false;
11
- /**
12
- * Get the default extension for a MIME type
13
- */
14
- declare function extension(type: string): string | false;
15
- /**
16
- * Get all extensions for a MIME type
17
- */
18
- declare function extensions(type: string): string[] | undefined;
19
- /**
20
- * Get the default charset for a MIME type
21
- */
22
- declare function charset(type: string): string | false;
23
- /**
24
- * Create a full Content-Type header value
25
- */
26
- declare function contentType(typeOrExt: string): string | false;
27
- /**
28
- * Get all MIME types
29
- */
30
- declare const types: Record<string, string>;
31
- /**
32
- * Get current runtime
33
- */
34
- declare function getRuntime(): 'node' | 'bun' | 'deno';
35
- /**
36
- * Default export
37
- */
38
- declare const _default: {
39
- lookup: typeof lookup;
40
- extension: typeof extension;
41
- extensions: typeof extensions;
42
- charset: typeof charset;
43
- contentType: typeof contentType;
44
- types: Record<string, string>;
45
- getRuntime: typeof getRuntime;
46
- };
47
-
48
- export { charset, contentType, _default as default, extension, extensions, getRuntime, lookup, types };
package/dist/native.d.mts DELETED
@@ -1,136 +0,0 @@
1
- import { NativeStyleResolveOptions } from './style.mjs';
2
- import { Child } from './types.mjs';
3
- import 'node:events';
4
- import 'events';
5
- import 'http';
6
- import 'ws';
7
-
8
- type NativePlatform = 'generic' | 'android' | 'ios';
9
- type NativePropScalar = string | number | boolean | null;
10
- interface NativePropObject {
11
- [key: string]: NativePropValue;
12
- }
13
- type NativePropValue = NativePropScalar | NativePropObject | NativePropValue[];
14
- interface NativeTextNode {
15
- kind: 'text';
16
- value: string;
17
- stateId?: string;
18
- }
19
- interface NativeElementNode {
20
- kind: 'element';
21
- component: string;
22
- sourceTag: string;
23
- props: Record<string, NativePropValue>;
24
- events: string[];
25
- children: NativeNode[];
26
- }
27
- type NativeNode = NativeTextNode | NativeElementNode;
28
- interface NativeTree {
29
- platform: NativePlatform;
30
- roots: NativeNode[];
31
- stateDescriptors?: NativeStateDescriptor[];
32
- }
33
- interface NativeTransformOptions {
34
- platform?: NativePlatform;
35
- tagMap?: Record<string, string>;
36
- wrapTextNodes?: boolean;
37
- preserveUnknownTags?: boolean;
38
- }
39
- interface AndroidComposeOptions {
40
- packageName?: string;
41
- functionName?: string;
42
- includePackage?: boolean;
43
- includeImports?: boolean;
44
- includePreview?: boolean;
45
- }
46
- interface SwiftUIOptions {
47
- structName?: string;
48
- includeImports?: boolean;
49
- includePreview?: boolean;
50
- }
51
- type NativeStateValueType = 'string' | 'number' | 'boolean' | 'string-array';
52
- interface NativeStateDescriptor {
53
- id: string;
54
- type: NativeStateValueType;
55
- initialValue: string | number | boolean | string[];
56
- }
57
- interface NativeCanvasPoint {
58
- x: number;
59
- y: number;
60
- }
61
- type NativeCanvasDrawOperation = {
62
- kind: 'rect';
63
- x?: number;
64
- y?: number;
65
- width: number;
66
- height: number;
67
- rx?: number;
68
- ry?: number;
69
- fill?: string;
70
- fillStyle?: string;
71
- stroke?: string;
72
- strokeStyle?: string;
73
- strokeWidth?: number;
74
- lineWidth?: number;
75
- } | {
76
- kind: 'circle';
77
- cx: number;
78
- cy: number;
79
- r: number;
80
- fill?: string;
81
- fillStyle?: string;
82
- stroke?: string;
83
- strokeStyle?: string;
84
- strokeWidth?: number;
85
- lineWidth?: number;
86
- } | {
87
- kind: 'ellipse';
88
- cx: number;
89
- cy: number;
90
- rx: number;
91
- ry: number;
92
- fill?: string;
93
- fillStyle?: string;
94
- stroke?: string;
95
- strokeStyle?: string;
96
- strokeWidth?: number;
97
- lineWidth?: number;
98
- } | {
99
- kind: 'line';
100
- x1: number;
101
- y1: number;
102
- x2: number;
103
- y2: number;
104
- stroke?: string;
105
- strokeStyle?: string;
106
- strokeWidth?: number;
107
- lineWidth?: number;
108
- } | {
109
- kind: 'polyline' | 'polygon';
110
- points: string | NativeCanvasPoint[];
111
- fill?: string;
112
- fillStyle?: string;
113
- stroke?: string;
114
- strokeStyle?: string;
115
- strokeWidth?: number;
116
- lineWidth?: number;
117
- } | {
118
- kind: 'path';
119
- d: string;
120
- fill?: string;
121
- fillStyle?: string;
122
- stroke?: string;
123
- strokeStyle?: string;
124
- strokeWidth?: number;
125
- lineWidth?: number;
126
- };
127
-
128
- declare function renderNativeTree(input: Child, options?: NativeTransformOptions): NativeTree;
129
- declare function renderNativeJson(input: Child, options?: NativeTransformOptions): string;
130
- declare function materializeNativeTree(tree: NativeTree, styleResolveOptions?: NativeStyleResolveOptions): NativeTree;
131
- declare function renderMaterializedNativeTree(input: Child, options?: NativeTransformOptions): NativeTree;
132
- declare function renderMaterializedNativeJson(input: Child, options?: NativeTransformOptions): string;
133
- declare function renderAndroidCompose(input: Child | NativeTree, options?: AndroidComposeOptions): string;
134
- declare function renderSwiftUI(input: Child | NativeTree, options?: SwiftUIOptions): string;
135
-
136
- export { type AndroidComposeOptions, type NativeCanvasDrawOperation, type NativeCanvasPoint, type NativeElementNode, type NativeNode, type NativePlatform, type NativePropObject, type NativePropScalar, type NativePropValue, type NativeTextNode, type NativeTransformOptions, type NativeTree, type SwiftUIOptions, materializeNativeTree, renderAndroidCompose, renderMaterializedNativeJson, renderMaterializedNativeTree, renderNativeJson, renderNativeTree, renderSwiftUI };
package/dist/path.d.mts DELETED
@@ -1,163 +0,0 @@
1
- /**
2
- * Path module with unified API across runtimes
3
- * Pure implementation without external dependencies
4
- * Compatible with Node.js 'path' module API
5
- * Works on Node.js, Bun, and Deno
6
- */
7
- /**
8
- * Path separator
9
- */
10
- declare const sep: string;
11
- /**
12
- * Path delimiter
13
- */
14
- declare const delimiter: string;
15
- /**
16
- * POSIX path operations
17
- */
18
- declare const posix: {
19
- sep: string;
20
- delimiter: string;
21
- normalize: (path: string) => string;
22
- join: (...paths: string[]) => string;
23
- resolve: (...paths: string[]) => string;
24
- isAbsolute: (path: string) => boolean;
25
- relative: (from: string, to: string) => string;
26
- dirname: (path: string) => string;
27
- basename: (path: string, ext?: string) => string;
28
- extname: (path: string) => string;
29
- parse: (path: string) => ParsedPath;
30
- format: (pathObject: FormatInputPathObject) => string;
31
- };
32
- /**
33
- * Windows path operations
34
- */
35
- declare const win32: {
36
- sep: string;
37
- delimiter: string;
38
- normalize: (path: string) => string;
39
- join: (...paths: string[]) => string;
40
- resolve: (...paths: string[]) => string;
41
- isAbsolute: (path: string) => boolean;
42
- relative: (from: string, to: string) => string;
43
- dirname: (path: string) => string;
44
- basename: (path: string, ext?: string) => string;
45
- extname: (path: string) => string;
46
- parse: (path: string) => ParsedPath;
47
- format: (pathObject: FormatInputPathObject) => string;
48
- };
49
- /**
50
- * Path object interface
51
- */
52
- interface ParsedPath {
53
- root: string;
54
- dir: string;
55
- base: string;
56
- ext: string;
57
- name: string;
58
- }
59
- interface FormatInputPathObject {
60
- root?: string;
61
- dir?: string;
62
- base?: string;
63
- ext?: string;
64
- name?: string;
65
- }
66
- /**
67
- * Normalize a path (platform-specific)
68
- */
69
- declare function normalize(path: string): string;
70
- /**
71
- * Join paths (platform-specific)
72
- */
73
- declare function join(...paths: string[]): string;
74
- /**
75
- * Resolve paths to absolute path (platform-specific)
76
- */
77
- declare function resolve(...paths: string[]): string;
78
- /**
79
- * Check if path is absolute (platform-specific)
80
- */
81
- declare function isAbsolute(path: string): boolean;
82
- /**
83
- * Get relative path (platform-specific)
84
- */
85
- declare function relative(from: string, to: string): string;
86
- /**
87
- * Get directory name (platform-specific)
88
- */
89
- declare function dirname(path: string): string;
90
- /**
91
- * Get base name (platform-specific)
92
- */
93
- declare function basename(path: string, ext?: string): string;
94
- /**
95
- * Get extension name
96
- */
97
- declare function extname(path: string): string;
98
- /**
99
- * Parse path into components (platform-specific)
100
- */
101
- declare function parse(path: string): ParsedPath;
102
- /**
103
- * Format path from components (platform-specific)
104
- */
105
- declare function format(pathObject: FormatInputPathObject): string;
106
- /**
107
- * Convert to namespaced path (Windows only)
108
- */
109
- declare function toNamespacedPath(path: string): string;
110
- /**
111
- * Get current runtime
112
- */
113
- declare function getRuntime(): 'node' | 'bun' | 'deno';
114
-
115
- /**
116
- * Default export
117
- */
118
- declare const _default: {
119
- sep: string;
120
- delimiter: string;
121
- normalize: typeof normalize;
122
- join: typeof join;
123
- resolve: typeof resolve;
124
- isAbsolute: typeof isAbsolute;
125
- relative: typeof relative;
126
- dirname: typeof dirname;
127
- basename: typeof basename;
128
- extname: typeof extname;
129
- parse: typeof parse;
130
- format: typeof format;
131
- toNamespacedPath: typeof toNamespacedPath;
132
- posix: {
133
- sep: string;
134
- delimiter: string;
135
- normalize: (path: string) => string;
136
- join: (...paths: string[]) => string;
137
- resolve: (...paths: string[]) => string;
138
- isAbsolute: (path: string) => boolean;
139
- relative: (from: string, to: string) => string;
140
- dirname: (path: string) => string;
141
- basename: (path: string, ext?: string) => string;
142
- extname: (path: string) => string;
143
- parse: (path: string) => ParsedPath;
144
- format: (pathObject: FormatInputPathObject) => string;
145
- };
146
- win32: {
147
- sep: string;
148
- delimiter: string;
149
- normalize: (path: string) => string;
150
- join: (...paths: string[]) => string;
151
- resolve: (...paths: string[]) => string;
152
- isAbsolute: (path: string) => boolean;
153
- relative: (from: string, to: string) => string;
154
- dirname: (path: string) => string;
155
- basename: (path: string, ext?: string) => string;
156
- extname: (path: string) => string;
157
- parse: (path: string) => ParsedPath;
158
- format: (pathObject: FormatInputPathObject) => string;
159
- };
160
- getRuntime: typeof getRuntime;
161
- };
162
-
163
- export { type FormatInputPathObject, type ParsedPath, basename, _default as default, delimiter, dirname, extname, format, getRuntime, isAbsolute, join, normalize, parse, posix, relative, resolve, sep, toNamespacedPath, win32 };
package/dist/router.d.mts DELETED
@@ -1,49 +0,0 @@
1
- import { VNode, Child, State, Props } from './types.mjs';
2
- import 'node:events';
3
- import 'events';
4
- import 'http';
5
- import 'ws';
6
-
7
- /**
8
- * Elit - Router - Client-side routing
9
- */
10
-
11
- interface Route {
12
- path: string;
13
- component: (params: RouteParams) => VNode | Child;
14
- beforeEnter?: (to: RouteLocation, from: RouteLocation | null) => boolean | string | void;
15
- }
16
- interface RouteParams {
17
- [key: string]: string;
18
- }
19
- interface RouteLocation {
20
- path: string;
21
- params: RouteParams;
22
- query: Record<string, string>;
23
- hash: string;
24
- }
25
- interface RouterOptions {
26
- mode?: 'history' | 'hash';
27
- base?: string;
28
- routes: Route[];
29
- notFound?: (params: RouteParams) => VNode | Child;
30
- }
31
- interface Router {
32
- currentRoute: State<RouteLocation>;
33
- mode: 'history' | 'hash';
34
- navigate: (path: string, replace?: boolean) => void;
35
- push: (path: string) => void;
36
- replace: (path: string) => void;
37
- back: () => void;
38
- forward: () => void;
39
- go: (delta: number) => void;
40
- beforeEach: (guard: (to: RouteLocation, from: RouteLocation | null) => boolean | string | void) => void;
41
- destroy: () => void;
42
- }
43
- declare function createRouter(options: RouterOptions): Router;
44
- declare function createRouterView(router: Router, options: RouterOptions): () => VNode;
45
- declare const routerLink: (router: Router, props: Props & {
46
- to: string;
47
- }, ...children: Child[]) => VNode;
48
-
49
- export { type Route, type RouteLocation, type RouteParams, type Router, type RouterOptions, createRouter, createRouterView, routerLink };
@@ -1,97 +0,0 @@
1
- /**
2
- * Runtime detection and global type declarations
3
- * Shared across all modules for consistency
4
- */
5
- /**
6
- * Runtime detection (cached at module load)
7
- */
8
- declare const runtime: "node" | "bun" | "deno";
9
- declare const isNode: boolean;
10
- declare const isBun: boolean;
11
- declare const isDeno: boolean;
12
- declare global {
13
- const Bun: {
14
- build(options: {
15
- entrypoints: string[];
16
- outdir?: string;
17
- target?: string;
18
- format?: string;
19
- minify?: boolean;
20
- sourcemap?: string;
21
- external?: string[];
22
- naming?: string;
23
- plugins?: any[];
24
- define?: Record<string, string>;
25
- }): Promise<{
26
- success: boolean;
27
- outputs: Array<{
28
- path: string;
29
- size: number;
30
- }>;
31
- logs: any[];
32
- }>;
33
- Transpiler: new (options?: {
34
- loader?: string;
35
- target?: string;
36
- minify?: boolean;
37
- }) => {
38
- transform(code: string, loader?: string): Promise<string>;
39
- transformSync(code: string, loader?: string): string;
40
- };
41
- file(path: string): {
42
- size: number;
43
- arrayBuffer(): ArrayBuffer | Promise<ArrayBuffer>;
44
- exists(): Promise<boolean>;
45
- };
46
- write(path: string, data: string | Buffer | Uint8Array): Promise<void>;
47
- } | undefined;
48
- const Deno: {
49
- emit(rootSpecifier: string | URL, options?: {
50
- bundle?: 'module' | 'classic';
51
- check?: boolean;
52
- compilerOptions?: any;
53
- importMap?: string;
54
- importMapPath?: string;
55
- sources?: Record<string, string>;
56
- }): Promise<{
57
- files: Record<string, string>;
58
- diagnostics: any[];
59
- }>;
60
- writeTextFile(path: string, data: string): Promise<void>;
61
- readFile(path: string): Promise<Uint8Array>;
62
- readFileSync(path: string): Uint8Array;
63
- writeFile(path: string, data: Uint8Array): Promise<void>;
64
- writeFileSync(path: string, data: Uint8Array): void;
65
- stat(path: string): Promise<any>;
66
- statSync(path: string): any;
67
- mkdir(path: string, options?: {
68
- recursive?: boolean;
69
- }): Promise<void>;
70
- mkdirSync(path: string, options?: {
71
- recursive?: boolean;
72
- }): void;
73
- readDir(path: string): AsyncIterable<any>;
74
- readDirSync(path: string): Iterable<any>;
75
- remove(path: string, options?: {
76
- recursive?: boolean;
77
- }): Promise<void>;
78
- removeSync(path: string, options?: {
79
- recursive?: boolean;
80
- }): void;
81
- rename(oldPath: string, newPath: string): Promise<void>;
82
- renameSync(oldPath: string, newPath: string): void;
83
- copyFile(src: string, dest: string): Promise<void>;
84
- copyFileSync(src: string, dest: string): void;
85
- realPath(path: string): Promise<string>;
86
- realPathSync(path: string): string;
87
- watchFs(paths: string | string[]): AsyncIterable<{
88
- kind: string;
89
- paths: string[];
90
- }>;
91
- build: {
92
- os: string;
93
- };
94
- } | undefined;
95
- }
96
-
97
- export { isBun, isDeno, isNode, runtime };