@stencil/core 5.0.0-beta.2 → 5.0.0-beta.21
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-BRu0GtRn.mjs → client-CVXS3JZ-.mjs} +105 -60
- package/dist/compiler/browser.d.ts +110 -79
- package/dist/compiler/browser.js +571 -269
- package/dist/compiler/index.d.mts +110 -2
- package/dist/compiler/index.mjs +3 -3
- package/dist/compiler/utils/index.d.mts +1 -1
- package/dist/{compiler-C8yf59oh.mjs → compiler-ApS_Tn_4.mjs} +4460 -2742
- package/dist/declarations/stencil-public-compiler.d.ts +144 -120
- package/dist/declarations/stencil-public-docs.d.ts +23 -0
- package/dist/declarations/stencil-public-runtime.d.ts +60 -58
- package/dist/{index-BopBfjPu.d.mts → index-B9-Byy8z.d.mts} +142 -118
- package/dist/{index-BXAcVN2j.d.ts → index-BHciXst1.d.ts} +57 -55
- package/dist/{index-DmHmu3y0.d.mts → index-Dz1G9pWZ.d.mts} +2 -2
- package/dist/index.d.mts +3 -0
- package/dist/index.mjs +1 -1
- package/dist/jsx-runtime.mjs +1 -1
- package/dist/{node-75gQKkFz.mjs → node-Bz2SOK7_.mjs} +6 -35
- package/dist/runtime/client/lazy.js +228 -180
- package/dist/runtime/client/runtime.d.ts +67 -66
- package/dist/runtime/client/runtime.js +228 -180
- package/dist/runtime/index.d.ts +4 -5
- package/dist/runtime/index.js +226 -178
- package/dist/runtime/server/index.d.mts +11 -11
- package/dist/runtime/server/index.mjs +287 -220
- package/dist/runtime/server/runner.d.mts +4 -4
- package/dist/runtime/server/runner.mjs +82 -54
- package/dist/signals/index.d.ts +11 -2
- package/dist/signals/index.js +11 -1
- package/dist/sys/node/index.d.mts +1 -1
- package/dist/sys/node/index.mjs +1 -1
- package/dist/sys/node/worker.mjs +2 -2
- package/dist/testing/index.d.mts +129 -112
- package/dist/testing/index.mjs +244 -193
- package/package.json +8 -4
package/dist/testing/index.d.mts
CHANGED
|
@@ -394,6 +394,11 @@ interface JsonDocsComponent {
|
|
|
394
394
|
* A deprecation reason/description found following a `@deprecated` tag
|
|
395
395
|
*/
|
|
396
396
|
deprecation?: string;
|
|
397
|
+
/**
|
|
398
|
+
* `true` if this is a "CSS-only component"
|
|
399
|
+
* discovered in .css file via `@component`-marked JSDoc block
|
|
400
|
+
*/
|
|
401
|
+
cssOnly?: boolean;
|
|
397
402
|
}
|
|
398
403
|
interface JsonDocsDependencyGraph {
|
|
399
404
|
[tagName: string]: string[];
|
|
@@ -553,6 +558,16 @@ interface JsonDocsStyle {
|
|
|
553
558
|
* The annotation used in the JSDoc of the style (e.g. `@prop`)
|
|
554
559
|
*/
|
|
555
560
|
annotation: string;
|
|
561
|
+
/**
|
|
562
|
+
* The CSS `syntax` descriptor for a custom property, if it was registered via a native
|
|
563
|
+
* `@property` at-rule (e.g. `"<length>"`).
|
|
564
|
+
*/
|
|
565
|
+
syntax?: string;
|
|
566
|
+
/**
|
|
567
|
+
* The `initial-value` descriptor for a custom property, if it was registered via a native
|
|
568
|
+
* `@property` at-rule.
|
|
569
|
+
*/
|
|
570
|
+
default?: string;
|
|
556
571
|
/**
|
|
557
572
|
* The mode associated with the style
|
|
558
573
|
*/
|
|
@@ -639,6 +654,14 @@ interface StyleDoc {
|
|
|
639
654
|
* The Stencil style-mode that is associated with this property.
|
|
640
655
|
*/
|
|
641
656
|
mode: string | undefined;
|
|
657
|
+
/**
|
|
658
|
+
* The CSS `syntax` descriptor, if this property was registered via a native `@property` at-rule.
|
|
659
|
+
*/
|
|
660
|
+
syntax?: string;
|
|
661
|
+
/**
|
|
662
|
+
* The `initial-value` descriptor, if this property was registered via a native `@property` at-rule.
|
|
663
|
+
*/
|
|
664
|
+
default?: string;
|
|
642
665
|
}
|
|
643
666
|
//#endregion
|
|
644
667
|
//#region src/declarations/stencil-public-runtime.d.ts
|
|
@@ -922,6 +945,15 @@ interface StencilConfig {
|
|
|
922
945
|
* @default false
|
|
923
946
|
*/
|
|
924
947
|
generateExportMaps?: boolean;
|
|
948
|
+
/**
|
|
949
|
+
* Set to `false` to disable discovery of "CSS-only components" - pure-CSS custom-element
|
|
950
|
+
* definitions marked with a `@component` JSDoc tag in `.css` files under `srcDir`. No JS
|
|
951
|
+
* class, never registered via `customElements.define()` - just a documented,
|
|
952
|
+
* type-checked tag name and its CSS custom properties/attribute variants.
|
|
953
|
+
*
|
|
954
|
+
* Defaults to `true`.
|
|
955
|
+
*/
|
|
956
|
+
enableCssOnlyComponents?: boolean;
|
|
925
957
|
/**
|
|
926
958
|
* The namespace config is a string representing a namespace for the app.
|
|
927
959
|
* For apps that are not meant to be a library of reusable components,
|
|
@@ -964,7 +996,7 @@ interface StencilConfig {
|
|
|
964
996
|
*/
|
|
965
997
|
transformAliasedImportPaths?: boolean;
|
|
966
998
|
/**
|
|
967
|
-
* Passes custom configuration
|
|
999
|
+
* Passes custom configuration to Rolldown's module resolution (its `resolve` option), e.g. `alias`.
|
|
968
1000
|
* For further information: https://stenciljs.com/docs/module-bundling
|
|
969
1001
|
*/
|
|
970
1002
|
nodeResolve?: NodeResolveConfig;
|
|
@@ -1531,7 +1563,7 @@ interface CompilerSystem {
|
|
|
1531
1563
|
name: 'node' | 'in-memory';
|
|
1532
1564
|
version: string;
|
|
1533
1565
|
events?: BuildEvents;
|
|
1534
|
-
details
|
|
1566
|
+
details: SystemDetails;
|
|
1535
1567
|
/**
|
|
1536
1568
|
* Add a callback which will be ran when destroy() is called.
|
|
1537
1569
|
*/
|
|
@@ -1544,14 +1576,15 @@ interface CompilerSystem {
|
|
|
1544
1576
|
* SYNC! Always returns a boolean, does not throw.
|
|
1545
1577
|
*/
|
|
1546
1578
|
accessSync(p: string): boolean;
|
|
1547
|
-
applyGlobalPatch?(fromDir: string): Promise<void>;
|
|
1548
1579
|
applyPrerenderGlobalPatch?(opts: {
|
|
1549
1580
|
devServerHostUrl: string;
|
|
1550
1581
|
window: any;
|
|
1551
1582
|
}): void;
|
|
1552
|
-
|
|
1553
|
-
|
|
1554
|
-
|
|
1583
|
+
/**
|
|
1584
|
+
* Check npm for a newer Stencil version. Resolves a function that logs the result.
|
|
1585
|
+
*/
|
|
1586
|
+
checkVersion(logger: Logger, currentVersion: string): Promise<() => void>;
|
|
1587
|
+
copy(copyTasks: Required<CopyTask>[], srcDir: string): Promise<CopyResults>;
|
|
1555
1588
|
/**
|
|
1556
1589
|
* Always returns a boolean if the files were copied or not. Does not throw.
|
|
1557
1590
|
*/
|
|
@@ -1576,7 +1609,7 @@ interface CompilerSystem {
|
|
|
1576
1609
|
/**
|
|
1577
1610
|
* Each platform has a different way to dynamically import modules.
|
|
1578
1611
|
*/
|
|
1579
|
-
dynamicImport
|
|
1612
|
+
dynamicImport(p: string): Promise<any>;
|
|
1580
1613
|
/**
|
|
1581
1614
|
* Creates the worker controller for the current system.
|
|
1582
1615
|
*
|
|
@@ -1590,20 +1623,14 @@ interface CompilerSystem {
|
|
|
1590
1623
|
* process.exit()
|
|
1591
1624
|
*/
|
|
1592
1625
|
exit(exitCode: number): Promise<void>;
|
|
1593
|
-
/**
|
|
1594
|
-
* Optionally provide a fetch() function rather than using the built-in fetch().
|
|
1595
|
-
* First arg is a url string or Request object (RequestInfo).
|
|
1596
|
-
* Second arg is the RequestInit. Returns the Response object
|
|
1597
|
-
*/
|
|
1598
|
-
fetch?(input: string | any, init?: any): Promise<any>;
|
|
1599
1626
|
/**
|
|
1600
1627
|
* Generates a sha1 digest encoded as HEX
|
|
1601
1628
|
*/
|
|
1602
|
-
generateContentHash
|
|
1629
|
+
generateContentHash(content: string | any, length?: number): Promise<string>;
|
|
1603
1630
|
/**
|
|
1604
1631
|
* Generates a sha1 digest encoded as HEX from a file path
|
|
1605
1632
|
*/
|
|
1606
|
-
generateFileHash
|
|
1633
|
+
generateFileHash(filePath: string | any, length?: number): Promise<string>;
|
|
1607
1634
|
/**
|
|
1608
1635
|
* Get the current directory.
|
|
1609
1636
|
*/
|
|
@@ -1612,7 +1639,6 @@ interface CompilerSystem {
|
|
|
1612
1639
|
* The compiler's executing path.
|
|
1613
1640
|
*/
|
|
1614
1641
|
getCompilerExecutingPath(): string;
|
|
1615
|
-
getEnvironmentVar?(key: string): string;
|
|
1616
1642
|
/**
|
|
1617
1643
|
* Gets the absolute file path when for a dependency module.
|
|
1618
1644
|
*/
|
|
@@ -1651,11 +1677,7 @@ interface CompilerSystem {
|
|
|
1651
1677
|
* Normalize file system path.
|
|
1652
1678
|
*/
|
|
1653
1679
|
normalizePath(p: string): string;
|
|
1654
|
-
onProcessInterrupt
|
|
1655
|
-
parseYarnLockFile?: (content: string) => {
|
|
1656
|
-
type: 'success' | 'merge' | 'conflict';
|
|
1657
|
-
object: any;
|
|
1658
|
-
};
|
|
1680
|
+
onProcessInterrupt(cb: () => void): void;
|
|
1659
1681
|
platformPath: PlatformPath;
|
|
1660
1682
|
/**
|
|
1661
1683
|
* All return paths are full normalized paths, not just the basenames. Always returns an array, does not throw.
|
|
@@ -1691,6 +1713,9 @@ interface CompilerSystem {
|
|
|
1691
1713
|
* Rename old path to new path. Does not throw.
|
|
1692
1714
|
*/
|
|
1693
1715
|
rename(oldPath: string, newPath: string): Promise<CompilerSystemRenameResults>;
|
|
1716
|
+
/**
|
|
1717
|
+
* Assigned by the compiler. Used by plugins (e.g. `@stencil/sass`) to resolve `~` imports.
|
|
1718
|
+
*/
|
|
1694
1719
|
resolveModuleId?(opts: ResolveModuleIdOptions): Promise<ResolveModuleIdResults>;
|
|
1695
1720
|
resolvePath(p: string): string;
|
|
1696
1721
|
/**
|
|
@@ -1873,6 +1898,7 @@ interface CompilerBuildResults {
|
|
|
1873
1898
|
buildId: number;
|
|
1874
1899
|
componentGraph?: BuildResultsComponentGraph;
|
|
1875
1900
|
components: ComponentCompilerMeta[];
|
|
1901
|
+
cssOnlyComponents: ComponentCompilerMeta[];
|
|
1876
1902
|
diagnostics: Diagnostic[];
|
|
1877
1903
|
dirsAdded: string[];
|
|
1878
1904
|
dirsDeleted: string[];
|
|
@@ -1889,6 +1915,15 @@ interface CompilerBuildResults {
|
|
|
1889
1915
|
namespace: string;
|
|
1890
1916
|
fsNamespace: string;
|
|
1891
1917
|
outputs: BuildOutput[];
|
|
1918
|
+
/**
|
|
1919
|
+
* Absolute paths to every global stylesheet, in cascade order: each `global-style` output
|
|
1920
|
+
* target's compiled CSS in the order those targets are declared in `config.outputTargets` - or,
|
|
1921
|
+
* with none configured, the generated `{fsNamespace}.css` holding Stencil's auto-placed CSS (when
|
|
1922
|
+
* emitted). Unlike `outputs`, which groups files by type and sorts them alphabetically, this
|
|
1923
|
+
* preserves author-intended order for consumers like the dev-server's auto-generated component
|
|
1924
|
+
* preview.
|
|
1925
|
+
*/
|
|
1926
|
+
globalStyleFiles: string[];
|
|
1892
1927
|
rootDir: string;
|
|
1893
1928
|
srcDir: string;
|
|
1894
1929
|
timestamp: string;
|
|
@@ -1904,6 +1939,7 @@ interface HotModuleReplacement {
|
|
|
1904
1939
|
componentsUpdated?: string[];
|
|
1905
1940
|
excludeHmr?: string[];
|
|
1906
1941
|
externalStylesUpdated?: string[];
|
|
1942
|
+
globalStylesUpdated?: HmrGlobalStyleUpdate[];
|
|
1907
1943
|
imagesUpdated?: string[];
|
|
1908
1944
|
indexHtmlUpdated?: boolean;
|
|
1909
1945
|
inlineStylesUpdated?: HmrStyleUpdate[];
|
|
@@ -1918,6 +1954,15 @@ interface HmrStyleUpdate {
|
|
|
1918
1954
|
styleTag: string;
|
|
1919
1955
|
styleText: string;
|
|
1920
1956
|
}
|
|
1957
|
+
/**
|
|
1958
|
+
* A live-reload update for a `global-style` output target's CSS. Applied on
|
|
1959
|
+
* the client by matching `fileName` against the `<link>` that loads it and
|
|
1960
|
+
* inserting/updating an adjacent `<style>` override
|
|
1961
|
+
*/
|
|
1962
|
+
interface HmrGlobalStyleUpdate {
|
|
1963
|
+
fileName: string;
|
|
1964
|
+
styleText: string;
|
|
1965
|
+
}
|
|
1921
1966
|
type BuildOnEventRemove = () => boolean;
|
|
1922
1967
|
interface BuildEvents extends BuildOnEvents, BuildEmitEvents {
|
|
1923
1968
|
unsubscribeAll(): void;
|
|
@@ -2310,7 +2355,7 @@ interface OutputTargetCollection extends OutputTargetBaseNext {
|
|
|
2310
2355
|
* When `true` this flag will transform aliased import paths defined in
|
|
2311
2356
|
* a project's `tsconfig.json` to relative import paths in the compiled output.
|
|
2312
2357
|
*
|
|
2313
|
-
* Paths will be left in aliased format if `false
|
|
2358
|
+
* Paths will be left in aliased format if `false`. Defaults to `true`.
|
|
2314
2359
|
*
|
|
2315
2360
|
* @example
|
|
2316
2361
|
* // tsconfig.json
|
|
@@ -2412,11 +2457,11 @@ interface OutputTargetGlobalStyle extends OutputTargetBaseNext {
|
|
|
2412
2457
|
* Controls whether this global stylesheet is injected into component shadow DOMs
|
|
2413
2458
|
* as a constructable stylesheet at runtime.
|
|
2414
2459
|
*
|
|
2415
|
-
* - `'none'
|
|
2460
|
+
* - `'none'`: Don't inject - stylesheet must be loaded externally (e.g., via `<link>`)
|
|
2416
2461
|
* - `'client'`: Inject only in client builds, not SSR (reduces SSR output size)
|
|
2417
2462
|
* - `'all'`: Inject in both client and SSR builds
|
|
2418
2463
|
*
|
|
2419
|
-
* @default 'none'
|
|
2464
|
+
* @default 'client' when the stylesheet comes from `globalStyle` (or an auto-detected `src/global.*`), 'none' when `input` is set
|
|
2420
2465
|
*/
|
|
2421
2466
|
inject?: 'none' | 'client' | 'all';
|
|
2422
2467
|
}
|
|
@@ -2474,6 +2519,10 @@ interface OutputTargetSsr extends OutputTargetBase {
|
|
|
2474
2519
|
*/
|
|
2475
2520
|
cjs?: boolean;
|
|
2476
2521
|
}
|
|
2522
|
+
/**
|
|
2523
|
+
* Compiles the SSR hydrate app to a WASM plugin (via `extism-js`/QuickJS-ng) that can run
|
|
2524
|
+
* outside of Node
|
|
2525
|
+
*/
|
|
2477
2526
|
interface OutputTargetSsrWasm extends OutputTargetBase {
|
|
2478
2527
|
type: 'ssr-wasm';
|
|
2479
2528
|
/** Output directory. @default 'dist/ssr-wasm' */
|
|
@@ -2611,7 +2660,7 @@ interface OutputTargetDocsAgentSkill extends OutputTargetBase {
|
|
|
2611
2660
|
/**
|
|
2612
2661
|
* The skill's name, used in the `SKILL.md` frontmatter.
|
|
2613
2662
|
*
|
|
2614
|
-
* Defaults to
|
|
2663
|
+
* Defaults to {@link Config.namespace}, lowercased, with anything other than letters and numbers replaced by `-`.
|
|
2615
2664
|
*/
|
|
2616
2665
|
name?: string;
|
|
2617
2666
|
/**
|
|
@@ -2674,10 +2723,8 @@ interface OutputTargetStandalone extends OutputTargetBaseNext {
|
|
|
2674
2723
|
type: 'standalone';
|
|
2675
2724
|
empty?: boolean;
|
|
2676
2725
|
/**
|
|
2677
|
-
*
|
|
2678
|
-
*
|
|
2679
|
-
* 2. File names are not hashed.
|
|
2680
|
-
* 3. File minification will follow the behavior defined at the root of the Stencil config.
|
|
2726
|
+
* When `true`, all `@stencil/core/*` module references are treated as external
|
|
2727
|
+
* during bundling rather than being included in the generated output.
|
|
2681
2728
|
*
|
|
2682
2729
|
* @default false
|
|
2683
2730
|
*/
|
|
@@ -2741,8 +2788,10 @@ interface OutputTargetBase {
|
|
|
2741
2788
|
* This improves dev build times by not generating production-only artifacts.
|
|
2742
2789
|
*
|
|
2743
2790
|
* Defaults vary by output target type:
|
|
2744
|
-
* - `loader-bundle`: `
|
|
2745
|
-
* - `standalone`: `true`
|
|
2791
|
+
* - `loader-bundle`: `true` (skips the npm distribution files; the browser bundle always builds)
|
|
2792
|
+
* - `standalone`: `true` if `loader-bundle` is also configured, otherwise `false`
|
|
2793
|
+
* - `types`, `collection`, `ssr-wasm`: `true` (skips in dev)
|
|
2794
|
+
* - `assets`, `global-style`: `false` (always runs)
|
|
2746
2795
|
* - `ssr`: `true` (skips in dev, unless `devServer.ssr` is enabled)
|
|
2747
2796
|
* - `docs-*`: `true` (skips in dev)
|
|
2748
2797
|
* - `custom`: `true` (skips in dev)
|
|
@@ -2912,10 +2961,6 @@ interface Diagnostic {
|
|
|
2912
2961
|
relFilePath?: string | undefined;
|
|
2913
2962
|
type: string;
|
|
2914
2963
|
}
|
|
2915
|
-
interface CacheStorage {
|
|
2916
|
-
get(key: string): Promise<any>;
|
|
2917
|
-
set(key: string, value: any): Promise<void>;
|
|
2918
|
-
}
|
|
2919
2964
|
/**
|
|
2920
2965
|
* Input for CSS optimization functions, including the input CSS
|
|
2921
2966
|
* string and a few boolean options which turn on or off various
|
|
@@ -2963,8 +3008,35 @@ interface LazyRequire {
|
|
|
2963
3008
|
require(fromDir: string, moduleId: string): any;
|
|
2964
3009
|
getModulePath(fromDir: string, moduleId: string): string;
|
|
2965
3010
|
}
|
|
3011
|
+
/**
|
|
3012
|
+
* A Stencil `resolveId`/`load`/`transform` plugin, as accepted by {@link StencilConfig.plugins}.
|
|
3013
|
+
*/
|
|
3014
|
+
interface Plugin$1 {
|
|
3015
|
+
name?: string;
|
|
3016
|
+
pluginType?: string;
|
|
3017
|
+
load?: (id: string, context: PluginCtx) => Promise<string> | string;
|
|
3018
|
+
resolveId?: (importee: string, importer: string, context: PluginCtx) => Promise<string> | string;
|
|
3019
|
+
transform?: (sourceText: string, id: string, context: PluginCtx) => Promise<PluginTransformResults> | PluginTransformResults;
|
|
3020
|
+
}
|
|
3021
|
+
type PluginTransformResults = PluginTransformationDescriptor | string | null;
|
|
3022
|
+
interface PluginTransformationDescriptor {
|
|
3023
|
+
code?: string;
|
|
3024
|
+
map?: string;
|
|
3025
|
+
id?: string;
|
|
3026
|
+
diagnostics?: Diagnostic[];
|
|
3027
|
+
dependencies?: string[];
|
|
3028
|
+
}
|
|
3029
|
+
interface PluginCtx {
|
|
3030
|
+
config: Config;
|
|
3031
|
+
sys: CompilerSystem;
|
|
3032
|
+
fs: InMemoryFileSystem;
|
|
3033
|
+
cache: Cache;
|
|
3034
|
+
diagnostics: Diagnostic[];
|
|
3035
|
+
}
|
|
2966
3036
|
//#endregion
|
|
2967
3037
|
//#region src/declarations/stencil-private.d.ts
|
|
3038
|
+
/** Build-time virtual `@import`s a `global-style` input can use to place Stencil-generated CSS. */
|
|
3039
|
+
type StencilVirtualImport = 'stencil-hydrate' | 'stencil-component-globals' | 'stencil-css-components';
|
|
2968
3040
|
interface SourceMap$1 {
|
|
2969
3041
|
file: string;
|
|
2970
3042
|
mappings: string;
|
|
@@ -3103,6 +3175,7 @@ interface BuildCtx {
|
|
|
3103
3175
|
esmComponentBundle: ReadonlyArray<BundleModule>;
|
|
3104
3176
|
commonJsComponentBundle: ReadonlyArray<BundleModule>;
|
|
3105
3177
|
components: ComponentCompilerMeta[];
|
|
3178
|
+
cssOnlyComponents: ComponentCompilerMeta[];
|
|
3106
3179
|
componentGraph: Map<string, string[]>;
|
|
3107
3180
|
config: ValidatedConfig;
|
|
3108
3181
|
createTimeSpan(msg: string, debug?: boolean): LoggerTimeSpan;
|
|
@@ -3151,6 +3224,9 @@ interface BuildCtx {
|
|
|
3151
3224
|
*/
|
|
3152
3225
|
stylesPromise: Promise<string>;
|
|
3153
3226
|
stylesUpdated: BuildStyleUpdate[];
|
|
3227
|
+
globalStylesUpdated: BuildGlobalStyleLinkUpdate[];
|
|
3228
|
+
/** Absolute path of the generated `{fsNamespace}.css`, when this build emitted one */
|
|
3229
|
+
stencilCssFile?: string;
|
|
3154
3230
|
timeSpan: LoggerTimeSpan;
|
|
3155
3231
|
timestamp: string;
|
|
3156
3232
|
transpileBuildCount: number;
|
|
@@ -3163,6 +3239,14 @@ interface BuildStyleUpdate {
|
|
|
3163
3239
|
styleText: string;
|
|
3164
3240
|
styleMode: string;
|
|
3165
3241
|
}
|
|
3242
|
+
/**
|
|
3243
|
+
* A live-reload update for a `global-style` output target's CSS, matched on
|
|
3244
|
+
* the client by `fileName` against the `<link>`
|
|
3245
|
+
*/
|
|
3246
|
+
interface BuildGlobalStyleLinkUpdate {
|
|
3247
|
+
fileName: string;
|
|
3248
|
+
styleText: string;
|
|
3249
|
+
}
|
|
3166
3250
|
type BuildTask = any;
|
|
3167
3251
|
interface CompilerBuildStats {
|
|
3168
3252
|
timestamp: string;
|
|
@@ -3304,6 +3388,12 @@ interface CompilerCtx {
|
|
|
3304
3388
|
cssModuleImports: Map<string, string[]>;
|
|
3305
3389
|
/** Cache of built global styles, keyed by input file path */
|
|
3306
3390
|
globalStyleCache: Map<string, string>;
|
|
3391
|
+
/** Cache of discovered CSS-only components from the last scan, keyed by absolute .css file path */
|
|
3392
|
+
cssOnlyComponentsCache: Map<string, ComponentCompilerMeta[]>;
|
|
3393
|
+
/** Contents of the last auto-placed `stencil-*` CSS, used to detect changes for HMR */
|
|
3394
|
+
stencilCss?: string;
|
|
3395
|
+
/** Virtual imports found in each built global style (post-preprocessing), keyed by input path */
|
|
3396
|
+
globalStyleVirtualImports: Map<string, Set<StencilVirtualImport>>;
|
|
3307
3397
|
collections: CollectionCompilerMeta[];
|
|
3308
3398
|
compilerOptions: any;
|
|
3309
3399
|
events: BuildEvents;
|
|
@@ -3449,7 +3539,7 @@ interface ComponentCompilerMeta extends ComponentCompilerFeatures {
|
|
|
3449
3539
|
* Custom states to initialize on the ElementInternals.states CustomStateSet.
|
|
3450
3540
|
* These are defined via @AttachInternals({ states: {...} }).
|
|
3451
3541
|
*/
|
|
3452
|
-
attachInternalsCustomStates:
|
|
3542
|
+
attachInternalsCustomStates: JsonDocsCustomState[];
|
|
3453
3543
|
componentClassName: string;
|
|
3454
3544
|
/**
|
|
3455
3545
|
* A list of web component tag names that are either:
|
|
@@ -3519,7 +3609,7 @@ interface ComponentCompilerMeta extends ComponentCompilerFeatures {
|
|
|
3519
3609
|
sourceFilePath: string;
|
|
3520
3610
|
sourceMapPath: string;
|
|
3521
3611
|
states: ComponentCompilerState[];
|
|
3522
|
-
styleDocs:
|
|
3612
|
+
styleDocs: StyleDoc[];
|
|
3523
3613
|
styles: StyleCompiler[];
|
|
3524
3614
|
globalStyles: ComponentGlobalStyle[];
|
|
3525
3615
|
tagName: string;
|
|
@@ -3722,20 +3812,6 @@ interface ComponentCompilerState {
|
|
|
3722
3812
|
* Custom states are exposed via the ElementInternals.states CustomStateSet
|
|
3723
3813
|
* and can be targeted with the CSS :state() pseudo-class.
|
|
3724
3814
|
*/
|
|
3725
|
-
interface ComponentCompilerCustomState {
|
|
3726
|
-
/**
|
|
3727
|
-
* The name of the custom state (without dashes)
|
|
3728
|
-
*/
|
|
3729
|
-
name: string;
|
|
3730
|
-
/**
|
|
3731
|
-
* The initial value of the state
|
|
3732
|
-
*/
|
|
3733
|
-
initialValue: boolean;
|
|
3734
|
-
/**
|
|
3735
|
-
* Optional JSDoc description for the state
|
|
3736
|
-
*/
|
|
3737
|
-
docs: string;
|
|
3738
|
-
}
|
|
3739
3815
|
/**
|
|
3740
3816
|
* Representation of JSDoc that is pulled off a node in the AST
|
|
3741
3817
|
*/
|
|
@@ -3747,44 +3823,7 @@ interface CompilerJsDoc {
|
|
|
3747
3823
|
/**
|
|
3748
3824
|
* Tags included in the JSDoc
|
|
3749
3825
|
*/
|
|
3750
|
-
tags:
|
|
3751
|
-
}
|
|
3752
|
-
/**
|
|
3753
|
-
* Representation of a tag that exists in a JSDoc
|
|
3754
|
-
*/
|
|
3755
|
-
interface CompilerJsDocTagInfo {
|
|
3756
|
-
/**
|
|
3757
|
-
* The name of the tag - e.g. `@deprecated`
|
|
3758
|
-
*/
|
|
3759
|
-
name: string;
|
|
3760
|
-
/**
|
|
3761
|
-
* Additional text that is associated with the tag - e.g. `@deprecated use v2 of this API`
|
|
3762
|
-
*/
|
|
3763
|
-
text?: string;
|
|
3764
|
-
}
|
|
3765
|
-
/**
|
|
3766
|
-
* The (internal) representation of a CSS block comment in a CSS, Sass, etc. file. This data structure is used during
|
|
3767
|
-
* the initial compilation phases of Stencil, as a piece of {@link ComponentCompilerMeta}.
|
|
3768
|
-
*/
|
|
3769
|
-
interface CompilerStyleDoc {
|
|
3770
|
-
/**
|
|
3771
|
-
* The name of the CSS property
|
|
3772
|
-
*/
|
|
3773
|
-
name: string;
|
|
3774
|
-
/**
|
|
3775
|
-
* The user-defined description of the CSS property
|
|
3776
|
-
*/
|
|
3777
|
-
docs: string;
|
|
3778
|
-
/**
|
|
3779
|
-
* The JSDoc-style annotation (e.g. `@prop`) that was used in the block comment to detect the comment.
|
|
3780
|
-
* Used to inform Stencil where the start of a new property's description starts (and where the previous description
|
|
3781
|
-
* ends).
|
|
3782
|
-
*/
|
|
3783
|
-
annotation: 'prop';
|
|
3784
|
-
/**
|
|
3785
|
-
* The Stencil style-mode that is associated with this property.
|
|
3786
|
-
*/
|
|
3787
|
-
mode: string;
|
|
3826
|
+
tags: JsonDocsTag[];
|
|
3788
3827
|
}
|
|
3789
3828
|
interface CompilerAssetDir {
|
|
3790
3829
|
absolutePath?: string;
|
|
@@ -3953,28 +3992,6 @@ interface Module {
|
|
|
3953
3992
|
hasVdomXlink: boolean;
|
|
3954
3993
|
hasSignalsImport: boolean;
|
|
3955
3994
|
}
|
|
3956
|
-
interface Plugin$1 {
|
|
3957
|
-
name?: string;
|
|
3958
|
-
pluginType?: string;
|
|
3959
|
-
load?: (id: string, context: PluginCtx) => Promise<string> | string;
|
|
3960
|
-
resolveId?: (importee: string, importer: string, context: PluginCtx) => Promise<string> | string;
|
|
3961
|
-
transform?: (sourceText: string, id: string, context: PluginCtx) => Promise<PluginTransformResults> | PluginTransformResults;
|
|
3962
|
-
}
|
|
3963
|
-
type PluginTransformResults = PluginTransformationDescriptor | string | null;
|
|
3964
|
-
interface PluginTransformationDescriptor {
|
|
3965
|
-
code?: string;
|
|
3966
|
-
map?: string;
|
|
3967
|
-
id?: string;
|
|
3968
|
-
diagnostics?: Diagnostic[];
|
|
3969
|
-
dependencies?: string[];
|
|
3970
|
-
}
|
|
3971
|
-
interface PluginCtx {
|
|
3972
|
-
config: Config;
|
|
3973
|
-
sys: CompilerSystem;
|
|
3974
|
-
fs: InMemoryFileSystem;
|
|
3975
|
-
cache: Cache;
|
|
3976
|
-
diagnostics: Diagnostic[];
|
|
3977
|
-
}
|
|
3978
3995
|
interface PrerenderUrlResults {
|
|
3979
3996
|
anchorUrls: string[];
|
|
3980
3997
|
diagnostics: Diagnostic[];
|
|
@@ -4926,4 +4943,4 @@ declare const Host: {};
|
|
|
4926
4943
|
//#region src/testing/platform/index.d.ts
|
|
4927
4944
|
declare const setMode: (handler: (elm: any) => string | undefined | null) => void;
|
|
4928
4945
|
//#endregion
|
|
4929
|
-
export { Build, Env, Fragment, Host, Mixin, ReactiveControllerHost, type SpecPage, createEvent, createTestingSystem, forceUpdate, getAssetPath, getElement, getHostRef, getMode, getRenderingRef, h, mockCompilerSystem, mockComponentMeta, mockConfig, mockDocument, mockLoadConfigInit, mockLogger, mockModule, mockValidatedConfig, mockWindow, newSpecPage, readTask, registerHost, registerInstance, setAssetPath, setErrorHandler, setMode, setupConsoleMocker, shuffleArray, writeTask };
|
|
4946
|
+
export { Build, Env, Fragment, Host, Mixin, type NewSpecPageOptions, ReactiveControllerHost, type SpecPage, createEvent, createTestingSystem, forceUpdate, getAssetPath, getElement, getHostRef, getMode, getRenderingRef, h, mockCompilerSystem, mockComponentMeta, mockConfig, mockDocument, mockLoadConfigInit, mockLogger, mockModule, mockValidatedConfig, mockWindow, newSpecPage, readTask, registerHost, registerInstance, setAssetPath, setErrorHandler, setMode, setupConsoleMocker, shuffleArray, writeTask };
|