@stencil/core 4.40.1 → 4.41.0-dev.1767652714.953346e

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 (45) hide show
  1. package/cli/config-flags.d.ts +2 -2
  2. package/cli/index.cjs +9 -4
  3. package/cli/index.js +9 -4
  4. package/cli/package.json +1 -1
  5. package/compiler/package.json +1 -1
  6. package/compiler/stencil.js +307 -142
  7. package/dev-server/client/index.js +12 -12
  8. package/dev-server/client/package.json +1 -1
  9. package/dev-server/connector.html +3 -3
  10. package/dev-server/index.js +2 -2
  11. package/dev-server/package.json +1 -1
  12. package/dev-server/server-process.js +18 -11
  13. package/internal/app-data/package.json +1 -1
  14. package/internal/app-globals/package.json +1 -1
  15. package/internal/client/index.js +105 -25
  16. package/internal/client/package.json +1 -1
  17. package/internal/client/patch-browser.js +1 -1
  18. package/internal/hydrate/index.js +65 -26
  19. package/internal/hydrate/package.json +1 -1
  20. package/internal/hydrate/runner.js +4262 -4210
  21. package/internal/package.json +1 -1
  22. package/internal/stencil-core/jsx-dev-runtime.cjs +7 -0
  23. package/internal/stencil-core/jsx-dev-runtime.d.ts +23 -0
  24. package/internal/stencil-core/jsx-dev-runtime.js +2 -0
  25. package/internal/stencil-core/jsx-runtime.cjs +8 -0
  26. package/internal/stencil-core/jsx-runtime.d.ts +22 -0
  27. package/internal/stencil-core/jsx-runtime.js +2 -0
  28. package/internal/stencil-private.d.ts +20 -0
  29. package/internal/stencil-public-compiler.d.ts +6 -0
  30. package/internal/stencil-public-docs.d.ts +11 -0
  31. package/internal/stencil-public-runtime.d.ts +29 -0
  32. package/internal/testing/index.js +753 -638
  33. package/internal/testing/package.json +1 -1
  34. package/mock-doc/index.cjs +192 -135
  35. package/mock-doc/index.js +193 -135
  36. package/mock-doc/package.json +1 -1
  37. package/package.json +11 -1
  38. package/screenshot/index.js +29 -8
  39. package/screenshot/package.json +1 -1
  40. package/screenshot/pixel-match.js +1 -1
  41. package/sys/node/index.js +29 -29
  42. package/sys/node/package.json +1 -1
  43. package/sys/node/worker.js +1 -1
  44. package/testing/index.js +98 -70
  45. package/testing/package.json +1 -1
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@stencil/core/internal",
3
- "version": "4.40.1",
3
+ "version": "4.41.0-dev.1767652714.953346e",
4
4
  "description": "Stencil internals only to be imported by the Stencil Compiler. Breaking changes can and will happen at any time.",
5
5
  "main": "./index.js",
6
6
  "types": "./index.d.ts",
@@ -0,0 +1,7 @@
1
+ // Export automatic JSX development runtime (CommonJS)
2
+ // Note: This requires the client platform to be built
3
+ const client = require('../client/index.js');
4
+ module.exports = {
5
+ jsxDEV: client.jsxDEV,
6
+ Fragment: client.Fragment,
7
+ };
@@ -0,0 +1,23 @@
1
+ /**
2
+ * Automatic JSX Development Runtime type definitions for Stencil
3
+ *
4
+ * This module provides TypeScript type definitions for the automatic JSX development runtime.
5
+ * When using "jsx": "react-jsxdev" in tsconfig.json with "jsxImportSource": "@stencil/core",
6
+ * TypeScript will automatically import from this module in development mode.
7
+ */
8
+
9
+ import type { VNode } from '../stencil-public-runtime';
10
+
11
+ export { Fragment } from '../stencil-public-runtime';
12
+
13
+ /**
14
+ * JSX development runtime function for creating elements with debug info.
15
+ */
16
+ export function jsxDEV(
17
+ type: any,
18
+ props: any,
19
+ key?: string | number,
20
+ isStaticChildren?: boolean,
21
+ source?: any,
22
+ self?: any,
23
+ ): VNode;
@@ -0,0 +1,2 @@
1
+ // Re-export from the client platform (same pattern as index.js)
2
+ export { jsxDEV, Fragment } from '../client/index.js';
@@ -0,0 +1,8 @@
1
+ // Export automatic JSX runtime (CommonJS)
2
+ // Note: This requires the client platform to be built
3
+ const client = require('../client/index.js');
4
+ module.exports = {
5
+ jsx: client.jsx,
6
+ jsxs: client.jsxs,
7
+ Fragment: client.Fragment,
8
+ };
@@ -0,0 +1,22 @@
1
+ /**
2
+ * Automatic JSX Runtime type definitions for Stencil
3
+ *
4
+ * This module provides TypeScript type definitions for the automatic JSX runtime.
5
+ * When using "jsx": "react-jsx" or "jsx": "react-jsxdev" in tsconfig.json with
6
+ * "jsxImportSource": "@stencil/core", TypeScript will automatically import from
7
+ * these modules instead of requiring manual `h` imports.
8
+ */
9
+
10
+ import type { VNode } from '../stencil-public-runtime';
11
+
12
+ export { Fragment } from '../stencil-public-runtime';
13
+
14
+ /**
15
+ * JSX runtime function for creating elements in production mode.
16
+ */
17
+ export function jsx(type: any, props: any, key?: string): VNode;
18
+
19
+ /**
20
+ * JSX runtime function for creating elements with static children.
21
+ */
22
+ export function jsxs(type: any, props: any, key?: string): VNode;
@@ -0,0 +1,2 @@
1
+ // Re-export from the client platform (same pattern as index.js)
2
+ export { jsx, jsxs, Fragment } from '../client/index.js';
@@ -662,6 +662,17 @@ export interface ComponentCompilerTypeReference {
662
662
  * An ID for this type which is unique within a Stencil project.
663
663
  */
664
664
  id: string;
665
+ /**
666
+ * Whether this type was imported as a default import (e.g., `import MyEnum from './my-enum'`)
667
+ * vs a named import (e.g., `import { MyType } from './my-type'`)
668
+ */
669
+ isDefault?: boolean;
670
+ /**
671
+ * The name used in the import statement (before any user-defined alias).
672
+ * For `import { XAxisOption as moo }`, this would be "XAxisOption".
673
+ * This is the name exported by the source module.
674
+ */
675
+ referenceLocation?: string;
665
676
  }
