@stencil/core 5.0.0-alpha.2 → 5.0.0-alpha.20
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/dist/app-data/index.d.ts +2 -0
- package/dist/{runtime/app-data → app-data}/index.js +18 -13
- package/dist/{client-DucyoZT4.mjs → client-CvcvHKz4.mjs} +2474 -2295
- package/dist/compiler/index.d.mts +171 -6
- package/dist/compiler/index.mjs +4 -3
- package/dist/compiler/utils/index.d.mts +2 -2
- package/dist/compiler/utils/index.mjs +3 -3
- package/dist/{compiler-DyK1_szo.mjs → compiler-CpPj2WRN.mjs} +15312 -13654
- package/dist/declarations/stencil-public-compiler.d.ts +4404 -2
- package/dist/declarations/stencil-public-compiler.js +2 -4
- package/dist/declarations/stencil-public-docs.d.ts +504 -1
- package/dist/declarations/stencil-public-runtime.d.ts +1982 -2
- package/dist/{index-fIuYTL9f.d.mts → index-3fu7WQs4.d.mts} +29 -2
- package/dist/{index-D-LlB2nw.d.mts → index-F3IidHM1.d.mts} +825 -1188
- package/dist/{index-BONzXKJt.d.ts → index-xAkMgLX_.d.ts} +88 -39
- package/dist/index.d.mts +1 -1
- package/dist/index.mjs +2 -2
- package/dist/jsx-runtime.d.mts +18 -0
- package/dist/jsx-runtime.mjs +2 -0
- package/dist/{node-BWBQAh8C.mjs → node-DKVq_Ud0.mjs} +20 -30
- package/dist/regular-expression-CFVJOTUh.mjs +508 -0
- package/dist/{runtime-CqlPYKjW.js → runtime/client/lazy.js} +2713 -2517
- package/dist/runtime/client/{index.d.ts → runtime.d.ts} +106 -78
- package/dist/runtime/client/{index.js → runtime.js} +2575 -2503
- package/dist/runtime/index.d.ts +58 -29
- package/dist/runtime/index.js +4822 -2
- package/dist/runtime/server/index.d.mts +103 -70
- package/dist/runtime/server/index.mjs +2567 -2358
- package/dist/runtime/server/runner.d.mts +44 -48
- package/dist/runtime/server/runner.mjs +347 -777
- package/dist/signals/index.d.ts +47 -0
- package/dist/signals/index.js +199 -0
- 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 +97 -3
- package/dist/testing/index.mjs +367 -59
- package/dist/{validation-BR7tMYEv.mjs → validation-ByxKj8bC.mjs} +116 -99
- package/package.json +47 -38
- package/dist/index-CHjZtib0.d.ts +0 -30
- package/dist/jsx-runtime-DBzBJLKk.d.ts +0 -28
- package/dist/jsx-runtime.d.ts +0 -2
- package/dist/jsx-runtime.js +0 -2
- package/dist/runtime/app-data/index.d.ts +0 -2
- package/dist/serialize-o-Sj1lvg.mjs +0 -792
- package/dist/stencil-public-compiler-C_X1iolo.d.ts +0 -4455
- package/dist/stencil-public-runtime-DlV8o7-z.d.ts +0 -1845
- /package/dist/{runtime/app-globals → app-globals}/index.d.ts +0 -0
- /package/dist/{runtime/app-globals → app-globals}/index.js +0 -0
- /package/dist/{chunk-CjcI7cDX.mjs → chunk-z9aeyW2b.mjs} +0 -0
package/README.md
ADDED
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
<p align="center">
|
|
2
|
+
<a href="#">
|
|
3
|
+
<img alt="stencil-logo" src="https://github.com/stenciljs/core/blob/main/stencil-logo.png" width="60">
|
|
4
|
+
</a>
|
|
5
|
+
</p>
|
|
6
|
+
|
|
7
|
+
<h1 align="center">
|
|
8
|
+
Stencil
|
|
9
|
+
</h1>
|
|
10
|
+
|
|
11
|
+
<p align="center">
|
|
12
|
+
A compiler for generating <a href="https://www.webcomponents.org/introduction" target="_blank" rel="noopener noref">Web Components</a> using technologies like TypeScript and JSX, built by the <a href="https://ionic.io/">Ionic team</a>.
|
|
13
|
+
</p>
|
|
14
|
+
|
|
15
|
+
<p align="center">
|
|
16
|
+
<a href="https://www.npmjs.com/package/@stencil/core">
|
|
17
|
+
<img src="https://img.shields.io/npm/v/@stencil/core.svg" alt="StencilJS is released under the MIT license." /></a>
|
|
18
|
+
<a href="https://github.com/stenciljs/core/blob/main/LICENSE.md">
|
|
19
|
+
<img src="https://img.shields.io/badge/license-MIT-yellow.svg" alt="StencilJS is released under the MIT license." />
|
|
20
|
+
</a>
|
|
21
|
+
<a href="https://github.com/stenciljs/core/blob/main/CONTRIBUTING.md">
|
|
22
|
+
<img src="https://img.shields.io/badge/PRs-welcome-brightgreen.svg" alt="PRs welcome!" />
|
|
23
|
+
</a>
|
|
24
|
+
<a href="https://twitter.com/stenciljs">
|
|
25
|
+
<img src="https://img.shields.io/badge/follow-%40stenciljs-1DA1F2?logo=twitter" alt="Follow @stenciljs">
|
|
26
|
+
</a>
|
|
27
|
+
<a href="https://chat.stenciljs.com">
|
|
28
|
+
<img src="https://img.shields.io/discord/520266681499779082?color=7289DA&label=%23stencil&logo=discord&logoColor=white" alt="Official Ionic Discord" />
|
|
29
|
+
</a>
|
|
30
|
+
</p>
|
|
31
|
+
|
|
32
|
+
<h2 align="center">
|
|
33
|
+
<a href="https://stenciljs.com/docs/getting-started#starting-a-new-project">Quick Start</a>
|
|
34
|
+
<span> · </span>
|
|
35
|
+
<a href="https://stenciljs.com/docs/introduction">Documentation</a>
|
|
36
|
+
<span> · </span>
|
|
37
|
+
<a href="https://github.com/stenciljs/core/blob/main/CONTRIBUTING.md">Contribute</a>
|
|
38
|
+
<span> · </span>
|
|
39
|
+
<a href="https://ionicframework.com/blog/tag/stencil/">Blog</a>
|
|
40
|
+
<br />
|
|
41
|
+
Community:
|
|
42
|
+
<a href="https://chat.stenciljs.com">Discord</a>
|
|
43
|
+
<span> · </span>
|
|
44
|
+
<a href="https://forum.ionicframework.com/c/stencil/21/">Forums</a>
|
|
45
|
+
<span> · </span>
|
|
46
|
+
<a href="https://twitter.com/stenciljs">Twitter</a>
|
|
47
|
+
</h2>
|
|
48
|
+
|
|
49
|
+
### Getting Started
|
|
50
|
+
|
|
51
|
+
Start a new project by following our quick [Getting Started guide](https://stenciljs.com/docs/getting-started).
|
|
52
|
+
We would love to hear from you!
|
|
53
|
+
If you have any feedback or run into issues using Stencil, please file an [issue](https://github.com/stenciljs/core/issues/new) on this repository.
|
|
54
|
+
|
|
55
|
+
### Examples
|
|
56
|
+
A Stencil component looks a lot like a class-based React component, with the addition of TypeScript decorators:
|
|
57
|
+
```tsx
|
|
58
|
+
import { Component, Prop, h } from '@stencil/core';
|
|
59
|
+
|
|
60
|
+
@Component({
|
|
61
|
+
tag: 'my-component', // the name of the component's custom HTML tag
|
|
62
|
+
styleUrl: 'my-component.css', // css styles to apply to the component
|
|
63
|
+
shadow: true, // this component uses the ShadowDOM
|
|
64
|
+
})
|
|
65
|
+
export class MyComponent {
|
|
66
|
+
// The component accepts two arguments:
|
|
67
|
+
@Prop() first: string;
|
|
68
|
+
@Prop() last: string;
|
|
69
|
+
|
|
70
|
+
//The following HTML is rendered when our component is used
|
|
71
|
+
render() {
|
|
72
|
+
return (
|
|
73
|
+
<div>
|
|
74
|
+
Hello, my name is {this.first} {this.last}
|
|
75
|
+
</div>
|
|
76
|
+
);
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
```
|
|
80
|
+
|
|
81
|
+
The component above can be used like any other HTML element:
|
|
82
|
+
|
|
83
|
+
```html
|
|
84
|
+
<my-component first="Stencil" last="JS"></my-component>
|
|
85
|
+
```
|
|
86
|
+
|
|
87
|
+
Since Stencil generates web components, they work in any major framework or with no framework at all.
|
|
88
|
+
In many cases, Stencil can be used as a drop in replacement for traditional frontend framework, though using it as such is certainly not required.
|
|
89
|
+
|
|
90
|
+
### Contributing
|
|
91
|
+
|
|
92
|
+
Thanks for your interest in contributing!
|
|
93
|
+
Please take a moment to read up on our guidelines for [contributing](https://github.com/stenciljs/core/blob/main/CONTRIBUTING.md). We've created comprehensive technical documentation for contributors that explains Stencil's internal architecture, including the compiler, runtime, build system, and other core components in the [/docs](/docs/) directory.
|
|
94
|
+
Please note that this project is released with a [Contributor Code of Conduct](https://github.com/stenciljs/core/blob/main/CODE_OF_CONDUCT.md). By participating in this project you agree to abide by its terms.
|
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
* }
|
|
16
16
|
* ```
|
|
17
17
|
*
|
|
18
|
-
* `virtual:app-data`, the module that `BUILD` is imported from, is an alias for
|
|
18
|
+
* `virtual:app-data`, the module that `BUILD` is imported from, is an alias for `@stencil/core/app-data`, and is
|
|
19
19
|
* partially referenced by {@link STENCIL_APP_DATA_ID}. The `src/compiler/bundle/app-data-plugin.ts` references
|
|
20
20
|
* `STENCIL_APP_DATA_ID` uses it to replace these defaults with {@link BuildConditionals} that are derived from a
|
|
21
21
|
* Stencil project's contents (i.e. metadata from the components). This replacement happens at a Stencil project's
|
|
@@ -30,7 +30,6 @@ const BUILD = {
|
|
|
30
30
|
hostListenerTargetWindow: true,
|
|
31
31
|
hostListenerTargetDocument: true,
|
|
32
32
|
hostListenerTargetBody: true,
|
|
33
|
-
hostListenerTargetParent: false,
|
|
34
33
|
hostListenerTarget: true,
|
|
35
34
|
member: true,
|
|
36
35
|
method: true,
|
|
@@ -41,11 +40,12 @@ const BUILD = {
|
|
|
41
40
|
reflect: true,
|
|
42
41
|
scoped: true,
|
|
43
42
|
shadowDom: true,
|
|
43
|
+
shadowModeClosed: false,
|
|
44
44
|
slot: true,
|
|
45
45
|
cssAnnotations: true,
|
|
46
46
|
state: true,
|
|
47
47
|
style: true,
|
|
48
|
-
formAssociated:
|
|
48
|
+
formAssociated: true,
|
|
49
49
|
svg: true,
|
|
50
50
|
updatable: true,
|
|
51
51
|
vdomAttribute: true,
|
|
@@ -61,24 +61,32 @@ const BUILD = {
|
|
|
61
61
|
vdomText: true,
|
|
62
62
|
propChangeCallback: true,
|
|
63
63
|
taskQueue: true,
|
|
64
|
+
lifecycle: true,
|
|
65
|
+
serializer: true,
|
|
66
|
+
deserializer: true,
|
|
67
|
+
patchAll: true,
|
|
68
|
+
patchChildren: true,
|
|
69
|
+
patchClone: true,
|
|
70
|
+
patchInsert: true,
|
|
64
71
|
hotModuleReplacement: false,
|
|
65
72
|
isDebug: false,
|
|
66
73
|
isDev: false,
|
|
67
74
|
isTesting: false,
|
|
68
75
|
hydrateServerSide: false,
|
|
69
|
-
hydrateClientSide:
|
|
76
|
+
hydrateClientSide: true,
|
|
70
77
|
lifecycleDOMEvents: false,
|
|
71
78
|
lazyLoad: false,
|
|
72
79
|
profile: false,
|
|
73
80
|
slotRelocation: true,
|
|
74
|
-
|
|
75
|
-
|
|
81
|
+
lightDomPatches: true,
|
|
82
|
+
slotChildNodes: true,
|
|
83
|
+
slotCloneNode: true,
|
|
84
|
+
slotDomMutations: true,
|
|
85
|
+
slotTextContent: true,
|
|
76
86
|
hydratedAttribute: false,
|
|
77
87
|
hydratedClass: true,
|
|
78
|
-
scopedSlotTextContentFix: false,
|
|
79
|
-
shadowDomShim: false,
|
|
80
|
-
slotChildNodesFix: false,
|
|
81
88
|
invisiblePrehydration: true,
|
|
89
|
+
staticHydrationStyles: false,
|
|
82
90
|
propBoolean: true,
|
|
83
91
|
propNumber: true,
|
|
84
92
|
propString: true,
|
|
@@ -88,10 +96,7 @@ const BUILD = {
|
|
|
88
96
|
shadowSlotAssignmentManual: false,
|
|
89
97
|
initializeNextTick: false,
|
|
90
98
|
asyncLoading: true,
|
|
91
|
-
asyncQueue: false
|
|
92
|
-
transformTagName: false,
|
|
93
|
-
attachStyles: true,
|
|
94
|
-
experimentalSlotFixes: false
|
|
99
|
+
asyncQueue: false
|
|
95
100
|
};
|
|
96
101
|
const Env = {};
|
|
97
102
|
const NAMESPACE = "app";
|