@stencil/core 5.0.0-next.0 → 5.0.0-rc.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (58) hide show
  1. package/README.md +94 -0
  2. package/bin/stencil.mjs +1 -1
  3. package/dist/app-data/index.d.ts +2 -0
  4. package/dist/{runtime/app-data → app-data}/index.js +23 -15
  5. package/dist/{runtime/app-globals → app-globals}/index.js +1 -2
  6. package/dist/client-ClM4H9-P.mjs +2496 -0
  7. package/dist/compiler/browser.d.ts +1573 -0
  8. package/dist/compiler/browser.js +16998 -0
  9. package/dist/compiler/index.d.mts +284 -7
  10. package/dist/compiler/index.mjs +3 -9
  11. package/dist/compiler/utils/index.d.mts +272 -3
  12. package/dist/compiler/utils/index.mjs +4 -5
  13. package/dist/{transpile-CJQcQEVa.mjs → compiler-DFanjq9z.mjs} +20984 -15554
  14. package/dist/declarations/stencil-ext-modules.d.ts +8 -8
  15. package/dist/declarations/stencil-public-compiler.d.ts +1016 -840
  16. package/dist/declarations/stencil-public-compiler.js +3 -5
  17. package/dist/declarations/stencil-public-docs.d.ts +441 -376
  18. package/dist/declarations/stencil-public-docs.js +0 -0
  19. package/dist/declarations/stencil-public-runtime.d.ts +361 -113
  20. package/dist/fragment-Di1hWOC8.mjs +4 -0
  21. package/dist/helpers-Cpp3qc3u.mjs +524 -0
  22. package/dist/{index-szczUd2l.d.mts → index-DvfFOkiJ.d.mts} +1466 -2044
  23. package/dist/{stencil-private-Cgcr414u.d.ts → index-XQHZl0MW.d.ts} +308 -114
  24. package/dist/index-aBMJC5F9.d.mts +104 -0
  25. package/dist/index.d.mts +14 -2
  26. package/dist/index.mjs +171 -4
  27. package/dist/jsx-runtime.d.mts +24 -0
  28. package/dist/jsx-runtime.mjs +3 -0
  29. package/dist/mock-doc.mjs +2 -3
  30. package/dist/{node-sys-BGURUNOZ.mjs → node-DJP8JuAS.mjs} +176 -197
  31. package/dist/rolldown-runtime-BhDjJH2R.mjs +15 -0
  32. package/dist/{client-DR9zhmKG.mjs → runtime/client/lazy.js} +3780 -2652
  33. package/dist/runtime/client/{index.d.ts → runtime.d.ts} +516 -227
  34. package/dist/runtime/client/{index.js → runtime.js} +3588 -2856
  35. package/dist/runtime/index.d.ts +90 -72
  36. package/dist/runtime/index.js +3461 -2837
  37. package/dist/runtime/server/index.d.mts +243 -219
  38. package/dist/runtime/server/index.mjs +3763 -3352
  39. package/dist/runtime/server/runner.d.mts +114 -47
  40. package/dist/runtime/server/runner.mjs +12710 -763
  41. package/dist/signals/index.d.ts +58 -0
  42. package/dist/signals/index.js +182 -0
  43. package/dist/sys/node/index.d.mts +1 -3
  44. package/dist/sys/node/index.mjs +2 -7
  45. package/dist/sys/node/worker.d.mts +1 -1
  46. package/dist/sys/node/worker.mjs +3 -12
  47. package/dist/testing/index.d.mts +4763 -12
  48. package/dist/testing/index.mjs +7939 -619
  49. package/dist/util-C-H1H84W.mjs +731 -0
  50. package/dist/validation-ByYYKvnS.mjs +825 -0
  51. package/package.json +91 -59
  52. package/dist/chunk-ClPoSABd.mjs +0 -21
  53. package/dist/index-Bxo2jCf6.d.mts +0 -77
  54. package/dist/runtime/app-data/index.d.ts +0 -30
  55. package/dist/serialize-BJvhE9aQ.mjs +0 -775
  56. package/dist/validation-BdcPruW_.mjs +0 -1451
  57. /package/{LICENSE.md → LICENSE} +0 -0
  58. /package/dist/{runtime/app-globals → app-globals}/index.d.ts +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). Each package's source is documented with short `readme.md` files next to the code they describe (e.g. [`packages/core/src/compiler/readme.md`](https://github.com/stenciljs/core/blob/main/packages/core/src/compiler/readme.md), [`packages/core/src/runtime/readme.md`](https://github.com/stenciljs/core/blob/main/packages/core/src/runtime/readme.md)) - browse a package's `src/` directory to find them.
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.
package/bin/stencil.mjs CHANGED
@@ -1,2 +1,2 @@
1
1
  #!/usr/bin/env node
