@voidzero-dev/vite-plus-core 0.1.17-alpha.4 → 0.1.17

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.
@@ -4,7 +4,7 @@ import { IsolatedDeclarationsOptions } from "@voidzero-dev/vite-plus-core/rolldo
4
4
 
5
5
  //#region \0rolldown/runtime.js
6
6
  //#endregion
7
- //#region ../../node_modules/.pnpm/tsdown@0.21.7_@arethetypeswrong+core@0.18.2_@tsdown+css@0.21.7_@tsdown+exe@0.21.7_@type_40fa21a6dd0aac837d14f6503ecc360a/node_modules/tsdown/dist/logger-DLaktdLm.d.mts
7
+ //#region ../../node_modules/.pnpm/tsdown@0.21.8_@arethetypeswrong+core@0.18.2_@tsdown+css@0.21.8_@tsdown+exe@0.21.8_@type_bf863151738d83584e36df49913526fa/node_modules/tsdown/dist/index-DraNj4FA.d.mts
8
8
  //#region src/utils/types.d.ts
9
9
  type Overwrite<T, U> = Omit<T, keyof U> & U;
10
10
  type Awaitable<T> = T | Promise<T>;
@@ -30,1160 +30,1461 @@ interface Logger$1 {
30
30
  clearScreen: (type: LogType) => void;
31
31
  }
32
32
  declare const globalLogger: Logger$1; //#endregion
33
- //#endregion
34
- //#region ../../node_modules/.pnpm/hookable@6.1.0/node_modules/hookable/dist/index.d.mts
35
- //#region src/types.d.ts
36
- type HookCallback = (...arguments_: any) => Promise<void> | void;
37
- type HookKeys<T> = keyof T & string;
38
- type DeprecatedHook<T> = {
39
- message?: string;
40
- to: HookKeys<T>;
41
- };
42
- type ValueOf<C> = C extends Record<any, any> ? C[keyof C] : never;
43
- type Strings<T> = Exclude<keyof T, number | symbol>;
44
- type KnownKeys<T> = keyof { [K in keyof T as string extends K ? never : number extends K ? never : K]: never };
45
- type StripGeneric<T> = Pick<T, KnownKeys<T> extends keyof T ? KnownKeys<T> : never>;
46
- type OnlyGeneric<T> = Omit<T, KnownKeys<T> extends keyof T ? KnownKeys<T> : never>;
47
- type Namespaces<T> = ValueOf<{ [key in Strings<T>]: key extends `${infer Namespace}:${string}` ? Namespace : never }>;
48
- type BareHooks<T> = ValueOf<{ [key in Strings<T>]: key extends `${string}:${string}` ? never : key }>;
49
- type HooksInNamespace<T, Namespace extends string> = ValueOf<{ [key in Strings<T>]: key extends `${Namespace}:${infer HookName}` ? HookName : never }>;
50
- type WithoutNamespace<T, Namespace extends string> = { [key in HooksInNamespace<T, Namespace>]: `${Namespace}:${key}` extends keyof T ? T[`${Namespace}:${key}`] : never };
51
- type NestedHooks<T> = (Partial<StripGeneric<T>> | Partial<OnlyGeneric<T>>) & Partial<{ [key in Namespaces<StripGeneric<T>>]: NestedHooks<WithoutNamespace<T, key>> }> & Partial<{ [key in BareHooks<StripGeneric<T>>]: T[key] }>; //#endregion
52
- //#region src/hookable.d.ts
53
- type InferCallback<HT, HN extends keyof HT> = HT[HN] extends HookCallback ? HT[HN] : never;
54
- type InferSpyEvent<HT extends Record<string, any>> = { [key in keyof HT]: {
55
- name: key;
56
- args: Parameters<HT[key]>;
57
- context: Record<string, any>;
58
- } }[keyof HT];
59
- declare class Hookable<HooksT extends Record<string, any> = Record<string, HookCallback>, HookNameT extends HookKeys<HooksT> = HookKeys<HooksT>> {
60
- private _hooks;
61
- private _before?;
62
- private _after?;
63
- private _deprecatedHooks;
64
- private _deprecatedMessages?;
65
- constructor();
66
- hook<NameT extends HookNameT>(name: NameT, function_: InferCallback<HooksT, NameT>, options?: {
67
- allowDeprecated?: boolean;
68
- }): () => void;
69
- hookOnce<NameT extends HookNameT>(name: NameT, function_: InferCallback<HooksT, NameT>): () => void;
70
- removeHook<NameT extends HookNameT>(name: NameT, function_: InferCallback<HooksT, NameT>): void;
71
- clearHook<NameT extends HookNameT>(name: NameT): void;
72
- deprecateHook<NameT extends HookNameT>(name: NameT, deprecated: HookKeys<HooksT> | DeprecatedHook<HooksT>): void;
73
- deprecateHooks(deprecatedHooks: Partial<Record<HookNameT, DeprecatedHook<HooksT>>>): void;
74
- addHooks(configHooks: NestedHooks<HooksT>): () => void;
75
- removeHooks(configHooks: NestedHooks<HooksT>): void;
76
- removeAllHooks(): void;
77
- callHook<NameT extends HookNameT>(name: NameT, ...args: Parameters<InferCallback<HooksT, NameT>>): Promise<any> | void;
78
- callHookParallel<NameT extends HookNameT>(name: NameT, ...args: Parameters<InferCallback<HooksT, NameT>>): Promise<any[]> | void;
79
- callHookWith<NameT extends HookNameT, CallFunction extends (hooks: HookCallback[], args: Parameters<InferCallback<HooksT, NameT>>, name: NameT) => any>(caller: CallFunction, name: NameT, args: Parameters<InferCallback<HooksT, NameT>>): ReturnType<CallFunction>;
80
- beforeEach(function_: (event: InferSpyEvent<HooksT>) => void): () => void;
81
- afterEach(function_: (event: InferSpyEvent<HooksT>) => void): () => void;
82
- }
83
- type CreateTask = (name?: string) => {
84
- run: (function_: () => Promise<any> | any) => Promise<any> | any;
85
- };
86
- declare global {
87
- interface Console {
88
- createTask?: CreateTask;
89
- }
90
- }
91
- /** @deprecated */
92
- //#endregion
93
- //#region ../../node_modules/.pnpm/lightningcss@1.32.0/node_modules/lightningcss/node/ast.d.ts
94
- /* eslint-disable */
95
- /**
96
- * This file was automatically generated by json-schema-to-typescript.
97
- * DO NOT MODIFY IT BY HAND. Instead, modify the source JSONSchema file,
98
- * and run json-schema-to-typescript to regenerate this file.
99
- */
100
- type String = string;
101
- /**
102
- * A CSS rule.
103
- */
104
- type Rule<D = Declaration$1, M = MediaQuery> = {
105
- type: "media";
106
- value: MediaRule<D, M>;
107
- } | {
108
- type: "import";
109
- value: ImportRule<M>;
110
- } | {
111
- type: "style";
112
- value: StyleRule<D, M>;
113
- } | {
114
- type: "keyframes";
115
- value: KeyframesRule<D>;
116
- } | {
117
- type: "font-face";
118
- value: FontFaceRule;
119
- } | {
120
- type: "font-palette-values";
121
- value: FontPaletteValuesRule;
122
- } | {
123
- type: "font-feature-values";
124
- value: FontFeatureValuesRule;
125
- } | {
126
- type: "page";
127
- value: PageRule<D>;
128
- } | {
129
- type: "supports";
130
- value: SupportsRule<D, M>;
131
- } | {
132
- type: "counter-style";
133
- value: CounterStyleRule<D>;
134
- } | {
135
- type: "namespace";
136
- value: NamespaceRule;
137
- } | {
138
- type: "moz-document";
139
- value: MozDocumentRule<D, M>;
140
- } | {
141
- type: "nesting";
142
- value: NestingRule<D, M>;
143
- } | {
144
- type: "nested-declarations";
145
- value: NestedDeclarationsRule<D>;
146
- } | {
147
- type: "viewport";
148
- value: ViewportRule<D>;
149
- } | {
150
- type: "custom-media";
151
- value: CustomMediaRule<M>;
152
- } | {
153
- type: "layer-statement";
154
- value: LayerStatementRule;
155
- } | {
156
- type: "layer-block";
157
- value: LayerBlockRule<D, M>;
158
- } | {
159
- type: "property";
160
- value: PropertyRule;
161
- } | {
162
- type: "container";
163
- value: ContainerRule<D, M>;
164
- } | {
165
- type: "scope";
166
- value: ScopeRule<D, M>;
167
- } | {
168
- type: "starting-style";
169
- value: StartingStyleRule<D, M>;
170
- } | {
171
- type: "view-transition";
172
- value: ViewTransitionRule;
173
- } | {
174
- type: "ignored";
175
- } | {
176
- type: "unknown";
177
- value: UnknownAtRule;
178
- } | {
179
- type: "custom";
180
- value: DefaultAtRule;
181
- };
182
- /**
183
- * Represents a media condition.
184
- */
185
- type MediaCondition = {
186
- type: "feature";
187
- value: QueryFeatureFor_MediaFeatureId;
188
- } | {
189
- type: "not";
190
- value: MediaCondition;
191
- } | {
33
+ //#region node_modules/.pnpm/pkg-types@2.3.0/node_modules/pkg-types/dist/index.d.mts
34
+ interface PackageJson {
192
35
  /**
193
- * The conditions for the operator.
36
+ * The name is what your thing is called.
37
+ * Some rules:
38
+ * - The name must be less than or equal to 214 characters. This includes the scope for scoped packages.
39
+ * - The name can’t start with a dot or an underscore.
40
+ * - New packages must not have uppercase letters in the name.
41
+ * - The name ends up being part of a URL, an argument on the command line, and a folder name. Therefore, the name can’t contain any non-URL-safe characters.
194
42
  */
195
- conditions: MediaCondition[];
43
+ name?: string;
196
44
  /**
197
- * The operator for the conditions.
45
+ * Version must be parseable by `node-semver`, which is bundled with npm as a dependency. (`npm install semver` to use it yourself.)
198
46
  */
199
- operator: Operator;
200
- type: "operation";
201
- } | {
202
- type: "unknown";
203
- value: TokenOrValue[];
204
- };
205
- /**
206
- * A generic media feature or container feature.
207
- */
208
- type QueryFeatureFor_MediaFeatureId = {
47
+ version?: string;
209
48
  /**
210
- * The name of the feature.
49
+ * Put a description in it. It’s a string. This helps people discover your package, as it’s listed in `npm search`.
211
50
  */
212
- name: MediaFeatureNameFor_MediaFeatureId;
213
- type: "plain";
51
+ description?: string;
214
52
  /**
215
- * The feature value.
53
+ * Put keywords in it. It’s an array of strings. This helps people discover your package as it’s listed in `npm search`.
216
54
  */
217
- value: MediaFeatureValue;
218
- } | {
55
+ keywords?: string[];
219
56
  /**
220
- * The name of the feature.
57
+ * The url to the project homepage.
221
58
  */
222
- name: MediaFeatureNameFor_MediaFeatureId;
223
- type: "boolean";
224
- } | {
59
+ homepage?: string;
225
60
  /**
226
- * The name of the feature.
61
+ * The url to your project’s issue tracker and / or the email address to which issues should be reported. These are helpful for people who encounter issues with your package.
227
62
  */
228
- name: MediaFeatureNameFor_MediaFeatureId;
63
+ bugs?: string | {
64
+ url?: string;
65
+ email?: string;
66
+ };
229
67
  /**
230
- * A comparator.
68
+ * You should specify a license for your package so that people know how they are permitted to use it, and any restrictions you’re placing on it.
231
69
  */
232
- operator: MediaFeatureComparison;
233
- type: "range";
70
+ license?: string;
234
71
  /**
235
- * The feature value.
72
+ * Specify the place where your code lives. This is helpful for people who want to contribute. If the git repo is on GitHub, then the `npm docs` command will be able to find you.
73
+ * For GitHub, GitHub gist, Bitbucket, or GitLab repositories you can use the same shortcut syntax you use for npm install:
236
74
  */
237
- value: MediaFeatureValue;
238
- } | {
75
+ repository?: string | {
76
+ type: string;
77
+ url: string;
78
+ /**
79
+ * If the `package.json` for your package is not in the root directory (for example if it is part of a monorepo), you can specify the directory in which it lives:
80
+ */
81
+ directory?: string;
82
+ };
239
83
  /**
240
- * The end value.
84
+ * The `scripts` field is a dictionary containing script commands that are run at various times in the lifecycle of your package.
241
85
  */
242
- end: MediaFeatureValue;
86
+ scripts?: PackageJsonScripts;
243
87
  /**
244
- * A comparator for the end value.
88
+ * If you set `"private": true` in your package.json, then npm will refuse to publish it.
245
89
  */
246
- endOperator: MediaFeatureComparison;
90
+ private?: boolean;
247
91
  /**
248
- * The name of the feature.
92
+ * The “author” is one person.
249
93
  */
250
- name: MediaFeatureNameFor_MediaFeatureId;
94
+ author?: PackageJsonPerson;
251
95
  /**
252
- * A start value.
96
+ * “contributors” is an array of people.
253
97
  */
254
- start: MediaFeatureValue;
98
+ contributors?: PackageJsonPerson[];
255
99
  /**
256
- * A comparator for the start value.
100
+ * An object containing a URL that provides up-to-date information
101
+ * about ways to help fund development of your package,
102
+ * a string URL, or an array of objects and string URLs
257
103
  */
258
- startOperator: MediaFeatureComparison;
259
- type: "interval";
260
- };
261
- /**
262
- * A media feature name.
263
- */
264
- type MediaFeatureNameFor_MediaFeatureId = MediaFeatureId | String | String;
265
- /**
266
- * A media query feature identifier.
267
- */
268
- type MediaFeatureId = "width" | "height" | "aspect-ratio" | "orientation" | "overflow-block" | "overflow-inline" | "horizontal-viewport-segments" | "vertical-viewport-segments" | "display-mode" | "resolution" | "scan" | "grid" | "update" | "environment-blending" | "color" | "color-index" | "monochrome" | "color-gamut" | "dynamic-range" | "inverted-colors" | "pointer" | "hover" | "any-pointer" | "any-hover" | "nav-controls" | "video-color-gamut" | "video-dynamic-range" | "scripting" | "prefers-reduced-motion" | "prefers-reduced-transparency" | "prefers-contrast" | "forced-colors" | "prefers-color-scheme" | "prefers-reduced-data" | "device-width" | "device-height" | "device-aspect-ratio" | "-webkit-device-pixel-ratio" | "-moz-device-pixel-ratio";
269
- /**
270
- * [media feature value](https://drafts.csswg.org/mediaqueries/#typedef-mf-value) within a media query.
271
- *
272
- * See [MediaFeature](MediaFeature).
273
- */
274
- type MediaFeatureValue = {
275
- type: "length";
276
- value: Length;
277
- } | {
278
- type: "number";
279
- value: number;
280
- } | {
281
- type: "integer";
282
- value: number;
283
- } | {
284
- type: "boolean";
285
- value: boolean;
286
- } | {
287
- type: "resolution";
288
- value: Resolution$1;
289
- } | {
290
- type: "ratio";
291
- value: Ratio;
292
- } | {
293
- type: "ident";
294
- value: String;
295
- } | {
296
- type: "env";
297
- value: EnvironmentVariable;
298
- };
299
- /**
300
- * A CSS [`<length>`](https://www.w3.org/TR/css-values-4/#lengths) value, with support for `calc()`.
301
- */
302
- type Length = {
303
- type: "value";
304
- value: LengthValue;
305
- } | {
306
- type: "calc";
307
- value: CalcFor_Length;
308
- };
309
- type LengthUnit = "px" | "in" | "cm" | "mm" | "q" | "pt" | "pc" | "em" | "rem" | "ex" | "rex" | "ch" | "rch" | "cap" | "rcap" | "ic" | "ric" | "lh" | "rlh" | "vw" | "lvw" | "svw" | "dvw" | "cqw" | "vh" | "lvh" | "svh" | "dvh" | "cqh" | "vi" | "svi" | "lvi" | "dvi" | "cqi" | "vb" | "svb" | "lvb" | "dvb" | "cqb" | "vmin" | "svmin" | "lvmin" | "dvmin" | "cqmin" | "vmax" | "svmax" | "lvmax" | "dvmax" | "cqmax";
310
- /**
311
- * A mathematical expression used within the [`calc()`](https://www.w3.org/TR/css-values-4/#calc-func) function.
312
- *
313
- * This type supports generic value types. Values such as [Length](super::length::Length), [Percentage](super::percentage::Percentage), [Time](super::time::Time), and [Angle](super::angle::Angle) support `calc()` expressions.
314
- */
315
- type CalcFor_Length = {
316
- type: "value";
317
- value: Length;
318
- } | {
319
- type: "number";
320
- value: number;
321
- } | {
322
- type: "sum";
104
+ funding?: PackageJsonFunding | PackageJsonFunding[];
323
105
  /**
324
- * @minItems 2
325
- * @maxItems 2
106
+ * The optional `files` field is an array of file patterns that describes the entries to be included when your package is installed as a dependency. File patterns follow a similar syntax to `.gitignore`, but reversed: including a file, directory, or glob pattern (`*`, `**\/*`, and such) will make it so that file is included in the tarball when it’s packed. Omitting the field will make it default to `["*"]`, which means it will include all files.
326
107
  */
327
- value: [CalcFor_Length, CalcFor_Length];
328
- } | {
329
- type: "product";
108
+ files?: string[];
330
109
  /**
331
- * @minItems 2
332
- * @maxItems 2
110
+ * The main field is a module ID that is the primary entry point to your program. That is, if your package is named `foo`, and a user installs it, and then does `require("foo")`, then your main module’s exports object will be returned.
111
+ * This should be a module ID relative to the root of your package folder.
112
+ * For most modules, it makes the most sense to have a main script and often not much else.
333
113
  */
334
- value: [number, CalcFor_Length];
335
- } | {
336
- type: "function";
337
- value: MathFunctionFor_Length;
338
- };
339
- /**
340
- * A CSS [math function](https://www.w3.org/TR/css-values-4/#math-function).
341
- *
342
- * Math functions may be used in most properties and values that accept numeric values, including lengths, percentages, angles, times, etc.
343
- */
344
- type MathFunctionFor_Length = {
345
- type: "calc";
346
- value: CalcFor_Length;
347
- } | {
348
- type: "min";
349
- value: CalcFor_Length[];
350
- } | {
351
- type: "max";
352
- value: CalcFor_Length[];
353
- } | {
354
- type: "clamp";
114
+ main?: string;
355
115
  /**
356
- * @minItems 3
357
- * @maxItems 3
116
+ * If your module is meant to be used client-side the browser field should be used instead of the main field. This is helpful to hint users that it might rely on primitives that aren’t available in Node.js modules. (e.g. window)
358
117
  */
359
- value: [CalcFor_Length, CalcFor_Length, CalcFor_Length];
360
- } | {
361
- type: "round";
118
+ browser?: string | Record<string, string | false>;
362
119
  /**
363
- * @minItems 3
364
- * @maxItems 3
120
+ * The `unpkg` field is used to specify the URL to a UMD module for your package. This is used by default in the unpkg.com CDN service.
365
121
  */
366
- value: [RoundingStrategy, CalcFor_Length, CalcFor_Length];
367
- } | {
368
- type: "rem";
122
+ unpkg?: string;
369
123
  /**
370
- * @minItems 2
371
- * @maxItems 2
124
+ * A map of command name to local file name. On install, npm will symlink that file into `prefix/bin` for global installs, or `./node_modules/.bin/` for local installs.
372
125
  */
373
- value: [CalcFor_Length, CalcFor_Length];
374
- } | {
375
- type: "mod";
126
+ bin?: string | Record<string, string>;
376
127
  /**
377
- * @minItems 2
378
- * @maxItems 2
128
+ * Specify either a single file or an array of filenames to put in place for the `man` program to find.
379
129
  */
380
- value: [CalcFor_Length, CalcFor_Length];
381
- } | {
382
- type: "abs";
383
- value: CalcFor_Length;
384
- } | {
385
- type: "sign";
386
- value: CalcFor_Length;
387
- } | {
388
- type: "hypot";
389
- value: CalcFor_Length[];
390
- };
391
- /**
392
- * A [rounding strategy](https://www.w3.org/TR/css-values-4/#typedef-rounding-strategy), as used in the `round()` function.
393
- */
394
- type RoundingStrategy = "nearest" | "up" | "down" | "to-zero";
395
- /**
396
- * A CSS [`<resolution>`](https://www.w3.org/TR/css-values-4/#resolution) value.
397
- */
398
- type Resolution$1 = {
399
- type: "dpi";
400
- value: number;
401
- } | {
402
- type: "dpcm";
403
- value: number;
404
- } | {
405
- type: "dppx";
406
- value: number;
407
- };
408
- /**
409
- * A CSS [`<ratio>`](https://www.w3.org/TR/css-values-4/#ratios) value, representing the ratio of two numeric values.
410
- *
411
- * @minItems 2
412
- * @maxItems 2
413
- */
414
- type Ratio = [number, number];
415
- /**
416
- * A raw CSS token, or a parsed value.
417
- */
418
- type TokenOrValue = {
419
- type: "token";
420
- value: Token$1;
421
- } | {
422
- type: "color";
423
- value: CssColor;
424
- } | {
425
- type: "unresolved-color";
426
- value: UnresolvedColor;
427
- } | {
428
- type: "url";
429
- value: Url;
430
- } | {
431
- type: "var";
432
- value: Variable;
433
- } | {
434
- type: "env";
435
- value: EnvironmentVariable;
436
- } | {
437
- type: "function";
438
- value: Function;
439
- } | {
440
- type: "length";
441
- value: LengthValue;
442
- } | {
443
- type: "angle";
444
- value: Angle;
445
- } | {
446
- type: "time";
447
- value: Time;
448
- } | {
449
- type: "resolution";
450
- value: Resolution$1;
451
- } | {
452
- type: "dashed-ident";
453
- value: String;
454
- } | {
455
- type: "animation-name";
456
- value: AnimationName;
457
- };
458
- /**
459
- * A raw CSS token.
460
- */
461
- type Token$1 = {
462
- type: "ident";
463
- value: String;
464
- } | {
465
- type: "at-keyword";
466
- value: String;
467
- } | {
468
- type: "hash";
469
- value: String;
470
- } | {
471
- type: "id-hash";
472
- value: String;
473
- } | {
474
- type: "string";
475
- value: String;
476
- } | {
477
- type: "unquoted-url";
478
- value: String;
479
- } | {
480
- type: "delim";
481
- value: string;
482
- } | {
483
- type: "number";
130
+ man?: string | string[];
484
131
  /**
485
- * The value as a float
132
+ * Dependencies are specified in a simple object that maps a package name to a version range. The version range is a string which has one or more space-separated descriptors. Dependencies can also be identified with a tarball or git URL.
486
133
  */
487
- value: number;
488
- } | {
489
- type: "percentage";
134
+ dependencies?: Record<string, string>;
490
135
  /**
491
- * The value as a float, divided by 100 so that the nominal range is 0.0 to 1.0.
136
+ * If someone is planning on downloading and using your module in their program, then they probably don’t want or need to download and build the external test or documentation framework that you use.
137
+ * In this case, it’s best to map these additional items in a `devDependencies` object.
492
138
  */
493
- value: number;
494
- } | {
495
- type: "dimension";
139
+ devDependencies?: Record<string, string>;
496
140
  /**
497
- * The unit, e.g. "px" in `12px`
141
+ * If a dependency can be used, but you would like npm to proceed if it cannot be found or fails to install, then you may put it in the `optionalDependencies` object. This is a map of package name to version or url, just like the `dependencies` object. The difference is that build failures do not cause installation to fail.
498
142
  */
499
- unit: String;
143
+ optionalDependencies?: Record<string, string>;
500
144
  /**
501
- * The value as a float
145
+ * In some cases, you want to express the compatibility of your package with a host tool or library, while not necessarily doing a `require` of this host. This is usually referred to as a plugin. Notably, your module may be exposing a specific interface, expected and specified by the host documentation.
502
146
  */
503
- value: number;
504
- } | {
505
- type: "white-space";
506
- value: String;
507
- } | {
508
- type: "comment";
509
- value: String;
510
- } | {
511
- type: "colon";
512
- } | {
513
- type: "semicolon";
514
- } | {
515
- type: "comma";
516
- } | {
517
- type: "include-match";
518
- } | {
519
- type: "dash-match";
520
- } | {
521
- type: "prefix-match";
522
- } | {
523
- type: "suffix-match";
524
- } | {
525
- type: "substring-match";
526
- } | {
527
- type: "cdo";
528
- } | {
529
- type: "cdc";
530
- } | {
531
- type: "function";
532
- value: String;
533
- } | {
534
- type: "parenthesis-block";
535
- } | {
536
- type: "square-bracket-block";
537
- } | {
538
- type: "curly-bracket-block";
539
- } | {
540
- type: "bad-url";
541
- value: String;
542
- } | {
543
- type: "bad-string";
544
- value: String;
545
- } | {
546
- type: "close-parenthesis";
547
- } | {
548
- type: "close-square-bracket";
549
- } | {
550
- type: "close-curly-bracket";
551
- };
552
- /**
553
- * A CSS [`<color>`](https://www.w3.org/TR/css-color-4/#color-type) value.
554
- *
555
- * CSS supports many different color spaces to represent colors. The most common values are stored as RGBA using a single byte per component. Less common values are stored using a `Box` to reduce the amount of memory used per color.
556
- *
557
- * Each color space is represented as a struct that implements the `From` and `Into` traits for all other color spaces, so it is possible to convert between color spaces easily. In addition, colors support [interpolation](#method.interpolate) as in the `color-mix()` function.
558
- */
559
- type CssColor = CurrentColor | RGBColor | LABColor | PredefinedColor | FloatColor | LightDark | SystemColor;
560
- type CurrentColor = {
561
- type: "currentcolor";
562
- };
563
- type RGBColor = {
564
- /**
565
- * The alpha component.
566
- */
567
- alpha: number;
568
- /**
569
- * The blue component.
570
- */
571
- b: number;
572
- /**
573
- * The green component.
574
- */
575
- g: number;
576
- /**
577
- * The red component.
578
- */
579
- r: number;
580
- type: "rgb";
581
- };
582
- /**
583
- * A color in a LAB color space, including the `lab()`, `lch()`, `oklab()`, and `oklch()` functions.
584
- */
585
- type LABColor = {
586
- /**
587
- * The a component.
588
- */
589
- a: number;
590
- /**
591
- * The alpha component.
592
- */
593
- alpha: number;
594
- /**
595
- * The b component.
596
- */
597
- b: number;
598
- /**
599
- * The lightness component.
600
- */
601
- l: number;
602
- type: "lab";
603
- } | {
147
+ peerDependencies?: Record<string, string>;
604
148
  /**
605
- * The alpha component.
149
+ * TypeScript typings, typically ending by `.d.ts`.
606
150
  */
607
- alpha: number;
151
+ types?: string;
608
152
  /**
609
- * The chroma component.
153
+ * This field is synonymous with `types`.
610
154
  */
611
- c: number;
155
+ typings?: string;
612
156
  /**
613
- * The hue component.
157
+ * Non-Standard Node.js alternate entry-point to main.
158
+ * An initial implementation for supporting CJS packages (from main), and use module for ESM modules.
614
159
  */
615
- h: number;
160
+ module?: string;
616
161
  /**
617
- * The lightness component.
162
+ * Make main entry-point be loaded as an ESM module, support "export" syntax instead of "require"
163
+ *
164
+ * Docs:
165
+ * - https://nodejs.org/docs/latest-v14.x/api/esm.html#esm_package_json_type_field
166
+ *
167
+ * @default 'commonjs'
168
+ * @since Node.js v14
618
169
  */
619
- l: number;
620
- type: "lch";
621
- } | {
170
+ type?: "module" | "commonjs";
622
171
  /**
623
- * The a component.
172
+ * Alternate and extensible alternative to "main" entry point.
173
+ *
174
+ * When using `{type: "module"}`, any ESM module file MUST end with `.mjs` extension.
175
+ *
176
+ * Docs:
177
+ * - https://nodejs.org/docs/latest-v14.x/api/esm.html#esm_exports_sugar
178
+ *
179
+ * @since Node.js v12.7
624
180
  */
625
- a: number;
181
+ exports?: PackageJsonExports;
626
182
  /**
627
- * The alpha component.
183
+ * Docs:
184
+ * - https://nodejs.org/api/packages.html#imports
628
185
  */
629
- alpha: number;
186
+ imports?: Record<string, string | Record<string, string>>;
630
187
  /**
631
- * The b component.
188
+ * The field is used to define a set of sub-packages (or workspaces) within a monorepo.
189
+ *
190
+ * This field is an array of glob patterns or an object with specific configurations for managing
191
+ * multiple packages in a single repository.
632
192
  */
633
- b: number;
193
+ workspaces?: string[] | {
194
+ /**
195
+ * Workspace package paths. Glob patterns are supported.
196
+ */
197
+ packages?: string[];
198
+ /**
199
+ * Packages to block from hoisting to the workspace root.
200
+ * Uses glob patterns to match module paths in the dependency tree.
201
+ *
202
+ * Docs:
203
+ * - https://classic.yarnpkg.com/blog/2018/02/15/nohoist/
204
+ */
205
+ nohoist?: string[];
206
+ };
634
207
  /**
635
- * The lightness component.
208
+ * The field is used to specify different TypeScript declaration files for
209
+ * different versions of TypeScript, allowing for version-specific type definitions.
636
210
  */
637
- l: number;
638
- type: "oklab";
639
- } | {
211
+ typesVersions?: Record<string, Record<string, string[]>>;
640
212
  /**
641
- * The alpha component.
213
+ * You can specify which operating systems your module will run on:
214
+ * ```json
215
+ * {
216
+ * "os": ["darwin", "linux"]
217
+ * }
218
+ * ```
219
+ * You can also block instead of allowing operating systems, just prepend the blocked os with a '!':
220
+ * ```json
221
+ * {
222
+ * "os": ["!win32"]
223
+ * }
224
+ * ```
225
+ * The host operating system is determined by `process.platform`
226
+ * It is allowed to both block and allow an item, although there isn't any good reason to do this.
642
227
  */
643
- alpha: number;
228
+ os?: string[];
644
229
  /**
645
- * The chroma component.
230
+ * If your code only runs on certain cpu architectures, you can specify which ones.
231
+ * ```json
232
+ * {
233
+ * "cpu": ["x64", "ia32"]
234
+ * }
235
+ * ```
236
+ * Like the `os` option, you can also block architectures:
237
+ * ```json
238
+ * {
239
+ * "cpu": ["!arm", "!mips"]
240
+ * }
241
+ * ```
242
+ * The host architecture is determined by `process.arch`
646
243
  */
647
- c: number;
244
+ cpu?: string[];
648
245
  /**
649
- * The hue component.
246
+ * This is a set of config values that will be used at publish-time.
650
247
  */
651
- h: number;
248
+ publishConfig?: {
249
+ /**
250
+ * The registry that will be used if the package is published.
251
+ */
252
+ registry?: string;
253
+ /**
254
+ * The tag that will be used if the package is published.
255
+ */
256
+ tag?: string;
257
+ /**
258
+ * The access level that will be used if the package is published.
259
+ */
260
+ access?: "public" | "restricted";
261
+ /**
262
+ * **pnpm-only**
263
+ *
264
+ * By default, for portability reasons, no files except those listed in
265
+ * the bin field will be marked as executable in the resulting package
266
+ * archive. The executableFiles field lets you declare additional fields
267
+ * that must have the executable flag (+x) set even if
268
+ * they aren't directly accessible through the bin field.
269
+ */
270
+ executableFiles?: string[];
271
+ /**
272
+ * **pnpm-only**
273
+ *
274
+ * You also can use the field `publishConfig.directory` to customize
275
+ * the published subdirectory relative to the current `package.json`.
276
+ *
277
+ * It is expected to have a modified version of the current package in
278
+ * the specified directory (usually using third party build tools).
279
+ */
280
+ directory?: string;
281
+ /**
282
+ * **pnpm-only**
283
+ *
284
+ * When set to `true`, the project will be symlinked from the
285
+ * `publishConfig.directory` location during local development.
286
+ * @default true
287
+ */
288
+ linkDirectory?: boolean;
289
+ } & Pick<PackageJson, "bin" | "main" | "exports" | "types" | "typings" | "module" | "browser" | "unpkg" | "typesVersions" | "os" | "cpu">;
652
290
  /**
653
- * The lightness component.
291
+ * See: https://nodejs.org/api/packages.html#packagemanager
292
+ * This field defines which package manager is expected to be used when working on the current project.
293
+ * Should be of the format: `<name>@<version>[#hash]`
654
294
  */
655
- l: number;
656
- type: "oklch";
657
- };
295
+ packageManager?: string;
296
+ [key: string]: any;
297
+ }
658
298
  /**
659
- * A color in a predefined color space, e.g. `display-p3`.
299
+ * See: https://docs.npmjs.com/cli/v11/using-npm/scripts#pre--post-scripts
660
300
  */
