@northlight/ui 2.43.0 → 2.43.2
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/es/northlight.d.ts +2 -2
- package/dist/es/northlight.js +1482 -949
- package/dist/es/northlight.js.map +1 -1
- package/dist/sandbox/index.cjs +1282 -749
- package/dist/sandbox/index.cjs.map +1 -1
- package/dist/sandbox/index.js +1283 -750
- package/dist/sandbox/index.js.map +1 -1
- package/dist/umd/northlight.cjs +1476 -943
- package/dist/umd/northlight.cjs.map +1 -1
- package/dist/umd/northlight.min.cjs +3 -3
- package/dist/umd/northlight.min.cjs.map +1 -1
- package/lib/components/date-picker/components/date-field/trigger.tsx +26 -6
- package/lib/components/date-picker/components/date-field/types.ts +8 -2
- package/lib/components/date-picker/date-picker/date-picker.tsx +221 -9
- package/lib/components/date-picker/date-picker/date-range-picker.tsx +211 -29
- package/lib/hooks/use-arrow-focus/index.ts +1 -1
- package/lib/theme/components/textarea/index.ts +82 -41
- package/package.json +3 -3
- package/sandbox/lib/run-scenarios.ts +4 -1
- package/sandbox/node_modules/.yarn-integrity +0 -38
- package/sandbox/node_modules/@originjs/vite-plugin-commonjs/LICENSE +0 -127
- package/sandbox/node_modules/@originjs/vite-plugin-commonjs/README.md +0 -50
- package/sandbox/node_modules/@originjs/vite-plugin-commonjs/lib/filter.d.ts +0 -2
- package/sandbox/node_modules/@originjs/vite-plugin-commonjs/lib/filter.js +0 -39
- package/sandbox/node_modules/@originjs/vite-plugin-commonjs/lib/filter.js.map +0 -1
- package/sandbox/node_modules/@originjs/vite-plugin-commonjs/lib/index.d.ts +0 -11
- package/sandbox/node_modules/@originjs/vite-plugin-commonjs/lib/index.js +0 -78
- package/sandbox/node_modules/@originjs/vite-plugin-commonjs/lib/index.js.map +0 -1
- package/sandbox/node_modules/@originjs/vite-plugin-commonjs/lib/lib.d.ts +0 -6
- package/sandbox/node_modules/@originjs/vite-plugin-commonjs/lib/lib.js +0 -79
- package/sandbox/node_modules/@originjs/vite-plugin-commonjs/lib/lib.js.map +0 -1
- package/sandbox/node_modules/@originjs/vite-plugin-commonjs/package.json +0 -34
- package/sandbox/node_modules/esbuild/LICENSE.md +0 -21
- package/sandbox/node_modules/esbuild/README.md +0 -3
- package/sandbox/node_modules/esbuild/bin/esbuild +0 -178
- package/sandbox/node_modules/esbuild/install.js +0 -244
- package/sandbox/node_modules/esbuild/lib/main.d.ts +0 -602
- package/sandbox/node_modules/esbuild/lib/main.js +0 -2332
- package/sandbox/node_modules/esbuild/package.json +0 -41
- package/sandbox/node_modules/esbuild-linux-64/README.md +0 -3
- package/sandbox/node_modules/esbuild-linux-64/bin/esbuild +0 -0
- package/sandbox/node_modules/esbuild-linux-64/package.json +0 -17
|
@@ -1,602 +0,0 @@
|
|
|
1
|
-
export type Platform = 'browser' | 'node' | 'neutral';
|
|
2
|
-
export type Format = 'iife' | 'cjs' | 'esm';
|
|
3
|
-
export type Loader = 'js' | 'jsx' | 'ts' | 'tsx' | 'css' | 'json' | 'text' | 'base64' | 'file' | 'dataurl' | 'binary' | 'copy' | 'default';
|
|
4
|
-
export type LogLevel = 'verbose' | 'debug' | 'info' | 'warning' | 'error' | 'silent';
|
|
5
|
-
export type Charset = 'ascii' | 'utf8';
|
|
6
|
-
export type Drop = 'console' | 'debugger';
|
|
7
|
-
|
|
8
|
-
interface CommonOptions {
|
|
9
|
-
/** Documentation: https://esbuild.github.io/api/#sourcemap */
|
|
10
|
-
sourcemap?: boolean | 'linked' | 'inline' | 'external' | 'both';
|
|
11
|
-
/** Documentation: https://esbuild.github.io/api/#legal-comments */
|
|
12
|
-
legalComments?: 'none' | 'inline' | 'eof' | 'linked' | 'external';
|
|
13
|
-
/** Documentation: https://esbuild.github.io/api/#source-root */
|
|
14
|
-
sourceRoot?: string;
|
|
15
|
-
/** Documentation: https://esbuild.github.io/api/#sources-content */
|
|
16
|
-
sourcesContent?: boolean;
|
|
17
|
-
|
|
18
|
-
/** Documentation: https://esbuild.github.io/api/#format */
|
|
19
|
-
format?: Format;
|
|
20
|
-
/** Documentation: https://esbuild.github.io/api/#global-name */
|
|
21
|
-
globalName?: string;
|
|
22
|
-
/** Documentation: https://esbuild.github.io/api/#target */
|
|
23
|
-
target?: string | string[];
|
|
24
|
-
/** Documentation: https://esbuild.github.io/api/#supported */
|
|
25
|
-
supported?: Record<string, boolean>;
|
|
26
|
-
/** Documentation: https://esbuild.github.io/api/#platform */
|
|
27
|
-
platform?: Platform;
|
|
28
|
-
|
|
29
|
-
/** Documentation: https://esbuild.github.io/api/#mangle-props */
|
|
30
|
-
mangleProps?: RegExp;
|
|
31
|
-
/** Documentation: https://esbuild.github.io/api/#mangle-props */
|
|
32
|
-
reserveProps?: RegExp;
|
|
33
|
-
/** Documentation: https://esbuild.github.io/api/#mangle-props */
|
|
34
|
-
mangleQuoted?: boolean;
|
|
35
|
-
/** Documentation: https://esbuild.github.io/api/#mangle-props */
|
|
36
|
-
mangleCache?: Record<string, string | false>;
|
|
37
|
-
/** Documentation: https://esbuild.github.io/api/#drop */
|
|
38
|
-
drop?: Drop[];
|
|
39
|
-
/** Documentation: https://esbuild.github.io/api/#minify */
|
|
40
|
-
minify?: boolean;
|
|
41
|
-
/** Documentation: https://esbuild.github.io/api/#minify */
|
|
42
|
-
minifyWhitespace?: boolean;
|
|
43
|
-
/** Documentation: https://esbuild.github.io/api/#minify */
|
|
44
|
-
minifyIdentifiers?: boolean;
|
|
45
|
-
/** Documentation: https://esbuild.github.io/api/#minify */
|
|
46
|
-
minifySyntax?: boolean;
|
|
47
|
-
/** Documentation: https://esbuild.github.io/api/#charset */
|
|
48
|
-
charset?: Charset;
|
|
49
|
-
/** Documentation: https://esbuild.github.io/api/#tree-shaking */
|
|
50
|
-
treeShaking?: boolean;
|
|
51
|
-
/** Documentation: https://esbuild.github.io/api/#ignore-annotations */
|
|
52
|
-
ignoreAnnotations?: boolean;
|
|
53
|
-
|
|
54
|
-
/** Documentation: https://esbuild.github.io/api/#jsx */
|
|
55
|
-
jsx?: 'transform' | 'preserve' | 'automatic';
|
|
56
|
-
/** Documentation: https://esbuild.github.io/api/#jsx-factory */
|
|
57
|
-
jsxFactory?: string;
|
|
58
|
-
/** Documentation: https://esbuild.github.io/api/#jsx-fragment */
|
|
59
|
-
jsxFragment?: string;
|
|
60
|
-
/** Documentation: https://esbuild.github.io/api/#jsx-import-source */
|
|
61
|
-
jsxImportSource?: string;
|
|
62
|
-
/** Documentation: https://esbuild.github.io/api/#jsx-development */
|
|
63
|
-
jsxDev?: boolean;
|
|
64
|
-
|
|
65
|
-
/** Documentation: https://esbuild.github.io/api/#define */
|
|
66
|
-
define?: { [key: string]: string };
|
|
67
|
-
/** Documentation: https://esbuild.github.io/api/#pure */
|
|
68
|
-
pure?: string[];
|
|
69
|
-
/** Documentation: https://esbuild.github.io/api/#keep-names */
|
|
70
|
-
keepNames?: boolean;
|
|
71
|
-
|
|
72
|
-
/** Documentation: https://esbuild.github.io/api/#color */
|
|
73
|
-
color?: boolean;
|
|
74
|
-
/** Documentation: https://esbuild.github.io/api/#log-level */
|
|
75
|
-
logLevel?: LogLevel;
|
|
76
|
-
/** Documentation: https://esbuild.github.io/api/#log-limit */
|
|
77
|
-
logLimit?: number;
|
|
78
|
-
/** Documentation: https://esbuild.github.io/api/#log-override */
|
|
79
|
-
logOverride?: Record<string, LogLevel>;
|
|
80
|
-
}
|
|
81
|
-
|
|
82
|
-
export interface BuildOptions extends CommonOptions {
|
|
83
|
-
/** Documentation: https://esbuild.github.io/api/#bundle */
|
|
84
|
-
bundle?: boolean;
|
|
85
|
-
/** Documentation: https://esbuild.github.io/api/#splitting */
|
|
86
|
-
splitting?: boolean;
|
|
87
|
-
/** Documentation: https://esbuild.github.io/api/#preserve-symlinks */
|
|
88
|
-
preserveSymlinks?: boolean;
|
|
89
|
-
/** Documentation: https://esbuild.github.io/api/#outfile */
|
|
90
|
-
outfile?: string;
|
|
91
|
-
/** Documentation: https://esbuild.github.io/api/#metafile */
|
|
92
|
-
metafile?: boolean;
|
|
93
|
-
/** Documentation: https://esbuild.github.io/api/#outdir */
|
|
94
|
-
outdir?: string;
|
|
95
|
-
/** Documentation: https://esbuild.github.io/api/#outbase */
|
|
96
|
-
outbase?: string;
|
|
97
|
-
/** Documentation: https://esbuild.github.io/api/#external */
|
|
98
|
-
external?: string[];
|
|
99
|
-
/** Documentation: https://esbuild.github.io/api/#loader */
|
|
100
|
-
loader?: { [ext: string]: Loader };
|
|
101
|
-
/** Documentation: https://esbuild.github.io/api/#resolve-extensions */
|
|
102
|
-
resolveExtensions?: string[];
|
|
103
|
-
/** Documentation: https://esbuild.github.io/api/#main-fields */
|
|
104
|
-
mainFields?: string[];
|
|
105
|
-
/** Documentation: https://esbuild.github.io/api/#conditions */
|
|
106
|
-
conditions?: string[];
|
|
107
|
-
/** Documentation: https://esbuild.github.io/api/#write */
|
|
108
|
-
write?: boolean;
|
|
109
|
-
/** Documentation: https://esbuild.github.io/api/#allow-overwrite */
|
|
110
|
-
allowOverwrite?: boolean;
|
|
111
|
-
/** Documentation: https://esbuild.github.io/api/#tsconfig */
|
|
112
|
-
tsconfig?: string;
|
|
113
|
-
/** Documentation: https://esbuild.github.io/api/#out-extension */
|
|
114
|
-
outExtension?: { [ext: string]: string };
|
|
115
|
-
/** Documentation: https://esbuild.github.io/api/#public-path */
|
|
116
|
-
publicPath?: string;
|
|
117
|
-
/** Documentation: https://esbuild.github.io/api/#entry-names */
|
|
118
|
-
entryNames?: string;
|
|
119
|
-
/** Documentation: https://esbuild.github.io/api/#chunk-names */
|
|
120
|
-
chunkNames?: string;
|
|
121
|
-
/** Documentation: https://esbuild.github.io/api/#asset-names */
|
|
122
|
-
assetNames?: string;
|
|
123
|
-
/** Documentation: https://esbuild.github.io/api/#inject */
|
|
124
|
-
inject?: string[];
|
|
125
|
-
/** Documentation: https://esbuild.github.io/api/#banner */
|
|
126
|
-
banner?: { [type: string]: string };
|
|
127
|
-
/** Documentation: https://esbuild.github.io/api/#footer */
|
|
128
|
-
footer?: { [type: string]: string };
|
|
129
|
-
/** Documentation: https://esbuild.github.io/api/#incremental */
|
|
130
|
-
incremental?: boolean;
|
|
131
|
-
/** Documentation: https://esbuild.github.io/api/#entry-points */
|
|
132
|
-
entryPoints?: string[] | Record<string, string>;
|
|
133
|
-
/** Documentation: https://esbuild.github.io/api/#stdin */
|
|
134
|
-
stdin?: StdinOptions;
|
|
135
|
-
/** Documentation: https://esbuild.github.io/plugins/ */
|
|
136
|
-
plugins?: Plugin[];
|
|
137
|
-
/** Documentation: https://esbuild.github.io/api/#working-directory */
|
|
138
|
-
absWorkingDir?: string;
|
|
139
|
-
/** Documentation: https://esbuild.github.io/api/#node-paths */
|
|
140
|
-
nodePaths?: string[]; // The "NODE_PATH" variable from Node.js
|
|
141
|
-
/** Documentation: https://esbuild.github.io/api/#watch */
|
|
142
|
-
watch?: boolean | WatchMode;
|
|
143
|
-
}
|
|
144
|
-
|
|
145
|
-
export interface WatchMode {
|
|
146
|
-
onRebuild?: (error: BuildFailure | null, result: BuildResult | null) => void;
|
|
147
|
-
}
|
|
148
|
-
|
|
149
|
-
export interface StdinOptions {
|
|
150
|
-
contents: string | Uint8Array;
|
|
151
|
-
resolveDir?: string;
|
|
152
|
-
sourcefile?: string;
|
|
153
|
-
loader?: Loader;
|
|
154
|
-
}
|
|
155
|
-
|
|
156
|
-
export interface Message {
|
|
157
|
-
id: string;
|
|
158
|
-
pluginName: string;
|
|
159
|
-
text: string;
|
|
160
|
-
location: Location | null;
|
|
161
|
-
notes: Note[];
|
|
162
|
-
|
|
163
|
-
/**
|
|
164
|
-
* Optional user-specified data that is passed through unmodified. You can
|
|
165
|
-
* use this to stash the original error, for example.
|
|
166
|
-
*/
|
|
167
|
-
detail: any;
|
|
168
|
-
}
|
|
169
|
-
|
|
170
|
-
export interface Note {
|
|
171
|
-
text: string;
|
|
172
|
-
location: Location | null;
|
|
173
|
-
}
|
|
174
|
-
|
|
175
|
-
export interface Location {
|
|
176
|
-
file: string;
|
|
177
|
-
namespace: string;
|
|
178
|
-
/** 1-based */
|
|
179
|
-
line: number;
|
|
180
|
-
/** 0-based, in bytes */
|
|
181
|
-
column: number;
|
|
182
|
-
/** in bytes */
|
|
183
|
-
length: number;
|
|
184
|
-
lineText: string;
|
|
185
|
-
suggestion: string;
|
|
186
|
-
}
|
|
187
|
-
|
|
188
|
-
export interface OutputFile {
|
|
189
|
-
path: string;
|
|
190
|
-
/** "text" as bytes */
|
|
191
|
-
contents: Uint8Array;
|
|
192
|
-
/** "contents" as text */
|
|
193
|
-
text: string;
|
|
194
|
-
}
|
|
195
|
-
|
|
196
|
-
export interface BuildInvalidate {
|
|
197
|
-
(): Promise<BuildIncremental>;
|
|
198
|
-
dispose(): void;
|
|
199
|
-
}
|
|
200
|
-
|
|
201
|
-
export interface BuildIncremental extends BuildResult {
|
|
202
|
-
rebuild: BuildInvalidate;
|
|
203
|
-
}
|
|
204
|
-
|
|
205
|
-
export interface BuildResult {
|
|
206
|
-
errors: Message[];
|
|
207
|
-
warnings: Message[];
|
|
208
|
-
/** Only when "write: false" */
|
|
209
|
-
outputFiles?: OutputFile[];
|
|
210
|
-
/** Only when "incremental: true" */
|
|
211
|
-
rebuild?: BuildInvalidate;
|
|
212
|
-
/** Only when "watch: true" */
|
|
213
|
-
stop?: () => void;
|
|
214
|
-
/** Only when "metafile: true" */
|
|
215
|
-
metafile?: Metafile;
|
|
216
|
-
/** Only when "mangleCache" is present */
|
|
217
|
-
mangleCache?: Record<string, string | false>;
|
|
218
|
-
}
|
|
219
|
-
|
|
220
|
-
export interface BuildFailure extends Error {
|
|
221
|
-
errors: Message[];
|
|
222
|
-
warnings: Message[];
|
|
223
|
-
}
|
|
224
|
-
|
|
225
|
-
/** Documentation: https://esbuild.github.io/api/#serve-arguments */
|
|
226
|
-
export interface ServeOptions {
|
|
227
|
-
port?: number;
|
|
228
|
-
host?: string;
|
|
229
|
-
servedir?: string;
|
|
230
|
-
onRequest?: (args: ServeOnRequestArgs) => void;
|
|
231
|
-
}
|
|
232
|
-
|
|
233
|
-
export interface ServeOnRequestArgs {
|
|
234
|
-
remoteAddress: string;
|
|
235
|
-
method: string;
|
|
236
|
-
path: string;
|
|
237
|
-
status: number;
|
|
238
|
-
/** The time to generate the response, not to send it */
|
|
239
|
-
timeInMS: number;
|
|
240
|
-
}
|
|
241
|
-
|
|
242
|
-
/** Documentation: https://esbuild.github.io/api/#serve-return-values */
|
|
243
|
-
export interface ServeResult {
|
|
244
|
-
port: number;
|
|
245
|
-
host: string;
|
|
246
|
-
wait: Promise<void>;
|
|
247
|
-
stop: () => void;
|
|
248
|
-
}
|
|
249
|
-
|
|
250
|
-
export interface TransformOptions extends CommonOptions {
|
|
251
|
-
tsconfigRaw?: string | {
|
|
252
|
-
compilerOptions?: {
|
|
253
|
-
jsxFactory?: string,
|
|
254
|
-
jsxFragmentFactory?: string,
|
|
255
|
-
useDefineForClassFields?: boolean,
|
|
256
|
-
importsNotUsedAsValues?: 'remove' | 'preserve' | 'error',
|
|
257
|
-
preserveValueImports?: boolean,
|
|
258
|
-
},
|
|
259
|
-
};
|
|
260
|
-
|
|
261
|
-
sourcefile?: string;
|
|
262
|
-
loader?: Loader;
|
|
263
|
-
banner?: string;
|
|
264
|
-
footer?: string;
|
|
265
|
-
}
|
|
266
|
-
|
|
267
|
-
export interface TransformResult {
|
|
268
|
-
code: string;
|
|
269
|
-
map: string;
|
|
270
|
-
warnings: Message[];
|
|
271
|
-
/** Only when "mangleCache" is present */
|
|
272
|
-
mangleCache?: Record<string, string | false>;
|
|
273
|
-
}
|
|
274
|
-
|
|
275
|
-
export interface TransformFailure extends Error {
|
|
276
|
-
errors: Message[];
|
|
277
|
-
warnings: Message[];
|
|
278
|
-
}
|
|
279
|
-
|
|
280
|
-
export interface Plugin {
|
|
281
|
-
name: string;
|
|
282
|
-
setup: (build: PluginBuild) => (void | Promise<void>);
|
|
283
|
-
}
|
|
284
|
-
|
|
285
|
-
export interface PluginBuild {
|
|
286
|
-
initialOptions: BuildOptions;
|
|
287
|
-
resolve(path: string, options?: ResolveOptions): Promise<ResolveResult>;
|
|
288
|
-
|
|
289
|
-
onStart(callback: () =>
|
|
290
|
-
(OnStartResult | null | void | Promise<OnStartResult | null | void>)): void;
|
|
291
|
-
onEnd(callback: (result: BuildResult) =>
|
|
292
|
-
(void | Promise<void>)): void;
|
|
293
|
-
onResolve(options: OnResolveOptions, callback: (args: OnResolveArgs) =>
|
|
294
|
-
(OnResolveResult | null | undefined | Promise<OnResolveResult | null | undefined>)): void;
|
|
295
|
-
onLoad(options: OnLoadOptions, callback: (args: OnLoadArgs) =>
|
|
296
|
-
(OnLoadResult | null | undefined | Promise<OnLoadResult | null | undefined>)): void;
|
|
297
|
-
|
|
298
|
-
// This is a full copy of the esbuild library in case you need it
|
|
299
|
-
esbuild: {
|
|
300
|
-
serve: typeof serve,
|
|
301
|
-
build: typeof build,
|
|
302
|
-
buildSync: typeof buildSync,
|
|
303
|
-
transform: typeof transform,
|
|
304
|
-
transformSync: typeof transformSync,
|
|
305
|
-
formatMessages: typeof formatMessages,
|
|
306
|
-
formatMessagesSync: typeof formatMessagesSync,
|
|
307
|
-
analyzeMetafile: typeof analyzeMetafile,
|
|
308
|
-
analyzeMetafileSync: typeof analyzeMetafileSync,
|
|
309
|
-
initialize: typeof initialize,
|
|
310
|
-
version: typeof version,
|
|
311
|
-
};
|
|
312
|
-
}
|
|
313
|
-
|
|
314
|
-
export interface ResolveOptions {
|
|
315
|
-
pluginName?: string;
|
|
316
|
-
importer?: string;
|
|
317
|
-
namespace?: string;
|
|
318
|
-
resolveDir?: string;
|
|
319
|
-
kind?: ImportKind;
|
|
320
|
-
pluginData?: any;
|
|
321
|
-
}
|
|
322
|
-
|
|
323
|
-
export interface ResolveResult {
|
|
324
|
-
errors: Message[];
|
|
325
|
-
warnings: Message[];
|
|
326
|
-
|
|
327
|
-
path: string;
|
|
328
|
-
external: boolean;
|
|
329
|
-
sideEffects: boolean;
|
|
330
|
-
namespace: string;
|
|
331
|
-
suffix: string;
|
|
332
|
-
pluginData: any;
|
|
333
|
-
}
|
|
334
|
-
|
|
335
|
-
export interface OnStartResult {
|
|
336
|
-
errors?: PartialMessage[];
|
|
337
|
-
warnings?: PartialMessage[];
|
|
338
|
-
}
|
|
339
|
-
|
|
340
|
-
export interface OnResolveOptions {
|
|
341
|
-
filter: RegExp;
|
|
342
|
-
namespace?: string;
|
|
343
|
-
}
|
|
344
|
-
|
|
345
|
-
export interface OnResolveArgs {
|
|
346
|
-
path: string;
|
|
347
|
-
importer: string;
|
|
348
|
-
namespace: string;
|
|
349
|
-
resolveDir: string;
|
|
350
|
-
kind: ImportKind;
|
|
351
|
-
pluginData: any;
|
|
352
|
-
}
|
|
353
|
-
|
|
354
|
-
export type ImportKind =
|
|
355
|
-
| 'entry-point'
|
|
356
|
-
|
|
357
|
-
// JS
|
|
358
|
-
| 'import-statement'
|
|
359
|
-
| 'require-call'
|
|
360
|
-
| 'dynamic-import'
|
|
361
|
-
| 'require-resolve'
|
|
362
|
-
|
|
363
|
-
// CSS
|
|
364
|
-
| 'import-rule'
|
|
365
|
-
| 'url-token'
|
|
366
|
-
|
|
367
|
-
export interface OnResolveResult {
|
|
368
|
-
pluginName?: string;
|
|
369
|
-
|
|
370
|
-
errors?: PartialMessage[];
|
|
371
|
-
warnings?: PartialMessage[];
|
|
372
|
-
|
|
373
|
-
path?: string;
|
|
374
|
-
external?: boolean;
|
|
375
|
-
sideEffects?: boolean;
|
|
376
|
-
namespace?: string;
|
|
377
|
-
suffix?: string;
|
|
378
|
-
pluginData?: any;
|
|
379
|
-
|
|
380
|
-
watchFiles?: string[];
|
|
381
|
-
watchDirs?: string[];
|
|
382
|
-
}
|
|
383
|
-
|
|
384
|
-
export interface OnLoadOptions {
|
|
385
|
-
filter: RegExp;
|
|
386
|
-
namespace?: string;
|
|
387
|
-
}
|
|
388
|
-
|
|
389
|
-
export interface OnLoadArgs {
|
|
390
|
-
path: string;
|
|
391
|
-
namespace: string;
|
|
392
|
-
suffix: string;
|
|
393
|
-
pluginData: any;
|
|
394
|
-
}
|
|
395
|
-
|
|
396
|
-
export interface OnLoadResult {
|
|
397
|
-
pluginName?: string;
|
|
398
|
-
|
|
399
|
-
errors?: PartialMessage[];
|
|
400
|
-
warnings?: PartialMessage[];
|
|
401
|
-
|
|
402
|
-
contents?: string | Uint8Array;
|
|
403
|
-
resolveDir?: string;
|
|
404
|
-
loader?: Loader;
|
|
405
|
-
pluginData?: any;
|
|
406
|
-
|
|
407
|
-
watchFiles?: string[];
|
|
408
|
-
watchDirs?: string[];
|
|
409
|
-
}
|
|
410
|
-
|
|
411
|
-
export interface PartialMessage {
|
|
412
|
-
id?: string;
|
|
413
|
-
pluginName?: string;
|
|
414
|
-
text?: string;
|
|
415
|
-
location?: Partial<Location> | null;
|
|
416
|
-
notes?: PartialNote[];
|
|
417
|
-
detail?: any;
|
|
418
|
-
}
|
|
419
|
-
|
|
420
|
-
export interface PartialNote {
|
|
421
|
-
text?: string;
|
|
422
|
-
location?: Partial<Location> | null;
|
|
423
|
-
}
|
|
424
|
-
|
|
425
|
-
export interface Metafile {
|
|
426
|
-
inputs: {
|
|
427
|
-
[path: string]: {
|
|
428
|
-
bytes: number
|
|
429
|
-
imports: {
|
|
430
|
-
path: string
|
|
431
|
-
kind: ImportKind
|
|
432
|
-
}[]
|
|
433
|
-
}
|
|
434
|
-
}
|
|
435
|
-
outputs: {
|
|
436
|
-
[path: string]: {
|
|
437
|
-
bytes: number
|
|
438
|
-
inputs: {
|
|
439
|
-
[path: string]: {
|
|
440
|
-
bytesInOutput: number
|
|
441
|
-
}
|
|
442
|
-
}
|
|
443
|
-
imports: {
|
|
444
|
-
path: string
|
|
445
|
-
kind: ImportKind
|
|
446
|
-
}[]
|
|
447
|
-
exports: string[]
|
|
448
|
-
entryPoint?: string
|
|
449
|
-
}
|
|
450
|
-
}
|
|
451
|
-
}
|
|
452
|
-
|
|
453
|
-
export interface FormatMessagesOptions {
|
|
454
|
-
kind: 'error' | 'warning';
|
|
455
|
-
color?: boolean;
|
|
456
|
-
terminalWidth?: number;
|
|
457
|
-
}
|
|
458
|
-
|
|
459
|
-
export interface AnalyzeMetafileOptions {
|
|
460
|
-
color?: boolean;
|
|
461
|
-
verbose?: boolean;
|
|
462
|
-
}
|
|
463
|
-
|
|
464
|
-
/**
|
|
465
|
-
* This function invokes the "esbuild" command-line tool for you. It returns a
|
|
466
|
-
* promise that either resolves with a "BuildResult" object or rejects with a
|
|
467
|
-
* "BuildFailure" object.
|
|
468
|
-
*
|
|
469
|
-
* - Works in node: yes
|
|
470
|
-
* - Works in browser: yes
|
|
471
|
-
*
|
|
472
|
-
* Documentation: https://esbuild.github.io/api/#build-api
|
|
473
|
-
*/
|
|
474
|
-
export declare function build(options: BuildOptions & { write: false }): Promise<BuildResult & { outputFiles: OutputFile[] }>;
|
|
475
|
-
export declare function build(options: BuildOptions & { incremental: true, metafile: true }): Promise<BuildIncremental & { metafile: Metafile }>;
|
|
476
|
-
export declare function build(options: BuildOptions & { incremental: true }): Promise<BuildIncremental>;
|
|
477
|
-
export declare function build(options: BuildOptions & { metafile: true }): Promise<BuildResult & { metafile: Metafile }>;
|
|
478
|
-
export declare function build(options: BuildOptions): Promise<BuildResult>;
|
|
479
|
-
|
|
480
|
-
/**
|
|
481
|
-
* This function is similar to "build" but it serves the resulting files over
|
|
482
|
-
* HTTP on a localhost address with the specified port.
|
|
483
|
-
*
|
|
484
|
-
* - Works in node: yes
|
|
485
|
-
* - Works in browser: no
|
|
486
|
-
*
|
|
487
|
-
* Documentation: https://esbuild.github.io/api/#serve
|
|
488
|
-
*/
|
|
489
|
-
export declare function serve(serveOptions: ServeOptions, buildOptions: BuildOptions): Promise<ServeResult>;
|
|
490
|
-
|
|
491
|
-
/**
|
|
492
|
-
* This function transforms a single JavaScript file. It can be used to minify
|
|
493
|
-
* JavaScript, convert TypeScript/JSX to JavaScript, or convert newer JavaScript
|
|
494
|
-
* to older JavaScript. It returns a promise that is either resolved with a
|
|
495
|
-
* "TransformResult" object or rejected with a "TransformFailure" object.
|
|
496
|
-
*
|
|
497
|
-
* - Works in node: yes
|
|
498
|
-
* - Works in browser: yes
|
|
499
|
-
*
|
|
500
|
-
* Documentation: https://esbuild.github.io/api/#transform-api
|
|
501
|
-
*/
|
|
502
|
-
export declare function transform(input: string | Uint8Array, options?: TransformOptions): Promise<TransformResult>;
|
|
503
|
-
|
|
504
|
-
/**
|
|
505
|
-
* Converts log messages to formatted message strings suitable for printing in
|
|
506
|
-
* the terminal. This allows you to reuse the built-in behavior of esbuild's
|
|
507
|
-
* log message formatter. This is a batch-oriented API for efficiency.
|
|
508
|
-
*
|
|
509
|
-
* - Works in node: yes
|
|
510
|
-
* - Works in browser: yes
|
|
511
|
-
*/
|
|
512
|
-
export declare function formatMessages(messages: PartialMessage[], options: FormatMessagesOptions): Promise<string[]>;
|
|
513
|
-
|
|
514
|
-
/**
|
|
515
|
-
* Pretty-prints an analysis of the metafile JSON to a string. This is just for
|
|
516
|
-
* convenience to be able to match esbuild's pretty-printing exactly. If you want
|
|
517
|
-
* to customize it, you can just inspect the data in the metafile yourself.
|
|
518
|
-
*
|
|
519
|
-
* - Works in node: yes
|
|
520
|
-
* - Works in browser: yes
|
|
521
|
-
*
|
|
522
|
-
* Documentation: https://esbuild.github.io/api/#analyze
|
|
523
|
-
*/
|
|
524
|
-
export declare function analyzeMetafile(metafile: Metafile | string, options?: AnalyzeMetafileOptions): Promise<string>;
|
|
525
|
-
|
|
526
|
-
/**
|
|
527
|
-
* A synchronous version of "build".
|
|
528
|
-
*
|
|
529
|
-
* - Works in node: yes
|
|
530
|
-
* - Works in browser: no
|
|
531
|
-
*
|
|
532
|
-
* Documentation: https://esbuild.github.io/api/#build-api
|
|
533
|
-
*/
|
|
534
|
-
export declare function buildSync(options: BuildOptions & { write: false }): BuildResult & { outputFiles: OutputFile[] };
|
|
535
|
-
export declare function buildSync(options: BuildOptions): BuildResult;
|
|
536
|
-
|
|
537
|
-
/**
|
|
538
|
-
* A synchronous version of "transform".
|
|
539
|
-
*
|
|
540
|
-
* - Works in node: yes
|
|
541
|
-
* - Works in browser: no
|
|
542
|
-
*
|
|
543
|
-
* Documentation: https://esbuild.github.io/api/#transform-api
|
|
544
|
-
*/
|
|
545
|
-
export declare function transformSync(input: string, options?: TransformOptions): TransformResult;
|
|
546
|
-
|
|
547
|
-
/**
|
|
548
|
-
* A synchronous version of "formatMessages".
|
|
549
|
-
*
|
|
550
|
-
* - Works in node: yes
|
|
551
|
-
* - Works in browser: no
|
|
552
|
-
*/
|
|
553
|
-
export declare function formatMessagesSync(messages: PartialMessage[], options: FormatMessagesOptions): string[];
|
|
554
|
-
|
|
555
|
-
/**
|
|
556
|
-
* A synchronous version of "analyzeMetafile".
|
|
557
|
-
*
|
|
558
|
-
* - Works in node: yes
|
|
559
|
-
* - Works in browser: no
|
|
560
|
-
*
|
|
561
|
-
* Documentation: https://esbuild.github.io/api/#analyze
|
|
562
|
-
*/
|
|
563
|
-
export declare function analyzeMetafileSync(metafile: Metafile | string, options?: AnalyzeMetafileOptions): string;
|
|
564
|
-
|
|
565
|
-
/**
|
|
566
|
-
* This configures the browser-based version of esbuild. It is necessary to
|
|
567
|
-
* call this first and wait for the returned promise to be resolved before
|
|
568
|
-
* making other API calls when using esbuild in the browser.
|
|
569
|
-
*
|
|
570
|
-
* - Works in node: yes
|
|
571
|
-
* - Works in browser: yes ("options" is required)
|
|
572
|
-
*
|
|
573
|
-
* Documentation: https://esbuild.github.io/api/#running-in-the-browser
|
|
574
|
-
*/
|
|
575
|
-
export declare function initialize(options: InitializeOptions): Promise<void>;
|
|
576
|
-
|
|
577
|
-
export interface InitializeOptions {
|
|
578
|
-
/**
|
|
579
|
-
* The URL of the "esbuild.wasm" file. This must be provided when running
|
|
580
|
-
* esbuild in the browser.
|
|
581
|
-
*/
|
|
582
|
-
wasmURL?: string
|
|
583
|
-
|
|
584
|
-
/**
|
|
585
|
-
* The result of calling "new WebAssembly.Module(buffer)" where "buffer"
|
|
586
|
-
* is a typed array or ArrayBuffer containing the binary code of the
|
|
587
|
-
* "esbuild.wasm" file.
|
|
588
|
-
*
|
|
589
|
-
* You can use this as an alternative to "wasmURL" for environments where it's
|
|
590
|
-
* not possible to download the WebAssembly module.
|
|
591
|
-
*/
|
|
592
|
-
wasmModule?: WebAssembly.Module
|
|
593
|
-
|
|
594
|
-
/**
|
|
595
|
-
* By default esbuild runs the WebAssembly-based browser API in a web worker
|
|
596
|
-
* to avoid blocking the UI thread. This can be disabled by setting "worker"
|
|
597
|
-
* to false.
|
|
598
|
-
*/
|
|
599
|
-
worker?: boolean
|
|
600
|
-
}
|
|
601
|
-
|
|
602
|
-
export let version: string;
|