2
- import '@stencil/cli/cli'
2
+ import '@stencil/cli/cli';
@@ -0,0 +1,2 @@
1
+ import { n as Env, r as NAMESPACE, t as BUILD } from "../index-XQHZl0MW.js";
2
+ export { BUILD, Env, NAMESPACE };
@@ -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 the `@stencil/core/runtime/app-data`, and is
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: false,
48
+ formAssociated: true,
49
49
  svg: true,
50
50
  updatable: true,
51
51
  vdomAttribute: true,
@@ -56,29 +56,38 @@ const BUILD = {
56
56
  vdomListener: true,
57
57
  vdomRef: true,
58
58
  vdomPropOrAttr: true,
59
+ vdomPropOrAttrPrefix: true,
59
60
  vdomRender: true,
60
61
  vdomStyle: true,
61
62
  vdomText: true,
62
63
  propChangeCallback: true,
63
64
  taskQueue: true,
65
+ lifecycle: true,
66
+ serializer: true,
67
+ deserializer: true,
68
+ patchAll: true,
69
+ patchChildren: true,
70
+ patchClone: true,
71
+ patchInsert: true,
64
72
  hotModuleReplacement: false,
65
73
  isDebug: false,
66
74
  isDev: false,
67
75
  isTesting: false,
68
76
  hydrateServerSide: false,
69
- hydrateClientSide: false,
77
+ hydrateClientSide: true,
70
78
  lifecycleDOMEvents: false,
71
79
  lazyLoad: false,
72
80
  profile: false,
73
81
  slotRelocation: true,
74
- appendChildSlotFix: false,
75
- cloneNodeFix: false,
82
+ lightDomPatches: true,
83
+ slotChildNodes: true,
84
+ slotCloneNode: true,
85
+ slotDomMutations: true,
86
+ slotTextContent: true,
76
87
  hydratedAttribute: false,
77
88
  hydratedClass: true,
78
- scopedSlotTextContentFix: false,
79
- shadowDomShim: false,
80
- slotChildNodesFix: false,
81
89
  invisiblePrehydration: true,
90
+ staticHydrationStyles: false,
82
91
  propBoolean: true,
83
92
  propNumber: true,
84
93
  propString: true,
@@ -86,15 +95,14 @@ const BUILD = {
86
95
  devTools: false,
87
96
  shadowDelegatesFocus: true,
88
97
  shadowSlotAssignmentManual: false,
98
+ shadowClonable: true,
99
+ shadowSerializable: true,
100
+ shadowReferenceTarget: true,
89
101
  initializeNextTick: false,
90
102
  asyncLoading: true,
91
- asyncQueue: false,
92
- transformTagName: false,
93
- attachStyles: true,
94
- experimentalSlotFixes: false
103
+ asyncQueue: false
95
104
  };
96
105
  const Env = {};
97
106
  const NAMESPACE = "app";
98
-
99
107
  //#endregion
100
- export { BUILD, Env, NAMESPACE };
108
+ export { BUILD, Env, NAMESPACE };
@@ -1,6 +1,5 @@
1
1
  //#region src/app-globals/index.ts
2
2
  const globalScripts = () => {};
3
3
  const globalStyles = "";
4
-
5
4
  //#endregion
6
- export { globalScripts, globalStyles };
5
+ export { globalScripts, globalStyles };