@compiled/react 0.9.0 → 0.10.2
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/browser/class-names/index.d.ts +22 -16
- package/dist/browser/class-names/index.js +1 -27
- package/dist/browser/class-names/index.js.flow +2 -2
- package/dist/browser/class-names/index.js.map +1 -1
- package/dist/browser/css/index.d.ts +22 -19
- package/dist/browser/css/index.js +4 -3
- package/dist/browser/css/index.js.flow +1 -1
- package/dist/browser/css/index.js.map +1 -1
- package/dist/browser/index.d.ts +12 -22
- package/dist/browser/index.js +4 -0
- package/dist/browser/index.js.flow +5 -30
- package/dist/browser/index.js.map +1 -1
- package/dist/browser/jsx/jsx-dev-runtime.d.ts +2 -0
- package/dist/browser/jsx/jsx-dev-runtime.js +4 -0
- package/dist/browser/jsx/jsx-dev-runtime.js.map +1 -0
- package/dist/browser/jsx/jsx-local-namespace.d.ts +66 -0
- package/dist/browser/jsx/jsx-local-namespace.js +2 -0
- package/dist/browser/jsx/jsx-local-namespace.js.map +1 -0
- package/dist/browser/jsx/jsx-runtime.d.ts +2 -0
- package/dist/browser/jsx/jsx-runtime.js +4 -0
- package/dist/browser/jsx/jsx-runtime.js.map +1 -0
- package/dist/browser/keyframes/__fixtures__/index.js +1 -0
- package/dist/browser/keyframes/__fixtures__/index.js.map +1 -1
- package/dist/browser/keyframes/index.d.ts +20 -24
- package/dist/browser/keyframes/index.js.flow +1 -1
- package/dist/browser/keyframes/index.js.map +1 -1
- package/dist/browser/runtime/ax.js.flow +1 -1
- package/dist/browser/runtime/cache.d.ts +12 -0
- package/dist/browser/runtime/cache.js +15 -0
- package/dist/browser/runtime/cache.js.flow +18 -0
- package/dist/browser/runtime/cache.js.map +1 -0
- package/dist/browser/runtime/css-custom-property.d.ts +1 -1
- package/dist/browser/runtime/css-custom-property.js.flow +2 -2
- package/dist/browser/runtime/css-custom-property.js.map +1 -1
- package/dist/browser/runtime/dev-warnings.js +10 -6
- package/dist/browser/runtime/dev-warnings.js.flow +1 -1
- package/dist/browser/runtime/dev-warnings.js.map +1 -1
- package/dist/browser/runtime/index.js.flow +1 -1
- package/dist/browser/runtime/is-node.js +1 -3
- package/dist/browser/runtime/is-node.js.flow +1 -1
- package/dist/browser/runtime/is-node.js.map +1 -1
- package/dist/browser/runtime/sheet.d.ts +1 -1
- package/dist/browser/runtime/sheet.js +5 -1
- package/dist/browser/runtime/sheet.js.flow +2 -2
- package/dist/browser/runtime/sheet.js.map +1 -1
- package/dist/browser/runtime/style-cache.js +4 -0
- package/dist/browser/runtime/style-cache.js.flow +1 -1
- package/dist/browser/runtime/style-cache.js.map +1 -1
- package/dist/browser/runtime/style.js +2 -2
- package/dist/browser/runtime/style.js.flow +1 -1
- package/dist/browser/runtime/style.js.map +1 -1
- package/dist/browser/runtime/types.js.flow +1 -1
- package/dist/browser/runtime.js.flow +1 -1
- package/dist/browser/styled/index.d.ts +35 -7
- package/dist/browser/styled/index.js +35 -7
- package/dist/browser/styled/index.js.flow +2 -2
- package/dist/browser/styled/index.js.map +1 -1
- package/dist/browser/types.js.flow +1 -1
- package/dist/browser/utils/error.js.flow +1 -1
- package/dist/cjs/class-names/index.d.ts +22 -16
- package/dist/cjs/class-names/index.js +2 -28
- package/dist/cjs/class-names/index.js.flow +2 -2
- package/dist/cjs/class-names/index.js.map +1 -1
- package/dist/cjs/css/index.d.ts +22 -19
- package/dist/cjs/css/index.js +5 -4
- package/dist/cjs/css/index.js.flow +1 -1
- package/dist/cjs/css/index.js.map +1 -1
- package/dist/cjs/index.d.ts +12 -22
- package/dist/cjs/index.js +5 -1
- package/dist/cjs/index.js.flow +5 -30
- package/dist/cjs/index.js.map +1 -1
- package/dist/cjs/jsx/jsx-dev-runtime.d.ts +2 -0
- package/dist/cjs/jsx/jsx-dev-runtime.js +16 -0
- package/dist/cjs/jsx/jsx-dev-runtime.js.map +1 -0
- package/dist/cjs/jsx/jsx-local-namespace.d.ts +66 -0
- package/dist/cjs/jsx/jsx-local-namespace.js +3 -0
- package/dist/cjs/jsx/jsx-local-namespace.js.map +1 -0
- package/dist/cjs/jsx/jsx-runtime.d.ts +2 -0
- package/dist/cjs/jsx/jsx-runtime.js +16 -0
- package/dist/cjs/jsx/jsx-runtime.js.map +1 -0
- package/dist/cjs/keyframes/__fixtures__/index.js +2 -1
- package/dist/cjs/keyframes/__fixtures__/index.js.map +1 -1
- package/dist/cjs/keyframes/index.d.ts +20 -24
- package/dist/cjs/keyframes/index.js +1 -1
- package/dist/cjs/keyframes/index.js.flow +1 -1
- package/dist/cjs/keyframes/index.js.map +1 -1
- package/dist/cjs/runtime/ax.js.flow +1 -1
- package/dist/cjs/runtime/cache.d.ts +12 -0
- package/dist/cjs/runtime/cache.js +19 -0
- package/dist/cjs/runtime/cache.js.flow +18 -0
- package/dist/cjs/runtime/cache.js.map +1 -0
- package/dist/cjs/runtime/css-custom-property.d.ts +1 -1
- package/dist/cjs/runtime/css-custom-property.js.flow +2 -2
- package/dist/cjs/runtime/css-custom-property.js.map +1 -1
- package/dist/cjs/runtime/dev-warnings.js +10 -6
- package/dist/cjs/runtime/dev-warnings.js.flow +1 -1
- package/dist/cjs/runtime/dev-warnings.js.map +1 -1
- package/dist/cjs/runtime/index.js.flow +1 -1
- package/dist/cjs/runtime/is-node.js +1 -3
- package/dist/cjs/runtime/is-node.js.flow +1 -1
- package/dist/cjs/runtime/is-node.js.map +1 -1
- package/dist/cjs/runtime/sheet.d.ts +1 -1
- package/dist/cjs/runtime/sheet.js +6 -2
- package/dist/cjs/runtime/sheet.js.flow +2 -2
- package/dist/cjs/runtime/sheet.js.map +1 -1
- package/dist/cjs/runtime/style-cache.js +10 -6
- package/dist/cjs/runtime/style-cache.js.flow +1 -1
- package/dist/cjs/runtime/style-cache.js.map +1 -1
- package/dist/cjs/runtime/style.js +6 -6
- package/dist/cjs/runtime/style.js.flow +1 -1
- package/dist/cjs/runtime/style.js.map +1 -1
- package/dist/cjs/runtime/types.js.flow +1 -1
- package/dist/cjs/runtime.js.flow +1 -1
- package/dist/cjs/styled/index.d.ts +35 -7
- package/dist/cjs/styled/index.js +36 -8
- package/dist/cjs/styled/index.js.flow +2 -2
- package/dist/cjs/styled/index.js.map +1 -1
- package/dist/cjs/types.js.flow +1 -1
- package/dist/cjs/utils/error.js.flow +1 -1
- package/dist/esm/class-names/index.d.ts +22 -16
- package/dist/esm/class-names/index.js +1 -27
- package/dist/esm/class-names/index.js.flow +2 -2
- package/dist/esm/class-names/index.js.map +1 -1
- package/dist/esm/css/index.d.ts +22 -19
- package/dist/esm/css/index.js +4 -3
- package/dist/esm/css/index.js.flow +1 -1
- package/dist/esm/css/index.js.map +1 -1
- package/dist/esm/index.d.ts +12 -22
- package/dist/esm/index.js +4 -0
- package/dist/esm/index.js.flow +5 -30
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/jsx/jsx-dev-runtime.d.ts +2 -0
- package/dist/esm/jsx/jsx-dev-runtime.js +4 -0
- package/dist/esm/jsx/jsx-dev-runtime.js.map +1 -0
- package/dist/esm/jsx/jsx-local-namespace.d.ts +66 -0
- package/dist/esm/jsx/jsx-local-namespace.js +2 -0
- package/dist/esm/jsx/jsx-local-namespace.js.map +1 -0
- package/dist/esm/jsx/jsx-runtime.d.ts +2 -0
- package/dist/esm/jsx/jsx-runtime.js +4 -0
- package/dist/esm/jsx/jsx-runtime.js.map +1 -0
- package/dist/esm/keyframes/__fixtures__/index.js +1 -0
- package/dist/esm/keyframes/__fixtures__/index.js.map +1 -1
- package/dist/esm/keyframes/index.d.ts +20 -24
- package/dist/esm/keyframes/index.js.flow +1 -1
- package/dist/esm/keyframes/index.js.map +1 -1
- package/dist/esm/runtime/ax.js.flow +1 -1
- package/dist/esm/runtime/cache.d.ts +12 -0
- package/dist/esm/runtime/cache.js +15 -0
- package/dist/esm/runtime/cache.js.flow +18 -0
- package/dist/esm/runtime/cache.js.map +1 -0
- package/dist/esm/runtime/css-custom-property.d.ts +1 -1
- package/dist/esm/runtime/css-custom-property.js.flow +2 -2
- package/dist/esm/runtime/css-custom-property.js.map +1 -1
- package/dist/esm/runtime/dev-warnings.js +10 -6
- package/dist/esm/runtime/dev-warnings.js.flow +1 -1
- package/dist/esm/runtime/dev-warnings.js.map +1 -1
- package/dist/esm/runtime/index.js.flow +1 -1
- package/dist/esm/runtime/is-node.js +1 -3
- package/dist/esm/runtime/is-node.js.flow +1 -1
- package/dist/esm/runtime/is-node.js.map +1 -1
- package/dist/esm/runtime/sheet.d.ts +1 -1
- package/dist/esm/runtime/sheet.js +5 -1
- package/dist/esm/runtime/sheet.js.flow +2 -2
- package/dist/esm/runtime/sheet.js.map +1 -1
- package/dist/esm/runtime/style-cache.js +4 -0
- package/dist/esm/runtime/style-cache.js.flow +1 -1
- package/dist/esm/runtime/style-cache.js.map +1 -1
- package/dist/esm/runtime/style.js +2 -2
- package/dist/esm/runtime/style.js.flow +1 -1
- package/dist/esm/runtime/style.js.map +1 -1
- package/dist/esm/runtime/types.js.flow +1 -1
- package/dist/esm/runtime.js.flow +1 -1
- package/dist/esm/styled/index.d.ts +35 -7
- package/dist/esm/styled/index.js +35 -7
- package/dist/esm/styled/index.js.flow +2 -2
- package/dist/esm/styled/index.js.map +1 -1
- package/dist/esm/types.js.flow +1 -1
- package/dist/esm/utils/error.js.flow +1 -1
- package/jsx-dev-runtime/package.json +6 -0
- package/jsx-runtime/package.json +6 -0
- package/package.json +43 -14
- package/src/__tests__/browser.test.tsx +3 -8
- package/src/__tests__/display-names.test.tsx +1 -0
- package/src/__tests__/jest-matcher.test.tsx +199 -0
- package/src/__tests__/server-side-hydrate.test.tsx +1 -0
- package/src/__tests__/ssr.test.tsx +5 -3
- package/src/class-names/__tests__/index.test.tsx +2 -1
- package/src/class-names/index.js.flow +2 -2
- package/src/class-names/index.tsx +25 -14
- package/src/css/__tests__/index.test.tsx +10 -3
- package/src/css/index.js.flow +1 -1
- package/src/css/index.tsx +34 -24
- package/src/index.js.flow +5 -30
- package/src/index.tsx +18 -26
- package/src/jsx/__tests__/index.test.tsx +1 -2
- package/src/jsx/__tests__/jsx-import-source-pragma.test.tsx +37 -0
- package/src/jsx/__tests__/jsx-pragma.test.tsx +40 -0
- package/src/jsx/jsx-dev-runtime.tsx +5 -0
- package/src/jsx/jsx-local-namespace.tsx +75 -0
- package/src/jsx/jsx-runtime.tsx +5 -0
- package/src/keyframes/__fixtures__/index.tsx +1 -0
- package/src/keyframes/__tests__/index.test.tsx +20 -6
- package/src/keyframes/index.js.flow +1 -1
- package/src/keyframes/index.tsx +24 -28
- package/src/runtime/__perf__/ax.test.ts +42 -0
- package/src/runtime/__perf__/cs.test.tsx +111 -0
- package/src/runtime/__perf__/sheet.test.ts +61 -0
- package/src/runtime/__perf__/utils/cs.tsx +60 -0
- package/src/runtime/__perf__/utils/sheet.tsx +151 -0
- package/src/runtime/__tests__/style-ssr.test.tsx +5 -0
- package/src/runtime/__tests__/style.test.tsx +1 -5
- package/src/runtime/ax.js.flow +1 -1
- package/src/runtime/cache.js.flow +18 -0
- package/src/runtime/cache.tsx +14 -0
- package/src/runtime/css-custom-property.js.flow +2 -2
- package/src/runtime/css-custom-property.tsx +1 -1
- package/src/runtime/dev-warnings.js.flow +1 -1
- package/src/runtime/index.js.flow +1 -1
- package/src/runtime/is-node.js.flow +1 -1
- package/src/runtime/is-node.tsx +1 -2
- package/src/runtime/sheet.js.flow +2 -2
- package/src/runtime/sheet.tsx +8 -2
- package/src/runtime/style-cache.js.flow +1 -1
- package/src/runtime/style-cache.tsx +6 -0
- package/src/runtime/style.js.flow +1 -1
- package/src/runtime/style.tsx +4 -3
- package/src/runtime/types.js.flow +1 -1
- package/src/runtime.js.flow +1 -1
- package/src/styled/__tests__/index.test.tsx +4 -3
- package/src/styled/index.js.flow +2 -2
- package/src/styled/index.tsx +37 -8
- package/src/types.js.flow +1 -1
- package/src/utils/error.js.flow +1 -1
- package/CHANGELOG.md +0 -74
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/keyframes/__fixtures__/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAE5C,MAAM,CAAC,IAAM,OAAO,GAAG,SAAS,CAAC;IAC/B,IAAI,EAAE;QACJ,OAAO,EAAE,CAAC;KACX;IACD,EAAE,EAAE;QACF,OAAO,EAAE,CAAC;KACX;CACF,CAAC,CAAC;AAEH,MAAM,CAAC,IAAM,YAAY,GAAG,OAAO,CAAC;AAEpC,eAAe,OAAO,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/keyframes/__fixtures__/index.tsx"],"names":[],"mappings":"AAAA,6DAA6D;AAC7D,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAE5C,MAAM,CAAC,IAAM,OAAO,GAAG,SAAS,CAAC;IAC/B,IAAI,EAAE;QACJ,OAAO,EAAE,CAAC;KACX;IACD,EAAE,EAAE;QACF,OAAO,EAAE,CAAC;KACX;CACF,CAAC,CAAC;AAEH,MAAM,CAAC,IAAM,YAAY,GAAG,OAAO,CAAC;AAEpC,eAAe,OAAO,CAAC"}
|
|
@@ -1,24 +1,14 @@
|
|
|
1
1
|
import type { BasicTemplateInterpolations, CSSProps } from '../types';
|
|
2
2
|
export declare type KeyframeSteps = string | Record<string, CSSProps>;
|
|
3
3
|
/**
|
|
4
|
-
*
|
|
4
|
+
* ## Keyframes
|
|
5
5
|
*
|
|
6
|
-
*
|
|
7
|
-
*
|
|
8
|
-
* from { opacity: 1; }
|
|
9
|
-
* to { opacity: 0; }
|
|
10
|
-
* `;
|
|
11
|
-
* ```
|
|
12
|
-
*
|
|
13
|
-
* @param _strings The input string values
|
|
14
|
-
* @param _interpolations The arguments used in the expression
|
|
15
|
-
*/
|
|
16
|
-
export declare function keyframes(_strings: TemplateStringsArray, ..._interpolations: BasicTemplateInterpolations[]): string;
|
|
17
|
-
/**
|
|
18
|
-
* Create keyframes using:
|
|
6
|
+
* Define keyframes to be used in a [CSS animation](https://developer.mozilla.org/en-US/docs/Web/CSS/animation).
|
|
7
|
+
* For further details [read the API documentation](https://compiledcssinjs.com/docs/api-keyframes).
|
|
19
8
|
*
|
|
20
|
-
*
|
|
9
|
+
* ### Style with objects
|
|
21
10
|
*
|
|
11
|
+
* @example
|
|
22
12
|
* ```
|
|
23
13
|
* const fadeOut = keyframes({
|
|
24
14
|
* from: {
|
|
@@ -28,20 +18,26 @@ export declare function keyframes(_strings: TemplateStringsArray, ..._interpolat
|
|
|
28
18
|
* opacity: 0,
|
|
29
19
|
* },
|
|
30
20
|
* });
|
|
21
|
+
*
|
|
22
|
+
* <div css={{ animation: `${fadeOut} 2s` }} />
|
|
31
23
|
* ```
|
|
32
24
|
*
|
|
33
|
-
*
|
|
25
|
+
* ### Style with template literals
|
|
34
26
|
*
|
|
27
|
+
* @example
|
|
35
28
|
* ```
|
|
36
|
-
* const fadeOut = keyframes
|
|
37
|
-
*
|
|
29
|
+
* const fadeOut = keyframes`
|
|
30
|
+
* from {
|
|
31
|
+
* opacity: 1;
|
|
32
|
+
* }
|
|
38
33
|
*
|
|
39
|
-
*
|
|
34
|
+
* to {
|
|
35
|
+
* opacity: 0;
|
|
36
|
+
* }
|
|
37
|
+
* `;
|
|
40
38
|
*
|
|
39
|
+
* <div css={{ animation: `${fadeOut} 2s` }} />
|
|
41
40
|
* ```
|
|
42
|
-
* const fadeOut = keyframes(`from { opacity: 1; } to { opacity: 0; }`);
|
|
43
|
-
* ```
|
|
44
|
-
*
|
|
45
|
-
* @param _steps The waypoints along the animation sequence
|
|
46
41
|
*/
|
|
47
|
-
export declare function keyframes(
|
|
42
|
+
export declare function keyframes(steps: KeyframeSteps): string;
|
|
43
|
+
export declare function keyframes(strings: TemplateStringsArray, ...interpolations: BasicTemplateInterpolations[]): string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/keyframes/index.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,gBAAgB,EAAE,MAAM,gBAAgB,CAAC;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/keyframes/index.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,gBAAgB,EAAE,MAAM,gBAAgB,CAAC;AAkDlD,MAAM,UAAU,SAAS,CACvB,eAAqD;IACrD,yBAAiD;SAAjD,UAAiD,EAAjD,qBAAiD,EAAjD,IAAiD;QAAjD,wCAAiD;;IAEjD,MAAM,gBAAgB,EAAE,CAAC;AAC3B,CAAC"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Returns `true` when caching should be disabled, else `false`.
|
|
3
|
+
*
|
|
4
|
+
* Any code within this check will be removed in the output bundles:
|
|
5
|
+
*
|
|
6
|
+
* ```js
|
|
7
|
+
* if (isCacheDisabled()) {
|
|
8
|
+
* // This code will be removed from the output bundles
|
|
9
|
+
* }
|
|
10
|
+
* ```
|
|
11
|
+
*/
|
|
12
|
+
export declare const isCacheDisabled: () => boolean;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Returns `true` when caching should be disabled, else `false`.
|
|
3
|
+
*
|
|
4
|
+
* Any code within this check will be removed in the output bundles:
|
|
5
|
+
*
|
|
6
|
+
* ```js
|
|
7
|
+
* if (isCacheDisabled()) {
|
|
8
|
+
* // This code will be removed from the output bundles
|
|
9
|
+
* }
|
|
10
|
+
* ```
|
|
11
|
+
*/
|
|
12
|
+
export var isCacheDisabled = function () {
|
|
13
|
+
return process.env.NODE_ENV === 'test' && process.env.CACHE === 'false';
|
|
14
|
+
};
|
|
15
|
+
//# sourceMappingURL=cache.js.map
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Flowtype definitions for cache
|
|
3
|
+
* Generated by Flowgen from a Typescript Definition
|
|
4
|
+
* Flowgen v1.15.0
|
|
5
|
+
* @flow
|
|
6
|
+
*/
|
|
7
|
+
/**
|
|
8
|
+
* Returns `true` when caching should be disabled, else `false`.
|
|
9
|
+
*
|
|
10
|
+
* Any code within this check will be removed in the output bundles:
|
|
11
|
+
*
|
|
12
|
+
* ```js
|
|
13
|
+
* if (isCacheDisabled()) {
|
|
14
|
+
* // This code will be removed from the output bundles
|
|
15
|
+
* }
|
|
16
|
+
* ```
|
|
17
|
+
*/
|
|
18
|
+
declare export var isCacheDisabled: () => boolean;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cache.js","sourceRoot":"","sources":["../../../src/runtime/cache.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AACH,MAAM,CAAC,IAAM,eAAe,GAAG;IAC7B,OAAO,OAAO,CAAC,GAAG,CAAC,QAAQ,KAAK,MAAM,IAAI,OAAO,CAAC,GAAG,CAAC,KAAK,KAAK,OAAO,CAAC;AAC1E,CAAC,CAAC"}
|
|
@@ -7,4 +7,4 @@
|
|
|
7
7
|
* @param suffix
|
|
8
8
|
* @param prefix
|
|
9
9
|
*/
|
|
10
|
-
export default function cssCustomPropertyValue(value: string | number |
|
|
10
|
+
export default function cssCustomPropertyValue(value: string | number | null | undefined, suffix?: string | undefined | null, prefix?: string | undefined | null): string | number;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Flowtype definitions for css-custom-property
|
|
3
3
|
* Generated by Flowgen from a Typescript Definition
|
|
4
|
-
* Flowgen v1.
|
|
4
|
+
* Flowgen v1.15.0
|
|
5
5
|
* @flow
|
|
6
6
|
*/
|
|
7
7
|
/**
|
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
* @param prefix
|
|
14
14
|
*/
|
|
15
15
|
declare export default function cssCustomPropertyValue(
|
|
16
|
-
value: string | number |
|
|
16
|
+
value: string | number | null | void,
|
|
17
17
|
suffix?: string | void | null,
|
|
18
18
|
prefix?: string | void | null
|
|
19
19
|
): string | number;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"css-custom-property.js","sourceRoot":"","sources":["../../../src/runtime/css-custom-property.tsx"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AACH,MAAM,CAAC,OAAO,UAAU,sBAAsB,CAC5C,
|
|
1
|
+
{"version":3,"file":"css-custom-property.js","sourceRoot":"","sources":["../../../src/runtime/css-custom-property.tsx"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AACH,MAAM,CAAC,OAAO,UAAU,sBAAsB,CAC5C,KAAyC,EACzC,MAAkC,EAClC,MAAkC;IAElC,IAAI,KAAK,IAAI,SAAS,EAAE;QACtB,IAAI,MAAM,EAAE;YACV,IAAI,MAAM,EAAE;gBACV,OAAO,MAAM,GAAG,KAAK,GAAG,MAAM,CAAC;aAChC;YAED,OAAO,KAAK,GAAG,MAAM,CAAC;SACvB;QAED,OAAO,KAAK,CAAC;KACd;IAED,qFAAqF;IACrF,4EAA4E;IAC5E,kEAAkE;IAClE,OAAO,WAAW,CAAC;AACrB,CAAC"}
|
|
@@ -1,7 +1,11 @@
|
|
|
1
|
-
var __spreadArray = (this && this.__spreadArray) || function (to, from) {
|
|
2
|
-
for (var i = 0,
|
|
3
|
-
|
|
4
|
-
|
|
1
|
+
var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
|
|
2
|
+
if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
|
|
3
|
+
if (ar || !(i in from)) {
|
|
4
|
+
if (!ar) ar = Array.prototype.slice.call(from, 0, i);
|
|
5
|
+
ar[i] = from[i];
|
|
6
|
+
}
|
|
7
|
+
}
|
|
8
|
+
return to.concat(ar || Array.prototype.slice.call(from));
|
|
5
9
|
};
|
|
6
10
|
var selectorsToWarn = [':first-child', ':nth-child'];
|
|
7
11
|
var hasWarned = {};
|
|
@@ -10,7 +14,7 @@ var warn = function (str) {
|
|
|
10
14
|
for (var _i = 1; _i < arguments.length; _i++) {
|
|
11
15
|
args[_i - 1] = arguments[_i];
|
|
12
16
|
}
|
|
13
|
-
return console.error.apply(console, __spreadArray(["\n \u2588\u2588\u2588\u2588\u2588\u2588\u2557 \u2588\u2588\u2588\u2588\u2588\u2588\u2557 \u2588\u2588\u2588\u2557 \u2588\u2588\u2588\u2557\u2588\u2588\u2588\u2588\u2588\u2588\u2557 \u2588\u2588\u2557\u2588\u2588\u2557 \u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2557\u2588\u2588\u2588\u2588\u2588\u2588\u2557\n\u2588\u2588\u2554\u2550\u2550\u2550\u2550\u255D\u2588\u2588\u2554\u2550\u2550\u2550\u2588\u2588\u2557\u2588\u2588\u2588\u2588\u2557 \u2588\u2588\u2588\u2588\u2551\u2588\u2588\u2554\u2550\u2550\u2588\u2588\u2557\u2588\u2588\u2551\u2588\u2588\u2551 \u2588\u2588\u2554\u2550\u2550\u2550\u2550\u255D\u2588\u2588\u2554\u2550\u2550\u2588\u2588\u2557\n\u2588\u2588\u2551 \u2588\u2588\u2551 \u2588\u2588\u2551\u2588\u2588\u2554\u2588\u2588\u2588\u2588\u2554\u2588\u2588\u2551\u2588\u2588\u2588\u2588\u2588\u2588\u2554\u255D\u2588\u2588\u2551\u2588\u2588\u2551 \u2588\u2588\u2588\u2588\u2588\u2557 \u2588\u2588\u2551 \u2588\u2588\u2551\n\u2588\u2588\u2551 \u2588\u2588\u2551 \u2588\u2588\u2551\u2588\u2588\u2551\u255A\u2588\u2588\u2554\u255D\u2588\u2588\u2551\u2588\u2588\u2554\u2550\u2550\u2550\u255D \u2588\u2588\u2551\u2588\u2588\u2551 \u2588\u2588\u2554\u2550\u2550\u255D \u2588\u2588\u2551 \u2588\u2588\u2551\n\u255A\u2588\u2588\u2588\u2588\u2588\u2588\u2557\u255A\u2588\u2588\u2588\u2588\u2588\u2588\u2554\u255D\u2588\u2588\u2551 \u255A\u2550\u255D \u2588\u2588\u2551\u2588\u2588\u2551 \u2588\u2588\u2551\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2557\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2557\u2588\u2588\u2588\u2588\u2588\u2588\u2554\u255D\n \u255A\u2550\u2550\u2550\u2550\u2550\u255D \u255A\u2550\u2550\u2550\u2550\u2550\u255D \u255A\u2550\u255D \u255A\u2550\u255D\u255A\u2550\u255D \u255A\u2550\u255D\u255A\u2550\u2550\u2550\u2550\u2550\u2550\u255D\u255A\u2550\u2550\u2550\u2550\u2550\u2550\u255D\u255A\u2550\u2550\u2550\u2550\u2550\u255D\n\n @compiled/react/runtime - DEV WARNING\n\n "
|
|
17
|
+
return console.error.apply(console, __spreadArray(["\n \u2588\u2588\u2588\u2588\u2588\u2588\u2557 \u2588\u2588\u2588\u2588\u2588\u2588\u2557 \u2588\u2588\u2588\u2557 \u2588\u2588\u2588\u2557\u2588\u2588\u2588\u2588\u2588\u2588\u2557 \u2588\u2588\u2557\u2588\u2588\u2557 \u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2557\u2588\u2588\u2588\u2588\u2588\u2588\u2557\n\u2588\u2588\u2554\u2550\u2550\u2550\u2550\u255D\u2588\u2588\u2554\u2550\u2550\u2550\u2588\u2588\u2557\u2588\u2588\u2588\u2588\u2557 \u2588\u2588\u2588\u2588\u2551\u2588\u2588\u2554\u2550\u2550\u2588\u2588\u2557\u2588\u2588\u2551\u2588\u2588\u2551 \u2588\u2588\u2554\u2550\u2550\u2550\u2550\u255D\u2588\u2588\u2554\u2550\u2550\u2588\u2588\u2557\n\u2588\u2588\u2551 \u2588\u2588\u2551 \u2588\u2588\u2551\u2588\u2588\u2554\u2588\u2588\u2588\u2588\u2554\u2588\u2588\u2551\u2588\u2588\u2588\u2588\u2588\u2588\u2554\u255D\u2588\u2588\u2551\u2588\u2588\u2551 \u2588\u2588\u2588\u2588\u2588\u2557 \u2588\u2588\u2551 \u2588\u2588\u2551\n\u2588\u2588\u2551 \u2588\u2588\u2551 \u2588\u2588\u2551\u2588\u2588\u2551\u255A\u2588\u2588\u2554\u255D\u2588\u2588\u2551\u2588\u2588\u2554\u2550\u2550\u2550\u255D \u2588\u2588\u2551\u2588\u2588\u2551 \u2588\u2588\u2554\u2550\u2550\u255D \u2588\u2588\u2551 \u2588\u2588\u2551\n\u255A\u2588\u2588\u2588\u2588\u2588\u2588\u2557\u255A\u2588\u2588\u2588\u2588\u2588\u2588\u2554\u255D\u2588\u2588\u2551 \u255A\u2550\u255D \u2588\u2588\u2551\u2588\u2588\u2551 \u2588\u2588\u2551\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2557\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2557\u2588\u2588\u2588\u2588\u2588\u2588\u2554\u255D\n \u255A\u2550\u2550\u2550\u2550\u2550\u255D \u255A\u2550\u2550\u2550\u2550\u2550\u255D \u255A\u2550\u255D \u255A\u2550\u255D\u255A\u2550\u255D \u255A\u2550\u255D\u255A\u2550\u2550\u2550\u2550\u2550\u2550\u255D\u255A\u2550\u2550\u2550\u2550\u2550\u2550\u255D\u255A\u2550\u2550\u2550\u2550\u2550\u255D\n\n @compiled/react/runtime - DEV WARNING\n\n ".concat(str, "\n")], args, false));
|
|
14
18
|
};
|
|
15
19
|
export var analyzeCssInDev = function (sheet) {
|
|
16
20
|
if (hasWarned[sheet]) {
|
|
@@ -18,7 +22,7 @@ export var analyzeCssInDev = function (sheet) {
|
|
|
18
22
|
}
|
|
19
23
|
var shouldWarnAboutSelectors = selectorsToWarn.map(function (selector) { return sheet.includes(selector); }).filter(Boolean).length > 0;
|
|
20
24
|
if (shouldWarnAboutSelectors) {
|
|
21
|
-
warn("Selectors \""
|
|
25
|
+
warn("Selectors \"".concat(selectorsToWarn.join(', '), "\" are dangerous to use when server side rendering.\n Alternatively try and use \":nth-of-type\", or placing data attributes and targetting those instead.\n Read https://compiledcssinjs.com/docs/server-side-rendering for more advice."));
|
|
22
26
|
}
|
|
23
27
|
hasWarned[sheet] = true;
|
|
24
28
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dev-warnings.js","sourceRoot":"","sources":["../../../src/runtime/dev-warnings.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"dev-warnings.js","sourceRoot":"","sources":["../../../src/runtime/dev-warnings.tsx"],"names":[],"mappings":";;;;;;;;;AAAA,IAAM,eAAe,GAAG,CAAC,cAAc,EAAE,YAAY,CAAC,CAAC;AACvD,IAAM,SAAS,GAAyB,EAAE,CAAC;AAE3C,IAAM,IAAI,GAAG,UAAC,GAAW;IAAE,cAAc;SAAd,UAAc,EAAd,qBAAc,EAAd,IAAc;QAAd,6BAAc;;IACvC,OAAA,OAAO,CAAC,KAAK,OAAb,OAAO,iBACL,06DAUA,GAAG,OACN,GACM,IAAI;AAbT,CAcC,CAAC;AAEJ,MAAM,CAAC,IAAM,eAAe,GAAG,UAAC,KAAa;IAC3C,IAAI,SAAS,CAAC,KAAK,CAAC,EAAE;QACpB,OAAO;KACR;IAED,IAAM,wBAAwB,GAC5B,eAAe,CAAC,GAAG,CAAC,UAAC,QAAQ,IAAK,OAAA,KAAK,CAAC,QAAQ,CAAC,QAAQ,CAAC,EAAxB,CAAwB,CAAC,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC,MAAM,GAAG,CAAC,CAAC;IAEzF,IAAI,wBAAwB,EAAE;QAC5B,IAAI,CACF,sBAAc,eAAe,CAAC,IAAI,CAAC,IAAI,CAAC,gPAEiC,CAC1E,CAAC;KACH;IAED,SAAS,CAAC,KAAK,CAAC,GAAG,IAAI,CAAC;AAC1B,CAAC,CAAC"}
|
|
@@ -11,8 +11,6 @@
|
|
|
11
11
|
* ```
|
|
12
12
|
*/
|
|
13
13
|
export var isNodeEnvironment = function () {
|
|
14
|
-
|
|
15
|
-
// https://nodejs.org/api/process.html#process_process_release
|
|
16
|
-
return typeof process !== 'undefined' && ((_a = process === null || process === void 0 ? void 0 : process.release) === null || _a === void 0 ? void 0 : _a.name) === 'node';
|
|
14
|
+
return typeof window === 'undefined';
|
|
17
15
|
};
|
|
18
16
|
//# sourceMappingURL=is-node.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"is-node.js","sourceRoot":"","sources":["../../../src/runtime/is-node.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AACH,MAAM,CAAC,IAAM,iBAAiB,GAAG
|
|
1
|
+
{"version":3,"file":"is-node.js","sourceRoot":"","sources":["../../../src/runtime/is-node.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AACH,MAAM,CAAC,IAAM,iBAAiB,GAAG;IAC/B,OAAO,OAAO,MAAM,KAAK,WAAW,CAAC;AACvC,CAAC,CAAC"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { Bucket, StyleSheetOpts } from './types';
|
|
2
2
|
/**
|
|
3
3
|
* Ordered style buckets using their short psuedo name.
|
|
4
4
|
* If changes are needed make sure that it aligns with the definition in `sort-at-rule-pseudos.tsx`.
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { isCacheDisabled } from './cache';
|
|
1
2
|
/**
|
|
2
3
|
* Ordered style buckets using their short psuedo name.
|
|
3
4
|
* If changes are needed make sure that it aligns with the definition in `sort-at-rule-pseudos.tsx`.
|
|
@@ -70,8 +71,11 @@ function lazyAddStyleBucketToHead(bucketName, opts) {
|
|
|
70
71
|
var tag = document.createElement('style');
|
|
71
72
|
opts.nonce && tag.setAttribute('nonce', opts.nonce);
|
|
72
73
|
tag.appendChild(document.createTextNode(''));
|
|
73
|
-
styleBucketsInHead[bucketName] = tag;
|
|
74
74
|
document.head.insertBefore(tag, nextBucketFromCache);
|
|
75
|
+
if (false) {
|
|
76
|
+
return tag;
|
|
77
|
+
}
|
|
78
|
+
styleBucketsInHead[bucketName] = tag;
|
|
75
79
|
}
|
|
76
80
|
return styleBucketsInHead[bucketName];
|
|
77
81
|
}
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Flowtype definitions for sheet
|
|
3
3
|
* Generated by Flowgen from a Typescript Definition
|
|
4
|
-
* Flowgen v1.
|
|
4
|
+
* Flowgen v1.15.0
|
|
5
5
|
* @flow
|
|
6
6
|
*/
|
|
7
|
-
import type {
|
|
7
|
+
import type { Bucket, StyleSheetOpts } from './types';
|
|
8
8
|
/**
|
|
9
9
|
* Ordered style buckets using their short psuedo name.
|
|
10
10
|
* If changes are needed make sure that it aligns with the definition in `sort-at-rule-pseudos.tsx`.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sheet.js","sourceRoot":"","sources":["../../../src/runtime/sheet.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"sheet.js","sourceRoot":"","sources":["../../../src/runtime/sheet.tsx"],"names":[],"mappings":"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"}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import { createContext, useContext } from 'react';
|
|
3
|
+
import { isCacheDisabled } from './cache';
|
|
3
4
|
import { isNodeEnvironment } from './is-node';
|
|
4
5
|
/**
|
|
5
6
|
* Cache to hold already used styles.
|
|
@@ -22,6 +23,9 @@ if (!isNodeEnvironment()) {
|
|
|
22
23
|
* Hook using the cache created on the server or client.
|
|
23
24
|
*/
|
|
24
25
|
export var useCache = function () {
|
|
26
|
+
if (false) {
|
|
27
|
+
return {};
|
|
28
|
+
}
|
|
25
29
|
if (isNodeEnvironment()) {
|
|
26
30
|
// On the server we use React Context to we don't leak the cache between SSR calls.
|
|
27
31
|
// During runtime this hook isn't conditionally called - it is at build time that the flow gets decided.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"style-cache.js","sourceRoot":"","sources":["../../../src/runtime/style-cache.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAE,aAAa,EAAE,UAAU,EAAE,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"style-cache.js","sourceRoot":"","sources":["../../../src/runtime/style-cache.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAE,aAAa,EAAE,UAAU,EAAE,MAAM,OAAO,CAAC;AAElD,OAAO,EAAE,eAAe,EAAE,MAAM,SAAS,CAAC;AAC1C,OAAO,EAAE,iBAAiB,EAAE,MAAM,WAAW,CAAC;AAG9C;;;GAGG;AACH,IAAM,KAAK,GAAQ,iBAAiB,EAAE,CAAC,CAAC,CAAC,aAAa,CAA8B,IAAI,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC;AAE/F,IAAI,CAAC,iBAAiB,EAAE,EAAE;IACxB;;;;OAIG;IACH,IAAM,SAAS,GAAG,QAAQ,CAAC,gBAAgB,CAAmB,mBAAmB,CAAC,CAAC;IACnF,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,SAAS,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE;QACzC,iGAAiG;QACjG,QAAQ,CAAC,IAAI,CAAC,WAAW,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC,CAAC;KACzC;CACF;AAED;;GAEG;AACH,MAAM,CAAC,IAAM,QAAQ,GAAiB;IACpC,WAAuB;QACrB,OAAO,EAAE,CAAC;KACX;IAED,IAAI,iBAAiB,EAAE,EAAE;QACvB,mFAAmF;QACnF,wGAAwG;QACxG,sDAAsD;QACtD,OAAO,UAAU,CAAC,KAAK,CAAC,IAAI,EAAE,CAAC;KAChC;IAED,6CAA6C;IAC7C,OAAO,KAAK,CAAC;AACf,CAAC,CAAC;AAEF;;;;;GAKG;AACH,IAAM,kBAAkB,GAAsB,UAAC,KAAK;IAClD,IAAI,iBAAiB,EAAE,EAAE;QACvB,4EAA4E;QAC5E,sDAAsD;QACtD,IAAM,QAAQ,GAAG,QAAQ,EAAE,CAAC;QAC5B,OAAO,oBAAC,KAAK,CAAC,QAAQ,IAAC,KAAK,EAAE,QAAQ,IAAG,KAAK,CAAC,QAAQ,CAAkB,CAAC;KAC3E;IAED,OAAO,KAAK,CAAC,QAAuB,CAAC;AACvC,CAAC,CAAC;AAEF,eAAe,kBAAkB,CAAC"}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import insertRule, { getStyleBucketName, styleBucketOrdering } from './sheet';
|
|
3
2
|
import { analyzeCssInDev } from './dev-warnings';
|
|
4
|
-
import { useCache } from './style-cache';
|
|
5
3
|
import { isNodeEnvironment } from './is-node';
|
|
4
|
+
import insertRule, { getStyleBucketName, styleBucketOrdering } from './sheet';
|
|
5
|
+
import { useCache } from './style-cache';
|
|
6
6
|
export default function Style(props) {
|
|
7
7
|
var inserted = useCache();
|
|
8
8
|
if (process.env.NODE_ENV === 'development') {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"style.js","sourceRoot":"","sources":["../../../src/runtime/style.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"style.js","sourceRoot":"","sources":["../../../src/runtime/style.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAC;AACjD,OAAO,EAAE,iBAAiB,EAAE,MAAM,WAAW,CAAC;AAC9C,OAAO,UAAU,EAAE,EAAE,kBAAkB,EAAE,mBAAmB,EAAE,MAAM,SAAS,CAAC;AAC9E,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AAWzC,MAAM,CAAC,OAAO,UAAU,KAAK,CAAC,KAAiB;IAC7C,IAAM,QAAQ,GAAG,QAAQ,EAAE,CAAC;IAE5B,IAAI,OAAO,CAAC,GAAG,CAAC,QAAQ,KAAK,aAAa,EAAE;QAC1C,KAAK,CAAC,QAAQ,CAAC,OAAO,CAAC,eAAe,CAAC,CAAC;KACzC;IAED,IAAI,KAAK,CAAC,QAAQ,CAAC,MAAM,EAAE;QACzB,IAAI,iBAAiB,EAAE,EAAE;YACvB,IAAM,gBAAc,GAAoC,EAAE,CAAC;YAC3D,IAAI,SAAS,GAAG,KAAK,CAAC;YAEtB,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,KAAK,CAAC,QAAQ,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE;gBAC9C,IAAM,KAAK,GAAG,KAAK,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC;gBAChC,IAAI,QAAQ,CAAC,KAAK,CAAC,EAAE;oBACnB,SAAS;iBACV;qBAAM;oBACL,QAAQ,CAAC,KAAK,CAAC,GAAG,IAAI,CAAC;oBACvB,SAAS,GAAG,IAAI,CAAC;iBAClB;gBAED,IAAM,UAAU,GAAG,kBAAkB,CAAC,KAAK,CAAC,CAAC;gBAC7C,gBAAc,CAAC,UAAU,CAAC,GAAG,CAAC,gBAAc,CAAC,UAAU,CAAC,IAAI,EAAE,CAAC,GAAG,KAAK,CAAC;aACzE;YAED,IAAI,CAAC,SAAS,EAAE;gBACd,OAAO,IAAI,CAAC;aACb;YAED,OAAO,CACL,mDAEE,KAAK,EAAE,KAAK,CAAC,KAAK,EAClB,uBAAuB,EAAE;oBACvB,MAAM,EAAE,mBAAmB,CAAC,GAAG,CAAC,UAAC,MAAM,IAAK,OAAA,gBAAc,CAAC,MAAM,CAAC,EAAtB,CAAsB,CAAC,CAAC,IAAI,CAAC,EAAE,CAAC;iBAC7E,GACD,CACH,CAAC;SACH;aAAM;YACL,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,KAAK,CAAC,QAAQ,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE;gBAC9C,IAAM,KAAK,GAAG,KAAK,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC;gBAChC,IAAI,QAAQ,CAAC,KAAK,CAAC,EAAE;oBACnB,SAAS;iBACV;gBAED,QAAQ,CAAC,KAAK,CAAC,GAAG,IAAI,CAAC;gBACvB,UAAU,CAAC,KAAK,EAAE,KAAK,CAAC,CAAC;aAC1B;SACF;KACF;IAED,OAAO,IAAI,CAAC;AACd,CAAC"}
|
package/dist/esm/runtime.js.flow
CHANGED
|
@@ -32,16 +32,44 @@ export interface StyledComponentInstantiator extends StyledComponentMap {
|
|
|
32
32
|
<TInheritedProps extends unknown>(Component: ComponentType<TInheritedProps>): StyledFunctionFromComponent<TInheritedProps>;
|
|
33
33
|
}
|
|
34
34
|
/**
|
|
35
|
-
*
|
|
35
|
+
* ## Styled component
|
|
36
36
|
*
|
|
37
|
+
* Create a component that styles a JSX element which comes with built-in behavior such as `ref` and `as` prop support.
|
|
38
|
+
* For further details [read the documentation](https://compiledcssinjs.com/docs/api-styled).
|
|
39
|
+
*
|
|
40
|
+
* ### Style with objects
|
|
41
|
+
*
|
|
42
|
+
* @example
|
|
43
|
+
* ```
|
|
44
|
+
* styled.div({
|
|
45
|
+
* fontSize: 12,
|
|
46
|
+
* });
|
|
47
|
+
* ```
|
|
48
|
+
*
|
|
49
|
+
* ### Style with template literals
|
|
50
|
+
*
|
|
51
|
+
* @example
|
|
37
52
|
* ```
|
|
38
|
-
* styled.div`
|
|
39
|
-
*
|
|
40
|
-
*
|
|
41
|
-
* styled.div({ fontSize: 12 }, `font-size: 12px`) Multi arguments CSS
|
|
53
|
+
* styled.div`
|
|
54
|
+
* font-size: 12px
|
|
55
|
+
* `;
|
|
42
56
|
* ```
|
|
43
57
|
*
|
|
44
|
-
*
|
|
45
|
-
*
|
|
58
|
+
* ### Compose styles with arrays
|
|
59
|
+
*
|
|
60
|
+
* @example
|
|
61
|
+
* ```
|
|
62
|
+
* import { css } from '@compiled/react';
|
|
63
|
+
*
|
|
64
|
+
* styled.div([
|
|
65
|
+
* { fontSize: 12 },
|
|
66
|
+
* css`font-size: 12px;`
|
|
67
|
+
* ]);
|
|
68
|
+
*
|
|
69
|
+
* styled.div(
|
|
70
|
+
* { fontSize: 12 },
|
|
71
|
+
* css`font-size: 12px`
|
|
72
|
+
* );
|
|
73
|
+
* ```
|
|
46
74
|
*/
|
|
47
75
|
export declare const styled: StyledComponentInstantiator;
|
package/dist/esm/styled/index.js
CHANGED
|
@@ -1,16 +1,44 @@
|
|
|
1
1
|
import { createSetupError } from '../utils/error';
|
|
2
2
|
/**
|
|
3
|
-
*
|
|
3
|
+
* ## Styled component
|
|
4
4
|
*
|
|
5
|
+
* Create a component that styles a JSX element which comes with built-in behavior such as `ref` and `as` prop support.
|
|
6
|
+
* For further details [read the documentation](https://compiledcssinjs.com/docs/api-styled).
|
|
7
|
+
*
|
|
8
|
+
* ### Style with objects
|
|
9
|
+
*
|
|
10
|
+
* @example
|
|
11
|
+
* ```
|
|
12
|
+
* styled.div({
|
|
13
|
+
* fontSize: 12,
|
|
14
|
+
* });
|
|
15
|
+
* ```
|
|
16
|
+
*
|
|
17
|
+
* ### Style with template literals
|
|
18
|
+
*
|
|
19
|
+
* @example
|
|
5
20
|
* ```
|
|
6
|
-
* styled.div`
|
|
7
|
-
*
|
|
8
|
-
*
|
|
9
|
-
* styled.div({ fontSize: 12 }, `font-size: 12px`) Multi arguments CSS
|
|
21
|
+
* styled.div`
|
|
22
|
+
* font-size: 12px
|
|
23
|
+
* `;
|
|
10
24
|
* ```
|
|
11
25
|
*
|
|
12
|
-
*
|
|
13
|
-
*
|
|
26
|
+
* ### Compose styles with arrays
|
|
27
|
+
*
|
|
28
|
+
* @example
|
|
29
|
+
* ```
|
|
30
|
+
* import { css } from '@compiled/react';
|
|
31
|
+
*
|
|
32
|
+
* styled.div([
|
|
33
|
+
* { fontSize: 12 },
|
|
34
|
+
* css`font-size: 12px;`
|
|
35
|
+
* ]);
|
|
36
|
+
*
|
|
37
|
+
* styled.div(
|
|
38
|
+
* { fontSize: 12 },
|
|
39
|
+
* css`font-size: 12px`
|
|
40
|
+
* );
|
|
41
|
+
* ```
|
|
14
42
|
*/
|
|
15
43
|
export var styled = new Proxy({}, {
|
|
16
44
|
get: function () {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Flowtype definitions for index
|
|
3
3
|
* Generated by Flowgen from a Typescript Definition
|
|
4
|
-
* Flowgen v1.
|
|
4
|
+
* Flowgen v1.15.0
|
|
5
5
|
* @flow
|
|
6
6
|
*/
|
|
7
7
|
import type { ComponentType } from 'react';
|
|
@@ -33,7 +33,7 @@ export interface StyledFunctionFromTag<TTag: $Keys<$JSXIntrinsics>> {
|
|
|
33
33
|
...interpolations: Interpolations<TProps>
|
|
34
34
|
): React$ComponentType<{
|
|
35
35
|
...TProps,
|
|
36
|
-
...$ElementType<$JSXIntrinsics, TTag
|
|
36
|
+
...$Exact<$ElementType<$JSXIntrinsics, TTag>>,
|
|
37
37
|
...StyledProps,
|
|
38
38
|
}>;
|
|
39
39
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/styled/index.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/styled/index.tsx"],"names":[],"mappings":"AAGA,OAAO,EAAE,gBAAgB,EAAE,MAAM,gBAAgB,CAAC;AAwDlD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAwCG;AACH,MAAM,CAAC,IAAM,MAAM,GAAgC,IAAI,KAAK,CAC1D,EAAE,EACF;IACE,GAAG;QACD,OAAO;YACL,8CAA8C;YAC9C,yDAAyD;YACzD,MAAM,gBAAgB,EAAE,CAAC;QAC3B,CAAC,CAAC;IACJ,CAAC;CACF,CACK,CAAC"}
|
package/dist/esm/types.js.flow
CHANGED