666
677
  /**
667
678
  * Information about a type which is referenced by another type on a Stencil
@@ -1582,6 +1593,10 @@ export interface HostRef {
1582
1593
  $rmListeners$?: (() => void)[];
1583
1594
  $modeName$?: string;
1584
1595
  $renderCount$?: number;
1596
+ /**
1597
+ * Defer connectedCallback until after first render for components with slot relocation.
1598
+ */
1599
+ $deferredConnectedCallback$?: boolean;
1585
1600
  }
1586
1601
  export interface PlatformRuntime {
1587
1602
  /**
@@ -2306,6 +2321,11 @@ export interface TypesMemberNameData {
2306
2321
  * file that is using `localName`.
2307
2322
  */
2308
2323
  importName?: string;
2324
+ /**
2325
+ * Whether this is a default import/export (e.g., `import MyEnum from './my-enum'`)
2326
+ * vs a named import/export (e.g., `import { MyType } from './my-type'`)
2327
+ */
2328
+ isDefault?: boolean;
2309
2329
  }
2310
2330
  export interface TypesModule {
2311
2331
  isDep: boolean;
@@ -574,6 +574,12 @@ export interface StencilDevServerConfig {
574
574
  * Sets the server's port. Defaults to `3333`.
575
575
  */
576
576
  port?: number;
577
+ /**
578
+ * When set to `true`, the dev server will exit with an error if the specified port is already in use.
579
+ * When set to `false`, the dev server will automatically try the next available port.
580
+ * Defaults to `false`.
581
+ */
582
+ strictPort?: boolean;
577
583
  /**
578
584
  * When files are watched and updated, by default the dev server will use `hmr` (Hot Module Replacement)
579
585
  * to update the page without a full page refresh. To have the page do a full refresh use `pageReload`.
@@ -33,6 +33,17 @@ interface ComponentCompilerTypeReference {
33
33
  * An ID for this type which is unique within a Stencil project.
34
34
  */
35
35
  id: string;
36
+ /**
37
+ * Whether this type was imported as a default import (e.g., `import MyEnum from './my-enum'`)
38
+ * vs a named import (e.g., `import { MyType } from './my-type'`)
39
+ */
40
+ isDefault?: boolean;
41
+ /**
42
+ * The name used in the import statement (before any user-defined alias).
43
+ * For `import { XAxisOption as moo }`, this would be "XAxisOption".
44
+ * This is the name exported by the source module.
45
+ */
46
+ referenceLocation?: string;
36
47
  }
37
48
  interface ComponentCompilerReferencedType {
38
49
  /**
@@ -673,6 +673,35 @@ export declare function h(sel: any, text: string): VNode;
673
673
  export declare function h(sel: any, children: Array<VNode | undefined | null>): VNode;
674
674
  export declare function h(sel: any, data: VNodeData | null, text: string): VNode;
675
675
  export declare function h(sel: any, data: VNodeData | null, children: Array<VNode | undefined | null>): VNode;
676
+ /**
677
+ * Automatic JSX runtime functions for TypeScript's react-jsx mode.
678
+ * These functions are called automatically by TypeScript when using "jsx": "react-jsx".
679
+ * @param type type of node
680
+ * @param props properties of node
681
+ * @param key optional key for the node
682
+ * @returns a jsx vnode
683
+ */
684
+ export declare function jsx(type: any, props: any, key?: string): VNode;
685
+ /**
686
+ * Automatic JSX runtime functions for TypeScript's react-jsxmode with multiple children.
687
+ * @param type type of node
688
+ * @param props properties of node
689
+ * @param key optional key for the node
690
+ * @returns a jsx vnode
691
+ */
692
+ export declare function jsxs(type: any, props: any, key?: string): VNode;
693
+ /**
694
+ * Automatic JSX runtime functions for TypeScript's react-jsxdev mode.
695
+ * These functions are called automatically by TypeScript when using "jsx": "react-jsxdev".
696
+ * @param type type of node
697
+ * @param props properties of node
698
+ * @param key optional key for the node
699
+ * @param isStaticChildren indicates if the children are static
700
+ * @param source source information
701
+ * @param self reference to the component instance
702
+ * @returns a jsx vnode
703
+ */
704
+ export declare function jsxDEV(type: any, props: any, key?: string | number, isStaticChildren?: boolean, source?: any, self?: any): VNode;
676
705
  export declare function h(sel: any, data: VNodeData | null, children: VNode): VNode;
677
706
  /**
678
707
  * A virtual DOM node