661
- type PredefinedColor = {
662
- /**
663
- * The alpha component.
664
- */
665
- alpha: number;
666
- /**
667
- * The blue component.
668
- */
669
- b: number;
670
- /**
671
- * The green component.
672
- */
673
- g: number;
674
- /**
675
- * The red component.
676
- */
677
- r: number;
678
- type: "srgb";
301
+ type PackageJsonScriptWithPreAndPost<S extends string> = S | `${"pre" | "post"}${S}`;
302
+ /**
303
+ * See: https://docs.npmjs.com/cli/v11/using-npm/scripts#life-cycle-operation-order
304
+ */
305
+ type PackageJsonNpmLifeCycleScripts = "dependencies" | "prepublishOnly" | PackageJsonScriptWithPreAndPost<"install" | "pack" | "prepare" | "publish" | "restart" | "start" | "stop" | "test" | "version">;
306
+ /**
307
+ * See: https://pnpm.io/scripts#lifecycle-scripts
308
+ */
309
+ type PackageJsonPnpmLifeCycleScripts = "pnpm:devPreinstall";
310
+ type PackageJsonCommonScripts = "build" | "coverage" | "deploy" | "dev" | "format" | "lint" | "preview" | "release" | "typecheck" | "watch";
311
+ type PackageJsonScriptName = PackageJsonCommonScripts | PackageJsonNpmLifeCycleScripts | PackageJsonPnpmLifeCycleScripts | (string & {});
312
+ type PackageJsonScripts = { [P in PackageJsonScriptName]?: string };
313
+ /**
314
+ * A “person” is an object with a “name” field and optionally “url” and “email”. Or you can shorten that all into a single string, and npm will parse it for you.
315
+ */
316
+ type PackageJsonPerson = string | {
317
+ name: string;
318
+ email?: string;
319
+ url?: string;
320
+ };
321
+ type PackageJsonFunding = string | {
322
+ url: string;
323
+ type?: string;
324
+ };
325
+ type PackageJsonExportKey = "." | "import" | "require" | "types" | "node" | "browser" | "default" | (string & {});
326
+ type PackageJsonExportsObject = { [P in PackageJsonExportKey]?: string | PackageJsonExportsObject | Array<string | PackageJsonExportsObject> };
327
+ type PackageJsonExports = string | PackageJsonExportsObject | Array<string | PackageJsonExportsObject>;
328
+ /**
329
+ * Defines a PackageJson structure.
330
+ * @param pkg - The `package.json` content as an object. See {@link PackageJson}.
331
+ * @returns the same `package.json` object.
332
+ */
333
+ //#endregion
334
+ //#endregion
335
+ //#region ../../node_modules/.pnpm/hookable@6.1.0/node_modules/hookable/dist/index.d.mts
336
+ //#region src/types.d.ts
337
+ type HookCallback = (...arguments_: any) => Promise<void> | void;
338
+ type HookKeys<T> = keyof T & string;
339
+ type DeprecatedHook<T> = {
340
+ message?: string;
341
+ to: HookKeys<T>;
342
+ };
343
+ type ValueOf<C> = C extends Record<any, any> ? C[keyof C] : never;
344
+ type Strings<T> = Exclude<keyof T, number | symbol>;
345
+ type KnownKeys<T> = keyof { [K in keyof T as string extends K ? never : number extends K ? never : K]: never };
346
+ type StripGeneric<T> = Pick<T, KnownKeys<T> extends keyof T ? KnownKeys<T> : never>;
347
+ type OnlyGeneric<T> = Omit<T, KnownKeys<T> extends keyof T ? KnownKeys<T> : never>;
348
+ type Namespaces<T> = ValueOf<{ [key in Strings<T>]: key extends `${infer Namespace}:${string}` ? Namespace : never }>;
349
+ type BareHooks<T> = ValueOf<{ [key in Strings<T>]: key extends `${string}:${string}` ? never : key }>;
350
+ type HooksInNamespace<T, Namespace extends string> = ValueOf<{ [key in Strings<T>]: key extends `${Namespace}:${infer HookName}` ? HookName : never }>;
351
+ type WithoutNamespace<T, Namespace extends string> = { [key in HooksInNamespace<T, Namespace>]: `${Namespace}:${key}` extends keyof T ? T[`${Namespace}:${key}`] : never };
352
+ type NestedHooks<T> = (Partial<StripGeneric<T>> | Partial<OnlyGeneric<T>>) & Partial<{ [key in Namespaces<StripGeneric<T>>]: NestedHooks<WithoutNamespace<T, key>> }> & Partial<{ [key in BareHooks<StripGeneric<T>>]: T[key] }>; //#endregion
353
+ //#region src/hookable.d.ts
354
+ type InferCallback<HT, HN extends keyof HT> = HT[HN] extends HookCallback ? HT[HN] : never;
355
+ type InferSpyEvent<HT extends Record<string, any>> = { [key in keyof HT]: {
356
+ name: key;
357
+ args: Parameters<HT[key]>;
358
+ context: Record<string, any>;
359
+ } }[keyof HT];
360
+ declare class Hookable<HooksT extends Record<string, any> = Record<string, HookCallback>, HookNameT extends HookKeys<HooksT> = HookKeys<HooksT>> {
361
+ private _hooks;
362
+ private _before?;
363
+ private _after?;
364
+ private _deprecatedHooks;
365
+ private _deprecatedMessages?;
366
+ constructor();
367
+ hook<NameT extends HookNameT>(name: NameT, function_: InferCallback<HooksT, NameT>, options?: {
368
+ allowDeprecated?: boolean;
369
+ }): () => void;
370
+ hookOnce<NameT extends HookNameT>(name: NameT, function_: InferCallback<HooksT, NameT>): () => void;
371
+ removeHook<NameT extends HookNameT>(name: NameT, function_: InferCallback<HooksT, NameT>): void;
372
+ clearHook<NameT extends HookNameT>(name: NameT): void;
373
+ deprecateHook<NameT extends HookNameT>(name: NameT, deprecated: HookKeys<HooksT> | DeprecatedHook<HooksT>): void;
374
+ deprecateHooks(deprecatedHooks: Partial<Record<HookNameT, DeprecatedHook<HooksT>>>): void;
375
+ addHooks(configHooks: NestedHooks<HooksT>): () => void;
376
+ removeHooks(configHooks: NestedHooks<HooksT>): void;
377
+ removeAllHooks(): void;
378
+ callHook<NameT extends HookNameT>(name: NameT, ...args: Parameters<InferCallback<HooksT, NameT>>): Promise<any> | void;
379
+ callHookParallel<NameT extends HookNameT>(name: NameT, ...args: Parameters<InferCallback<HooksT, NameT>>): Promise<any[]> | void;
380
+ callHookWith<NameT extends HookNameT, CallFunction extends (hooks: HookCallback[], args: Parameters<InferCallback<HooksT, NameT>>, name: NameT) => any>(caller: CallFunction, name: NameT, args: Parameters<InferCallback<HooksT, NameT>>): ReturnType<CallFunction>;
381
+ beforeEach(function_: (event: InferSpyEvent<HooksT>) => void): () => void;
382
+ afterEach(function_: (event: InferSpyEvent<HooksT>) => void): () => void;
383
+ }
384
+ type CreateTask = (name?: string) => {
385
+ run: (function_: () => Promise<any> | any) => Promise<any> | any;
386
+ };
387
+ declare global {
388
+ interface Console {
389
+ createTask?: CreateTask;
390
+ }
391
+ }
392
+ /** @deprecated */
393
+ //#endregion
394
+ //#region ../../node_modules/.pnpm/lightningcss@1.32.0/node_modules/lightningcss/node/ast.d.ts
395
+ /* eslint-disable */
396
+ /**
397
+ * This file was automatically generated by json-schema-to-typescript.
398
+ * DO NOT MODIFY IT BY HAND. Instead, modify the source JSONSchema file,
399
+ * and run json-schema-to-typescript to regenerate this file.
400
+ */
401
+ type String = string;
402
+ /**
403
+ * A CSS rule.
404
+ */
405
+ type Rule<D = Declaration$1, M = MediaQuery> = {
406
+ type: "media";
407
+ value: MediaRule<D, M>;
408
+ } | {
409
+ type: "import";
410
+ value: ImportRule<M>;
411
+ } | {
412
+ type: "style";
413
+ value: StyleRule<D, M>;
414
+ } | {
415
+ type: "keyframes";
416
+ value: KeyframesRule<D>;
417
+ } | {
418
+ type: "font-face";
419
+ value: FontFaceRule;
420
+ } | {
421
+ type: "font-palette-values";
422
+ value: FontPaletteValuesRule;
423
+ } | {
424
+ type: "font-feature-values";
425
+ value: FontFeatureValuesRule;
426
+ } | {
427
+ type: "page";
428
+ value: PageRule<D>;
429
+ } | {
430
+ type: "supports";
431
+ value: SupportsRule<D, M>;
432
+ } | {
433
+ type: "counter-style";
434
+ value: CounterStyleRule<D>;
435
+ } | {
436
+ type: "namespace";
437
+ value: NamespaceRule;
438
+ } | {
439
+ type: "moz-document";
440
+ value: MozDocumentRule<D, M>;
441
+ } | {
442
+ type: "nesting";
443
+ value: NestingRule<D, M>;
444
+ } | {
445
+ type: "nested-declarations";
446
+ value: NestedDeclarationsRule<D>;
447
+ } | {
448
+ type: "viewport";
449
+ value: ViewportRule<D>;
450
+ } | {
451
+ type: "custom-media";
452
+ value: CustomMediaRule<M>;
453
+ } | {
454
+ type: "layer-statement";
455
+ value: LayerStatementRule;
456
+ } | {
457
+ type: "layer-block";
458
+ value: LayerBlockRule<D, M>;
459
+ } | {
460
+ type: "property";
461
+ value: PropertyRule;
462
+ } | {
463
+ type: "container";
464
+ value: ContainerRule<D, M>;
465
+ } | {
466
+ type: "scope";
467
+ value: ScopeRule<D, M>;
468
+ } | {
469
+ type: "starting-style";
470
+ value: StartingStyleRule<D, M>;
471
+ } | {
472
+ type: "view-transition";
473
+ value: ViewTransitionRule;
474
+ } | {
475
+ type: "ignored";
476
+ } | {
477
+ type: "unknown";
478
+ value: UnknownAtRule;
479
+ } | {
480
+ type: "custom";
481
+ value: DefaultAtRule;
482
+ };
483
+ /**
484
+ * Represents a media condition.
485
+ */
486
+ type MediaCondition = {
487
+ type: "feature";
488
+ value: QueryFeatureFor_MediaFeatureId;
489
+ } | {
490
+ type: "not";
491
+ value: MediaCondition;
679
492
  } | {
680
493
  /**
681
- * The alpha component.
494
+ * The conditions for the operator.
682
495
  */
683
- alpha: number;
496
+ conditions: MediaCondition[];
684
497
  /**
685
- * The blue component.
498
+ * The operator for the conditions.
686
499
  */
687
- b: number;
500
+ operator: Operator;
501
+ type: "operation";
502
+ } | {
503
+ type: "unknown";
504
+ value: TokenOrValue[];
505
+ };
506
+ /**
507
+ * A generic media feature or container feature.
508
+ */
509
+ type QueryFeatureFor_MediaFeatureId = {
688
510
  /**
689
- * The green component.
511
+ * The name of the feature.
690
512
  */
691
- g: number;
513
+ name: MediaFeatureNameFor_MediaFeatureId;
514
+ type: "plain";
692
515
  /**
693
- * The red component.
516
+ * The feature value.
694
517
  */
695
- r: number;
696
- type: "srgb-linear";
518
+ value: MediaFeatureValue;
697
519
  } | {
698
520
  /**
699
- * The alpha component.
521
+ * The name of the feature.
700
522
  */
701
- alpha: number;
523
+ name: MediaFeatureNameFor_MediaFeatureId;
524
+ type: "boolean";
525
+ } | {
702
526
  /**
703
- * The blue component.
527
+ * The name of the feature.
704
528
  */
705
- b: number;
529
+ name: MediaFeatureNameFor_MediaFeatureId;
706
530
  /**
707
- * The green component.
531
+ * A comparator.
708
532
  */
709
- g: number;
533
+ operator: MediaFeatureComparison;
534
+ type: "range";
710
535
  /**
711
- * The red component.
536
+ * The feature value.
712
537
  */
713
- r: number;
714
- type: "display-p3";
538
+ value: MediaFeatureValue;
715
539
  } | {
716
540
  /**
717
- * The alpha component.
541
+ * The end value.
718
542
  */
719
- alpha: number;
543
+ end: MediaFeatureValue;
720
544
  /**
721
- * The blue component.
545
+ * A comparator for the end value.
722
546
  */
723
- b: number;
547
+ endOperator: MediaFeatureComparison;
724
548
  /**
725
- * The green component.
549
+ * The name of the feature.
726
550
  */
727
- g: number;
551
+ name: MediaFeatureNameFor_MediaFeatureId;
728
552
  /**
729
- * The red component.
553
+ * A start value.
730
554
  */
731
- r: number;
732
- type: "a98-rgb";
733
- } | {
734
- /**
735
- * The alpha component.
736
- */
737
- alpha: number;
738
- /**
739
- * The blue component.
740
- */
741
- b: number;
742
- /**
743
- * The green component.
744
- */
745
- g: number;
555
+ start: MediaFeatureValue;
746
556
  /**
747
- * The red component.
557
+ * A comparator for the start value.
748
558
  */
749
- r: number;
750
- type: "prophoto-rgb";
559
+ startOperator: MediaFeatureComparison;
560
+ type: "interval";
561
+ };
562
+ /**
563
+ * A media feature name.
564
+ */
565
+ type MediaFeatureNameFor_MediaFeatureId = MediaFeatureId | String | String;
566
+ /**
567
+ * A media query feature identifier.
568
+ */
569
+ type MediaFeatureId = "width" | "height" | "aspect-ratio" | "orientation" | "overflow-block" | "overflow-inline" | "horizontal-viewport-segments" | "vertical-viewport-segments" | "display-mode" | "resolution" | "scan" | "grid" | "update" | "environment-blending" | "color" | "color-index" | "monochrome" | "color-gamut" | "dynamic-range" | "inverted-colors" | "pointer" | "hover" | "any-pointer" | "any-hover" | "nav-controls" | "video-color-gamut" | "video-dynamic-range" | "scripting" | "prefers-reduced-motion" | "prefers-reduced-transparency" | "prefers-contrast" | "forced-colors" | "prefers-color-scheme" | "prefers-reduced-data" | "device-width" | "device-height" | "device-aspect-ratio" | "-webkit-device-pixel-ratio" | "-moz-device-pixel-ratio";
570
+ /**
571
+ * [media feature value](https://drafts.csswg.org/mediaqueries/#typedef-mf-value) within a media query.
572
+ *
573
+ * See [MediaFeature](MediaFeature).
574
+ */
575
+ type MediaFeatureValue = {
576
+ type: "length";
577
+ value: Length;
751
578
  } | {
752
- /**
753
- * The alpha component.
754
- */
755
- alpha: number;
756
- /**
757
- * The blue component.
758
- */
759
- b: number;
760
- /**
761
- * The green component.
762
- */
763
- g: number;
764
- /**
765
- * The red component.
766
- */
767
- r: number;
768
- type: "rec2020";
579
+ type: "number";
580
+ value: number;
769
581
  } | {
770
- /**
771
- * The alpha component.
772
- */
773
- alpha: number;
774
- type: "xyz-d50";
775
- /**
776
- * The x component.
777
- */
778
- x: number;
779
- /**
780
- * The y component.
781
- */
782
- y: number;
783
- /**
784
- * The z component.
785
- */
786
- z: number;
582
+ type: "integer";
583
+ value: number;
787
584
  } | {
788
- /**
789
- * The alpha component.
790
- */
791
- alpha: number;
792
- type: "xyz-d65";
793
- /**
794
- * The x component.
795
- */
796
- x: number;
797
- /**
798
- * The y component.
799
- */
800
- y: number;
801
- /**
802
- * The z component.
803
- */
804
- z: number;
585
+ type: "boolean";
586
+ value: boolean;
587
+ } | {
588
+ type: "resolution";
589
+ value: Resolution$1;
590
+ } | {
591
+ type: "ratio";
592
+ value: Ratio;
593
+ } | {
594
+ type: "ident";
595
+ value: String;
596
+ } | {
597
+ type: "env";
598
+ value: EnvironmentVariable;
805
599
  };
806
600
  /**
807
- * A floating point representation of color types that are usually stored as RGBA. These are used when there are any `none` components, which are represented as NaN.
601
+ * A CSS [`<length>`](https://www.w3.org/TR/css-values-4/#lengths) value, with support for `calc()`.
808
602
  */
809
- type FloatColor = {
810
- /**
811
- * The alpha component.
812
- */
813
- alpha: number;
814
- /**
815
- * The blue component.
816
- */
817
- b: number;
818
- /**
819
- * The green component.
820
- */
821
- g: number;
822
- /**
823
- * The red component.
824
- */
825
- r: number;
826
- type: "rgb";
603
+ type Length = {
604
+ type: "value";
605
+ value: LengthValue;
827
606
  } | {
607
+ type: "calc";
608
+ value: CalcFor_Length;
609
+ };
610
+ type LengthUnit = "px" | "in" | "cm" | "mm" | "q" | "pt" | "pc" | "em" | "rem" | "ex" | "rex" | "ch" | "rch" | "cap" | "rcap" | "ic" | "ric" | "lh" | "rlh" | "vw" | "lvw" | "svw" | "dvw" | "cqw" | "vh" | "lvh" | "svh" | "dvh" | "cqh" | "vi" | "svi" | "lvi" | "dvi" | "cqi" | "vb" | "svb" | "lvb" | "dvb" | "cqb" | "vmin" | "svmin" | "lvmin" | "dvmin" | "cqmin" | "vmax" | "svmax" | "lvmax" | "dvmax" | "cqmax";
611
+ /**
612
+ * A mathematical expression used within the [`calc()`](https://www.w3.org/TR/css-values-4/#calc-func) function.
613
+ *
614
+ * This type supports generic value types. Values such as [Length](super::length::Length), [Percentage](super::percentage::Percentage), [Time](super::time::Time), and [Angle](super::angle::Angle) support `calc()` expressions.
615
+ */
616
+ type CalcFor_Length = {
617
+ type: "value";
618
+ value: Length;
619
+ } | {
620
+ type: "number";
621
+ value: number;
622
+ } | {
623
+ type: "sum";
828
624
  /**
829
- * The alpha component.
830
- */
831
- alpha: number;
832
- /**
833
- * The hue component.
834
- */
835
- h: number;
836
- /**
837
- * The lightness component.
625
+ * @minItems 2
626
+ * @maxItems 2
838
627
  */
839
- l: number;
628
+ value: [CalcFor_Length, CalcFor_Length];
629
+ } | {
630
+ type: "product";
840
631
  /**
841
- * The saturation component.
632
+ * @minItems 2
633
+ * @maxItems 2
842
634
  */
843
- s: number;
844
- type: "hsl";
635
+ value: [number, CalcFor_Length];
636
+ } | {
637
+ type: "function";
638
+ value: MathFunctionFor_Length;
639
+ };
640
+ /**
641
+ * A CSS [math function](https://www.w3.org/TR/css-values-4/#math-function).
642
+ *
643
+ * Math functions may be used in most properties and values that accept numeric values, including lengths, percentages, angles, times, etc.
644
+ */
645
+ type MathFunctionFor_Length = {
646
+ type: "calc";
647
+ value: CalcFor_Length;
648
+ } | {
649
+ type: "min";
650
+ value: CalcFor_Length[];
651
+ } | {
652
+ type: "max";
653
+ value: CalcFor_Length[];
845
654
  } | {
655
+ type: "clamp";
846
656
  /**
847
- * The alpha component.
657
+ * @minItems 3
658
+ * @maxItems 3
848
659
  */
849
- alpha: number;
660
+ value: [CalcFor_Length, CalcFor_Length, CalcFor_Length];
661
+ } | {
662
+ type: "round";
850
663
  /**
851
- * The blackness component.
664
+ * @minItems 3
665
+ * @maxItems 3
852
666
  */
853
- b: number;
667
+ value: [RoundingStrategy, CalcFor_Length, CalcFor_Length];
668
+ } | {
669
+ type: "rem";
854
670
  /**
855
- * The hue component.
671
+ * @minItems 2
672
+ * @maxItems 2
856
673
  */
857
- h: number;
858
- type: "hwb";
674
+ value: [CalcFor_Length, CalcFor_Length];
675
+ } | {
676
+ type: "mod";
859
677
  /**
860
- * The whiteness component.
678
+ * @minItems 2
679
+ * @maxItems 2
861
680
  */
862
- w: number;
863
- };
864
- type LightDark = {
865
- dark: CssColor;
866
- light: CssColor;
867
- type: "light-dark";
681
+ value: [CalcFor_Length, CalcFor_Length];
682
+ } | {
683
+ type: "abs";
684
+ value: CalcFor_Length;
685
+ } | {
686
+ type: "sign";
687
+ value: CalcFor_Length;
688
+ } | {
689
+ type: "hypot";
690
+ value: CalcFor_Length[];
868
691
  };
869
692
  /**
870
- * A CSS [system color](https://drafts.csswg.org/css-color/#css-system-colors) keyword.
693
+ * A [rounding strategy](https://www.w3.org/TR/css-values-4/#typedef-rounding-strategy), as used in the `round()` function.
871
694
  */
872
- type SystemColor = "accentcolor" | "accentcolortext" | "activetext" | "buttonborder" | "buttonface" | "buttontext" | "canvas" | "canvastext" | "field" | "fieldtext" | "graytext" | "highlight" | "highlighttext" | "linktext" | "mark" | "marktext" | "selecteditem" | "selecteditemtext" | "visitedtext" | "activeborder" | "activecaption" | "appworkspace" | "background" | "buttonhighlight" | "buttonshadow" | "captiontext" | "inactiveborder" | "inactivecaption" | "inactivecaptiontext" | "infobackground" | "infotext" | "menu" | "menutext" | "scrollbar" | "threeddarkshadow" | "threedface" | "threedhighlight" | "threedlightshadow" | "threedshadow" | "window" | "windowframe" | "windowtext";
695
+ type RoundingStrategy = "nearest" | "up" | "down" | "to-zero";
873
696
  /**
874
- * A color value with an unresolved alpha value (e.g. a variable). These can be converted from the modern slash syntax to older comma syntax. This can only be done when the only unresolved component is the alpha since variables can resolve to multiple tokens.
697
+ * A CSS [`<resolution>`](https://www.w3.org/TR/css-values-4/#resolution) value.
875
698
  */
876
- type UnresolvedColor = {
877
- /**
878
- * The unresolved alpha component.
879
- */
880
- alpha: TokenOrValue[];
881
- /**
882
- * The blue component.
883
- */
884
- b: number;
885
- /**
886
- * The green component.
887
- */
888
- g: number;
889
- /**
890
- * The red component.
891
- */
892
- r: number;
893
- type: "rgb";
699
+ type Resolution$1 = {
700
+ type: "dpi";
701
+ value: number;
894
702
  } | {
895
- /**
896
- * The unresolved alpha component.
897
- */
898
- alpha: TokenOrValue[];
899
- /**
900
- * The hue component.
901
- */
902
- h: number;
903
- /**
904
- * The lightness component.
905
- */
906
- l: number;
907
- /**
908
- * The saturation component.
909
- */
910
- s: number;
911
- type: "hsl";
703
+ type: "dpcm";
704
+ value: number;
912
705
  } | {
913
- /**
914
- * The dark value.
915
- */
916
- dark: TokenOrValue[];
917
- /**
918
- * The light value.
919
- */
920
- light: TokenOrValue[];
921
- type: "light-dark";
706
+ type: "dppx";
707
+ value: number;
922
708
  };
923
709
  /**
924
- * Defines where the class names referenced in the `composes` property are located.
710
+ * A CSS [`<ratio>`](https://www.w3.org/TR/css-values-4/#ratios) value, representing the ratio of two numeric values.
925
711
  *
926
- * See [Composes](Composes).
712
+ * @minItems 2
713
+ * @maxItems 2
927
714
  */
928
- type Specifier = {
929
- type: "global";
930
- } | {
931
- type: "file";
932
- value: String;
933
- } | {
934
- type: "source-index";
935
- value: number;
936
- };
715
+ type Ratio = [number, number];
937
716
  /**
938
- * A CSS [`<angle>`](https://www.w3.org/TR/css-values-4/#angles) value.
939
- *
940
- * Angles may be explicit or computed by `calc()`, but are always stored and serialized as their computed value.
717
+ * A raw CSS token, or a parsed value.
941
718
  */
942
- type Angle = {
943
- type: "deg";
944
- value: number;
719
+ type TokenOrValue = {
720
+ type: "token";
721
+ value: Token$1;
945
722
  } | {
946
- type: "rad";
947
- value: number;
723
+ type: "color";
724
+ value: CssColor;
948
725
  } | {
949
- type: "grad";
950
- value: number;
726
+ type: "unresolved-color";
727
+ value: UnresolvedColor;
951
728
  } | {
952
- type: "turn";
953
- value: number;
954
- };
955
- /**
956
- * A CSS [`<time>`](https://www.w3.org/TR/css-values-4/#time) value, in either seconds or milliseconds.
957
- *
958
- * Time values may be explicit or computed by `calc()`, but are always stored and serialized as their computed value.
959
- */
960
- type Time = {
961
- type: "seconds";
962
- value: number;
729
+ type: "url";
730
+ value: Url;
963
731
  } | {
964
- type: "milliseconds";
965
- value: number;
966
- };
967
- /**
968
- * A value for the [animation-name](https://drafts.csswg.org/css-animations/#animation-name) property.
969
- */
970
- type AnimationName = {
971
- type: "none";
732
+ type: "var";
733
+ value: Variable;
972
734
  } | {
973
- type: "ident";
974
- value: String;
735
+ type: "env";
736
+ value: EnvironmentVariable;
975
737
  } | {
976
- type: "string";
977
- value: String;
978
- };
979
- /**
980
- * A CSS environment variable name.
981
- */
982
- type EnvironmentVariableName = {
983
- type: "ua";
984
- value: UAEnvironmentVariable;
738
+ type: "function";
739
+ value: Function;
985
740
  } | {
986
- /**
987
- * CSS modules extension: the filename where the variable is defined. Only enabled when the CSS modules `dashed_idents` option is turned on.
988
- */
989
- from?: Specifier | null;
990
- /**
991
- * The referenced identifier.
992
- */
993
- ident: String;
994
- type: "custom";
741
+ type: "length";
742
+ value: LengthValue;
995
743
  } | {
996
- type: "unknown";
997
- value: String;
998
- };
999
- /**
1000
- * A UA-defined environment variable name.
1001
- */
1002
- type UAEnvironmentVariable = "safe-area-inset-top" | "safe-area-inset-right" | "safe-area-inset-bottom" | "safe-area-inset-left" | "viewport-segment-width" | "viewport-segment-height" | "viewport-segment-top" | "viewport-segment-left" | "viewport-segment-bottom" | "viewport-segment-right";
1003
- /**
1004
- * A [comparator](https://drafts.csswg.org/mediaqueries/#typedef-mf-comparison) within a media query.
1005
- */
1006
- type MediaFeatureComparison = "equal" | "greater-than" | "greater-than-equal" | "less-than" | "less-than-equal";
1007
- /**
1008
- * A binary `and` or `or` operator.
1009
- */
1010
- type Operator = "and" | "or";
1011
- type MediaType = string;
1012
- /**
1013
- * A [media query qualifier](https://drafts.csswg.org/mediaqueries/#mq-prefix).
1014
- */
1015
- type Qualifier = "only" | "not";
1016
- /**
1017
- * A [`<supports-condition>`](https://drafts.csswg.org/css-conditional-3/#typedef-supports-condition), as used in the `@supports` and `@import` rules.
1018
- */
1019
- type SupportsCondition = {
1020
- type: "not";
1021
- value: SupportsCondition;
744
+ type: "angle";
745
+ value: Angle;
1022
746
  } | {
1023
- type: "and";
1024
- value: SupportsCondition[];
747
+ type: "time";
748
+ value: Time;
1025
749
  } | {
1026
- type: "or";
1027
- value: SupportsCondition[];
750
+ type: "resolution";
751
+ value: Resolution$1;
1028
752
  } | {
1029
- /**
1030
- * The property id for the declaration.
1031
- */
1032
- propertyId: PropertyId;
1033
- type: "declaration";
1034
- /**
1035
- * The raw value of the declaration.
1036
- */
753
+ type: "dashed-ident";
1037
754
  value: String;
1038
755
  } | {
1039
- type: "selector";
756
+ type: "animation-name";
757
+ value: AnimationName;
758
+ };
759
+ /**
760
+ * A raw CSS token.
761
+ */
762
+ type Token$1 = {
763
+ type: "ident";
1040
764
  value: String;
1041
765
  } | {
1042
- type: "unknown";
766
+ type: "at-keyword";
1043
767
  value: String;
1044
- };
1045
- type PropertyId = {
1046
- property: "background-color";
1047
- } | {
1048
- property: "background-image";
1049
768
  } | {
1050
- property: "background-position-x";
769
+ type: "hash";
770
+ value: String;
1051
771
  } | {
1052
- property: "background-position-y";
772
+ type: "id-hash";
773
+ value: String;
1053
774
  } | {
1054
- property: "background-position";
775
+ type: "string";
776
+ value: String;
1055
777
  } | {
1056
- property: "background-size";
778
+ type: "unquoted-url";
779
+ value: String;
1057
780
  } | {
1058
- property: "background-repeat";
781
+ type: "delim";
782
+ value: string;
1059
783
  } | {
1060
- property: "background-attachment";
784
+ type: "number";
785
+ /**
786
+ * The value as a float
787
+ */
788
+ value: number;
1061
789
  } | {
1062
- property: "background-clip";
1063
- vendorPrefix: VendorPrefix;
790
+ type: "percentage";
791
+ /**
792
+ * The value as a float, divided by 100 so that the nominal range is 0.0 to 1.0.
793
+ */
794
+ value: number;
1064
795
  } | {
1065
- property: "background-origin";
796
+ type: "dimension";
797
+ /**
798
+ * The unit, e.g. "px" in `12px`
799
+ */
800
+ unit: String;
801
+ /**
802
+ * The value as a float
803
+ */
804
+ value: number;
1066
805
  } | {
1067
- property: "background";
806
+ type: "white-space";
807
+ value: String;
1068
808
  } | {
1069
- property: "box-shadow";
1070
- vendorPrefix: VendorPrefix;
809
+ type: "comment";
810
+ value: String;
1071
811
  } | {
1072
- property: "opacity";
812
+ type: "colon";
1073
813
  } | {
1074
- property: "color";
814
+ type: "semicolon";
1075
815
  } | {
1076
- property: "display";
816
+ type: "comma";
1077
817
  } | {
1078
- property: "visibility";
818
+ type: "include-match";
1079
819
  } | {
1080
- property: "width";
820
+ type: "dash-match";
1081
821
  } | {
1082
- property: "height";
822
+ type: "prefix-match";
1083
823
  } | {
1084
- property: "min-width";
824
+ type: "suffix-match";
1085
825
  } | {
1086
- property: "min-height";
826
+ type: "substring-match";
1087
827
  } | {
1088
- property: "max-width";
828
+ type: "cdo";
1089
829
  } | {
1090
- property: "max-height";
830
+ type: "cdc";
1091
831
  } | {
1092
- property: "block-size";
832
+ type: "function";
833
+ value: String;
1093
834
  } | {
1094
- property: "inline-size";
835
+ type: "parenthesis-block";
1095
836
  } | {
1096
- property: "min-block-size";
837
+ type: "square-bracket-block";
1097
838
  } | {
1098
- property: "min-inline-size";
839
+ type: "curly-bracket-block";
1099
840
  } | {
1100
- property: "max-block-size";
841
+ type: "bad-url";
842
+ value: String;
1101
843
  } | {
1102
- property: "max-inline-size";
844
+ type: "bad-string";
845
+ value: String;
1103
846
  } | {
1104
- property: "box-sizing";
1105
- vendorPrefix: VendorPrefix;
847
+ type: "close-parenthesis";
1106
848
  } | {
1107
- property: "aspect-ratio";
849
+ type: "close-square-bracket";
1108
850
  } | {
1109
- property: "overflow";
1110
- } | {
1111
- property: "overflow-x";
1112
- } | {
1113
- property: "overflow-y";
1114
- } | {
1115
- property: "text-overflow";
1116
- vendorPrefix: VendorPrefix;
1117
- } | {
1118
- property: "position";
1119
- } | {
1120
- property: "top";
1121
- } | {
1122
- property: "bottom";
1123
- } | {
1124
- property: "left";
1125
- } | {
1126
- property: "right";
851
+ type: "close-curly-bracket";
852
+ };
853
+ /**
854
+ * A CSS [`<color>`](https://www.w3.org/TR/css-color-4/#color-type) value.
855
+ *
856
+ * CSS supports many different color spaces to represent colors. The most common values are stored as RGBA using a single byte per component. Less common values are stored using a `Box` to reduce the amount of memory used per color.
857
+ *
858
+ * Each color space is represented as a struct that implements the `From` and `Into` traits for all other color spaces, so it is possible to convert between color spaces easily. In addition, colors support [interpolation](#method.interpolate) as in the `color-mix()` function.
859
+ */
860
+ type CssColor = CurrentColor | RGBColor | LABColor | PredefinedColor | FloatColor | LightDark | SystemColor;
861
+ type CurrentColor = {
862
+ type: "currentcolor";
863
+ };
864
+ type RGBColor = {
865
+ /**
866
+ * The alpha component.
867
+ */
868
+ alpha: number;
869
+ /**
870
+ * The blue component.
871
+ */
872
+ b: number;
873
+ /**
874
+ * The green component.
875
+ */
876
+ g: number;
877
+ /**
878
+ * The red component.
879
+ */
880
+ r: number;
881
+ type: "rgb";
882
+ };
883
+ /**
884
+ * A color in a LAB color space, including the `lab()`, `lch()`, `oklab()`, and `oklch()` functions.
885
+ */
886
+ type LABColor = {
887
+ /**
888
+ * The a component.
889
+ */
890
+ a: number;
891
+ /**
892
+ * The alpha component.
893
+ */
894
+ alpha: number;
895
+ /**
896
+ * The b component.
897
+ */
898
+ b: number;
899
+ /**
900
+ * The lightness component.
901
+ */
902
+ l: number;
903
+ type: "lab";
1127
904
  } | {
1128
- property: "inset-block-start";
905
+ /**
906
+ * The alpha component.
907
+ */
908
+ alpha: number;
909
+ /**
910
+ * The chroma component.
911
+ */
912
+ c: number;
913
+ /**
914
+ * The hue component.
915
+ */
916
+ h: number;
917
+ /**
918
+ * The lightness component.
919
+ */
920
+ l: number;
921
+ type: "lch";
1129
922
  } | {
1130
- property: "inset-block-end";
923
+ /**
924
+ * The a component.
925
+ */
926
+ a: number;
927
+ /**
928
+ * The alpha component.
929
+ */
930
+ alpha: number;
931
+ /**
932
+ * The b component.
933
+ */
934
+ b: number;
935
+ /**
936
+ * The lightness component.
937
+ */
938
+ l: number;
939
+ type: "oklab";
1131
940
  } | {
1132
- property: "inset-inline-start";
941
+ /**
942
+ * The alpha component.
943
+ */
944
+ alpha: number;
945
+ /**
946
+ * The chroma component.
947
+ */
948
+ c: number;
949
+ /**
950
+ * The hue component.
951
+ */
952
+ h: number;
953
+ /**
954
+ * The lightness component.
955
+ */
956
+ l: number;
957
+ type: "oklch";
958
+ };
959
+ /**
960
+ * A color in a predefined color space, e.g. `display-p3`.
961
+ */
962
+ type PredefinedColor = {
963
+ /**
964
+ * The alpha component.
965
+ */
966
+ alpha: number;
967
+ /**
968
+ * The blue component.
969
+ */
970
+ b: number;
971
+ /**
972
+ * The green component.
973
+ */
974
+ g: number;
975
+ /**
976
+ * The red component.
977
+ */
978
+ r: number;
979
+ type: "srgb";
1133
980
  } | {
1134
- property: "inset-inline-end";
981
+ /**
982
+ * The alpha component.
983
+ */
984
+ alpha: number;
985
+ /**
986
+ * The blue component.
987
+ */
988
+ b: number;
989
+ /**
990
+ * The green component.
991
+ */
992
+ g: number;
993
+ /**
994
+ * The red component.
995
+ */
996
+ r: number;
997
+ type: "srgb-linear";
1135
998
  } | {
1136
- property: "inset-block";
999
+ /**
1000
+ * The alpha component.
1001
+ */
1002
+ alpha: number;
1003
+ /**
1004
+ * The blue component.
1005
+ */
1006
+ b: number;
1007
+ /**
1008
+ * The green component.
1009
+ */
1010
+ g: number;
1011
+ /**
1012
+ * The red component.
1013
+ */
1014
+ r: number;
1015
+ type: "display-p3";
1137
1016
  } | {
1138
- property: "inset-inline";
1017
+ /**
1018
+ * The alpha component.
1019
+ */
1020
+ alpha: number;
1021
+ /**
1022
+ * The blue component.
1023
+ */
1024
+ b: number;
1025
+ /**
1026
+ * The green component.
1027
+ */
1028
+ g: number;
1029
+ /**
1030
+ * The red component.
1031
+ */
1032
+ r: number;
1033
+ type: "a98-rgb";
1139
1034
  } | {
1140
- property: "inset";
1035
+ /**
1036
+ * The alpha component.
1037
+ */
1038
+ alpha: number;
1039
+ /**
1040
+ * The blue component.
1041
+ */
1042
+ b: number;
1043
+ /**
1044
+ * The green component.
1045
+ */
1046
+ g: number;
1047
+ /**
1048
+ * The red component.
1049
+ */
1050
+ r: number;
1051
+ type: "prophoto-rgb";
1141
1052
  } | {
1142
- property: "border-spacing";
1053
+ /**
1054
+ * The alpha component.
1055
+ */
1056
+ alpha: number;
1057
+ /**
1058
+ * The blue component.
1059
+ */
1060
+ b: number;
1061
+ /**
1062
+ * The green component.
1063
+ */
1064
+ g: number;
1065
+ /**
1066
+ * The red component.
1067
+ */
1068
+ r: number;
1069
+ type: "rec2020";
1143
1070
  } | {
1144
- property: "border-top-color";
1071
+ /**
1072
+ * The alpha component.
1073
+ */
1074
+ alpha: number;
1075
+ type: "xyz-d50";
1076
+ /**
1077
+ * The x component.
1078
+ */
1079
+ x: number;
1080
+ /**
1081
+ * The y component.
1082
+ */
1083
+ y: number;
1084
+ /**
1085
+ * The z component.
1086
+ */
1087
+ z: number;
1145
1088
  } | {
1146
- property: "border-bottom-color";
1147
- } | {
1148
- property: "border-left-color";
1089
+ /**
1090
+ * The alpha component.
1091
+ */
1092
+ alpha: number;
1093
+ type: "xyz-d65";
1094
+ /**
1095
+ * The x component.
1096
+ */
1097
+ x: number;
1098
+ /**
1099
+ * The y component.
1100
+ */
1101
+ y: number;
1102
+ /**
1103
+ * The z component.
1104
+ */
1105
+ z: number;
1106
+ };
1107
+ /**
1108
+ * A floating point representation of color types that are usually stored as RGBA. These are used when there are any `none` components, which are represented as NaN.
1109
+ */
1110
+ type FloatColor = {
1111
+ /**
1112
+ * The alpha component.
1113
+ */
1114
+ alpha: number;
1115
+ /**
1116
+ * The blue component.
1117
+ */
1118
+ b: number;
1119
+ /**
1120
+ * The green component.
1121
+ */
1122
+ g: number;
1123
+ /**
1124
+ * The red component.
1125
+ */
1126
+ r: number;
1127
+ type: "rgb";
1149
1128
  } | {
1150
- property: "border-right-color";
1129
+ /**
1130
+ * The alpha component.
1131
+ */
1132
+ alpha: number;
1133
+ /**
1134
+ * The hue component.
1135
+ */
1136
+ h: number;
1137
+ /**
1138
+ * The lightness component.
1139
+ */
1140
+ l: number;
1141
+ /**
1142
+ * The saturation component.
1143
+ */
1144
+ s: number;
1145
+ type: "hsl";
1151
1146
  } | {
1152
- property: "border-block-start-color";
1147
+ /**
1148
+ * The alpha component.
1149
+ */
1150
+ alpha: number;
1151
+ /**
1152
+ * The blackness component.
1153
+ */
1154
+ b: number;
1155
+ /**
1156
+ * The hue component.
1157
+ */
1158
+ h: number;
1159
+ type: "hwb";
1160
+ /**
1161
+ * The whiteness component.
1162
+ */
1163
+ w: number;
1164
+ };
1165
+ type LightDark = {
1166
+ dark: CssColor;
1167
+ light: CssColor;
1168
+ type: "light-dark";
1169
+ };
1170
+ /**
1171
+ * A CSS [system color](https://drafts.csswg.org/css-color/#css-system-colors) keyword.
1172
+ */
1173
+ type SystemColor = "accentcolor" | "accentcolortext" | "activetext" | "buttonborder" | "buttonface" | "buttontext" | "canvas" | "canvastext" | "field" | "fieldtext" | "graytext" | "highlight" | "highlighttext" | "linktext" | "mark" | "marktext" | "selecteditem" | "selecteditemtext" | "visitedtext" | "activeborder" | "activecaption" | "appworkspace" | "background" | "buttonhighlight" | "buttonshadow" | "captiontext" | "inactiveborder" | "inactivecaption" | "inactivecaptiontext" | "infobackground" | "infotext" | "menu" | "menutext" | "scrollbar" | "threeddarkshadow" | "threedface" | "threedhighlight" | "threedlightshadow" | "threedshadow" | "window" | "windowframe" | "windowtext";
1174
+ /**
1175
+ * A color value with an unresolved alpha value (e.g. a variable). These can be converted from the modern slash syntax to older comma syntax. This can only be done when the only unresolved component is the alpha since variables can resolve to multiple tokens.
1176
+ */
1177
+ type UnresolvedColor = {
1178
+ /**
1179
+ * The unresolved alpha component.
1180
+ */
1181
+ alpha: TokenOrValue[];
1182
+ /**
1183
+ * The blue component.
1184
+ */
1185
+ b: number;
1186
+ /**
1187
+ * The green component.
1188
+ */
1189
+ g: number;
1190
+ /**
1191
+ * The red component.
1192
+ */
1193
+ r: number;
1194
+ type: "rgb";
1153
1195
  } | {
1154
- property: "border-block-end-color";
1196
+ /**
1197
+ * The unresolved alpha component.
1198
+ */
1199
+ alpha: TokenOrValue[];
1200
+ /**
1201
+ * The hue component.
1202
+ */
1203
+ h: number;
1204
+ /**
1205
+ * The lightness component.
1206
+ */
1207
+ l: number;
1208
+ /**
1209
+ * The saturation component.
1210
+ */
1211
+ s: number;
1212
+ type: "hsl";
1155
1213
  } | {
1156
- property: "border-inline-start-color";
1214
+ /**
1215
+ * The dark value.
1216
+ */
1217
+ dark: TokenOrValue[];
1218
+ /**
1219
+ * The light value.
1220
+ */
1221
+ light: TokenOrValue[];
1222
+ type: "light-dark";
1223
+ };
1224
+ /**
1225
+ * Defines where the class names referenced in the `composes` property are located.
1226
+ *
1227
+ * See [Composes](Composes).
1228
+ */
1229
+ type Specifier = {
1230
+ type: "global";
1157
1231
  } | {
1158
- property: "border-inline-end-color";
1232
+ type: "file";
1233
+ value: String;
1159
1234
  } | {
1160
- property: "border-top-style";
1235
+ type: "source-index";
1236
+ value: number;
1237
+ };
1238
+ /**
1239
+ * A CSS [`<angle>`](https://www.w3.org/TR/css-values-4/#angles) value.
1240
+ *
1241
+ * Angles may be explicit or computed by `calc()`, but are always stored and serialized as their computed value.
1242
+ */
1243
+ type Angle = {
1244
+ type: "deg";
1245
+ value: number;
1161
1246
  } | {
1162
- property: "border-bottom-style";
1247
+ type: "rad";
1248
+ value: number;
1163
1249
  } | {
1164
- property: "border-left-style";
1250
+ type: "grad";
1251
+ value: number;
1165
1252
  } | {
1166
- property: "border-right-style";
1253
+ type: "turn";
1254
+ value: number;
1255
+ };
1256
+ /**
1257
+ * A CSS [`<time>`](https://www.w3.org/TR/css-values-4/#time) value, in either seconds or milliseconds.
1258
+ *
1259
+ * Time values may be explicit or computed by `calc()`, but are always stored and serialized as their computed value.
1260
+ */
1261
+ type Time = {
1262
+ type: "seconds";
1263
+ value: number;
1167
1264
  } | {
1168
- property: "border-block-start-style";
1265
+ type: "milliseconds";
1266
+ value: number;
1267
+ };
1268
+ /**
1269
+ * A value for the [animation-name](https://drafts.csswg.org/css-animations/#animation-name) property.
1270
+ */
1271
+ type AnimationName = {
1272
+ type: "none";
1169
1273
  } | {
1170
- property: "border-block-end-style";
1274
+ type: "ident";
1275
+ value: String;
1171
1276
  } | {
1172
- property: "border-inline-start-style";
1277
+ type: "string";
1278
+ value: String;
1279
+ };
1280
+ /**
1281
+ * A CSS environment variable name.
1282
+ */
1283
+ type EnvironmentVariableName = {
1284
+ type: "ua";
1285
+ value: UAEnvironmentVariable;
1173
1286
  } | {
1174
- property: "border-inline-end-style";
1287
+ /**
1288
+ * CSS modules extension: the filename where the variable is defined. Only enabled when the CSS modules `dashed_idents` option is turned on.
1289
+ */
1290
+ from?: Specifier | null;
1291
+ /**
1292
+ * The referenced identifier.
1293
+ */
1294
+ ident: String;
1295
+ type: "custom";
1175
1296
  } | {
1176
- property: "border-top-width";
1297
+ type: "unknown";
1298
+ value: String;
1299
+ };
1300
+ /**
1301
+ * A UA-defined environment variable name.
1302
+ */
1303
+ type UAEnvironmentVariable = "safe-area-inset-top" | "safe-area-inset-right" | "safe-area-inset-bottom" | "safe-area-inset-left" | "viewport-segment-width" | "viewport-segment-height" | "viewport-segment-top" | "viewport-segment-left" | "viewport-segment-bottom" | "viewport-segment-right";
1304
+ /**
1305
+ * A [comparator](https://drafts.csswg.org/mediaqueries/#typedef-mf-comparison) within a media query.
1306
+ */
1307
+ type MediaFeatureComparison = "equal" | "greater-than" | "greater-than-equal" | "less-than" | "less-than-equal";
1308
+ /**
1309
+ * A binary `and` or `or` operator.
1310
+ */
1311
+ type Operator = "and" | "or";
1312
+ type MediaType = string;
1313
+ /**
1314
+ * A [media query qualifier](https://drafts.csswg.org/mediaqueries/#mq-prefix).
1315
+ */
1316
+ type Qualifier = "only" | "not";
1317
+ /**
1318
+ * A [`<supports-condition>`](https://drafts.csswg.org/css-conditional-3/#typedef-supports-condition), as used in the `@supports` and `@import` rules.
1319
+ */
1320
+ type SupportsCondition = {
1321
+ type: "not";
1322
+ value: SupportsCondition;
1177
1323
  } | {
1178
- property: "border-bottom-width";
1324
+ type: "and";
1325
+ value: SupportsCondition[];
1179
1326
  } | {
1180
- property: "border-left-width";
1327
+ type: "or";
1328
+ value: SupportsCondition[];
1181
1329
  } | {
1182
- property: "border-right-width";
1330
+ /**
1331
+ * The property id for the declaration.
1332
+ */
1333
+ propertyId: PropertyId;
1334
+ type: "declaration";
1335
+ /**
1336
+ * The raw value of the declaration.
1337
+ */
1338
+ value: String;
1183
1339
  } | {
1184
- property: "border-block-start-width";
1340
+ type: "selector";
1341
+ value: String;
1185
1342
  } | {
1186
- property: "border-block-end-width";
1343
+ type: "unknown";
1344
+ value: String;
1345
+ };
1346
+ type PropertyId = {
1347
+ property: "background-color";
1348
+ } | {
1349
+ property: "background-image";
1350
+ } | {
1351
+ property: "background-position-x";
1352
+ } | {
1353
+ property: "background-position-y";
1354
+ } | {
1355
+ property: "background-position";
1356
+ } | {
1357
+ property: "background-size";
1358
+ } | {
1359
+ property: "background-repeat";
1360
+ } | {
1361
+ property: "background-attachment";
1362
+ } | {
1363
+ property: "background-clip";
1364
+ vendorPrefix: VendorPrefix;
1365
+ } | {
1366
+ property: "background-origin";
1367
+ } | {
1368
+ property: "background";
1369
+ } | {
1370
+ property: "box-shadow";
1371
+ vendorPrefix: VendorPrefix;
1372
+ } | {
1373
+ property: "opacity";
1374
+ } | {
1375
+ property: "color";
1376
+ } | {
1377
+ property: "display";
1378
+ } | {
1379
+ property: "visibility";
1380
+ } | {
1381
+ property: "width";
1382
+ } | {
1383
+ property: "height";
1384
+ } | {
1385
+ property: "min-width";
1386
+ } | {
1387
+ property: "min-height";
1388
+ } | {
1389
+ property: "max-width";
1390
+ } | {
1391
+ property: "max-height";
1392
+ } | {
1393
+ property: "block-size";
1394
+ } | {
1395
+ property: "inline-size";
1396
+ } | {
1397
+ property: "min-block-size";
1398
+ } | {
1399
+ property: "min-inline-size";
1400
+ } | {
1401
+ property: "max-block-size";
1402
+ } | {
1403
+ property: "max-inline-size";
1404
+ } | {
1405
+ property: "box-sizing";
1406
+ vendorPrefix: VendorPrefix;
1407
+ } | {
1408
+ property: "aspect-ratio";
1409
+ } | {
1410
+ property: "overflow";
1411
+ } | {
1412
+ property: "overflow-x";
1413
+ } | {
1414
+ property: "overflow-y";
1415
+ } | {
1416
+ property: "text-overflow";
1417
+ vendorPrefix: VendorPrefix;
1418
+ } | {
1419
+ property: "position";
1420
+ } | {
1421
+ property: "top";
1422
+ } | {
1423
+ property: "bottom";
1424
+ } | {
1425
+ property: "left";
1426
+ } | {
1427
+ property: "right";
1428
+ } | {
1429
+ property: "inset-block-start";
1430
+ } | {
1431
+ property: "inset-block-end";
1432
+ } | {
1433
+ property: "inset-inline-start";
1434
+ } | {
1435
+ property: "inset-inline-end";
1436
+ } | {
1437
+ property: "inset-block";
1438
+ } | {
1439
+ property: "inset-inline";
1440
+ } | {
1441
+ property: "inset";
1442
+ } | {
1443
+ property: "border-spacing";
1444
+ } | {
1445
+ property: "border-top-color";
1446
+ } | {
1447
+ property: "border-bottom-color";
1448
+ } | {
1449
+ property: "border-left-color";
1450
+ } | {
1451
+ property: "border-right-color";
1452
+ } | {
1453
+ property: "border-block-start-color";
1454
+ } | {
1455
+ property: "border-block-end-color";
1456
+ } | {
1457
+ property: "border-inline-start-color";
1458
+ } | {
1459
+ property: "border-inline-end-color";
1460
+ } | {
1461
+ property: "border-top-style";
1462
+ } | {
1463
+ property: "border-bottom-style";
1464
+ } | {
1465
+ property: "border-left-style";
1466
+ } | {
1467
+ property: "border-right-style";
1468
+ } | {
1469
+ property: "border-block-start-style";
1470
+ } | {
1471
+ property: "border-block-end-style";
1472
+ } | {
1473
+ property: "border-inline-start-style";
1474
+ } | {
1475
+ property: "border-inline-end-style";
1476
+ } | {
1477
+ property: "border-top-width";
1478
+ } | {
1479
+ property: "border-bottom-width";
1480
+ } | {
1481
+ property: "border-left-width";
1482
+ } | {
1483
+ property: "border-right-width";
1484
+ } | {
1485
+ property: "border-block-start-width";
1486
+ } | {
1487
+ property: "border-block-end-width";
1187
1488
  } | {
1188
1489
  property: "border-inline-start-width";
1189
1490
  } | {
@@ -8476,7 +8777,7 @@ interface GlobDependency {
8476
8777
  glob: string;
8477
8778
  }
8478
8779
  //#endregion
8479
- //#region ../../node_modules/.pnpm/@tsdown+css@0.21.7_jiti@2.6.1_postcss-import@16.1.1_postcss@8.5.8__postcss-modules@6.0._97ab2205292bbf461c73b19c3ab34649/node_modules/@tsdown/css/dist/index.d.mts
8780
+ //#region ../../node_modules/.pnpm/@tsdown+css@0.21.8_jiti@2.6.1_postcss-import@16.1.1_postcss@8.5.8__postcss-modules@6.0._81fd5f08d4f28d4e75e4fccd68b101e5/node_modules/@tsdown/css/dist/index.d.mts
8480
8781
  //#region src/options.d.ts
8481
8782
  type LightningCSSOptions = Omit<TransformOptions<any>, "filename" | "code">;
8482
8783
  interface CSSModulesOptions {
@@ -8635,7 +8936,7 @@ interface StartOptions {
8635
8936
  open?: boolean;
8636
8937
  }
8637
8938
  //#endregion
8638
- //#region ../../node_modules/.pnpm/@tsdown+exe@0.21.7_tsdown@0.21.7/node_modules/@tsdown/exe/dist/index.d.mts
8939
+ //#region ../../node_modules/.pnpm/@tsdown+exe@0.21.8_tsdown@0.21.8/node_modules/@tsdown/exe/dist/index.d.mts
8639
8940
  //#region src/platform.d.ts
8640
8941
  type ExePlatform = "win" | "darwin" | "linux";
8641
8942
  type ExeArch = "x64" | "arm64";
@@ -20851,742 +21152,441 @@ declare namespace TsConfigJson {
20851
21152
  };
20852
21153
  }
20853
21154
  /**
20854
- Type for [TypeScript's `tsconfig.json` file](https://www.typescriptlang.org/docs/handbook/tsconfig-json.html) (TypeScript 3.7).
20855
-
20856
- @category File
20857
- */
20858
- type TsConfigJson = {
20859
- /**
20860
- Instructs the TypeScript compiler how to compile `.ts` files.
20861
- */
20862
- compilerOptions?: TsConfigJson.CompilerOptions;
20863
- /**
20864
- Instructs the TypeScript compiler how to watch files.
20865
- */
20866
- watchOptions?: TsConfigJson.WatchOptions;
20867
- /**
20868
- Auto type (.d.ts) acquisition options for this project.
20869
- */
20870
- typeAcquisition?: TsConfigJson.TypeAcquisition;
20871
- /**
20872
- Enable Compile-on-Save for this project.
20873
- */
20874
- compileOnSave?: boolean;
20875
- /**
20876
- Path to base configuration file to inherit from.
20877
- */
20878
- extends?: string | string[];
20879
- /**
20880
- If no `files` or `include` property is present in a `tsconfig.json`, the compiler defaults to including all files in the containing directory and subdirectories except those specified by `exclude`. When a `files` property is specified, only those files and those specified by `include` are included.
20881
- */
20882
- files?: string[];
20883
- /**
20884
- Specifies a list of files to be excluded from compilation. The `exclude` property only affects the files included via the `include` property and not the `files` property.
20885
- Glob patterns require TypeScript version 2.0 or later.
20886
- */
20887
- exclude?: string[];
20888
- /**
20889
- Specifies a list of glob patterns that match files to be included in compilation.
20890
- If no `files` or `include` property is present in a `tsconfig.json`, the compiler defaults to including all files in the containing directory and subdirectories except those specified by `exclude`.
20891
- */
20892
- include?: string[];
20893
- /**
20894
- Referenced projects.
20895
- */
20896
- references?: TsConfigJson.References[];
20897
- };
20898
- //#endregion
20899
- //#region ../../node_modules/.pnpm/rolldown-plugin-dts@0.23.2_@typescript+native-preview@7.0.0-dev.20260122.2_oxc-resolver_cb3700e83d33e7fb90f7550267bb8c2d/node_modules/rolldown-plugin-dts/dist/index.d.mts
20900
- //#region src/options.d.ts
20901
- interface GeneralOptions {
20902
- /**
20903
- * Glob pattern(s) to filter which entry files get `.d.ts` generation.
20904
- *
20905
- * When specified, only entry files matching these patterns will emit `.d.ts` chunks.
20906
- * When not specified, all entries get `.d.ts` generation.
20907
- *
20908
- * Supports negation patterns (e.g., `['**', '!src/icons/**']`) for exclusion.
20909
- * Patterns are matched against file paths relative to `cwd`.
20910
- *
20911
- * @example
20912
- * entry: 'src/index.ts'
20913
- * entry: ['src/*.ts', '!src/internal/**']
20914
- */
20915
- entry?: string | string[];
20916
- /**
20917
- * The directory in which the plugin will search for the `tsconfig.json` file.
20918
- */
20919
- cwd?: string;
20920
- /**
20921
- * Set to `true` if your entry files are `.d.ts` files instead of `.ts` files.
20922
- *
20923
- * When enabled, the plugin will skip generating a `.d.ts` file for the entry point.
20924
- */
20925
- dtsInput?: boolean;
20926
- /**
20927
- * If `true`, the plugin will emit only `.d.ts` files and remove all other output chunks.
20928
- *
20929
- * This is especially useful when generating `.d.ts` files for the CommonJS format as part of a separate build step.
20930
- */
20931
- emitDtsOnly?: boolean;
20932
- /**
20933
- * The path to the `tsconfig.json` file.
20934
- *
20935
- * If set to `false`, the plugin will ignore any `tsconfig.json` file.
20936
- * You can still specify `compilerOptions` directly in the options.
20937
- *
20938
- * @default 'tsconfig.json'
20939
- */
20940
- tsconfig?: string | boolean;
20941
- /**
20942
- * Pass a raw `tsconfig.json` object directly to the plugin.
20943
- *
20944
- * @see https://www.typescriptlang.org/tsconfig
20945
- */
20946
- tsconfigRaw?: Omit<TsConfigJson, "compilerOptions">;
20947
- /**
20948
- * Override the `compilerOptions` specified in `tsconfig.json`.
20949
- *
20950
- * @see https://www.typescriptlang.org/tsconfig/#compilerOptions
20951
- */
20952
- compilerOptions?: TsConfigJson.CompilerOptions;
20953
- /**
20954
- * If `true`, the plugin will generate declaration maps (`.d.ts.map`) for `.d.ts` files.
20955
- */
20956
- sourcemap?: boolean;
20957
- /**
20958
- * Specifies a resolver to resolve type definitions, especially for `node_modules`.
20959
- *
20960
- * - `'oxc'`: Uses Oxc's module resolution, which is faster and more efficient.
20961
- * - `'tsc'`: Uses TypeScript's native module resolution, which may be more compatible with complex setups, but slower.
20962
- *
20963
- * @default 'oxc'
20964
- */
20965
- resolver?: "oxc" | "tsc";
20966
- /**
20967
- * Determines how the default export is emitted.
20968
- *
20969
- * If set to `true`, and you are only exporting a single item using `export default ...`,
20970
- * the output will use `export = ...` instead of the standard ES module syntax.
20971
- * This is useful for compatibility with CommonJS.
20972
- */
20973
- cjsDefault?: boolean;
20974
- /**
20975
- * Indicates whether the generated `.d.ts` files have side effects.
20976
- * - If set to `true`, Rolldown will treat the `.d.ts` files as having side effects during tree-shaking.
20977
- * - If set to `false`, Rolldown may consider the `.d.ts` files as side-effect-free, potentially removing them if they are not imported.
20978
- *
20979
- * @default false
20980
- */
20981
- sideEffects?: boolean;
20982
- }
20983
- interface TscOptions {
20984
- /**
20985
- * Build mode for the TypeScript compiler:
20986
- *
20987
- * - If `true`, the plugin will use [`tsc -b`](https://www.typescriptlang.org/docs/handbook/project-references.html#build-mode-for-typescript) to build the project and all referenced projects before emitting `.d.ts` files.
20988
- * - If `false`, the plugin will use [`tsc`](https://www.typescriptlang.org/docs/handbook/compiler-options.html) to emit `.d.ts` files without building referenced projects.
20989
- *
20990
- * @default false
20991
- */
20992
- build?: boolean;
20993
- /**
20994
- * If your tsconfig.json has
20995
- * [`references`](https://www.typescriptlang.org/tsconfig/#references) option,
20996
- * `rolldown-plugin-dts` will use [`tsc
20997
- * -b`](https://www.typescriptlang.org/docs/handbook/project-references.html#build-mode-for-typescript)
20998
- * to build the project and all referenced projects before emitting `.d.ts`
20999
- * files.
21000
- *
21001
- * In such case, if this option is `true`, `rolldown-plugin-dts` will write
21002
- * down all built files into your disk, including
21003
- * [`.tsbuildinfo`](https://www.typescriptlang.org/tsconfig/#tsBuildInfoFile)
21004
- * and other built files. This is equivalent to running `tsc -b` in your
21005
- * project.
21006
- *
21007
- * Otherwise, if this option is `false`, `rolldown-plugin-dts` will write
21008
- * built files only into memory and leave a small footprint in your disk.
21009
- *
21010
- * Enabling this option will decrease the build time by caching previous build
21011
- * results. This is helpful when you have a large project with multiple
21012
- * referenced projects.
21013
- *
21014
- * By default, `incremental` is `true` if your tsconfig has
21015
- * [`incremental`](https://www.typescriptlang.org/tsconfig/#incremental) or
21016
- * [`tsBuildInfoFile`](https://www.typescriptlang.org/tsconfig/#tsBuildInfoFile)
21017
- * enabled.
21018
- *
21019
- * This option is only used when {@link Options.oxc} is
21020
- * `false`.
21021
- */
21022
- incremental?: boolean;
21023
- /**
21024
- * If `true`, the plugin will generate `.d.ts` files using `vue-tsc`.
21025
- */
21026
- vue?: boolean;
21027
- /**
21028
- * If `true`, the plugin will generate `.d.ts` files using `@ts-macro/tsc`.
21029
- */
21030
- tsMacro?: boolean;
21031
- /**
21032
- * If `true`, the plugin will launch a separate process for `tsc` or `vue-tsc`.
21033
- * This enables processing multiple projects in parallel.
21034
- */
21035
- parallel?: boolean;
21036
- /**
21037
- * If `true`, the plugin will prepare all files listed in `tsconfig.json` for `tsc` or `vue-tsc`.
21038
- *
21039
- * This is especially useful when you have a single `tsconfig.json` for multiple projects in a monorepo.
21040
- */
21041
- eager?: boolean;
21042
- /**
21043
- * If `true`, the plugin will create a new isolated context for each build,
21044
- * ensuring that previously generated `.d.ts` code and caches are not reused.
21045
- *
21046
- * By default, the plugin may reuse internal caches or incremental build artifacts
21047
- * to speed up repeated builds. Enabling this option forces a clean context,
21048
- * guaranteeing that all type definitions are generated from scratch.
21049
- *
21050
- * @default false
21051
- */
21052
- newContext?: boolean;
21053
- /**
21054
- * If `true`, the plugin will emit `.d.ts` files for `.js` files as well.
21055
- * This is useful when you want to generate type definitions for JavaScript files with JSDoc comments.
21056
- *
21057
- * Enabled by default when `allowJs` in compilerOptions is `true`.
21058
- * This option is only used when {@link Options.oxc} is
21059
- * `false`.
21060
- */
21061
- emitJs?: boolean;
21062
- }
21063
- interface Options$1 extends GeneralOptions, TscOptions {
21064
- /**
21065
- * If `true`, the plugin will generate `.d.ts` files using Oxc,
21066
- * which is significantly faster than the TypeScript compiler.
21067
- *
21068
- * This option is automatically enabled when `isolatedDeclarations` in `compilerOptions` is set to `true`.
21069
- */
21070
- oxc?: boolean | Omit<IsolatedDeclarationsOptions, "sourcemap">;
21071
- /**
21072
- * **[Experimental]** Enables DTS generation using `tsgo`.
21073
- *
21074
- * To use this option, make sure `@typescript/native-preview` is installed as a dependency,
21075
- * or provide a custom path to the `tsgo` binary using the `path` option.
21076
- *
21077
- * **Note:** This option is not yet recommended for production environments.
21078
- * `tsconfigRaw` and `isolatedDeclarations` options will be ignored when this option is enabled.
21079
- *
21080
- *
21081
- * ```ts
21082
- * // Use tsgo from `@typescript/native-preview` dependency
21083
- * tsgo: true
21084
- *
21085
- * // Use custom tsgo path (e.g., managed by Nix)
21086
- * tsgo: { path: '/path/to/tsgo' }
21087
- * ```
21088
- */
21089
- tsgo?: boolean | TsgoOptions;
21090
- }
21091
- interface TsgoOptions {
21092
- enabled?: boolean;
21093
- /**
21094
- * Custom path to the `tsgo` binary.
21095
- */
21096
- path?: string;
21097
- }
21098
- //#endregion
21099
- //#region ../../node_modules/.pnpm/unplugin@2.3.11/node_modules/unplugin/dist/index.d.ts
21100
- /**
21101
- * Array, or not yet
21102
- */
21103
- type Arrayable<T> = T | Array<T>;
21104
- type StringOrRegExp = string | RegExp;
21105
- type FilterPattern = Arrayable<StringOrRegExp>;
21106
- //#endregion
21107
- //#region ../../node_modules/.pnpm/unplugin-unused@0.5.6/node_modules/unplugin-unused/dist/options-CGknhUOq.d.mts
21108
- //#region src/core/options.d.ts
21109
- type DepKind = "dependencies" | "devDependencies" | "peerDependencies";
21110
- interface Options {
21111
- root?: string;
21112
- include?: FilterPattern;
21113
- exclude?: FilterPattern;
21114
- ignore?: string[] | Partial<Record<DepKind, string[]>>;
21155
+ Type for [TypeScript's `tsconfig.json` file](https://www.typescriptlang.org/docs/handbook/tsconfig-json.html) (TypeScript 3.7).
21156
+
21157
+ @category File
21158
+ */
21159
+ type TsConfigJson = {
21115
21160
  /**
21116
- * @default 'warning'
21161
+ Instructs the TypeScript compiler how to compile `.ts` files.
21117
21162
  */
21118
- level?: "warning" | "error";
21163
+ compilerOptions?: TsConfigJson.CompilerOptions;
21119
21164
  /**
21120
- * @default ['dependencies', 'peerDependencies']
21165
+ Instructs the TypeScript compiler how to watch files.
21121
21166
  */
21122
- depKinds?: Array<DepKind>;
21123
- }
21124
- //#endregion
21125
- //#region ../../node_modules/.pnpm/tsdown@0.21.7_@arethetypeswrong+core@0.18.2_@tsdown+css@0.21.7_@tsdown+exe@0.21.7_@type_40fa21a6dd0aac837d14f6503ecc360a/node_modules/tsdown/dist/types-DD-uKQPn.d.mts
21126
- //#region src/features/copy.d.ts
21127
- interface CopyEntry {
21167
+ watchOptions?: TsConfigJson.WatchOptions;
21128
21168
  /**
21129
- * Source path or glob pattern.
21169
+ Auto type (.d.ts) acquisition options for this project.
21130
21170
  */
21131
- from: string | string[];
21171
+ typeAcquisition?: TsConfigJson.TypeAcquisition;
21132
21172
  /**
21133
- * Destination path.
21134
- * If not specified, defaults to the output directory ("outDir").
21173
+ Enable Compile-on-Save for this project.
21135
21174
  */
21136
- to?: string;
21175
+ compileOnSave?: boolean;
21137
21176
  /**
21138
- * Whether to flatten the copied files (not preserving directory structure).
21139
- *
21140
- * @default true
21177
+ Path to base configuration file to inherit from.
21141
21178
  */
21142
- flatten?: boolean;
21179
+ extends?: string | string[];
21143
21180
  /**
21144
- * Output copied items to console.
21145
- * @default false
21181
+ If no `files` or `include` property is present in a `tsconfig.json`, the compiler defaults to including all files in the containing directory and subdirectories except those specified by `exclude`. When a `files` property is specified, only those files and those specified by `include` are included.
21146
21182
  */
21147
- verbose?: boolean;
21183
+ files?: string[];
21148
21184
  /**
21149
- * Change destination file or folder name.
21185
+ Specifies a list of files to be excluded from compilation. The `exclude` property only affects the files included via the `include` property and not the `files` property.
21186
+ Glob patterns require TypeScript version 2.0 or later.
21150
21187
  */
21151
- rename?: string | ((name: string, extension: string, fullPath: string) => string);
21152
- }
21153
- type CopyOptions = Arrayable$1<string | CopyEntry>;
21154
- type CopyOptionsFn = (options: ResolvedConfig) => Awaitable<CopyOptions>; //#endregion
21155
- //#region src/utils/chunks.d.ts
21156
- type RolldownChunk = (OutputChunk | OutputAsset) & {
21157
- outDir: string;
21158
- };
21159
- type ChunksByFormat = Partial<Record<NormalizedFormat, RolldownChunk[]>>;
21160
- interface TsdownBundle extends AsyncDisposable {
21161
- chunks: RolldownChunk[];
21162
- config: ResolvedConfig;
21163
- inlinedDeps: Map<string, Set<string>>;
21164
- } //#endregion
21165
- //#region src/features/deps.d.ts
21166
- type NoExternalFn = (id: string, importer: string | undefined) => boolean | null | undefined | void;
21167
- interface DepsConfig {
21188
+ exclude?: string[];
21168
21189
  /**
21169
- * Mark dependencies as external (not bundled).
21170
- * Accepts strings, regular expressions, or Rolldown's `ExternalOption`.
21190
+ Specifies a list of glob patterns that match files to be included in compilation.
21191
+ If no `files` or `include` property is present in a `tsconfig.json`, the compiler defaults to including all files in the containing directory and subdirectories except those specified by `exclude`.
21171
21192
  */
21172
- neverBundle?: ExternalOption;
21193
+ include?: string[];
21173
21194
  /**
21174
- * Force dependencies to be bundled, even if they are in `dependencies`, `peerDependencies`, or `optionalDependencies`.
21195
+ Referenced projects.
21175
21196
  */
21176
- alwaysBundle?: Arrayable$1<string | RegExp> | NoExternalFn;
21197
+ references?: TsConfigJson.References[];
21198
+ };
21199
+ //#endregion
21200
+ //#region ../../node_modules/.pnpm/rolldown-plugin-dts@0.23.2_@typescript+native-preview@7.0.0-dev.20260122.2_oxc-resolver_cb3700e83d33e7fb90f7550267bb8c2d/node_modules/rolldown-plugin-dts/dist/index.d.mts
21201
+ //#region src/options.d.ts
21202
+ interface GeneralOptions {
21177
21203
  /**
21178
- * Whitelist of dependencies allowed to be bundled from `node_modules`.
21179
- * Throws an error if any unlisted dependency is bundled.
21204
+ * Glob pattern(s) to filter which entry files get `.d.ts` generation.
21180
21205
  *
21181
- * - `undefined` (default): Show warnings for bundled dependencies.
21182
- * - `false`: Suppress all warnings about bundled dependencies.
21206
+ * When specified, only entry files matching these patterns will emit `.d.ts` chunks.
21207
+ * When not specified, all entries get `.d.ts` generation.
21183
21208
  *
21184
- * Note: Be sure to include all required sub-dependencies as well.
21209
+ * Supports negation patterns (e.g., `['**', '!src/icons/**']`) for exclusion.
21210
+ * Patterns are matched against file paths relative to `cwd`.
21211
+ *
21212
+ * @example
21213
+ * entry: 'src/index.ts'
21214
+ * entry: ['src/*.ts', '!src/internal/**']
21185
21215
  */
21186
- onlyBundle?: Arrayable$1<string | RegExp> | false;
21216
+ entry?: string | string[];
21187
21217
  /**
21188
- * @deprecated Use {@link onlyBundle} instead.
21218
+ * The directory in which the plugin will search for the `tsconfig.json` file.
21189
21219
  */
21190
- onlyAllowBundle?: Arrayable$1<string | RegExp> | false;
21220
+ cwd?: string;
21191
21221
  /**
21192
- * Skip bundling all `node_modules` dependencies.
21193
- *
21194
- * **Note:** This option cannot be used together with `alwaysBundle`.
21222
+ * Set to `true` if your entry files are `.d.ts` files instead of `.ts` files.
21195
21223
  *
21196
- * @default false
21224
+ * When enabled, the plugin will skip generating a `.d.ts` file for the entry point.
21197
21225
  */
21198
- skipNodeModulesBundle?: boolean;
21199
- }
21200
- interface ResolvedDepsConfig {
21201
- neverBundle?: ExternalOption;
21202
- alwaysBundle?: NoExternalFn;
21203
- onlyBundle?: Array<string | RegExp> | false;
21204
- skipNodeModulesBundle: boolean;
21205
- }
21206
- //#endregion
21207
- //#region src/features/devtools.d.ts
21208
- interface DevtoolsOptions extends NonNullable<InputOptions["devtools"]> {
21226
+ dtsInput?: boolean;
21209
21227
  /**
21210
- * **[experimental]** Enable devtools integration. `@vitejs/devtools` must be installed as a dependency.
21228
+ * If `true`, the plugin will emit only `.d.ts` files and remove all other output chunks.
21211
21229
  *
21212
- * Defaults to true, if `@vitejs/devtools` is installed.
21230
+ * This is especially useful when generating `.d.ts` files for the CommonJS format as part of a separate build step.
21213
21231
  */
21214
- ui?: boolean | Partial<StartOptions>;
21232
+ emitDtsOnly?: boolean;
21215
21233
  /**
21216
- * Clean devtools stale sessions.
21234
+ * The path to the `tsconfig.json` file.
21217
21235
  *
21218
- * @default true
21236
+ * If set to `false`, the plugin will ignore any `tsconfig.json` file.
21237
+ * You can still specify `compilerOptions` directly in the options.
21238
+ *
21239
+ * @default 'tsconfig.json'
21219
21240
  */
21220
- clean?: boolean;
21221
- } //#endregion
21222
- //#region src/features/exe.d.ts
21223
- interface ExeOptions extends ExeExtensionOptions {
21224
- seaConfig?: Omit<SeaConfig, "main" | "output" | "mainFormat">;
21241
+ tsconfig?: string | boolean;
21225
21242
  /**
21226
- * Output file name without any suffix or extension.
21227
- * For example, do not include `.exe`, platform suffixes, or architecture suffixes.
21243
+ * Pass a raw `tsconfig.json` object directly to the plugin.
21244
+ *
21245
+ * @see https://www.typescriptlang.org/tsconfig
21228
21246
  */
21229
- fileName?: string | ((chunk: RolldownChunk) => string);
21247
+ tsconfigRaw?: Omit<TsConfigJson, "compilerOptions">;
21230
21248
  /**
21231
- * Output directory for executables.
21232
- * @default 'build'
21249
+ * Override the `compilerOptions` specified in `tsconfig.json`.
21250
+ *
21251
+ * @see https://www.typescriptlang.org/tsconfig/#compilerOptions
21233
21252
  */
21234
- outDir?: string;
21235
- }
21236
- /**
21237
- * See also [Node.js SEA Documentation](https://nodejs.org/api/single-executable-applications.html#generating-single-executable-applications-with---build-sea)
21238
- *
21239
- * Note some default values are different from Node.js defaults to optimize for typical use cases (e.g. disabling experimental warning, enabling code cache). These can be overridden.
21240
- */
21241
- interface SeaConfig {
21242
- main?: string;
21243
- /** Optional, if not specified, uses the current Node.js binary */
21244
- executable?: string;
21245
- output?: string;
21246
- mainFormat?: "commonjs" | "module";
21247
- /** @default true */
21248
- disableExperimentalSEAWarning?: boolean;
21249
- /** @default false */
21250
- useSnapshot?: boolean;
21251
- /** @default false */
21252
- useCodeCache?: boolean;
21253
- execArgv?: string[];
21254
- /** @default "env" */
21255
- execArgvExtension?: "none" | "env" | "cli";
21256
- assets?: Record<string, string>;
21257
- } //#endregion
21258
- //#region src/features/hooks.d.ts
21259
- interface BuildContext {
21260
- options: ResolvedConfig;
21261
- hooks: Hookable<TsdownHooks>;
21262
- }
21263
- interface RolldownContext {
21264
- buildOptions: BuildOptions$1;
21265
- }
21266
- /**
21267
- * Hooks for tsdown.
21268
- */
21269
- interface TsdownHooks {
21253
+ compilerOptions?: TsConfigJson.CompilerOptions;
21270
21254
  /**
21271
- * Invoked before each tsdown build starts.
21272
- * Use this hook to perform setup or preparation tasks.
21255
+ * If `true`, the plugin will generate declaration maps (`.d.ts.map`) for `.d.ts` files.
21273
21256
  */
21274
- "build:prepare": (ctx: BuildContext) => void | Promise<void>;
21257
+ sourcemap?: boolean;
21275
21258
  /**
21276
- * Invoked before each Rolldown build.
21277
- * For dual-format builds, this hook is called for each format.
21278
- * Useful for configuring or modifying the build context before bundling.
21259
+ * Specifies a resolver to resolve type definitions, especially for `node_modules`.
21260
+ *
21261
+ * - `'oxc'`: Uses Oxc's module resolution, which is faster and more efficient.
21262
+ * - `'tsc'`: Uses TypeScript's native module resolution, which may be more compatible with complex setups, but slower.
21263
+ *
21264
+ * @default 'oxc'
21279
21265
  */
21280
- "build:before": (ctx: BuildContext & RolldownContext) => void | Promise<void>;
21266
+ resolver?: "oxc" | "tsc";
21281
21267
  /**
21282
- * Invoked after each tsdown build completes.
21283
- * Use this hook for cleanup or post-processing tasks.
21268
+ * Determines how the default export is emitted.
21269
+ *
21270
+ * If set to `true`, and you are only exporting a single item using `export default ...`,
21271
+ * the output will use `export = ...` instead of the standard ES module syntax.
21272
+ * This is useful for compatibility with CommonJS.
21284
21273
  */
21285
- "build:done": (ctx: BuildContext & {
21286
- chunks: RolldownChunk[];
21287
- }) => void | Promise<void>;
21288
- } //#endregion
21289
- //#region node_modules/.pnpm/pkg-types@2.3.0/node_modules/pkg-types/dist/index.d.mts
21290
- interface PackageJson {
21291
- /**
21292
- * The name is what your thing is called.
21293
- * Some rules:
21294
- * - The name must be less than or equal to 214 characters. This includes the scope for scoped packages.
21295
- * - The name can’t start with a dot or an underscore.
21296
- * - New packages must not have uppercase letters in the name.
21297
- * - The name ends up being part of a URL, an argument on the command line, and a folder name. Therefore, the name can’t contain any non-URL-safe characters.
21298
- */
21299
- name?: string;
21300
- /**
21301
- * Version must be parseable by `node-semver`, which is bundled with npm as a dependency. (`npm install semver` to use it yourself.)
21302
- */
21303
- version?: string;
21304
- /**
21305
- * Put a description in it. It’s a string. This helps people discover your package, as it’s listed in `npm search`.
21306
- */
21307
- description?: string;
21308
- /**
21309
- * Put keywords in it. It’s an array of strings. This helps people discover your package as it’s listed in `npm search`.
21310
- */
21311
- keywords?: string[];
21312
- /**
21313
- * The url to the project homepage.
21314
- */
21315
- homepage?: string;
21316
- /**
21317
- * The url to your project’s issue tracker and / or the email address to which issues should be reported. These are helpful for people who encounter issues with your package.
21318
- */
21319
- bugs?: string | {
21320
- url?: string;
21321
- email?: string;
21322
- };
21323
- /**
21324
- * You should specify a license for your package so that people know how they are permitted to use it, and any restrictions you’re placing on it.
21325
- */
21326
- license?: string;
21327
- /**
21328
- * Specify the place where your code lives. This is helpful for people who want to contribute. If the git repo is on GitHub, then the `npm docs` command will be able to find you.
21329
- * For GitHub, GitHub gist, Bitbucket, or GitLab repositories you can use the same shortcut syntax you use for npm install:
21330
- */
21331
- repository?: string | {
21332
- type: string;
21333
- url: string;
21334
- /**
21335
- * If the `package.json` for your package is not in the root directory (for example if it is part of a monorepo), you can specify the directory in which it lives:
21336
- */
21337
- directory?: string;
21338
- };
21274
+ cjsDefault?: boolean;
21339
21275
  /**
21340
- * The `scripts` field is a dictionary containing script commands that are run at various times in the lifecycle of your package.
21341
- */
21342
- scripts?: PackageJsonScripts;
21276
+ * Indicates whether the generated `.d.ts` files have side effects.
21277
+ * - If set to `true`, Rolldown will treat the `.d.ts` files as having side effects during tree-shaking.
21278
+ * - If set to `false`, Rolldown may consider the `.d.ts` files as side-effect-free, potentially removing them if they are not imported.
21279
+ *
21280
+ * @default false
21281
+ */
21282
+ sideEffects?: boolean;
21283
+ }
21284
+ interface TscOptions {
21343
21285
  /**
21344
- * If you set `"private": true` in your package.json, then npm will refuse to publish it.
21345
- */
21346
- private?: boolean;
21286
+ * Build mode for the TypeScript compiler:
21287
+ *
21288
+ * - If `true`, the plugin will use [`tsc -b`](https://www.typescriptlang.org/docs/handbook/project-references.html#build-mode-for-typescript) to build the project and all referenced projects before emitting `.d.ts` files.
21289
+ * - If `false`, the plugin will use [`tsc`](https://www.typescriptlang.org/docs/handbook/compiler-options.html) to emit `.d.ts` files without building referenced projects.
21290
+ *
21291
+ * @default false
21292
+ */
21293
+ build?: boolean;
21347
21294
  /**
21348
- * The “author” is one person.
21349
- */
21350
- author?: PackageJsonPerson;
21295
+ * If your tsconfig.json has
21296
+ * [`references`](https://www.typescriptlang.org/tsconfig/#references) option,
21297
+ * `rolldown-plugin-dts` will use [`tsc
21298
+ * -b`](https://www.typescriptlang.org/docs/handbook/project-references.html#build-mode-for-typescript)
21299
+ * to build the project and all referenced projects before emitting `.d.ts`
21300
+ * files.
21301
+ *
21302
+ * In such case, if this option is `true`, `rolldown-plugin-dts` will write
21303
+ * down all built files into your disk, including
21304
+ * [`.tsbuildinfo`](https://www.typescriptlang.org/tsconfig/#tsBuildInfoFile)
21305
+ * and other built files. This is equivalent to running `tsc -b` in your
21306
+ * project.
21307
+ *
21308
+ * Otherwise, if this option is `false`, `rolldown-plugin-dts` will write
21309
+ * built files only into memory and leave a small footprint in your disk.
21310
+ *
21311
+ * Enabling this option will decrease the build time by caching previous build
21312
+ * results. This is helpful when you have a large project with multiple
21313
+ * referenced projects.
21314
+ *
21315
+ * By default, `incremental` is `true` if your tsconfig has
21316
+ * [`incremental`](https://www.typescriptlang.org/tsconfig/#incremental) or
21317
+ * [`tsBuildInfoFile`](https://www.typescriptlang.org/tsconfig/#tsBuildInfoFile)
21318
+ * enabled.
21319
+ *
21320
+ * This option is only used when {@link Options.oxc} is
21321
+ * `false`.
21322
+ */
21323
+ incremental?: boolean;
21351
21324
  /**
21352
- * “contributors” is an array of people.
21353
- */
21354
- contributors?: PackageJsonPerson[];
21325
+ * If `true`, the plugin will generate `.d.ts` files using `vue-tsc`.
21326
+ */
21327
+ vue?: boolean;
21355
21328
  /**
21356
- * An object containing a URL that provides up-to-date information
21357
- * about ways to help fund development of your package,
21358
- * a string URL, or an array of objects and string URLs
21359
- */
21360
- funding?: PackageJsonFunding | PackageJsonFunding[];
21329
+ * If `true`, the plugin will generate `.d.ts` files using `@ts-macro/tsc`.
21330
+ */
21331
+ tsMacro?: boolean;
21361
21332
  /**
21362
- * The optional `files` field is an array of file patterns that describes the entries to be included when your package is installed as a dependency. File patterns follow a similar syntax to `.gitignore`, but reversed: including a file, directory, or glob pattern (`*`, `**\/*`, and such) will make it so that file is included in the tarball when it’s packed. Omitting the field will make it default to `["*"]`, which means it will include all files.
21363
- */
21364
- files?: string[];
21333
+ * If `true`, the plugin will launch a separate process for `tsc` or `vue-tsc`.
21334
+ * This enables processing multiple projects in parallel.
21335
+ */
21336
+ parallel?: boolean;
21365
21337
  /**
21366
- * The main field is a module ID that is the primary entry point to your program. That is, if your package is named `foo`, and a user installs it, and then does `require("foo")`, then your main module’s exports object will be returned.
21367
- * This should be a module ID relative to the root of your package folder.
21368
- * For most modules, it makes the most sense to have a main script and often not much else.
21369
- */
21370
- main?: string;
21338
+ * If `true`, the plugin will prepare all files listed in `tsconfig.json` for `tsc` or `vue-tsc`.
21339
+ *
21340
+ * This is especially useful when you have a single `tsconfig.json` for multiple projects in a monorepo.
21341
+ */
21342
+ eager?: boolean;
21371
21343
  /**
21372
- * If your module is meant to be used client-side the browser field should be used instead of the main field. This is helpful to hint users that it might rely on primitives that aren’t available in Node.js modules. (e.g. window)
21373
- */
21374
- browser?: string | Record<string, string | false>;
21344
+ * If `true`, the plugin will create a new isolated context for each build,
21345
+ * ensuring that previously generated `.d.ts` code and caches are not reused.
21346
+ *
21347
+ * By default, the plugin may reuse internal caches or incremental build artifacts
21348
+ * to speed up repeated builds. Enabling this option forces a clean context,
21349
+ * guaranteeing that all type definitions are generated from scratch.
21350
+ *
21351
+ * @default false
21352
+ */
21353
+ newContext?: boolean;
21375
21354
  /**
21376
- * The `unpkg` field is used to specify the URL to a UMD module for your package. This is used by default in the unpkg.com CDN service.
21377
- */
21378
- unpkg?: string;
21355
+ * If `true`, the plugin will emit `.d.ts` files for `.js` files as well.
21356
+ * This is useful when you want to generate type definitions for JavaScript files with JSDoc comments.
21357
+ *
21358
+ * Enabled by default when `allowJs` in compilerOptions is `true`.
21359
+ * This option is only used when {@link Options.oxc} is
21360
+ * `false`.
21361
+ */
21362
+ emitJs?: boolean;
21363
+ }
21364
+ interface Options$1 extends GeneralOptions, TscOptions {
21379
21365
  /**
21380
- * A map of command name to local file name. On install, npm will symlink that file into `prefix/bin` for global installs, or `./node_modules/.bin/` for local installs.
21381
- */
21382
- bin?: string | Record<string, string>;
21366
+ * If `true`, the plugin will generate `.d.ts` files using Oxc,
21367
+ * which is significantly faster than the TypeScript compiler.
21368
+ *
21369
+ * This option is automatically enabled when `isolatedDeclarations` in `compilerOptions` is set to `true`.
21370
+ */
21371
+ oxc?: boolean | Omit<IsolatedDeclarationsOptions, "sourcemap">;
21383
21372
  /**
21384
- * Specify either a single file or an array of filenames to put in place for the `man` program to find.
21385
- */
21386
- man?: string | string[];
21373
+ * **[Experimental]** Enables DTS generation using `tsgo`.
21374
+ *
21375
+ * To use this option, make sure `@typescript/native-preview` is installed as a dependency,
21376
+ * or provide a custom path to the `tsgo` binary using the `path` option.
21377
+ *
21378
+ * **Note:** This option is not yet recommended for production environments.
21379
+ * `tsconfigRaw` and `isolatedDeclarations` options will be ignored when this option is enabled.
21380
+ *
21381
+ *
21382
+ * ```ts
21383
+ * // Use tsgo from `@typescript/native-preview` dependency
21384
+ * tsgo: true
21385
+ *
21386
+ * // Use custom tsgo path (e.g., managed by Nix)
21387
+ * tsgo: { path: '/path/to/tsgo' }
21388
+ * ```
21389
+ */
21390
+ tsgo?: boolean | TsgoOptions;
21391
+ }
21392
+ interface TsgoOptions {
21393
+ enabled?: boolean;
21387
21394
  /**
21388
- * Dependencies are specified in a simple object that maps a package name to a version range. The version range is a string which has one or more space-separated descriptors. Dependencies can also be identified with a tarball or git URL.
21389
- */
21390
- dependencies?: Record<string, string>;
21395
+ * Custom path to the `tsgo` binary.
21396
+ */
21397
+ path?: string;
21398
+ }
21399
+ //#endregion
21400
+ //#region ../../node_modules/.pnpm/unplugin@2.3.11/node_modules/unplugin/dist/index.d.ts
21401
+ /**
21402
+ * Array, or not yet
21403
+ */
21404
+ type Arrayable<T> = T | Array<T>;
21405
+ type StringOrRegExp = string | RegExp;
21406
+ type FilterPattern = Arrayable<StringOrRegExp>;
21407
+ //#endregion
21408
+ //#region ../../node_modules/.pnpm/unplugin-unused@0.5.6/node_modules/unplugin-unused/dist/options-CGknhUOq.d.mts
21409
+ //#region src/core/options.d.ts
21410
+ type DepKind = "dependencies" | "devDependencies" | "peerDependencies";
21411
+ interface Options {
21412
+ root?: string;
21413
+ include?: FilterPattern;
21414
+ exclude?: FilterPattern;
21415
+ ignore?: string[] | Partial<Record<DepKind, string[]>>;
21391
21416
  /**
21392
- * If someone is planning on downloading and using your module in their program, then they probably don’t want or need to download and build the external test or documentation framework that you use.
21393
- * In this case, it’s best to map these additional items in a `devDependencies` object.
21394
- */
21395
- devDependencies?: Record<string, string>;
21417
+ * @default 'warning'
21418
+ */
21419
+ level?: "warning" | "error";
21396
21420
  /**
21397
- * If a dependency can be used, but you would like npm to proceed if it cannot be found or fails to install, then you may put it in the `optionalDependencies` object. This is a map of package name to version or url, just like the `dependencies` object. The difference is that build failures do not cause installation to fail.
21398
- */
21399
- optionalDependencies?: Record<string, string>;
21421
+ * @default ['dependencies', 'peerDependencies']
21422
+ */
21423
+ depKinds?: Array<DepKind>;
21424
+ }
21425
+ //#endregion
21426
+ //#region ../../node_modules/.pnpm/tsdown@0.21.8_@arethetypeswrong+core@0.18.2_@tsdown+css@0.21.8_@tsdown+exe@0.21.8_@type_bf863151738d83584e36df49913526fa/node_modules/tsdown/dist/types-C7s2EXSK.d.mts
21427
+ //#region src/features/copy.d.ts
21428
+ interface CopyEntry {
21400
21429
  /**
21401
- * In some cases, you want to express the compatibility of your package with a host tool or library, while not necessarily doing a `require` of this host. This is usually referred to as a plugin. Notably, your module may be exposing a specific interface, expected and specified by the host documentation.
21402
- */
21403
- peerDependencies?: Record<string, string>;
21430
+ * Source path or glob pattern.
21431
+ */
21432
+ from: string | string[];
21404
21433
  /**
21405
- * TypeScript typings, typically ending by `.d.ts`.
21406
- */
21407
- types?: string;
21434
+ * Destination path.
21435
+ * If not specified, defaults to the output directory ("outDir").
21436
+ */
21437
+ to?: string;
21408
21438
  /**
21409
- * This field is synonymous with `types`.
21410
- */
21411
- typings?: string;
21439
+ * Whether to flatten the copied files (not preserving directory structure).
21440
+ *
21441
+ * @default true
21442
+ */
21443
+ flatten?: boolean;
21412
21444
  /**
21413
- * Non-Standard Node.js alternate entry-point to main.
21414
- * An initial implementation for supporting CJS packages (from main), and use module for ESM modules.
21415
- */
21416
- module?: string;
21445
+ * Output copied items to console.
21446
+ * @default false
21447
+ */
21448
+ verbose?: boolean;
21417
21449
  /**
21418
- * Make main entry-point be loaded as an ESM module, support "export" syntax instead of "require"
21419
- *
21420
- * Docs:
21421
- * - https://nodejs.org/docs/latest-v14.x/api/esm.html#esm_package_json_type_field
21422
- *
21423
- * @default 'commonjs'
21424
- * @since Node.js v14
21425
- */
21426
- type?: "module" | "commonjs";
21450
+ * Change destination file or folder name.
21451
+ */
21452
+ rename?: string | ((name: string, extension: string, fullPath: string) => string);
21453
+ }
21454
+ type CopyOptions = Arrayable$1<string | CopyEntry>;
21455
+ type CopyOptionsFn = (options: ResolvedConfig) => Awaitable<CopyOptions>; //#endregion
21456
+ //#region src/utils/chunks.d.ts
21457
+ type RolldownChunk = (OutputChunk | OutputAsset) & {
21458
+ outDir: string;
21459
+ };
21460
+ type ChunksByFormat = Partial<Record<NormalizedFormat, RolldownChunk[]>>;
21461
+ interface TsdownBundle extends AsyncDisposable {
21462
+ chunks: RolldownChunk[];
21463
+ config: ResolvedConfig;
21464
+ inlinedDeps: Map<string, Set<string>>;
21465
+ } //#endregion
21466
+ //#region src/features/deps.d.ts
21467
+ type NoExternalFn = (id: string, importer: string | undefined) => boolean | null | undefined | void;
21468
+ interface DepsConfig {
21427
21469
  /**
21428
- * Alternate and extensible alternative to "main" entry point.
21429
- *
21430
- * When using `{type: "module"}`, any ESM module file MUST end with `.mjs` extension.
21431
- *
21432
- * Docs:
21433
- * - https://nodejs.org/docs/latest-v14.x/api/esm.html#esm_exports_sugar
21434
- *
21435
- * @since Node.js v12.7
21436
- */
21437
- exports?: PackageJsonExports;
21470
+ * Mark dependencies as external (not bundled).
21471
+ * Accepts strings, regular expressions, or Rolldown's `ExternalOption`.
21472
+ */
21473
+ neverBundle?: ExternalOption;
21438
21474
  /**
21439
- * Docs:
21440
- * - https://nodejs.org/api/packages.html#imports
21441
- */
21442
- imports?: Record<string, string | Record<string, string>>;
21475
+ * Force dependencies to be bundled, even if they are in `dependencies`, `peerDependencies`, or `optionalDependencies`.
21476
+ */
21477
+ alwaysBundle?: Arrayable$1<string | RegExp> | NoExternalFn;
21443
21478
  /**
21444
- * The field is used to define a set of sub-packages (or workspaces) within a monorepo.
21445
- *
21446
- * This field is an array of glob patterns or an object with specific configurations for managing
21447
- * multiple packages in a single repository.
21448
- */
21449
- workspaces?: string[] | {
21450
- /**
21451
- * Workspace package paths. Glob patterns are supported.
21452
- */
21453
- packages?: string[];
21454
- /**
21455
- * Packages to block from hoisting to the workspace root.
21456
- * Uses glob patterns to match module paths in the dependency tree.
21457
- *
21458
- * Docs:
21459
- * - https://classic.yarnpkg.com/blog/2018/02/15/nohoist/
21460
- */
21461
- nohoist?: string[];
21462
- };
21479
+ * Whitelist of dependencies allowed to be bundled from `node_modules`.
21480
+ * Throws an error if any unlisted dependency is bundled.
21481
+ *
21482
+ * - `undefined` (default): Show warnings for bundled dependencies.
21483
+ * - `false`: Suppress all warnings about bundled dependencies.
21484
+ *
21485
+ * Note: Be sure to include all required sub-dependencies as well.
21486
+ */
21487
+ onlyBundle?: Arrayable$1<string | RegExp> | false;
21463
21488
  /**
21464
- * The field is used to specify different TypeScript declaration files for
21465
- * different versions of TypeScript, allowing for version-specific type definitions.
21466
- */
21467
- typesVersions?: Record<string, Record<string, string[]>>;
21489
+ * @deprecated Use {@link onlyBundle} instead.
21490
+ */
21491
+ onlyAllowBundle?: Arrayable$1<string | RegExp> | false;
21468
21492
  /**
21469
- * You can specify which operating systems your module will run on:
21470
- * ```json
21471
- * {
21472
- * "os": ["darwin", "linux"]
21473
- * }
21474
- * ```
21475
- * You can also block instead of allowing operating systems, just prepend the blocked os with a '!':
21476
- * ```json
21477
- * {
21478
- * "os": ["!win32"]
21479
- * }
21480
- * ```
21481
- * The host operating system is determined by `process.platform`
21482
- * It is allowed to both block and allow an item, although there isn't any good reason to do this.
21483
- */
21484
- os?: string[];
21493
+ * Skip bundling all `node_modules` dependencies.
21494
+ *
21495
+ * **Note:** This option cannot be used together with `alwaysBundle`.
21496
+ *
21497
+ * @default false
21498
+ */
21499
+ skipNodeModulesBundle?: boolean;
21500
+ }
21501
+ interface ResolvedDepsConfig {
21502
+ neverBundle?: ExternalOption;
21503
+ alwaysBundle?: NoExternalFn;
21504
+ onlyBundle?: Array<string | RegExp> | false;
21505
+ skipNodeModulesBundle: boolean;
21506
+ }
21507
+ //#endregion
21508
+ //#region src/features/devtools.d.ts
21509
+ interface DevtoolsOptions extends NonNullable<InputOptions["devtools"]> {
21485
21510
  /**
21486
- * If your code only runs on certain cpu architectures, you can specify which ones.
21487
- * ```json
21488
- * {
21489
- * "cpu": ["x64", "ia32"]
21490
- * }
21491
- * ```
21492
- * Like the `os` option, you can also block architectures:
21493
- * ```json
21494
- * {
21495
- * "cpu": ["!arm", "!mips"]
21496
- * }
21497
- * ```
21498
- * The host architecture is determined by `process.arch`
21499
- */
21500
- cpu?: string[];
21511
+ * **[experimental]** Enable devtools integration. `@vitejs/devtools` must be installed as a dependency.
21512
+ *
21513
+ * Defaults to true, if `@vitejs/devtools` is installed.
21514
+ */
21515
+ ui?: boolean | Partial<StartOptions>;
21501
21516
  /**
21502
- * This is a set of config values that will be used at publish-time.
21503
- */
21504
- publishConfig?: {
21505
- /**
21506
- * The registry that will be used if the package is published.
21507
- */
21508
- registry?: string;
21509
- /**
21510
- * The tag that will be used if the package is published.
21511
- */
21512
- tag?: string;
21513
- /**
21514
- * The access level that will be used if the package is published.
21515
- */
21516
- access?: "public" | "restricted";
21517
- /**
21518
- * **pnpm-only**
21519
- *
21520
- * By default, for portability reasons, no files except those listed in
21521
- * the bin field will be marked as executable in the resulting package
21522
- * archive. The executableFiles field lets you declare additional fields
21523
- * that must have the executable flag (+x) set even if
21524
- * they aren't directly accessible through the bin field.
21525
- */
21526
- executableFiles?: string[];
21527
- /**
21528
- * **pnpm-only**
21529
- *
21530
- * You also can use the field `publishConfig.directory` to customize
21531
- * the published subdirectory relative to the current `package.json`.
21532
- *
21533
- * It is expected to have a modified version of the current package in
21534
- * the specified directory (usually using third party build tools).
21535
- */
21536
- directory?: string;
21537
- /**
21538
- * **pnpm-only**
21539
- *
21540
- * When set to `true`, the project will be symlinked from the
21541
- * `publishConfig.directory` location during local development.
21542
- * @default true
21543
- */
21544
- linkDirectory?: boolean;
21545
- } & Pick<PackageJson, "bin" | "main" | "exports" | "types" | "typings" | "module" | "browser" | "unpkg" | "typesVersions" | "os" | "cpu">;
21517
+ * Clean devtools stale sessions.
21518
+ *
21519
+ * @default true
21520
+ */
21521
+ clean?: boolean;
21522
+ } //#endregion
21523
+ //#region src/features/exe.d.ts
21524
+ interface ExeOptions extends ExeExtensionOptions {
21525
+ seaConfig?: Omit<SeaConfig, "main" | "output" | "mainFormat">;
21546
21526
  /**
21547
- * See: https://nodejs.org/api/packages.html#packagemanager
21548
- * This field defines which package manager is expected to be used when working on the current project.
21549
- * Should be of the format: `<name>@<version>[#hash]`
21550
- */
21551
- packageManager?: string;
21552
- [key: string]: any;
21527
+ * Output file name without any suffix or extension.
21528
+ * For example, do not include `.exe`, platform suffixes, or architecture suffixes.
21529
+ */
21530
+ fileName?: string | ((chunk: RolldownChunk) => string);
21531
+ /**
21532
+ * Output directory for executables.
21533
+ * @default 'build'
21534
+ */
21535
+ outDir?: string;
21553
21536
  }
21554
21537
  /**
21555
- * See: https://docs.npmjs.com/cli/v11/using-npm/scripts#pre--post-scripts
21556
- */
21557
- type PackageJsonScriptWithPreAndPost<S extends string> = S | `${"pre" | "post"}${S}`;
21558
- /**
21559
- * See: https://docs.npmjs.com/cli/v11/using-npm/scripts#life-cycle-operation-order
21560
- */
21561
- type PackageJsonNpmLifeCycleScripts = "dependencies" | "prepublishOnly" | PackageJsonScriptWithPreAndPost<"install" | "pack" | "prepare" | "publish" | "restart" | "start" | "stop" | "test" | "version">;
21562
- /**
21563
- * See: https://pnpm.io/scripts#lifecycle-scripts
21564
- */
21565
- type PackageJsonPnpmLifeCycleScripts = "pnpm:devPreinstall";
21566
- type PackageJsonCommonScripts = "build" | "coverage" | "deploy" | "dev" | "format" | "lint" | "preview" | "release" | "typecheck" | "watch";
21567
- type PackageJsonScriptName = PackageJsonCommonScripts | PackageJsonNpmLifeCycleScripts | PackageJsonPnpmLifeCycleScripts | (string & {});
21568
- type PackageJsonScripts = { [P in PackageJsonScriptName]?: string };
21569
- /**
21570
- * A “person” is an object with a “name” field and optionally “url” and “email”. Or you can shorten that all into a single string, and npm will parse it for you.
21571
- */
21572
- type PackageJsonPerson = string | {
21573
- name: string;
21574
- email?: string;
21575
- url?: string;
21576
- };
21577
- type PackageJsonFunding = string | {
21578
- url: string;
21579
- type?: string;
21580
- };
21581
- type PackageJsonExportKey = "." | "import" | "require" | "types" | "node" | "browser" | "default" | (string & {});
21582
- type PackageJsonExportsObject = { [P in PackageJsonExportKey]?: string | PackageJsonExportsObject | Array<string | PackageJsonExportsObject> };
21583
- type PackageJsonExports = string | PackageJsonExportsObject | Array<string | PackageJsonExportsObject>;
21538
+ * See also [Node.js SEA Documentation](https://nodejs.org/api/single-executable-applications.html#generating-single-executable-applications-with---build-sea)
21539
+ *
21540
+ * Note some default values are different from Node.js defaults to optimize for typical use cases (e.g. disabling experimental warning, enabling code cache). These can be overridden.
21541
+ */
21542
+ interface SeaConfig {
21543
+ main?: string;
21544
+ /** Optional, if not specified, uses the current Node.js binary */
21545
+ executable?: string;
21546
+ output?: string;
21547
+ mainFormat?: "commonjs" | "module";
21548
+ /** @default true */
21549
+ disableExperimentalSEAWarning?: boolean;
21550
+ /** @default false */
21551
+ useSnapshot?: boolean;
21552
+ /** @default false */
21553
+ useCodeCache?: boolean;
21554
+ execArgv?: string[];
21555
+ /** @default "env" */
21556
+ execArgvExtension?: "none" | "env" | "cli";
21557
+ assets?: Record<string, string>;
21558
+ } //#endregion
21559
+ //#region src/features/hooks.d.ts
21560
+ interface BuildContext {
21561
+ options: ResolvedConfig;
21562
+ hooks: Hookable<TsdownHooks>;
21563
+ }
21564
+ interface RolldownContext {
21565
+ buildOptions: BuildOptions$1;
21566
+ }
21584
21567
  /**
21585
- * Defines a PackageJson structure.
21586
- * @param pkg - The `package.json` content as an object. See {@link PackageJson}.
21587
- * @returns the same `package.json` object.
21588
- */
21589
- //#endregion
21568
+ * Hooks for tsdown.
21569
+ */
21570
+ interface TsdownHooks {
21571
+ /**
21572
+ * Invoked before each tsdown build starts.
21573
+ * Use this hook to perform setup or preparation tasks.
21574
+ */
21575
+ "build:prepare": (ctx: BuildContext) => void | Promise<void>;
21576
+ /**
21577
+ * Invoked before each Rolldown build.
21578
+ * For dual-format builds, this hook is called for each format.
21579
+ * Useful for configuring or modifying the build context before bundling.
21580
+ */
21581
+ "build:before": (ctx: BuildContext & RolldownContext) => void | Promise<void>;
21582
+ /**
21583
+ * Invoked after each tsdown build completes.
21584
+ * Use this hook for cleanup or post-processing tasks.
21585
+ */
21586
+ "build:done": (ctx: BuildContext & {
21587
+ chunks: RolldownChunk[];
21588
+ }) => void | Promise<void>;
21589
+ } //#endregion
21590
21590
  //#region src/utils/package.d.ts
21591
21591
  interface PackageJsonWithPath extends PackageJson {
21592
21592
  packageJsonPath: string;
@@ -21661,7 +21661,7 @@ interface AttwOptions extends CheckPackageOptions {
21661
21661
  * ignoreRules: ['no-resolution', 'false-cjs']
21662
21662
  * ```
21663
21663
  */
21664
- ignoreRules?: string[];
21664
+ ignoreRules?: ("no-resolution" | "untyped-resolution" | "false-cjs" | "false-esm" | "cjs-resolves-to-esm" | "fallback-condition" | "cjs-only-exports-default" | "named-exports" | "false-export-default" | "missing-export-equals" | "unexpected-module-syntax" | "internal-resolution-error" | (string & {}))[];
21665
21665
  } //#endregion
21666
21666
  //#region src/features/pkg/exports.d.ts
21667
21667
  interface ExportsOptions {
@@ -21735,6 +21735,18 @@ interface ExportsOptions {
21735
21735
  */
21736
21736
  inlinedDependencies?: boolean;
21737
21737
  /**
21738
+ * Add file extensions to subpath export keys.
21739
+ *
21740
+ * When enabled, all subpath exports (except the root `"."`) will include
21741
+ * a `.js` extension in the key (e.g., `"./utils.js"` instead of `"./utils"`).
21742
+ *
21743
+ * This follows the Node.js recommendation for subpath exports:
21744
+ * @see {@link https://nodejs.org/api/packages.html#extensions-in-subpaths}
21745
+ *
21746
+ * @default false
21747
+ */
21748
+ extensions?: boolean;
21749
+ /**
21738
21750
  * Auto-generate the `bin` field in package.json.
21739
21751
  *
21740
21752
  * - `true`: Auto-detect entry chunks with shebangs. Uses package name (without scope) as bin name.
@@ -21896,7 +21908,7 @@ interface UserConfig {
21896
21908
  * If not set, defaults to the value of `engines.node` in your project's `package.json`.
21897
21909
  * If no `engines.node` field exists, no syntax transformations are applied.
21898
21910
  *
21899
- * Accepts a single target (e.g., `'es2020'`, `'node18'`), an array of targets, or `false` to disable all transformations.
21911
+ * Accepts a single target (e.g., `'es2020'`, `'node18'`, `'baseline-widely-available'`), an array of targets, or `false` to disable all transformations.
21900
21912
  *
21901
21913
  * @see {@link https://tsdown.dev/options/target#supported-targets} for a list of valid targets and more details.
21902
21914
  *
@@ -22283,7 +22295,7 @@ type ResolvedConfig = Overwrite<MarkPartial<Omit<UserConfig, "workspace" | "from
22283
22295
  exe: false | ExeOptions;
22284
22296
  }>; //#endregion
22285
22297
  //#endregion
22286
- //#region ../../node_modules/.pnpm/tsdown@0.21.7_@arethetypeswrong+core@0.18.2_@tsdown+css@0.21.7_@tsdown+exe@0.21.7_@type_40fa21a6dd0aac837d14f6503ecc360a/node_modules/tsdown/dist/config-BJiwtsMo.d.mts
22298
+ //#region ../../node_modules/.pnpm/tsdown@0.21.8_@arethetypeswrong+core@0.18.2_@tsdown+css@0.21.8_@tsdown+exe@0.21.8_@type_bf863151738d83584e36df49913526fa/node_modules/tsdown/dist/config-BjpbFAQr.d.mts
22287
22299
  //#region src/config/options.d.ts
22288
22300
  /**
22289
22301
  * Resolve user config into resolved configs
@@ -22303,7 +22315,7 @@ declare function defineConfig(options: UserConfig[]): UserConfig[];
22303
22315
  declare function defineConfig(options: UserConfigFn): UserConfigFn;
22304
22316
  declare function defineConfig(options: UserConfigExport): UserConfigExport; //#endregion
22305
22317
  //#endregion
22306
- //#region ../../node_modules/.pnpm/tsdown@0.21.7_@arethetypeswrong+core@0.18.2_@tsdown+css@0.21.7_@tsdown+exe@0.21.7_@type_40fa21a6dd0aac837d14f6503ecc360a/node_modules/tsdown/dist/index.d.mts
22318
+ //#region ../../node_modules/.pnpm/tsdown@0.21.8_@arethetypeswrong+core@0.18.2_@tsdown+css@0.21.8_@tsdown+exe@0.21.8_@type_bf863151738d83584e36df49913526fa/node_modules/tsdown/dist/index.d.mts
22307
22319
  //#region src/build.d.ts
22308
22320
  /**
22309
22321
  * Build with tsdown.