@compiled/react 0.18.5 → 0.19.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.
@@ -1,2 +1,7 @@
1
+ /// <reference types="react" />
1
2
  export type { CompiledJSX as JSX } from './jsx-local-namespace';
2
- export * from 'react/jsx-dev-runtime';
3
+ import * as ReactJSXRuntimeDev from 'react/jsx-dev-runtime';
4
+ export declare const Fragment: import("react").ExoticComponent<{
5
+ children?: import("react").ReactNode;
6
+ }>;
7
+ export declare const jsxDEV: typeof ReactJSXRuntimeDev.jsxDEV;
@@ -1,4 +1,4 @@
1
- // Pass through the (automatic) jsx dev runtime.
2
- // Compiled currently doesn't define its own and uses this purely to enable a local jsx namespace.
3
- export * from 'react/jsx-dev-runtime';
1
+ import * as ReactJSXRuntimeDev from 'react/jsx-dev-runtime';
2
+ export const Fragment = ReactJSXRuntimeDev.Fragment;
3
+ export const jsxDEV = ReactJSXRuntimeDev.jsxDEV;
4
4
  //# sourceMappingURL=jsx-dev-runtime.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"jsx-dev-runtime.js","sourceRoot":"","sources":["../../../src/jsx/jsx-dev-runtime.ts"],"names":[],"mappings":"AAEA,gDAAgD;AAChD,kGAAkG;AAClG,cAAc,uBAAuB,CAAC"}
