@stencil/core 5.0.0-beta.3 → 5.0.0-beta.30
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-BYvfR_Hx.mjs} +127 -68
- package/dist/compiler/browser.d.ts +114 -81
- package/dist/compiler/browser.js +733 -336
- 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-BPgV6bA4.mjs → compiler-6RhuOkQ0.mjs} +4829 -2895
- package/dist/declarations/stencil-public-compiler.d.ts +152 -129
- package/dist/declarations/stencil-public-docs.d.ts +23 -0
- package/dist/declarations/stencil-public-runtime.d.ts +60 -58
- package/dist/{index-DmHmu3y0.d.mts → index-BGUOG9Wc.d.mts} +6 -2
- package/dist/{index-BXAcVN2j.d.ts → index-BHciXst1.d.ts} +57 -55
- package/dist/{index-BopBfjPu.d.mts → index-BogZpjP2.d.mts} +150 -127
- package/dist/index.d.mts +3 -0
- package/dist/index.mjs +1 -1
- package/dist/jsx-runtime.d.mts +6 -0
- package/dist/jsx-runtime.mjs +1 -1
- package/dist/{node-75gQKkFz.mjs → node-CvPPhnWO.mjs} +41 -47
- package/dist/runtime/client/lazy.js +252 -189
- package/dist/runtime/client/runtime.d.ts +71 -66
- package/dist/runtime/client/runtime.js +252 -189
- package/dist/runtime/index.d.ts +4 -5
- package/dist/runtime/index.js +250 -187
- package/dist/runtime/server/index.d.mts +11 -11
- package/dist/runtime/server/index.mjs +302 -228
- 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 +14 -35
- 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 +136 -120
- package/dist/testing/index.mjs +259 -201
- 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;
|
|
@@ -1244,11 +1276,6 @@ interface Config extends StencilConfig {
|
|
|
1244
1276
|
tsWatchOptions?: any;
|
|
1245
1277
|
_isValidated?: boolean;
|
|
1246
1278
|
_isTesting?: boolean;
|
|
1247
|
-
/**
|
|
1248
|
-
* Internal flag set when --docs CLI flag is used.
|
|
1249
|
-
* Forces docs output targets to build even in dev mode.
|
|
1250
|
-
*/
|
|
1251
|
-
_docsFlag?: boolean;
|
|
1252
1279
|
/**
|
|
1253
1280
|
* Whether running in a CI environment (disables interactive features, adjusts worker count)
|
|
1254
1281
|
*/
|
|
@@ -1531,7 +1558,7 @@ interface CompilerSystem {
|
|
|
1531
1558
|
name: 'node' | 'in-memory';
|
|
1532
1559
|
version: string;
|
|
1533
1560
|
events?: BuildEvents;
|
|
1534
|
-
details
|
|
1561
|
+
details: SystemDetails;
|
|
1535
1562
|
/**
|
|
1536
1563
|
* Add a callback which will be ran when destroy() is called.
|
|
1537
1564
|
*/
|
|
@@ -1544,14 +1571,15 @@ interface CompilerSystem {
|
|
|
1544
1571
|
* SYNC! Always returns a boolean, does not throw.
|
|
1545
1572
|
*/
|
|
1546
1573
|
accessSync(p: string): boolean;
|
|
1547
|
-
applyGlobalPatch?(fromDir: string): Promise<void>;
|
|
1548
1574
|
applyPrerenderGlobalPatch?(opts: {
|
|
1549
1575
|
devServerHostUrl: string;
|
|
1550
1576
|
window: any;
|
|
1551
1577
|
}): void;
|
|
1552
|
-
|
|
1553
|
-
|
|
1554
|
-
|
|
1578
|
+
/**
|
|
1579
|
+
* Check npm for a newer Stencil version. Resolves a function that logs the result.
|
|
1580
|
+
*/
|
|
1581
|
+
checkVersion(logger: Logger, currentVersion: string): Promise<() => void>;
|
|
1582
|
+
copy(copyTasks: Required<CopyTask>[], srcDir: string): Promise<CopyResults>;
|
|
1555
1583
|
/**
|
|
1556
1584
|
* Always returns a boolean if the files were copied or not. Does not throw.
|
|
1557
1585
|
*/
|
|
@@ -1576,7 +1604,7 @@ interface CompilerSystem {
|
|
|
1576
1604
|
/**
|
|
1577
1605
|
* Each platform has a different way to dynamically import modules.
|
|
1578
1606
|
*/
|
|
1579
|
-
dynamicImport
|
|
1607
|
+
dynamicImport(p: string): Promise<any>;
|
|
1580
1608
|
/**
|
|
1581
1609
|
* Creates the worker controller for the current system.
|
|
1582
1610
|
*
|
|
@@ -1590,20 +1618,14 @@ interface CompilerSystem {
|
|
|
1590
1618
|
* process.exit()
|
|
1591
1619
|
*/
|
|
1592
1620
|
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
1621
|
/**
|
|
1600
1622
|
* Generates a sha1 digest encoded as HEX
|
|
1601
1623
|
*/
|
|
1602
|
-
generateContentHash
|
|
1624
|
+
generateContentHash(content: string | any, length?: number): Promise<string>;
|
|
1603
1625
|
/**
|
|
1604
1626
|
* Generates a sha1 digest encoded as HEX from a file path
|
|
1605
1627
|
*/
|
|
1606
|
-
generateFileHash
|
|
1628
|
+
generateFileHash(filePath: string | any, length?: number): Promise<string>;
|
|
1607
1629
|
/**
|
|
1608
1630
|
* Get the current directory.
|
|
1609
1631
|
*/
|
|
@@ -1612,7 +1634,6 @@ interface CompilerSystem {
|
|
|
1612
1634
|
* The compiler's executing path.
|
|
1613
1635
|
*/
|
|
1614
1636
|
getCompilerExecutingPath(): string;
|
|
1615
|
-
getEnvironmentVar?(key: string): string;
|
|
1616
1637
|
/**
|
|
1617
1638
|
* Gets the absolute file path when for a dependency module.
|
|
1618
1639
|
*/
|
|
@@ -1651,11 +1672,7 @@ interface CompilerSystem {
|
|
|
1651
1672
|
* Normalize file system path.
|
|
1652
1673
|
*/
|
|
1653
1674
|
normalizePath(p: string): string;
|
|
1654
|
-
onProcessInterrupt
|
|
1655
|
-
parseYarnLockFile?: (content: string) => {
|
|
1656
|
-
type: 'success' | 'merge' | 'conflict';
|
|
1657
|
-
object: any;
|
|
1658
|
-
};
|
|
1675
|
+
onProcessInterrupt(cb: () => void): void;
|
|
1659
1676
|
platformPath: PlatformPath;
|
|
1660
1677
|
/**
|
|
1661
1678
|
* All return paths are full normalized paths, not just the basenames. Always returns an array, does not throw.
|
|
@@ -1691,6 +1708,9 @@ interface CompilerSystem {
|
|
|
1691
1708
|
* Rename old path to new path. Does not throw.
|
|
1692
1709
|
*/
|
|
1693
1710
|
rename(oldPath: string, newPath: string): Promise<CompilerSystemRenameResults>;
|
|
1711
|
+
/**
|
|
1712
|
+
* Assigned by the compiler. Used by plugins (e.g. `@stencil/sass`) to resolve `~` imports.
|
|
1713
|
+
*/
|
|
1694
1714
|
resolveModuleId?(opts: ResolveModuleIdOptions): Promise<ResolveModuleIdResults>;
|
|
1695
1715
|
resolvePath(p: string): string;
|
|
1696
1716
|
/**
|
|
@@ -1873,6 +1893,7 @@ interface CompilerBuildResults {
|
|
|
1873
1893
|
buildId: number;
|
|
1874
1894
|
componentGraph?: BuildResultsComponentGraph;
|
|
1875
1895
|
components: ComponentCompilerMeta[];
|
|
1896
|
+
cssOnlyComponents: ComponentCompilerMeta[];
|
|
1876
1897
|
diagnostics: Diagnostic[];
|
|
1877
1898
|
dirsAdded: string[];
|
|
1878
1899
|
dirsDeleted: string[];
|
|
@@ -1889,6 +1910,15 @@ interface CompilerBuildResults {
|
|
|
1889
1910
|
namespace: string;
|
|
1890
1911
|
fsNamespace: string;
|
|
1891
1912
|
outputs: BuildOutput[];
|
|
1913
|
+
/**
|
|
1914
|
+
* Absolute paths to every global stylesheet, in cascade order: each `global-style` output
|
|
1915
|
+
* target's compiled CSS in the order those targets are declared in `config.outputTargets` - or,
|
|
1916
|
+
* with none configured, the generated `{fsNamespace}.css` holding Stencil's auto-placed CSS (when
|
|
1917
|
+
* emitted). Unlike `outputs`, which groups files by type and sorts them alphabetically, this
|
|
1918
|
+
* preserves author-intended order for consumers like the dev-server's auto-generated component
|
|
1919
|
+
* preview.
|
|
1920
|
+
*/
|
|
1921
|
+
globalStyleFiles: string[];
|
|
1892
1922
|
rootDir: string;
|
|
1893
1923
|
srcDir: string;
|
|
1894
1924
|
timestamp: string;
|
|
@@ -1904,6 +1934,7 @@ interface HotModuleReplacement {
|
|
|
1904
1934
|
componentsUpdated?: string[];
|
|
1905
1935
|
excludeHmr?: string[];
|
|
1906
1936
|
externalStylesUpdated?: string[];
|
|
1937
|
+
globalStylesUpdated?: HmrGlobalStyleUpdate[];
|
|
1907
1938
|
imagesUpdated?: string[];
|
|
1908
1939
|
indexHtmlUpdated?: boolean;
|
|
1909
1940
|
inlineStylesUpdated?: HmrStyleUpdate[];
|
|
@@ -1918,6 +1949,15 @@ interface HmrStyleUpdate {
|
|
|
1918
1949
|
styleTag: string;
|
|
1919
1950
|
styleText: string;
|
|
1920
1951
|
}
|
|
1952
|
+
/**
|
|
1953
|
+
* A live-reload update for a `global-style` output target's CSS. Applied on
|
|
1954
|
+
* the client by matching `fileName` against the `<link>` that loads it and
|
|
1955
|
+
* inserting/updating an adjacent `<style>` override
|
|
1956
|
+
*/
|
|
1957
|
+
interface HmrGlobalStyleUpdate {
|
|
1958
|
+
fileName: string;
|
|
1959
|
+
styleText: string;
|
|
1960
|
+
}
|
|
1921
1961
|
type BuildOnEventRemove = () => boolean;
|
|
1922
1962
|
interface BuildEvents extends BuildOnEvents, BuildEmitEvents {
|
|
1923
1963
|
unsubscribeAll(): void;
|
|
@@ -2072,7 +2112,9 @@ interface CopyTask {
|
|
|
2072
2112
|
/**
|
|
2073
2113
|
* Additional glob patterns to exclude from the copy operation, merged with
|
|
2074
2114
|
* the built-in defaults: `__mocks__`, `__fixtures__`, `dist`, hidden dirs,
|
|
2075
|
-
* `.ds_store`, `.gitignore`, `desktop.ini`, `thumbs.db`.
|
|
2115
|
+
* `.ds_store`, `.gitignore`, `desktop.ini`, `thumbs.db`. For a directory
|
|
2116
|
+
* `src`, patterns match paths relative to that directory; an explicitly
|
|
2117
|
+
* named `src` file is never ignored.
|
|
2076
2118
|
*/
|
|
2077
2119
|
ignore?: string[];
|
|
2078
2120
|
/**
|
|
@@ -2310,7 +2352,7 @@ interface OutputTargetCollection extends OutputTargetBaseNext {
|
|
|
2310
2352
|
* When `true` this flag will transform aliased import paths defined in
|
|
2311
2353
|
* a project's `tsconfig.json` to relative import paths in the compiled output.
|
|
2312
2354
|
*
|
|
2313
|
-
* Paths will be left in aliased format if `false
|
|
2355
|
+
* Paths will be left in aliased format if `false`. Defaults to `true`.
|
|
2314
2356
|
*
|
|
2315
2357
|
* @example
|
|
2316
2358
|
* // tsconfig.json
|
|
@@ -2412,11 +2454,11 @@ interface OutputTargetGlobalStyle extends OutputTargetBaseNext {
|
|
|
2412
2454
|
* Controls whether this global stylesheet is injected into component shadow DOMs
|
|
2413
2455
|
* as a constructable stylesheet at runtime.
|
|
2414
2456
|
*
|
|
2415
|
-
* - `'none'
|
|
2457
|
+
* - `'none'`: Don't inject - stylesheet must be loaded externally (e.g., via `<link>`)
|
|
2416
2458
|
* - `'client'`: Inject only in client builds, not SSR (reduces SSR output size)
|
|
2417
2459
|
* - `'all'`: Inject in both client and SSR builds
|
|
2418
2460
|
*
|
|
2419
|
-
* @default 'none'
|
|
2461
|
+
* @default 'client' when the stylesheet comes from `globalStyle` (or an auto-detected `src/global.*`), 'none' when `input` is set
|
|
2420
2462
|
*/
|
|
2421
2463
|
inject?: 'none' | 'client' | 'all';
|
|
2422
2464
|
}
|
|
@@ -2474,6 +2516,10 @@ interface OutputTargetSsr extends OutputTargetBase {
|
|
|
2474
2516
|
*/
|
|
2475
2517
|
cjs?: boolean;
|
|
2476
2518
|
}
|
|
2519
|
+
/**
|
|
2520
|
+
* Compiles the SSR hydrate app to a WASM plugin (via `extism-js`/QuickJS-ng) that can run
|
|
2521
|
+
* outside of Node
|
|
2522
|
+
*/
|
|
2477
2523
|
interface OutputTargetSsrWasm extends OutputTargetBase {
|
|
2478
2524
|
type: 'ssr-wasm';
|
|
2479
2525
|
/** Output directory. @default 'dist/ssr-wasm' */
|
|
@@ -2584,9 +2630,11 @@ interface OutputTargetDocsCustomElementsManifest extends OutputTargetBase {
|
|
|
2584
2630
|
type: 'docs-custom-elements-manifest';
|
|
2585
2631
|
/**
|
|
2586
2632
|
* The file path where the custom-elements.json manifest will be written.
|
|
2587
|
-
* Defaults to 'custom-elements.json'
|
|
2633
|
+
* Defaults to 'dist/custom-elements.json'.
|
|
2634
|
+
*
|
|
2635
|
+
* The `customElements` field of the project's `package.json` is set to this path.
|
|
2588
2636
|
*/
|
|
2589
|
-
file
|
|
2637
|
+
file?: string;
|
|
2590
2638
|
strict?: boolean;
|
|
2591
2639
|
}
|
|
2592
2640
|
interface OutputTargetDocsCustom extends OutputTargetBase {
|
|
@@ -2611,7 +2659,7 @@ interface OutputTargetDocsAgentSkill extends OutputTargetBase {
|
|
|
2611
2659
|
/**
|
|
2612
2660
|
* The skill's name, used in the `SKILL.md` frontmatter.
|
|
2613
2661
|
*
|
|
2614
|
-
* Defaults to
|
|
2662
|
+
* Defaults to {@link Config.namespace}, lowercased, with anything other than letters and numbers replaced by `-`.
|
|
2615
2663
|
*/
|
|
2616
2664
|
name?: string;
|
|
2617
2665
|
/**
|
|
@@ -2674,10 +2722,8 @@ interface OutputTargetStandalone extends OutputTargetBaseNext {
|
|
|
2674
2722
|
type: 'standalone';
|
|
2675
2723
|
empty?: boolean;
|
|
2676
2724
|
/**
|
|
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.
|
|
2725
|
+
* When `true`, all `@stencil/core/*` module references are treated as external
|
|
2726
|
+
* during bundling rather than being included in the generated output.
|
|
2681
2727
|
*
|
|
2682
2728
|
* @default false
|
|
2683
2729
|
*/
|
|
@@ -2741,8 +2787,10 @@ interface OutputTargetBase {
|
|
|
2741
2787
|
* This improves dev build times by not generating production-only artifacts.
|
|
2742
2788
|
*
|
|
2743
2789
|
* Defaults vary by output target type:
|
|
2744
|
-
* - `loader-bundle`: `
|
|
2745
|
-
* - `standalone`: `true`
|
|
2790
|
+
* - `loader-bundle`: `true` (skips the npm distribution files; the browser bundle always builds)
|
|
2791
|
+
* - `standalone`: `true` if `loader-bundle` is also configured, otherwise `false`
|
|
2792
|
+
* - `types`, `collection`, `ssr-wasm`: `true` (skips in dev)
|
|
2793
|
+
* - `assets`, `global-style`: `false` (always runs)
|
|
2746
2794
|
* - `ssr`: `true` (skips in dev, unless `devServer.ssr` is enabled)
|
|
2747
2795
|
* - `docs-*`: `true` (skips in dev)
|
|
2748
2796
|
* - `custom`: `true` (skips in dev)
|
|
@@ -2912,10 +2960,6 @@ interface Diagnostic {
|
|
|
2912
2960
|
relFilePath?: string | undefined;
|
|
2913
2961
|
type: string;
|
|
2914
2962
|
}
|
|
2915
|
-
interface CacheStorage {
|
|
2916
|
-
get(key: string): Promise<any>;
|
|
2917
|
-
set(key: string, value: any): Promise<void>;
|
|
2918
|
-
}
|
|
2919
2963
|
/**
|
|
2920
2964
|
* Input for CSS optimization functions, including the input CSS
|
|
2921
2965
|
* string and a few boolean options which turn on or off various
|
|
@@ -2963,8 +3007,35 @@ interface LazyRequire {
|
|
|
2963
3007
|
require(fromDir: string, moduleId: string): any;
|
|
2964
3008
|
getModulePath(fromDir: string, moduleId: string): string;
|
|
2965
3009
|
}
|
|
3010
|
+
/**
|
|
3011
|
+
* A Stencil `resolveId`/`load`/`transform` plugin, as accepted by {@link StencilConfig.plugins}.
|
|
3012
|
+
*/
|
|
3013
|
+
interface Plugin$1 {
|
|
3014
|
+
name?: string;
|
|
3015
|
+
pluginType?: string;
|
|
3016
|
+
load?: (id: string, context: PluginCtx) => Promise<string> | string;
|
|
3017
|
+
resolveId?: (importee: string, importer: string, context: PluginCtx) => Promise<string> | string;
|
|
3018
|
+
transform?: (sourceText: string, id: string, context: PluginCtx) => Promise<PluginTransformResults> | PluginTransformResults;
|
|
3019
|
+
}
|
|
3020
|
+
type PluginTransformResults = PluginTransformationDescriptor | string | null;
|
|
3021
|
+
interface PluginTransformationDescriptor {
|
|
3022
|
+
code?: string;
|
|
3023
|
+
map?: string;
|
|
3024
|
+
id?: string;
|
|
3025
|
+
diagnostics?: Diagnostic[];
|
|
3026
|
+
dependencies?: string[];
|
|
3027
|
+
}
|
|
3028
|
+
interface PluginCtx {
|
|
3029
|
+
config: Config;
|
|
3030
|
+
sys: CompilerSystem;
|
|
3031
|
+
fs: InMemoryFileSystem;
|
|
3032
|
+
cache: Cache;
|
|
3033
|
+
diagnostics: Diagnostic[];
|
|
3034
|
+
}
|
|
2966
3035
|
//#endregion
|
|
2967
3036
|
//#region src/declarations/stencil-private.d.ts
|
|
3037
|
+
/** Build-time virtual `@import`s a `global-style` input can use to place Stencil-generated CSS. */
|
|
3038
|
+
type StencilVirtualImport = 'stencil-hydrate' | 'stencil-component-globals' | 'stencil-css-components';
|
|
2968
3039
|
interface SourceMap$1 {
|
|
2969
3040
|
file: string;
|
|
2970
3041
|
mappings: string;
|
|
@@ -3103,6 +3174,7 @@ interface BuildCtx {
|
|
|
3103
3174
|
esmComponentBundle: ReadonlyArray<BundleModule>;
|
|
3104
3175
|
commonJsComponentBundle: ReadonlyArray<BundleModule>;
|
|
3105
3176
|
components: ComponentCompilerMeta[];
|
|
3177
|
+
cssOnlyComponents: ComponentCompilerMeta[];
|
|
3106
3178
|
componentGraph: Map<string, string[]>;
|
|
3107
3179
|
config: ValidatedConfig;
|
|
3108
3180
|
createTimeSpan(msg: string, debug?: boolean): LoggerTimeSpan;
|
|
@@ -3151,6 +3223,9 @@ interface BuildCtx {
|
|
|
3151
3223
|
*/
|
|
3152
3224
|
stylesPromise: Promise<string>;
|
|
3153
3225
|
stylesUpdated: BuildStyleUpdate[];
|
|
3226
|
+
globalStylesUpdated: BuildGlobalStyleLinkUpdate[];
|
|
3227
|
+
/** Absolute path of the generated `{fsNamespace}.css`, when this build emitted one */
|
|
3228
|
+
stencilCssFile?: string;
|
|
3154
3229
|
timeSpan: LoggerTimeSpan;
|
|
3155
3230
|
timestamp: string;
|
|
3156
3231
|
transpileBuildCount: number;
|
|
@@ -3163,6 +3238,14 @@ interface BuildStyleUpdate {
|
|
|
3163
3238
|
styleText: string;
|
|
3164
3239
|
styleMode: string;
|
|
3165
3240
|
}
|
|
3241
|
+
/**
|
|
3242
|
+
* A live-reload update for a `global-style` output target's CSS, matched on
|
|
3243
|
+
* the client by `fileName` against the `<link>`
|
|
3244
|
+
*/
|
|
3245
|
+
interface BuildGlobalStyleLinkUpdate {
|
|
3246
|
+
fileName: string;
|
|
3247
|
+
styleText: string;
|
|
3248
|
+
}
|
|
3166
3249
|
type BuildTask = any;
|
|
3167
3250
|
interface CompilerBuildStats {
|
|
3168
3251
|
timestamp: string;
|
|
@@ -3304,6 +3387,12 @@ interface CompilerCtx {
|
|
|
3304
3387
|
cssModuleImports: Map<string, string[]>;
|
|
3305
3388
|
/** Cache of built global styles, keyed by input file path */
|
|
3306
3389
|
globalStyleCache: Map<string, string>;
|
|
3390
|
+
/** Cache of discovered CSS-only components from the last scan, keyed by absolute .css file path */
|
|
3391
|
+
cssOnlyComponentsCache: Map<string, ComponentCompilerMeta[]>;
|
|
3392
|
+
/** Contents of the last auto-placed `stencil-*` CSS, used to detect changes for HMR */
|
|
3393
|
+
stencilCss?: string;
|
|
3394
|
+
/** Virtual imports found in each built global style (post-preprocessing), keyed by input path */
|
|
3395
|
+
globalStyleVirtualImports: Map<string, Set<StencilVirtualImport>>;
|
|
3307
3396
|
collections: CollectionCompilerMeta[];
|
|
3308
3397
|
compilerOptions: any;
|
|
3309
3398
|
events: BuildEvents;
|
|
@@ -3449,7 +3538,7 @@ interface ComponentCompilerMeta extends ComponentCompilerFeatures {
|
|
|
3449
3538
|
* Custom states to initialize on the ElementInternals.states CustomStateSet.
|
|
3450
3539
|
* These are defined via @AttachInternals({ states: {...} }).
|
|
3451
3540
|
*/
|
|
3452
|
-
attachInternalsCustomStates:
|
|
3541
|
+
attachInternalsCustomStates: JsonDocsCustomState[];
|
|
3453
3542
|
componentClassName: string;
|
|
3454
3543
|
/**
|
|
3455
3544
|
* A list of web component tag names that are either:
|
|
@@ -3519,7 +3608,7 @@ interface ComponentCompilerMeta extends ComponentCompilerFeatures {
|
|
|
3519
3608
|
sourceFilePath: string;
|
|
3520
3609
|
sourceMapPath: string;
|
|
3521
3610
|
states: ComponentCompilerState[];
|
|
3522
|
-
styleDocs:
|
|
3611
|
+
styleDocs: StyleDoc[];
|
|
3523
3612
|
styles: StyleCompiler[];
|
|
3524
3613
|
globalStyles: ComponentGlobalStyle[];
|
|
3525
3614
|
tagName: string;
|
|
@@ -3722,20 +3811,6 @@ interface ComponentCompilerState {
|
|
|
3722
3811
|
* Custom states are exposed via the ElementInternals.states CustomStateSet
|
|
3723
3812
|
* and can be targeted with the CSS :state() pseudo-class.
|
|
3724
3813
|
*/
|
|
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
3814
|
/**
|
|
3740
3815
|
* Representation of JSDoc that is pulled off a node in the AST
|
|
3741
3816
|
*/
|
|
@@ -3747,44 +3822,7 @@ interface CompilerJsDoc {
|
|
|
3747
3822
|
/**
|
|
3748
3823
|
* Tags included in the JSDoc
|
|
3749
3824
|
*/
|
|
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;
|
|
3825
|
+
tags: JsonDocsTag[];
|
|
3788
3826
|
}
|
|
3789
3827
|
interface CompilerAssetDir {
|
|
3790
3828
|
absolutePath?: string;
|
|
@@ -3953,28 +3991,6 @@ interface Module {
|
|
|
3953
3991
|
hasVdomXlink: boolean;
|
|
3954
3992
|
hasSignalsImport: boolean;
|
|
3955
3993
|
}
|
|
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
3994
|
interface PrerenderUrlResults {
|
|
3979
3995
|
anchorUrls: string[];
|
|
3980
3996
|
diagnostics: Diagnostic[];
|
|
@@ -4926,4 +4942,4 @@ declare const Host: {};
|
|
|
4926
4942
|
//#region src/testing/platform/index.d.ts
|
|
4927
4943
|
declare const setMode: (handler: (elm: any) => string | undefined | null) => void;
|
|
4928
4944
|
//#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 };
|
|
4945
|
+
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 };
|