@stencil/core 5.0.0-next.0 → 5.0.0-rc.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +94 -0
- package/bin/stencil.mjs +1 -1
- package/dist/app-data/index.d.ts +2 -0
- package/dist/{runtime/app-data → app-data}/index.js +23 -15
- package/dist/{runtime/app-globals → app-globals}/index.js +1 -2
- package/dist/client-ClM4H9-P.mjs +2496 -0
- package/dist/compiler/browser.d.ts +1573 -0
- package/dist/compiler/browser.js +16998 -0
- package/dist/compiler/index.d.mts +284 -7
- package/dist/compiler/index.mjs +3 -9
- package/dist/compiler/utils/index.d.mts +272 -3
- package/dist/compiler/utils/index.mjs +4 -5
- package/dist/{transpile-CJQcQEVa.mjs → compiler-DFanjq9z.mjs} +20984 -15554
- package/dist/declarations/stencil-ext-modules.d.ts +8 -8
- package/dist/declarations/stencil-public-compiler.d.ts +1016 -840
- package/dist/declarations/stencil-public-compiler.js +3 -5
- package/dist/declarations/stencil-public-docs.d.ts +441 -376
- package/dist/declarations/stencil-public-docs.js +0 -0
- package/dist/declarations/stencil-public-runtime.d.ts +361 -113
- package/dist/fragment-Di1hWOC8.mjs +4 -0
- package/dist/helpers-Cpp3qc3u.mjs +524 -0
- package/dist/{index-szczUd2l.d.mts → index-DvfFOkiJ.d.mts} +1466 -2044
- package/dist/{stencil-private-Cgcr414u.d.ts → index-XQHZl0MW.d.ts} +308 -114
- package/dist/index-aBMJC5F9.d.mts +104 -0
- package/dist/index.d.mts +14 -2
- package/dist/index.mjs +171 -4
- package/dist/jsx-runtime.d.mts +24 -0
- package/dist/jsx-runtime.mjs +3 -0
- package/dist/mock-doc.mjs +2 -3
- package/dist/{node-sys-BGURUNOZ.mjs → node-DJP8JuAS.mjs} +176 -197
- package/dist/rolldown-runtime-BhDjJH2R.mjs +15 -0
- package/dist/{client-DR9zhmKG.mjs → runtime/client/lazy.js} +3780 -2652
- package/dist/runtime/client/{index.d.ts → runtime.d.ts} +516 -227
- package/dist/runtime/client/{index.js → runtime.js} +3588 -2856
- package/dist/runtime/index.d.ts +90 -72
- package/dist/runtime/index.js +3461 -2837
- package/dist/runtime/server/index.d.mts +243 -219
- package/dist/runtime/server/index.mjs +3763 -3352
- package/dist/runtime/server/runner.d.mts +114 -47
- package/dist/runtime/server/runner.mjs +12710 -763
- package/dist/signals/index.d.ts +58 -0
- package/dist/signals/index.js +182 -0
- package/dist/sys/node/index.d.mts +1 -3
- package/dist/sys/node/index.mjs +2 -7
- package/dist/sys/node/worker.d.mts +1 -1
- package/dist/sys/node/worker.mjs +3 -12
- package/dist/testing/index.d.mts +4763 -12
- package/dist/testing/index.mjs +7939 -619
- package/dist/util-C-H1H84W.mjs +731 -0
- package/dist/validation-ByYYKvnS.mjs +825 -0
- package/package.json +91 -59
- package/dist/chunk-ClPoSABd.mjs +0 -21
- package/dist/index-Bxo2jCf6.d.mts +0 -77
- package/dist/runtime/app-data/index.d.ts +0 -30
- package/dist/serialize-BJvhE9aQ.mjs +0 -775
- package/dist/validation-BdcPruW_.mjs +0 -1451
- /package/{LICENSE.md → LICENSE} +0 -0
- /package/dist/{runtime/app-globals → app-globals}/index.d.ts +0 -0
|
@@ -1,16 +1,6 @@
|
|
|
1
1
|
import { Diagnostic, Node as Node$1 } from "typescript";
|
|
2
|
-
import {
|
|
2
|
+
import { InputOptions, OutputOptions, Plugin, RolldownError, SourceMap } from "rolldown";
|
|
3
3
|
import { Serializable } from "child_process";
|
|
4
|
-
|
|
5
|
-
//#region src/utils/byte-size.d.ts
|
|
6
|
-
/**
|
|
7
|
-
* Used to learn the size of a string in bytes.
|
|
8
|
-
*
|
|
9
|
-
* @param str The string to measure
|
|
10
|
-
* @returns number
|
|
11
|
-
*/
|
|
12
|
-
declare const byteSize: (str: string) => number;
|
|
13
|
-
//#endregion
|
|
14
4
|
//#region src/utils/constants.d.ts
|
|
15
5
|
declare const MEMBER_FLAGS: {
|
|
16
6
|
readonly String: number;
|
|
@@ -44,10 +34,6 @@ declare const LISTENER_FLAGS: {
|
|
|
44
34
|
readonly TargetDocument: number;
|
|
45
35
|
readonly TargetWindow: number;
|
|
46
36
|
readonly TargetBody: number;
|
|
47
|
-
/**
|
|
48
|
-
* @deprecated Prevented from new apps, but left in for older collections
|
|
49
|
-
*/
|
|
50
|
-
readonly TargetParent: number;
|
|
51
37
|
};
|
|
52
38
|
declare const HOST_FLAGS: {
|
|
53
39
|
readonly hasConnected: number;
|
|
@@ -60,6 +46,18 @@ declare const HOST_FLAGS: {
|
|
|
60
46
|
readonly isWatchReady: number;
|
|
61
47
|
readonly isListenReady: number;
|
|
62
48
|
readonly needsRerender: number;
|
|
49
|
+
/**
|
|
50
|
+
* Set once this component's real (lazy-loaded) `connectedCallback` has fired for
|
|
51
|
+
* the first time. Lets a descendant skip creating/awaiting a connect-promise for
|
|
52
|
+
* an ancestor that's already connected. See {@link HostRef.$onFirstConnectResolve$}.
|
|
53
|
+
*/
|
|
54
|
+
readonly hasFiredConnected: number;
|
|
55
|
+
/**
|
|
56
|
+
* Set when a lazy component's dynamic `import()` fails to resolve a
|
|
57
|
+
* constructor. Distinct from `hasInitializedComponent` being unset, which
|
|
58
|
+
* is true while an initialization attempt is merely queued/in-flight.
|
|
59
|
+
*/
|
|
60
|
+
readonly hasFailedLoad: number;
|
|
63
61
|
readonly devOnRender: number;
|
|
64
62
|
readonly devOnDidLoad: number;
|
|
65
63
|
};
|
|
@@ -84,13 +82,6 @@ declare const CMP_FLAGS: {
|
|
|
84
82
|
* Used to determine if a component does not use the shadow DOM _and_ has `<slot/>` tags in its markup.
|
|
85
83
|
*/
|
|
86
84
|
readonly hasSlotRelocation: number;
|
|
87
|
-
/**
|
|
88
|
-
* Determines if a shim for the shadow DOM is necessary.
|
|
89
|
-
*
|
|
90
|
-
* The shim should only be needed if a component requires {@link shadowDomEncapsulation} and if any output
|
|
91
|
-
* target-specific criteria are met. Refer to this flag's usage to determine each output target's criteria.
|
|
92
|
-
*/
|
|
93
|
-
readonly needsShadowDomShim: number;
|
|
94
85
|
/**
|
|
95
86
|
* Determines if `delegatesFocus` is enabled for a component that uses the shadow DOM.
|
|
96
87
|
* e.g. `shadow: { delegatesFocus: true }` is set on the `@Component()` decorator
|
|
@@ -101,10 +92,7 @@ declare const CMP_FLAGS: {
|
|
|
101
92
|
*/
|
|
102
93
|
readonly hasMode: number;
|
|
103
94
|
/**
|
|
104
|
-
* Determines if styles must be scoped
|
|
105
|
-
* 1. A component is using scoped stylesheets ({@link scopedCssEncapsulation})
|
|
106
|
-
* 2. A component is using the shadow DOM _and_ the output target's rules for requiring a shadow DOM shim have been
|
|
107
|
-
* met ({@link needsShadowDomShim})
|
|
95
|
+
* Determines if styles must be scoped - i.e. the component uses scoped stylesheets.
|
|
108
96
|
*/
|
|
109
97
|
readonly needsScopedEncapsulation: number;
|
|
110
98
|
/**
|
|
@@ -130,6 +118,42 @@ declare const CMP_FLAGS: {
|
|
|
130
118
|
* e.g. `shadow: { slotAssignment: 'manual' }` is set on the `@Component()` decorator
|
|
131
119
|
*/
|
|
132
120
|
readonly shadowSlotAssignmentManual: number;
|
|
121
|
+
/**
|
|
122
|
+
* Determines if the shadow DOM mode is 'closed'.
|
|
123
|
+
* e.g. `encapsulation: { type: 'shadow', mode: 'closed' }` is set on the `@Component()` decorator
|
|
124
|
+
*/
|
|
125
|
+
readonly shadowModeClosed: number;
|
|
126
|
+
/**
|
|
127
|
+
* Determines if the component should patch child node accessors for slot handling.
|
|
128
|
+
* e.g. `encapsulation: { type: 'none', patches: ['children'] }`
|
|
129
|
+
*/
|
|
130
|
+
readonly patchChildren: number;
|
|
131
|
+
/**
|
|
132
|
+
* Determines if the component should patch cloneNode() for slot handling.
|
|
133
|
+
* e.g. `encapsulation: { type: 'none', patches: ['clone'] }`
|
|
134
|
+
*/
|
|
135
|
+
readonly patchClone: number;
|
|
136
|
+
/**
|
|
137
|
+
* Determines if the component should patch appendChild/insertBefore for slot handling.
|
|
138
|
+
* e.g. `encapsulation: { type: 'none', patches: ['insert'] }`
|
|
139
|
+
*/
|
|
140
|
+
readonly patchInsert: number;
|
|
141
|
+
/**
|
|
142
|
+
* Determines if the component should apply all slot patches.
|
|
143
|
+
* e.g. `encapsulation: { type: 'none', patches: ['all'] }`
|
|
144
|
+
* Equivalent to the global `experimentalSlotFixes` config option.
|
|
145
|
+
*/
|
|
146
|
+
readonly patchAll: number;
|
|
147
|
+
/**
|
|
148
|
+
* Determines if `clonable` is enabled for a component that uses the shadow DOM.
|
|
149
|
+
* e.g. `encapsulation: { type: 'shadow', clonable: true }` is set on the `@Component()` decorator
|
|
150
|
+
*/
|
|
151
|
+
readonly shadowClonable: number;
|
|
152
|
+
/**
|
|
153
|
+
* Determines if `serializable` is enabled for a component that uses the shadow DOM.
|
|
154
|
+
* e.g. `encapsulation: { type: 'shadow', serializable: true }` is set on the `@Component()` decorator
|
|
155
|
+
*/
|
|
156
|
+
readonly shadowSerializable: number;
|
|
133
157
|
};
|
|
134
158
|
/**
|
|
135
159
|
* Default style mode id
|
|
@@ -145,6 +169,7 @@ declare const XLINK_NS = "http://www.w3.org/1999/xlink";
|
|
|
145
169
|
* File names and value
|
|
146
170
|
*/
|
|
147
171
|
declare const COLLECTION_MANIFEST_FILE_NAME = "collection-manifest.json";
|
|
172
|
+
declare const COLLECTION_APP_DATA_FILE_NAME = "app-data.js";
|
|
148
173
|
/**
|
|
149
174
|
* Constant for the 'copy' output target
|
|
150
175
|
*/
|
|
@@ -154,37 +179,54 @@ declare const COPY = "copy";
|
|
|
154
179
|
*/
|
|
155
180
|
declare const CUSTOM = "custom";
|
|
156
181
|
/**
|
|
157
|
-
* Constant for the '
|
|
182
|
+
* Constant for the 'loader-bundle' output target
|
|
183
|
+
* (formerly 'dist' in v4)
|
|
184
|
+
*/
|
|
185
|
+
declare const LOADER_BUNDLE = "loader-bundle";
|
|
186
|
+
/**
|
|
187
|
+
* Constant for the 'standalone' output target
|
|
188
|
+
* (formerly 'dist-custom-elements' in v4)
|
|
158
189
|
*/
|
|
159
|
-
declare const
|
|
190
|
+
declare const STANDALONE = "standalone";
|
|
160
191
|
/**
|
|
161
|
-
* Constant for the '
|
|
192
|
+
* Constant for the 'ssr' output target
|
|
193
|
+
* (formerly 'dist-hydrate-script' in v4)
|
|
162
194
|
*/
|
|
163
|
-
declare const
|
|
195
|
+
declare const SSR = "ssr";
|
|
164
196
|
/**
|
|
165
|
-
* Constant for the '
|
|
197
|
+
* Constant for the 'ssr-wasm' output target.
|
|
198
|
+
* Compiles the SSR script to a WASM binary via javy for use in any WASM-capable host
|
|
199
|
+
* (PHP, Java, Ruby, Go, etc.) without requiring a JavaScript runtime.
|
|
166
200
|
*/
|
|
167
|
-
declare const
|
|
201
|
+
declare const SSR_WASM = "ssr-wasm";
|
|
168
202
|
/**
|
|
169
|
-
* Constant for the '
|
|
203
|
+
* Constant for the 'collection' output target
|
|
204
|
+
* (formerly 'dist-collection' sub-output in v4)
|
|
205
|
+
*
|
|
206
|
+
* Contains transpiled source + metadata for downstream Stencil projects
|
|
207
|
+
* to re-compile/bundle.
|
|
170
208
|
*/
|
|
171
|
-
declare const
|
|
209
|
+
declare const COLLECTION = "collection";
|
|
172
210
|
/**
|
|
173
|
-
* Constant for the '
|
|
211
|
+
* Constant for the 'types' output target
|
|
212
|
+
* (formerly 'dist-types' sub-output in v4)
|
|
174
213
|
*/
|
|
175
|
-
declare const
|
|
214
|
+
declare const TYPES = "types";
|
|
176
215
|
/**
|
|
177
|
-
* Constant for the '
|
|
216
|
+
* Constant for the 'global-style' output target
|
|
217
|
+
* Outputs global styles to a unified location available to all distributions.
|
|
178
218
|
*/
|
|
179
|
-
declare const
|
|
219
|
+
declare const GLOBAL_STYLE = "global-style";
|
|
180
220
|
/**
|
|
181
|
-
* Constant for the '
|
|
221
|
+
* Constant for the 'assets' output target
|
|
222
|
+
* Copies component assetsDirs to a unified location available to all distributions.
|
|
182
223
|
*/
|
|
183
|
-
declare const
|
|
224
|
+
declare const ASSETS = "assets";
|
|
184
225
|
/**
|
|
185
|
-
*
|
|
226
|
+
* Internal constant for the 'dist-lazy' output target
|
|
227
|
+
* (used by loader-bundle and www)
|
|
186
228
|
*/
|
|
187
|
-
declare const
|
|
229
|
+
declare const DIST_LAZY = "dist-lazy";
|
|
188
230
|
/**
|
|
189
231
|
* Constant for the 'docs-custom' output target
|
|
190
232
|
*/
|
|
@@ -205,6 +247,10 @@ declare const DOCS_VSCODE = "docs-vscode";
|
|
|
205
247
|
* Constant for the 'docs-custom-elements-manifest' output target
|
|
206
248
|
*/
|
|
207
249
|
declare const DOCS_CUSTOM_ELEMENTS_MANIFEST = "docs-custom-elements-manifest";
|
|
250
|
+
/**
|
|
251
|
+
* Constant for the 'docs-agent-skill' output target
|
|
252
|
+
*/
|
|
253
|
+
declare const DOCS_AGENT_SKILL = "docs-agent-skill";
|
|
208
254
|
/**
|
|
209
255
|
* Constant for the 'stats' output target
|
|
210
256
|
*/
|
|
@@ -216,13 +262,14 @@ declare const WWW = "www";
|
|
|
216
262
|
/**
|
|
217
263
|
* Valid output targets to specify in a Stencil config.
|
|
218
264
|
*
|
|
219
|
-
* Note that
|
|
220
|
-
* programmatically
|
|
221
|
-
*
|
|
222
|
-
*
|
|
265
|
+
* Note that some internal output targets (e.g. `DIST_LAZY`, `DIST_GLOBAL_STYLES`)
|
|
266
|
+
* are programmatically created by the compiler and are not user-configurable.
|
|
267
|
+
*
|
|
268
|
+
* In v5, `TYPES` and `COLLECTION` are auto-generated in production builds unless explicitly configured.
|
|
223
269
|
*/
|
|
224
|
-
declare const VALID_CONFIG_OUTPUT_TARGETS: readonly ["www", "
|
|
270
|
+
declare const VALID_CONFIG_OUTPUT_TARGETS: readonly ["www", "loader-bundle", "standalone", "ssr", "ssr-wasm", "collection", "types", "global-style", "assets", "dist", "dist-custom-elements", "dist-hydrate-script", "dist-collection", "dist-types", "docs-json", "docs-readme", "docs-vscode", "docs-custom", "docs-custom-elements-manifest", "docs-agent-skill", "copy", "custom", "stats"];
|
|
225
271
|
declare const GENERATED_DTS = "components.d.ts";
|
|
272
|
+
declare const STYLE_EXT: string[];
|
|
226
273
|
/**
|
|
227
274
|
* DOM Node types
|
|
228
275
|
*
|
|
@@ -247,42 +294,6 @@ declare const NODE_TYPES: {
|
|
|
247
294
|
readonly DOCUMENT_FRAGMENT_NODE: 11;
|
|
248
295
|
readonly NOTATION_NODE: 12;
|
|
249
296
|
};
|
|
250
|
-
/**
|
|
251
|
-
* Represents a primitive type.
|
|
252
|
-
* Described in https://w3c.github.io/webdriver-bidi/#type-script-PrimitiveProtocolValue.
|
|
253
|
-
*/
|
|
254
|
-
declare const PrimitiveType: {
|
|
255
|
-
readonly Undefined: "undefined";
|
|
256
|
-
readonly Null: "null";
|
|
257
|
-
readonly String: "string";
|
|
258
|
-
readonly Number: "number";
|
|
259
|
-
readonly SpecialNumber: "number";
|
|
260
|
-
readonly Boolean: "boolean";
|
|
261
|
-
readonly BigInt: "bigint";
|
|
262
|
-
};
|
|
263
|
-
type PrimitiveTypeValue = (typeof PrimitiveType)[keyof typeof PrimitiveType];
|
|
264
|
-
/**
|
|
265
|
-
* Represents a non-primitive type.
|
|
266
|
-
* Described in https://w3c.github.io/webdriver-bidi/#type-script-RemoteValue.
|
|
267
|
-
* @deprecated will be removed in v5. Use `@AttrDeserialize()` / `@PropDeserialize()` decorators instead.
|
|
268
|
-
*/
|
|
269
|
-
declare const NonPrimitiveType: {
|
|
270
|
-
readonly Array: "array";
|
|
271
|
-
readonly Date: "date";
|
|
272
|
-
readonly Map: "map";
|
|
273
|
-
readonly Object: "object";
|
|
274
|
-
readonly RegularExpression: "regexp";
|
|
275
|
-
readonly Set: "set";
|
|
276
|
-
readonly Channel: "channel";
|
|
277
|
-
readonly Symbol: "symbol";
|
|
278
|
-
};
|
|
279
|
-
type NonPrimitiveTypeValue = (typeof NonPrimitiveType)[keyof typeof NonPrimitiveType];
|
|
280
|
-
/** @deprecated will be removed in v5. Use `@AttrDeserialize()` / `@PropDeserialize()` decorators instead. */
|
|
281
|
-
declare const TYPE_CONSTANT = "type";
|
|
282
|
-
/** @deprecated will be removed in v5. Use `@AttrDeserialize()` / `@PropDeserialize()` decorators instead. */
|
|
283
|
-
declare const VALUE_CONSTANT = "value";
|
|
284
|
-
/** @deprecated will be removed in v5. Use `@AttrDeserialize()` / `@PropDeserialize()` decorators instead. */
|
|
285
|
-
declare const SERIALIZED_PREFIX = "serialized:";
|
|
286
297
|
//#endregion
|
|
287
298
|
//#region src/utils/format-component-runtime-meta.d.ts
|
|
288
299
|
declare const formatLazyBundleRuntimeMeta: (bundleId: any, cmps: ComponentCompilerMeta[]) => LazyBundleRuntimeData;
|
|
@@ -297,339 +308,9 @@ declare const formatLazyBundleRuntimeMeta: (bundleId: any, cmps: ComponentCompil
|
|
|
297
308
|
declare const formatComponentRuntimeMeta: (compilerMeta: ComponentCompilerMeta, includeMethods: boolean) => ComponentRuntimeMetaCompact;
|
|
298
309
|
declare const stringifyRuntimeData: (data: any) => string;
|
|
299
310
|
//#endregion
|
|
300
|
-
//#region src/utils/
|
|
301
|
-
declare const
|
|
302
|
-
|
|
303
|
-
* Convert a string from PascalCase to dash-case
|
|
304
|
-
*
|
|
305
|
-
* @param str the string to convert
|
|
306
|
-
* @returns a converted string
|
|
307
|
-
*/
|
|
308
|
-
declare const toDashCase: (str: string) => string;
|
|
309
|
-
/**
|
|
310
|
-
* Convert a string from dash-case / kebab-case to PascalCase (or CamelCase,
|
|
311
|
-
* or whatever you call it!)
|
|
312
|
-
*
|
|
313
|
-
* @param str a string to convert
|
|
314
|
-
* @returns a converted string
|
|
315
|
-
*/
|
|
316
|
-
declare const dashToPascalCase: (str: string) => string;
|
|
317
|
-
/**
|
|
318
|
-
* Convert a string to 'camelCase'
|
|
319
|
-
*
|
|
320
|
-
* @param str the string to convert
|
|
321
|
-
* @returns the converted string
|
|
322
|
-
*/
|
|
323
|
-
declare const toCamelCase: (str: string) => string;
|
|
324
|
-
/**
|
|
325
|
-
* Capitalize the first letter of a string
|
|
326
|
-
*
|
|
327
|
-
* @param str the string to capitalize
|
|
328
|
-
* @returns a capitalized string
|
|
329
|
-
*/
|
|
330
|
-
declare const toTitleCase: (str: string) => string;
|
|
331
|
-
/**
|
|
332
|
-
* Escapes all occurrences of a specified pattern in a string.
|
|
333
|
-
* @description This function replaces all matches of a given pattern in the input text with a specified replacement string.
|
|
334
|
-
* It can handle both string and regular expression patterns and allows toggling between global and single-match replacements.
|
|
335
|
-
* @param {string} text - The input string to process.
|
|
336
|
-
* @param {RegExp | string} pattern - The pattern to search for in the input string. Can be a regular expression or a string.
|
|
337
|
-
* @param {string} replacement - The string to replace each match with.
|
|
338
|
-
* @param {boolean} [replaceAll=true] - Whether to replace all occurrences (`true`) or just the first occurrence (`false`). Defaults to `true`.
|
|
339
|
-
* @returns {string} The processed string with the replacements applied.
|
|
340
|
-
* @example
|
|
341
|
-
* @see src\utils\util.ts
|
|
342
|
-
*/
|
|
343
|
-
declare const escapeWithPattern: (text: string, pattern: RegExp | string, replacement: string, replaceAll?: boolean) => string;
|
|
344
|
-
/**
|
|
345
|
-
* This is just a no-op, don't expect it to do anything.
|
|
346
|
-
*/
|
|
347
|
-
declare const noop: () => any;
|
|
348
|
-
/**
|
|
349
|
-
* Check whether a value is a 'complex type', defined here as an object or a
|
|
350
|
-
* function.
|
|
351
|
-
*
|
|
352
|
-
* @param o the value to check
|
|
353
|
-
* @returns whether it's a complex type or not
|
|
354
|
-
*/
|
|
355
|
-
declare const isComplexType: (o: unknown) => boolean;
|
|
356
|
-
/**
|
|
357
|
-
* Sort an array without mutating it in-place (as `Array.prototype.sort`
|
|
358
|
-
* unfortunately does)
|
|
359
|
-
*
|
|
360
|
-
* @param array the array you'd like to sort
|
|
361
|
-
* @param prop a function for deriving sortable values (strings or numbers)
|
|
362
|
-
* from array members
|
|
363
|
-
* @returns a new array of all items `x` in `array` ordered by `prop(x)`
|
|
364
|
-
*/
|
|
365
|
-
declare const sortBy: <T>(array: T[], prop: (item: T) => string | number) => T[];
|
|
366
|
-
/**
|
|
367
|
-
* A polyfill of sorts for `Array.prototype.flat` which will return the result
|
|
368
|
-
* of calling that method if present and, if not, return an equivalent based on
|
|
369
|
-
* `Array.prototype.reduce`.
|
|
370
|
-
*
|
|
371
|
-
* @param array the array to flatten (one level)
|
|
372
|
-
* @returns a flattened array
|
|
373
|
-
*/
|
|
374
|
-
declare const flatOne: <T>(array: T[][]) => T[];
|
|
375
|
-
/**
|
|
376
|
-
* Deduplicate an array, retaining items at the earliest position in which
|
|
377
|
-
* they appear.
|
|
378
|
-
*
|
|
379
|
-
* So `unique([1,3,2,1,1,4])` would be `[1,3,2,4]`.
|
|
380
|
-
*
|
|
381
|
-
* @param array the array to deduplicate
|
|
382
|
-
* @param predicate an optional function used to generate the key used to
|
|
383
|
-
* determine uniqueness
|
|
384
|
-
* @returns a new, deduplicated array
|
|
385
|
-
*/
|
|
386
|
-
declare const unique: <T, K>(array: T[], predicate?: (item: T) => K) => T[];
|
|
387
|
-
/**
|
|
388
|
-
* Merge elements of an array into an existing array, using a predicate to
|
|
389
|
-
* determine uniqueness and only adding elements when they are not present in
|
|
390
|
-
* the first array.
|
|
391
|
-
*
|
|
392
|
-
* **Note**: this mutates the target array! This is intentional to avoid
|
|
393
|
-
* unnecessary array allocation, but be sure that it's what you want!
|
|
394
|
-
*
|
|
395
|
-
* @param target the target array, to which new unique items should be added
|
|
396
|
-
* @param newItems a list of new items, some (or all!) of which may be added
|
|
397
|
-
* @param mergeWith a predicate function which reduces the items in `target`
|
|
398
|
-
* and `newItems` to a value which can be equated with `===` for the purposes
|
|
399
|
-
* of determining uniqueness
|
|
400
|
-
*/
|
|
401
|
-
declare function mergeIntoWith<T1, T2>(target: T1[], newItems: T1[], mergeWith: (item: T1) => T2): void;
|
|
402
|
-
/**
|
|
403
|
-
* A utility for building an object from an iterable very similar to
|
|
404
|
-
* `Object.fromEntries`
|
|
405
|
-
*
|
|
406
|
-
* @param entries an iterable object holding entries (key-value tuples) to
|
|
407
|
-
* plop into a new object
|
|
408
|
-
* @returns an object containing those entries
|
|
409
|
-
*/
|
|
410
|
-
declare const fromEntries: <V>(entries: IterableIterator<[string, V]>) => Record<string, V>;
|
|
411
|
-
/**
|
|
412
|
-
* Based on a given object, create a new object which has only the specified
|
|
413
|
-
* key-value pairs included in it.
|
|
414
|
-
*
|
|
415
|
-
* @param obj the object from which to take values
|
|
416
|
-
* @param keys a set of keys to take
|
|
417
|
-
* @returns an object mapping `key` to `obj[key]` if `obj[key]` is truthy for
|
|
418
|
-
* every `key` in `keys`
|
|
419
|
-
*/
|
|
420
|
-
declare const pluck: (obj: {
|
|
421
|
-
[key: string]: any;
|
|
422
|
-
}, keys: string[]) => {
|
|
423
|
-
[key: string]: any;
|
|
424
|
-
};
|
|
425
|
-
declare const isBoolean: (v: any) => v is boolean;
|
|
426
|
-
declare const isFunction: (v: any) => v is Function;
|
|
427
|
-
declare const isNumber: (v: any) => v is number;
|
|
428
|
-
declare const isObject: (val: Object) => val is Object;
|
|
429
|
-
declare const isString: (v: any) => v is string;
|
|
430
|
-
declare const isIterable: <T>(v: any) => v is Iterable<T>;
|
|
431
|
-
//#endregion
|
|
432
|
-
//#region src/utils/is-glob.d.ts
|
|
433
|
-
/**
|
|
434
|
-
* Check if a string is a glob pattern (e.g. 'src/*.js' or something like that)
|
|
435
|
-
*
|
|
436
|
-
* @param str a string to check
|
|
437
|
-
* @returns whether the string is a glob pattern or not
|
|
438
|
-
*/
|
|
439
|
-
declare const isGlob: (str: string) => boolean;
|
|
440
|
-
//#endregion
|
|
441
|
-
//#region src/utils/is-root-path.d.ts
|
|
442
|
-
/**
|
|
443
|
-
* Checks if the path is the Operating System (OS) root path, such as "/" or "C:\". This function does not take the OS
|
|
444
|
-
* the code is running on into account when performing this evaluation.
|
|
445
|
-
* @param p the path to check
|
|
446
|
-
* @returns `true` if the path is an OS root path, `false` otherwise
|
|
447
|
-
*/
|
|
448
|
-
declare const isRootPath: (p: string) => boolean;
|
|
449
|
-
//#endregion
|
|
450
|
-
//#region src/utils/types.d.ts
|
|
451
|
-
type Serializeable = string | number | boolean | unknown;
|
|
452
|
-
type LocalValueParam = Serializeable | Serializeable[] | [Serializeable, Serializeable][];
|
|
453
|
-
type ScriptLocalValue = ScriptPrimitiveProtocolValue | ScriptArrayLocalValue | ScriptDateLocalValue | ScriptSymbolValue | ScriptMapLocalValue | ScriptObjectLocalValue | ScriptRegExpLocalValue | ScriptSetLocalValue;
|
|
454
|
-
type ScriptListLocalValue = ScriptLocalValue[];
|
|
455
|
-
interface ScriptArrayLocalValue {
|
|
456
|
-
type: 'array';
|
|
457
|
-
value: ScriptListLocalValue;
|
|
458
|
-
}
|
|
459
|
-
interface ScriptDateLocalValue {
|
|
460
|
-
type: 'date';
|
|
461
|
-
value: string;
|
|
462
|
-
}
|
|
463
|
-
type ScriptMappingLocalValue = (ScriptLocalValue | ScriptLocalValue)[];
|
|
464
|
-
interface ScriptMapLocalValue {
|
|
465
|
-
type: 'map';
|
|
466
|
-
value: ScriptMappingLocalValue;
|
|
467
|
-
}
|
|
468
|
-
interface ScriptObjectLocalValue {
|
|
469
|
-
type: 'object';
|
|
470
|
-
value: ScriptMappingLocalValue;
|
|
471
|
-
}
|
|
472
|
-
interface ScriptRegExpValue {
|
|
473
|
-
pattern: string;
|
|
474
|
-
flags?: string;
|
|
475
|
-
}
|
|
476
|
-
interface ScriptRegExpLocalValue {
|
|
477
|
-
type: 'regexp';
|
|
478
|
-
value: ScriptRegExpValue;
|
|
479
|
-
}
|
|
480
|
-
interface ScriptSetLocalValue {
|
|
481
|
-
type: 'set';
|
|
482
|
-
value: ScriptListLocalValue;
|
|
483
|
-
}
|
|
484
|
-
type ScriptPreloadScript = string;
|
|
485
|
-
type ScriptRealm = string;
|
|
486
|
-
type ScriptPrimitiveProtocolValue = ScriptUndefinedValue | ScriptNullValue | ScriptStringValue | ScriptNumberValue | ScriptBooleanValue | ScriptBigIntValue;
|
|
487
|
-
interface ScriptUndefinedValue {
|
|
488
|
-
type: 'undefined';
|
|
489
|
-
}
|
|
490
|
-
interface ScriptNullValue {
|
|
491
|
-
type: 'null';
|
|
492
|
-
}
|
|
493
|
-
interface ScriptStringValue {
|
|
494
|
-
type: 'string';
|
|
495
|
-
value: string;
|
|
496
|
-
}
|
|
497
|
-
interface ScriptSymbolValue {
|
|
498
|
-
type: 'symbol';
|
|
499
|
-
value: string;
|
|
500
|
-
}
|
|
501
|
-
type ScriptSpecialNumber = 'NaN' | '-0' | 'Infinity' | '-Infinity';
|
|
502
|
-
interface ScriptNumberValue {
|
|
503
|
-
type: 'number';
|
|
504
|
-
value: number | ScriptSpecialNumber;
|
|
505
|
-
}
|
|
506
|
-
interface ScriptBooleanValue {
|
|
507
|
-
type: 'boolean';
|
|
508
|
-
value: boolean;
|
|
509
|
-
}
|
|
510
|
-
interface ScriptBigIntValue {
|
|
511
|
-
type: 'bigint';
|
|
512
|
-
value: string;
|
|
513
|
-
}
|
|
514
|
-
//#endregion
|
|
515
|
-
//#region src/utils/local-value.d.ts
|
|
516
|
-
/**
|
|
517
|
-
* Represents a local value with a specified type and optional value.
|
|
518
|
-
* Described in https://w3c.github.io/webdriver-bidi/#type-script-LocalValue
|
|
519
|
-
* @deprecated will be removed in v5. Use `@AttrDeserialize()` / `@PropDeserialize()` decorators instead.
|
|
520
|
-
*/
|
|
521
|
-
declare class LocalValue {
|
|
522
|
-
type: PrimitiveTypeValue | NonPrimitiveTypeValue;
|
|
523
|
-
value?: Serializeable | Serializeable[] | [Serializeable, Serializeable][];
|
|
524
|
-
constructor(type: PrimitiveTypeValue | NonPrimitiveTypeValue, value?: LocalValueParam);
|
|
525
|
-
/**
|
|
526
|
-
* Creates a new LocalValue object with a string value.
|
|
527
|
-
*
|
|
528
|
-
* @param {string} value - The string value to be stored in the LocalValue object.
|
|
529
|
-
* @returns {LocalValue} - The created LocalValue object.
|
|
530
|
-
*/
|
|
531
|
-
static createStringValue(value: string): LocalValue;
|
|
532
|
-
/**
|
|
533
|
-
* Creates a new LocalValue object with a number value.
|
|
534
|
-
*
|
|
535
|
-
* @param {number} value - The number value.
|
|
536
|
-
* @returns {LocalValue} - The created LocalValue object.
|
|
537
|
-
*/
|
|
538
|
-
static createNumberValue(value: number): LocalValue;
|
|
539
|
-
/**
|
|
540
|
-
* Creates a new LocalValue object with a special number value.
|
|
541
|
-
*
|
|
542
|
-
* @param {number} value - The value of the special number.
|
|
543
|
-
* @returns {LocalValue} - The created LocalValue object.
|
|
544
|
-
*/
|
|
545
|
-
static createSpecialNumberValue(value: number): LocalValue;
|
|
546
|
-
/**
|
|
547
|
-
* Creates a new LocalValue object with an undefined value.
|
|
548
|
-
* @returns {LocalValue} - The created LocalValue object.
|
|
549
|
-
*/
|
|
550
|
-
static createUndefinedValue(): LocalValue;
|
|
551
|
-
/**
|
|
552
|
-
* Creates a new LocalValue object with a null value.
|
|
553
|
-
* @returns {LocalValue} - The created LocalValue object.
|
|
554
|
-
*/
|
|
555
|
-
static createNullValue(): LocalValue;
|
|
556
|
-
/**
|
|
557
|
-
* Creates a new LocalValue object with a boolean value.
|
|
558
|
-
*
|
|
559
|
-
* @param {boolean} value - The boolean value.
|
|
560
|
-
* @returns {LocalValue} - The created LocalValue object.
|
|
561
|
-
*/
|
|
562
|
-
static createBooleanValue(value: boolean): LocalValue;
|
|
563
|
-
/**
|
|
564
|
-
* Creates a new LocalValue object with a BigInt value.
|
|
565
|
-
*
|
|
566
|
-
* @param {BigInt} value - The BigInt value.
|
|
567
|
-
* @returns {LocalValue} - The created LocalValue object.
|
|
568
|
-
*/
|
|
569
|
-
static createBigIntValue(value: bigint): LocalValue;
|
|
570
|
-
/**
|
|
571
|
-
* Creates a new LocalValue object with an array.
|
|
572
|
-
*
|
|
573
|
-
* @param {Array} value - The array.
|
|
574
|
-
* @returns {LocalValue} - The created LocalValue object.
|
|
575
|
-
*/
|
|
576
|
-
static createArrayValue(value: Array<unknown>): LocalValue;
|
|
577
|
-
/**
|
|
578
|
-
* Creates a new LocalValue object with date value.
|
|
579
|
-
*
|
|
580
|
-
* @param {string} value - The date.
|
|
581
|
-
* @returns {LocalValue} - The created LocalValue object.
|
|
582
|
-
*/
|
|
583
|
-
static createDateValue(value: Date): LocalValue;
|
|
584
|
-
/**
|
|
585
|
-
* Creates a new LocalValue object of map value.
|
|
586
|
-
* @param {Map} map - The map.
|
|
587
|
-
* @returns {LocalValue} - The created LocalValue object.
|
|
588
|
-
*/
|
|
589
|
-
static createMapValue(map: Map<unknown, unknown>): LocalValue;
|
|
590
|
-
/**
|
|
591
|
-
* Creates a new LocalValue object from the passed object.
|
|
592
|
-
*
|
|
593
|
-
* @param object the object to create a LocalValue from
|
|
594
|
-
* @returns {LocalValue} - The created LocalValue object.
|
|
595
|
-
*/
|
|
596
|
-
static createObjectValue(object: Record<string | number | symbol, unknown>): LocalValue;
|
|
597
|
-
/**
|
|
598
|
-
* Creates a new LocalValue object of regular expression value.
|
|
599
|
-
*
|
|
600
|
-
* @param {string} value - The value of the regular expression.
|
|
601
|
-
* @returns {LocalValue} - The created LocalValue object.
|
|
602
|
-
*/
|
|
603
|
-
static createRegularExpressionValue(value: {
|
|
604
|
-
pattern: string;
|
|
605
|
-
flags: string;
|
|
606
|
-
}): LocalValue;
|
|
607
|
-
/**
|
|
608
|
-
* Creates a new LocalValue object with the specified value.
|
|
609
|
-
* @param {Set} value - The value to be set.
|
|
610
|
-
* @returns {LocalValue} - The created LocalValue object.
|
|
611
|
-
*/
|
|
612
|
-
static createSetValue(value: ([unknown, unknown] | LocalValue)[]): LocalValue;
|
|
613
|
-
/**
|
|
614
|
-
* Creates a new LocalValue object with the given channel value
|
|
615
|
-
*
|
|
616
|
-
* @param {ChannelValue} value - The channel value.
|
|
617
|
-
* @returns {LocalValue} - The created LocalValue object.
|
|
618
|
-
*/
|
|
619
|
-
static createChannelValue(value: unknown): LocalValue;
|
|
620
|
-
/**
|
|
621
|
-
* Creates a new LocalValue object with a Symbol value.
|
|
622
|
-
*
|
|
623
|
-
* @param {Symbol} symbol - The Symbol value
|
|
624
|
-
* @returns {LocalValue} - The created LocalValue object
|
|
625
|
-
*/
|
|
626
|
-
static createSymbolValue(symbol: Symbol): LocalValue;
|
|
627
|
-
static getArgument(argument: unknown): LocalValue;
|
|
628
|
-
asMap(): ScriptLocalValue;
|
|
629
|
-
}
|
|
630
|
-
//#endregion
|
|
631
|
-
//#region src/utils/logger/logger-rollup.d.ts
|
|
632
|
-
declare const loadRollupDiagnostics: (config: ValidatedConfig, compilerCtx: CompilerCtx, buildCtx: BuildCtx, rollupError: RollupError) => void;
|
|
311
|
+
//#region src/utils/logger/logger-rolldown.d.ts
|
|
312
|
+
declare const isRolldownError: (e: unknown) => e is RolldownError;
|
|
313
|
+
declare const loadRolldownDiagnostics: (config: ValidatedConfig, compilerCtx: CompilerCtx, buildCtx: BuildCtx, rolldownError: RolldownError) => void;
|
|
633
314
|
declare const createOnWarnFn: (diagnostics: Diagnostic$1[], bundleModulesFiles?: Module[]) => (warning: {
|
|
634
315
|
code?: string;
|
|
635
316
|
importer?: string;
|
|
@@ -648,6 +329,12 @@ declare const augmentDiagnosticWithNode: (d: Diagnostic$1, node: Node$1) => Diag
|
|
|
648
329
|
* Ok, so formatting overkill, we know. But whatever, it makes for great
|
|
649
330
|
* error reporting within a terminal. So, yeah, let's code it up, shall we?
|
|
650
331
|
*/
|
|
332
|
+
/**
|
|
333
|
+
* Convert an array of TypeScript diagnostics to Stencil diagnostic format.
|
|
334
|
+
*
|
|
335
|
+
* @param tsDiagnostics - array of TypeScript diagnostic objects
|
|
336
|
+
* @returns array of Stencil diagnostic objects
|
|
337
|
+
*/
|
|
651
338
|
declare const loadTypeScriptDiagnostics: (tsDiagnostics: readonly Diagnostic[]) => Diagnostic$1[];
|
|
652
339
|
/**
|
|
653
340
|
* Convert a TypeScript diagnostic object into our internal, Stencil-specific
|
|
@@ -707,7 +394,8 @@ declare const buildWarn: (diagnostics: Diagnostic$1[]) => Diagnostic$1;
|
|
|
707
394
|
* @param jsonFilePath the path to the JSON file where the error occurred
|
|
708
395
|
* @param msg the error message
|
|
709
396
|
* @param jsonField the key for the field which caused the error, used for finding
|
|
710
|
-
* the error line in the original JSON file
|
|
397
|
+
* the error line in the original JSON file. Only root-level keys (with minimal
|
|
398
|
+
* indentation, typically 2 spaces) are highlighted to avoid matching nested keys.
|
|
711
399
|
* @returns a reference to the newly-created diagnostic
|
|
712
400
|
*/
|
|
713
401
|
declare const buildJsonFileError: (compilerCtx: CompilerCtx, diagnostics: Diagnostic$1[], jsonFilePath: string, msg: string, jsonField: string) => Diagnostic$1;
|
|
@@ -761,39 +449,39 @@ declare const filterExcludedComponents: (components: ComponentCompilerMeta[], co
|
|
|
761
449
|
declare const relativeImport: (pathFrom: string, pathTo: string, ext?: string, addPrefix?: boolean) => string;
|
|
762
450
|
declare const getComponentsDtsSrcFilePath: (config: ValidatedConfig) => string;
|
|
763
451
|
/**
|
|
764
|
-
* Helper to get an appropriate file path for `components.d.ts` for
|
|
765
|
-
* or `"dist-types"` output target.
|
|
452
|
+
* Helper to get an appropriate file path for `components.d.ts` for an output target.
|
|
766
453
|
*
|
|
767
|
-
* @param
|
|
454
|
+
* @param typesDir the directory where types are generated
|
|
768
455
|
* @returns a properly-formatted path
|
|
769
456
|
*/
|
|
770
|
-
declare const getComponentsDtsTypesFilePath: (
|
|
771
|
-
declare const
|
|
772
|
-
declare const
|
|
773
|
-
declare const
|
|
457
|
+
declare const getComponentsDtsTypesFilePath: (typesDir: string) => string;
|
|
458
|
+
declare const isOutputTargetLoaderBundle: (o: OutputTarget) => o is OutputTargetLoaderBundle;
|
|
459
|
+
declare const isOutputTargetStandalone: (o: OutputTarget) => o is OutputTargetStandalone;
|
|
460
|
+
declare const isOutputTargetSsr: (o: OutputTarget) => o is OutputTargetSsr;
|
|
461
|
+
declare const isOutputTargetSsrWasm: (o: OutputTarget) => o is OutputTargetSsrWasm;
|
|
462
|
+
/**
|
|
463
|
+
* Whether an output target renders components on the server (`ssr` or `ssr-wasm`).
|
|
464
|
+
* When one is present, client builds must be able to hydrate server-rendered markup.
|
|
465
|
+
* @param o the output target to check
|
|
466
|
+
* @returns true if the output target server-renders components
|
|
467
|
+
*/
|
|
468
|
+
declare const isOutputTargetServerRenderer: (o: OutputTarget) => o is OutputTargetSsr | OutputTargetSsrWasm;
|
|
469
|
+
declare const isOutputTargetCollection: (o: OutputTarget) => o is OutputTargetCollection;
|
|
470
|
+
declare const isOutputTargetTypes: (o: OutputTarget) => o is OutputTargetTypes;
|
|
471
|
+
declare const isOutputTargetGlobalStyle: (o: OutputTarget) => o is OutputTargetGlobalStyle;
|
|
472
|
+
declare const isOutputTargetAssets: (o: OutputTarget) => o is OutputTargetAssets;
|
|
774
473
|
declare const isOutputTargetCopy: (o: OutputTarget) => o is OutputTargetCopy;
|
|
775
474
|
declare const isOutputTargetDistLazy: (o: OutputTarget) => o is OutputTargetDistLazy;
|
|
776
|
-
declare const isOutputTargetDistLazyLoader: (o: OutputTarget) => o is OutputTargetDistLazyLoader;
|
|
777
|
-
declare const isOutputTargetDistGlobalStyles: (o: OutputTarget) => o is OutputTargetDistGlobalStyles;
|
|
778
|
-
declare const isOutputTargetHydrate: (o: OutputTarget) => o is OutputTargetHydrate;
|
|
779
475
|
declare const isOutputTargetCustom: (o: OutputTarget) => o is OutputTargetCustom;
|
|
780
|
-
declare const isOutputTargetDocs: (o: OutputTarget) => o is OutputTargetDocsJson | OutputTargetDocsReadme | OutputTargetDocsVscode | OutputTargetDocsCustom | OutputTargetDocsCustomElementsManifest;
|
|
476
|
+
declare const isOutputTargetDocs: (o: OutputTarget) => o is OutputTargetDocsJson | OutputTargetDocsReadme | OutputTargetDocsVscode | OutputTargetDocsCustom | OutputTargetDocsCustomElementsManifest | OutputTargetDocsAgentSkill;
|
|
781
477
|
declare const isOutputTargetDocsReadme: (o: OutputTarget) => o is OutputTargetDocsReadme;
|
|
782
478
|
declare const isOutputTargetDocsJson: (o: OutputTarget) => o is OutputTargetDocsJson;
|
|
783
479
|
declare const isOutputTargetDocsCustom: (o: OutputTarget) => o is OutputTargetDocsCustom;
|
|
784
480
|
declare const isOutputTargetDocsVscode: (o: OutputTarget) => o is OutputTargetDocsVscode;
|
|
785
481
|
declare const isOutputTargetDocsCustomElementsManifest: (o: OutputTarget) => o is OutputTargetDocsCustomElementsManifest;
|
|
482
|
+
declare const isOutputTargetDocsAgentSkill: (o: OutputTarget) => o is OutputTargetDocsAgentSkill;
|
|
786
483
|
declare const isOutputTargetWww: (o: OutputTarget) => o is OutputTargetWww;
|
|
787
484
|
declare const isOutputTargetStats: (o: OutputTarget) => o is OutputTargetStats;
|
|
788
|
-
declare const isOutputTargetDistTypes: (o: OutputTarget) => o is OutputTargetDistTypes;
|
|
789
|
-
/**
|
|
790
|
-
* Checks whether or not the supplied output target's type matches one of the eligible primary
|
|
791
|
-
* package output target types (i.e. it can have `isPrimaryPackageOutputTarget: true` in its config).
|
|
792
|
-
*
|
|
793
|
-
* @param o The output target to check.
|
|
794
|
-
* @returns Whether the output target type is one of the "primary" output targets.
|
|
795
|
-
*/
|
|
796
|
-
declare const isEligiblePrimaryPackageOutputTarget: (o: OutputTarget) => o is EligiblePrimaryPackageOutputTarget;
|
|
797
485
|
/**
|
|
798
486
|
* Retrieve the Stencil component compiler metadata from a collection of Stencil {@link d.Module}s
|
|
799
487
|
* @param moduleFiles the collection of `Module`s to retrieve the metadata from
|
|
@@ -808,129 +496,16 @@ type ValidConfigOutputTarget = (typeof VALID_CONFIG_OUTPUT_TARGETS)[number];
|
|
|
808
496
|
* @returns whether or not the targetType is a valid, configurable output target.
|
|
809
497
|
*/
|
|
810
498
|
declare function isValidConfigOutputTarget(targetType: string): targetType is ValidConfigOutputTarget;
|
|
811
|
-
//#endregion
|
|
812
|
-
//#region src/utils/path.d.ts
|
|
813
|
-
/**
|
|
814
|
-
* Convert Windows backslash paths to slash paths: foo\\bar ➔ foo/bar
|
|
815
|
-
* Forward-slash paths can be used in Windows as long as they're not
|
|
816
|
-
* extended-length paths and don't contain any non-ascii characters.
|
|
817
|
-
* This was created since the path methods in Node.js outputs \\ paths on Windows.
|
|
818
|
-
* @param path the Windows-based path to convert
|
|
819
|
-
* @param relativize whether or not a relative path should have `./` prepended
|
|
820
|
-
* @returns the converted path
|
|
821
|
-
*/
|
|
822
|
-
declare const normalizePath: (path: string, relativize?: boolean) => string;
|
|
823
|
-
/**
|
|
824
|
-
* Same as normalizePath(), expect it'll also strip any query strings
|
|
825
|
-
* from the path name. So /dir/file.css?tag=cmp-a becomes /dir/file.css
|
|
826
|
-
* @param p the path to normalize
|
|
827
|
-
* @returns the normalized path, sans any query strings
|
|
828
|
-
*/
|
|
829
|
-
declare const normalizeFsPath: (p: string) => string;
|
|
830
|
-
declare const normalizeFsPathQuery: (importPath: string) => {
|
|
831
|
-
filePath: string;
|
|
832
|
-
ext: string;
|
|
833
|
-
format: string;
|
|
834
|
-
};
|
|
835
|
-
/**
|
|
836
|
-
* A wrapped version of node.js' {@link path.relative} which adds our custom
|
|
837
|
-
* normalization logic. This solves the relative path between `from` and `to`!
|
|
838
|
-
*
|
|
839
|
-
* The calculation of the returned path follows that of Node's logic, with one exception - if the calculated path
|
|
840
|
-
* results in an empty string, a string of length one with a period (`'.'`) is returned.
|
|
841
|
-
*
|
|
842
|
-
* @throws the underlying node.js function can throw if either path is not a
|
|
843
|
-
* string
|
|
844
|
-
* @param from the path where relative resolution starts
|
|
845
|
-
* @param to the destination path
|
|
846
|
-
* @returns the resolved relative path
|
|
847
|
-
*/
|
|
848
|
-
declare function relative(from: string, to: string): string;
|
|
849
|
-
/**
|
|
850
|
-
* A wrapped version of node.js' {@link path.join} which adds our custom
|
|
851
|
-
* normalization logic. This joins all the arguments (path fragments) into a
|
|
852
|
-
* single path.
|
|
853
|
-
*
|
|
854
|
-
* The calculation of the returned path follows that of Node's logic, with one exception - any trailing slashes will
|
|
855
|
-
* be removed from the calculated path.
|
|
856
|
-
*
|
|
857
|
-
* @throws the underlying node function will throw if any argument is not a
|
|
858
|
-
* string
|
|
859
|
-
* @param paths the paths to join together
|
|
860
|
-
* @returns a joined path!
|
|
861
|
-
*/
|
|
862
|
-
declare function join(...paths: string[]): string;
|
|
863
|
-
/**
|
|
864
|
-
* A wrapped version of node.js' {@link path.resolve} which adds our custom
|
|
865
|
-
* normalization logic. This resolves a path to a given (relative or absolute)
|
|
866
|
-
* path.
|
|
867
|
-
*
|
|
868
|
-
* @throws the underlying node function will throw if any argument is not a
|
|
869
|
-
* string
|
|
870
|
-
* @param paths a path or path fragments to resolve
|
|
871
|
-
* @returns a resolved path!
|
|
872
|
-
*/
|
|
873
|
-
declare function resolve(...paths: string[]): string;
|
|
874
|
-
/**
|
|
875
|
-
* A wrapped version of node.js' {@link path.normalize} which adds our custom
|
|
876
|
-
* normalization logic. This normalizes a path, de-duping repeated segment
|
|
877
|
-
* separators and resolving `'..'` segments.
|
|
878
|
-
*
|
|
879
|
-
* @throws the underlying node function will throw if the argument is not a
|
|
880
|
-
* string
|
|
881
|
-
* @param toNormalize a path to normalize
|
|
882
|
-
* @returns a normalized path!
|
|
883
|
-
*/
|
|
884
|
-
declare function normalize(toNormalize: string): string;
|
|
885
|
-
//#endregion
|
|
886
|
-
//#region src/utils/query-nonce-meta-tag-content.d.ts
|
|
887
|
-
/**
|
|
888
|
-
* Helper method for querying a `meta` tag that contains a nonce value
|
|
889
|
-
* out of a DOM's head.
|
|
890
|
-
*
|
|
891
|
-
* @param doc The DOM containing the `head` to query against
|
|
892
|
-
* @returns The content of the meta tag representing the nonce value, or `undefined` if no tag
|
|
893
|
-
* exists or the tag has no content.
|
|
894
|
-
*/
|
|
895
|
-
declare function queryNonceMetaTagContent(doc: Document): string | undefined;
|
|
896
|
-
//#endregion
|
|
897
|
-
//#region src/utils/regular-expression.d.ts
|
|
898
499
|
/**
|
|
899
|
-
*
|
|
500
|
+
* Filter output targets based on devMode and their skipInDev setting.
|
|
501
|
+
* In dev mode, targets with `skipInDev: true` are filtered out.
|
|
502
|
+
* In prod mode, all targets are included.
|
|
900
503
|
*
|
|
901
|
-
* @param
|
|
902
|
-
* @
|
|
903
|
-
|
|
904
|
-
declare const escapeRegExpSpecialCharacters: (text: string) => string;
|
|
905
|
-
//#endregion
|
|
906
|
-
//#region src/utils/remote-value.d.ts
|
|
907
|
-
/**
|
|
908
|
-
* RemoteValue class for deserializing LocalValue serialized objects back into their original form
|
|
909
|
-
* @deprecated will be removed in v5. Use `@AttrDeserialize()` / `@PropDeserialize()` decorators instead.
|
|
504
|
+
* @param targets Array of output targets to filter
|
|
505
|
+
* @param devMode Whether we're in dev mode
|
|
506
|
+
* @returns Filtered array of active targets
|
|
910
507
|
*/
|
|
911
|
-
declare
|
|
912
|
-
/**
|
|
913
|
-
* Deserializes a LocalValue serialized object back to its original JavaScript representation
|
|
914
|
-
*
|
|
915
|
-
* @param serialized The serialized LocalValue object
|
|
916
|
-
* @returns The original JavaScript value/object
|
|
917
|
-
*/
|
|
918
|
-
static fromLocalValue(serialized: ScriptLocalValue): any;
|
|
919
|
-
/**
|
|
920
|
-
* Utility method to deserialize multiple LocalValues at once
|
|
921
|
-
*
|
|
922
|
-
* @param serializedValues Array of serialized LocalValue objects
|
|
923
|
-
* @returns Array of deserialized JavaScript values
|
|
924
|
-
*/
|
|
925
|
-
static fromLocalValueArray(serializedValues: ScriptLocalValue[]): any[];
|
|
926
|
-
/**
|
|
927
|
-
* Verifies if the given object matches the structure of a serialized LocalValue
|
|
928
|
-
*
|
|
929
|
-
* @param obj Object to verify
|
|
930
|
-
* @returns boolean indicating if the object has LocalValue structure
|
|
931
|
-
*/
|
|
932
|
-
static isLocalValueObject(obj: any): boolean;
|
|
933
|
-
}
|
|
508
|
+
declare const filterActiveTargets: <T extends OutputTarget>(targets: T[], devMode: boolean) => T[];
|
|
934
509
|
declare namespace result_d_exports {
|
|
935
510
|
export { Result, err, map, ok, unwrap, unwrapErr };
|
|
936
511
|
}
|
|
@@ -1046,31 +621,15 @@ declare const unwrap: <T, E>(result: Result<T, E>) => T;
|
|
|
1046
621
|
*/
|
|
1047
622
|
declare const unwrapErr: <T, E>(result: Result<T, E>) => E;
|
|
1048
623
|
//#endregion
|
|
1049
|
-
//#region src/utils/serialize.d.ts
|
|
1050
|
-
/**
|
|
1051
|
-
* Serialize a value to a string that can be deserialized later.
|
|
1052
|
-
* @param {unknown} value - The value to serialize.
|
|
1053
|
-
* @returns {string} A string that can be deserialized later.
|
|
1054
|
-
* @deprecated will be removed in v5. Use `@PropSerialize()` decorator instead.
|
|
1055
|
-
*/
|
|
1056
|
-
declare function serializeProperty(value: unknown): string | number | boolean;
|
|
1057
|
-
/**
|
|
1058
|
-
* Deserialize a value from a string that was serialized earlier.
|
|
1059
|
-
* @param {string} value - The string to deserialize.
|
|
1060
|
-
* @returns {unknown} The deserialized value.
|
|
1061
|
-
* @deprecated will be removed in v5. Use `@AttrDeserialize()` decorator instead.
|
|
1062
|
-
*/
|
|
1063
|
-
declare function deserializeProperty(value: string): any;
|
|
1064
|
-
//#endregion
|
|
1065
624
|
//#region src/utils/sourcemaps.d.ts
|
|
1066
625
|
/**
|
|
1067
|
-
* Converts a
|
|
1068
|
-
* @param
|
|
626
|
+
* Converts a rolldown provided source map to one that Stencil can easily understand
|
|
627
|
+
* @param rolldownSourceMap the sourcemap to transform
|
|
1069
628
|
* @returns the transformed sourcemap
|
|
1070
629
|
*/
|
|
1071
|
-
declare function
|
|
1072
|
-
declare function
|
|
1073
|
-
declare function
|
|
630
|
+
declare function rolldownToStencilSourceMap(rolldownSourceMap: null): null;
|
|
631
|
+
declare function rolldownToStencilSourceMap(rolldownSourceMap: undefined): null;
|
|
632
|
+
declare function rolldownToStencilSourceMap(rolldownSourceMap: SourceMap): SourceMap$1;
|
|
1074
633
|
/**
|
|
1075
634
|
* Generates a string used to link generated code with the original source, to be placed at the end of the generated
|
|
1076
635
|
* code.
|
|
@@ -1092,18 +651,25 @@ declare const getInlineSourceMappingUrlLinker: (sourceMapContents: string) => st
|
|
|
1092
651
|
* @returns a linker string, of the format {@link JS_SOURCE_MAPPING_URL_LINKER}=<url>.map, prepended with a newline
|
|
1093
652
|
*/
|
|
1094
653
|
declare const getSourceMappingUrlForEndOfFile: (url: string) => string;
|
|
1095
|
-
//#endregion
|
|
1096
|
-
//#region src/utils/url-paths.d.ts
|
|
1097
654
|
/**
|
|
1098
|
-
*
|
|
655
|
+
* Rolldown source map output options. Stencil appends its own `sourceMappingURL` comment, so the map
|
|
656
|
+
* is `hidden`. A chunk can be written to several directories, so `sources` are made absolute here
|
|
657
|
+
* (query strings stripped) and relative to each destination by {@link relativizeSourceMap}.
|
|
658
|
+
* Virtual modules have no file and keep their id.
|
|
1099
659
|
*
|
|
1100
|
-
*
|
|
1101
|
-
*
|
|
660
|
+
* @param config the validated Stencil configuration
|
|
661
|
+
* @returns the source map options to spread into Rolldown's output options
|
|
662
|
+
*/
|
|
663
|
+
declare const getRolldownSourceMapOptions: (config: ValidatedConfig) => Pick<OutputOptions, "sourcemap" | "sourcemapPathTransform">;
|
|
664
|
+
/**
|
|
665
|
+
* Makes a source map's absolute `sources` relative to where the map is written, and names the
|
|
666
|
+
* file it maps.
|
|
1102
667
|
*
|
|
1103
|
-
* @param
|
|
1104
|
-
* @
|
|
668
|
+
* @param sourceMap the source map, with absolute `sources` from {@link getRolldownSourceMapOptions}
|
|
669
|
+
* @param filePath the path the mapped `.js` file is written to
|
|
670
|
+
* @returns the source map to write next to `filePath`
|
|
1105
671
|
*/
|
|
1106
|
-
declare const
|
|
672
|
+
declare const relativizeSourceMap: (sourceMap: SourceMap$1, filePath: string) => SourceMap$1;
|
|
1107
673
|
//#endregion
|
|
1108
674
|
//#region src/utils/util.d.ts
|
|
1109
675
|
/**
|
|
@@ -1203,6 +769,21 @@ declare const parsePackageJson: (pkgJsonStr: string, pkgJsonFilePath: string) =>
|
|
|
1203
769
|
declare const readOnlyArrayHasStringMember: <T extends string>(readOnlyArray: ReadonlyArray<T>, maybeMember: T | string) => maybeMember is T;
|
|
1204
770
|
//#endregion
|
|
1205
771
|
//#region src/utils/validation.d.ts
|
|
772
|
+
/**
|
|
773
|
+
* The result of an invalid `modes` check on a component's `styleUrls`/`styles`.
|
|
774
|
+
*/
|
|
775
|
+
interface ModeValidationError {
|
|
776
|
+
propName: 'styleUrls' | 'styles';
|
|
777
|
+
message: string;
|
|
778
|
+
}
|
|
779
|
+
/**
|
|
780
|
+
* Validates the mode keys used in a component's `styleUrls`/`styles` against a
|
|
781
|
+
* `config.modes` allowlist, if one is declared.
|
|
782
|
+
* @param configModes the `config.modes` allowlist (mixed string/{@link d.ModeConfig} entries)
|
|
783
|
+
* @param componentOptions the `@Component()` decorator options for a single component
|
|
784
|
+
* @returns a validation error if a used mode is unknown or a required mode is missing, undefined otherwise
|
|
785
|
+
*/
|
|
786
|
+
declare const validateComponentModes: (configModes: (string | ModeConfig)[] | undefined, componentOptions: Pick<ComponentOptions, "styleUrls" | "styles">) => ModeValidationError | undefined;
|
|
1206
787
|
/**
|
|
1207
788
|
* Validates that a component tag meets required naming conventions to be used for a web component
|
|
1208
789
|
* @param tag the tag to validate
|
|
@@ -1385,10 +966,6 @@ declare const createInMemoryFs: (sys: CompilerSystem) => {
|
|
|
1385
966
|
* `[ source, destination ]`
|
|
1386
967
|
*/
|
|
1387
968
|
type FileCopyTuple = [string, string];
|
|
1388
|
-
/**
|
|
1389
|
-
* Collected instructions for all pending filesystem operations saved
|
|
1390
|
-
* to the in-memory filesystem.
|
|
1391
|
-
*/
|
|
1392
969
|
/**
|
|
1393
970
|
* Results from committing pending filesystem operations
|
|
1394
971
|
*/
|
|
@@ -1399,14 +976,6 @@ interface FsCommitResults {
|
|
|
1399
976
|
dirsDeleted: string[];
|
|
1400
977
|
dirsAdded: string[];
|
|
1401
978
|
}
|
|
1402
|
-
/**
|
|
1403
|
-
* Given the current state of the in-memory proxy filesystem, collect all of
|
|
1404
|
-
* the changes that need to be made in order to commit the currently-pending
|
|
1405
|
-
* operations (e.g. write, copy, delete) to the OS filesystem.
|
|
1406
|
-
*
|
|
1407
|
-
* @param items the storage data structure for the in-memory FS cache
|
|
1408
|
-
* @returns a collection of all the operations that need to be done
|
|
1409
|
-
*/
|
|
1410
979
|
//#endregion
|
|
1411
980
|
//#region src/declarations/stencil-public-docs.d.ts
|
|
1412
981
|
/**
|
|
@@ -1429,6 +998,13 @@ interface JsonDocs {
|
|
|
1429
998
|
* The metadata for the JSDocs for each component in a Stencil project
|
|
1430
999
|
*/
|
|
1431
1000
|
components: JsonDocsComponent[];
|
|
1001
|
+
/**
|
|
1002
|
+
* Project-level usage content, collected from markdown files in a `usage`
|
|
1003
|
+
* directory at the project's {@link Config.srcDir} root (as opposed to
|
|
1004
|
+
* per-component usage content, which lives in {@link JsonDocsComponent.usage}).
|
|
1005
|
+
* Keyed by file name (without extension), same shape as component usage.
|
|
1006
|
+
*/
|
|
1007
|
+
usage?: JsonDocsUsage;
|
|
1432
1008
|
/**
|
|
1433
1009
|
* The timestamp at which the metadata was generated, in the format YYYY-MM-DDThh:mm:ss
|
|
1434
1010
|
*/
|
|
@@ -1561,6 +1137,11 @@ interface JsonDocsComponent {
|
|
|
1561
1137
|
* A deprecation reason/description found following a `@deprecated` tag
|
|
1562
1138
|
*/
|
|
1563
1139
|
deprecation?: string;
|
|
1140
|
+
/**
|
|
1141
|
+
* `true` if this is a "CSS-only component"
|
|
1142
|
+
* discovered in .css file via `@component`-marked JSDoc block
|
|
1143
|
+
*/
|
|
1144
|
+
cssOnly?: boolean;
|
|
1564
1145
|
}
|
|
1565
1146
|
interface JsonDocsDependencyGraph {
|
|
1566
1147
|
[tagName: string]: string[];
|
|
@@ -1720,6 +1301,16 @@ interface JsonDocsStyle {
|
|
|
1720
1301
|
* The annotation used in the JSDoc of the style (e.g. `@prop`)
|
|
1721
1302
|
*/
|
|
1722
1303
|
annotation: string;
|
|
1304
|
+
/**
|
|
1305
|
+
* The CSS `syntax` descriptor for a custom property, if it was registered via a native
|
|
1306
|
+
* `@property` at-rule (e.g. `"<length>"`).
|
|
1307
|
+
*/
|
|
1308
|
+
syntax?: string;
|
|
1309
|
+
/**
|
|
1310
|
+
* The `initial-value` descriptor for a custom property, if it was registered via a native
|
|
1311
|
+
* `@property` at-rule.
|
|
1312
|
+
*/
|
|
1313
|
+
default?: string;
|
|
1723
1314
|
/**
|
|
1724
1315
|
* The mode associated with the style
|
|
1725
1316
|
*/
|
|
@@ -1806,62 +1397,250 @@ interface StyleDoc {
|
|
|
1806
1397
|
* The Stencil style-mode that is associated with this property.
|
|
1807
1398
|
*/
|
|
1808
1399
|
mode: string | undefined;
|
|
1400
|
+
/**
|
|
1401
|
+
* The CSS `syntax` descriptor, if this property was registered via a native `@property` at-rule.
|
|
1402
|
+
*/
|
|
1403
|
+
syntax?: string;
|
|
1404
|
+
/**
|
|
1405
|
+
* The `initial-value` descriptor, if this property was registered via a native `@property` at-rule.
|
|
1406
|
+
*/
|
|
1407
|
+
default?: string;
|
|
1809
1408
|
}
|
|
1810
1409
|
//#endregion
|
|
1811
1410
|
//#region src/declarations/stencil-public-runtime.d.ts
|
|
1812
|
-
|
|
1813
|
-
interface UserBuildConditionals {
|
|
1814
|
-
isDev: boolean;
|
|
1815
|
-
isBrowser: boolean;
|
|
1816
|
-
isServer: boolean;
|
|
1817
|
-
isTesting: boolean;
|
|
1818
|
-
}
|
|
1819
|
-
type ResolutionHandler = (elm: HTMLElement) => string | undefined | null;
|
|
1820
|
-
type ErrorHandler = (err: any, element?: HTMLElement) => void;
|
|
1821
|
-
interface ComponentInterface {
|
|
1822
|
-
connectedCallback?(): void;
|
|
1823
|
-
disconnectedCallback?(): void;
|
|
1824
|
-
componentWillRender?(): Promise<void> | void;
|
|
1825
|
-
componentDidRender?(): void;
|
|
1411
|
+
interface ComponentOptions {
|
|
1826
1412
|
/**
|
|
1827
|
-
*
|
|
1828
|
-
*
|
|
1413
|
+
* Tag name of the web component. Ideally, the tag name must be globally unique,
|
|
1414
|
+
* so it's recommended to choose an unique prefix for all your components within the same collection.
|
|
1829
1415
|
*
|
|
1830
|
-
*
|
|
1831
|
-
* before the first render.
|
|
1832
|
-
*
|
|
1833
|
-
* componentWillLoad will only be called once.
|
|
1416
|
+
* In addition, tag name must contain a '-'
|
|
1834
1417
|
*/
|
|
1835
|
-
|
|
1418
|
+
tag: string;
|
|
1836
1419
|
/**
|
|
1837
|
-
*
|
|
1420
|
+
* Encapsulation strategy for the component. Determines how styles and DOM are isolated.
|
|
1838
1421
|
*
|
|
1839
|
-
*
|
|
1840
|
-
*
|
|
1422
|
+
* @example
|
|
1423
|
+
* ```tsx
|
|
1424
|
+
* // Shadow DOM (recommended for isolation)
|
|
1425
|
+
* encapsulation: { type: 'shadow' }
|
|
1426
|
+
* encapsulation: { type: 'shadow', mode: 'closed', delegatesFocus: true }
|
|
1841
1427
|
*
|
|
1842
|
-
*
|
|
1843
|
-
|
|
1844
|
-
componentDidLoad?(): void;
|
|
1845
|
-
/**
|
|
1846
|
-
* A `@Prop` or `@State` property changed and a rerender is about to be requested.
|
|
1428
|
+
* // Scoped styles (class-based isolation without Shadow DOM)
|
|
1429
|
+
* encapsulation: { type: 'scoped' }
|
|
1847
1430
|
*
|
|
1848
|
-
*
|
|
1849
|
-
*
|
|
1431
|
+
* // No encapsulation (light DOM)
|
|
1432
|
+
* encapsulation: { type: 'none' }
|
|
1433
|
+
* encapsulation: { type: 'none', patches: ['all'] } // with slot patches
|
|
1434
|
+
* ```
|
|
1850
1435
|
*
|
|
1851
|
-
*
|
|
1436
|
+
* If not specified, defaults to `{ type: 'none' }` (no encapsulation).
|
|
1852
1437
|
*/
|
|
1853
|
-
|
|
1438
|
+
encapsulation?: EncapsulationOptions;
|
|
1854
1439
|
/**
|
|
1855
|
-
*
|
|
1856
|
-
*
|
|
1857
|
-
* Called multiple times throughout the life of
|
|
1858
|
-
* the component as it updates.
|
|
1859
|
-
*
|
|
1860
|
-
* componentWillUpdate is not called on the first render.
|
|
1440
|
+
* Relative URL to some external stylesheet file. It should be a `.css` file unless some
|
|
1441
|
+
* external plugin is installed like `@stencil/sass`.
|
|
1861
1442
|
*/
|
|
1862
|
-
|
|
1443
|
+
styleUrl?: string;
|
|
1863
1444
|
/**
|
|
1864
|
-
*
|
|
1445
|
+
* Similar as `styleUrl` but allows to specify different stylesheets for different modes.
|
|
1446
|
+
*/
|
|
1447
|
+
styleUrls?: string[] | ModeStyles;
|
|
1448
|
+
/**
|
|
1449
|
+
* String that contains inlined CSS instead of using an external stylesheet.
|
|
1450
|
+
* The performance characteristics of this feature are the same as using an external stylesheet.
|
|
1451
|
+
*
|
|
1452
|
+
* Notice, you can't use sass, or less, only `css` is allowed using `styles`, use `styleUrl` is you need more advanced features.
|
|
1453
|
+
*/
|
|
1454
|
+
styles?: string | {
|
|
1455
|
+
[modeName: string]: any;
|
|
1456
|
+
};
|
|
1457
|
+
/**
|
|
1458
|
+
* Array of relative links to folders of assets required by the component.
|
|
1459
|
+
*/
|
|
1460
|
+
assetsDirs?: string[];
|
|
1461
|
+
/**
|
|
1462
|
+
* Relative URL to an external stylesheet providing document-level styles for this component.
|
|
1463
|
+
* Unlike `styleUrl`, these styles are not scoped to shadow/scoped DOM - they are collected
|
|
1464
|
+
* at build time and injected wherever `@import "stencil-component-globals"` appears in a global stylesheet.
|
|
1465
|
+
*
|
|
1466
|
+
* Useful for
|
|
1467
|
+
* - pre-first-js-render styles (combatting cumulative layout shift)
|
|
1468
|
+
* - host element and slotted content style
|
|
1469
|
+
* - 'css-only' CEs - those that don't use a JS runtime at all
|
|
1470
|
+
*
|
|
1471
|
+
* @example
|
|
1472
|
+
* ```tsx
|
|
1473
|
+
* @Component({ tag: 'my-button', globalStyleUrl: './my-button.global.css' })
|
|
1474
|
+
* ```
|
|
1475
|
+
*/
|
|
1476
|
+
globalStyleUrl?: string;
|
|
1477
|
+
/**
|
|
1478
|
+
* Inline CSS string providing document-level styles for this component.
|
|
1479
|
+
* Collected at build time and injected wherever `@import "stencil-component-globals"` appears.
|
|
1480
|
+
* @see globalStyleUrl
|
|
1481
|
+
*/
|
|
1482
|
+
globalStyle?: string;
|
|
1483
|
+
}
|
|
1484
|
+
/**
|
|
1485
|
+
* Shadow DOM encapsulation options for the `encapsulation` property.
|
|
1486
|
+
* Uses native Shadow DOM for style and DOM isolation.
|
|
1487
|
+
*/
|
|
1488
|
+
interface ShadowEncapsulation {
|
|
1489
|
+
type: 'shadow';
|
|
1490
|
+
/**
|
|
1491
|
+
* The mode of the shadow root. Defaults to `'open'`.
|
|
1492
|
+
* - `'open'`: The shadow root is accessible via `element.shadowRoot`
|
|
1493
|
+
* - `'closed'`: The shadow root is not accessible via `element.shadowRoot`
|
|
1494
|
+
*/
|
|
1495
|
+
mode?: 'open' | 'closed';
|
|
1496
|
+
/**
|
|
1497
|
+
* When set to `true`, specifies behavior that mitigates custom element issues
|
|
1498
|
+
* around focusability. When a non-focusable part of the shadow DOM is clicked, the first
|
|
1499
|
+
* focusable part is given focus, and the shadow host is given any available `:focus` styling.
|
|
1500
|
+
*/
|
|
1501
|
+
delegatesFocus?: boolean;
|
|
1502
|
+
/**
|
|
1503
|
+
* Sets the slot assignment mode for the shadow root. When set to `'manual'`, enables imperative
|
|
1504
|
+
* slotting using the `HTMLSlotElement.assign()` method. Defaults to `'named'` for standard
|
|
1505
|
+
* declarative slotting behavior.
|
|
1506
|
+
*/
|
|
1507
|
+
slotAssignment?: 'manual' | 'named';
|
|
1508
|
+
/**
|
|
1509
|
+
* When set to `true`, the shadow root is preserved when the host element is deep-cloned via
|
|
1510
|
+
* `Node.cloneNode(true)`. Without this, cloning a shadow host produces an empty shell.
|
|
1511
|
+
*/
|
|
1512
|
+
clonable?: boolean;
|
|
1513
|
+
/**
|
|
1514
|
+
* When set to `true`, marks the shadow root as serializable so it is included when the host
|
|
1515
|
+
* element is serialized via `Element.getHTML({ serializableShadowRoots: true })`.
|
|
1516
|
+
*/
|
|
1517
|
+
serializable?: boolean;
|
|
1518
|
+
/**
|
|
1519
|
+
* The `id` of an element inside the shadow root that IDREF attributes pointing at the host
|
|
1520
|
+
* (e.g. `<label for>`, `aria-labelledby`, `aria-describedby`) should resolve to instead.
|
|
1521
|
+
* Lets a label or ARIA relationship outside the component target an internal element.
|
|
1522
|
+
*
|
|
1523
|
+
* @see https://developer.mozilla.org/en-US/docs/Web/API/ShadowRoot/referenceTarget
|
|
1524
|
+
*/
|
|
1525
|
+
referenceTarget?: string;
|
|
1526
|
+
}
|
|
1527
|
+
/**
|
|
1528
|
+
* Patch types for non-shadow DOM components that use slots.
|
|
1529
|
+
* - `'all'`: Apply all slot-related patches (equivalent to `lightDomPatches: true`)
|
|
1530
|
+
* - `'children'`: Patch child node accessors (children, firstChild, lastChild, etc.)
|
|
1531
|
+
* - `'clone'`: Patch `cloneNode()` to handle slotted content
|
|
1532
|
+
* - `'insert'`: Patch `appendChild()`, `insertBefore()`, etc. for slot relocation
|
|
1533
|
+
*/
|
|
1534
|
+
type SlotPatch = 'all' | 'children' | 'clone' | 'insert';
|
|
1535
|
+
/**
|
|
1536
|
+
* No encapsulation - component renders to light DOM with optional slot patches.
|
|
1537
|
+
*/
|
|
1538
|
+
interface NoneEncapsulation {
|
|
1539
|
+
type: 'none';
|
|
1540
|
+
/**
|
|
1541
|
+
* Patches to apply for slot handling in light DOM.
|
|
1542
|
+
* Only relevant if the component uses `<slot>` elements.
|
|
1543
|
+
*/
|
|
1544
|
+
patches?: SlotPatch[];
|
|
1545
|
+
}
|
|
1546
|
+
/**
|
|
1547
|
+
* Scoped CSS encapsulation - styles are scoped via class names without Shadow DOM.
|
|
1548
|
+
*/
|
|
1549
|
+
interface ScopedEncapsulation {
|
|
1550
|
+
type: 'scoped';
|
|
1551
|
+
/**
|
|
1552
|
+
* Patches to apply for slot handling with scoped styles.
|
|
1553
|
+
* Only relevant if the component uses `<slot>` elements.
|
|
1554
|
+
*/
|
|
1555
|
+
patches?: SlotPatch[];
|
|
1556
|
+
}
|
|
1557
|
+
/**
|
|
1558
|
+
* Encapsulation options for the `@Component()` decorator.
|
|
1559
|
+
* Determines how styles and DOM are isolated for the component.
|
|
1560
|
+
*/
|
|
1561
|
+
type EncapsulationOptions = ShadowEncapsulation | NoneEncapsulation | ScopedEncapsulation;
|
|
1562
|
+
interface ModeStyles {
|
|
1563
|
+
[modeName: string]: string | string[];
|
|
1564
|
+
}
|
|
1565
|
+
type ListenTargetOptions = 'body' | 'document' | 'window';
|
|
1566
|
+
interface UserBuildConditionals {
|
|
1567
|
+
isDev: boolean;
|
|
1568
|
+
isBrowser: boolean;
|
|
1569
|
+
isServer: boolean;
|
|
1570
|
+
isTesting: boolean;
|
|
1571
|
+
}
|
|
1572
|
+
type ResolutionHandler = (elm: HTMLElement) => string | undefined | null;
|
|
1573
|
+
type ErrorHandler = (err: any, element?: HTMLElement) => void;
|
|
1574
|
+
type TagTransformer = (tag: string) => string;
|
|
1575
|
+
/**
|
|
1576
|
+
* A constructor type that can be used as the base for mixin factories.
|
|
1577
|
+
*
|
|
1578
|
+
* ```ts
|
|
1579
|
+
* import { MixedInCtor } from '@stencil/core';
|
|
1580
|
+
*
|
|
1581
|
+
* const AFactoryFn = <B extends MixedInCtor>(Base: B) => {class A extends Base { propA = A }; return A;}
|
|
1582
|
+
* ```
|
|
1583
|
+
*/
|
|
1584
|
+
type MixedInCtor<T = {}> = new (...args: any[]) => T;
|
|
1585
|
+
/**
|
|
1586
|
+
* A map of `@Prop`/`@State` property names to their new and previous
|
|
1587
|
+
* values, passed to `componentShouldUpdate` once per render cycle.
|
|
1588
|
+
*
|
|
1589
|
+
* Pass `this` as `T` to type `changes` against your component's own
|
|
1590
|
+
* members, e.g. `componentShouldUpdate(changes: ComponentShouldUpdateChanges<this>)`.
|
|
1591
|
+
*/
|
|
1592
|
+
type ComponentShouldUpdateChanges<T = any> = { [K in Extract<keyof T, string>]?: {
|
|
1593
|
+
newVal: T[K];
|
|
1594
|
+
oldVal: T[K];
|
|
1595
|
+
}; };
|
|
1596
|
+
interface ComponentInterface {
|
|
1597
|
+
connectedCallback?(): void;
|
|
1598
|
+
disconnectedCallback?(): void;
|
|
1599
|
+
componentWillRender?(): Promise<void> | void;
|
|
1600
|
+
componentDidRender?(): void;
|
|
1601
|
+
/**
|
|
1602
|
+
* The component is about to load and it has not
|
|
1603
|
+
* rendered yet.
|
|
1604
|
+
*
|
|
1605
|
+
* This is the best place to make any data updates
|
|
1606
|
+
* before the first render.
|
|
1607
|
+
*
|
|
1608
|
+
* componentWillLoad will only be called once.
|
|
1609
|
+
*/
|
|
1610
|
+
componentWillLoad?(): Promise<void> | void;
|
|
1611
|
+
/**
|
|
1612
|
+
* The component has loaded and has already rendered.
|
|
1613
|
+
*
|
|
1614
|
+
* Updating data in this method will cause the
|
|
1615
|
+
* component to re-render.
|
|
1616
|
+
*
|
|
1617
|
+
* componentDidLoad will only be called once.
|
|
1618
|
+
*/
|
|
1619
|
+
componentDidLoad?(): void;
|
|
1620
|
+
/**
|
|
1621
|
+
* One or more `@Prop` or `@State` properties changed and a rerender is
|
|
1622
|
+
* about to be requested. `changes` contains every property that changed
|
|
1623
|
+
* since the last render, keyed by property name.
|
|
1624
|
+
*
|
|
1625
|
+
* Called once per render cycle, batching all properties that changed
|
|
1626
|
+
* synchronously since the last render.
|
|
1627
|
+
*
|
|
1628
|
+
* Return `false` to prevent the pending render.
|
|
1629
|
+
*
|
|
1630
|
+
* componentShouldUpdate is not called on the first render.
|
|
1631
|
+
*/
|
|
1632
|
+
componentShouldUpdate?(changes: ComponentShouldUpdateChanges<this>): boolean | void;
|
|
1633
|
+
/**
|
|
1634
|
+
* The component is about to update and re-render.
|
|
1635
|
+
*
|
|
1636
|
+
* Called multiple times throughout the life of
|
|
1637
|
+
* the component as it updates.
|
|
1638
|
+
*
|
|
1639
|
+
* componentWillUpdate is not called on the first render.
|
|
1640
|
+
*/
|
|
1641
|
+
componentWillUpdate?(): Promise<void> | void;
|
|
1642
|
+
/**
|
|
1643
|
+
* The component has just re-rendered.
|
|
1865
1644
|
*
|
|
1866
1645
|
* Called multiple times throughout the life of
|
|
1867
1646
|
* the component as it updates.
|
|
@@ -1873,6 +1652,36 @@ interface ComponentInterface {
|
|
|
1873
1652
|
render?(): any;
|
|
1874
1653
|
[memberName: string]: any;
|
|
1875
1654
|
}
|
|
1655
|
+
/**
|
|
1656
|
+
* A reusable behavior that hooks into a `ReactiveControllerHost`'s lifecycle. Modeled after Lit's
|
|
1657
|
+
* `ReactiveController` pattern: implement the hooks you need, then register an instance with a host
|
|
1658
|
+
* via `host.addController(this)`.
|
|
1659
|
+
*/
|
|
1660
|
+
interface ReactiveController {
|
|
1661
|
+
hostConnected?(): void;
|
|
1662
|
+
hostDisconnected?(): void;
|
|
1663
|
+
hostWillLoad?(): Promise<void> | void;
|
|
1664
|
+
hostDidLoad?(): void;
|
|
1665
|
+
hostWillRender?(): Promise<void> | void;
|
|
1666
|
+
hostDidRender?(): void;
|
|
1667
|
+
hostWillUpdate?(): Promise<void> | void;
|
|
1668
|
+
hostDidUpdate?(): void;
|
|
1669
|
+
}
|
|
1670
|
+
/**
|
|
1671
|
+
* The shape added to a component by mixing in `ReactiveControllerHost` (see below).
|
|
1672
|
+
*/
|
|
1673
|
+
interface ReactiveControllerHostInterface extends ComponentInterface, HTMLElement {
|
|
1674
|
+
readonly controllers: ReadonlySet<ReactiveController>;
|
|
1675
|
+
addController(controller: ReactiveController): void;
|
|
1676
|
+
removeController(controller: ReactiveController): void;
|
|
1677
|
+
requestUpdate(): void;
|
|
1678
|
+
/**
|
|
1679
|
+
* Resolves once the next pending render commits. Matches the shape of Lit's
|
|
1680
|
+
* `ReactiveControllerHost.updateComplete`, for interop with controllers written against Lit's API
|
|
1681
|
+
* (e.g. `@lit/context`).
|
|
1682
|
+
*/
|
|
1683
|
+
readonly updateComplete: Promise<boolean>;
|
|
1684
|
+
}
|
|
1876
1685
|
interface RafCallback {
|
|
1877
1686
|
(timeStamp: number): void;
|
|
1878
1687
|
}
|
|
@@ -1917,7 +1726,7 @@ interface FunctionalUtilities {
|
|
|
1917
1726
|
map: (children: VNode[], cb: (vnode: ChildNode$1, index: number, array: ChildNode$1[]) => ChildNode$1) => VNode[];
|
|
1918
1727
|
}
|
|
1919
1728
|
interface FunctionalComponent<T = {}> {
|
|
1920
|
-
(props: T, children: VNode[], utils: FunctionalUtilities): VNode |
|
|
1729
|
+
(props: T, children: VNode[], utils: FunctionalUtilities): VNode | null;
|
|
1921
1730
|
}
|
|
1922
1731
|
/**
|
|
1923
1732
|
* A Child VDOM node
|
|
@@ -1928,7 +1737,7 @@ interface FunctionalComponent<T = {}> {
|
|
|
1928
1737
|
* {@link FunctionalUtilities}).
|
|
1929
1738
|
*/
|
|
1930
1739
|
interface ChildNode$1 {
|
|
1931
|
-
vtag?: string | number | Function;
|
|
1740
|
+
vtag?: string | number | Function | symbol | null;
|
|
1932
1741
|
vkey?: string | number;
|
|
1933
1742
|
vtext?: string;
|
|
1934
1743
|
vchildren?: VNode[];
|
|
@@ -1940,13 +1749,15 @@ interface ChildNode$1 {
|
|
|
1940
1749
|
*/
|
|
1941
1750
|
interface VNode {
|
|
1942
1751
|
$flags$: number;
|
|
1943
|
-
$tag$: string | number | Function;
|
|
1752
|
+
$tag$: string | number | Function | symbol | null;
|
|
1944
1753
|
$elm$: any;
|
|
1945
1754
|
$text$: string;
|
|
1946
1755
|
$children$: VNode[];
|
|
1947
1756
|
$attrs$?: any;
|
|
1948
1757
|
$name$?: string;
|
|
1949
1758
|
$key$?: string | number;
|
|
1759
|
+
/** Signal reference for vdom bypass: signal text nodes store the signal here. */
|
|
1760
|
+
$signal$?: any;
|
|
1950
1761
|
}
|
|
1951
1762
|
//#endregion
|
|
1952
1763
|
//#region src/declarations/stencil-public-compiler.d.ts
|
|
@@ -2034,19 +1845,14 @@ interface StencilConfig {
|
|
|
2034
1845
|
*/
|
|
2035
1846
|
generateExportMaps?: boolean;
|
|
2036
1847
|
/**
|
|
2037
|
-
*
|
|
2038
|
-
*
|
|
2039
|
-
|
|
2040
|
-
|
|
2041
|
-
/**
|
|
2042
|
-
* During production builds, the content of each generated file is hashed to represent the content,
|
|
2043
|
-
* and the hashed value is used as the filename. If the content isn't updated between builds,
|
|
2044
|
-
* then it receives the same filename. When the content is updated, then the filename is different.
|
|
1848
|
+
* Set to `false` to disable discovery of "CSS-only components" - pure-CSS custom-element
|
|
1849
|
+
* definitions marked with a `@component` JSDoc tag in `.css` files under `srcDir`. No JS
|
|
1850
|
+
* class, never registered via `customElements.define()` - just a documented,
|
|
1851
|
+
* type-checked tag name and its CSS custom properties/attribute variants.
|
|
2045
1852
|
*
|
|
2046
|
-
*
|
|
2047
|
-
* content delivery networks (CDNs) and heavily caching files for faster apps.
|
|
1853
|
+
* Defaults to `true`.
|
|
2048
1854
|
*/
|
|
2049
|
-
|
|
1855
|
+
enableCssOnlyComponents?: boolean;
|
|
2050
1856
|
/**
|
|
2051
1857
|
* The namespace config is a string representing a namespace for the app.
|
|
2052
1858
|
* For apps that are not meant to be a library of reusable components,
|
|
@@ -2063,11 +1869,12 @@ interface StencilConfig {
|
|
|
2063
1869
|
*/
|
|
2064
1870
|
outputTargets?: OutputTarget[];
|
|
2065
1871
|
/**
|
|
2066
|
-
* The plugins config can be used to add your own
|
|
2067
|
-
*
|
|
1872
|
+
* The plugins config can be used to add your own rolldown plugins, or Stencil's own
|
|
1873
|
+
* legacy `resolveId`/`load`/`transform` style plugins (identified by a `pluginType`
|
|
1874
|
+
* property). By default, Stencil does not come with Sass or PostCSS support.
|
|
2068
1875
|
* However, either can be added using the plugin array.
|
|
2069
1876
|
*/
|
|
2070
|
-
plugins?:
|
|
1877
|
+
plugins?: (Plugin$1 | Plugin)[];
|
|
2071
1878
|
/**
|
|
2072
1879
|
* Generate js source map files for all bundles.
|
|
2073
1880
|
* Set to `true` to always generate source maps, `false` to never generate source maps.
|
|
@@ -2088,65 +1895,51 @@ interface StencilConfig {
|
|
|
2088
1895
|
*/
|
|
2089
1896
|
transformAliasedImportPaths?: boolean;
|
|
2090
1897
|
/**
|
|
2091
|
-
*
|
|
2092
|
-
* (for example, decorating a method named `focus` with `@Method()`). Defaults to `false`.
|
|
2093
|
-
*/
|
|
2094
|
-
suppressReservedPublicNameWarnings?: boolean;
|
|
2095
|
-
/**
|
|
2096
|
-
* When `true`, we will validate a project's `package.json` based on the output target the user has designated
|
|
2097
|
-
* as `isPrimaryPackageOutputTarget: true` in their Stencil config.
|
|
2098
|
-
*/
|
|
2099
|
-
validatePrimaryPackageOutputTarget?: boolean;
|
|
2100
|
-
/**
|
|
2101
|
-
* Passes custom configuration down to the "@rollup/plugin-commonjs" that Stencil uses under the hood.
|
|
2102
|
-
* For further information: https://stenciljs.com/docs/module-bundling
|
|
2103
|
-
*/
|
|
2104
|
-
commonjs?: BundlingConfig;
|
|
2105
|
-
/**
|
|
2106
|
-
* Passes custom configuration down to the "@rollup/plugin-node-resolve" that Stencil uses under the hood.
|
|
1898
|
+
* Passes custom configuration to Rolldown's module resolution (its `resolve` option), e.g. `alias`.
|
|
2107
1899
|
* For further information: https://stenciljs.com/docs/module-bundling
|
|
2108
1900
|
*/
|
|
2109
1901
|
nodeResolve?: NodeResolveConfig;
|
|
2110
1902
|
/**
|
|
2111
|
-
* Passes custom configuration down to
|
|
1903
|
+
* Passes custom configuration down to rolldown itself, not all rolldown options can be overridden.
|
|
2112
1904
|
*/
|
|
2113
|
-
|
|
1905
|
+
rolldownConfig?: RolldownConfig;
|
|
2114
1906
|
/**
|
|
2115
|
-
* Sets if the
|
|
2116
|
-
* whereas this setting to `true` will also create es5 builds for both dev and prod modes. Setting
|
|
2117
|
-
* `buildEs5` to `prod` will only build ES5 in prod mode. Basically if the app does not need to run
|
|
2118
|
-
* on legacy browsers (IE11 and Edge 18 and below), it's safe to not build ES5, which will also speed
|
|
2119
|
-
* up build times. Defaults to `false`.
|
|
2120
|
-
*/
|
|
2121
|
-
buildEs5?: boolean | 'prod';
|
|
2122
|
-
/**
|
|
2123
|
-
* Sets if the JS browser files are minified or not. Stencil uses `terser` under the hood.
|
|
1907
|
+
* Sets if the JS browser files are minified or not.
|
|
2124
1908
|
* Defaults to `false` in dev mode and `true` in production mode.
|
|
2125
1909
|
*/
|
|
2126
1910
|
minifyJs?: boolean;
|
|
1911
|
+
/**
|
|
1912
|
+
* Which minifier to use for JS output when `minifyJs` is enabled.
|
|
1913
|
+
*
|
|
1914
|
+
* - `oxc`: built into rolldown. Much faster than terser. Output may be slightly larger.
|
|
1915
|
+
* - `terser`: slower, but currently produces the smallest output.
|
|
1916
|
+
*
|
|
1917
|
+
* Defaults to `oxc`.
|
|
1918
|
+
*/
|
|
1919
|
+
jsMinifier?: 'terser' | 'oxc';
|
|
2127
1920
|
/**
|
|
2128
1921
|
* Sets if the CSS is minified or not.
|
|
2129
1922
|
* Defaults to `false` in dev mode and `true` in production mode.
|
|
2130
1923
|
*/
|
|
2131
1924
|
minifyCss?: boolean;
|
|
2132
|
-
/**
|
|
2133
|
-
* Forces Stencil to run in `dev` mode if the value is `true` and `production` mode
|
|
2134
|
-
* if it's `false`.
|
|
2135
|
-
*
|
|
2136
|
-
* Defaults to `false` (ie. production) unless the `--dev` flag is used in the CLI.
|
|
2137
|
-
*/
|
|
2138
|
-
devMode?: boolean;
|
|
2139
1925
|
/**
|
|
2140
1926
|
* Object to provide a custom logger. By default a `logger` is already provided for the
|
|
2141
1927
|
* platform the compiler is running on, such as NodeJS or a browser.
|
|
2142
1928
|
*/
|
|
2143
1929
|
logger?: Logger;
|
|
2144
1930
|
/**
|
|
2145
|
-
*
|
|
2146
|
-
*
|
|
2147
|
-
|
|
1931
|
+
* Compatibility and workaround flags for framework/bundler edge cases
|
|
1932
|
+
* and rarely-needed diagnostic suppressions.
|
|
1933
|
+
*/
|
|
1934
|
+
compat?: ConfigCompat;
|
|
1935
|
+
/**
|
|
1936
|
+
* Replace `@State` and `@Prop` internals with `@preact/signals-core` signal primitives.
|
|
1937
|
+
* Enables cross-framework reactive interop - component state becomes subscribable by
|
|
1938
|
+
* Solid, Angular, Preact and any TC39-signal-compatible library without event/attribute
|
|
1939
|
+
* roundtrips. No API changes required in component code.
|
|
1940
|
+
* Defaults to `false`.
|
|
2148
1941
|
*/
|
|
2149
|
-
|
|
1942
|
+
signalBacking?: boolean;
|
|
2150
1943
|
/**
|
|
2151
1944
|
* The hydrated flag identifies if a component and all of its child components
|
|
2152
1945
|
* have finished hydrating. This helps prevent any flash of unstyled content (FOUC)
|
|
@@ -2204,22 +1997,13 @@ interface StencilConfig {
|
|
|
2204
1997
|
docs?: StencilDocsConfig;
|
|
2205
1998
|
globalScript?: string;
|
|
2206
1999
|
srcIndexHtml?: string;
|
|
2207
|
-
testing?: TestingConfig;
|
|
2208
2000
|
maxConcurrentWorkers?: number;
|
|
2209
2001
|
preamble?: string;
|
|
2210
|
-
|
|
2211
|
-
before?:
|
|
2212
|
-
after?:
|
|
2002
|
+
rolldownPlugins?: {
|
|
2003
|
+
before?: Plugin[];
|
|
2004
|
+
after?: Plugin[];
|
|
2213
2005
|
};
|
|
2214
2006
|
entryComponentsHint?: string[];
|
|
2215
|
-
/**
|
|
2216
|
-
* Sets whether Stencil will write files to `dist/` during the build or not.
|
|
2217
|
-
*
|
|
2218
|
-
* By default this value is set to the opposite value of {@link devMode},
|
|
2219
|
-
* i.e. it will be `true` when building for production and `false` when
|
|
2220
|
-
* building for development.
|
|
2221
|
-
*/
|
|
2222
|
-
buildDist?: boolean;
|
|
2223
2007
|
buildLogFilePath?: string;
|
|
2224
2008
|
devInspector?: boolean;
|
|
2225
2009
|
devServer?: StencilDevServerConfig;
|
|
@@ -2247,7 +2031,7 @@ interface StencilConfig {
|
|
|
2247
2031
|
* An array of component tag names to exclude from production builds.
|
|
2248
2032
|
* Useful to remove test, demo or experimental components from final output.
|
|
2249
2033
|
*
|
|
2250
|
-
* **Note:** Exclusion only applies to production builds (default
|
|
2034
|
+
* **Note:** Exclusion only applies to production builds (the default).
|
|
2251
2035
|
* Development builds (with `--dev` flag) will include all components to support local testing.
|
|
2252
2036
|
*
|
|
2253
2037
|
* Supports glob patterns for matching multiple components:
|
|
@@ -2271,23 +2055,78 @@ interface StencilConfig {
|
|
|
2271
2055
|
* Set whether unused dependencies should be excluded from the built output.
|
|
2272
2056
|
*/
|
|
2273
2057
|
excludeUnusedDependencies?: boolean;
|
|
2274
|
-
stencilCoreResolvedId?: string;
|
|
2275
|
-
}
|
|
2276
|
-
interface ConfigExtrasBase {
|
|
2277
2058
|
/**
|
|
2278
|
-
*
|
|
2279
|
-
*
|
|
2280
|
-
*
|
|
2281
|
-
*
|
|
2282
|
-
*
|
|
2283
|
-
*
|
|
2059
|
+
* Declares the set of valid style "modes" (e.g. `ios`, `md`) used by mode-keyed
|
|
2060
|
+
* `styleUrls`/`styles` in `@Component()`. When set, the compiler validates that
|
|
2061
|
+
* every mode key used in a component matches one of these entries, catching typos
|
|
2062
|
+
* at build time. Entries marked `required` must be present on every component that
|
|
2063
|
+
* defines any mode-keyed styles.
|
|
2064
|
+
*
|
|
2065
|
+
* @example
|
|
2066
|
+
* ```ts
|
|
2067
|
+
* export const config: Config = {
|
|
2068
|
+
* modes: ['ios', { mode: 'md', required: true }],
|
|
2069
|
+
* };
|
|
2070
|
+
* ```
|
|
2071
|
+
*
|
|
2072
|
+
* @default []
|
|
2073
|
+
*/
|
|
2074
|
+
modes?: (string | ModeConfig)[];
|
|
2075
|
+
/**
|
|
2076
|
+
* Explicitly declare which npm packages are Stencil collections to be re-bundled into this project.
|
|
2077
|
+
*
|
|
2078
|
+
* Without this option, collection ingestion is triggered only by a side-effect import:
|
|
2079
|
+
* ```ts
|
|
2080
|
+
* import '@ionic/core';
|
|
2081
|
+
* ```
|
|
2082
|
+
* @example
|
|
2083
|
+
* ```ts
|
|
2084
|
+
* export const config: Config = {
|
|
2085
|
+
* collections: ['@ionic/core', '@my-org/design-system'],
|
|
2086
|
+
* };
|
|
2087
|
+
* ```
|
|
2088
|
+
*
|
|
2089
|
+
* @default []
|
|
2284
2090
|
*/
|
|
2285
|
-
|
|
2091
|
+
collections?: string[];
|
|
2092
|
+
}
|
|
2093
|
+
/**
|
|
2094
|
+
* DOM patches for light-dom / scoped components that use `<slot>`.
|
|
2095
|
+
*
|
|
2096
|
+
* These patches shield the component's slot machinery from framework DOM mutations
|
|
2097
|
+
* (e.g. when Angular or React insert / remove nodes they route directly to the host
|
|
2098
|
+
* element, bypassing the slot polyfill) and prevent hydration errors when a framework
|
|
2099
|
+
* encounters Stencil's internal slot reference nodes during SSR reconciliation.
|
|
2100
|
+
*
|
|
2101
|
+
* Patches are only applied at runtime when a component is both non-shadow **and**
|
|
2102
|
+
* declares at least one `<slot>`, so enabling them has no effect on pure shadow-DOM
|
|
2103
|
+
* components.
|
|
2104
|
+
*
|
|
2105
|
+
* Set to `true` (default) to enable all patches, `false` to disable all, or an object
|
|
2106
|
+
* for granular control.
|
|
2107
|
+
*/
|
|
2108
|
+
type LightDomPatches = {
|
|
2109
|
+
/** Patches `childNodes`/`children` getters to return only slotted content. */
|
|
2110
|
+
childNodes?: boolean;
|
|
2111
|
+
/** Patches `cloneNode()` to correctly deep-clone slotted content. */
|
|
2112
|
+
cloneNode?: boolean;
|
|
2113
|
+
/** Patches `appendChild()`, `insertBefore()`, and `removeChild()` to route to the correct slot, and the `innerHTML` / `innerText` setters to replace only slotted content. */
|
|
2114
|
+
domMutations?: boolean;
|
|
2115
|
+
/** Patches `textContent` to act like shadow DOM (reads/writes slotted text only). */
|
|
2116
|
+
textContent?: boolean;
|
|
2117
|
+
};
|
|
2118
|
+
/**
|
|
2119
|
+
* Compatibility and workaround flags, primarily for shielding non-shadow DOM components
|
|
2120
|
+
* from consuming frameworks that mutate internals they don't know about, plus other
|
|
2121
|
+
* framework/bundler integration edge cases and rarely-needed diagnostic suppressions.
|
|
2122
|
+
* These are opt-in behaviors that aren't needed by every project.
|
|
2123
|
+
*/
|
|
2124
|
+
interface ConfigCompat {
|
|
2286
2125
|
/**
|
|
2287
2126
|
* Projects that use a Stencil library built using the `dist` output target may have trouble lazily
|
|
2288
2127
|
* loading components when using a bundler such as Vite or Parcel. Setting this flag to `true` will change how Stencil
|
|
2289
2128
|
* lazily loads components in a way that works with additional bundlers. Setting this flag to `true` will increase
|
|
2290
|
-
* the size of the compiled output. Defaults to `
|
|
2129
|
+
* the size of the compiled output. Defaults to `true`.
|
|
2291
2130
|
*/
|
|
2292
2131
|
enableImportInjection?: boolean;
|
|
2293
2132
|
/**
|
|
@@ -2302,73 +2141,27 @@ interface ConfigExtrasBase {
|
|
|
2302
2141
|
*/
|
|
2303
2142
|
initializeNextTick?: boolean;
|
|
2304
2143
|
/**
|
|
2305
|
-
*
|
|
2306
|
-
*
|
|
2307
|
-
* @deprecated This option has been deprecated in favour of `setTagTransformer` and `transformTag`. It will be removed in a future major version of Stencil.
|
|
2308
|
-
*/
|
|
2309
|
-
tagNameTransform?: boolean;
|
|
2310
|
-
/**
|
|
2311
|
-
* Adds `transformTag` calls to css strings and querySelector(All) calls
|
|
2144
|
+
* Adds `transformTag` calls to css strings and querySelector(All) calls.
|
|
2145
|
+
* Use `'prod'` to enable only in production builds.
|
|
2312
2146
|
*/
|
|
2313
2147
|
additionalTagTransformers?: boolean | 'prod';
|
|
2314
2148
|
/**
|
|
2315
|
-
*
|
|
2316
|
-
*
|
|
2317
|
-
* Shadow DOM when using `slot`s.
|
|
2318
|
-
* Defaults to `false`.
|
|
2319
|
-
*/
|
|
2320
|
-
experimentalScopedSlotChanges?: boolean;
|
|
2321
|
-
/**
|
|
2322
|
-
* By default Stencil turns the stylesheet provided to `globalStyle` into a constructable stylesheet
|
|
2323
|
-
* and adds it to each component which can be useful for sharing styles efficiently across components.
|
|
2324
|
-
* In some cases this can be undesirable:
|
|
2325
|
-
* - If `globalStyle` is intended to configure the lightDOM only
|
|
2326
|
-
* - If `globalStyle` is large it can bloat the size of SSR output when using declarative-shadow-dom
|
|
2327
|
-
* Setting this to `false` will prevent Stencil from adding any `globalStyle` to each component.
|
|
2328
|
-
*
|
|
2329
|
-
* Defaults to `true`.
|
|
2330
|
-
*/
|
|
2331
|
-
addGlobalStyleToComponents?: boolean;
|
|
2332
|
-
}
|
|
2333
|
-
type ConfigExtrasSlotFixes<ExperimentalFixesEnabled extends boolean, IndividualFlags extends boolean> = {
|
|
2334
|
-
/**
|
|
2335
|
-
* By default, the slot polyfill does not update `appendChild()` so that it appends
|
|
2336
|
-
* new child nodes into the correct child slot like how shadow dom works. This is an opt-in
|
|
2337
|
-
* polyfill for those who need it when using `element.appendChild(node)` and expecting the
|
|
2338
|
-
* child to be appended in the same location shadow dom would. This is not required for
|
|
2339
|
-
* IE11 or Edge 18, but can be enabled if the app is using `appendChild()`. Defaults to `false`.
|
|
2340
|
-
*/
|
|
2341
|
-
appendChildSlotFix?: IndividualFlags;
|
|
2342
|
-
/**
|
|
2343
|
-
* By default, the runtime does not polyfill `cloneNode()` when cloning a component
|
|
2344
|
-
* that uses the slot polyfill. This is an opt-in polyfill for those who need it.
|
|
2345
|
-
* This is not required for IE11 or Edge 18, but can be enabled if the app is using
|
|
2346
|
-
* `cloneNode()` and unexpected node are being cloned due to the slot polyfill
|
|
2347
|
-
* simulating shadow dom. Defaults to `false`.
|
|
2348
|
-
*/
|
|
2349
|
-
cloneNodeFix?: IndividualFlags;
|
|
2350
|
-
/**
|
|
2351
|
-
* Experimental flag to align the behavior of invoking `textContent` on a scoped component to act more like a
|
|
2352
|
-
* component that uses the shadow DOM. Defaults to `false`
|
|
2149
|
+
* DOM patches for light-dom / scoped components that use `<slot>`.
|
|
2150
|
+
* See {@link LightDomPatches} for granular control. Defaults to `true`.
|
|
2353
2151
|
*/
|
|
2354
|
-
|
|
2152
|
+
lightDomPatches?: boolean | LightDomPatches;
|
|
2355
2153
|
/**
|
|
2356
|
-
*
|
|
2357
|
-
*
|
|
2358
|
-
* getters are not patched to only show the child nodes and elements of the default slot.
|
|
2359
|
-
* Defaults to `false`.
|
|
2154
|
+
* When `true`, Stencil will suppress diagnostics which warn about public members using reserved names
|
|
2155
|
+
* (for example, decorating a method named `focus` with `@Method()`). Defaults to `false`.
|
|
2360
2156
|
*/
|
|
2361
|
-
|
|
2157
|
+
suppressPublicNameWarnings?: boolean;
|
|
2362
2158
|
/**
|
|
2363
|
-
*
|
|
2364
|
-
* {@link scopedSlotTextContentFix}.
|
|
2159
|
+
* When `true`, Stencil will suppress diagnostics which warn about event names conflicting with native DOM event names. Defaults to `false`.
|
|
2365
2160
|
*/
|
|
2366
|
-
|
|
2367
|
-
}
|
|
2368
|
-
type ConfigExtras = ConfigExtrasBase & (ConfigExtrasSlotFixes<true, true> | ConfigExtrasSlotFixes<false, boolean>);
|
|
2161
|
+
suppressEventNameWarnings?: boolean;
|
|
2162
|
+
}
|
|
2369
2163
|
interface Config extends StencilConfig {
|
|
2370
2164
|
buildAppCore?: boolean;
|
|
2371
|
-
buildDocs?: boolean;
|
|
2372
2165
|
configPath?: string;
|
|
2373
2166
|
writeLog?: boolean;
|
|
2374
2167
|
devServer?: DevServerConfig;
|
|
@@ -2406,10 +2199,6 @@ interface Config extends StencilConfig {
|
|
|
2406
2199
|
* Whether to generate service worker
|
|
2407
2200
|
*/
|
|
2408
2201
|
generateServiceWorker?: boolean;
|
|
2409
|
-
/**
|
|
2410
|
-
* Whether e2e tests are being run
|
|
2411
|
-
*/
|
|
2412
|
-
e2eTests?: boolean;
|
|
2413
2202
|
/**
|
|
2414
2203
|
* Dev server address override
|
|
2415
2204
|
*/
|
|
@@ -2449,7 +2238,7 @@ interface Config extends StencilConfig {
|
|
|
2449
2238
|
* conforming to a given interface. For best results, pair with a validation
|
|
2450
2239
|
* function as shown in the example.
|
|
2451
2240
|
*/
|
|
2452
|
-
type Loose<T extends
|
|
2241
|
+
type Loose<T extends object> = Record<string, any> & Partial<T>;
|
|
2453
2242
|
/**
|
|
2454
2243
|
* A Loose version of the Config interface. This is intended to let us load a partial config
|
|
2455
2244
|
* and have type information carry though as we construct an object which is a valid `Config`.
|
|
@@ -2464,11 +2253,11 @@ type UnvalidatedConfig = Loose<Config>;
|
|
|
2464
2253
|
* type ReqFieldFoo = RequireFields<Foo, 'bar'>; // { bar: number, baz?: string }
|
|
2465
2254
|
* ```
|
|
2466
2255
|
*/
|
|
2467
|
-
type RequireFields<T, K extends keyof T> = T & { [P in K]-?: T[P] };
|
|
2256
|
+
type RequireFields<T, K extends keyof T> = T & { [P in K]-?: T[P]; };
|
|
2468
2257
|
/**
|
|
2469
2258
|
* Fields in {@link Config} to make required for {@link ValidatedConfig}
|
|
2470
2259
|
*/
|
|
2471
|
-
type StrictConfigFields = keyof Pick<Config, '
|
|
2260
|
+
type StrictConfigFields = keyof Pick<Config, 'cacheDir' | 'devServer' | 'compat' | 'fsNamespace' | 'hydratedFlag' | 'jsMinifier' | 'logLevel' | 'logger' | 'minifyCss' | 'minifyJs' | 'namespace' | 'outputTargets' | 'packageJsonFilePath' | 'rolldownConfig' | 'rootDir' | 'srcDir' | 'srcIndexHtml' | 'sys' | 'transformAliasedImportPaths'>;
|
|
2472
2261
|
/**
|
|
2473
2262
|
* A version of {@link Config} that makes certain fields required. This type represents a valid configuration entity.
|
|
2474
2263
|
* When a configuration is received by the user, it is a bag of unverified data. In order to make stricter guarantees
|
|
@@ -2476,8 +2265,24 @@ type StrictConfigFields = keyof Pick<Config, 'buildEs5' | 'cacheDir' | 'devMode'
|
|
|
2476
2265
|
* validations have occurred at runtime.
|
|
2477
2266
|
*/
|
|
2478
2267
|
type ValidatedConfig = RequireFields<Config, StrictConfigFields> & {
|
|
2268
|
+
/**
|
|
2269
|
+
* Whether the build is running in development mode.
|
|
2270
|
+
* Set by the `--dev` CLI flag. Not user-configurable in `stencil.config.ts`.
|
|
2271
|
+
*/
|
|
2272
|
+
devMode: boolean;
|
|
2479
2273
|
sourceMap: boolean;
|
|
2480
2274
|
};
|
|
2275
|
+
interface ModeConfig {
|
|
2276
|
+
/**
|
|
2277
|
+
* The mode name, matched against `styleUrls`/`styles` object keys in `@Component()`.
|
|
2278
|
+
*/
|
|
2279
|
+
mode: string;
|
|
2280
|
+
/**
|
|
2281
|
+
* When `true`, every component that defines mode-keyed `styleUrls` or `styles`
|
|
2282
|
+
* must include this mode. Defaults to `false`.
|
|
2283
|
+
*/
|
|
2284
|
+
required?: boolean;
|
|
2285
|
+
}
|
|
2481
2286
|
interface HydratedFlag {
|
|
2482
2287
|
/**
|
|
2483
2288
|
* Defaults to `hydrated`.
|
|
@@ -2519,8 +2324,7 @@ interface StencilDevServerConfig {
|
|
|
2519
2324
|
* EXPERIMENTAL!
|
|
2520
2325
|
* During development, node modules can be independently requested and bundled, making for
|
|
2521
2326
|
* faster build times. This is only available using the Stencil Dev Server throughout
|
|
2522
|
-
* development. Production builds
|
|
2523
|
-
* this setting to `false`. Default is `false`.
|
|
2327
|
+
* development. Production builds will override this setting to `false`. Default is `false`.
|
|
2524
2328
|
*/
|
|
2525
2329
|
experimentalDevModules?: boolean;
|
|
2526
2330
|
/**
|
|
@@ -2621,7 +2425,8 @@ interface DevServerConfig extends StencilDevServerConfig {
|
|
|
2621
2425
|
* reloading updates.
|
|
2622
2426
|
*/
|
|
2623
2427
|
excludeHmr?: string[];
|
|
2624
|
-
|
|
2428
|
+
/** Serve `index` for page requests that match no file (single-page app routes). `null` turns it off. */
|
|
2429
|
+
historyApiFallback?: HistoryApiFallback | null;
|
|
2625
2430
|
openBrowser?: boolean;
|
|
2626
2431
|
prerenderConfig?: string;
|
|
2627
2432
|
protocol?: 'http' | 'https';
|
|
@@ -2681,11 +2486,11 @@ interface PrerenderConfig {
|
|
|
2681
2486
|
* Run after each `document` is hydrated, but before it is serialized
|
|
2682
2487
|
* into an HTML string. Hook is passed the `document` and its `URL`.
|
|
2683
2488
|
*/
|
|
2684
|
-
|
|
2489
|
+
afterSsr?(document: Document, url: URL, results: PrerenderUrlResults): any | Promise<any>;
|
|
2685
2490
|
/**
|
|
2686
2491
|
* Run before each `document` is hydrated. Hook is passed the `document` it's `URL`.
|
|
2687
2492
|
*/
|
|
2688
|
-
|
|
2493
|
+
beforeSsr?(document: Document, url: URL): any | Promise<any>;
|
|
2689
2494
|
/**
|
|
2690
2495
|
* Runs after the template Document object has serialize into an
|
|
2691
2496
|
* HTML formatted string. Returns an HTML string to be used as the
|
|
@@ -2729,9 +2534,9 @@ interface PrerenderConfig {
|
|
|
2729
2534
|
*/
|
|
2730
2535
|
filePath?(url: URL, filePath: string): string;
|
|
2731
2536
|
/**
|
|
2732
|
-
* Returns the
|
|
2537
|
+
* Returns the prerender options to use for each individual prerendered page.
|
|
2733
2538
|
*/
|
|
2734
|
-
|
|
2539
|
+
prerenderOptions?(url: URL): PrerenderOptions;
|
|
2735
2540
|
/**
|
|
2736
2541
|
* Returns the template file's content. The template is the base
|
|
2737
2542
|
* HTML used for all prerendered pages.
|
|
@@ -2755,7 +2560,7 @@ interface PrerenderConfig {
|
|
|
2755
2560
|
*/
|
|
2756
2561
|
trailingSlash?: boolean;
|
|
2757
2562
|
}
|
|
2758
|
-
interface
|
|
2563
|
+
interface SsrDocumentOptions {
|
|
2759
2564
|
/**
|
|
2760
2565
|
* Build ID that will be added to `<html data-stencil-build="BUILD_ID">`. By default
|
|
2761
2566
|
* a random ID will be generated
|
|
@@ -2772,7 +2577,7 @@ interface HydrateDocumentOptions {
|
|
|
2772
2577
|
* JavaScript to read the structure of the HTML and rebuild each
|
|
2773
2578
|
* component. Defaults to `true`.
|
|
2774
2579
|
*/
|
|
2775
|
-
|
|
2580
|
+
clientSsrAnnotations?: boolean;
|
|
2776
2581
|
/**
|
|
2777
2582
|
* Constrain `setTimeout()` to 1ms, but still async. Also
|
|
2778
2583
|
* only allows `setInterval()` to fire once, also constrained to 1ms.
|
|
@@ -2805,6 +2610,16 @@ interface HydrateDocumentOptions {
|
|
|
2805
2610
|
* Sets `document.referrer`
|
|
2806
2611
|
*/
|
|
2807
2612
|
referrer?: string;
|
|
2613
|
+
/**
|
|
2614
|
+
* Render into one long-lived mock window, reset between renders, instead of creating a new one
|
|
2615
|
+
* for every call. Skips evaluating the whole SSR platform (runtime and every component)
|
|
2616
|
+
* on each render: most of the cost of rendering a small fragment, and a good part of a whole page.
|
|
2617
|
+
*
|
|
2618
|
+
* Applies to HTML string input (not a `Document`). One window per distinct `serializeShadowRoot` value,
|
|
2619
|
+
* and renders sharing a window run one at a time.
|
|
2620
|
+
* Defaults to `false`, except in the `ssr-wasm` output target, where it defaults to `true`.
|
|
2621
|
+
*/
|
|
2622
|
+
reuseWindow?: boolean;
|
|
2808
2623
|
/**
|
|
2809
2624
|
* Removes every `<script>` element found in the `document`. Defaults to `false`.
|
|
2810
2625
|
*/
|
|
@@ -2871,22 +2686,35 @@ interface HydrateDocumentOptions {
|
|
|
2871
2686
|
default: 'declarative-shadow-dom' | 'scoped';
|
|
2872
2687
|
} | boolean;
|
|
2873
2688
|
}
|
|
2874
|
-
|
|
2689
|
+
/**
|
|
2690
|
+
* Backwards compat for v4
|
|
2691
|
+
* @deprecated - use SsrDocumentOptions instead
|
|
2692
|
+
*/
|
|
2693
|
+
interface HydrateDocumentOptions extends SsrDocumentOptions {}
|
|
2694
|
+
interface SerializeDocumentOptions extends SsrDocumentOptions {
|
|
2875
2695
|
/**
|
|
2876
2696
|
* Runs after the `document` has been hydrated.
|
|
2877
2697
|
*/
|
|
2698
|
+
afterSsr?(document: any): any | Promise<any>;
|
|
2699
|
+
/**
|
|
2700
|
+
* @deprecated Use `afterSsr` instead.
|
|
2701
|
+
*/
|
|
2878
2702
|
afterHydrate?(document: any): any | Promise<any>;
|
|
2879
2703
|
/**
|
|
2880
2704
|
* Sets an approximate line width the HTML should attempt to stay within.
|
|
2881
2705
|
* Note that this is "approximate", in that HTML may often not be able
|
|
2882
2706
|
* to be split at an exact line width. Additionally, new lines created
|
|
2883
2707
|
* is where HTML naturally already has whitespace, such as before an
|
|
2884
|
-
* attribute or spaces between words. Defaults to `100
|
|
2708
|
+
* attribute or spaces between words. Defaults to no wrapping (`100` when prerendering).
|
|
2885
2709
|
*/
|
|
2886
2710
|
approximateLineWidth?: number;
|
|
2887
2711
|
/**
|
|
2888
2712
|
* Runs before the `document` has been hydrated.
|
|
2889
2713
|
*/
|
|
2714
|
+
beforeSsr?(document: any): any | Promise<any>;
|
|
2715
|
+
/**
|
|
2716
|
+
* @deprecated Use `beforeSsr` instead.
|
|
2717
|
+
*/
|
|
2890
2718
|
beforeHydrate?(document: any): any | Promise<any>;
|
|
2891
2719
|
/**
|
|
2892
2720
|
* Format the HTML in a nicely indented format.
|
|
@@ -2895,12 +2723,12 @@ interface SerializeDocumentOptions extends HydrateDocumentOptions {
|
|
|
2895
2723
|
prettyHtml?: boolean;
|
|
2896
2724
|
/**
|
|
2897
2725
|
* Remove quotes from attribute values when possible.
|
|
2898
|
-
* Defaults to `true
|
|
2726
|
+
* Defaults to `false` (`true` when prerendering).
|
|
2899
2727
|
*/
|
|
2900
2728
|
removeAttributeQuotes?: boolean;
|
|
2901
2729
|
/**
|
|
2902
2730
|
* Remove the `=""` from standardized `boolean` attributes,
|
|
2903
|
-
* such as `hidden` or `checked`. Defaults to `true
|
|
2731
|
+
* such as `hidden` or `checked`. Defaults to `false` (`true` when prerendering).
|
|
2904
2732
|
*/
|
|
2905
2733
|
removeBooleanAttributeQuotes?: boolean;
|
|
2906
2734
|
/**
|
|
@@ -2909,7 +2737,7 @@ interface SerializeDocumentOptions extends HydrateDocumentOptions {
|
|
|
2909
2737
|
*/
|
|
2910
2738
|
removeEmptyAttributes?: boolean;
|
|
2911
2739
|
/**
|
|
2912
|
-
* Remove HTML comments. Defaults to `true
|
|
2740
|
+
* Remove HTML comments. Defaults to `false` (`true` when prerendering).
|
|
2913
2741
|
*/
|
|
2914
2742
|
removeHtmlComments?: boolean;
|
|
2915
2743
|
/**
|
|
@@ -2924,12 +2752,23 @@ interface SerializeDocumentOptions extends HydrateDocumentOptions {
|
|
|
2924
2752
|
*/
|
|
2925
2753
|
modes?: ResolutionHandler[];
|
|
2926
2754
|
}
|
|
2927
|
-
interface
|
|
2755
|
+
interface SsrFactoryOptions extends SerializeDocumentOptions {
|
|
2928
2756
|
serializeToHtml: boolean;
|
|
2929
2757
|
destroyWindow: boolean;
|
|
2930
2758
|
destroyDocument: boolean;
|
|
2759
|
+
/**
|
|
2760
|
+
* A canonical key for `serializeShadowRoot`, set by the renderer. Renders with the same key
|
|
2761
|
+
* render every component the same way, so they can share an SSR platform.
|
|
2762
|
+
* @internal
|
|
2763
|
+
*/
|
|
2764
|
+
serializeShadowRootKey?: string;
|
|
2931
2765
|
}
|
|
2932
|
-
|
|
2766
|
+
/**
|
|
2767
|
+
* Backwards compat for v4
|
|
2768
|
+
* @deprecated - use SsrFactoryOptions instead
|
|
2769
|
+
*/
|
|
2770
|
+
interface HydrateFactoryOptions extends SsrFactoryOptions {}
|
|
2771
|
+
interface PrerenderOptions extends SerializeDocumentOptions {
|
|
2933
2772
|
/**
|
|
2934
2773
|
* Adds `<link rel="modulepreload">` for modules that will eventually be requested.
|
|
2935
2774
|
* Defaults to `true`.
|
|
@@ -2964,6 +2803,11 @@ interface PrerenderHydrateOptions extends SerializeDocumentOptions {
|
|
|
2964
2803
|
*/
|
|
2965
2804
|
staticDocument?: boolean;
|
|
2966
2805
|
}
|
|
2806
|
+
/**
|
|
2807
|
+
* v4 backwards compat
|
|
2808
|
+
* @deprecated - use PrerenderOptions instead
|
|
2809
|
+
*/
|
|
2810
|
+
interface PrerenderHydrateOptions extends PrerenderOptions {}
|
|
2967
2811
|
interface RobotsTxtOpts {
|
|
2968
2812
|
urls: string[];
|
|
2969
2813
|
sitemapUrl: string;
|
|
@@ -2998,7 +2842,7 @@ interface CompilerSystem {
|
|
|
2998
2842
|
name: 'node' | 'in-memory';
|
|
2999
2843
|
version: string;
|
|
3000
2844
|
events?: BuildEvents;
|
|
3001
|
-
details
|
|
2845
|
+
details: SystemDetails;
|
|
3002
2846
|
/**
|
|
3003
2847
|
* Add a callback which will be ran when destroy() is called.
|
|
3004
2848
|
*/
|
|
@@ -3011,14 +2855,15 @@ interface CompilerSystem {
|
|
|
3011
2855
|
* SYNC! Always returns a boolean, does not throw.
|
|
3012
2856
|
*/
|
|
3013
2857
|
accessSync(p: string): boolean;
|
|
3014
|
-
applyGlobalPatch?(fromDir: string): Promise<void>;
|
|
3015
2858
|
applyPrerenderGlobalPatch?(opts: {
|
|
3016
2859
|
devServerHostUrl: string;
|
|
3017
2860
|
window: any;
|
|
3018
2861
|
}): void;
|
|
3019
|
-
|
|
3020
|
-
|
|
3021
|
-
|
|
2862
|
+
/**
|
|
2863
|
+
* Check npm for a newer Stencil version. Resolves a function that logs the result.
|
|
2864
|
+
*/
|
|
2865
|
+
checkVersion(logger: Logger, currentVersion: string): Promise<() => void>;
|
|
2866
|
+
copy(copyTasks: Required<CopyTask>[], srcDir: string): Promise<CopyResults>;
|
|
3022
2867
|
/**
|
|
3023
2868
|
* Always returns a boolean if the files were copied or not. Does not throw.
|
|
3024
2869
|
*/
|
|
@@ -3043,7 +2888,7 @@ interface CompilerSystem {
|
|
|
3043
2888
|
/**
|
|
3044
2889
|
* Each platform has a different way to dynamically import modules.
|
|
3045
2890
|
*/
|
|
3046
|
-
dynamicImport
|
|
2891
|
+
dynamicImport(p: string): Promise<any>;
|
|
3047
2892
|
/**
|
|
3048
2893
|
* Creates the worker controller for the current system.
|
|
3049
2894
|
*
|
|
@@ -3053,43 +2898,18 @@ interface CompilerSystem {
|
|
|
3053
2898
|
*/
|
|
3054
2899
|
createWorkerController?(maxConcurrentWorkers: number): WorkerMainController;
|
|
3055
2900
|
encodeToBase64(str: string): string;
|
|
3056
|
-
/**
|
|
3057
|
-
* @deprecated
|
|
3058
|
-
*/
|
|
3059
|
-
ensureDependencies?(opts: {
|
|
3060
|
-
rootDir: string;
|
|
3061
|
-
logger: Logger;
|
|
3062
|
-
dependencies: CompilerDependency[];
|
|
3063
|
-
}): Promise<{
|
|
3064
|
-
stencilPath: string;
|
|
3065
|
-
diagnostics: Diagnostic$1[];
|
|
3066
|
-
}>;
|
|
3067
|
-
/**
|
|
3068
|
-
* @deprecated
|
|
3069
|
-
*/
|
|
3070
|
-
ensureResources?(opts: {
|
|
3071
|
-
rootDir: string;
|
|
3072
|
-
logger: Logger;
|
|
3073
|
-
dependencies: CompilerDependency[];
|
|
3074
|
-
}): Promise<void>;
|
|
3075
2901
|
/**
|
|
3076
2902
|
* process.exit()
|
|
3077
2903
|
*/
|
|
3078
2904
|
exit(exitCode: number): Promise<void>;
|
|
3079
|
-
/**
|
|
3080
|
-
* Optionally provide a fetch() function rather than using the built-in fetch().
|
|
3081
|
-
* First arg is a url string or Request object (RequestInfo).
|
|
3082
|
-
* Second arg is the RequestInit. Returns the Response object
|
|
3083
|
-
*/
|
|
3084
|
-
fetch?(input: string | any, init?: any): Promise<any>;
|
|
3085
2905
|
/**
|
|
3086
2906
|
* Generates a sha1 digest encoded as HEX
|
|
3087
2907
|
*/
|
|
3088
|
-
generateContentHash
|
|
2908
|
+
generateContentHash(content: string | any, length?: number): Promise<string>;
|
|
3089
2909
|
/**
|
|
3090
2910
|
* Generates a sha1 digest encoded as HEX from a file path
|
|
3091
2911
|
*/
|
|
3092
|
-
generateFileHash
|
|
2912
|
+
generateFileHash(filePath: string | any, length?: number): Promise<string>;
|
|
3093
2913
|
/**
|
|
3094
2914
|
* Get the current directory.
|
|
3095
2915
|
*/
|
|
@@ -3098,7 +2918,6 @@ interface CompilerSystem {
|
|
|
3098
2918
|
* The compiler's executing path.
|
|
3099
2919
|
*/
|
|
3100
2920
|
getCompilerExecutingPath(): string;
|
|
3101
|
-
getEnvironmentVar?(key: string): string;
|
|
3102
2921
|
/**
|
|
3103
2922
|
* Gets the absolute file path when for a dependency module.
|
|
3104
2923
|
*/
|
|
@@ -3137,11 +2956,7 @@ interface CompilerSystem {
|
|
|
3137
2956
|
* Normalize file system path.
|
|
3138
2957
|
*/
|
|
3139
2958
|
normalizePath(p: string): string;
|
|
3140
|
-
onProcessInterrupt
|
|
3141
|
-
parseYarnLockFile?: (content: string) => {
|
|
3142
|
-
type: 'success' | 'merge' | 'conflict';
|
|
3143
|
-
object: any;
|
|
3144
|
-
};
|
|
2959
|
+
onProcessInterrupt(cb: () => void): void;
|
|
3145
2960
|
platformPath: PlatformPath;
|
|
3146
2961
|
/**
|
|
3147
2962
|
* All return paths are full normalized paths, not just the basenames. Always returns an array, does not throw.
|
|
@@ -3177,6 +2992,9 @@ interface CompilerSystem {
|
|
|
3177
2992
|
* Rename old path to new path. Does not throw.
|
|
3178
2993
|
*/
|
|
3179
2994
|
rename(oldPath: string, newPath: string): Promise<CompilerSystemRenameResults>;
|
|
2995
|
+
/**
|
|
2996
|
+
* Assigned by the compiler. Used by plugins (e.g. `@stencil/sass`) to resolve `~` imports.
|
|
2997
|
+
*/
|
|
3180
2998
|
resolveModuleId?(opts: ResolveModuleIdOptions): Promise<ResolveModuleIdResults>;
|
|
3181
2999
|
resolvePath(p: string): string;
|
|
3182
3000
|
/**
|
|
@@ -3291,18 +3109,18 @@ interface ResolveModuleIdResults {
|
|
|
3291
3109
|
* A controller which provides for communication and coordination between
|
|
3292
3110
|
* threaded workers.
|
|
3293
3111
|
*/
|
|
3294
|
-
interface WorkerMainController {
|
|
3112
|
+
interface WorkerMainController<T extends Record<string, (...args: any[]) => Promise<any>> = Record<string, (...args: any[]) => Promise<any>>> {
|
|
3295
3113
|
/**
|
|
3296
3114
|
* Send a given set of arguments to a worker
|
|
3297
3115
|
*/
|
|
3298
|
-
send(...args:
|
|
3116
|
+
send<K extends keyof T>(methodName: K, ...args: Parameters<T[K]>): ReturnType<T[K]>;
|
|
3299
3117
|
/**
|
|
3300
3118
|
* Handle a particular method
|
|
3301
3119
|
*
|
|
3302
3120
|
* @param name of the method to be passed to a worker
|
|
3303
3121
|
* @returns a Promise wrapping the results
|
|
3304
3122
|
*/
|
|
3305
|
-
handler(name:
|
|
3123
|
+
handler<K extends keyof T>(name: K): T[K];
|
|
3306
3124
|
/**
|
|
3307
3125
|
* Destroy the worker represented by this instance, rejecting all outstanding
|
|
3308
3126
|
* tasks and killing the child process.
|
|
@@ -3369,6 +3187,8 @@ interface BuildNoChangeResults {
|
|
|
3369
3187
|
interface CompilerBuildResults {
|
|
3370
3188
|
buildId: number;
|
|
3371
3189
|
componentGraph?: BuildResultsComponentGraph;
|
|
3190
|
+
components: ComponentCompilerMeta[];
|
|
3191
|
+
cssOnlyComponents: ComponentCompilerMeta[];
|
|
3372
3192
|
diagnostics: Diagnostic$1[];
|
|
3373
3193
|
dirsAdded: string[];
|
|
3374
3194
|
dirsDeleted: string[];
|
|
@@ -3380,10 +3200,20 @@ interface CompilerBuildResults {
|
|
|
3380
3200
|
hasError: boolean;
|
|
3381
3201
|
hasSuccessfulBuild: boolean;
|
|
3382
3202
|
hmr?: HotModuleReplacement;
|
|
3383
|
-
|
|
3203
|
+
ssrAppFilePath?: string;
|
|
3384
3204
|
isRebuild: boolean;
|
|
3385
3205
|
namespace: string;
|
|
3206
|
+
fsNamespace: string;
|
|
3386
3207
|
outputs: BuildOutput[];
|
|
3208
|
+
/**
|
|
3209
|
+
* Absolute paths to every global stylesheet, in cascade order: each `global-style` output
|
|
3210
|
+
* target's compiled CSS in the order those targets are declared in `config.outputTargets` - or,
|
|
3211
|
+
* with none configured, the generated `{fsNamespace}.css` holding Stencil's auto-placed CSS (when
|
|
3212
|
+
* emitted). Unlike `outputs`, which groups files by type and sorts them alphabetically, this
|
|
3213
|
+
* preserves author-intended order for consumers like the dev-server's auto-generated component
|
|
3214
|
+
* preview.
|
|
3215
|
+
*/
|
|
3216
|
+
globalStyleFiles: string[];
|
|
3387
3217
|
rootDir: string;
|
|
3388
3218
|
srcDir: string;
|
|
3389
3219
|
timestamp: string;
|
|
@@ -3399,6 +3229,7 @@ interface HotModuleReplacement {
|
|
|
3399
3229
|
componentsUpdated?: string[];
|
|
3400
3230
|
excludeHmr?: string[];
|
|
3401
3231
|
externalStylesUpdated?: string[];
|
|
3232
|
+
globalStylesUpdated?: HmrGlobalStyleUpdate[];
|
|
3402
3233
|
imagesUpdated?: string[];
|
|
3403
3234
|
indexHtmlUpdated?: boolean;
|
|
3404
3235
|
inlineStylesUpdated?: HmrStyleUpdate[];
|
|
@@ -3413,6 +3244,15 @@ interface HmrStyleUpdate {
|
|
|
3413
3244
|
styleTag: string;
|
|
3414
3245
|
styleText: string;
|
|
3415
3246
|
}
|
|
3247
|
+
/**
|
|
3248
|
+
* A live-reload update for a `global-style` output target's CSS. Applied on
|
|
3249
|
+
* the client by matching `fileName` against the `<link>` that loads it and
|
|
3250
|
+
* inserting/updating an adjacent `<style>` override
|
|
3251
|
+
*/
|
|
3252
|
+
interface HmrGlobalStyleUpdate {
|
|
3253
|
+
fileName: string;
|
|
3254
|
+
styleText: string;
|
|
3255
|
+
}
|
|
3416
3256
|
type BuildOnEventRemove = () => boolean;
|
|
3417
3257
|
interface BuildEvents extends BuildOnEvents, BuildEmitEvents {
|
|
3418
3258
|
unsubscribeAll(): void;
|
|
@@ -3543,8 +3383,8 @@ interface ConfigBundle {
|
|
|
3543
3383
|
}
|
|
3544
3384
|
/**
|
|
3545
3385
|
* A file and/or directory copy operation that may be specified as part of
|
|
3546
|
-
* certain output targets for Stencil (in particular `
|
|
3547
|
-
* `
|
|
3386
|
+
* certain output targets for Stencil (in particular `loader-bundle`,
|
|
3387
|
+
* `standalone`, and `www`).
|
|
3548
3388
|
*/
|
|
3549
3389
|
interface CopyTask {
|
|
3550
3390
|
/**
|
|
@@ -3565,8 +3405,11 @@ interface CopyTask {
|
|
|
3565
3405
|
*/
|
|
3566
3406
|
dest?: string;
|
|
3567
3407
|
/**
|
|
3568
|
-
*
|
|
3569
|
-
*
|
|
3408
|
+
* Additional glob patterns to exclude from the copy operation, merged with
|
|
3409
|
+
* the built-in defaults: `__mocks__`, `__fixtures__`, `dist`, hidden dirs,
|
|
3410
|
+
* `.ds_store`, `.gitignore`, `desktop.ini`, `thumbs.db`. For a directory
|
|
3411
|
+
* `src`, patterns match paths relative to that directory; an explicitly
|
|
3412
|
+
* named `src` file is never ignored.
|
|
3570
3413
|
*/
|
|
3571
3414
|
ignore?: string[];
|
|
3572
3415
|
/**
|
|
@@ -3645,339 +3488,12 @@ interface StencilDocsConfig {
|
|
|
3645
3488
|
};
|
|
3646
3489
|
};
|
|
3647
3490
|
}
|
|
3648
|
-
|
|
3649
|
-
|
|
3650
|
-
|
|
3651
|
-
* This field can be safely removed from your Stencil configuration file.
|
|
3652
|
-
*/
|
|
3653
|
-
namedExports?: {
|
|
3654
|
-
[key: string]: string[];
|
|
3655
|
-
};
|
|
3656
|
-
}
|
|
3657
|
-
interface NodeResolveConfig {
|
|
3658
|
-
exportConditions?: string[];
|
|
3659
|
-
browser?: boolean;
|
|
3660
|
-
moduleDirectories?: string[];
|
|
3661
|
-
modulePaths?: string[];
|
|
3662
|
-
dedupe?: string[] | ((importee: string) => boolean);
|
|
3663
|
-
extensions?: readonly string[];
|
|
3664
|
-
jail?: string;
|
|
3665
|
-
mainFields?: readonly string[];
|
|
3666
|
-
modulesOnly?: boolean;
|
|
3667
|
-
preferBuiltins?: boolean | ((module: string) => boolean);
|
|
3668
|
-
resolveOnly?: ReadonlyArray<string | RegExp> | null | ((module: string) => boolean);
|
|
3669
|
-
rootDir?: string;
|
|
3670
|
-
allowExportsFolderMapping?: boolean;
|
|
3671
|
-
/**
|
|
3672
|
-
* @see https://github.com/browserify/resolve#resolveid-opts-cb
|
|
3673
|
-
* @deprecated the `customResolveOptions` field is no longer honored in future versions of
|
|
3674
|
-
* `@rollup/plugin-node-resolve`. If you are currently using it, please open a new issue in the Stencil repo to
|
|
3675
|
-
* describe your use case & provide input (https://github.com/stenciljs/core/issues/new/choose)
|
|
3676
|
-
*/
|
|
3677
|
-
customResolveOptions?: {
|
|
3678
|
-
basedir?: string;
|
|
3679
|
-
package?: string;
|
|
3680
|
-
extensions?: string[];
|
|
3681
|
-
readFile?: Function;
|
|
3682
|
-
isFile?: Function;
|
|
3683
|
-
isDirectory?: Function;
|
|
3684
|
-
packageFilter?: Function;
|
|
3685
|
-
pathFilter?: Function;
|
|
3686
|
-
paths?: Function | string[];
|
|
3687
|
-
moduleDirectory?: string | string[];
|
|
3688
|
-
preserveSymlinks?: boolean;
|
|
3689
|
-
};
|
|
3690
|
-
}
|
|
3691
|
-
interface RollupConfig {
|
|
3692
|
-
inputOptions?: RollupInputOptions;
|
|
3693
|
-
outputOptions?: RollupOutputOptions;
|
|
3694
|
-
}
|
|
3695
|
-
interface RollupInputOptions {
|
|
3696
|
-
context?: string;
|
|
3697
|
-
moduleContext?: ((id: string) => string) | {
|
|
3698
|
-
[id: string]: string;
|
|
3699
|
-
};
|
|
3491
|
+
/** Options for rolldown's built-in module resolver, passed directly to rolldown's `resolve` input option. */
|
|
3492
|
+
type NodeResolveConfig = NonNullable<InputOptions['resolve']>;
|
|
3493
|
+
interface RolldownConfig {
|
|
3700
3494
|
treeshake?: boolean;
|
|
3701
|
-
maxParallelFileOps?: number;
|
|
3702
3495
|
external?: (string | RegExp)[] | string | RegExp | ((source: string, importer: string | undefined, isResolved: boolean) => boolean | null | undefined);
|
|
3703
3496
|
}
|
|
3704
|
-
interface RollupOutputOptions {
|
|
3705
|
-
globals?: {
|
|
3706
|
-
[name: string]: string;
|
|
3707
|
-
} | ((name: string) => string);
|
|
3708
|
-
}
|
|
3709
|
-
interface Testing {
|
|
3710
|
-
run(opts: TestingRunOptions): Promise<boolean>;
|
|
3711
|
-
destroy(): Promise<void>;
|
|
3712
|
-
}
|
|
3713
|
-
declare type Path = string;
|
|
3714
|
-
declare type TransformerConfig = [string, Record<string, unknown>];
|
|
3715
|
-
/**
|
|
3716
|
-
* Options for initiating a run of Stencil tests (spec and/or end-to-end)
|
|
3717
|
-
*/
|
|
3718
|
-
interface TestingRunOptions {
|
|
3719
|
-
/**
|
|
3720
|
-
* If true, run end-to-end tests
|
|
3721
|
-
*/
|
|
3722
|
-
e2e?: boolean;
|
|
3723
|
-
/**
|
|
3724
|
-
* If true, run screenshot tests
|
|
3725
|
-
*/
|
|
3726
|
-
screenshot?: boolean;
|
|
3727
|
-
/**
|
|
3728
|
-
* If true, run spec tests
|
|
3729
|
-
*/
|
|
3730
|
-
spec?: boolean;
|
|
3731
|
-
/**
|
|
3732
|
-
* If true, update 'golden' screenshots. Otherwise, compare against priori.
|
|
3733
|
-
*/
|
|
3734
|
-
updateScreenshot?: boolean;
|
|
3735
|
-
}
|
|
3736
|
-
interface JestConfig {
|
|
3737
|
-
/**
|
|
3738
|
-
* This option tells Jest that all imported modules in your tests should be mocked automatically.
|
|
3739
|
-
* All modules used in your tests will have a replacement implementation, keeping the API surface. Default: false
|
|
3740
|
-
*/
|
|
3741
|
-
automock?: boolean;
|
|
3742
|
-
/**
|
|
3743
|
-
* By default, Jest runs all tests and produces all errors into the console upon completion.
|
|
3744
|
-
* The bail config option can be used here to have Jest stop running tests after the first failure. Default: false
|
|
3745
|
-
*/
|
|
3746
|
-
bail?: boolean | number;
|
|
3747
|
-
/**
|
|
3748
|
-
* The directory where Jest should store its cached dependency information. Jest attempts to scan your dependency tree once (up-front)
|
|
3749
|
-
* and cache it in order to ease some of the filesystem raking that needs to happen while running tests. This config option lets you
|
|
3750
|
-
* customize where Jest stores that cache data on disk. Default: "/tmp/<path>"
|
|
3751
|
-
*/
|
|
3752
|
-
cacheDirectory?: string;
|
|
3753
|
-
/**
|
|
3754
|
-
* Automatically clear mock calls and instances between every test. Equivalent to calling jest.clearAllMocks()
|
|
3755
|
-
* between each test. This does not remove any mock implementation that may have been provided. Default: false
|
|
3756
|
-
*/
|
|
3757
|
-
clearMocks?: boolean;
|
|
3758
|
-
/**
|
|
3759
|
-
* Indicates whether the coverage information should be collected while executing the test. Because this retrofits all
|
|
3760
|
-
* executed files with coverage collection statements, it may significantly slow down your tests. Default: false
|
|
3761
|
-
*/
|
|
3762
|
-
collectCoverage?: boolean;
|
|
3763
|
-
/**
|
|
3764
|
-
* An array of glob patterns indicating a set of files for which coverage information should be collected.
|
|
3765
|
-
* If a file matches the specified glob pattern, coverage information will be collected for it even if no tests exist
|
|
3766
|
-
* for this file and it's never required in the test suite. Default: undefined
|
|
3767
|
-
*/
|
|
3768
|
-
collectCoverageFrom?: any[];
|
|
3769
|
-
/**
|
|
3770
|
-
* The directory where Jest should output its coverage files. Default: undefined
|
|
3771
|
-
*/
|
|
3772
|
-
coverageDirectory?: string;
|
|
3773
|
-
/**
|
|
3774
|
-
* An array of regexp pattern strings that are matched against all file paths before executing the test. If the file path matches
|
|
3775
|
-
* any of the patterns, coverage information will be skipped. These pattern strings match against the full path.
|
|
3776
|
-
* Use the <rootDir> string token to include the path to your project's root directory to prevent it from accidentally
|
|
3777
|
-
* ignoring all of your files in different environments that may have different root directories.
|
|
3778
|
-
* Example: ["<rootDir>/build/", "<rootDir>/node_modules/"]. Default: ["/node_modules/"]
|
|
3779
|
-
*/
|
|
3780
|
-
coveragePathIgnorePatterns?: any[];
|
|
3781
|
-
/**
|
|
3782
|
-
* A list of reporter names that Jest uses when writing coverage reports. Any istanbul reporter can be used.
|
|
3783
|
-
* Default: `["json", "lcov", "text"]`
|
|
3784
|
-
*/
|
|
3785
|
-
coverageReporters?: any[];
|
|
3786
|
-
/**
|
|
3787
|
-
* This will be used to configure minimum threshold enforcement for coverage results. Thresholds can be specified as global,
|
|
3788
|
-
* as a glob, and as a directory or file path. If thresholds aren't met, jest will fail. Thresholds specified as a positive
|
|
3789
|
-
* number are taken to be the minimum percentage required. Thresholds specified as a negative number represent the maximum
|
|
3790
|
-
* number of uncovered entities allowed. Default: undefined
|
|
3791
|
-
*/
|
|
3792
|
-
coverageThreshold?: any;
|
|
3793
|
-
errorOnDeprecated?: boolean;
|
|
3794
|
-
forceCoverageMatch?: any[];
|
|
3795
|
-
globals?: any;
|
|
3796
|
-
globalSetup?: string;
|
|
3797
|
-
globalTeardown?: string;
|
|
3798
|
-
/**
|
|
3799
|
-
* An array of directory names to be searched recursively up from the requiring module's location. Setting this option will
|
|
3800
|
-
* override the default, if you wish to still search node_modules for packages include it along with any other
|
|
3801
|
-
* options: ["node_modules", "bower_components"]. Default: ["node_modules"]
|
|
3802
|
-
*/
|
|
3803
|
-
moduleDirectories?: string[];
|
|
3804
|
-
/**
|
|
3805
|
-
* An array of file extensions your modules use. If you require modules without specifying a file extension,
|
|
3806
|
-
* these are the extensions Jest will look for. Default: ['ts', 'tsx', 'js', 'json']
|
|
3807
|
-
*/
|
|
3808
|
-
moduleFileExtensions?: string[];
|
|
3809
|
-
moduleNameMapper?: any;
|
|
3810
|
-
modulePaths?: any[];
|
|
3811
|
-
modulePathIgnorePatterns?: any[];
|
|
3812
|
-
notify?: boolean;
|
|
3813
|
-
notifyMode?: string;
|
|
3814
|
-
preset?: string;
|
|
3815
|
-
prettierPath?: string;
|
|
3816
|
-
projects?: any;
|
|
3817
|
-
reporters?: any;
|
|
3818
|
-
resetMocks?: boolean;
|
|
3819
|
-
resetModules?: boolean;
|
|
3820
|
-
resolver?: Path | null;
|
|
3821
|
-
restoreMocks?: boolean;
|
|
3822
|
-
rootDir?: string;
|
|
3823
|
-
roots?: any[];
|
|
3824
|
-
runner?: string;
|
|
3825
|
-
/**
|
|
3826
|
-
* The paths to modules that run some code to configure or set up the testing environment before each test.
|
|
3827
|
-
* Since every test runs in its own environment, these scripts will be executed in the testing environment
|
|
3828
|
-
* immediately before executing the test code itself. Default: []
|
|
3829
|
-
*/
|
|
3830
|
-
setupFiles?: string[];
|
|
3831
|
-
setupFilesAfterEnv?: string[];
|
|
3832
|
-
snapshotSerializers?: any[];
|
|
3833
|
-
testEnvironment?: string;
|
|
3834
|
-
testEnvironmentOptions?: any;
|
|
3835
|
-
testMatch?: string[];
|
|
3836
|
-
testPathIgnorePatterns?: string[];
|
|
3837
|
-
testPreset?: string;
|
|
3838
|
-
testRegex?: string[];
|
|
3839
|
-
testResultsProcessor?: string;
|
|
3840
|
-
testRunner?: string;
|
|
3841
|
-
testURL?: string;
|
|
3842
|
-
timers?: string;
|
|
3843
|
-
transform?: {
|
|
3844
|
-
[regex: string]: Path | TransformerConfig;
|
|
3845
|
-
};
|
|
3846
|
-
transformIgnorePatterns?: any[];
|
|
3847
|
-
unmockedModulePathPatterns?: any[];
|
|
3848
|
-
verbose?: boolean;
|
|
3849
|
-
watchPathIgnorePatterns?: any[];
|
|
3850
|
-
}
|
|
3851
|
-
interface TestingConfig extends JestConfig {
|
|
3852
|
-
/**
|
|
3853
|
-
* The `allowableMismatchedPixels` value is used to determine an acceptable
|
|
3854
|
-
* number of pixels that can be mismatched before the image is considered
|
|
3855
|
-
* to have changes. Realistically, two screenshots representing the same
|
|
3856
|
-
* content may have a small number of pixels that are not identical due to
|
|
3857
|
-
* anti-aliasing, which is perfectly normal. If the `allowableMismatchedRatio`
|
|
3858
|
-
* is provided it will take precedence, otherwise `allowableMismatchedPixels`
|
|
3859
|
-
* will be used.
|
|
3860
|
-
*/
|
|
3861
|
-
allowableMismatchedPixels?: number;
|
|
3862
|
-
/**
|
|
3863
|
-
* The `allowableMismatchedRatio` ranges from `0` to `1` and is used to
|
|
3864
|
-
* determine an acceptable ratio of pixels that can be mismatched before
|
|
3865
|
-
* the image is considered to have changes. Realistically, two screenshots
|
|
3866
|
-
* representing the same content may have a small number of pixels that
|
|
3867
|
-
* are not identical due to anti-aliasing, which is perfectly normal. The
|
|
3868
|
-
* `allowableMismatchedRatio` is the number of pixels that were mismatched,
|
|
3869
|
-
* divided by the total number of pixels in the screenshot. For example,
|
|
3870
|
-
* a ratio value of `0.06` means 6% of the pixels can be mismatched before
|
|
3871
|
-
* the image is considered to have changes. If the `allowableMismatchedRatio`
|
|
3872
|
-
* is provided it will take precedence, otherwise `allowableMismatchedPixels`
|
|
3873
|
-
* will be used.
|
|
3874
|
-
*/
|
|
3875
|
-
allowableMismatchedRatio?: number;
|
|
3876
|
-
/**
|
|
3877
|
-
* Matching threshold while comparing two screenshots. Value ranges from `0` to `1`.
|
|
3878
|
-
* Smaller values make the comparison more sensitive. The `pixelmatchThreshold`
|
|
3879
|
-
* value helps to ignore anti-aliasing. Default: `0.1`
|
|
3880
|
-
*/
|
|
3881
|
-
pixelmatchThreshold?: number;
|
|
3882
|
-
/**
|
|
3883
|
-
* Additional arguments to pass to the browser instance.
|
|
3884
|
-
*/
|
|
3885
|
-
browserArgs?: string[];
|
|
3886
|
-
/**
|
|
3887
|
-
* Path to a Chromium or Chrome executable to run instead of the bundled Chromium.
|
|
3888
|
-
* @default env.PUPPETEER_EXECUTABLE_PATH || env.CHROME_PATH || puppeteer.computeExecutablePath()
|
|
3889
|
-
*/
|
|
3890
|
-
browserExecutablePath?: string;
|
|
3891
|
-
/**
|
|
3892
|
-
* Url of remote Chrome instance to use instead of local Chrome.
|
|
3893
|
-
*/
|
|
3894
|
-
browserWSEndpoint?: string;
|
|
3895
|
-
/**
|
|
3896
|
-
* The browser channel to use for e2e tests (stable, beta, dev or canary).
|
|
3897
|
-
* @default 'chrome'
|
|
3898
|
-
*/
|
|
3899
|
-
browserChannel?: 'chrome' | 'chrome-beta' | 'chrome-dev' | 'chrome-canary';
|
|
3900
|
-
/**
|
|
3901
|
-
* Whether to run browser e2e tests in headless mode using Chrome Headless Shell
|
|
3902
|
-
* @ref https://developer.chrome.com/blog/chrome-headless-shell
|
|
3903
|
-
* @default shell
|
|
3904
|
-
*/
|
|
3905
|
-
browserHeadless?: boolean | 'shell';
|
|
3906
|
-
/**
|
|
3907
|
-
* Slows down e2e browser operations by the specified amount of milliseconds.
|
|
3908
|
-
* Useful so that you can see what is going on.
|
|
3909
|
-
*/
|
|
3910
|
-
browserSlowMo?: number;
|
|
3911
|
-
/**
|
|
3912
|
-
* By default, all E2E pages wait until the "load" event, this global setting can be used
|
|
3913
|
-
* to change the default `waitUntil` behavior.
|
|
3914
|
-
*/
|
|
3915
|
-
browserWaitUntil?: 'load' | 'domcontentloaded' | 'networkidle0' | 'networkidle2';
|
|
3916
|
-
/**
|
|
3917
|
-
* Whether to auto-open a DevTools panel for each tab.
|
|
3918
|
-
* If this option is true, the headless option will be set false
|
|
3919
|
-
*/
|
|
3920
|
-
browserDevtools?: boolean;
|
|
3921
|
-
/**
|
|
3922
|
-
* Array of browser emulations to be used during _screenshot_ tests. A full screenshot
|
|
3923
|
-
* test is ran for each emulation.
|
|
3924
|
-
*
|
|
3925
|
-
* To emulate a device display for your e2e tests, use the `setViewport` method on a test's E2E page.
|
|
3926
|
-
* An example can be found in [the Stencil docs](https://stenciljs.com/docs/end-to-end-testing#emulate-a-display).
|
|
3927
|
-
*/
|
|
3928
|
-
emulate?: EmulateConfig[];
|
|
3929
|
-
/**
|
|
3930
|
-
* Path to the Screenshot Connector module.
|
|
3931
|
-
*/
|
|
3932
|
-
screenshotConnector?: string;
|
|
3933
|
-
/**
|
|
3934
|
-
* Timeout for the pixelmatch worker to resolve (in ms).
|
|
3935
|
-
* @default 2500
|
|
3936
|
-
*/
|
|
3937
|
-
screenshotTimeout?: number | null;
|
|
3938
|
-
/**
|
|
3939
|
-
* Amount of time in milliseconds to wait before a screenshot is taken.
|
|
3940
|
-
*/
|
|
3941
|
-
waitBeforeScreenshot?: number;
|
|
3942
|
-
}
|
|
3943
|
-
interface EmulateConfig {
|
|
3944
|
-
/**
|
|
3945
|
-
* Predefined device descriptor name, such as "iPhone X" or "Nexus 10".
|
|
3946
|
-
* For a complete list please see: https://github.com/puppeteer/puppeteer/blob/main/src/common/DeviceDescriptors.ts
|
|
3947
|
-
*/
|
|
3948
|
-
device?: string;
|
|
3949
|
-
/**
|
|
3950
|
-
* User-Agent to be used. Defaults to the user-agent of the installed Puppeteer version.
|
|
3951
|
-
*/
|
|
3952
|
-
userAgent?: string;
|
|
3953
|
-
viewport?: EmulateViewport;
|
|
3954
|
-
}
|
|
3955
|
-
interface EmulateViewport {
|
|
3956
|
-
/**
|
|
3957
|
-
* Page width in pixels.
|
|
3958
|
-
*/
|
|
3959
|
-
width: number;
|
|
3960
|
-
/**
|
|
3961
|
-
* page height in pixels.
|
|
3962
|
-
*/
|
|
3963
|
-
height: number;
|
|
3964
|
-
/**
|
|
3965
|
-
* Specify device scale factor (can be thought of as dpr). Defaults to 1.
|
|
3966
|
-
*/
|
|
3967
|
-
deviceScaleFactor?: number;
|
|
3968
|
-
/**
|
|
3969
|
-
* Whether the meta viewport tag is taken into account. Defaults to false.
|
|
3970
|
-
*/
|
|
3971
|
-
isMobile?: boolean;
|
|
3972
|
-
/**
|
|
3973
|
-
* Specifies if viewport supports touch events. Defaults to false
|
|
3974
|
-
*/
|
|
3975
|
-
hasTouch?: boolean;
|
|
3976
|
-
/**
|
|
3977
|
-
* Specifies if viewport is in landscape mode. Defaults to false.
|
|
3978
|
-
*/
|
|
3979
|
-
isLandscape?: boolean;
|
|
3980
|
-
}
|
|
3981
3497
|
/**
|
|
3982
3498
|
* This sets the log level hierarchy for our terminal logger, ranging from
|
|
3983
3499
|
* most to least verbose.
|
|
@@ -4042,54 +3558,96 @@ interface LoggerTimeSpan {
|
|
|
4042
3558
|
duration(): number;
|
|
4043
3559
|
finish(finishedMsg: string, color?: string, bold?: boolean, newLineSuffix?: boolean): number;
|
|
4044
3560
|
}
|
|
4045
|
-
|
|
4046
|
-
|
|
3561
|
+
/**
|
|
3562
|
+
* Output target for generating lazy-loaded component bundles with a loader infrastructure.
|
|
3563
|
+
* This creates an optimized distribution for CDN usage and applications that benefit from
|
|
3564
|
+
* lazy-loading components on demand.
|
|
3565
|
+
*
|
|
3566
|
+
* Formerly known as 'dist' in v4.
|
|
3567
|
+
*
|
|
3568
|
+
* @example
|
|
3569
|
+
* ```typescript
|
|
3570
|
+
* {
|
|
3571
|
+
* type: 'loader-bundle',
|
|
3572
|
+
* dir: 'dist/loader-bundle'
|
|
3573
|
+
* }
|
|
3574
|
+
* ```
|
|
3575
|
+
*/
|
|
3576
|
+
interface OutputTargetLoaderBundle extends OutputTargetBaseNext {
|
|
3577
|
+
type: 'loader-bundle';
|
|
3578
|
+
/**
|
|
3579
|
+
* Directory where lazy-loaded bundles will be written.
|
|
3580
|
+
* @default '' (root of output directory)
|
|
3581
|
+
*/
|
|
4047
3582
|
buildDir?: string;
|
|
4048
|
-
|
|
3583
|
+
copy?: CopyTask[];
|
|
3584
|
+
empty?: boolean;
|
|
4049
3585
|
/**
|
|
4050
|
-
*
|
|
4051
|
-
* a project's `tsconfig.json` to relative import paths in the compiled output's
|
|
4052
|
-
* `dist-collection` bundle if it is generated (i.e. `collectionDir` is set).
|
|
3586
|
+
* Whether to generate CommonJS (CJS) bundles.
|
|
4053
3587
|
*
|
|
4054
|
-
*
|
|
3588
|
+
* When `true`, generates CJS output in `cjs/` subdirectory.
|
|
3589
|
+
* When `false` (default in v5+), only ESM bundles are generated.
|
|
4055
3590
|
*
|
|
4056
|
-
* @
|
|
4057
|
-
* // tsconfig.json
|
|
4058
|
-
* {
|
|
4059
|
-
* paths: {
|
|
4060
|
-
* "@utils/*": ['/src/utils/*']
|
|
4061
|
-
* }
|
|
4062
|
-
* }
|
|
4063
|
-
*
|
|
4064
|
-
* // Source file
|
|
4065
|
-
* import * as dateUtils from '@utils/date-utils';
|
|
4066
|
-
* // Output file
|
|
4067
|
-
* import * as dateUtils from '../utils/date-utils';
|
|
3591
|
+
* @default false
|
|
4068
3592
|
*/
|
|
4069
|
-
|
|
4070
|
-
typesDir?: string;
|
|
3593
|
+
cjs?: boolean;
|
|
4071
3594
|
/**
|
|
4072
|
-
*
|
|
3595
|
+
* Custom path for the loader directory; files you can import
|
|
4073
3596
|
* in an initiation script within your application to register all your components for
|
|
4074
3597
|
* lazy loading.
|
|
4075
3598
|
*
|
|
4076
|
-
* @default
|
|
3599
|
+
* @default 'loader' (relative to output directory)
|
|
4077
3600
|
*/
|
|
4078
|
-
|
|
4079
|
-
|
|
4080
|
-
|
|
4081
|
-
|
|
3601
|
+
loaderPath?: string;
|
|
3602
|
+
/**
|
|
3603
|
+
* Hash the filenames of generated chunks based on their content.
|
|
3604
|
+
* Enables forever-caching of CDN-served bundles.
|
|
3605
|
+
*
|
|
3606
|
+
* @default true in production, false in dev mode
|
|
3607
|
+
*/
|
|
3608
|
+
hashFileNames?: boolean;
|
|
3609
|
+
/**
|
|
3610
|
+
* Number of characters to use for the content hash in filenames.
|
|
3611
|
+
*
|
|
3612
|
+
* @default 8
|
|
3613
|
+
*/
|
|
3614
|
+
hashedFileNameLength?: number;
|
|
3615
|
+
/**
|
|
3616
|
+
* When `true`, marks `@stencil/core` as an external dependency in the bundler (ESM/CJS)
|
|
3617
|
+
* distribution output. Consumers must provide `@stencil/core` themselves.
|
|
3618
|
+
*
|
|
3619
|
+
* Has no effect on the browser/CDN build - the runtime is always bundled there.
|
|
3620
|
+
*
|
|
3621
|
+
* @default false
|
|
3622
|
+
*/
|
|
3623
|
+
externalRuntime?: boolean;
|
|
4082
3624
|
}
|
|
4083
|
-
|
|
4084
|
-
|
|
3625
|
+
/**
|
|
3626
|
+
* Output target for generating Stencil component source for downstream re-bundling.
|
|
3627
|
+
* This output contains transpiled source code, component metadata, and configuration
|
|
3628
|
+
* that downstream Stencil projects can re-compile and bundle.
|
|
3629
|
+
*
|
|
3630
|
+
* Formerly 'dist-collection' sub-output in v4, now a first-class output target in v5.
|
|
3631
|
+
*
|
|
3632
|
+
* In production builds, this output is auto-generated unless explicitly configured.
|
|
3633
|
+
*
|
|
3634
|
+
* @example
|
|
3635
|
+
* ```typescript
|
|
3636
|
+
* {
|
|
3637
|
+
* type: 'collection',
|
|
3638
|
+
* dir: 'dist/collection',
|
|
3639
|
+
* transformAliasedImportPaths: true
|
|
3640
|
+
* }
|
|
3641
|
+
* ```
|
|
3642
|
+
*/
|
|
3643
|
+
interface OutputTargetCollection extends OutputTargetBaseNext {
|
|
3644
|
+
type: 'collection';
|
|
4085
3645
|
empty?: boolean;
|
|
4086
|
-
dir: string;
|
|
4087
|
-
collectionDir: string;
|
|
4088
3646
|
/**
|
|
4089
3647
|
* When `true` this flag will transform aliased import paths defined in
|
|
4090
3648
|
* a project's `tsconfig.json` to relative import paths in the compiled output.
|
|
4091
3649
|
*
|
|
4092
|
-
* Paths will be left in aliased format if `false
|
|
3650
|
+
* Paths will be left in aliased format if `false`. Defaults to `true`.
|
|
4093
3651
|
*
|
|
4094
3652
|
* @example
|
|
4095
3653
|
* // tsconfig.json
|
|
@@ -4106,49 +3664,135 @@ interface OutputTargetDistCollection extends OutputTargetValidationConfig {
|
|
|
4106
3664
|
*/
|
|
4107
3665
|
transformAliasedImportPaths?: boolean | null;
|
|
4108
3666
|
}
|
|
4109
|
-
|
|
4110
|
-
|
|
4111
|
-
|
|
4112
|
-
|
|
3667
|
+
/**
|
|
3668
|
+
* Output target for generating TypeScript type definitions (.d.ts files).
|
|
3669
|
+
*
|
|
3670
|
+
* Formerly a sub-output of 'dist' and 'dist-custom-elements' in v4,
|
|
3671
|
+
* now a first-class output target in v5 that can be shared across multiple outputs.
|
|
3672
|
+
*
|
|
3673
|
+
* In production builds, this output is auto-generated unless explicitly configured.
|
|
3674
|
+
*
|
|
3675
|
+
* @example
|
|
3676
|
+
* ```typescript
|
|
3677
|
+
* {
|
|
3678
|
+
* type: 'types',
|
|
3679
|
+
* dir: 'dist/types'
|
|
3680
|
+
* }
|
|
3681
|
+
* ```
|
|
3682
|
+
*/
|
|
3683
|
+
interface OutputTargetTypes extends OutputTargetBaseNext {
|
|
3684
|
+
type: 'types';
|
|
3685
|
+
empty?: boolean;
|
|
4113
3686
|
}
|
|
4114
3687
|
interface OutputTargetDistLazy extends OutputTargetBase {
|
|
4115
3688
|
type: 'dist-lazy';
|
|
4116
3689
|
dir?: string;
|
|
4117
3690
|
esmDir?: string;
|
|
4118
|
-
esmEs5Dir?: string;
|
|
4119
|
-
systemDir?: string;
|
|
4120
3691
|
cjsDir?: string;
|
|
4121
|
-
polyfills?: boolean;
|
|
4122
3692
|
isBrowserBuild?: boolean;
|
|
4123
3693
|
esmIndexFile?: string;
|
|
4124
3694
|
cjsIndexFile?: string;
|
|
4125
|
-
|
|
4126
|
-
|
|
3695
|
+
loaderDir?: string;
|
|
3696
|
+
typesDir?: string;
|
|
4127
3697
|
empty?: boolean;
|
|
3698
|
+
/** Inherited from parent output target (loader-bundle or www). Only meaningful for browser builds. */
|
|
3699
|
+
hashFileNames?: boolean;
|
|
3700
|
+
/** Inherited from parent output target (loader-bundle or www). */
|
|
3701
|
+
hashedFileNameLength?: number;
|
|
3702
|
+
/** Inherited from loader-bundle. When true, @stencil/core is external in this bundler output. */
|
|
3703
|
+
externalRuntime?: boolean;
|
|
4128
3704
|
}
|
|
4129
|
-
|
|
4130
|
-
|
|
4131
|
-
|
|
4132
|
-
|
|
4133
|
-
|
|
4134
|
-
|
|
4135
|
-
|
|
4136
|
-
|
|
4137
|
-
|
|
4138
|
-
|
|
4139
|
-
|
|
4140
|
-
|
|
4141
|
-
|
|
4142
|
-
|
|
4143
|
-
|
|
4144
|
-
|
|
3705
|
+
/**
|
|
3706
|
+
* Output target for global styles.
|
|
3707
|
+
* Generates a CSS file from an input stylesheet.
|
|
3708
|
+
*
|
|
3709
|
+
* Can be configured in two ways:
|
|
3710
|
+
* 1. **Implicit** (backwards compat): Set `globalStyle` in the config and this output is auto-generated
|
|
3711
|
+
* 2. **Explicit**: Define this output target with an `input` property
|
|
3712
|
+
*
|
|
3713
|
+
* Multiple `global-style` outputs are supported for building separate CSS bundles.
|
|
3714
|
+
*
|
|
3715
|
+
* @example
|
|
3716
|
+
* ```typescript
|
|
3717
|
+
* // Explicit configuration with custom input/output
|
|
3718
|
+
* {
|
|
3719
|
+
* type: 'global-style',
|
|
3720
|
+
* input: './src/theme.css',
|
|
3721
|
+
* fileName: 'theme.css',
|
|
3722
|
+
* dir: 'dist/assets',
|
|
3723
|
+
* copyToLoaderBrowser: false
|
|
3724
|
+
* }
|
|
3725
|
+
* ```
|
|
3726
|
+
*/
|
|
3727
|
+
interface OutputTargetGlobalStyle extends OutputTargetBaseNext {
|
|
3728
|
+
type: 'global-style';
|
|
4145
3729
|
/**
|
|
4146
|
-
*
|
|
4147
|
-
*
|
|
4148
|
-
*
|
|
4149
|
-
*
|
|
3730
|
+
* Path to the input CSS file to compile.
|
|
3731
|
+
* When specified, this takes precedence over the `globalStyle` config option.
|
|
3732
|
+
*
|
|
3733
|
+
* If neither `input` nor `globalStyle` config is set, no CSS will be built.
|
|
4150
3734
|
*/
|
|
4151
|
-
|
|
3735
|
+
input?: string;
|
|
3736
|
+
/**
|
|
3737
|
+
* Output filename for the compiled CSS.
|
|
3738
|
+
* @default '{namespace}.css' when using globalStyle config, or basename of input file
|
|
3739
|
+
*/
|
|
3740
|
+
fileName?: string;
|
|
3741
|
+
/**
|
|
3742
|
+
* When `true`, also copies the global style CSS to the loader-bundle browser directory
|
|
3743
|
+
* for backwards compatibility with existing CDN consumers who have hardcoded CSS paths.
|
|
3744
|
+
*
|
|
3745
|
+
* @default true
|
|
3746
|
+
*/
|
|
3747
|
+
copyToLoaderBrowser?: boolean;
|
|
3748
|
+
/**
|
|
3749
|
+
* Controls whether this global stylesheet is injected into component shadow DOMs
|
|
3750
|
+
* as a constructable stylesheet at runtime.
|
|
3751
|
+
*
|
|
3752
|
+
* - `'none'`: Don't inject - stylesheet must be loaded externally (e.g., via `<link>`)
|
|
3753
|
+
* - `'client'`: Inject only in client builds, not SSR (reduces SSR output size)
|
|
3754
|
+
* - `'all'`: Inject in both client and SSR builds
|
|
3755
|
+
*
|
|
3756
|
+
* @default 'client' when the stylesheet comes from `globalStyle` (or an auto-detected `src/global.*`), 'none' when `input` is set
|
|
3757
|
+
*/
|
|
3758
|
+
inject?: 'none' | 'client' | 'all';
|
|
3759
|
+
}
|
|
3760
|
+
/**
|
|
3761
|
+
* Output target for component assets.
|
|
3762
|
+
* Copies all component `assetsDirs` to a unified location.
|
|
3763
|
+
*
|
|
3764
|
+
* auto-generated when components have `assetsDirs` unless explicitly configured.
|
|
3765
|
+
* The output is placed in `dist/assets/` by default and is available to all distribution strategies.
|
|
3766
|
+
*
|
|
3767
|
+
* @example
|
|
3768
|
+
* ```typescript
|
|
3769
|
+
* {
|
|
3770
|
+
* type: 'assets',
|
|
3771
|
+
* dir: 'dist/assets'
|
|
3772
|
+
* }
|
|
3773
|
+
* ```
|
|
3774
|
+
*/
|
|
3775
|
+
interface OutputTargetAssets extends OutputTargetBaseNext {
|
|
3776
|
+
type: 'assets';
|
|
3777
|
+
}
|
|
3778
|
+
/**
|
|
3779
|
+
* Output target for server-side rendering (SSR) and hydration.
|
|
3780
|
+
* Generates a script that can be used for SSR and static site generation (prerendering).
|
|
3781
|
+
*
|
|
3782
|
+
* Formerly known as 'dist-hydrate-script' in v4.
|
|
3783
|
+
*
|
|
3784
|
+
* @example
|
|
3785
|
+
* ```typescript
|
|
3786
|
+
* {
|
|
3787
|
+
* type: 'ssr',
|
|
3788
|
+
* dir: 'dist/ssr',
|
|
3789
|
+
* minify: true
|
|
3790
|
+
* }
|
|
3791
|
+
* ```
|
|
3792
|
+
*/
|
|
3793
|
+
interface OutputTargetSsr extends OutputTargetBase {
|
|
3794
|
+
type: 'ssr';
|
|
3795
|
+
dir?: string;
|
|
4152
3796
|
/**
|
|
4153
3797
|
* Module IDs that should not be bundled into the script.
|
|
4154
3798
|
* By default, all node builtin's, such as `fs` or `path`
|
|
@@ -4157,6 +3801,26 @@ interface OutputTargetHydrate extends OutputTargetBase {
|
|
|
4157
3801
|
external?: string[];
|
|
4158
3802
|
empty?: boolean;
|
|
4159
3803
|
minify?: boolean;
|
|
3804
|
+
/**
|
|
3805
|
+
* Whether to generate CommonJS (CJS) bundles.
|
|
3806
|
+
*
|
|
3807
|
+
* When `true`, generates CJS output as `index.cjs` alongside ESM `index.js`.
|
|
3808
|
+
* When `false` (default in v5+), only ESM bundles are generated.
|
|
3809
|
+
*
|
|
3810
|
+
* @default false
|
|
3811
|
+
*/
|
|
3812
|
+
cjs?: boolean;
|
|
3813
|
+
}
|
|
3814
|
+
/**
|
|
3815
|
+
* Compiles the SSR hydrate app to a WASM plugin (via `extism-js`/QuickJS-ng) that can run
|
|
3816
|
+
* outside of Node
|
|
3817
|
+
*/
|
|
3818
|
+
interface OutputTargetSsrWasm extends OutputTargetBase {
|
|
3819
|
+
type: 'ssr-wasm';
|
|
3820
|
+
/** Output directory. @default 'dist/ssr-wasm' */
|
|
3821
|
+
dir?: string;
|
|
3822
|
+
empty?: boolean;
|
|
3823
|
+
minify?: boolean;
|
|
4160
3824
|
}
|
|
4161
3825
|
interface OutputTargetCustom extends OutputTargetBase {
|
|
4162
3826
|
type: 'custom';
|
|
@@ -4215,6 +3879,22 @@ interface OutputTargetDocsReadme extends OutputTargetBase {
|
|
|
4215
3879
|
overwriteExisting?: boolean | 'if-missing';
|
|
4216
3880
|
footer?: string;
|
|
4217
3881
|
strict?: boolean;
|
|
3882
|
+
/**
|
|
3883
|
+
* Add extra columns to the generated Properties/Events tables, e.g. to
|
|
3884
|
+
* surface custom JSDoc tags as a column of their own.
|
|
3885
|
+
*/
|
|
3886
|
+
customColumns?: {
|
|
3887
|
+
props?: DocsReadmeCustomColumn<JsonDocsProp>[];
|
|
3888
|
+
events?: DocsReadmeCustomColumn<JsonDocsEvent>[];
|
|
3889
|
+
};
|
|
3890
|
+
}
|
|
3891
|
+
/**
|
|
3892
|
+
* A custom column to render in a `docs-readme` Properties/Events table.
|
|
3893
|
+
* `content` is invoked once per row.
|
|
3894
|
+
*/
|
|
3895
|
+
interface DocsReadmeCustomColumn<T> {
|
|
3896
|
+
header: string;
|
|
3897
|
+
content: (member: T, cmp: JsonDocsComponent) => string;
|
|
4218
3898
|
}
|
|
4219
3899
|
interface OutputTargetDocsJson extends OutputTargetBase {
|
|
4220
3900
|
type: 'docs-json';
|
|
@@ -4245,9 +3925,11 @@ interface OutputTargetDocsCustomElementsManifest extends OutputTargetBase {
|
|
|
4245
3925
|
type: 'docs-custom-elements-manifest';
|
|
4246
3926
|
/**
|
|
4247
3927
|
* The file path where the custom-elements.json manifest will be written.
|
|
4248
|
-
* Defaults to 'custom-elements.json'
|
|
3928
|
+
* Defaults to 'dist/custom-elements.json'.
|
|
3929
|
+
*
|
|
3930
|
+
* The `customElements` field of the project's `package.json` is set to this path.
|
|
4249
3931
|
*/
|
|
4250
|
-
file
|
|
3932
|
+
file?: string;
|
|
4251
3933
|
strict?: boolean;
|
|
4252
3934
|
}
|
|
4253
3935
|
interface OutputTargetDocsCustom extends OutputTargetBase {
|
|
@@ -4255,18 +3937,46 @@ interface OutputTargetDocsCustom extends OutputTargetBase {
|
|
|
4255
3937
|
generator: (docs: JsonDocs, config: Config) => void | Promise<void>;
|
|
4256
3938
|
strict?: boolean;
|
|
4257
3939
|
}
|
|
3940
|
+
/**
|
|
3941
|
+
* Output target for generating an [Agent Skill](https://agentskills.io)
|
|
3942
|
+
* (`SKILL.md` + per-component reference files) describing a component
|
|
3943
|
+
* library, so AI coding agents can consume its API and usage examples
|
|
3944
|
+
* directly.
|
|
3945
|
+
*/
|
|
3946
|
+
interface OutputTargetDocsAgentSkill extends OutputTargetBase {
|
|
3947
|
+
type: 'docs-agent-skill';
|
|
3948
|
+
/**
|
|
3949
|
+
* The root directory where the skill (`SKILL.md` + `components/*.md`) is written.
|
|
3950
|
+
*
|
|
3951
|
+
* defaults to `dist/skill`
|
|
3952
|
+
*/
|
|
3953
|
+
dir?: string;
|
|
3954
|
+
/**
|
|
3955
|
+
* The skill's name, used in the `SKILL.md` frontmatter.
|
|
3956
|
+
*
|
|
3957
|
+
* Defaults to {@link Config.namespace}, lowercased, with anything other than letters and numbers replaced by `-`.
|
|
3958
|
+
*/
|
|
3959
|
+
name?: string;
|
|
3960
|
+
/**
|
|
3961
|
+
* The skill's description, used in the `SKILL.md` frontmatter - this is the
|
|
3962
|
+
* text agents use to decide when to load the skill.
|
|
3963
|
+
*
|
|
3964
|
+
* Defaults to an auto-generated sentence built from the project's
|
|
3965
|
+
* {@link JsonDocs.usage} (if present) or its component tags.
|
|
3966
|
+
*/
|
|
3967
|
+
description?: string;
|
|
3968
|
+
}
|
|
4258
3969
|
interface OutputTargetStats extends OutputTargetBase {
|
|
4259
3970
|
type: 'stats';
|
|
4260
3971
|
file?: string;
|
|
4261
3972
|
}
|
|
4262
|
-
interface OutputTargetBaseNext {
|
|
4263
|
-
type: string;
|
|
3973
|
+
interface OutputTargetBaseNext extends OutputTargetBase {
|
|
4264
3974
|
dir?: string;
|
|
4265
3975
|
}
|
|
4266
3976
|
/**
|
|
4267
3977
|
* The collection of valid export behaviors.
|
|
4268
3978
|
* Used to generate a type for typed configs as well as output target validation
|
|
4269
|
-
* for the `
|
|
3979
|
+
* for the `standalone` output target.
|
|
4270
3980
|
*
|
|
4271
3981
|
* Adding a value to this const array will automatically add it as a valid option on the
|
|
4272
3982
|
* output target configuration for `customElementsExportBehavior`.
|
|
@@ -4275,8 +3985,7 @@ interface OutputTargetBaseNext {
|
|
|
4275
3985
|
* - `auto-define-custom-elements`: Enables the auto-definition of a component and its children (recursively) in the custom elements registry. This
|
|
4276
3986
|
* functionality allows consumers to bypass the explicit call to define a component, its children, its children's
|
|
4277
3987
|
* children, etc. Users of this flag should be aware that enabling this functionality may increase bundle size.
|
|
4278
|
-
* - `bundle`: A `defineCustomElements` function will be exported from the distribution directory.
|
|
4279
|
-
* from `dist-custom-elements-bundle` to `dist-custom-elements`.
|
|
3988
|
+
* - `bundle`: A `defineCustomElements` function will be exported from the distribution directory.
|
|
4280
3989
|
* - `single-export-module`: All components will be re-exported from the specified directory's root `index.js` file.
|
|
4281
3990
|
*/
|
|
4282
3991
|
declare const CustomElementsExportBehaviorOptions: readonly ["default", "auto-define-custom-elements", "bundle", "single-export-module"];
|
|
@@ -4285,23 +3994,38 @@ declare const CustomElementsExportBehaviorOptions: readonly ["default", "auto-de
|
|
|
4285
3994
|
* This is used on the output target config for intellisense in typed configs.
|
|
4286
3995
|
*/
|
|
4287
3996
|
type CustomElementsExportBehavior = (typeof CustomElementsExportBehaviorOptions)[number];
|
|
4288
|
-
|
|
4289
|
-
|
|
3997
|
+
/**
|
|
3998
|
+
* Output target for generating standalone component modules.
|
|
3999
|
+
* Each component is output as an individual ES module that can be directly imported.
|
|
4000
|
+
*
|
|
4001
|
+
* This output target is ideal for npm consumption and tree-shaking, as consumers
|
|
4002
|
+
* can import only the components they need.
|
|
4003
|
+
*
|
|
4004
|
+
* Formerly known as 'dist-custom-elements' in v4.
|
|
4005
|
+
*
|
|
4006
|
+
* @example
|
|
4007
|
+
* ```typescript
|
|
4008
|
+
* {
|
|
4009
|
+
* type: 'standalone',
|
|
4010
|
+
* dir: 'dist/standalone',
|
|
4011
|
+
* externalRuntime: true,
|
|
4012
|
+
* autoLoader: true
|
|
4013
|
+
* }
|
|
4014
|
+
* ```
|
|
4015
|
+
*/
|
|
4016
|
+
interface OutputTargetStandalone extends OutputTargetBaseNext {
|
|
4017
|
+
type: 'standalone';
|
|
4290
4018
|
empty?: boolean;
|
|
4291
4019
|
/**
|
|
4292
|
-
*
|
|
4293
|
-
*
|
|
4294
|
-
*
|
|
4295
|
-
*
|
|
4020
|
+
* When `true`, all `@stencil/core/*` module references are treated as external
|
|
4021
|
+
* during bundling rather than being included in the generated output.
|
|
4022
|
+
*
|
|
4023
|
+
* @default false
|
|
4296
4024
|
*/
|
|
4297
4025
|
externalRuntime?: boolean;
|
|
4298
4026
|
copy?: CopyTask[];
|
|
4299
4027
|
includeGlobalScripts?: boolean;
|
|
4300
4028
|
minify?: boolean;
|
|
4301
|
-
/**
|
|
4302
|
-
* Enables the generation of type definition files for the output target.
|
|
4303
|
-
*/
|
|
4304
|
-
generateTypeDeclarations?: boolean;
|
|
4305
4029
|
/**
|
|
4306
4030
|
* Define the export/definition behavior for the output target's generated output.
|
|
4307
4031
|
* This controls if/how custom elements will be defined or where components will be exported from.
|
|
@@ -4312,6 +4036,8 @@ interface OutputTargetDistCustomElements extends OutputTargetValidationConfig {
|
|
|
4312
4036
|
* Generate an auto-loader script that uses MutationObserver to lazily load
|
|
4313
4037
|
* and define custom elements as they appear in the DOM.
|
|
4314
4038
|
*
|
|
4039
|
+
* @default true
|
|
4040
|
+
*
|
|
4315
4041
|
* When set to `true`, generates a `loader.js` file that auto-starts on import.
|
|
4316
4042
|
* Can also be configured with an object for more control:
|
|
4317
4043
|
* - `fileName`: Custom filename for the loader (default: 'loader.js')
|
|
@@ -4351,27 +4077,47 @@ interface OutputTargetBase {
|
|
|
4351
4077
|
* A unique string to differentiate one output target from another
|
|
4352
4078
|
*/
|
|
4353
4079
|
type: string;
|
|
4354
|
-
|
|
4355
|
-
|
|
4356
|
-
|
|
4357
|
-
|
|
4358
|
-
|
|
4359
|
-
|
|
4360
|
-
|
|
4361
|
-
|
|
4362
|
-
|
|
4363
|
-
|
|
4080
|
+
/**
|
|
4081
|
+
* When `true`, this output target will be skipped during development builds (`--dev`).
|
|
4082
|
+
* This improves dev build times by not generating production-only artifacts.
|
|
4083
|
+
*
|
|
4084
|
+
* Defaults vary by output target type:
|
|
4085
|
+
* - `loader-bundle`: `true` (skips the npm distribution files; the browser bundle always builds)
|
|
4086
|
+
* - `standalone`: `true` if `loader-bundle` is also configured, otherwise `false`
|
|
4087
|
+
* - `types`, `collection`, `ssr-wasm`: `true` (skips in dev)
|
|
4088
|
+
* - `assets`, `global-style`: `false` (always runs)
|
|
4089
|
+
* - `ssr`: `true` (skips in dev, unless `devServer.ssr` is enabled)
|
|
4090
|
+
* - `docs-*`: `true` (skips in dev)
|
|
4091
|
+
* - `custom`: `true` (skips in dev)
|
|
4092
|
+
* - `www`, `copy`, `stats`: `false` (always runs)
|
|
4093
|
+
*/
|
|
4094
|
+
skipInDev?: boolean;
|
|
4095
|
+
}
|
|
4096
|
+
type OutputTargetBuild = OutputTargetCollection | OutputTargetDistLazy;
|
|
4364
4097
|
interface OutputTargetCopy extends OutputTargetBase {
|
|
4365
4098
|
type: 'copy';
|
|
4366
4099
|
dir: string;
|
|
4367
4100
|
copy?: CopyTask[];
|
|
4368
|
-
copyAssets?: 'collection' | 'dist';
|
|
4369
4101
|
}
|
|
4370
4102
|
interface OutputTargetWww extends OutputTargetBase {
|
|
4371
4103
|
/**
|
|
4372
4104
|
* Webapp output target.
|
|
4373
4105
|
*/
|
|
4374
4106
|
type: 'www';
|
|
4107
|
+
/**
|
|
4108
|
+
* Choose how components are bundled for the www output.
|
|
4109
|
+
*
|
|
4110
|
+
* - `'loader'` (default): Uses the loader-bundle architecture with chunk
|
|
4111
|
+
* splitting and a loader infrastructure. Best for production apps with many
|
|
4112
|
+
* components where you want optimal loading performance.
|
|
4113
|
+
*
|
|
4114
|
+
* - `'standalone'`: Uses standalone component modules with an auto-loader that
|
|
4115
|
+
* uses MutationObserver to dynamically import components as they appear in
|
|
4116
|
+
* the DOM. Simpler architecture, easier debugging, one module per component.
|
|
4117
|
+
*
|
|
4118
|
+
* Default: `'loader'`
|
|
4119
|
+
*/
|
|
4120
|
+
bundleMode?: 'loader' | 'standalone';
|
|
4375
4121
|
/**
|
|
4376
4122
|
* The directory to write the app's JavaScript and CSS build
|
|
4377
4123
|
* files to. The default is to place this directory as a child
|
|
@@ -4414,17 +4160,11 @@ interface OutputTargetWww extends OutputTargetBase {
|
|
|
4414
4160
|
* Default: `/`
|
|
4415
4161
|
*/
|
|
4416
4162
|
baseUrl?: string;
|
|
4417
|
-
/**
|
|
4418
|
-
* By default, stencil will include all the polyfills required by legacy browsers in the ES5 build.
|
|
4419
|
-
* If it's `false`, stencil will not emit this polyfills anymore and it's your responsibility to provide them before
|
|
4420
|
-
* stencil initializes.
|
|
4421
|
-
*/
|
|
4422
|
-
polyfills?: boolean;
|
|
4423
4163
|
/**
|
|
4424
4164
|
* Path to an external node module which has exports of the prerender config object.
|
|
4425
4165
|
* ```
|
|
4426
4166
|
* module.exports = {
|
|
4427
|
-
*
|
|
4167
|
+
* afterSsr(document, url) {
|
|
4428
4168
|
* document.title = `URL: ${url.href}`;
|
|
4429
4169
|
* }
|
|
4430
4170
|
* }
|
|
@@ -4432,15 +4172,35 @@ interface OutputTargetWww extends OutputTargetBase {
|
|
|
4432
4172
|
*/
|
|
4433
4173
|
prerenderConfig?: string;
|
|
4434
4174
|
/**
|
|
4435
|
-
* Service worker config for production builds.
|
|
4436
|
-
*
|
|
4437
|
-
*
|
|
4438
|
-
*
|
|
4175
|
+
* Service worker config for production builds. In development mode, a script
|
|
4176
|
+
* to deregister existing service workers is always injected. Defaults to
|
|
4177
|
+
* `null` (disabled). Set to `true` to enable with default settings, or provide
|
|
4178
|
+
* a config object for custom settings.
|
|
4439
4179
|
*/
|
|
4440
|
-
serviceWorker?: ServiceWorkerConfig |
|
|
4180
|
+
serviceWorker?: ServiceWorkerConfig | true | null;
|
|
4441
4181
|
appDir?: string;
|
|
4182
|
+
/**
|
|
4183
|
+
* Hash the filenames of generated chunks based on their content.
|
|
4184
|
+
* Enables forever-caching of CDN-served bundles.
|
|
4185
|
+
*
|
|
4186
|
+
* @default true in production, false in dev mode
|
|
4187
|
+
*/
|
|
4188
|
+
hashFileNames?: boolean;
|
|
4189
|
+
/**
|
|
4190
|
+
* Number of characters to use for the content hash in filenames.
|
|
4191
|
+
*
|
|
4192
|
+
* @default 8
|
|
4193
|
+
*/
|
|
4194
|
+
hashedFileNameLength?: number;
|
|
4442
4195
|
}
|
|
4443
|
-
type OutputTarget = OutputTargetCopy | OutputTargetCustom |
|
|
4196
|
+
type OutputTarget = OutputTargetCopy | OutputTargetCustom | OutputTargetLoaderBundle | OutputTargetStandalone | OutputTargetSsr | OutputTargetSsrWasm | OutputTargetCollection | OutputTargetTypes | OutputTargetGlobalStyle | OutputTargetAssets | OutputTargetDistLazy | OutputTargetDocsJson | OutputTargetDocsCustom | OutputTargetDocsReadme | OutputTargetDocsVscode | OutputTargetDocsCustomElementsManifest | OutputTargetDocsAgentSkill | OutputTargetWww | OutputTargetStats;
|
|
4197
|
+
/**
|
|
4198
|
+
* A post-validation form of {@link OutputTargetWww} where `serviceWorker`
|
|
4199
|
+
* has been normalized - `true` is resolved to a {@link ServiceWorkerConfig}.
|
|
4200
|
+
*/
|
|
4201
|
+
type ValidatedOutputTargetWww = Omit<OutputTargetWww, 'serviceWorker'> & {
|
|
4202
|
+
serviceWorker?: ServiceWorkerConfig | null;
|
|
4203
|
+
};
|
|
4444
4204
|
/**
|
|
4445
4205
|
* Our custom configuration interface for generated caching Service Workers
|
|
4446
4206
|
* using the Workbox library (see https://developer.chrome.com/docs/workbox/).
|
|
@@ -4488,12 +4248,6 @@ interface LoadConfigInit {
|
|
|
4488
4248
|
configPath?: string;
|
|
4489
4249
|
logger?: Logger;
|
|
4490
4250
|
sys?: CompilerSystem;
|
|
4491
|
-
/**
|
|
4492
|
-
* When set to true, if the "tsconfig.json" file is not found
|
|
4493
|
-
* it'll automatically generate and save a default tsconfig
|
|
4494
|
-
* within the root directory.
|
|
4495
|
-
*/
|
|
4496
|
-
initTsConfig?: boolean;
|
|
4497
4251
|
}
|
|
4498
4252
|
/**
|
|
4499
4253
|
* Results from an attempt to load a config. The values on this interface
|
|
@@ -4526,33 +4280,18 @@ interface Diagnostic$1 {
|
|
|
4526
4280
|
relFilePath?: string | undefined;
|
|
4527
4281
|
type: string;
|
|
4528
4282
|
}
|
|
4529
|
-
interface CacheStorage {
|
|
4530
|
-
get(key: string): Promise<any>;
|
|
4531
|
-
set(key: string, value: any): Promise<void>;
|
|
4532
|
-
}
|
|
4533
4283
|
interface WorkerOptions {
|
|
4534
4284
|
maxConcurrentWorkers?: number;
|
|
4535
4285
|
maxConcurrentTasksPerWorker?: number;
|
|
4536
4286
|
logger?: Logger;
|
|
4537
4287
|
}
|
|
4538
|
-
interface RollupInterface {
|
|
4539
|
-
rollup: {
|
|
4540
|
-
(config: any): Promise<any>;
|
|
4541
|
-
};
|
|
4542
|
-
plugins: {
|
|
4543
|
-
nodeResolve(opts: any): any;
|
|
4544
|
-
replace(opts: any): any;
|
|
4545
|
-
commonjs(opts: any): any;
|
|
4546
|
-
json(): any;
|
|
4547
|
-
};
|
|
4548
|
-
}
|
|
4549
4288
|
interface ResolveModuleOptions {
|
|
4550
4289
|
manuallyResolve?: boolean;
|
|
4551
4290
|
packageJson?: boolean;
|
|
4552
4291
|
}
|
|
4553
4292
|
interface PrerenderStartOptions {
|
|
4554
4293
|
buildId?: string;
|
|
4555
|
-
|
|
4294
|
+
ssrAppFilePath?: string;
|
|
4556
4295
|
componentGraph?: BuildResultsComponentGraph;
|
|
4557
4296
|
srcIndexHtmlPath?: string;
|
|
4558
4297
|
}
|
|
@@ -4577,14 +4316,26 @@ interface OptimizeCssInput {
|
|
|
4577
4316
|
resolveUrl?: (url: string) => Promise<string> | string;
|
|
4578
4317
|
}
|
|
4579
4318
|
/**
|
|
4580
|
-
*
|
|
4581
|
-
*
|
|
4582
|
-
*
|
|
4319
|
+
* Options for autoprefixing CSS via Lightning CSS.
|
|
4320
|
+
*
|
|
4321
|
+
* The `targets` field accepts a browserslist query array. When omitted,
|
|
4322
|
+
* Stencil uses a modern default browser list suitable for Stencil v5+.
|
|
4583
4323
|
*
|
|
4584
|
-
*
|
|
4585
|
-
*
|
|
4324
|
+
* @example
|
|
4325
|
+
* ```ts
|
|
4326
|
+
* autoprefixer: {
|
|
4327
|
+
* targets: ['last 2 Chrome versions', 'last 2 Safari versions', 'iOS >= 14'],
|
|
4328
|
+
* }
|
|
4329
|
+
* ```
|
|
4586
4330
|
*/
|
|
4587
|
-
|
|
4331
|
+
interface AutoprefixerOptions {
|
|
4332
|
+
/**
|
|
4333
|
+
* A browserslist query array describing which browsers to generate vendor
|
|
4334
|
+
* prefixes for. Defaults to a modern set of browsers appropriate for
|
|
4335
|
+
* Stencil v5+.
|
|
4336
|
+
*/
|
|
4337
|
+
targets?: string[];
|
|
4338
|
+
}
|
|
4588
4339
|
/**
|
|
4589
4340
|
* Output from CSS optimization functions, wrapping up optimized
|
|
4590
4341
|
* CSS and any diagnostics produced during optimization.
|
|
@@ -4596,7 +4347,7 @@ interface OptimizeCssOutput {
|
|
|
4596
4347
|
interface OptimizeJsInput {
|
|
4597
4348
|
input: string;
|
|
4598
4349
|
filePath?: string;
|
|
4599
|
-
target?: '
|
|
4350
|
+
target?: 'latest';
|
|
4600
4351
|
pretty?: boolean;
|
|
4601
4352
|
sourceMap?: boolean;
|
|
4602
4353
|
}
|
|
@@ -4610,61 +4361,23 @@ interface LazyRequire {
|
|
|
4610
4361
|
require(fromDir: string, moduleId: string): any;
|
|
4611
4362
|
getModulePath(fromDir: string, moduleId: string): string;
|
|
4612
4363
|
}
|
|
4613
|
-
/**
|
|
4614
|
-
* @deprecated This interface is no longer used by Stencil
|
|
4615
|
-
* TODO(STENCIL-743): Remove this interface
|
|
4616
|
-
*/
|
|
4617
|
-
interface FsWatcherItem {
|
|
4618
|
-
close(): void;
|
|
4619
|
-
}
|
|
4620
|
-
/**
|
|
4621
|
-
* @deprecated This interface is no longer used by Stencil
|
|
4622
|
-
* TODO(STENCIL-743): Remove this interface
|
|
4623
|
-
*/
|
|
4624
|
-
interface MakeDirectoryOptions {
|
|
4625
|
-
/**
|
|
4626
|
-
* Indicates whether parent folders should be created.
|
|
4627
|
-
* @default false
|
|
4628
|
-
*/
|
|
4629
|
-
recursive?: boolean;
|
|
4630
|
-
/**
|
|
4631
|
-
* A file mode. If a string is passed, it is parsed as an octal integer. If not specified
|
|
4632
|
-
* @default 0o777.
|
|
4633
|
-
*/
|
|
4634
|
-
mode?: number;
|
|
4635
|
-
}
|
|
4636
|
-
/**
|
|
4637
|
-
* @deprecated This interface is no longer used by Stencil
|
|
4638
|
-
* TODO(STENCIL-743): Remove this interface
|
|
4639
|
-
*/
|
|
4640
|
-
interface FsStats {
|
|
4641
|
-
isFile(): boolean;
|
|
4642
|
-
isDirectory(): boolean;
|
|
4643
|
-
isBlockDevice(): boolean;
|
|
4644
|
-
isCharacterDevice(): boolean;
|
|
4645
|
-
isSymbolicLink(): boolean;
|
|
4646
|
-
isFIFO(): boolean;
|
|
4647
|
-
isSocket(): boolean;
|
|
4648
|
-
dev: number;
|
|
4649
|
-
ino: number;
|
|
4650
|
-
mode: number;
|
|
4651
|
-
nlink: number;
|
|
4652
|
-
uid: number;
|
|
4653
|
-
gid: number;
|
|
4654
|
-
rdev: number;
|
|
4655
|
-
size: number;
|
|
4656
|
-
blksize: number;
|
|
4657
|
-
blocks: number;
|
|
4658
|
-
atime: Date;
|
|
4659
|
-
mtime: Date;
|
|
4660
|
-
ctime: Date;
|
|
4661
|
-
birthtime: Date;
|
|
4662
|
-
}
|
|
4663
4364
|
interface Compiler {
|
|
4664
4365
|
build(): Promise<CompilerBuildResults>;
|
|
4665
4366
|
createWatcher(): Promise<CompilerWatcher>;
|
|
4666
4367
|
destroy(): Promise<void>;
|
|
4667
4368
|
sys: CompilerSystem;
|
|
4369
|
+
/**
|
|
4370
|
+
* @internal - Testing only. Access to the in-memory filesystem
|
|
4371
|
+
*/
|
|
4372
|
+
fs?: InMemoryFileSystem;
|
|
4373
|
+
/**
|
|
4374
|
+
* @internal - Testing only. Access to the validated configuration
|
|
4375
|
+
*/
|
|
4376
|
+
config?: ValidatedConfig;
|
|
4377
|
+
/**
|
|
4378
|
+
* @internal - Testing only. Access to the compiler context
|
|
4379
|
+
*/
|
|
4380
|
+
compilerCtx?: CompilerCtx;
|
|
4668
4381
|
}
|
|
4669
4382
|
interface CompilerWatcher extends BuildOnEvents {
|
|
4670
4383
|
start: () => Promise<WatcherCloseResults>;
|
|
@@ -4693,9 +4406,11 @@ interface CompilerRequestResponse {
|
|
|
4693
4406
|
interface TranspileOptions {
|
|
4694
4407
|
/**
|
|
4695
4408
|
* A component can be defined as a custom element by using `customelement`, or the
|
|
4696
|
-
* component class can be exported by using `module`.
|
|
4409
|
+
* component class can be exported by using `module`. Set to `null` to leave the
|
|
4410
|
+
* class's own export as-is (used with `componentMetadata: 'compilerstatic'` for
|
|
4411
|
+
* unit-testing preprocessors). Default is `customelement`.
|
|
4697
4412
|
*/
|
|
4698
|
-
componentExport?: 'customelement' | 'module' | string | undefined;
|
|
4413
|
+
componentExport?: 'customelement' | 'module' | string | null | undefined;
|
|
4699
4414
|
/**
|
|
4700
4415
|
* Sets how and if component metadata should be assigned on the compiled
|
|
4701
4416
|
* component output. The `compilerstatic` value will set the metadata to
|
|
@@ -4705,7 +4420,7 @@ interface TranspileOptions {
|
|
|
4705
4420
|
componentMetadata?: 'runtimestatic' | 'compilerstatic' | string | undefined;
|
|
4706
4421
|
/**
|
|
4707
4422
|
* The actual internal import path for any `@stencil/core` imports.
|
|
4708
|
-
* Default is `@stencil/core/runtime/client`.
|
|
4423
|
+
* Default is `@stencil/core/runtime/client/standalone`.
|
|
4709
4424
|
*/
|
|
4710
4425
|
coreImportPath?: string;
|
|
4711
4426
|
/**
|
|
@@ -4730,8 +4445,11 @@ interface TranspileOptions {
|
|
|
4730
4445
|
/**
|
|
4731
4446
|
* How component styles should be associated to the component. The `static`
|
|
4732
4447
|
* setting will assign the styles as a static getter on the component class.
|
|
4448
|
+
* Set to `null` to skip the assignment entirely (and leave any `styleUrl`
|
|
4449
|
+
* import unresolved) - useful for unit-testing preprocessors that don't
|
|
4450
|
+
* need real stylesheets.
|
|
4733
4451
|
*/
|
|
4734
|
-
style?: 'static' | string | undefined;
|
|
4452
|
+
style?: 'static' | string | null | undefined;
|
|
4735
4453
|
/**
|
|
4736
4454
|
* How style data should be added for imports. For example, the `queryparams` value
|
|
4737
4455
|
* adds the component's tagname and encapsulation info as querystring parameter
|
|
@@ -4741,8 +4459,8 @@ interface TranspileOptions {
|
|
|
4741
4459
|
*/
|
|
4742
4460
|
styleImportData?: 'queryparams' | string | undefined;
|
|
4743
4461
|
/**
|
|
4744
|
-
* The JavaScript source target TypeScript should
|
|
4745
|
-
* `latest`, `esnext`, `
|
|
4462
|
+
* The JavaScript source target TypeScript should transpile to. Values can be
|
|
4463
|
+
* `latest`, `esnext`, `es2020`, `es2017`, or `es2015`. Defaults to `latest`.
|
|
4746
4464
|
*/
|
|
4747
4465
|
target?: CompileTarget;
|
|
4748
4466
|
/**
|
|
@@ -4791,8 +4509,58 @@ interface TranspileOptions {
|
|
|
4791
4509
|
* Adds `transformTag` calls to css strings and querySelector(All) calls
|
|
4792
4510
|
*/
|
|
4793
4511
|
additionalTagTransformers?: boolean;
|
|
4512
|
+
/**
|
|
4513
|
+
* Callback used to resolve parent-class source for inheritance-chain analysis.
|
|
4514
|
+
* Called when a component's `extends` clause references a class from another
|
|
4515
|
+
* module. Return the resolved absolute path and source text of that module,
|
|
4516
|
+
* or `null` to skip inheritance resolution for that specifier.
|
|
4517
|
+
*
|
|
4518
|
+
* @example
|
|
4519
|
+
* ```ts
|
|
4520
|
+
* transpile(myComponentCode, {
|
|
4521
|
+
* resolveImport: (specifier, importer) => {
|
|
4522
|
+
* const resolved = require.resolve(specifier, { paths: [path.dirname(importer)] });
|
|
4523
|
+
* return { code: fs.readFileSync(resolved, 'utf8'), path: resolved };
|
|
4524
|
+
* },
|
|
4525
|
+
* });
|
|
4526
|
+
* ```
|
|
4527
|
+
*/
|
|
4528
|
+
resolveImport?: (specifier: string, importer: string) => {
|
|
4529
|
+
code: string;
|
|
4530
|
+
path: string;
|
|
4531
|
+
} | null;
|
|
4532
|
+
/**
|
|
4533
|
+
* When `true` class declarations at the end of a `@Component` inheritance chain
|
|
4534
|
+
* * that have no `extends` clause * will get `extends HTMLElement` injected, and a minimal
|
|
4535
|
+
* `constructor() { super(); }`. Any stencil static meta-getters are also stripped.
|
|
4536
|
+
*/
|
|
4537
|
+
transformAsBaseClass?: boolean;
|
|
4538
|
+
/**
|
|
4539
|
+
* Overrides for Stencil's BUILD feature flags in the generated output.
|
|
4540
|
+
* When set, a BUILD mutation statement is prepended to the compiled code so
|
|
4541
|
+
* that the specified flags take effect for this component at runtime.
|
|
4542
|
+
*/
|
|
4543
|
+
buildOverrides?: BuildOverrides;
|
|
4544
|
+
/**
|
|
4545
|
+
* When `true`, a `.css`/`.scss` transpile also collects CSS custom-property docs
|
|
4546
|
+
* onto {@link TranspileResults.styleDocs}. Off by default, since it costs an extra parse
|
|
4547
|
+
* of the style text.
|
|
4548
|
+
*/
|
|
4549
|
+
docs?: boolean;
|
|
4794
4550
|
}
|
|
4795
|
-
|
|
4551
|
+
/**
|
|
4552
|
+
* Keys of {@link BuildConditionals} that can be meaningfully overridden at
|
|
4553
|
+
* transpile time — config-driven flags that are not derived from component
|
|
4554
|
+
* scanning or runtime environment detection.
|
|
4555
|
+
*/
|
|
4556
|
+
type BuildOverrideKeys = 'isDev' | 'isTesting' | 'hotModuleReplacement' | 'signalBacking' | 'vdomSignals' | 'lightDomPatches' | 'slotChildNodes' | 'slotCloneNode' | 'slotDomMutations' | 'slotTextContent' | 'lifecycleDOMEvents' | 'initializeNextTick';
|
|
4557
|
+
/**
|
|
4558
|
+
* Subset of Stencil's BUILD feature flags that can be overridden at transpile
|
|
4559
|
+
* time. Derived from {@link BuildConditionals} via `Pick` so the field list
|
|
4560
|
+
* and types stay in sync with the authoritative definition.
|
|
4561
|
+
*/
|
|
4562
|
+
type BuildOverrides = Pick<BuildConditionals, BuildOverrideKeys>;
|
|
4563
|
+
type CompileTarget = 'latest' | 'esnext' | 'es2022' | 'es2020' | 'es2019' | 'es2018' | 'es2017' | string | undefined;
|
|
4796
4564
|
interface TranspileResults {
|
|
4797
4565
|
code: string;
|
|
4798
4566
|
data?: any[];
|
|
@@ -4804,6 +4572,7 @@ interface TranspileResults {
|
|
|
4804
4572
|
inputFilePath: string;
|
|
4805
4573
|
map: any;
|
|
4806
4574
|
outputFilePath: string;
|
|
4575
|
+
styleDocs?: StyleDoc[];
|
|
4807
4576
|
}
|
|
4808
4577
|
interface TransformOptions {
|
|
4809
4578
|
coreImportPath: string;
|
|
@@ -4817,6 +4586,17 @@ interface TransformOptions {
|
|
|
4817
4586
|
style: 'static' | null;
|
|
4818
4587
|
styleImportData: 'queryparams' | null;
|
|
4819
4588
|
target?: string;
|
|
4589
|
+
/**
|
|
4590
|
+
* @see {@link TranspileOptions.resolveImport}
|
|
4591
|
+
*/
|
|
4592
|
+
resolveImport?: (specifier: string, importer: string) => {
|
|
4593
|
+
code: string;
|
|
4594
|
+
path: string;
|
|
4595
|
+
} | null;
|
|
4596
|
+
/** @see {@link TranspileOptions.transformAsBaseClass} */
|
|
4597
|
+
transformAsBaseClass?: boolean;
|
|
4598
|
+
/** @see {@link TranspileOptions.buildOverrides} */
|
|
4599
|
+
buildOverrides?: BuildOverrides;
|
|
4820
4600
|
}
|
|
4821
4601
|
interface CompileScriptMinifyOptions {
|
|
4822
4602
|
target?: CompileTarget;
|
|
@@ -4836,16 +4616,35 @@ interface CliInitOptions {
|
|
|
4836
4616
|
logger: Logger;
|
|
4837
4617
|
sys: CompilerSystem;
|
|
4838
4618
|
}
|
|
4619
|
+
/**
|
|
4620
|
+
* A Stencil `resolveId`/`load`/`transform` plugin, as accepted by {@link StencilConfig.plugins}.
|
|
4621
|
+
*/
|
|
4622
|
+
interface Plugin$1 {
|
|
4623
|
+
name?: string;
|
|
4624
|
+
pluginType?: string;
|
|
4625
|
+
load?: (id: string, context: PluginCtx) => Promise<string> | string;
|
|
4626
|
+
resolveId?: (importee: string, importer: string, context: PluginCtx) => Promise<string> | string;
|
|
4627
|
+
transform?: (sourceText: string, id: string, context: PluginCtx) => Promise<PluginTransformResults> | PluginTransformResults;
|
|
4628
|
+
}
|
|
4629
|
+
type PluginTransformResults = PluginTransformationDescriptor | string | null;
|
|
4630
|
+
interface PluginTransformationDescriptor {
|
|
4631
|
+
code?: string;
|
|
4632
|
+
map?: string;
|
|
4633
|
+
id?: string;
|
|
4634
|
+
diagnostics?: Diagnostic$1[];
|
|
4635
|
+
dependencies?: string[];
|
|
4636
|
+
}
|
|
4637
|
+
interface PluginCtx {
|
|
4638
|
+
config: Config;
|
|
4639
|
+
sys: CompilerSystem;
|
|
4640
|
+
fs: InMemoryFileSystem;
|
|
4641
|
+
cache: Cache;
|
|
4642
|
+
diagnostics: Diagnostic$1[];
|
|
4643
|
+
}
|
|
4839
4644
|
//#endregion
|
|
4840
4645
|
//#region src/declarations/stencil-private.d.ts
|
|
4841
|
-
|
|
4842
|
-
|
|
4843
|
-
rootLevelIds: number;
|
|
4844
|
-
staticComponents: Set<string>;
|
|
4845
|
-
}
|
|
4846
|
-
type StencilDocument = Document & {
|
|
4847
|
-
_stencilDocData: DocData;
|
|
4848
|
-
};
|
|
4646
|
+
/** Build-time virtual `@import`s a `global-style` input can use to place Stencil-generated CSS. */
|
|
4647
|
+
type StencilVirtualImport = 'stencil-hydrate' | 'stencil-component-globals' | 'stencil-css-components';
|
|
4849
4648
|
interface SourceMap$1 {
|
|
4850
4649
|
file: string;
|
|
4851
4650
|
mappings: string;
|
|
@@ -4862,38 +4661,17 @@ interface PrintLine {
|
|
|
4862
4661
|
errorCharStart: number;
|
|
4863
4662
|
errorLength?: number;
|
|
4864
4663
|
}
|
|
4865
|
-
interface AssetsMeta {
|
|
4866
|
-
absolutePath: string;
|
|
4867
|
-
cmpRelativePath: string;
|
|
4868
|
-
originalComponentPath: string;
|
|
4869
|
-
}
|
|
4870
|
-
interface ParsedImport {
|
|
4871
|
-
importPath: string;
|
|
4872
|
-
basename: string;
|
|
4873
|
-
ext: string;
|
|
4874
|
-
data: ImportData;
|
|
4875
|
-
}
|
|
4876
|
-
interface ImportData {
|
|
4877
|
-
tag?: string;
|
|
4878
|
-
encapsulation?: string;
|
|
4879
|
-
mode?: string;
|
|
4880
|
-
}
|
|
4881
|
-
interface SerializeImportData extends ImportData {
|
|
4882
|
-
importeePath: string;
|
|
4883
|
-
importerPath?: string;
|
|
4884
|
-
/**
|
|
4885
|
-
* True if this is a node module import (e.g. using ~ prefix like ~foo/style.css)
|
|
4886
|
-
* These should be treated as bare module specifiers and not have ./ prepended
|
|
4887
|
-
*/
|
|
4888
|
-
isNodeModule?: boolean;
|
|
4889
|
-
}
|
|
4890
4664
|
interface BuildFeatures {
|
|
4891
4665
|
style: boolean;
|
|
4892
4666
|
mode: boolean;
|
|
4893
4667
|
formAssociated: boolean;
|
|
4894
4668
|
shadowDom: boolean;
|
|
4895
4669
|
shadowDelegatesFocus: boolean;
|
|
4670
|
+
shadowModeClosed: boolean;
|
|
4896
4671
|
shadowSlotAssignmentManual: boolean;
|
|
4672
|
+
shadowClonable: boolean;
|
|
4673
|
+
shadowSerializable: boolean;
|
|
4674
|
+
shadowReferenceTarget: boolean;
|
|
4897
4675
|
scoped: boolean;
|
|
4898
4676
|
/**
|
|
4899
4677
|
* Every component has a render function
|
|
@@ -4910,11 +4688,18 @@ interface BuildFeatures {
|
|
|
4910
4688
|
vdomKey: boolean;
|
|
4911
4689
|
vdomListener: boolean;
|
|
4912
4690
|
vdomPropOrAttr: boolean;
|
|
4691
|
+
/** True when at least one component uses the explicit `attr:`/`prop:` JSX prefix. */
|
|
4692
|
+
vdomPropOrAttrPrefix: boolean;
|
|
4913
4693
|
vdomRef: boolean;
|
|
4914
4694
|
vdomStyle: boolean;
|
|
4915
4695
|
vdomText: boolean;
|
|
4916
4696
|
vdomXlink: boolean;
|
|
4697
|
+
vdomSignals: boolean;
|
|
4917
4698
|
slotRelocation: boolean;
|
|
4699
|
+
patchAll: boolean;
|
|
4700
|
+
patchChildren: boolean;
|
|
4701
|
+
patchClone: boolean;
|
|
4702
|
+
patchInsert: boolean;
|
|
4918
4703
|
slot: boolean;
|
|
4919
4704
|
svg: boolean;
|
|
4920
4705
|
element: boolean;
|
|
@@ -4923,10 +4708,6 @@ interface BuildFeatures {
|
|
|
4923
4708
|
hostListenerTargetWindow: boolean;
|
|
4924
4709
|
hostListenerTargetDocument: boolean;
|
|
4925
4710
|
hostListenerTargetBody: boolean;
|
|
4926
|
-
/**
|
|
4927
|
-
* @deprecated Prevented from new apps, but left in for older collections
|
|
4928
|
-
*/
|
|
4929
|
-
hostListenerTargetParent: boolean;
|
|
4930
4711
|
hostListenerTarget: boolean;
|
|
4931
4712
|
method: boolean;
|
|
4932
4713
|
prop: boolean;
|
|
@@ -4960,33 +4741,34 @@ interface BuildConditionals extends Partial<BuildFeatures> {
|
|
|
4960
4741
|
lazyLoad?: boolean;
|
|
4961
4742
|
profile?: boolean;
|
|
4962
4743
|
constructableCSS?: boolean;
|
|
4963
|
-
|
|
4964
|
-
|
|
4965
|
-
|
|
4966
|
-
|
|
4744
|
+
/** True when `compat.lightDomPatches === true` - enables `applyLightDomPatches` shortcut. */
|
|
4745
|
+
lightDomPatches?: boolean;
|
|
4746
|
+
/** Patch `childNodes`/`children` getters on light-dom slotted components. */
|
|
4747
|
+
slotChildNodes?: boolean;
|
|
4748
|
+
/** Patch `cloneNode()` on light-dom slotted components. */
|
|
4749
|
+
slotCloneNode?: boolean;
|
|
4750
|
+
/** Patch `appendChild`/`insertBefore`/`removeChild` on light-dom slotted components. */
|
|
4751
|
+
slotDomMutations?: boolean;
|
|
4752
|
+
/** Patch `textContent` on light-dom slotted components. */
|
|
4753
|
+
slotTextContent?: boolean;
|
|
4967
4754
|
hydratedAttribute?: boolean;
|
|
4968
4755
|
hydratedClass?: boolean;
|
|
4969
4756
|
hydratedSelectorName?: string;
|
|
4757
|
+
/** True when a global-style input contains `@import "stencil-hydrate"` - suppresses dynamic style injection in the loader. */
|
|
4758
|
+
staticHydrationStyles?: boolean;
|
|
4970
4759
|
initializeNextTick?: boolean;
|
|
4971
|
-
shadowDomShim?: boolean;
|
|
4972
4760
|
asyncQueue?: boolean;
|
|
4973
|
-
transformTagName?: boolean;
|
|
4974
4761
|
additionalTagTransformers?: boolean | 'prod';
|
|
4975
|
-
|
|
4976
|
-
|
|
4977
|
-
|
|
4978
|
-
addGlobalStyleToComponents?: boolean;
|
|
4762
|
+
signalBacking?: boolean;
|
|
4763
|
+
/** True when JSX signal bypass is active - text nodes and attributes backed by Signal objects update the DOM directly. Auto-enabled when `signalBacking: true`. */
|
|
4764
|
+
vdomSignals?: boolean;
|
|
4979
4765
|
}
|
|
4980
4766
|
type ModuleFormat = 'amd' | 'cjs' | 'es' | 'iife' | 'system' | 'umd' | 'commonjs' | 'esm' | 'module' | 'systemjs';
|
|
4981
|
-
interface
|
|
4767
|
+
interface RolldownResultModule {
|
|
4982
4768
|
id: string;
|
|
4983
4769
|
}
|
|
4984
|
-
interface
|
|
4985
|
-
modules:
|
|
4986
|
-
}
|
|
4987
|
-
interface UpdatedLazyBuildCtx {
|
|
4988
|
-
name: 'esm-browser' | 'esm' | 'cjs' | 'system';
|
|
4989
|
-
buildCtx: BuildCtx;
|
|
4770
|
+
interface RolldownResults {
|
|
4771
|
+
modules: RolldownResultModule[];
|
|
4990
4772
|
}
|
|
4991
4773
|
interface BuildCtx {
|
|
4992
4774
|
buildId: number;
|
|
@@ -5000,10 +4782,9 @@ interface BuildCtx {
|
|
|
5000
4782
|
compilerCtx: CompilerCtx;
|
|
5001
4783
|
esmBrowserComponentBundle: ReadonlyArray<BundleModule>;
|
|
5002
4784
|
esmComponentBundle: ReadonlyArray<BundleModule>;
|
|
5003
|
-
es5ComponentBundle: ReadonlyArray<BundleModule>;
|
|
5004
|
-
systemComponentBundle: ReadonlyArray<BundleModule>;
|
|
5005
4785
|
commonJsComponentBundle: ReadonlyArray<BundleModule>;
|
|
5006
4786
|
components: ComponentCompilerMeta[];
|
|
4787
|
+
cssOnlyComponents: ComponentCompilerMeta[];
|
|
5007
4788
|
componentGraph: Map<string, string[]>;
|
|
5008
4789
|
config: ValidatedConfig;
|
|
5009
4790
|
createTimeSpan(msg: string, debug?: boolean): LoggerTimeSpan;
|
|
@@ -5028,19 +4809,21 @@ interface BuildCtx {
|
|
|
5028
4809
|
hasScriptChanges: boolean;
|
|
5029
4810
|
hasStyleChanges: boolean;
|
|
5030
4811
|
hasWarning: boolean;
|
|
5031
|
-
|
|
4812
|
+
ssrAppFilePath: string;
|
|
5032
4813
|
indexBuildCount: number;
|
|
5033
4814
|
indexDoc: Document;
|
|
4815
|
+
/** All non-entry HTML files found in srcDir, keyed by path relative to srcDir */
|
|
4816
|
+
htmlDocs: Map<string, Document>;
|
|
5034
4817
|
isRebuild: boolean;
|
|
5035
4818
|
/**
|
|
5036
4819
|
* A collection of Stencil's intermediate representation of components, tied to the current build
|
|
5037
4820
|
*/
|
|
5038
4821
|
moduleFiles: Module[];
|
|
5039
|
-
packageJson: PackageJsonData;
|
|
4822
|
+
packageJson: PackageJsonData | null;
|
|
5040
4823
|
pendingCopyTasks: Promise<CopyResults>[];
|
|
5041
4824
|
progress(task: BuildTask): void;
|
|
5042
4825
|
requiresFullBuild: boolean;
|
|
5043
|
-
|
|
4826
|
+
rolldownResults?: RolldownResults;
|
|
5044
4827
|
scriptsAdded: string[];
|
|
5045
4828
|
scriptsDeleted: string[];
|
|
5046
4829
|
startTime: number;
|
|
@@ -5050,6 +4833,9 @@ interface BuildCtx {
|
|
|
5050
4833
|
*/
|
|
5051
4834
|
stylesPromise: Promise<string>;
|
|
5052
4835
|
stylesUpdated: BuildStyleUpdate[];
|
|
4836
|
+
globalStylesUpdated: BuildGlobalStyleLinkUpdate[];
|
|
4837
|
+
/** Absolute path of the generated `{fsNamespace}.css`, when this build emitted one */
|
|
4838
|
+
stencilCssFile?: string;
|
|
5053
4839
|
timeSpan: LoggerTimeSpan;
|
|
5054
4840
|
timestamp: string;
|
|
5055
4841
|
transpileBuildCount: number;
|
|
@@ -5062,6 +4848,14 @@ interface BuildStyleUpdate {
|
|
|
5062
4848
|
styleText: string;
|
|
5063
4849
|
styleMode: string;
|
|
5064
4850
|
}
|
|
4851
|
+
/**
|
|
4852
|
+
* A live-reload update for a `global-style` output target's CSS, matched on
|
|
4853
|
+
* the client by `fileName` against the `<link>`
|
|
4854
|
+
*/
|
|
4855
|
+
interface BuildGlobalStyleLinkUpdate {
|
|
4856
|
+
fileName: string;
|
|
4857
|
+
styleText: string;
|
|
4858
|
+
}
|
|
5065
4859
|
type BuildTask = any;
|
|
5066
4860
|
interface CompilerBuildStats {
|
|
5067
4861
|
timestamp: string;
|
|
@@ -5080,20 +4874,15 @@ interface CompilerBuildStats {
|
|
|
5080
4874
|
options: {
|
|
5081
4875
|
minifyJs: boolean;
|
|
5082
4876
|
minifyCss: boolean;
|
|
5083
|
-
hashFileNames: boolean;
|
|
5084
|
-
hashedFileNameLength: number;
|
|
5085
|
-
buildEs5: boolean | 'prod';
|
|
5086
4877
|
};
|
|
5087
4878
|
formats: {
|
|
5088
4879
|
esmBrowser: ReadonlyArray<CompilerBuildStatBundle>;
|
|
5089
4880
|
esm: ReadonlyArray<CompilerBuildStatBundle>;
|
|
5090
|
-
es5: ReadonlyArray<CompilerBuildStatBundle>;
|
|
5091
|
-
system: ReadonlyArray<CompilerBuildStatBundle>;
|
|
5092
4881
|
commonjs: ReadonlyArray<CompilerBuildStatBundle>;
|
|
5093
4882
|
};
|
|
5094
4883
|
components: BuildComponent[];
|
|
5095
4884
|
entries: EntryModule[];
|
|
5096
|
-
|
|
4885
|
+
rolldownResults: RolldownResults;
|
|
5097
4886
|
sourceGraph?: BuildSourceGraph;
|
|
5098
4887
|
componentGraph: BuildResultsComponentGraph;
|
|
5099
4888
|
collections: CompilerBuildStatCollection[];
|
|
@@ -5119,20 +4908,7 @@ interface BuildComponent {
|
|
|
5119
4908
|
dependencyOf?: string[];
|
|
5120
4909
|
dependencies?: string[];
|
|
5121
4910
|
}
|
|
5122
|
-
|
|
5123
|
-
/**
|
|
5124
|
-
* A note regarding Rollup types:
|
|
5125
|
-
* As of this writing, there is no great way to import external types for packages that are directly embedded in the
|
|
5126
|
-
* Stencil source. As a result, some types are duplicated here for Rollup that will be used within the codebase.
|
|
5127
|
-
* Updates to rollup may require these typings to be updated.
|
|
5128
|
-
*/
|
|
5129
|
-
type RollupResult = RollupChunkResult | RollupAssetResult;
|
|
5130
|
-
interface RollupAssetResult {
|
|
5131
|
-
type: 'asset';
|
|
5132
|
-
fileName: string;
|
|
5133
|
-
content: string;
|
|
5134
|
-
}
|
|
5135
|
-
interface RollupChunkResult {
|
|
4911
|
+
interface RolldownChunkResult {
|
|
5136
4912
|
type: 'chunk';
|
|
5137
4913
|
entryKey: string;
|
|
5138
4914
|
fileName: string;
|
|
@@ -5144,29 +4920,11 @@ interface RollupChunkResult {
|
|
|
5144
4920
|
isBrowserLoader: boolean;
|
|
5145
4921
|
imports: string[];
|
|
5146
4922
|
moduleFormat: ModuleFormat;
|
|
5147
|
-
map?:
|
|
4923
|
+
map?: SourceMap;
|
|
5148
4924
|
}
|
|
5149
|
-
interface RollupSourceMap {
|
|
5150
|
-
file: string;
|
|
5151
|
-
mappings: string;
|
|
5152
|
-
names: string[];
|
|
5153
|
-
sources: string[];
|
|
5154
|
-
sourcesContent: string[];
|
|
5155
|
-
version: number;
|
|
5156
|
-
toString(): string;
|
|
5157
|
-
toUrl(): string;
|
|
5158
|
-
}
|
|
5159
|
-
/**
|
|
5160
|
-
* Result of Stencil compressing, mangling, and otherwise 'minifying' JavaScript
|
|
5161
|
-
*/
|
|
5162
|
-
type OptimizeJsResult = {
|
|
5163
|
-
output: string;
|
|
5164
|
-
diagnostics: Diagnostic$1[];
|
|
5165
|
-
sourceMap?: SourceMap$1;
|
|
5166
|
-
};
|
|
5167
4925
|
interface BundleModule {
|
|
5168
4926
|
entryKey: string;
|
|
5169
|
-
|
|
4927
|
+
rolldownResult: RolldownChunkResult;
|
|
5170
4928
|
cmps: ComponentCompilerMeta[];
|
|
5171
4929
|
output: BundleModuleOutput;
|
|
5172
4930
|
}
|
|
@@ -5199,41 +4957,31 @@ interface CollectionCompilerMeta {
|
|
|
5199
4957
|
bundles?: {
|
|
5200
4958
|
components: string[];
|
|
5201
4959
|
}[];
|
|
4960
|
+
buildFlags?: Partial<BuildConditionals>;
|
|
5202
4961
|
}
|
|
5203
4962
|
interface CollectionCompilerVersion {
|
|
5204
4963
|
name: string;
|
|
5205
4964
|
version: string;
|
|
5206
4965
|
typescriptVersion?: string;
|
|
5207
4966
|
}
|
|
5208
|
-
|
|
5209
|
-
|
|
5210
|
-
|
|
5211
|
-
|
|
5212
|
-
|
|
5213
|
-
|
|
5214
|
-
|
|
5215
|
-
|
|
5216
|
-
|
|
5217
|
-
|
|
5218
|
-
|
|
5219
|
-
|
|
5220
|
-
|
|
5221
|
-
|
|
5222
|
-
|
|
5223
|
-
|
|
5224
|
-
|
|
5225
|
-
|
|
5226
|
-
name: string;
|
|
5227
|
-
tags: string[];
|
|
5228
|
-
}
|
|
5229
|
-
interface CollectionCompiler {
|
|
5230
|
-
name: string;
|
|
5231
|
-
version: string;
|
|
5232
|
-
typescriptVersion?: string;
|
|
5233
|
-
}
|
|
5234
|
-
interface CollectionDependencyData {
|
|
5235
|
-
name: string;
|
|
5236
|
-
tags: string[];
|
|
4967
|
+
/**
|
|
4968
|
+
* A memoized result of the SASS + Lightning CSS transformation for a single stylesheet, keyed by
|
|
4969
|
+
* the annotated Rolldown import id (e.g. `/path/to/comp.scss?tag=ion-button&encapsulation=shadow`).
|
|
4970
|
+
*
|
|
4971
|
+
* Storing this allows all output targets (customElements, lazy, hydrate) that process the same
|
|
4972
|
+
* stylesheets to share a single computation instead of repeating it N times.
|
|
4973
|
+
*/
|
|
4974
|
+
interface CssTransformCacheEntry {
|
|
4975
|
+
/** Resolved file ID after plugin (SASS) transforms */
|
|
4976
|
+
pluginTransformId: string;
|
|
4977
|
+
/** CSS source produced by the SASS / plugin pipeline */
|
|
4978
|
+
pluginTransformCode: string;
|
|
4979
|
+
/** File dependencies discovered during the SASS transform (e.g. `@import`-ed partials) */
|
|
4980
|
+
pluginTransformDependencies: string[];
|
|
4981
|
+
/** Diagnostics emitted during the plugin transform pass */
|
|
4982
|
+
pluginTransformDiagnostics: Diagnostic$1[];
|
|
4983
|
+
/** Full output of the subsequent `transformCssToEsm` call */
|
|
4984
|
+
cssTransformOutput: TransformCssToEsmOutput;
|
|
5237
4985
|
}
|
|
5238
4986
|
interface CompilerCtx {
|
|
5239
4987
|
version: number;
|
|
@@ -5247,7 +4995,14 @@ interface CompilerCtx {
|
|
|
5247
4995
|
addWatchFile: (path: string) => void;
|
|
5248
4996
|
cache: Cache;
|
|
5249
4997
|
cssModuleImports: Map<string, string[]>;
|
|
5250
|
-
|
|
4998
|
+
/** Cache of built global styles, keyed by input file path */
|
|
4999
|
+
globalStyleCache: Map<string, string>;
|
|
5000
|
+
/** Cache of discovered CSS-only components from the last scan, keyed by absolute .css file path */
|
|
5001
|
+
cssOnlyComponentsCache: Map<string, ComponentCompilerMeta[]>;
|
|
5002
|
+
/** Contents of the last auto-placed `stencil-*` CSS, used to detect changes for HMR */
|
|
5003
|
+
stencilCss?: string;
|
|
5004
|
+
/** Virtual imports found in each built global style (post-preprocessing), keyed by input path */
|
|
5005
|
+
globalStyleVirtualImports: Map<string, Set<StencilVirtualImport>>;
|
|
5251
5006
|
collections: CollectionCompilerMeta[];
|
|
5252
5007
|
compilerOptions: any;
|
|
5253
5008
|
events: BuildEvents;
|
|
@@ -5261,14 +5016,40 @@ interface CompilerCtx {
|
|
|
5261
5016
|
moduleMap: ModuleMap;
|
|
5262
5017
|
nodeMap: NodeMap;
|
|
5263
5018
|
resolvedCollections: Set<string>;
|
|
5264
|
-
|
|
5265
|
-
|
|
5266
|
-
|
|
5019
|
+
rolldownCacheSsr: any;
|
|
5020
|
+
rolldownCacheLazy: any;
|
|
5021
|
+
rolldownCacheNative: any;
|
|
5267
5022
|
styleModeNames: Set<string>;
|
|
5268
5023
|
changedModules: Set<string>;
|
|
5269
5024
|
changedFiles: Set<string>;
|
|
5270
5025
|
worker?: CompilerWorkerContext;
|
|
5271
|
-
|
|
5026
|
+
rolldownCache: Map<string, any>;
|
|
5027
|
+
/**
|
|
5028
|
+
* Cross-build cache for {@link ts.transpileModule} results.
|
|
5029
|
+
* Keyed by `"${bundleId}:${normalizedFilePath}"`. Invalidated for any
|
|
5030
|
+
* file that appears in {@link changedModules} after TypeScript re-emits.
|
|
5031
|
+
* @see transpileCache in compiler-ctx.ts
|
|
5032
|
+
*/
|
|
5033
|
+
transpileCache: Map<string, {
|
|
5034
|
+
outputText: string;
|
|
5035
|
+
sourceMapText: string | null;
|
|
5036
|
+
}>;
|
|
5037
|
+
/**
|
|
5038
|
+
* Cross-build cache of the last style text pushed to the HMR client.
|
|
5039
|
+
* Keyed by getScopeId result (e.g. "ion-accordion$ios"). Used by
|
|
5040
|
+
* extTransformsPlugin to avoid re-pushing unchanged styles on every rebuild.
|
|
5041
|
+
*/
|
|
5042
|
+
prevStylesMap: Map<string, string>;
|
|
5043
|
+
/**
|
|
5044
|
+
* Cross-output-target cache for the SASS + Lightning CSS computation.
|
|
5045
|
+
* Keyed by the annotated Rolldown import id. Null entries indicate that the
|
|
5046
|
+
* source file could not be read (propagated as a `null` return from the
|
|
5047
|
+
* transform hook).
|
|
5048
|
+
*
|
|
5049
|
+
* Entries are invalidated in `invalidateRolldownCaches` whenever a
|
|
5050
|
+
* source file or one of its SASS dependencies is modified.
|
|
5051
|
+
*/
|
|
5052
|
+
cssTransformCache: Map<string, CssTransformCacheEntry | null>;
|
|
5272
5053
|
reset(): void;
|
|
5273
5054
|
}
|
|
5274
5055
|
type NodeMap = WeakMap<any, ComponentCompilerMeta>;
|
|
@@ -5299,14 +5080,14 @@ interface ComponentCompilerFeatures {
|
|
|
5299
5080
|
hasListenerTargetWindow: boolean;
|
|
5300
5081
|
hasListenerTargetDocument: boolean;
|
|
5301
5082
|
hasListenerTargetBody: boolean;
|
|
5302
|
-
/**
|
|
5303
|
-
* @deprecated Prevented from new apps, but left in for older collections
|
|
5304
|
-
*/
|
|
5305
|
-
hasListenerTargetParent: boolean;
|
|
5306
5083
|
hasMember: boolean;
|
|
5307
5084
|
hasMethod: boolean;
|
|
5308
5085
|
hasMode: boolean;
|
|
5309
5086
|
hasModernPropertyDecls: boolean;
|
|
5087
|
+
hasPatchAll: boolean;
|
|
5088
|
+
hasPatchChildren: boolean;
|
|
5089
|
+
hasPatchClone: boolean;
|
|
5090
|
+
hasPatchInsert: boolean;
|
|
5310
5091
|
hasProp: boolean;
|
|
5311
5092
|
hasPropBoolean: boolean;
|
|
5312
5093
|
hasPropNumber: boolean;
|
|
@@ -5324,15 +5105,18 @@ interface ComponentCompilerFeatures {
|
|
|
5324
5105
|
hasVdomKey: boolean;
|
|
5325
5106
|
hasVdomListener: boolean;
|
|
5326
5107
|
hasVdomPropOrAttr: boolean;
|
|
5108
|
+
hasVdomPropOrAttrPrefix: boolean;
|
|
5327
5109
|
hasVdomRef: boolean;
|
|
5328
5110
|
hasVdomRender: boolean;
|
|
5329
5111
|
hasVdomStyle: boolean;
|
|
5330
5112
|
hasVdomText: boolean;
|
|
5331
5113
|
hasVdomXlink: boolean;
|
|
5114
|
+
hasSignalsImport: boolean;
|
|
5332
5115
|
hasWatchCallback: boolean;
|
|
5333
5116
|
htmlAttrNames: string[];
|
|
5334
5117
|
htmlTagNames: string[];
|
|
5335
5118
|
htmlParts: string[];
|
|
5119
|
+
htmlSlots: string[];
|
|
5336
5120
|
isUpdateable: boolean;
|
|
5337
5121
|
/**
|
|
5338
5122
|
* A plain component is one that doesn't have:
|
|
@@ -5364,7 +5148,7 @@ interface ComponentCompilerMeta extends ComponentCompilerFeatures {
|
|
|
5364
5148
|
* Custom states to initialize on the ElementInternals.states CustomStateSet.
|
|
5365
5149
|
* These are defined via @AttachInternals({ states: {...} }).
|
|
5366
5150
|
*/
|
|
5367
|
-
attachInternalsCustomStates:
|
|
5151
|
+
attachInternalsCustomStates: JsonDocsCustomState[];
|
|
5368
5152
|
componentClassName: string;
|
|
5369
5153
|
/**
|
|
5370
5154
|
* A list of web component tag names that are either:
|
|
@@ -5405,16 +5189,43 @@ interface ComponentCompilerMeta extends ComponentCompilerFeatures {
|
|
|
5405
5189
|
properties: ComponentCompilerProperty[];
|
|
5406
5190
|
serializers: ComponentCompilerChangeHandler[];
|
|
5407
5191
|
shadowDelegatesFocus: boolean;
|
|
5192
|
+
/**
|
|
5193
|
+
* Whether the shadow root is preserved when the host element is deep-cloned via
|
|
5194
|
+
* `Node.cloneNode(true)`. Only applicable when encapsulation is 'shadow'.
|
|
5195
|
+
*/
|
|
5196
|
+
shadowClonable: boolean;
|
|
5197
|
+
/**
|
|
5198
|
+
* Whether the shadow root is marked serializable for `Element.getHTML({ serializableShadowRoots: true })`.
|
|
5199
|
+
* Only applicable when encapsulation is 'shadow'.
|
|
5200
|
+
*/
|
|
5201
|
+
shadowSerializable: boolean;
|
|
5202
|
+
/**
|
|
5203
|
+
* Shadow DOM mode. 'open' (default) or 'closed'.
|
|
5204
|
+
* Only applicable when encapsulation is 'shadow'.
|
|
5205
|
+
*/
|
|
5206
|
+
shadowMode: 'open' | 'closed' | null;
|
|
5408
5207
|
/**
|
|
5409
5208
|
* Slot assignment mode for shadow DOM. 'manual', enables imperative slotting
|
|
5410
5209
|
* using HTMLSlotElement.assign(). Only applicable when encapsulation is 'shadow'.
|
|
5411
5210
|
*/
|
|
5412
5211
|
slotAssignment: 'manual' | null;
|
|
5212
|
+
/**
|
|
5213
|
+
* `id` of the element within the shadow root that IDREFs targeting the host resolve to.
|
|
5214
|
+
* Only applicable when encapsulation is 'shadow'.
|
|
5215
|
+
*/
|
|
5216
|
+
shadowReferenceTarget: string | null;
|
|
5217
|
+
/**
|
|
5218
|
+
* Per-component slot patches for non-shadow DOM components.
|
|
5219
|
+
* These patches enable proper slot behavior without native Shadow DOM.
|
|
5220
|
+
* Only applicable when encapsulation is 'none' or 'scoped'.
|
|
5221
|
+
*/
|
|
5222
|
+
patches: ComponentPatches | null;
|
|
5413
5223
|
sourceFilePath: string;
|
|
5414
5224
|
sourceMapPath: string;
|
|
5415
5225
|
states: ComponentCompilerState[];
|
|
5416
|
-
styleDocs:
|
|
5226
|
+
styleDocs: StyleDoc[];
|
|
5417
5227
|
styles: StyleCompiler[];
|
|
5228
|
+
globalStyles: ComponentGlobalStyle[];
|
|
5418
5229
|
tagName: string;
|
|
5419
5230
|
virtualProperties: ComponentCompilerVirtualProperty[];
|
|
5420
5231
|
watchers: ComponentCompilerChangeHandler[];
|
|
@@ -5426,6 +5237,20 @@ interface ComponentCompilerMeta extends ComponentCompilerFeatures {
|
|
|
5426
5237
|
* 3. 'none' - a basic HTML element
|
|
5427
5238
|
*/
|
|
5428
5239
|
type Encapsulation = 'shadow' | 'scoped' | 'none';
|
|
5240
|
+
/**
|
|
5241
|
+
* Per-component slot patches for non-shadow DOM components.
|
|
5242
|
+
* These enable proper slot behavior when not using native Shadow DOM.
|
|
5243
|
+
*/
|
|
5244
|
+
interface ComponentPatches {
|
|
5245
|
+
/** Apply all slot patches (equivalent to lightDomPatches) */
|
|
5246
|
+
all?: boolean;
|
|
5247
|
+
/** Patch child node accessors (children, firstChild, lastChild, etc.) */
|
|
5248
|
+
children?: boolean;
|
|
5249
|
+
/** Patch cloneNode() to handle slotted content */
|
|
5250
|
+
clone?: boolean;
|
|
5251
|
+
/** Patch appendChild(), insertBefore(), etc. for slot relocation */
|
|
5252
|
+
insert?: boolean;
|
|
5253
|
+
}
|
|
5429
5254
|
/**
|
|
5430
5255
|
* Intermediate Representation (IR) of a static property on a Stencil component
|
|
5431
5256
|
*/
|
|
@@ -5477,6 +5302,11 @@ interface ComponentCompilerPropertyComplexType {
|
|
|
5477
5302
|
* annotation in the original source file.
|
|
5478
5303
|
*/
|
|
5479
5304
|
references: ComponentCompilerTypeReferences;
|
|
5305
|
+
/**
|
|
5306
|
+
* @internal TypeScript AST node used for semantic type analysis during compilation.
|
|
5307
|
+
* Not serialized, only used internally for improved type renaming logic.
|
|
5308
|
+
*/
|
|
5309
|
+
_astNode?: any;
|
|
5480
5310
|
}
|
|
5481
5311
|
/**
|
|
5482
5312
|
* A record of `ComponentCompilerTypeReference` entities.
|
|
@@ -5570,6 +5400,11 @@ interface ComponentCompilerMethodComplexType {
|
|
|
5570
5400
|
parameters: JsonDocMethodParameter[];
|
|
5571
5401
|
references: ComponentCompilerTypeReferences;
|
|
5572
5402
|
return: string;
|
|
5403
|
+
/**
|
|
5404
|
+
* @internal TypeScript AST method node used for semantic type analysis during compilation.
|
|
5405
|
+
* Not serialized, only used internally for improved type renaming logic.
|
|
5406
|
+
*/
|
|
5407
|
+
_astNode?: any;
|
|
5573
5408
|
}
|
|
5574
5409
|
interface ComponentCompilerChangeHandler {
|
|
5575
5410
|
propName: string;
|
|
@@ -5580,31 +5415,17 @@ interface ComponentCompilerChangeHandler {
|
|
|
5580
5415
|
}
|
|
5581
5416
|
interface ComponentCompilerMethod extends ComponentCompilerStaticMethod {
|
|
5582
5417
|
name: string;
|
|
5583
|
-
internal: boolean;
|
|
5584
|
-
}
|
|
5585
|
-
interface ComponentCompilerState {
|
|
5586
|
-
name: string;
|
|
5587
|
-
}
|
|
5588
|
-
/**
|
|
5589
|
-
* Metadata about a custom state defined via @AttachInternals({ states: {...} })
|
|
5590
|
-
*
|
|
5591
|
-
* Custom states are exposed via the ElementInternals.states CustomStateSet
|
|
5592
|
-
* and can be targeted with the CSS :state() pseudo-class.
|
|
5593
|
-
*/
|
|
5594
|
-
interface ComponentCompilerCustomState {
|
|
5595
|
-
/**
|
|
5596
|
-
* The name of the custom state (without dashes)
|
|
5597
|
-
*/
|
|
5598
|
-
name: string;
|
|
5599
|
-
/**
|
|
5600
|
-
* The initial value of the state
|
|
5601
|
-
*/
|
|
5602
|
-
initialValue: boolean;
|
|
5603
|
-
/**
|
|
5604
|
-
* Optional JSDoc description for the state
|
|
5605
|
-
*/
|
|
5606
|
-
docs: string;
|
|
5418
|
+
internal: boolean;
|
|
5419
|
+
}
|
|
5420
|
+
interface ComponentCompilerState {
|
|
5421
|
+
name: string;
|
|
5607
5422
|
}
|
|
5423
|
+
/**
|
|
5424
|
+
* Metadata about a custom state defined via @AttachInternals({ states: {...} })
|
|
5425
|
+
*
|
|
5426
|
+
* Custom states are exposed via the ElementInternals.states CustomStateSet
|
|
5427
|
+
* and can be targeted with the CSS :state() pseudo-class.
|
|
5428
|
+
*/
|
|
5608
5429
|
/**
|
|
5609
5430
|
* Representation of JSDoc that is pulled off a node in the AST
|
|
5610
5431
|
*/
|
|
@@ -5616,73 +5437,13 @@ interface CompilerJsDoc {
|
|
|
5616
5437
|
/**
|
|
5617
5438
|
* Tags included in the JSDoc
|
|
5618
5439
|
*/
|
|
5619
|
-
tags:
|
|
5620
|
-
}
|
|
5621
|
-
/**
|
|
5622
|
-
* Representation of a tag that exists in a JSDoc
|
|
5623
|
-
*/
|
|
5624
|
-
interface CompilerJsDocTagInfo {
|
|
5625
|
-
/**
|
|
5626
|
-
* The name of the tag - e.g. `@deprecated`
|
|
5627
|
-
*/
|
|
5628
|
-
name: string;
|
|
5629
|
-
/**
|
|
5630
|
-
* Additional text that is associated with the tag - e.g. `@deprecated use v2 of this API`
|
|
5631
|
-
*/
|
|
5632
|
-
text?: string;
|
|
5633
|
-
}
|
|
5634
|
-
/**
|
|
5635
|
-
* The (internal) representation of a CSS block comment in a CSS, Sass, etc. file. This data structure is used during
|
|
5636
|
-
* the initial compilation phases of Stencil, as a piece of {@link ComponentCompilerMeta}.
|
|
5637
|
-
*/
|
|
5638
|
-
interface CompilerStyleDoc {
|
|
5639
|
-
/**
|
|
5640
|
-
* The name of the CSS property
|
|
5641
|
-
*/
|
|
5642
|
-
name: string;
|
|
5643
|
-
/**
|
|
5644
|
-
* The user-defined description of the CSS property
|
|
5645
|
-
*/
|
|
5646
|
-
docs: string;
|
|
5647
|
-
/**
|
|
5648
|
-
* The JSDoc-style annotation (e.g. `@prop`) that was used in the block comment to detect the comment.
|
|
5649
|
-
* Used to inform Stencil where the start of a new property's description starts (and where the previous description
|
|
5650
|
-
* ends).
|
|
5651
|
-
*/
|
|
5652
|
-
annotation: 'prop';
|
|
5653
|
-
/**
|
|
5654
|
-
* The Stencil style-mode that is associated with this property.
|
|
5655
|
-
*/
|
|
5656
|
-
mode: string;
|
|
5440
|
+
tags: JsonDocsTag[];
|
|
5657
5441
|
}
|
|
5658
5442
|
interface CompilerAssetDir {
|
|
5659
5443
|
absolutePath?: string;
|
|
5660
5444
|
cmpRelativePath?: string;
|
|
5661
5445
|
originalComponentPath?: string;
|
|
5662
5446
|
}
|
|
5663
|
-
interface ComponentCompilerData {
|
|
5664
|
-
exportLine: string;
|
|
5665
|
-
filePath: string;
|
|
5666
|
-
cmp: ComponentCompilerMeta;
|
|
5667
|
-
uniqueComponentClassName?: string;
|
|
5668
|
-
importLine?: string;
|
|
5669
|
-
}
|
|
5670
|
-
interface ComponentConstructor {
|
|
5671
|
-
is?: string;
|
|
5672
|
-
properties?: ComponentConstructorProperties;
|
|
5673
|
-
watchers?: ComponentConstructorChangeHandlers;
|
|
5674
|
-
events?: ComponentConstructorEvent[];
|
|
5675
|
-
listeners?: ComponentConstructorListener[];
|
|
5676
|
-
style?: string;
|
|
5677
|
-
styleId?: string;
|
|
5678
|
-
encapsulation?: ComponentConstructorEncapsulation;
|
|
5679
|
-
observedAttributes?: string[];
|
|
5680
|
-
cmpMeta?: ComponentRuntimeMeta;
|
|
5681
|
-
isProxied?: boolean;
|
|
5682
|
-
isStyleRegistered?: boolean;
|
|
5683
|
-
serializers?: ComponentConstructorChangeHandlers;
|
|
5684
|
-
deserializers?: ComponentConstructorChangeHandlers;
|
|
5685
|
-
}
|
|
5686
5447
|
/**
|
|
5687
5448
|
* A mapping from class member names to a list of methods which are watching
|
|
5688
5449
|
* them.
|
|
@@ -5692,48 +5453,6 @@ interface ComponentConstructorChangeHandlers {
|
|
|
5692
5453
|
[methodName: string]: number;
|
|
5693
5454
|
}[];
|
|
5694
5455
|
}
|
|
5695
|
-
interface ComponentTestingConstructor extends ComponentConstructor {
|
|
5696
|
-
COMPILER_META: ComponentCompilerMeta;
|
|
5697
|
-
prototype?: {
|
|
5698
|
-
componentWillLoad?: Function;
|
|
5699
|
-
componentWillUpdate?: Function;
|
|
5700
|
-
componentWillRender?: Function;
|
|
5701
|
-
__componentWillLoad?: Function | null;
|
|
5702
|
-
__componentWillUpdate?: Function | null;
|
|
5703
|
-
__componentWillRender?: Function | null;
|
|
5704
|
-
};
|
|
5705
|
-
}
|
|
5706
|
-
interface ComponentNativeConstructor extends ComponentConstructor {
|
|
5707
|
-
cmpMeta: ComponentRuntimeMeta;
|
|
5708
|
-
}
|
|
5709
|
-
type ComponentConstructorEncapsulation = 'shadow' | 'scoped' | 'none';
|
|
5710
|
-
interface ComponentConstructorProperties {
|
|
5711
|
-
[propName: string]: ComponentConstructorProperty;
|
|
5712
|
-
}
|
|
5713
|
-
interface ComponentConstructorProperty {
|
|
5714
|
-
attribute?: string;
|
|
5715
|
-
elementRef?: boolean;
|
|
5716
|
-
method?: boolean;
|
|
5717
|
-
mutable?: boolean;
|
|
5718
|
-
reflect?: boolean;
|
|
5719
|
-
state?: boolean;
|
|
5720
|
-
type?: ComponentConstructorPropertyType;
|
|
5721
|
-
watchCallbacks?: string[];
|
|
5722
|
-
}
|
|
5723
|
-
type ComponentConstructorPropertyType = StringConstructor | BooleanConstructor | NumberConstructor | 'string' | 'boolean' | 'number';
|
|
5724
|
-
interface ComponentConstructorEvent {
|
|
5725
|
-
name: string;
|
|
5726
|
-
method: string;
|
|
5727
|
-
bubbles: boolean;
|
|
5728
|
-
cancelable: boolean;
|
|
5729
|
-
composed: boolean;
|
|
5730
|
-
}
|
|
5731
|
-
interface ComponentConstructorListener {
|
|
5732
|
-
name: string;
|
|
5733
|
-
method: string;
|
|
5734
|
-
capture?: boolean;
|
|
5735
|
-
passive?: boolean;
|
|
5736
|
-
}
|
|
5737
5456
|
interface EntryModule {
|
|
5738
5457
|
entryKey: string;
|
|
5739
5458
|
cmps: ComponentCompilerMeta[];
|
|
@@ -5748,7 +5467,9 @@ interface HostElement extends HTMLElement {
|
|
|
5748
5467
|
disconnectedCallback?: () => void;
|
|
5749
5468
|
host?: Element;
|
|
5750
5469
|
forceUpdate?: () => void;
|
|
5751
|
-
|
|
5470
|
+
__s_ghr?: () => HostRef;
|
|
5471
|
+
/** attaches the component's shadow root if it needs one and doesn't have one yet */
|
|
5472
|
+
__attachShadow?: () => void;
|
|
5752
5473
|
/**
|
|
5753
5474
|
* Unique stencil id for this element
|
|
5754
5475
|
*/
|
|
@@ -5802,9 +5523,18 @@ interface HostElement extends HTMLElement {
|
|
|
5802
5523
|
* must be resolved for the top, ancestor component to be fully hydrated
|
|
5803
5524
|
*/
|
|
5804
5525
|
['s-p']?: Promise<void>[];
|
|
5526
|
+
/**
|
|
5527
|
+
* Pending Connects:
|
|
5528
|
+
* A list of {@link HostRef.$onFirstConnectPromise$} promises for descendants that
|
|
5529
|
+
* were already registered with this component (their nearest Stencil ancestor) by
|
|
5530
|
+
* the time this component's own initial `componentWillLoad` was scheduled. Awaited
|
|
5531
|
+
* so this component's `componentWillLoad` can't fire before those descendants'
|
|
5532
|
+
* real `connectedCallback`s have.
|
|
5533
|
+
*/
|
|
5534
|
+
['s-pc']?: Promise<void>[];
|
|
5805
5535
|
componentOnReady?: () => Promise<this>;
|
|
5806
5536
|
}
|
|
5807
|
-
interface
|
|
5537
|
+
interface SsrResults {
|
|
5808
5538
|
buildId: string;
|
|
5809
5539
|
diagnostics: Diagnostic$1[];
|
|
5810
5540
|
url: string;
|
|
@@ -5816,62 +5546,46 @@ interface HydrateResults {
|
|
|
5816
5546
|
search: string | null;
|
|
5817
5547
|
hash: string | null;
|
|
5818
5548
|
html: string | null;
|
|
5819
|
-
components:
|
|
5820
|
-
anchors:
|
|
5821
|
-
imgs:
|
|
5822
|
-
scripts:
|
|
5823
|
-
styles:
|
|
5824
|
-
staticData:
|
|
5549
|
+
components: SsrComponent[];
|
|
5550
|
+
anchors: SsrAnchorElement[];
|
|
5551
|
+
imgs: SsrImgElement[];
|
|
5552
|
+
scripts: SsrScriptElement[];
|
|
5553
|
+
styles: SsrStyleElement[];
|
|
5554
|
+
staticData: SsrStaticData[];
|
|
5825
5555
|
title: string | null;
|
|
5826
5556
|
hydratedCount: number;
|
|
5827
5557
|
httpStatus: number | null;
|
|
5828
5558
|
}
|
|
5829
|
-
interface
|
|
5559
|
+
interface SsrComponent {
|
|
5830
5560
|
tag: string;
|
|
5831
5561
|
mode: string;
|
|
5832
5562
|
count: number;
|
|
5833
5563
|
depth: number;
|
|
5834
5564
|
}
|
|
5835
|
-
interface
|
|
5565
|
+
interface SsrElement {
|
|
5836
5566
|
[attrName: string]: string | undefined;
|
|
5837
5567
|
}
|
|
5838
|
-
interface
|
|
5568
|
+
interface SsrAnchorElement extends SsrElement {
|
|
5839
5569
|
href?: string;
|
|
5840
5570
|
target?: string;
|
|
5841
5571
|
}
|
|
5842
|
-
interface
|
|
5572
|
+
interface SsrImgElement extends SsrElement {
|
|
5843
5573
|
src?: string;
|
|
5844
5574
|
}
|
|
5845
|
-
interface
|
|
5575
|
+
interface SsrScriptElement extends SsrElement {
|
|
5846
5576
|
src?: string;
|
|
5847
5577
|
type?: string;
|
|
5848
5578
|
}
|
|
5849
|
-
interface
|
|
5579
|
+
interface SsrStyleElement extends SsrElement {
|
|
5850
5580
|
id?: string;
|
|
5851
5581
|
href?: string;
|
|
5852
5582
|
content?: string;
|
|
5853
5583
|
}
|
|
5854
|
-
interface
|
|
5584
|
+
interface SsrStaticData {
|
|
5855
5585
|
id: string;
|
|
5856
5586
|
type: string;
|
|
5857
5587
|
content: string;
|
|
5858
5588
|
}
|
|
5859
|
-
interface JsDoc {
|
|
5860
|
-
name: string;
|
|
5861
|
-
documentation: string;
|
|
5862
|
-
type: string;
|
|
5863
|
-
tags: JSDocTagInfo[];
|
|
5864
|
-
default?: string;
|
|
5865
|
-
parameters?: JsDoc[];
|
|
5866
|
-
returns?: {
|
|
5867
|
-
type: string;
|
|
5868
|
-
documentation: string;
|
|
5869
|
-
};
|
|
5870
|
-
}
|
|
5871
|
-
interface JSDocTagInfo {
|
|
5872
|
-
name: string;
|
|
5873
|
-
text?: string;
|
|
5874
|
-
}
|
|
5875
5589
|
/**
|
|
5876
5590
|
* A mapping from a TypeScript or JavaScript source file path on disk, to a Stencil {@link Module}.
|
|
5877
5591
|
*
|
|
@@ -5913,6 +5627,7 @@ interface Module {
|
|
|
5913
5627
|
htmlAttrNames: string[];
|
|
5914
5628
|
htmlTagNames: string[];
|
|
5915
5629
|
htmlParts: string[];
|
|
5630
|
+
htmlSlots: string[];
|
|
5916
5631
|
isCollectionDependency: boolean;
|
|
5917
5632
|
isLegacy: boolean;
|
|
5918
5633
|
jsFilePath: string;
|
|
@@ -5937,33 +5652,13 @@ interface Module {
|
|
|
5937
5652
|
hasVdomKey: boolean;
|
|
5938
5653
|
hasVdomListener: boolean;
|
|
5939
5654
|
hasVdomPropOrAttr: boolean;
|
|
5655
|
+
hasVdomPropOrAttrPrefix: boolean;
|
|
5940
5656
|
hasVdomRef: boolean;
|
|
5941
5657
|
hasVdomRender: boolean;
|
|
5942
5658
|
hasVdomStyle: boolean;
|
|
5943
5659
|
hasVdomText: boolean;
|
|
5944
5660
|
hasVdomXlink: boolean;
|
|
5945
|
-
|
|
5946
|
-
interface Plugin {
|
|
5947
|
-
name?: string;
|
|
5948
|
-
pluginType?: string;
|
|
5949
|
-
load?: (id: string, context: PluginCtx) => Promise<string> | string;
|
|
5950
|
-
resolveId?: (importee: string, importer: string, context: PluginCtx) => Promise<string> | string;
|
|
5951
|
-
transform?: (sourceText: string, id: string, context: PluginCtx) => Promise<PluginTransformResults> | PluginTransformResults;
|
|
5952
|
-
}
|
|
5953
|
-
type PluginTransformResults = PluginTransformationDescriptor | string | null;
|
|
5954
|
-
interface PluginTransformationDescriptor {
|
|
5955
|
-
code?: string;
|
|
5956
|
-
map?: string;
|
|
5957
|
-
id?: string;
|
|
5958
|
-
diagnostics?: Diagnostic$1[];
|
|
5959
|
-
dependencies?: string[];
|
|
5960
|
-
}
|
|
5961
|
-
interface PluginCtx {
|
|
5962
|
-
config: Config;
|
|
5963
|
-
sys: CompilerSystem;
|
|
5964
|
-
fs: InMemoryFileSystem;
|
|
5965
|
-
cache: Cache;
|
|
5966
|
-
diagnostics: Diagnostic$1[];
|
|
5661
|
+
hasSignalsImport: boolean;
|
|
5967
5662
|
}
|
|
5968
5663
|
interface PrerenderUrlResults {
|
|
5969
5664
|
anchorUrls: string[];
|
|
@@ -5976,7 +5671,7 @@ interface PrerenderUrlRequest {
|
|
|
5976
5671
|
baseUrl: string;
|
|
5977
5672
|
componentGraphPath: string;
|
|
5978
5673
|
devServerHostUrl: string;
|
|
5979
|
-
|
|
5674
|
+
ssrAppFilePath: string;
|
|
5980
5675
|
isDebug: boolean;
|
|
5981
5676
|
prerenderConfigPath: string;
|
|
5982
5677
|
staticSite: boolean;
|
|
@@ -5984,27 +5679,6 @@ interface PrerenderUrlRequest {
|
|
|
5984
5679
|
url: string;
|
|
5985
5680
|
writeToFilePath: string;
|
|
5986
5681
|
}
|
|
5987
|
-
interface PrerenderManager {
|
|
5988
|
-
config: Config;
|
|
5989
|
-
prerenderUrlWorker: (prerenderRequest: PrerenderUrlRequest) => Promise<PrerenderUrlResults>;
|
|
5990
|
-
devServerHostUrl: string;
|
|
5991
|
-
diagnostics: Diagnostic$1[];
|
|
5992
|
-
hydrateAppFilePath: string;
|
|
5993
|
-
isDebug: boolean;
|
|
5994
|
-
logCount: number;
|
|
5995
|
-
outputTarget: OutputTargetWww;
|
|
5996
|
-
prerenderConfig: PrerenderConfig;
|
|
5997
|
-
prerenderConfigPath: string;
|
|
5998
|
-
progressLogger?: LoggerLineUpdater;
|
|
5999
|
-
resolve: Function;
|
|
6000
|
-
staticSite: boolean;
|
|
6001
|
-
templateId: string;
|
|
6002
|
-
componentGraphPath: string;
|
|
6003
|
-
urlsProcessing: Set<string>;
|
|
6004
|
-
urlsPending: Set<string>;
|
|
6005
|
-
urlsCompleted: Set<string>;
|
|
6006
|
-
maxConcurrency: number;
|
|
6007
|
-
}
|
|
6008
5682
|
/**
|
|
6009
5683
|
* Generic node that represents all of the
|
|
6010
5684
|
* different types of nodes we'd see when rendering
|
|
@@ -6042,6 +5716,11 @@ interface RenderNode extends HostElement {
|
|
|
6042
5716
|
* Slot name of either the slot itself or the slotted node
|
|
6043
5717
|
*/
|
|
6044
5718
|
['s-sn']?: string;
|
|
5719
|
+
/**
|
|
5720
|
+
* `slot` attribute of a `<slot>` reference rendered as a text node (no fallback content),
|
|
5721
|
+
* since text nodes can't carry real DOM attributes.
|
|
5722
|
+
*/
|
|
5723
|
+
['s-sa']?: string;
|
|
6045
5724
|
/**
|
|
6046
5725
|
* Host element tag name:
|
|
6047
5726
|
* The tag name of the host element that this
|
|
@@ -6094,64 +5773,64 @@ interface RenderNode extends HostElement {
|
|
|
6094
5773
|
* Used to know the components encapsulation.
|
|
6095
5774
|
* empty "" for shadow, "c" from scoped
|
|
6096
5775
|
*/
|
|
6097
|
-
['s-en']?: '' | /*shadow*/'c';
|
|
5776
|
+
['s-en']?: '' | /*shadow*/ 'c';
|
|
6098
5777
|
/**
|
|
6099
5778
|
* On a `scoped: true` component
|
|
6100
|
-
* with `
|
|
5779
|
+
* with `lightDomPatches` flag enabled,
|
|
6101
5780
|
* returns the internal `childNodes` of the component
|
|
6102
5781
|
*/
|
|
6103
5782
|
readonly __childNodes?: NodeListOf<ChildNode>;
|
|
6104
5783
|
/**
|
|
6105
5784
|
* On a `scoped: true` component
|
|
6106
|
-
* with `
|
|
5785
|
+
* with `lightDomPatches` flag enabled,
|
|
6107
5786
|
* returns the internal `children` of the component
|
|
6108
5787
|
*/
|
|
6109
5788
|
readonly __children?: HTMLCollectionOf<Element>;
|
|
6110
5789
|
/**
|
|
6111
5790
|
* On a `scoped: true` component
|
|
6112
|
-
* with `
|
|
5791
|
+
* with `lightDomPatches` flag enabled,
|
|
6113
5792
|
* returns the internal `firstChild` of the component
|
|
6114
5793
|
*/
|
|
6115
5794
|
readonly __firstChild?: ChildNode;
|
|
6116
5795
|
/**
|
|
6117
5796
|
* On a `scoped: true` component
|
|
6118
|
-
* with `
|
|
5797
|
+
* with `lightDomPatches` flag enabled,
|
|
6119
5798
|
* returns the internal `lastChild` of the component
|
|
6120
5799
|
*/
|
|
6121
5800
|
readonly __lastChild?: ChildNode;
|
|
6122
5801
|
/**
|
|
6123
5802
|
* On a `scoped: true` component
|
|
6124
|
-
* with `
|
|
5803
|
+
* with `lightDomPatches` flag enabled,
|
|
6125
5804
|
* returns the internal `textContent` of the component
|
|
6126
5805
|
*/
|
|
6127
5806
|
__textContent?: string;
|
|
6128
5807
|
/**
|
|
6129
5808
|
* On a `scoped: true` component
|
|
6130
|
-
* with `
|
|
5809
|
+
* with `lightDomPatches` flag enabled,
|
|
6131
5810
|
* gives access to the original `append` method
|
|
6132
5811
|
*/
|
|
6133
5812
|
__append?: (...nodes: (Node | string)[]) => void;
|
|
6134
5813
|
/**
|
|
6135
5814
|
* On a `scoped: true` component
|
|
6136
|
-
* with `
|
|
5815
|
+
* with `lightDomPatches` flag enabled,
|
|
6137
5816
|
* gives access to the original `prepend` method
|
|
6138
5817
|
*/
|
|
6139
5818
|
__prepend?: (...nodes: (Node | string)[]) => void;
|
|
6140
5819
|
/**
|
|
6141
5820
|
* On a `scoped: true` component
|
|
6142
|
-
* with `
|
|
5821
|
+
* with `lightDomPatches` flag enabled,
|
|
6143
5822
|
* gives access to the original `appendChild` method
|
|
6144
5823
|
*/
|
|
6145
5824
|
__appendChild?: <T extends Node>(newChild: T) => T;
|
|
6146
5825
|
/**
|
|
6147
5826
|
* On a `scoped: true` component
|
|
6148
|
-
* with `
|
|
5827
|
+
* with `lightDomPatches` flag enabled,
|
|
6149
5828
|
* gives access to the original `insertBefore` method
|
|
6150
5829
|
*/
|
|
6151
5830
|
__insertBefore?: <T extends Node>(node: T, child: Node | null) => T;
|
|
6152
5831
|
/**
|
|
6153
5832
|
* On a `scoped: true` component
|
|
6154
|
-
* with `
|
|
5833
|
+
* with `lightDomPatches` flag enabled,
|
|
6155
5834
|
* gives access to the original `removeChild` method
|
|
6156
5835
|
*/
|
|
6157
5836
|
__removeChild?: <T extends Node>(child: T) => T;
|
|
@@ -6189,40 +5868,58 @@ interface PatchedSlotNode extends Node {
|
|
|
6189
5868
|
['s-sr']?: boolean;
|
|
6190
5869
|
/**
|
|
6191
5870
|
* On a `scoped: true` component
|
|
6192
|
-
* with `
|
|
5871
|
+
* with `lightDomPatches` flag enabled,
|
|
6193
5872
|
* returns the actual `parentNode` of the component
|
|
6194
5873
|
*/
|
|
6195
5874
|
__parentNode?: RenderNode;
|
|
6196
5875
|
/**
|
|
6197
5876
|
* On a `scoped: true` component
|
|
6198
|
-
* with `
|
|
5877
|
+
* with `lightDomPatches` flag enabled,
|
|
6199
5878
|
* returns the actual `nextSibling` of the component
|
|
6200
5879
|
*/
|
|
6201
5880
|
__nextSibling?: RenderNode;
|
|
6202
5881
|
/**
|
|
6203
5882
|
* On a `scoped: true` component
|
|
6204
|
-
* with `
|
|
5883
|
+
* with `lightDomPatches` flag enabled,
|
|
6205
5884
|
* returns the actual `previousSibling` of the component
|
|
6206
5885
|
*/
|
|
6207
5886
|
__previousSibling?: RenderNode;
|
|
6208
5887
|
/**
|
|
6209
5888
|
* On a `scoped: true` component
|
|
6210
|
-
* with `
|
|
5889
|
+
* with `lightDomPatches` flag enabled,
|
|
6211
5890
|
* returns the actual `nextElementSibling` of the component
|
|
6212
5891
|
*/
|
|
6213
5892
|
__nextElementSibling?: RenderNode;
|
|
6214
5893
|
/**
|
|
6215
5894
|
* On a `scoped: true` component
|
|
6216
|
-
* with `
|
|
5895
|
+
* with `lightDomPatches` flag enabled,
|
|
6217
5896
|
* returns the actual `nextElementSibling` of the component
|
|
6218
5897
|
*/
|
|
6219
5898
|
__previousElementSibling?: RenderNode;
|
|
6220
5899
|
}
|
|
6221
5900
|
type LazyBundlesRuntimeData = LazyBundleRuntimeData[];
|
|
6222
|
-
type LazyBundleRuntimeData = [
|
|
6223
|
-
|
|
5901
|
+
type LazyBundleRuntimeData = [
|
|
5902
|
+
/** bundleIds */
|
|
5903
|
+
string, ComponentRuntimeMetaCompact[]];
|
|
5904
|
+
type ComponentRuntimeMetaCompact = [
|
|
5905
|
+
/** flags */
|
|
5906
|
+
number,
|
|
5907
|
+
/** tagname */
|
|
5908
|
+
string,
|
|
5909
|
+
/** members */
|
|
5910
|
+
{
|
|
6224
5911
|
[memberName: string]: ComponentRuntimeMember;
|
|
6225
|
-
}?,
|
|
5912
|
+
}?,
|
|
5913
|
+
/** listeners */
|
|
5914
|
+
ComponentRuntimeHostListener[]?,
|
|
5915
|
+
/** watchers */
|
|
5916
|
+
ComponentConstructorChangeHandlers?,
|
|
5917
|
+
/** serializers */
|
|
5918
|
+
ComponentConstructorChangeHandlers?,
|
|
5919
|
+
/** deserializers */
|
|
5920
|
+
ComponentConstructorChangeHandlers?,
|
|
5921
|
+
/** shadow root reference target */
|
|
5922
|
+
string?];
|
|
6226
5923
|
/**
|
|
6227
5924
|
* Runtime metadata for a Stencil component
|
|
6228
5925
|
*/
|
|
@@ -6269,6 +5966,10 @@ interface ComponentRuntimeMeta {
|
|
|
6269
5966
|
* Information about which class members have attribute > prop deserializers attached on the component.
|
|
6270
5967
|
*/
|
|
6271
5968
|
$deserializers$?: ComponentConstructorChangeHandlers;
|
|
5969
|
+
/**
|
|
5970
|
+
* `id` of the element within the shadow root that IDREFs targeting the host resolve to.
|
|
5971
|
+
*/
|
|
5972
|
+
$referenceTarget$?: string;
|
|
6272
5973
|
}
|
|
6273
5974
|
/**
|
|
6274
5975
|
* A mapping of the names of members on the component to some runtime-specific
|
|
@@ -6314,7 +6015,7 @@ type ComponentRuntimeReflectingAttr = [string, string | undefined];
|
|
|
6314
6015
|
* associated {@link HostRef} instance.
|
|
6315
6016
|
*/
|
|
6316
6017
|
type RuntimeRef = HostElement | {
|
|
6317
|
-
|
|
6018
|
+
__s_ghr?: () => HostRef;
|
|
6318
6019
|
};
|
|
6319
6020
|
/**
|
|
6320
6021
|
* Interface used to track an Element, it's virtual Node (`VNode`), and other data
|
|
@@ -6325,6 +6026,14 @@ interface HostRef {
|
|
|
6325
6026
|
$cmpMeta$: ComponentRuntimeMeta;
|
|
6326
6027
|
$hostElement$: HostElement;
|
|
6327
6028
|
$instanceValues$?: Map<string, any>;
|
|
6029
|
+
/**
|
|
6030
|
+
* Prop/state changes accumulated since the last render, flushed to
|
|
6031
|
+
* `componentShouldUpdate` once per render cycle.
|
|
6032
|
+
*/
|
|
6033
|
+
$queuedPropChanges$?: ComponentShouldUpdateChanges;
|
|
6034
|
+
$signalValues$?: Map<string, import('@preact/signals-core').Signal<any>>;
|
|
6035
|
+
/** Dispose function that tears down all signal effects for this component. */
|
|
6036
|
+
$signalCleanup$?: () => void;
|
|
6328
6037
|
$serializerValues$?: Map<string, string>;
|
|
6329
6038
|
$lazyInstance$?: ComponentInterface;
|
|
6330
6039
|
/**
|
|
@@ -6357,6 +6066,21 @@ interface HostRef {
|
|
|
6357
6066
|
* It is called after {@link HostRef.$onInstancePromise$} resolves.
|
|
6358
6067
|
*/
|
|
6359
6068
|
$onRenderResolve$?: () => void;
|
|
6069
|
+
/**
|
|
6070
|
+
* A promise that resolves once this component's real `connectedCallback` has fired
|
|
6071
|
+
* for the first time. Created lazily - either by a descendant that needs to wait for
|
|
6072
|
+
* this component's connection before firing its own real `connectedCallback`
|
|
6073
|
+
* ({@link HOST_FLAGS.hasFiredConnected}), or by this component registering itself
|
|
6074
|
+
* with its nearest Stencil ancestor's `s-pc` list. This is what lets a component's
|
|
6075
|
+
* real `connectedCallback` (and, transitively, a pending ancestor's initial
|
|
6076
|
+
* `componentWillLoad`) stay ordered correctly regardless of which of an
|
|
6077
|
+
* ancestor/descendant pair's lazy module happens to resolve first.
|
|
6078
|
+
*/
|
|
6079
|
+
$onFirstConnectPromise$?: Promise<void>;
|
|
6080
|
+
/**
|
|
6081
|
+
* A callback which resolves {@link HostRef.$onFirstConnectPromise$}
|
|
6082
|
+
*/
|
|
6083
|
+
$onFirstConnectResolve$?: () => void;
|
|
6360
6084
|
$vnode$?: VNode;
|
|
6361
6085
|
$queuedListeners$?: [string, any][];
|
|
6362
6086
|
$rmListeners$?: (() => void)[];
|
|
@@ -6366,51 +6090,12 @@ interface HostRef {
|
|
|
6366
6090
|
* Defer connectedCallback until after first render for components with slot relocation.
|
|
6367
6091
|
*/
|
|
6368
6092
|
$deferredConnectedCallback$?: boolean;
|
|
6369
|
-
}
|
|
6370
|
-
interface PlatformRuntime {
|
|
6371
|
-
/**
|
|
6372
|
-
* This number is used to hold a series of bitflags for various features we
|
|
6373
|
-
* support within the runtime. The flags which this value is intended to store are
|
|
6374
|
-
* documented in the {@link PLATFORM_FLAGS} enum.
|
|
6375
|
-
*/
|
|
6376
|
-
$flags$: number;
|
|
6377
|
-
/**
|
|
6378
|
-
* Holds a map of nodes to be hydrated.
|
|
6379
|
-
*/
|
|
6380
|
-
$orgLocNodes$?: Map<string, RenderNode>;
|
|
6381
|
-
/**
|
|
6382
|
-
* Holds the resource url for given platform environment.
|
|
6383
|
-
*/
|
|
6384
|
-
$resourcesUrl$: string;
|
|
6385
|
-
/**
|
|
6386
|
-
* The nonce value to be applied to all script/style tags at runtime.
|
|
6387
|
-
* If `null`, the nonce attribute will not be applied.
|
|
6388
|
-
*/
|
|
6389
|
-
$nonce$?: string | null;
|
|
6390
|
-
/**
|
|
6391
|
-
* A utility function that executes a given function and returns the result.
|
|
6392
|
-
* @param c The callback function to execute
|
|
6393
|
-
*/
|
|
6394
|
-
jmp: (c: Function) => any;
|
|
6395
|
-
/**
|
|
6396
|
-
* A wrapper for {@link https://developer.mozilla.org/en-US/docs/Web/API/Window/requestAnimationFrame `requestAnimationFrame`}
|
|
6397
|
-
*/
|
|
6398
|
-
raf: (c: FrameRequestCallback) => number;
|
|
6399
|
-
/**
|
|
6400
|
-
* A wrapper for {@link https://developer.mozilla.org/en-US/docs/Web/API/EventTarget/addEventListener `addEventListener`}
|
|
6401
|
-
*/
|
|
6402
|
-
ael: (el: EventTarget, eventName: string, listener: EventListenerOrEventListenerObject, options: boolean | AddEventListenerOptions) => void;
|
|
6403
|
-
/**
|
|
6404
|
-
* A wrapper for {@link https://developer.mozilla.org/en-US/docs/Web/API/EventTarget/removeEventListener `removeEventListener`}
|
|
6405
|
-
*/
|
|
6406
|
-
rel: (el: EventTarget, eventName: string, listener: EventListenerOrEventListenerObject, options: boolean | AddEventListenerOptions) => void;
|
|
6407
6093
|
/**
|
|
6408
|
-
*
|
|
6094
|
+
* The number of times this host's lazy component load has failed and been retried.
|
|
6095
|
+
* Used to give up retrying after {@link MAX_LAZY_LOAD_RETRIES} failed attempts.
|
|
6409
6096
|
*/
|
|
6410
|
-
|
|
6097
|
+
$loadRetryCount$?: number;
|
|
6411
6098
|
}
|
|
6412
|
-
type StyleMap = Map<string, CSSStyleSheet | string>;
|
|
6413
|
-
type RootAppliedStyleMap = WeakMap<Element, Set<string>>;
|
|
6414
6099
|
interface StyleCompiler {
|
|
6415
6100
|
modeName: string;
|
|
6416
6101
|
styleId: string;
|
|
@@ -6423,28 +6108,11 @@ interface ExternalStyleCompiler {
|
|
|
6423
6108
|
relativePath: string;
|
|
6424
6109
|
originalComponentPath: string;
|
|
6425
6110
|
}
|
|
6426
|
-
interface
|
|
6427
|
-
|
|
6428
|
-
|
|
6429
|
-
|
|
6430
|
-
|
|
6431
|
-
updatedImport?: string;
|
|
6432
|
-
url: string;
|
|
6433
|
-
filePath: string;
|
|
6434
|
-
altFilePath?: string;
|
|
6435
|
-
styleText?: string | null;
|
|
6436
|
-
modifiers?: string;
|
|
6437
|
-
}
|
|
6438
|
-
interface CssToEsmImportData {
|
|
6439
|
-
srcImportText: string;
|
|
6440
|
-
varName: string;
|
|
6441
|
-
url: string;
|
|
6442
|
-
filePath: string;
|
|
6443
|
-
/**
|
|
6444
|
-
* True if this is a node module import (e.g. using ~ prefix like ~foo/style.css)
|
|
6445
|
-
* These should be treated as bare module specifiers and not have ./ prepended
|
|
6446
|
-
*/
|
|
6447
|
-
isNodeModule?: boolean;
|
|
6111
|
+
interface ComponentGlobalStyle {
|
|
6112
|
+
/** Absolute path to the CSS file, or null for inline styles */
|
|
6113
|
+
absolutePath: string | null;
|
|
6114
|
+
/** Raw inline CSS string, or null for file-based styles */
|
|
6115
|
+
styleStr: string | null;
|
|
6448
6116
|
}
|
|
6449
6117
|
/**
|
|
6450
6118
|
* Input CSS to be transformed into ESM
|
|
@@ -6491,10 +6159,17 @@ interface TransformCssToEsmOutput {
|
|
|
6491
6159
|
varName: string;
|
|
6492
6160
|
importPath: string;
|
|
6493
6161
|
}[];
|
|
6162
|
+
/**
|
|
6163
|
+
* Whether `output` itself has an observable side effect (a plain, untagged CSS file's
|
|
6164
|
+
* generated module self-injects CSSStyleSheets; a Stencil component's tagged `styleUrl`
|
|
6165
|
+
* output doesn't)
|
|
6166
|
+
*/
|
|
6167
|
+
moduleSideEffects?: boolean;
|
|
6494
6168
|
}
|
|
6495
6169
|
interface PackageJsonData {
|
|
6496
6170
|
name?: string;
|
|
6497
6171
|
version?: string;
|
|
6172
|
+
type?: 'module' | 'commonjs';
|
|
6498
6173
|
main?: string;
|
|
6499
6174
|
exports?: {
|
|
6500
6175
|
[key: string]: string | {
|
|
@@ -6508,7 +6183,6 @@ interface PackageJsonData {
|
|
|
6508
6183
|
browser?: string;
|
|
6509
6184
|
module?: string;
|
|
6510
6185
|
'jsnext:main'?: string;
|
|
6511
|
-
'collection:main'?: string;
|
|
6512
6186
|
unpkg?: string;
|
|
6513
6187
|
collection?: string;
|
|
6514
6188
|
types?: string;
|
|
@@ -6533,219 +6207,6 @@ interface PackageJsonData {
|
|
|
6533
6207
|
license?: string;
|
|
6534
6208
|
keywords?: string[];
|
|
6535
6209
|
}
|
|
6536
|
-
interface Workbox {
|
|
6537
|
-
generateSW(swConfig: any): Promise<any>;
|
|
6538
|
-
generateFileManifest(): Promise<any>;
|
|
6539
|
-
getFileManifestEntries(): Promise<any>;
|
|
6540
|
-
injectManifest(swConfig: any): Promise<any>;
|
|
6541
|
-
copyWorkboxLibraries(wwwDir: string): Promise<any>;
|
|
6542
|
-
}
|
|
6543
|
-
interface SerializedEvent {
|
|
6544
|
-
bubbles: boolean;
|
|
6545
|
-
cancelBubble: boolean;
|
|
6546
|
-
cancelable: boolean;
|
|
6547
|
-
composed: boolean;
|
|
6548
|
-
currentTarget: any;
|
|
6549
|
-
defaultPrevented: boolean;
|
|
6550
|
-
detail: any;
|
|
6551
|
-
eventPhase: any;
|
|
6552
|
-
isTrusted: boolean;
|
|
6553
|
-
returnValue: any;
|
|
6554
|
-
srcElement: any;
|
|
6555
|
-
target: any;
|
|
6556
|
-
timeStamp: number;
|
|
6557
|
-
type: string;
|
|
6558
|
-
isSerializedEvent: boolean;
|
|
6559
|
-
}
|
|
6560
|
-
interface EventInitDict {
|
|
6561
|
-
bubbles?: boolean;
|
|
6562
|
-
cancelable?: boolean;
|
|
6563
|
-
composed?: boolean;
|
|
6564
|
-
detail?: any;
|
|
6565
|
-
}
|
|
6566
|
-
interface AnyHTMLElement extends HTMLElement {
|
|
6567
|
-
[key: string]: any;
|
|
6568
|
-
}
|
|
6569
|
-
interface SpecPage {
|
|
6570
|
-
/**
|
|
6571
|
-
* Mocked testing `document.body`.
|
|
6572
|
-
*/
|
|
6573
|
-
body: HTMLBodyElement;
|
|
6574
|
-
/**
|
|
6575
|
-
* Mocked testing `document`.
|
|
6576
|
-
*/
|
|
6577
|
-
doc: HTMLDocument;
|
|
6578
|
-
/**
|
|
6579
|
-
* The first component found within the mocked `document.body`. If a component isn't found, then it'll return `document.body.firstElementChild`.
|
|
6580
|
-
*/
|
|
6581
|
-
root?: AnyHTMLElement;
|
|
6582
|
-
/**
|
|
6583
|
-
* Similar to `root`, except returns the component instance. If a root component was not found it'll return `null`.
|
|
6584
|
-
*/
|
|
6585
|
-
rootInstance?: any;
|
|
6586
|
-
/**
|
|
6587
|
-
* Convenience function to set `document.body.innerHTML` and `waitForChanges()`. Function argument should be a HTML string.
|
|
6588
|
-
*/
|
|
6589
|
-
setContent: (html: string) => Promise<any>;
|
|
6590
|
-
/**
|
|
6591
|
-
* After changes have been made to a component, such as a update to a property or attribute, the test page does not automatically apply the changes. In order to wait for, and apply the update, call `await page.waitForChanges()`.
|
|
6592
|
-
*/
|
|
6593
|
-
waitForChanges: () => Promise<any>;
|
|
6594
|
-
/**
|
|
6595
|
-
* Mocked testing `window`.
|
|
6596
|
-
*/
|
|
6597
|
-
win: Window;
|
|
6598
|
-
build: BuildConditionals;
|
|
6599
|
-
flushLoadModule: (bundleId?: string) => Promise<any>;
|
|
6600
|
-
flushQueue: () => Promise<any>;
|
|
6601
|
-
styles: Map<string, string>;
|
|
6602
|
-
}
|
|
6603
|
-
/**
|
|
6604
|
-
* Options pertaining to the creation and functionality of a {@link SpecPage}
|
|
6605
|
-
*/
|
|
6606
|
-
interface NewSpecPageOptions {
|
|
6607
|
-
/**
|
|
6608
|
-
* An array of components to test. Component classes can be imported into the spec file, then their reference should be added to the `component` array in order to be used throughout the test.
|
|
6609
|
-
*/
|
|
6610
|
-
components: any[];
|
|
6611
|
-
/**
|
|
6612
|
-
* Sets the mocked `document.cookie`.
|
|
6613
|
-
*/
|
|
6614
|
-
cookie?: string;
|
|
6615
|
-
/**
|
|
6616
|
-
* Sets the mocked `dir` attribute on `<html>`.
|
|
6617
|
-
*/
|
|
6618
|
-
direction?: string;
|
|
6619
|
-
/**
|
|
6620
|
-
* If `false`, do not flush the render queue on initial test setup.
|
|
6621
|
-
*/
|
|
6622
|
-
flushQueue?: boolean;
|
|
6623
|
-
/**
|
|
6624
|
-
* The initial HTML used to generate the test. This can be useful to construct a collection of components working together, and assign HTML attributes. This value sets the mocked `document.body.innerHTML`.
|
|
6625
|
-
*/
|
|
6626
|
-
html?: string;
|
|
6627
|
-
/**
|
|
6628
|
-
* The initial JSX used to generate the test.
|
|
6629
|
-
* Use `template` when you want to initialize a component using their properties, instead of their HTML attributes.
|
|
6630
|
-
* It will render the specified template (JSX) into `document.body`.
|
|
6631
|
-
*/
|
|
6632
|
-
template?: () => any;
|
|
6633
|
-
/**
|
|
6634
|
-
* Sets the mocked `lang` attribute on `<html>`.
|
|
6635
|
-
*/
|
|
6636
|
-
language?: string;
|
|
6637
|
-
/**
|
|
6638
|
-
* Useful for debugging hydrating components client-side. Sets that the `html` option already includes annotated prerender attributes and comments.
|
|
6639
|
-
*/
|
|
6640
|
-
hydrateClientSide?: boolean;
|
|
6641
|
-
/**
|
|
6642
|
-
* Useful for debugging hydrating components server-side. The output HTML will also include prerender annotations.
|
|
6643
|
-
*/
|
|
6644
|
-
hydrateServerSide?: boolean;
|
|
6645
|
-
/**
|
|
6646
|
-
* Sets the mocked `document.referrer`.
|
|
6647
|
-
*/
|
|
6648
|
-
referrer?: string;
|
|
6649
|
-
/**
|
|
6650
|
-
* Manually set if the mocked document supports Shadow DOM or not. Default is `true`.
|
|
6651
|
-
*/
|
|
6652
|
-
supportsShadowDom?: boolean;
|
|
6653
|
-
/**
|
|
6654
|
-
* When a component is pre-rendered it includes HTML annotations, such as `s-id` attributes and `<!-t.0->` comments. This information is used by client-side hydrating. Default is `false`.
|
|
6655
|
-
*/
|
|
6656
|
-
includeAnnotations?: boolean;
|
|
6657
|
-
/**
|
|
6658
|
-
* Sets the mocked browser's `location.href`.
|
|
6659
|
-
*/
|
|
6660
|
-
url?: string;
|
|
6661
|
-
/**
|
|
6662
|
-
* Sets the mocked browser's `navigator.userAgent`.
|
|
6663
|
-
*/
|
|
6664
|
-
userAgent?: string;
|
|
6665
|
-
/**
|
|
6666
|
-
* By default, any changes to component properties and attributes must `page.waitForChanges()` in order to test the updates. As an option, `autoApplyChanges` continuously flushes the queue on the background. Default is `false`.
|
|
6667
|
-
*/
|
|
6668
|
-
autoApplyChanges?: boolean;
|
|
6669
|
-
/**
|
|
6670
|
-
* By default, styles are not attached to the DOM and they are not reflected in the serialized HTML.
|
|
6671
|
-
* Setting this option to `true` will include the component's styles in the serializable output.
|
|
6672
|
-
*/
|
|
6673
|
-
attachStyles?: boolean;
|
|
6674
|
-
/**
|
|
6675
|
-
* Set {@link BuildConditionals} for testing based off the metadata of the component under test.
|
|
6676
|
-
* When `true` all `BuildConditionals` will be assigned to the global testing `BUILD` object, regardless of their
|
|
6677
|
-
* value. When `false`, only `BuildConditionals` with a value of `true` will be assigned to the `BUILD` object.
|
|
6678
|
-
*/
|
|
6679
|
-
strictBuild?: boolean;
|
|
6680
|
-
/**
|
|
6681
|
-
* Default values to be set on the platform runtime object {@see PlatformRuntime} when creating
|
|
6682
|
-
* the spec page.
|
|
6683
|
-
*/
|
|
6684
|
-
platform?: Partial<PlatformRuntime>;
|
|
6685
|
-
}
|
|
6686
|
-
/**
|
|
6687
|
-
* A record of `TypesMemberNameData` entities.
|
|
6688
|
-
*
|
|
6689
|
-
* Each key in this record is intended to be the path to a file that declares one or more types used by a component.
|
|
6690
|
-
* However, this is not enforced by the type system - users of this interface should not make any assumptions regarding
|
|
6691
|
-
* the format of the path used as a key (relative vs. absolute)
|
|
6692
|
-
*/
|
|
6693
|
-
interface TypesImportData {
|
|
6694
|
-
[key: string]: TypesMemberNameData[];
|
|
6695
|
-
}
|
|
6696
|
-
/**
|
|
6697
|
-
* A type describing how Stencil may alias an imported type to avoid naming collisions when performing operations such
|
|
6698
|
-
* as generating `components.d.ts` files.
|
|
6699
|
-
*/
|
|
6700
|
-
interface TypesMemberNameData {
|
|
6701
|
-
/**
|
|
6702
|
-
* The original name of the import before any aliasing was applied.
|
|
6703
|
-
*
|
|
6704
|
-
* i.e. if a component imports a type as follows:
|
|
6705
|
-
* `import { MyType as MyCoolType } from './my-type';`
|
|
6706
|
-
*
|
|
6707
|
-
* the `originalName` would be 'MyType'. If the import is not aliased, then `originalName` and `localName` will be the same.
|
|
6708
|
-
*/
|
|
6709
|
-
originalName: string;
|
|
6710
|
-
/**
|
|
6711
|
-
* The name of the type as it's used within a file.
|
|
6712
|
-
*/
|
|
6713
|
-
localName: string;
|
|
6714
|
-
/**
|
|
6715
|
-
* An alias that Stencil may apply to the `localName` to avoid naming collisions. This name does not appear in the
|
|
6716
|
-
* file that is using `localName`.
|
|
6717
|
-
*/
|
|
6718
|
-
importName?: string;
|
|
6719
|
-
/**
|
|
6720
|
-
* Whether this is a default import/export (e.g., `import MyEnum from './my-enum'`)
|
|
6721
|
-
* vs a named import/export (e.g., `import { MyType } from './my-type'`)
|
|
6722
|
-
*/
|
|
6723
|
-
isDefault?: boolean;
|
|
6724
|
-
}
|
|
6725
|
-
interface TypesModule {
|
|
6726
|
-
isDep: boolean;
|
|
6727
|
-
tagName: string;
|
|
6728
|
-
tagNameAsPascal: string;
|
|
6729
|
-
htmlElementName: string;
|
|
6730
|
-
component: string;
|
|
6731
|
-
jsx: string;
|
|
6732
|
-
element: string;
|
|
6733
|
-
explicitAttributes: string | null;
|
|
6734
|
-
explicitProperties: string | null;
|
|
6735
|
-
requiredProps: Array<{
|
|
6736
|
-
name: string;
|
|
6737
|
-
type: string;
|
|
6738
|
-
complexType?: ComponentCompilerProperty['complexType'];
|
|
6739
|
-
}> | null;
|
|
6740
|
-
}
|
|
6741
|
-
type TypeInfo = {
|
|
6742
|
-
name: string;
|
|
6743
|
-
type: string;
|
|
6744
|
-
optional: boolean;
|
|
6745
|
-
required: boolean;
|
|
6746
|
-
internal: boolean;
|
|
6747
|
-
jsdoc?: string;
|
|
6748
|
-
}[];
|
|
6749
6210
|
type ChildType = VNode | number | string;
|
|
6750
6211
|
type PropsType = VNodeProdData | number | string | null;
|
|
6751
6212
|
interface VNodeProdData {
|
|
@@ -6768,7 +6229,7 @@ interface VNodeProdData {
|
|
|
6768
6229
|
*/
|
|
6769
6230
|
interface CompilerWorkerContext {
|
|
6770
6231
|
optimizeCss(inputOpts: OptimizeCssInput): Promise<OptimizeCssOutput>;
|
|
6771
|
-
prepareModule(input: string, minifyOpts: any
|
|
6232
|
+
prepareModule(input: string, minifyOpts: any): Promise<{
|
|
6772
6233
|
output: string;
|
|
6773
6234
|
diagnostics: Diagnostic$1[];
|
|
6774
6235
|
sourceMap?: SourceMap$1;
|
|
@@ -6799,33 +6260,6 @@ type MsgToWorker<T extends WorkerContextMethod> = IPCSerializable<{
|
|
|
6799
6260
|
method: T;
|
|
6800
6261
|
args: Parameters<CompilerWorkerContext[T]>;
|
|
6801
6262
|
}>;
|
|
6802
|
-
/**
|
|
6803
|
-
* A manifest for a job that a worker thread should carry out, as determined by
|
|
6804
|
-
* and dispatched from the main thread. This includes the name of the task to do
|
|
6805
|
-
* and any arguments necessary to carry it out properly.
|
|
6806
|
-
*
|
|
6807
|
-
* This message must satisfy {@link CPSerializable} so it can be sent from the
|
|
6808
|
-
* main thread to a worker thread via an IPC channel
|
|
6809
|
-
*/
|
|
6810
|
-
type MsgFromWorker<T extends WorkerContextMethod> = IPCSerializable<{
|
|
6811
|
-
stencilId?: number;
|
|
6812
|
-
stencilRtnValue: ReturnType<CompilerWorkerContext[T]>;
|
|
6813
|
-
stencilRtnError: string | null;
|
|
6814
|
-
}>;
|
|
6815
|
-
/**
|
|
6816
|
-
* A description of a task which should be passed to a worker in another
|
|
6817
|
-
* thread. This interface differs from {@link MsgToWorker} in that it doesn't
|
|
6818
|
-
* have to be serializable for transmission through an IPC channel, so we can
|
|
6819
|
-
* hold things like a `resolve` and `reject` callback to use when the task
|
|
6820
|
-
* completes.
|
|
6821
|
-
*/
|
|
6822
|
-
interface CompilerWorkerTask {
|
|
6823
|
-
stencilId: number;
|
|
6824
|
-
inputArgs: any[];
|
|
6825
|
-
resolve: (val: any) => any;
|
|
6826
|
-
reject: (msg: string) => any;
|
|
6827
|
-
retries: number;
|
|
6828
|
-
}
|
|
6829
6263
|
/**
|
|
6830
6264
|
* A handler for IPC messages from the main thread to a worker thread. This
|
|
6831
6265
|
* involves dispatching an action specified by a {@link MsgToWorker} object to a
|
|
@@ -6835,17 +6269,5 @@ interface CompilerWorkerTask {
|
|
|
6835
6269
|
* @returns the return value of the specified function
|
|
6836
6270
|
*/
|
|
6837
6271
|
type WorkerMsgHandler = <T extends WorkerContextMethod>(msgToWorker: MsgToWorker<T>) => ReturnType<CompilerWorkerContext[T]>;
|
|
6838
|
-
interface TranspileModuleResults {
|
|
6839
|
-
sourceFilePath: string;
|
|
6840
|
-
code: string;
|
|
6841
|
-
map: any;
|
|
6842
|
-
diagnostics: Diagnostic$1[];
|
|
6843
|
-
moduleFile: Module;
|
|
6844
|
-
}
|
|
6845
|
-
interface ValidateTypesResults {
|
|
6846
|
-
diagnostics: Diagnostic$1[];
|
|
6847
|
-
dirPaths: string[];
|
|
6848
|
-
filePaths: string[];
|
|
6849
|
-
}
|
|
6850
6272
|
//#endregion
|
|
6851
|
-
export { ComponentCompilerVirtualProperty as $, isTsxFile as $a, SitemapXmpResults as $i, CompilerEventBuildFinish as $n, hasError as $o, LazyRequire as $r, toDashCase as $s, PluginTransformationDescriptor as $t, CompilerStyleDoc as A, JsonDocsMethod as Aa, NonPrimitiveType as Ac, OutputTargetHydrate as Ai, VNodeProdData as An, isOutputTargetDistCollection as Ao, CopyResults as Ar, ScriptStringValue as As, HydrateScriptElement as At, ComponentCompilerMeta as B, StyleDoc as Ba, WATCH_FLAGS as Bc, PrerenderStartOptions as Bi, BuildOnEventRemove as Bn, isOutputTargetDocsReadme as Bo, EmulateConfig as Br, isBoolean as Bs, ModuleMap as Bt, CompilerBuildStatBundle as C, JsonDocMethodParameter as Ca, EVENT_FLAGS as Cc, OutputTargetDistLazyLoader as Ci, TransformCssToEsmOutput as Cn, getComponentsDtsSrcFilePath as Co, CompilerSystemRenameResults as Cr, ScriptPreloadScript as Cs, HostElement as Ct, CompilerJsDoc as D, JsonDocsDependencyGraph as Da, LISTENER_FLAGS as Dc, OutputTargetDocsJson as Di, TypesMemberNameData as Dn, isOutputTargetCopy as Do, Config as Dr, ScriptRegExpValue as Ds, HydrateElement as Dt, CompilerCtx as E, JsonDocsCustomState as Ea, HTML_NS as Ec, OutputTargetDocsCustomElementsManifest as Ei, TypesImportData as En, isEligiblePrimaryPackageOutputTarget as Eo, CompilerWatcher as Er, ScriptRegExpLocalValue as Es, HydrateComponent as Et, ComponentCompilerData as F, JsonDocsStyle as Fa, STATS as Fc, Path as Fi, AutoprefixerOptions as Fn, isOutputTargetDistTypes as Fo, DevServer as Fr, isGlob as Fs, JsDoc as Ft, ComponentCompilerPropertyType as G, createJsVarName as Ga, RobotsTxtResults as Gi, CacheStorage as Gn, isValidConfigOutputTarget as Go, HistoryApiFallback as Gr, isNumber as Gs, OptimizeJsResult as Gt, ComponentCompilerMethodComplexType as H, validateComponentTag as Ha, XLINK_NS as Hc, ResolveModuleIdResults as Hi, BuildOutput as Hn, isOutputTargetHydrate as Ho, FsStats as Hr, isDef as Hs, MsgToWorker as Ht, ComponentCompilerEvent as I, JsonDocsTag as Ia, SVG_NS as Ic, PlatformPath as Ii, BuildEmitEvents as In, isOutputTargetDocs as Io, DevServerConfig as Ir, dashToPascalCase as Is, LazyBundleRuntimeData as It, ComponentCompilerStaticEvent as J, hasDependency as Ja, RollupInterface as Ji, CompileTarget as Jn, TASK_CANCELED_MSG as Jo, HydrateDocumentOptions as Jr, mergeIntoWith as Js, PatchedSlotNode as Jt, ComponentCompilerReferencedType as K, generatePreamble as Ka, RollupConfig as Ki, CliInitOptions as Kn, relativeImport as Ko, HmrStyleUpdate as Kr, isObject as Ks, PackageJsonData as Kt, ComponentCompilerEventComplexType as L, JsonDocsTypeLibrary as La, TYPE_CONSTANT as Lc, PrerenderConfig as Li, BuildEvents as Ln, isOutputTargetDocsCustom as Lo, DevServerEditor as Lr, escapeWithPattern as Ls, LazyBundlesRuntimeData as Lt, CompilerWorkerTask as M, JsonDocsPart as Ma, PrimitiveType as Mc, OutputTargetWww as Mi, Workbox as Mn, isOutputTargetDistGlobalStyles as Mo, Credentials as Mr, ScriptUndefinedValue as Ms, HydrateStyleElement as Mt, ComponentCompilerChangeHandler as N, JsonDocsProp as Na, PrimitiveTypeValue as Nc, PageReloadStrategy as Ni, WorkerContextMethod as Nn, isOutputTargetDistLazy as No, CustomElementsExportBehavior as Nr, Serializeable as Ns, ImportData as Nt, CompilerJsDocTagInfo as O, JsonDocsEvent as Oa, MEMBER_FLAGS as Oc, OutputTargetDocsReadme as Oi, TypesModule as On, isOutputTargetCustom as Oo, ConfigBundle as Or, ScriptSetLocalValue as Os, HydrateImgElement as Ot, ComponentCompilerCustomState as P, JsonDocsSlot as Pa, SERIALIZED_PREFIX as Pc, ParsedPath as Pi, WorkerMsgHandler as Pn, isOutputTargetDistLazyLoader as Po, CustomElementsExportBehaviorOptions as Pr, isRootPath as Ps, JSDocTagInfo as Pt, ComponentCompilerTypeReferences as Q, isTsFile as Qa, SitemapXmpOpts as Qi, CompilerDependency as Qn, catchError as Qo, LOG_LEVELS as Qr, toCamelCase as Qs, PluginTransformResults as Qt, ComponentCompilerFeatures as R, JsonDocsUsage as Ra, VALID_CONFIG_OUTPUT_TARGETS as Rc, PrerenderHydrateOptions as Ri, BuildLog as Rn, isOutputTargetDocsCustomElementsManifest as Ro, Diagnostic$1 as Rr, flatOne as Rs, Module as Rt, CompilerAssetDir as S, VNode as Sa, DOCS_VSCODE as Sc, OutputTargetDistLazy as Si, TransformCssToEsmInput as Sn, filterExcludedComponents as So, CompilerSystemRemoveFileResults as Sr, ScriptObjectLocalValue as Ss, ExternalStyleCompiler as St, CompilerBuildStats as T, JsonDocsComponent as Ta, HOST_FLAGS as Tc, OutputTargetDocsCustom as Ti, TypeInfo as Tn, getComponentsFromModules as To, CompilerSystemWriteFileResults as Tr, ScriptRealm as Ts, HydrateAnchorElement as Tt, ComponentCompilerProperty as U, ParsePackageJsonResult as Ua, byteSize as Uc, ResolveModuleOptions as Ui, BuildResultsComponentGraph as Un, isOutputTargetStats as Uo, FsWatchResults as Ur, isFunction as Us, NewSpecPageOptions as Ut, ComponentCompilerMethod as V, FsWriteResults as Va, WWW as Vc, ResolveModuleIdOptions as Vi, BuildOnEvents as Vn, isOutputTargetDocsVscode as Vo, EmulateViewport as Vr, isComplexType as Vs, MsgFromWorker as Vt, ComponentCompilerPropertyComplexType as W, addDocBlock as Wa, RobotsTxtOpts as Wi, BundlingConfig as Wn, isOutputTargetWww as Wo, FsWatcherItem as Wr, isIterable as Ws, NodeMap as Wt, ComponentCompilerStaticProperty as X, isJsFile as Xa, SerializeDocumentOptions as Xi, CompilerBuildResults as Xn, buildJsonFileError as Xo, HydratedFlag as Xr, pluck as Xs, Plugin as Xt, ComponentCompilerStaticMethod as Y, isDtsFile as Ya, RollupOutputOptions as Yi, Compiler as Yn, buildError as Yo, HydrateFactoryOptions as Yr, noop as Ys, PlatformRuntime as Yt, ComponentCompilerTypeReference as Z, isJsxFile as Za, ServiceWorkerConfig as Zi, CompilerBuildStart as Zn, buildWarn as Zo, JestConfig as Zr, sortBy as Zs, PluginCtx as Zt, CollectionCompilerVersion as _, ErrorHandler as _a, DIST_TYPES as _c, OutputTargetCustom as _i, SourceTarget as _n, normalizeFsPathQuery as _o, CompilerSystemCreateDirectoryOptions as _r, ScriptLocalValue as _s, CssToEsmImportData as _t, BuildCtx as a, TestingConfig as aa, CMP_FLAGS as ac, LoggerTimeSpan as ai, RenderNode as an, getSourceMappingUrlForEndOfFile as ao, CompilerEventFileAdd as ar, augmentDiagnosticWithNode as as, ComponentConstructorProperties as at, CollectionDependencyManifest as b, ResolutionHandler as ba, DOCS_JSON as bc, OutputTargetDistCustomElements as bi, StyleCompiler as bn, resolve as bo, CompilerSystemRemoveDirectoryOptions as br, ScriptNullValue as bs, EntryModule as bt, BuildStyleUpdate as c, TransformerConfig as ca, CUSTOM as cc, OptimizeCssInput as ci, RollupResult as cn, deserializeProperty as co, CompilerEventFsChange as cr, createOnWarnFn as cs, ComponentNativeConstructor as ct, BundleModuleOutput as d, TranspileResults as da, DIST_COLLECTION as dc, OptimizeJsOutput as di, RollupSourceMap as dn, RemoteValue as do, CompilerFileWatcherCallback as dr, LocalValueParam as ds, ComponentRuntimeMembers as dt, StencilConfig as ea, toTitleCase as ec, LoadConfigInit as ei, PrerenderManager as en, parsePackageJson as eo, CompilerEventBuildLog as er, hasWarning as es, ComponentConstructor as et, Cache as f, UnvalidatedConfig as fa, DIST_CUSTOM_ELEMENTS as fc, OutputTarget as fi, RootAppliedStyleMap as fn, escapeRegExpSpecialCharacters as fo, CompilerFileWatcherEvent as fr, ScriptArrayLocalValue as fs, ComponentRuntimeMeta as ft, CollectionCompilerMeta as g, WorkerOptions as ga, DIST_LAZY_LOADER as gc, OutputTargetCopy as gi, SourceMap$1 as gn, normalizeFsPath as go, CompilerSystem as gr, ScriptListLocalValue as gs, CssImportData as gt, CollectionCompiler as h, WorkerMainController as ha, DIST_LAZY as hc, OutputTargetBuild as hi, SerializedEvent as hn, normalize as ho, CompilerRequestResponse as hr, ScriptDateLocalValue as hs, ComponentTestingConstructor as ht, BuildConditionals as i, Testing as ia, stringifyRuntimeData as ic, LoggerLineUpdater as ii, PropsType as in, getInlineSourceMappingUrlLinker as io, CompilerEventDirDelete as ir, splitLineBreaks as is, ComponentConstructorListener as it, CompilerWorkerContext as j, JsonDocsMethodReturn as ja, NonPrimitiveTypeValue as jc, OutputTargetStats as ji, ValidateTypesResults as jn, isOutputTargetDistCustomElements as jo, CopyTask as jr, ScriptSymbolValue as js, HydrateStaticData as jt, CompilerModeStyles as k, JsonDocsListener as ka, NODE_TYPES as kc, OutputTargetDocsVscode as ki, UpdatedLazyBuildCtx as kn, isOutputTargetDist as ko, ConfigExtras as kr, ScriptSpecialNumber as ks, HydrateResults as kt, BuildTask as l, TranspileOnlyResults as la, DEFAULT_STYLE_MODE as lc, OptimizeCssOutput as li, RollupResultModule as ln, serializeProperty as lo, CompilerEventName as lr, loadRollupDiagnostics as ls, ComponentRuntimeHostListener as lt, CollectionBundleManifest as m, WatcherCloseResults as ma, DIST_HYDRATE_SCRIPT as mc, OutputTargetBaseNext as mi, SerializeImportData as mn, join as mo, CompilerRequest as mr, ScriptBooleanValue as ms, ComponentRuntimeReflectingAttr as mt, AssetsMeta as n, StencilDocsConfig as na, formatComponentRuntimeMeta as nc, LogLevel as ni, PrerenderUrlResults as nn, readPackageJson as no, CompilerEventBuildStart as nr, escapeHtml as ns, ComponentConstructorEncapsulation as nt, BuildFeatures as o, TestingRunOptions as oa, COLLECTION_MANIFEST_FILE_NAME as oc, MakeDirectoryOptions as oi, RollupAssetResult as on, getSourceMappingUrlLinker as oo, CompilerEventFileDelete as or, loadTypeScriptDiagnostic as os, ComponentConstructorProperty as ot, ChildType as p, ValidatedConfig as pa, DIST_GLOBAL_STYLES as pc, OutputTargetBase as pi, RuntimeRef as pn, queryNonceMetaTagContent as po, CompilerFsStats as pr, ScriptBigIntValue as ps, ComponentRuntimeMetaCompact as pt, ComponentCompilerState as q, getTextDocs as qa, RollupInputOptions as qi, CompileScriptMinifyOptions as qn, shouldExcludeComponent as qo, HotModuleReplacement as qr, isString as qs, ParsedImport as qt, BuildComponent as r, SystemDetails as ra, formatLazyBundleRuntimeMeta as rc, Logger as ri, PrintLine as rn, isRemoteUrl as ro, CompilerEventDirAdd as rr, normalizeDiagnostics as rs, ComponentConstructorEvent as rt, BuildSourceGraph as s, TransformOptions as sa, COPY as sc, NodeResolveConfig as si, RollupChunkResult as sn, rollupToStencilSourceMap as so, CompilerEventFileUpdate as sr, loadTypeScriptDiagnostics as ss, ComponentConstructorPropertyType as st, AnyHTMLElement as t, StencilDevServerConfig as ta, unique as tc, LoadConfigResults as ti, PrerenderUrlRequest as tn, readOnlyArrayHasStringMember as to, CompilerEventBuildNoChange as tr, shouldIgnoreError as ts, ComponentConstructorChangeHandlers as tt, BundleModule as u, TranspileOptions as ua, DIST as uc, OptimizeJsInput as ui, RollupResults as un, result_d_exports as uo, CompilerFileWatcher as ur, LocalValue as us, ComponentRuntimeMember as ut, CollectionComponentEntryPath as v, FunctionalComponent as va, DOCS_CUSTOM as vc, OutputTargetDist as vi, SpecPage as vn, normalizePath as vo, CompilerSystemCreateDirectoryResults as vr, ScriptMapLocalValue as vs, DocData as vt, CompilerBuildStatCollection as w, JsonDocs as wa, GENERATED_DTS as wc, OutputTargetDistTypes as wi, TranspileModuleResults as wn, getComponentsDtsTypesFilePath as wo, CompilerSystemRenamedPath as wr, ScriptPrimitiveProtocolValue as ws, HostRef as wt, CollectionManifest as x, UserBuildConditionals as xa, DOCS_README as xc, OutputTargetDistGlobalStyles as xi, StyleMap as xn, FilterComponentsResult as xo, CompilerSystemRemoveDirectoryResults as xr, ScriptNumberValue as xs, EventInitDict as xt, CollectionDependencyData as y, RafCallback as ya, DOCS_CUSTOM_ELEMENTS_MANIFEST as yc, OutputTargetDistCollection as yi, StencilDocument as yn, relative as yo, CompilerSystemRealpathResults as yr, ScriptMappingLocalValue as ys, Encapsulation as yt, ComponentCompilerListener as z, JsonDocsValue as za, VALUE_CONSTANT as zc, PrerenderResults as zi, BuildNoChangeResults as zn, isOutputTargetDocsJson as zo, EligiblePrimaryPackageOutputTarget as zr, fromEntries as zs, ModuleFormat as zt };
|
|
6273
|
+
export { CompilerFsStats as $, COLLECTION_APP_DATA_FILE_NAME as $i, WorkerMainController as $n, result_d_exports as $r, OutputTargetBuild as $t, BuildOverrides as A, XLINK_NS as Aa, TASK_CANCELED_MSG as Ai, ResolveModuleIdResults as An, ModeValidationError as Ar, HotModuleReplacement as At, CompilerEventBuildLog as B, splitLineBreaks as Bi, SsrFactoryOptions as Bn, isJsFile as Br, Logger as Bt, BuildEmitEvents as C, STATS as Ca, isOutputTargetStandalone as Ci, PluginTransformResults as Cn, JsonDocsStyle as Cr, DevServerEditor as Ct, BuildOnEventRemove as D, VALID_CONFIG_OUTPUT_TARGETS as Da, isValidConfigOutputTarget as Di, PrerenderResults as Dn, JsonDocsValue as Dr, HistoryApiFallback as Dt, BuildNoChangeResults as E, TYPES as Ea, isOutputTargetWww as Ei, PrerenderOptions as En, JsonDocsUsage as Er, FsWatchResults as Et, Compiler as F, hasError as Fi, SerializeDocumentOptions as Fn, createJsVarName as Fr, LazyRequire as Ft, CompilerEventFileAdd as G, isRolldownError as Gi, TransformOptions as Gn, readOnlyArrayHasStringMember as Gr, OptimizeCssInput as Gt, CompilerEventBuildStart as H, loadTypeScriptDiagnostic as Hi, StencilDevServerConfig as Hn, isTsFile as Hr, LoggerTimeSpan as Ht, CompilerBuildResults as I, hasWarning as Ii, ServiceWorkerConfig as In, generatePreamble as Ir, LightDomPatches as It, CompilerEventFsChange as J, formatLazyBundleRuntimeMeta as Ji, TranspileResults as Jn, getRolldownSourceMapOptions as Jr, OptimizeJsOutput as Jt, CompilerEventFileDelete as K, loadRolldownDiagnostics as Ki, TranspileOnlyResults as Kn, readPackageJson as Kr, OptimizeCssOutput as Kt, CompilerBuildStart as L, shouldIgnoreError as Li, SitemapXmpOpts as Ln, getTextDocs as Lr, LoadConfigInit as Lt, CliInitOptions as M, buildJsonFileError as Mi, RobotsTxtOpts as Mn, validateComponentTag as Mr, HydrateFactoryOptions as Mt, CompileScriptMinifyOptions as N, buildWarn as Ni, RobotsTxtResults as Nn, ParsePackageJsonResult as Nr, HydratedFlag as Nt, BuildOnEvents as O, WATCH_FLAGS as Oa, relativeImport as Oi, PrerenderStartOptions as On, StyleDoc as Or, HmrGlobalStyleUpdate as Ot, CompileTarget as P, catchError as Pi, RolldownConfig as Pn, addDocBlock as Pr, LOG_LEVELS as Pt, CompilerFileWatcherEvent as Q, COLLECTION as Qi, WatcherCloseResults as Qn, rolldownToStencilSourceMap as Qr, OutputTargetBaseNext as Qt, CompilerDependency as R, escapeHtml as Ri, SitemapXmpResults as Rn, hasDependency as Rr, LoadConfigResults as Rt, AutoprefixerOptions as S, STANDALONE as Sa, isOutputTargetSsrWasm as Si, PluginCtx as Sn, JsonDocsSlot as Sr, DevServerConfig as St, BuildLog as T, SVG_NS as Ta, isOutputTargetTypes as Ti, PrerenderHydrateOptions as Tn, JsonDocsTypeLibrary as Tr, DocsReadmeCustomColumn as Tt, CompilerEventDirAdd as U, loadTypeScriptDiagnostics as Ui, StencilDocsConfig as Un, isTsxFile as Ur, ModeConfig as Ut, CompilerEventBuildNoChange as V, augmentDiagnosticWithNode as Vi, StencilConfig as Vn, isJsxFile as Vr, LoggerLineUpdater as Vt, CompilerEventDirDelete as W, createOnWarnFn as Wi, SystemDetails as Wn, parsePackageJson as Wr, NodeResolveConfig as Wt, CompilerFileWatcher as X, ASSETS as Xi, ValidatedConfig as Xn, getSourceMappingUrlLinker as Xr, OutputTargetAssets as Xt, CompilerEventName as Y, stringifyRuntimeData as Yi, UnvalidatedConfig as Yn, getSourceMappingUrlForEndOfFile as Yr, OutputTarget as Yt, CompilerFileWatcherCallback as Z, CMP_FLAGS as Zi, ValidatedOutputTargetWww as Zn, relativizeSourceMap as Zr, OutputTargetBase as Zt, PrintLine as _, LOADER_BUNDLE as _a, isOutputTargetDocsVscode as _i, OutputTargetWww as _n, JsonDocsListener as _r, CopyTask as _t, ComponentCompilerEvent as a, DOCS_AGENT_SKILL as aa, getComponentsFromModules as ai, OutputTargetDocsCustom as an, RafCallback as ar, CompilerSystemRealpathResults as at, SsrResults as b, SSR as ba, isOutputTargetServerRenderer as bi, PlatformPath as bn, JsonDocsPart as br, CustomElementsExportBehaviorOptions as bt, ComponentCompilerMethod as c, DOCS_JSON as ca, isOutputTargetCopy as ci, OutputTargetDocsReadme as cn, TagTransformer as cr, CompilerSystemRemoveFileResults as ct, ComponentCompilerTypeReferences as d, EVENT_FLAGS as da, isOutputTargetDocs as di, OutputTargetLoaderBundle as dn, JsonDocMethodParameter as dr, CompilerSystemWriteFileResults as dt, COLLECTION_MANIFEST_FILE_NAME as ea, FilterComponentsResult as ei, OutputTargetCollection as en, WorkerOptions as er, CompilerRequest as et, ComponentGlobalStyle as f, GENERATED_DTS as fa, isOutputTargetDocsAgentSkill as fi, OutputTargetSsr as fn, JsonDocs as fr, CompilerWatcher as ft, PrerenderUrlResults as g, LISTENER_FLAGS as ga, isOutputTargetDocsReadme as gi, OutputTargetTypes as gn, JsonDocsEvent as gr, CopyResults as gt, PackageJsonData as h, HTML_NS as ha, isOutputTargetDocsJson as hi, OutputTargetStats as hn, JsonDocsDependencyGraph as hr, ConfigCompat as ht, CompilerWorkerContext as i, DIST_LAZY as ia, getComponentsDtsTypesFilePath as ii, OutputTargetDocsAgentSkill as in, MixedInCtor as ir, CompilerSystemCreateDirectoryResults as it, BuildResultsComponentGraph as j, buildError as ji, ResolveModuleOptions as jn, validateComponentModes as jr, HydrateDocumentOptions as jt, BuildOutput as k, WWW as ka, shouldExcludeComponent as ki, ResolveModuleIdOptions as kn, FsWriteResults as kr, HmrStyleUpdate as kt, ComponentCompilerProperty as l, DOCS_README as la, isOutputTargetCustom as li, OutputTargetDocsVscode as ln, UserBuildConditionals as lr, CompilerSystemRenameResults as lt, LazyBundlesRuntimeData as m, HOST_FLAGS as ma, isOutputTargetDocsCustomElementsManifest as mi, OutputTargetStandalone as mn, JsonDocsCustomState as mr, ConfigBundle as mt, ChildType as n, CUSTOM as na, filterExcludedComponents as ni, OutputTargetCustom as nn, ErrorHandler as nr, CompilerSystem as nt, ComponentCompilerListener as o, DOCS_CUSTOM as oa, isOutputTargetAssets as oi, OutputTargetDocsCustomElementsManifest as on, ReactiveControllerHostInterface as or, CompilerSystemRemoveDirectoryOptions as ot, HostElement as p, GLOBAL_STYLE as pa, isOutputTargetDocsCustom as pi, OutputTargetSsrWasm as pn, JsonDocsComponent as pr, Config as pt, CompilerEventFileUpdate as q, formatComponentRuntimeMeta as qi, TranspileOptions as qn, getInlineSourceMappingUrlLinker as qr, OptimizeJsInput as qt, CompilerCtx as r, DEFAULT_STYLE_MODE as ra, getComponentsDtsSrcFilePath as ri, OutputTargetDistLazy as rn, FunctionalComponent as rr, CompilerSystemCreateDirectoryOptions as rt, ComponentCompilerMeta as s, DOCS_CUSTOM_ELEMENTS_MANIFEST as sa, isOutputTargetCollection as si, OutputTargetDocsJson as sn, ResolutionHandler as sr, CompilerSystemRemoveDirectoryResults as st, BuildCtx as t, COPY as ta, filterActiveTargets as ti, OutputTargetCopy as tn, ComponentInterface as tr, CompilerRequestResponse as tt, ComponentCompilerState as u, DOCS_VSCODE as ua, isOutputTargetDistLazy as ui, OutputTargetGlobalStyle as un, VNode as ur, CompilerSystemRenamedPath as ut, PropsType as v, MEMBER_FLAGS as va, isOutputTargetGlobalStyle as vi, PageReloadStrategy as vn, JsonDocsMethod as vr, Credentials as vt, BuildEvents as w, STYLE_EXT as wa, isOutputTargetStats as wi, PrerenderConfig as wn, JsonDocsTag as wr, Diagnostic$1 as wt, WorkerMsgHandler as x, SSR_WASM as xa, isOutputTargetSsr as xi, Plugin$1 as xn, JsonDocsProp as xr, DevServer as xt, RuntimeRef as y, NODE_TYPES as ya, isOutputTargetLoaderBundle as yi, ParsedPath as yn, JsonDocsMethodReturn as yr, CustomElementsExportBehavior as yt, CompilerEventBuildFinish as z, normalizeDiagnostics as zi, SsrDocumentOptions as zn, isDtsFile as zr, LogLevel as zt };
|