1
+ {"version":3,"file":"jsx-dev-runtime.js","sourceRoot":"","sources":["../../../src/jsx/jsx-dev-runtime.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,kBAAkB,MAAM,uBAAuB,CAAC;AAC5D,MAAM,CAAC,MAAM,QAAQ,GAAG,kBAAkB,CAAC,QAAQ,CAAC;AACpD,MAAM,CAAC,MAAM,MAAM,GAAG,kBAAkB,CAAC,MAAM,CAAC"}
@@ -1,2 +1,8 @@
1
+ /// <reference types="react" />
1
2
  export type { CompiledJSX as JSX } from './jsx-local-namespace';
2
- export * from 'react/jsx-runtime';
3
+ import * as ReactJSXRuntime from 'react/jsx-runtime';
4
+ export declare const Fragment: import("react").ExoticComponent<{
5
+ children?: import("react").ReactNode;
6
+ }>;
7
+ export declare const jsx: typeof ReactJSXRuntime.jsx;
8
+ export declare const jsxs: typeof ReactJSXRuntime.jsxs;
@@ -1,4 +1,5 @@
1
- // Pass through the (automatic) jsx runtime.
2
- // Compiled currently doesn't define its own and uses this purely to enable a local jsx namespace.
3
- export * from 'react/jsx-runtime';
1
+ import * as ReactJSXRuntime from 'react/jsx-runtime';
2
+ export const Fragment = ReactJSXRuntime.Fragment;
3
+ export const jsx = ReactJSXRuntime.jsx;
4
+ export const jsxs = ReactJSXRuntime.jsxs;
4
5
  //# sourceMappingURL=jsx-runtime.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"jsx-runtime.js","sourceRoot":"","sources":["../../../src/jsx/jsx-runtime.ts"],"names":[],"mappings":"AAEA,4CAA4C;AAC5C,kGAAkG;AAClG,cAAc,mBAAmB,CAAC"}
1
+ {"version":3,"file":"jsx-runtime.js","sourceRoot":"","sources":["../../../src/jsx/jsx-runtime.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,eAAe,MAAM,mBAAmB,CAAC;AACrD,MAAM,CAAC,MAAM,QAAQ,GAAG,eAAe,CAAC,QAAQ,CAAC;AACjD,MAAM,CAAC,MAAM,GAAG,GAA+B,eAAe,CAAC,GAAG,CAAC;AACnE,MAAM,CAAC,MAAM,IAAI,GAAgC,eAAe,CAAC,IAAI,CAAC"}
@@ -19,9 +19,9 @@ export type CssObject<TProps> = Readonly<{
19
19
  }>;
20
20
  export type CssFunction<TProps = unknown> = CssType<TProps> | BasicTemplateInterpolations | null | boolean | undefined;
21
21
  export type CSSPseudoElements = '&::after' | '&::backdrop' | '&::before' | '&::cue' | '&::cue-region' | '&::first-letter' | '&::first-line' | '&::grammar-error' | '&::marker' | '&::placeholder' | '&::selection' | '&::spelling-error' | '&::target-text' | '&::view-transition';
22
- export type FlattenedChainedCSSPseudosClasses = '&:visited:active' | '&:visited:hover' | '&:active:visited' | '&:hover::before' | '&:hover::after' | '&:focus-visible::before' | '&:focus-visible::after' | '&:focus:not(:focus-visible)';
22
+ export type CSSFlattenedChainedPsuedos = '&:visited:active' | '&:visited:hover' | '&:visited:focus' | '&:visited:focus-visible' | '&:visited:focus-within' | '&:active:visited' | '&:hover::before' | '&:hover::after' | '&:focus-visible::before' | '&:focus-visible::after' | '&:focus::before' | '&:focus::after' | '&:focus-within::before' | '&:focus-within::after' | '&:focus:not(:focus-visible)';
23
23
  export type CSSPseudoClasses = '&:active' | '&:autofill' | '&:blank' | '&:checked' | '&:default' | '&:defined' | '&:disabled' | '&:empty' | '&:enabled' | '&:first' | '&:focus' | '&:focus-visible' | '&:focus-within' | '&:fullscreen' | '&:hover' | '&:in-range' | '&:indeterminate' | '&:invalid' | '&:left' | '&:link' | '&:local-link' | '&:optional' | '&:out-of-range' | '&:paused' | '&:picture-in-picture' | '&:placeholder-shown' | '&:playing' | '&:read-only' | '&:read-write' | '&:required' | '&:right' | '&:target' | '&:user-invalid' | '&:user-valid' | '&:valid' | '&:visited';
24
- export type AllCSSPseudoClasses = CSSPseudoClasses | FlattenedChainedCSSPseudosClasses;
24
+ export type AllCSSPseudoClasses = CSSPseudoClasses | CSSFlattenedChainedPsuedos;
25
25
  export type CSSPseudos = CSSPseudoElements | AllCSSPseudoClasses;
26
26
  /**
27
27
  * The XCSSProp must be given all known available properties even
@@ -1,2 +1,7 @@
1
+ /// <reference types="react" />
1
2
  export type { CompiledJSX as JSX } from './jsx-local-namespace';
2
- export * from 'react/jsx-dev-runtime';
3
+ import * as ReactJSXRuntimeDev from 'react/jsx-dev-runtime';
4
+ export declare const Fragment: import("react").ExoticComponent<{
5
+ children?: import("react").ReactNode;
6
+ }>;
7
+ export declare const jsxDEV: typeof ReactJSXRuntimeDev.jsxDEV;
@@ -10,11 +10,21 @@ var __createBinding = (this && this.__createBinding) || (Object.create ? (functi
10
10
  if (k2 === undefined) k2 = k;
11
11
  o[k2] = m[k];
12
12
  }));
13
- var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
- for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
13
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
15
+ }) : function(o, v) {
16
+ o["default"] = v;
17
+ });
18
+ var __importStar = (this && this.__importStar) || function (mod) {
19
+ if (mod && mod.__esModule) return mod;
20
+ var result = {};
21
+ if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
22
+ __setModuleDefault(result, mod);
23
+ return result;
15
24
  };
16
25
  Object.defineProperty(exports, "__esModule", { value: true });
17
- // Pass through the (automatic) jsx dev runtime.
18
- // Compiled currently doesn't define its own and uses this purely to enable a local jsx namespace.
19
- __exportStar(require("react/jsx-dev-runtime"), exports);
26
+ exports.jsxDEV = exports.Fragment = void 0;
27
+ const ReactJSXRuntimeDev = __importStar(require("react/jsx-dev-runtime"));
28
+ exports.Fragment = ReactJSXRuntimeDev.Fragment;
29
+ exports.jsxDEV = ReactJSXRuntimeDev.jsxDEV;
20
30
  //# sourceMappingURL=jsx-dev-runtime.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"jsx-dev-runtime.js","sourceRoot":"","sources":["../../../src/jsx/jsx-dev-runtime.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAEA,gDAAgD;AAChD,kGAAkG;AAClG,wDAAsC"}
1
+ {"version":3,"file":"jsx-dev-runtime.js","sourceRoot":"","sources":["../../../src/jsx/jsx-dev-runtime.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAEA,0EAA4D;AAC/C,QAAA,QAAQ,GAAG,kBAAkB,CAAC,QAAQ,CAAC;AACvC,QAAA,MAAM,GAAG,kBAAkB,CAAC,MAAM,CAAC"}
@@ -1,2 +1,8 @@
1
+ /// <reference types="react" />
1
2
  export type { CompiledJSX as JSX } from './jsx-local-namespace';
2
- export * from 'react/jsx-runtime';
3
+ import * as ReactJSXRuntime from 'react/jsx-runtime';
4
+ export declare const Fragment: import("react").ExoticComponent<{
5
+ children?: import("react").ReactNode;
6
+ }>;
7
+ export declare const jsx: typeof ReactJSXRuntime.jsx;
8
+ export declare const jsxs: typeof ReactJSXRuntime.jsxs;
@@ -10,11 +10,22 @@ var __createBinding = (this && this.__createBinding) || (Object.create ? (functi
10
10
  if (k2 === undefined) k2 = k;
11
11
  o[k2] = m[k];
12
12
  }));
13
- var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
- for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
13
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
15
+ }) : function(o, v) {
16
+ o["default"] = v;
17
+ });
18
+ var __importStar = (this && this.__importStar) || function (mod) {
19
+ if (mod && mod.__esModule) return mod;
20
+ var result = {};
21
+ if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
22
+ __setModuleDefault(result, mod);
23
+ return result;
15
24
  };
16
25
  Object.defineProperty(exports, "__esModule", { value: true });
17
- // Pass through the (automatic) jsx runtime.
18
- // Compiled currently doesn't define its own and uses this purely to enable a local jsx namespace.
19
- __exportStar(require("react/jsx-runtime"), exports);
26
+ exports.jsxs = exports.jsx = exports.Fragment = void 0;
27
+ const ReactJSXRuntime = __importStar(require("react/jsx-runtime"));
28
+ exports.Fragment = ReactJSXRuntime.Fragment;
29
+ exports.jsx = ReactJSXRuntime.jsx;
30
+ exports.jsxs = ReactJSXRuntime.jsxs;
20
31
  //# sourceMappingURL=jsx-runtime.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"jsx-runtime.js","sourceRoot":"","sources":["../../../src/jsx/jsx-runtime.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAEA,4CAA4C;AAC5C,kGAAkG;AAClG,oDAAkC"}
1
+ {"version":3,"file":"jsx-runtime.js","sourceRoot":"","sources":["../../../src/jsx/jsx-runtime.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAEA,mEAAqD;AACxC,QAAA,QAAQ,GAAG,eAAe,CAAC,QAAQ,CAAC;AACpC,QAAA,GAAG,GAA+B,eAAe,CAAC,GAAG,CAAC;AACtD,QAAA,IAAI,GAAgC,eAAe,CAAC,IAAI,CAAC"}
@@ -19,9 +19,9 @@ export type CssObject<TProps> = Readonly<{
19
19
  }>;
20
20
  export type CssFunction<TProps = unknown> = CssType<TProps> | BasicTemplateInterpolations | null | boolean | undefined;
21
21
  export type CSSPseudoElements = '&::after' | '&::backdrop' | '&::before' | '&::cue' | '&::cue-region' | '&::first-letter' | '&::first-line' | '&::grammar-error' | '&::marker' | '&::placeholder' | '&::selection' | '&::spelling-error' | '&::target-text' | '&::view-transition';
22
- export type FlattenedChainedCSSPseudosClasses = '&:visited:active' | '&:visited:hover' | '&:active:visited' | '&:hover::before' | '&:hover::after' | '&:focus-visible::before' | '&:focus-visible::after' | '&:focus:not(:focus-visible)';
22
+ export type CSSFlattenedChainedPsuedos = '&:visited:active' | '&:visited:hover' | '&:visited:focus' | '&:visited:focus-visible' | '&:visited:focus-within' | '&:active:visited' | '&:hover::before' | '&:hover::after' | '&:focus-visible::before' | '&:focus-visible::after' | '&:focus::before' | '&:focus::after' | '&:focus-within::before' | '&:focus-within::after' | '&:focus:not(:focus-visible)';
23
23
  export type CSSPseudoClasses = '&:active' | '&:autofill' | '&:blank' | '&:checked' | '&:default' | '&:defined' | '&:disabled' | '&:empty' | '&:enabled' | '&:first' | '&:focus' | '&:focus-visible' | '&:focus-within' | '&:fullscreen' | '&:hover' | '&:in-range' | '&:indeterminate' | '&:invalid' | '&:left' | '&:link' | '&:local-link' | '&:optional' | '&:out-of-range' | '&:paused' | '&:picture-in-picture' | '&:placeholder-shown' | '&:playing' | '&:read-only' | '&:read-write' | '&:required' | '&:right' | '&:target' | '&:user-invalid' | '&:user-valid' | '&:valid' | '&:visited';
24
- export type AllCSSPseudoClasses = CSSPseudoClasses | FlattenedChainedCSSPseudosClasses;
24
+ export type AllCSSPseudoClasses = CSSPseudoClasses | CSSFlattenedChainedPsuedos;
25
25
  export type CSSPseudos = CSSPseudoElements | AllCSSPseudoClasses;
26
26
  /**
27
27
  * The XCSSProp must be given all known available properties even
@@ -1,2 +1,7 @@
1
+ /// <reference types="react" />
1
2
  export type { CompiledJSX as JSX } from './jsx-local-namespace';
2
- export * from 'react/jsx-dev-runtime';
3
+ import * as ReactJSXRuntimeDev from 'react/jsx-dev-runtime';
4
+ export declare const Fragment: import("react").ExoticComponent<{
5
+ children?: import("react").ReactNode;
6
+ }>;
7
+ export declare const jsxDEV: typeof ReactJSXRuntimeDev.jsxDEV;
@@ -1,4 +1,4 @@
1
- // Pass through the (automatic) jsx dev runtime.
2
- // Compiled currently doesn't define its own and uses this purely to enable a local jsx namespace.
3
- export * from 'react/jsx-dev-runtime';
1
+ import * as ReactJSXRuntimeDev from 'react/jsx-dev-runtime';
2
+ export const Fragment = ReactJSXRuntimeDev.Fragment;
3
+ export const jsxDEV = ReactJSXRuntimeDev.jsxDEV;
4
4
  //# sourceMappingURL=jsx-dev-runtime.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"jsx-dev-runtime.js","sourceRoot":"","sources":["../../../src/jsx/jsx-dev-runtime.ts"],"names":[],"mappings":"AAEA,gDAAgD;AAChD,kGAAkG;AAClG,cAAc,uBAAuB,CAAC"}
1
+ {"version":3,"file":"jsx-dev-runtime.js","sourceRoot":"","sources":["../../../src/jsx/jsx-dev-runtime.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,kBAAkB,MAAM,uBAAuB,CAAC;AAC5D,MAAM,CAAC,MAAM,QAAQ,GAAG,kBAAkB,CAAC,QAAQ,CAAC;AACpD,MAAM,CAAC,MAAM,MAAM,GAAG,kBAAkB,CAAC,MAAM,CAAC"}
@@ -1,2 +1,8 @@
1
+ /// <reference types="react" />
1
2
  export type { CompiledJSX as JSX } from './jsx-local-namespace';
2
- export * from 'react/jsx-runtime';
3
+ import * as ReactJSXRuntime from 'react/jsx-runtime';
4
+ export declare const Fragment: import("react").ExoticComponent<{
5
+ children?: import("react").ReactNode;
6
+ }>;
7
+ export declare const jsx: typeof ReactJSXRuntime.jsx;
8
+ export declare const jsxs: typeof ReactJSXRuntime.jsxs;
@@ -1,4 +1,5 @@
1
- // Pass through the (automatic) jsx runtime.
2
- // Compiled currently doesn't define its own and uses this purely to enable a local jsx namespace.
3
- export * from 'react/jsx-runtime';
1
+ import * as ReactJSXRuntime from 'react/jsx-runtime';
2
+ export const Fragment = ReactJSXRuntime.Fragment;
3
+ export const jsx = ReactJSXRuntime.jsx;
4
+ export const jsxs = ReactJSXRuntime.jsxs;
4
5
  //# sourceMappingURL=jsx-runtime.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"jsx-runtime.js","sourceRoot":"","sources":["../../../src/jsx/jsx-runtime.ts"],"names":[],"mappings":"AAEA,4CAA4C;AAC5C,kGAAkG;AAClG,cAAc,mBAAmB,CAAC"}
1
+ {"version":3,"file":"jsx-runtime.js","sourceRoot":"","sources":["../../../src/jsx/jsx-runtime.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,eAAe,MAAM,mBAAmB,CAAC;AACrD,MAAM,CAAC,MAAM,QAAQ,GAAG,eAAe,CAAC,QAAQ,CAAC;AACjD,MAAM,CAAC,MAAM,GAAG,GAA+B,eAAe,CAAC,GAAG,CAAC;AACnE,MAAM,CAAC,MAAM,IAAI,GAAgC,eAAe,CAAC,IAAI,CAAC"}
@@ -19,9 +19,9 @@ export type CssObject<TProps> = Readonly<{
19
19
  }>;
20
20
  export type CssFunction<TProps = unknown> = CssType<TProps> | BasicTemplateInterpolations | null | boolean | undefined;
21
21
  export type CSSPseudoElements = '&::after' | '&::backdrop' | '&::before' | '&::cue' | '&::cue-region' | '&::first-letter' | '&::first-line' | '&::grammar-error' | '&::marker' | '&::placeholder' | '&::selection' | '&::spelling-error' | '&::target-text' | '&::view-transition';
22
- export type FlattenedChainedCSSPseudosClasses = '&:visited:active' | '&:visited:hover' | '&:active:visited' | '&:hover::before' | '&:hover::after' | '&:focus-visible::before' | '&:focus-visible::after' | '&:focus:not(:focus-visible)';
22
+ export type CSSFlattenedChainedPsuedos = '&:visited:active' | '&:visited:hover' | '&:visited:focus' | '&:visited:focus-visible' | '&:visited:focus-within' | '&:active:visited' | '&:hover::before' | '&:hover::after' | '&:focus-visible::before' | '&:focus-visible::after' | '&:focus::before' | '&:focus::after' | '&:focus-within::before' | '&:focus-within::after' | '&:focus:not(:focus-visible)';
23
23
  export type CSSPseudoClasses = '&:active' | '&:autofill' | '&:blank' | '&:checked' | '&:default' | '&:defined' | '&:disabled' | '&:empty' | '&:enabled' | '&:first' | '&:focus' | '&:focus-visible' | '&:focus-within' | '&:fullscreen' | '&:hover' | '&:in-range' | '&:indeterminate' | '&:invalid' | '&:left' | '&:link' | '&:local-link' | '&:optional' | '&:out-of-range' | '&:paused' | '&:picture-in-picture' | '&:placeholder-shown' | '&:playing' | '&:read-only' | '&:read-write' | '&:required' | '&:right' | '&:target' | '&:user-invalid' | '&:user-valid' | '&:valid' | '&:visited';
24
- export type AllCSSPseudoClasses = CSSPseudoClasses | FlattenedChainedCSSPseudosClasses;
24
+ export type AllCSSPseudoClasses = CSSPseudoClasses | CSSFlattenedChainedPsuedos;
25
25
  export type CSSPseudos = CSSPseudoElements | AllCSSPseudoClasses;
26
26
  /**
27
27
  * The XCSSProp must be given all known available properties even
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@compiled/react",
3
- "version": "0.18.5",
3
+ "version": "0.19.0",
4
4
  "description": "A familiar and performant compile time CSS-in-JS library for React.",
5
5
  "keywords": [
6
6
  "compiled",
@@ -78,15 +78,15 @@
78
78
  "@compiled/benchmark": "^1.1.0",
79
79
  "@compiled/utils": "^0.13.0",
80
80
  "@fixture/strict-api-test": "*",
81
- "@testing-library/react": "^12.1.5",
81
+ "@testing-library/react": "^16.1.0",
82
82
  "@types/jsdom": "^16.2.15",
83
- "@types/react-dom": "^17.0.22",
83
+ "@types/react-dom": "^18.3.1",
84
84
  "expect-type": "^0.20.0",
85
85
  "jsdom": "^19.0.0",
86
- "react": "^17.0.2",
87
- "react-dom": "^17.0.2"
86
+ "react": "^18.3.1",
87
+ "react-dom": "^18.3.1"
88
88
  },
89
89
  "peerDependencies": {
90
- "react": ">= 16.12.0"
90
+ "react": ">=18.0.0"
91
91
  }
92
92
  }
@@ -1,5 +1,5 @@
1
1
  import React from 'react';
2
- import { hydrate } from 'react-dom';
2
+ import { hydrateRoot } from 'react-dom/client';
3
3
 
4
4
  import { CC, CS } from '../runtime';
5
5
 
@@ -34,12 +34,12 @@ describe('server side hydrate', () => {
34
34
  );
35
35
 
36
36
  flushRuntimeModule();
37
- hydrate(
37
+ hydrateRoot(
38
+ elem,
38
39
  <CC>
39
40
  <CS>{['.foo { color: blue; }', '.foo { color: blue; }']}</CS>
40
41
  <div className="foo">hello world</div>
41
- </CC>,
42
- elem
42
+ </CC>
43
43
  );
44
44
 
45
45
  expect(console.error).not.toHaveBeenCalled();
@@ -1,5 +1,5 @@
1
1
  export type { CompiledJSX as JSX } from './jsx-local-namespace';
2
2
 
3
- // Pass through the (automatic) jsx dev runtime.
4
- // Compiled currently doesn't define its own and uses this purely to enable a local jsx namespace.
5
- export * from 'react/jsx-dev-runtime';
3
+ import * as ReactJSXRuntimeDev from 'react/jsx-dev-runtime';
4
+ export const Fragment = ReactJSXRuntimeDev.Fragment;
5
+ export const jsxDEV = ReactJSXRuntimeDev.jsxDEV;
@@ -1,5 +1,6 @@
1
1
  export type { CompiledJSX as JSX } from './jsx-local-namespace';
2
2
 
3
- // Pass through the (automatic) jsx runtime.
4
- // Compiled currently doesn't define its own and uses this purely to enable a local jsx namespace.
5
- export * from 'react/jsx-runtime';
3
+ import * as ReactJSXRuntime from 'react/jsx-runtime';
4
+ export const Fragment = ReactJSXRuntime.Fragment;
5
+ export const jsx: typeof ReactJSXRuntime.jsx = ReactJSXRuntime.jsx;
6
+ export const jsxs: typeof ReactJSXRuntime.jsxs = ReactJSXRuntime.jsxs;
@@ -2,7 +2,7 @@ import { runBenchmark } from '@compiled/benchmark';
2
2
  import { JSDOM } from 'jsdom';
3
3
  import * as React from 'react';
4
4
  import { memo } from 'react';
5
- import { render } from 'react-dom';
5
+ import { createRoot } from 'react-dom/client';
6
6
  import { renderToString } from 'react-dom/server';
7
7
 
8
8
  import { CC, CS } from '../index';
@@ -66,9 +66,8 @@ describe('CS benchmark', () => {
66
66
  renderToString(<>{Array.from({ length: 10 }).map((_, i) => jsx(i))}</>);
67
67
  }
68
68
  : (jsx: (key: number) => JSX.Element) => {
69
- render(
70
- <>{Array.from({ length: 10 }).map((_, i) => jsx(i))}</>,
71
- globalThis.document.getElementById('root')
69
+ createRoot(globalThis.document.getElementById('root')!).render(
70
+ <>{Array.from({ length: 10 }).map((_, i) => jsx(i))}</>
72
71
  );
73
72
  };
74
73
 
@@ -19,7 +19,7 @@ describe('<Style />', () => {
19
19
  });
20
20
 
21
21
  // We want to isolate the test to correctly mimic the environment being loaded in once
22
- const createIsolatedTest = (callback: (Style: ComponentType) => void) => {
22
+ const createIsolatedTest = (callback: (Style: ComponentType<{ children: string[] }>) => void) => {
23
23
  jest.isolateModules(() => {
24
24
  // eslint-disable-next-line @typescript-eslint/no-var-requires
25
25
  const Style = require('../style');
@@ -236,7 +236,7 @@ describe('styled component', () => {
236
236
  });
237
237
 
238
238
  it('should inherit types from composed component', () => {
239
- const Link = (props: { href: string }) => <a {...props} />;
239
+ const Link = (props: React.PropsWithChildren<{ href: string }>) => <a {...props} />;
240
240
  const StyledLink = styled(Link)({
241
241
  fontSize: 12,
242
242
  });
package/src/types.ts CHANGED
@@ -51,14 +51,21 @@ export type CSSPseudoElements =
51
51
  | '&::target-text'
52
52
  | '&::view-transition';
53
53
 
54
- export type FlattenedChainedCSSPseudosClasses =
54
+ export type CSSFlattenedChainedPsuedos =
55
55
  | '&:visited:active'
56
56
  | '&:visited:hover'
57
+ | '&:visited:focus'
58
+ | '&:visited:focus-visible'
59
+ | '&:visited:focus-within'
57
60
  | '&:active:visited'
58
61
  | '&:hover::before'
59
62
  | '&:hover::after'
60
63
  | '&:focus-visible::before'
61
64
  | '&:focus-visible::after'
65
+ | '&:focus::before'
66
+ | '&:focus::after'
67
+ | '&:focus-within::before'
68
+ | '&:focus-within::after'
62
69
  | '&:focus:not(:focus-visible)';
63
70
 
64
71
  export type CSSPseudoClasses =
@@ -99,7 +106,7 @@ export type CSSPseudoClasses =
99
106
  | '&:valid'
100
107
  | '&:visited';
101
108
 
102
- export type AllCSSPseudoClasses = CSSPseudoClasses | FlattenedChainedCSSPseudosClasses;
109
+ export type AllCSSPseudoClasses = CSSPseudoClasses | CSSFlattenedChainedPsuedos;
103
110
 
104
111
  /*
105
112
  * This list of pseudo-classes, chained pseudo-classes, and pseudo-elements are from csstype