@stencil/core 5.0.0-alpha.27 → 5.0.0-alpha.29
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/app-data/index.d.ts +1 -1
- package/dist/{client-CvcvHKz4.mjs → client-D1MsT-Rp.mjs} +373 -238
- package/dist/compiler/index.d.mts +2 -3
- package/dist/compiler/index.mjs +3 -3
- package/dist/compiler/utils/index.d.mts +272 -2
- package/dist/compiler/utils/index.mjs +4 -3
- package/dist/{compiler-D43Ied7R.mjs → compiler-BbS9TDF_.mjs} +1845 -1118
- package/dist/declarations/stencil-ext-modules.d.ts +5 -5
- package/dist/declarations/stencil-public-compiler.d.ts +108 -40
- package/dist/declarations/stencil-public-docs.d.ts +9 -0
- package/dist/declarations/stencil-public-runtime.d.ts +81 -6
- package/dist/fragment-Di1hWOC8.mjs +4 -0
- package/dist/{index-F3IidHM1.d.mts → index-BHj3EBl2.d.mts} +395 -312
- package/dist/{index-xAkMgLX_.d.ts → index-D2PAsXxx.d.ts} +133 -9
- package/dist/index-VK8okIiF.d.mts +108 -0
- package/dist/index.d.mts +4 -0
- package/dist/index.mjs +91 -2
- package/dist/jsx-runtime.mjs +2 -1
- package/dist/{node-DKVq_Ud0.mjs → node-BQR4L-TG.mjs} +60 -58
- package/dist/reactive-controller-BdCpSAQP.d.mts +13 -0
- package/dist/{regular-expression-CFVJOTUh.mjs → regular-expression-XqU5zmPp.mjs} +20 -3
- package/dist/{chunk-z9aeyW2b.mjs → rolldown-runtime-BhDjJH2R.mjs} +1 -1
- package/dist/runtime/client/lazy.js +411 -165
- package/dist/runtime/client/runtime.d.ts +136 -9
- package/dist/runtime/client/runtime.js +411 -165
- package/dist/runtime/index.d.ts +5 -3
- package/dist/runtime/index.js +410 -163
- package/dist/runtime/server/index.d.mts +80 -8
- package/dist/runtime/server/index.mjs +333 -158
- package/dist/runtime/server/runner.d.mts +3 -0
- package/dist/runtime/server/runner.mjs +232 -308
- package/dist/signals/index.d.ts +2 -0
- package/dist/sys/node/index.d.mts +1 -2
- package/dist/sys/node/index.mjs +1 -1
- package/dist/sys/node/worker.d.mts +1 -1
- package/dist/sys/node/worker.mjs +6 -3
- package/dist/testing/index.d.mts +4 -9
- package/dist/testing/index.mjs +74 -56
- package/dist/util-BIa-iHnt.mjs +724 -0
- package/dist/validation-Dd3g77T5.mjs +778 -0
- package/package.json +27 -27
- package/dist/index-3fu7WQs4.d.mts +0 -205
- package/dist/validation-ByxKj8bC.mjs +0 -1458
- /package/{LICENSE.md → LICENSE} +0 -0
|
@@ -1,24 +1,24 @@
|
|
|
1
|
-
declare module "*.css" {
|
|
1
|
+
declare module "*.css?stencil" {
|
|
2
2
|
const src: () => string;
|
|
3
3
|
export default src;
|
|
4
4
|
}
|
|
5
5
|
|
|
6
|
-
declare module "*.svg" {
|
|
6
|
+
declare module "*.svg?stencil" {
|
|
7
7
|
const src: string;
|
|
8
8
|
export default src;
|
|
9
9
|
}
|
|
10
10
|
|
|
11
|
-
declare module "*.txt" {
|
|
11
|
+
declare module "*.txt?stencil" {
|
|
12
12
|
const src: string;
|
|
13
13
|
export default src;
|
|
14
14
|
}
|
|
15
15
|
|
|
16
|
-
declare module "*.frag" {
|
|
16
|
+
declare module "*.frag?stencil" {
|
|
17
17
|
const src: string;
|
|
18
18
|
export default src;
|
|
19
19
|
}
|
|
20
20
|
|
|
21
|
-
declare module "*.vert" {
|
|
21
|
+
declare module "*.vert?stencil" {
|
|
22
22
|
const src: string;
|
|
23
23
|
export default src;
|
|
24
24
|
}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { ListenTargetOptions, ResolutionHandler } from "./stencil-public-runtime.js";
|
|
2
2
|
import { InputOptions, SourceMap as RolldownSourceMap } from "rolldown";
|
|
3
|
+
import "typescript";
|
|
3
4
|
//#region src/utils/result.d.ts
|
|
4
5
|
/**
|
|
5
6
|
* A Result wraps up a success state and a failure state, allowing you to
|
|
@@ -46,15 +47,6 @@ type Err<T> = {
|
|
|
46
47
|
isErr: true;
|
|
47
48
|
value: T;
|
|
48
49
|
};
|
|
49
|
-
/**
|
|
50
|
-
* Create an `Ok` given a value. This doesn't do any checking that the value is
|
|
51
|
-
* 'ok-ish' since doing so would make an undue assumption about what is 'ok'.
|
|
52
|
-
* Instead, this trusts the user to determine, at the call site, whether
|
|
53
|
-
* something is `ok()` or `err()`.
|
|
54
|
-
*
|
|
55
|
-
* @param value the value to wrap up in an `Ok`
|
|
56
|
-
* @returns an Ok wrapping the value
|
|
57
|
-
*/
|
|
58
50
|
//#endregion
|
|
59
51
|
//#region src/compiler/sys/in-memory-fs.d.ts
|
|
60
52
|
/**
|
|
@@ -231,10 +223,6 @@ declare const createInMemoryFs: (sys: CompilerSystem) => {
|
|
|
231
223
|
* `[ source, destination ]`
|
|
232
224
|
*/
|
|
233
225
|
type FileCopyTuple = [string, string];
|
|
234
|
-
/**
|
|
235
|
-
* Collected instructions for all pending filesystem operations saved
|
|
236
|
-
* to the in-memory filesystem.
|
|
237
|
-
*/
|
|
238
226
|
/**
|
|
239
227
|
* Results from committing pending filesystem operations
|
|
240
228
|
*/
|
|
@@ -245,14 +233,6 @@ interface FsCommitResults {
|
|
|
245
233
|
dirsDeleted: string[];
|
|
246
234
|
dirsAdded: string[];
|
|
247
235
|
}
|
|
248
|
-
/**
|
|
249
|
-
* Given the current state of the in-memory proxy filesystem, collect all of
|
|
250
|
-
* the changes that need to be made in order to commit the currently-pending
|
|
251
|
-
* operations (e.g. write, copy, delete) to the OS filesystem.
|
|
252
|
-
*
|
|
253
|
-
* @param items the storage data structure for the in-memory FS cache
|
|
254
|
-
* @returns a collection of all the operations that need to be done
|
|
255
|
-
*/
|
|
256
236
|
//#endregion
|
|
257
237
|
//#region src/declarations/stencil-public-docs.d.ts
|
|
258
238
|
/**
|
|
@@ -275,6 +255,13 @@ interface JsonDocs {
|
|
|
275
255
|
* The metadata for the JSDocs for each component in a Stencil project
|
|
276
256
|
*/
|
|
277
257
|
components: JsonDocsComponent[];
|
|
258
|
+
/**
|
|
259
|
+
* Project-level usage content, collected from markdown files in a `usage`
|
|
260
|
+
* directory at the project's {@link Config.srcDir} root (as opposed to
|
|
261
|
+
* per-component usage content, which lives in {@link JsonDocsComponent.usage}).
|
|
262
|
+
* Keyed by file name (without extension), same shape as component usage.
|
|
263
|
+
*/
|
|
264
|
+
usage?: JsonDocsUsage;
|
|
278
265
|
/**
|
|
279
266
|
* The timestamp at which the metadata was generated, in the format YYYY-MM-DDThh:mm:ss
|
|
280
267
|
*/
|
|
@@ -1102,6 +1089,7 @@ interface ComponentCompilerFeatures {
|
|
|
1102
1089
|
htmlAttrNames: string[];
|
|
1103
1090
|
htmlTagNames: string[];
|
|
1104
1091
|
htmlParts: string[];
|
|
1092
|
+
htmlSlots: string[];
|
|
1105
1093
|
isUpdateable: boolean;
|
|
1106
1094
|
/**
|
|
1107
1095
|
* A plain component is one that doesn't have:
|
|
@@ -1510,6 +1498,7 @@ interface Module {
|
|
|
1510
1498
|
htmlAttrNames: string[];
|
|
1511
1499
|
htmlTagNames: string[];
|
|
1512
1500
|
htmlParts: string[];
|
|
1501
|
+
htmlSlots: string[];
|
|
1513
1502
|
isCollectionDependency: boolean;
|
|
1514
1503
|
isLegacy: boolean;
|
|
1515
1504
|
jsFilePath: string;
|
|
@@ -1807,15 +1796,6 @@ interface StencilConfig {
|
|
|
1807
1796
|
* This behavior defaults to `true`, but may be opted-out of by setting this flag to `false`.
|
|
1808
1797
|
*/
|
|
1809
1798
|
transformAliasedImportPaths?: boolean;
|
|
1810
|
-
/**
|
|
1811
|
-
* When `true`, Stencil will suppress diagnostics which warn about public members using reserved names
|
|
1812
|
-
* (for example, decorating a method named `focus` with `@Method()`). Defaults to `false`.
|
|
1813
|
-
*/
|
|
1814
|
-
suppressReservedPublicNameWarnings?: boolean;
|
|
1815
|
-
/**
|
|
1816
|
-
* When `true`, Stencil will suppress diagnostics which warn about event names conflicting with native DOM event names. Defaults to `false`.
|
|
1817
|
-
*/
|
|
1818
|
-
suppressReservedEventNameWarnings?: boolean;
|
|
1819
1799
|
/**
|
|
1820
1800
|
* Passes custom configuration down to the "@rolldown/plugin-node-resolve" that Stencil uses under the hood.
|
|
1821
1801
|
* For further information: https://stenciljs.com/docs/module-bundling
|
|
@@ -1841,7 +1821,8 @@ interface StencilConfig {
|
|
|
1841
1821
|
*/
|
|
1842
1822
|
logger?: Logger;
|
|
1843
1823
|
/**
|
|
1844
|
-
* Compatibility and workaround flags for framework
|
|
1824
|
+
* Compatibility and workaround flags for framework/bundler edge cases
|
|
1825
|
+
* and rarely-needed diagnostic suppressions.
|
|
1845
1826
|
*/
|
|
1846
1827
|
compat?: ConfigCompat;
|
|
1847
1828
|
/**
|
|
@@ -1967,6 +1948,23 @@ interface StencilConfig {
|
|
|
1967
1948
|
* Set whether unused dependencies should be excluded from the built output.
|
|
1968
1949
|
*/
|
|
1969
1950
|
excludeUnusedDependencies?: boolean;
|
|
1951
|
+
/**
|
|
1952
|
+
* Declares the set of valid style "modes" (e.g. `ios`, `md`) used by mode-keyed
|
|
1953
|
+
* `styleUrls`/`styles` in `@Component()`. When set, the compiler validates that
|
|
1954
|
+
* every mode key used in a component matches one of these entries, catching typos
|
|
1955
|
+
* at build time. Entries marked `required` must be present on every component that
|
|
1956
|
+
* defines any mode-keyed styles.
|
|
1957
|
+
*
|
|
1958
|
+
* @example
|
|
1959
|
+
* ```ts
|
|
1960
|
+
* export const config: Config = {
|
|
1961
|
+
* modes: ['ios', { mode: 'md', required: true }],
|
|
1962
|
+
* };
|
|
1963
|
+
* ```
|
|
1964
|
+
*
|
|
1965
|
+
* @default []
|
|
1966
|
+
*/
|
|
1967
|
+
modes?: (string | ModeConfig)[];
|
|
1970
1968
|
/**
|
|
1971
1969
|
* Explicitly declare which npm packages are Stencil collections to be re-bundled into this project.
|
|
1972
1970
|
*
|
|
@@ -1984,7 +1982,6 @@ interface StencilConfig {
|
|
|
1984
1982
|
* @default []
|
|
1985
1983
|
*/
|
|
1986
1984
|
collections?: string[];
|
|
1987
|
-
stencilCoreResolvedId?: string;
|
|
1988
1985
|
}
|
|
1989
1986
|
/**
|
|
1990
1987
|
* DOM patches for light-dom / scoped components that use `<slot>`.
|
|
@@ -2002,14 +1999,20 @@ interface StencilConfig {
|
|
|
2002
1999
|
* for granular control.
|
|
2003
2000
|
*/
|
|
2004
2001
|
type LightDomPatches = {
|
|
2005
|
-
/** Patches `childNodes`/`children` getters to return only slotted content. */
|
|
2006
|
-
|
|
2007
|
-
|
|
2002
|
+
/** Patches `childNodes`/`children` getters to return only slotted content. */
|
|
2003
|
+
childNodes?: boolean;
|
|
2004
|
+
/** Patches `cloneNode()` to correctly deep-clone slotted content. */
|
|
2005
|
+
cloneNode?: boolean;
|
|
2006
|
+
/** Patches `appendChild()`, `insertBefore()`, and `removeChild()` to route to the correct slot. */
|
|
2007
|
+
domMutations?: boolean;
|
|
2008
|
+
/** Patches `textContent` to act like shadow DOM (reads/writes slotted text only). */
|
|
2008
2009
|
textContent?: boolean;
|
|
2009
2010
|
};
|
|
2010
2011
|
/**
|
|
2011
|
-
* Compatibility and workaround flags for
|
|
2012
|
-
*
|
|
2012
|
+
* Compatibility and workaround flags, primarily for shielding non-shadow DOM components
|
|
2013
|
+
* from consuming frameworks that mutate internals they don't know about, plus other
|
|
2014
|
+
* framework/bundler integration edge cases and rarely-needed diagnostic suppressions.
|
|
2015
|
+
* These are opt-in behaviors that aren't needed by every project.
|
|
2013
2016
|
*/
|
|
2014
2017
|
interface ConfigCompat {
|
|
2015
2018
|
/**
|
|
@@ -2040,6 +2043,15 @@ interface ConfigCompat {
|
|
|
2040
2043
|
* See {@link LightDomPatches} for granular control. Defaults to `true`.
|
|
2041
2044
|
*/
|
|
2042
2045
|
lightDomPatches?: boolean | LightDomPatches;
|
|
2046
|
+
/**
|
|
2047
|
+
* When `true`, Stencil will suppress diagnostics which warn about public members using reserved names
|
|
2048
|
+
* (for example, decorating a method named `focus` with `@Method()`). Defaults to `false`.
|
|
2049
|
+
*/
|
|
2050
|
+
suppressPublicNameWarnings?: boolean;
|
|
2051
|
+
/**
|
|
2052
|
+
* When `true`, Stencil will suppress diagnostics which warn about event names conflicting with native DOM event names. Defaults to `false`.
|
|
2053
|
+
*/
|
|
2054
|
+
suppressEventNameWarnings?: boolean;
|
|
2043
2055
|
}
|
|
2044
2056
|
interface Config extends StencilConfig {
|
|
2045
2057
|
buildAppCore?: boolean;
|
|
@@ -2139,7 +2151,7 @@ type UnvalidatedConfig = Loose<Config>;
|
|
|
2139
2151
|
* type ReqFieldFoo = RequireFields<Foo, 'bar'>; // { bar: number, baz?: string }
|
|
2140
2152
|
* ```
|
|
2141
2153
|
*/
|
|
2142
|
-
type RequireFields<T, K extends keyof T> = T & { [P in K]-?: T[P] };
|
|
2154
|
+
type RequireFields<T, K extends keyof T> = T & { [P in K]-?: T[P]; };
|
|
2143
2155
|
/**
|
|
2144
2156
|
* Fields in {@link Config} to make required for {@link ValidatedConfig}
|
|
2145
2157
|
*/
|
|
@@ -2158,6 +2170,17 @@ type ValidatedConfig = RequireFields<Config, StrictConfigFields> & {
|
|
|
2158
2170
|
devMode: boolean;
|
|
2159
2171
|
sourceMap: boolean;
|
|
2160
2172
|
};
|
|
2173
|
+
interface ModeConfig {
|
|
2174
|
+
/**
|
|
2175
|
+
* The mode name, matched against `styleUrls`/`styles` object keys in `@Component()`.
|
|
2176
|
+
*/
|
|
2177
|
+
mode: string;
|
|
2178
|
+
/**
|
|
2179
|
+
* When `true`, every component that defines mode-keyed `styleUrls` or `styles`
|
|
2180
|
+
* must include this mode. Defaults to `false`.
|
|
2181
|
+
*/
|
|
2182
|
+
required?: boolean;
|
|
2183
|
+
}
|
|
2161
2184
|
interface HydratedFlag {
|
|
2162
2185
|
/**
|
|
2163
2186
|
* Defaults to `hydrated`.
|
|
@@ -3718,6 +3741,22 @@ interface OutputTargetDocsReadme extends OutputTargetBase {
|
|
|
3718
3741
|
overwriteExisting?: boolean | 'if-missing';
|
|
3719
3742
|
footer?: string;
|
|
3720
3743
|
strict?: boolean;
|
|
3744
|
+
/**
|
|
3745
|
+
* Add extra columns to the generated Properties/Events tables, e.g. to
|
|
3746
|
+
* surface custom JSDoc tags as a column of their own.
|
|
3747
|
+
*/
|
|
3748
|
+
customColumns?: {
|
|
3749
|
+
props?: DocsReadmeCustomColumn<JsonDocsProp>[];
|
|
3750
|
+
events?: DocsReadmeCustomColumn<JsonDocsEvent>[];
|
|
3751
|
+
};
|
|
3752
|
+
}
|
|
3753
|
+
/**
|
|
3754
|
+
* A custom column to render in a `docs-readme` Properties/Events table.
|
|
3755
|
+
* `content` is invoked once per row.
|
|
3756
|
+
*/
|
|
3757
|
+
interface DocsReadmeCustomColumn<T> {
|
|
3758
|
+
header: string;
|
|
3759
|
+
content: (member: T, cmp: JsonDocsComponent) => string;
|
|
3721
3760
|
}
|
|
3722
3761
|
interface OutputTargetDocsJson extends OutputTargetBase {
|
|
3723
3762
|
type: 'docs-json';
|
|
@@ -3758,6 +3797,35 @@ interface OutputTargetDocsCustom extends OutputTargetBase {
|
|
|
3758
3797
|
generator: (docs: JsonDocs, config: Config) => void | Promise<void>;
|
|
3759
3798
|
strict?: boolean;
|
|
3760
3799
|
}
|
|
3800
|
+
/**
|
|
3801
|
+
* Output target for generating an [Agent Skill](https://agentskills.io)
|
|
3802
|
+
* (`SKILL.md` + per-component reference files) describing a component
|
|
3803
|
+
* library, so AI coding agents can consume its API and usage examples
|
|
3804
|
+
* directly.
|
|
3805
|
+
*/
|
|
3806
|
+
interface OutputTargetDocsAgentSkill extends OutputTargetBase {
|
|
3807
|
+
type: 'docs-agent-skill';
|
|
3808
|
+
/**
|
|
3809
|
+
* The root directory where the skill (`SKILL.md` + `components/*.md`) is written.
|
|
3810
|
+
*
|
|
3811
|
+
* defaults to `dist/skill`
|
|
3812
|
+
*/
|
|
3813
|
+
dir?: string;
|
|
3814
|
+
/**
|
|
3815
|
+
* The skill's name, used in the `SKILL.md` frontmatter.
|
|
3816
|
+
*
|
|
3817
|
+
* Defaults to a kebab-cased form of {@link Config.namespace}.
|
|
3818
|
+
*/
|
|
3819
|
+
name?: string;
|
|
3820
|
+
/**
|
|
3821
|
+
* The skill's description, used in the `SKILL.md` frontmatter - this is the
|
|
3822
|
+
* text agents use to decide when to load the skill.
|
|
3823
|
+
*
|
|
3824
|
+
* Defaults to an auto-generated sentence built from the project's
|
|
3825
|
+
* {@link JsonDocs.usage} (if present) or its component tags.
|
|
3826
|
+
*/
|
|
3827
|
+
description?: string;
|
|
3828
|
+
}
|
|
3761
3829
|
interface OutputTargetStats extends OutputTargetBase {
|
|
3762
3830
|
type: 'stats';
|
|
3763
3831
|
file?: string;
|
|
@@ -3985,7 +4053,7 @@ interface OutputTargetWww extends OutputTargetBase {
|
|
|
3985
4053
|
*/
|
|
3986
4054
|
hashedFileNameLength?: number;
|
|
3987
4055
|
}
|
|
3988
|
-
type OutputTarget = OutputTargetCopy | OutputTargetCustom | OutputTargetLoaderBundle | OutputTargetStandalone | OutputTargetSsr | OutputTargetSsrWasm | OutputTargetCollection | OutputTargetTypes | OutputTargetGlobalStyle | OutputTargetAssets | OutputTargetDistLazy | OutputTargetDocsJson | OutputTargetDocsCustom | OutputTargetDocsReadme | OutputTargetDocsVscode | OutputTargetDocsCustomElementsManifest | OutputTargetWww | OutputTargetStats;
|
|
4056
|
+
type OutputTarget = OutputTargetCopy | OutputTargetCustom | OutputTargetLoaderBundle | OutputTargetStandalone | OutputTargetSsr | OutputTargetSsrWasm | OutputTargetCollection | OutputTargetTypes | OutputTargetGlobalStyle | OutputTargetAssets | OutputTargetDistLazy | OutputTargetDocsJson | OutputTargetDocsCustom | OutputTargetDocsReadme | OutputTargetDocsVscode | OutputTargetDocsCustomElementsManifest | OutputTargetDocsAgentSkill | OutputTargetWww | OutputTargetStats;
|
|
3989
4057
|
/**
|
|
3990
4058
|
* A post-validation form of {@link OutputTargetWww} where `serviceWorker`
|
|
3991
4059
|
* has been normalized - `true` is resolved to a {@link ServiceWorkerConfig}.
|
|
@@ -4401,4 +4469,4 @@ interface CliInitOptions {
|
|
|
4401
4469
|
sys: CompilerSystem;
|
|
4402
4470
|
}
|
|
4403
4471
|
//#endregion
|
|
4404
|
-
export { AutoprefixerOptions, BuildEmitEvents, BuildEvents, BuildLog, BuildNoChangeResults, BuildOnEventRemove, BuildOnEvents, BuildOutput, BuildOverrides, BuildResultsComponentGraph, CacheStorage, CliInitOptions, CompileScriptMinifyOptions, CompileTarget, Compiler, CompilerBuildResults, CompilerBuildStart, CompilerDependency, CompilerEventBuildFinish, CompilerEventBuildLog, CompilerEventBuildNoChange, CompilerEventBuildStart, CompilerEventDirAdd, CompilerEventDirDelete, CompilerEventFileAdd, CompilerEventFileDelete, CompilerEventFileUpdate, CompilerEventFsChange, CompilerEventName, CompilerFileWatcher, CompilerFileWatcherCallback, CompilerFileWatcherEvent, CompilerFsStats, CompilerRequest, CompilerRequestResponse, CompilerSystem, CompilerSystemCreateDirectoryOptions, CompilerSystemCreateDirectoryResults, CompilerSystemRealpathResults, CompilerSystemRemoveDirectoryOptions, CompilerSystemRemoveDirectoryResults, CompilerSystemRemoveFileResults, CompilerSystemRenameResults, CompilerSystemRenamedPath, CompilerSystemWriteFileResults, CompilerWatcher, Config, ConfigBundle, ConfigCompat, CopyResults, CopyTask, Credentials, CustomElementsExportBehavior, CustomElementsExportBehaviorOptions, DevServer, DevServerConfig, DevServerEditor, Diagnostic, FsWatchResults, HistoryApiFallback, HmrStyleUpdate, HotModuleReplacement, HydrateDocumentOptions, HydrateFactoryOptions, HydratedFlag, JsonDocMethodParameter, JsonDocs, JsonDocsComponent, JsonDocsCustomState, JsonDocsDependencyGraph, JsonDocsEvent, JsonDocsListener, JsonDocsMethod, JsonDocsMethodReturn, JsonDocsPart, JsonDocsProp, JsonDocsSlot, JsonDocsStyle, JsonDocsTag, JsonDocsTypeLibrary, JsonDocsUsage, JsonDocsValue, LOG_LEVELS, LazyRequire, LightDomPatches, LoadConfigInit, LoadConfigResults, LogLevel, Logger, LoggerLineUpdater, LoggerTimeSpan, NodeResolveConfig, OptimizeCssInput, OptimizeCssOutput, OptimizeJsInput, OptimizeJsOutput, OutputTarget, OutputTargetAssets, OutputTargetBase, OutputTargetBaseNext, OutputTargetBuild, OutputTargetCollection, OutputTargetCopy, OutputTargetCustom, OutputTargetDistLazy, OutputTargetDocsCustom, OutputTargetDocsCustomElementsManifest, OutputTargetDocsJson, OutputTargetDocsReadme, OutputTargetDocsVscode, OutputTargetGlobalStyle, OutputTargetLoaderBundle, OutputTargetSsr, OutputTargetSsrWasm, OutputTargetStandalone, OutputTargetStats, OutputTargetTypes, OutputTargetWww, PageReloadStrategy, ParsedPath, PlatformPath, PrerenderConfig, PrerenderHydrateOptions, PrerenderOptions, PrerenderResults, PrerenderStartOptions, ResolveModuleIdOptions, ResolveModuleIdResults, ResolveModuleOptions, RobotsTxtOpts, RobotsTxtResults, RolldownConfig, SerializeDocumentOptions, ServiceWorkerConfig, SitemapXmpOpts, SitemapXmpResults, SsrDocumentOptions, SsrFactoryOptions, StencilConfig, StencilDevServerConfig, StencilDocsConfig, StyleDoc, SystemDetails, TransformOptions, TranspileOnlyResults, TranspileOptions, TranspileResults, UnvalidatedConfig, ValidatedConfig, ValidatedOutputTargetWww, WatcherCloseResults, WorkerMainController, WorkerOptions };
|
|
4472
|
+
export { AutoprefixerOptions, BuildEmitEvents, BuildEvents, BuildLog, BuildNoChangeResults, BuildOnEventRemove, BuildOnEvents, BuildOutput, BuildOverrides, BuildResultsComponentGraph, CacheStorage, CliInitOptions, CompileScriptMinifyOptions, CompileTarget, Compiler, CompilerBuildResults, CompilerBuildStart, CompilerDependency, CompilerEventBuildFinish, CompilerEventBuildLog, CompilerEventBuildNoChange, CompilerEventBuildStart, CompilerEventDirAdd, CompilerEventDirDelete, CompilerEventFileAdd, CompilerEventFileDelete, CompilerEventFileUpdate, CompilerEventFsChange, CompilerEventName, CompilerFileWatcher, CompilerFileWatcherCallback, CompilerFileWatcherEvent, CompilerFsStats, CompilerRequest, CompilerRequestResponse, CompilerSystem, CompilerSystemCreateDirectoryOptions, CompilerSystemCreateDirectoryResults, CompilerSystemRealpathResults, CompilerSystemRemoveDirectoryOptions, CompilerSystemRemoveDirectoryResults, CompilerSystemRemoveFileResults, CompilerSystemRenameResults, CompilerSystemRenamedPath, CompilerSystemWriteFileResults, CompilerWatcher, Config, ConfigBundle, ConfigCompat, CopyResults, CopyTask, Credentials, CustomElementsExportBehavior, CustomElementsExportBehaviorOptions, DevServer, DevServerConfig, DevServerEditor, Diagnostic, DocsReadmeCustomColumn, FsWatchResults, HistoryApiFallback, HmrStyleUpdate, HotModuleReplacement, HydrateDocumentOptions, HydrateFactoryOptions, HydratedFlag, JsonDocMethodParameter, JsonDocs, JsonDocsComponent, JsonDocsCustomState, JsonDocsDependencyGraph, JsonDocsEvent, JsonDocsListener, JsonDocsMethod, JsonDocsMethodReturn, JsonDocsPart, JsonDocsProp, JsonDocsSlot, JsonDocsStyle, JsonDocsTag, JsonDocsTypeLibrary, JsonDocsUsage, JsonDocsValue, LOG_LEVELS, LazyRequire, LightDomPatches, LoadConfigInit, LoadConfigResults, LogLevel, Logger, LoggerLineUpdater, LoggerTimeSpan, ModeConfig, NodeResolveConfig, OptimizeCssInput, OptimizeCssOutput, OptimizeJsInput, OptimizeJsOutput, OutputTarget, OutputTargetAssets, OutputTargetBase, OutputTargetBaseNext, OutputTargetBuild, OutputTargetCollection, OutputTargetCopy, OutputTargetCustom, OutputTargetDistLazy, OutputTargetDocsAgentSkill, OutputTargetDocsCustom, OutputTargetDocsCustomElementsManifest, OutputTargetDocsJson, OutputTargetDocsReadme, OutputTargetDocsVscode, OutputTargetGlobalStyle, OutputTargetLoaderBundle, OutputTargetSsr, OutputTargetSsrWasm, OutputTargetStandalone, OutputTargetStats, OutputTargetTypes, OutputTargetWww, PageReloadStrategy, ParsedPath, PlatformPath, PrerenderConfig, PrerenderHydrateOptions, PrerenderOptions, PrerenderResults, PrerenderStartOptions, ResolveModuleIdOptions, ResolveModuleIdResults, ResolveModuleOptions, RobotsTxtOpts, RobotsTxtResults, RolldownConfig, SerializeDocumentOptions, ServiceWorkerConfig, SitemapXmpOpts, SitemapXmpResults, SsrDocumentOptions, SsrFactoryOptions, StencilConfig, StencilDevServerConfig, StencilDocsConfig, StyleDoc, SystemDetails, TransformOptions, TranspileOnlyResults, TranspileOptions, TranspileResults, UnvalidatedConfig, ValidatedConfig, ValidatedOutputTargetWww, WatcherCloseResults, WorkerMainController, WorkerOptions };
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import "rolldown";
|
|
2
|
+
import "typescript";
|
|
1
3
|
//#region src/declarations/stencil-private.d.ts
|
|
2
4
|
/**
|
|
3
5
|
* Information about a type used in a Stencil component or exported
|
|
@@ -123,6 +125,13 @@ interface JsonDocs {
|
|
|
123
125
|
* The metadata for the JSDocs for each component in a Stencil project
|
|
124
126
|
*/
|
|
125
127
|
components: JsonDocsComponent[];
|
|
128
|
+
/**
|
|
129
|
+
* Project-level usage content, collected from markdown files in a `usage`
|
|
130
|
+
* directory at the project's {@link Config.srcDir} root (as opposed to
|
|
131
|
+
* per-component usage content, which lives in {@link JsonDocsComponent.usage}).
|
|
132
|
+
* Keyed by file name (without extension), same shape as component usage.
|
|
133
|
+
*/
|
|
134
|
+
usage?: JsonDocsUsage;
|
|
126
135
|
/**
|
|
127
136
|
* The timestamp at which the metadata was generated, in the format YYYY-MM-DDThh:mm:ss
|
|
128
137
|
*/
|
|
@@ -484,7 +484,7 @@ declare function setNonce(nonce: string): void;
|
|
|
484
484
|
* @param ref the ref to get the Stencil element for
|
|
485
485
|
* @returns a reference to the element
|
|
486
486
|
*/
|
|
487
|
-
declare function getElement(ref: any):
|
|
487
|
+
declare function getElement<T extends HTMLElement = HTMLStencilElement>(ref: any): T;
|
|
488
488
|
/**
|
|
489
489
|
* Get the shadow root for a Stencil component's host element.
|
|
490
490
|
* This works for both open and closed shadow DOM modes.
|
|
@@ -639,6 +639,17 @@ interface ComponentDidUpdate {
|
|
|
639
639
|
*/
|
|
640
640
|
componentDidUpdate(): void;
|
|
641
641
|
}
|
|
642
|
+
/**
|
|
643
|
+
* A map of `@Prop`/`@State` property names to their new and previous
|
|
644
|
+
* values, passed to `componentShouldUpdate` once per render cycle.
|
|
645
|
+
*
|
|
646
|
+
* Pass `this` as `T` to type `changes` against your component's own
|
|
647
|
+
* members, e.g. `componentShouldUpdate(changes: ComponentShouldUpdateChanges<this>)`.
|
|
648
|
+
*/
|
|
649
|
+
type ComponentShouldUpdateChanges<T = any> = { [K in Extract<keyof T, string>]?: {
|
|
650
|
+
newVal: T[K];
|
|
651
|
+
oldVal: T[K];
|
|
652
|
+
}; };
|
|
642
653
|
interface ComponentInterface {
|
|
643
654
|
connectedCallback?(): void;
|
|
644
655
|
disconnectedCallback?(): void;
|
|
@@ -664,14 +675,18 @@ interface ComponentInterface {
|
|
|
664
675
|
*/
|
|
665
676
|
componentDidLoad?(): void;
|
|
666
677
|
/**
|
|
667
|
-
*
|
|
678
|
+
* One or more `@Prop` or `@State` properties changed and a rerender is
|
|
679
|
+
* about to be requested. `changes` contains every property that changed
|
|
680
|
+
* since the last render, keyed by property name.
|
|
668
681
|
*
|
|
669
|
-
* Called
|
|
670
|
-
*
|
|
682
|
+
* Called once per render cycle, batching all properties that changed
|
|
683
|
+
* synchronously since the last render.
|
|
684
|
+
*
|
|
685
|
+
* Return `false` to prevent the pending render.
|
|
671
686
|
*
|
|
672
687
|
* componentShouldUpdate is not called on the first render.
|
|
673
688
|
*/
|
|
674
|
-
componentShouldUpdate?(
|
|
689
|
+
componentShouldUpdate?(changes: ComponentShouldUpdateChanges<this>): boolean | void;
|
|
675
690
|
/**
|
|
676
691
|
* The component is about to update and re-render.
|
|
677
692
|
*
|
|
@@ -694,6 +709,54 @@ interface ComponentInterface {
|
|
|
694
709
|
render?(): any;
|
|
695
710
|
[memberName: string]: any;
|
|
696
711
|
}
|
|
712
|
+
/**
|
|
713
|
+
* A reusable behavior that hooks into a `ReactiveControllerHost`'s lifecycle. Modeled after Lit's
|
|
714
|
+
* `ReactiveController` pattern: implement the hooks you need, then register an instance with a host
|
|
715
|
+
* via `host.addController(this)`.
|
|
716
|
+
*/
|
|
717
|
+
interface ReactiveController {
|
|
718
|
+
hostConnected?(): void;
|
|
719
|
+
hostDisconnected?(): void;
|
|
720
|
+
hostWillLoad?(): Promise<void> | void;
|
|
721
|
+
hostDidLoad?(): void;
|
|
722
|
+
hostWillRender?(): Promise<void> | void;
|
|
723
|
+
hostDidRender?(): void;
|
|
724
|
+
hostWillUpdate?(): Promise<void> | void;
|
|
725
|
+
hostDidUpdate?(): void;
|
|
726
|
+
}
|
|
727
|
+
/**
|
|
728
|
+
* The shape added to a component by mixing in `ReactiveControllerHost` (see below).
|
|
729
|
+
*/
|
|
730
|
+
interface ReactiveControllerHostInterface extends ComponentInterface, HTMLElement {
|
|
731
|
+
readonly controllers: ReadonlySet<ReactiveController>;
|
|
732
|
+
addController(controller: ReactiveController): void;
|
|
733
|
+
removeController(controller: ReactiveController): void;
|
|
734
|
+
requestUpdate(): void;
|
|
735
|
+
/**
|
|
736
|
+
* Resolves once the next pending render commits. Matches the shape of Lit's
|
|
737
|
+
* `ReactiveControllerHost.updateComplete`, for interop with controllers written against Lit's API
|
|
738
|
+
* (e.g. `@lit/context`).
|
|
739
|
+
*/
|
|
740
|
+
readonly updateComplete: Promise<boolean>;
|
|
741
|
+
}
|
|
742
|
+
/**
|
|
743
|
+
* A mixin factory (for use with `Mixin()`) that adds `ReactiveController` support to a component,
|
|
744
|
+
* forwarding each Stencil lifecycle method to every registered controller's matching `hostX` hook.
|
|
745
|
+
*
|
|
746
|
+
* ```ts
|
|
747
|
+
* import { Mixin, ReactiveControllerHost } from '@stencil/core';
|
|
748
|
+
* import { MouseController } from './mouse-controller';
|
|
749
|
+
*
|
|
750
|
+
* class MyComponent extends Mixin(ReactiveControllerHost) {
|
|
751
|
+
* private mouse = new MouseController(this);
|
|
752
|
+
* render() { return <Host>{this.mouse.pos.x}, {this.mouse.pos.y}</Host>; }
|
|
753
|
+
* }
|
|
754
|
+
* ```
|
|
755
|
+
*
|
|
756
|
+
* @param Base the class to extend.
|
|
757
|
+
* @returns a class extending `Base` with reactive-controller support.
|
|
758
|
+
*/
|
|
759
|
+
declare function ReactiveControllerHost<B extends MixedInCtor>(Base: B): MixedInCtor<InstanceType<B> & ReactiveControllerHostInterface>;
|
|
697
760
|
interface EventEmitter<T = any> {
|
|
698
761
|
emit: (data?: T) => CustomEvent<T>;
|
|
699
762
|
}
|
|
@@ -1127,6 +1190,7 @@ declare namespace JSXBase {
|
|
|
1127
1190
|
onClose?: (event: Event) => void;
|
|
1128
1191
|
open?: boolean;
|
|
1129
1192
|
returnValue?: string;
|
|
1193
|
+
closedby?: 'any' | 'closerequest' | 'none';
|
|
1130
1194
|
}
|
|
1131
1195
|
interface EmbedHTMLAttributes<T> extends HTMLAttributes<T> {
|
|
1132
1196
|
height?: number | string;
|
|
@@ -1164,6 +1228,8 @@ declare namespace JSXBase {
|
|
|
1164
1228
|
allowtransparency?: string | boolean;
|
|
1165
1229
|
frameBorder?: number | string;
|
|
1166
1230
|
frameborder?: number | string;
|
|
1231
|
+
fetchPriority?: 'high' | 'low' | 'auto';
|
|
1232
|
+
fetchpriority?: 'high' | 'low' | 'auto';
|
|
1167
1233
|
importance?: 'low' | 'auto' | 'high';
|
|
1168
1234
|
height?: number | string;
|
|
1169
1235
|
loading?: 'lazy' | 'auto' | 'eager';
|
|
@@ -1186,6 +1252,8 @@ declare namespace JSXBase {
|
|
|
1186
1252
|
crossOrigin?: string;
|
|
1187
1253
|
crossorigin?: string;
|
|
1188
1254
|
decoding?: 'async' | 'auto' | 'sync';
|
|
1255
|
+
fetchPriority?: 'high' | 'low' | 'auto';
|
|
1256
|
+
fetchpriority?: 'high' | 'low' | 'auto';
|
|
1189
1257
|
importance?: 'low' | 'auto' | 'high';
|
|
1190
1258
|
height?: number | string;
|
|
1191
1259
|
loading?: 'lazy' | 'auto' | 'eager';
|
|
@@ -1285,6 +1353,8 @@ declare namespace JSXBase {
|
|
|
1285
1353
|
}
|
|
1286
1354
|
interface LinkHTMLAttributes<T> extends HTMLAttributes<T> {
|
|
1287
1355
|
as?: string;
|
|
1356
|
+
fetchPriority?: 'high' | 'low' | 'auto';
|
|
1357
|
+
fetchpriority?: 'high' | 'low' | 'auto';
|
|
1288
1358
|
href?: string;
|
|
1289
1359
|
hrefLang?: string;
|
|
1290
1360
|
hreflang?: string;
|
|
@@ -1408,6 +1478,8 @@ declare namespace JSXBase {
|
|
|
1408
1478
|
crossOrigin?: string;
|
|
1409
1479
|
crossorigin?: string;
|
|
1410
1480
|
defer?: boolean;
|
|
1481
|
+
fetchPriority?: 'high' | 'low' | 'auto';
|
|
1482
|
+
fetchpriority?: 'high' | 'low' | 'auto';
|
|
1411
1483
|
importance?: 'low' | 'auto' | 'high';
|
|
1412
1484
|
integrity?: string;
|
|
1413
1485
|
nonce?: string;
|
|
@@ -1523,7 +1595,10 @@ declare namespace JSXBase {
|
|
|
1523
1595
|
tabIndex?: number;
|
|
1524
1596
|
tabindex?: number | string;
|
|
1525
1597
|
title?: string;
|
|
1598
|
+
translate?: 'yes' | 'no' | (string & {});
|
|
1526
1599
|
popover?: string | null;
|
|
1600
|
+
focusgroup?: string;
|
|
1601
|
+
focusgroupstart?: boolean;
|
|
1527
1602
|
inputMode?: string;
|
|
1528
1603
|
inputmode?: string;
|
|
1529
1604
|
enterKeyHint?: string;
|
|
@@ -1979,4 +2054,4 @@ interface CustomElementsDefineOptions {
|
|
|
1979
2054
|
ce?: (eventName: string, opts?: any) => CustomEvent;
|
|
1980
2055
|
}
|
|
1981
2056
|
//#endregion
|
|
1982
|
-
export { AttachInternals, AttachInternalsDecorator, AttachInternalsOptions, AttrDeserialize, AttrDeserializeDecorator, Build, ChildNode, Component, ComponentDecorator, ComponentDidLoad, ComponentDidUpdate, ComponentInterface, ComponentOptions, ComponentWillLoad, ComponentWillUpdate, CustomElementsDefineOptions, Element, ElementDecorator, EncapsulationOptions, Env, ErrorHandler, Event, EventDecorator, EventEmitter, EventOptions, Fragment, FunctionalComponent, FunctionalUtilities, HTMLStencilElement, Host, HostAttributes, LocalJSX as JSX, JSXAttributes, JSXBase, Listen, ListenDecorator, ListenOptions, ListenTargetOptions, Method, MethodDecorator, MethodOptions, MixedInCtor, Mixin, ModeStyles, NoneEncapsulation, Prop, PropDecorator, PropOptions, PropSerialize, PropSerializeDecorator, QueueApi, RafCallback, ResolutionHandler, ResolveVarFunction, ScopedEncapsulation, ShadowEncapsulation, ShadowRootOptions, SignalRef, SlotPatch, State, StateDecorator, TagTransformer, UserBuildConditionals, VNode, VNodeData, Watch, WatchDecorator, forceUpdate, getAssetPath, getElement, getMode, getRenderingRef, getShadowRoot, h, jsx, jsxs, readTask, render, resolveVar, setAssetPath, setErrorHandler, setMode, setNonce, setPlatformHelpers, setTagTransformer, transformTag, writeTask };
|
|
2057
|
+
export { AttachInternals, AttachInternalsDecorator, AttachInternalsOptions, AttrDeserialize, AttrDeserializeDecorator, Build, ChildNode, Component, ComponentDecorator, ComponentDidLoad, ComponentDidUpdate, ComponentInterface, ComponentOptions, ComponentShouldUpdateChanges, ComponentWillLoad, ComponentWillUpdate, CustomElementsDefineOptions, Element, ElementDecorator, EncapsulationOptions, Env, ErrorHandler, Event, EventDecorator, EventEmitter, EventOptions, Fragment, FunctionalComponent, FunctionalUtilities, HTMLStencilElement, Host, HostAttributes, LocalJSX as JSX, JSXAttributes, JSXBase, Listen, ListenDecorator, ListenOptions, ListenTargetOptions, Method, MethodDecorator, MethodOptions, MixedInCtor, Mixin, ModeStyles, NoneEncapsulation, Prop, PropDecorator, PropOptions, PropSerialize, PropSerializeDecorator, QueueApi, RafCallback, ReactiveController, ReactiveControllerHost, ReactiveControllerHostInterface, ResolutionHandler, ResolveVarFunction, ScopedEncapsulation, ShadowEncapsulation, ShadowRootOptions, SignalRef, SlotPatch, State, StateDecorator, TagTransformer, UserBuildConditionals, VNode, VNodeData, Watch, WatchDecorator, forceUpdate, getAssetPath, getElement, getMode, getRenderingRef, getShadowRoot, h, jsx, jsxs, readTask, render, resolveVar, setAssetPath, setErrorHandler, setMode, setNonce, setPlatformHelpers, setTagTransformer, transformTag, writeTask };
|