@compiled/react 0.10.1 → 0.10.4
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.js.map +1 -1
- package/dist/browser/css/index.js.map +1 -1
- package/dist/browser/index.js.map +1 -1
- package/dist/browser/jsx/jsx-dev-runtime.js.map +1 -1
- package/dist/browser/jsx/jsx-local-namespace.js.map +1 -1
- package/dist/browser/jsx/jsx-runtime.js.map +1 -1
- package/dist/browser/keyframes/__fixtures__/index.js +1 -0
- package/dist/browser/keyframes/__fixtures__/index.js.map +1 -1
- package/dist/browser/keyframes/index.js.map +1 -1
- package/dist/browser/runtime/ax.js.map +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.js.map +1 -1
- package/dist/browser/runtime/dev-warnings.js +10 -6
- package/dist/browser/runtime/dev-warnings.js.map +1 -1
- package/dist/browser/runtime/index.js.map +1 -1
- package/dist/browser/runtime/is-node.js +1 -3
- package/dist/browser/runtime/is-node.js.map +1 -1
- package/dist/browser/runtime/sheet.js +5 -1
- 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.map +1 -1
- package/dist/browser/runtime/types.js.map +1 -1
- package/dist/browser/runtime.js.map +1 -1
- package/dist/browser/styled/index.js.map +1 -1
- package/dist/browser/types.js.map +1 -1
- package/dist/browser/utils/error.js.map +1 -1
- package/dist/cjs/class-names/index.js +1 -1
- package/dist/cjs/class-names/index.js.map +1 -1
- package/dist/cjs/css/index.js +1 -1
- package/dist/cjs/css/index.js.map +1 -1
- package/dist/cjs/index.js.map +1 -1
- package/dist/cjs/jsx/jsx-dev-runtime.js +5 -1
- package/dist/cjs/jsx/jsx-dev-runtime.js.map +1 -1
- package/dist/cjs/jsx/jsx-local-namespace.js.map +1 -1
- package/dist/cjs/jsx/jsx-runtime.js +5 -1
- package/dist/cjs/jsx/jsx-runtime.js.map +1 -1
- package/dist/cjs/keyframes/__fixtures__/index.js +2 -1
- package/dist/cjs/keyframes/__fixtures__/index.js.map +1 -1
- package/dist/cjs/keyframes/index.js +1 -1
- package/dist/cjs/keyframes/index.js.map +1 -1
- package/dist/cjs/runtime/ax.js.map +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.js.map +1 -1
- package/dist/cjs/runtime/dev-warnings.js +10 -6
- package/dist/cjs/runtime/dev-warnings.js.map +1 -1
- package/dist/cjs/runtime/index.js.map +1 -1
- package/dist/cjs/runtime/is-node.js +1 -3
- package/dist/cjs/runtime/is-node.js.map +1 -1
- package/dist/cjs/runtime/sheet.js +6 -2
- package/dist/cjs/runtime/sheet.js.map +1 -1
- package/dist/cjs/runtime/style-cache.js +15 -7
- package/dist/cjs/runtime/style-cache.js.map +1 -1
- package/dist/cjs/runtime/style.js +9 -5
- package/dist/cjs/runtime/style.js.map +1 -1
- package/dist/cjs/runtime/types.js.map +1 -1
- package/dist/cjs/runtime.js.map +1 -1
- package/dist/cjs/styled/index.js +1 -1
- package/dist/cjs/styled/index.js.map +1 -1
- package/dist/cjs/types.js.map +1 -1
- package/dist/cjs/utils/error.js.map +1 -1
- package/dist/esm/class-names/index.js.map +1 -1
- package/dist/esm/css/index.js.map +1 -1
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/jsx/jsx-dev-runtime.js.map +1 -1
- package/dist/esm/jsx/jsx-local-namespace.js.map +1 -1
- package/dist/esm/jsx/jsx-runtime.js.map +1 -1
- package/dist/esm/keyframes/__fixtures__/index.js +1 -0
- package/dist/esm/keyframes/__fixtures__/index.js.map +1 -1
- package/dist/esm/keyframes/index.js.map +1 -1
- package/dist/esm/runtime/ax.js.map +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.js.map +1 -1
- package/dist/esm/runtime/dev-warnings.js +10 -6
- package/dist/esm/runtime/dev-warnings.js.map +1 -1
- package/dist/esm/runtime/index.js.map +1 -1
- package/dist/esm/runtime/is-node.js +1 -3
- package/dist/esm/runtime/is-node.js.map +1 -1
- package/dist/esm/runtime/sheet.js +5 -1
- 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.map +1 -1
- package/dist/esm/runtime/types.js.map +1 -1
- package/dist/esm/runtime.js.map +1 -1
- package/dist/esm/styled/index.js.map +1 -1
- package/dist/esm/types.js.map +1 -1
- package/dist/esm/utils/error.js.map +1 -1
- package/package.json +15 -12
- package/src/__tests__/browser.test.tsx +1 -6
- package/src/__tests__/{display-names.test.tsx → display-names.test.ts} +1 -0
- package/src/__tests__/jest-matcher.test.tsx +2 -0
- package/src/__tests__/ssr.test.tsx +2 -0
- package/src/class-names/__tests__/index.test.tsx +1 -0
- package/src/class-names/{index.tsx → index.ts} +0 -0
- package/src/css/__tests__/index.test.tsx +1 -0
- package/src/css/{index.tsx → index.ts} +0 -0
- package/src/{index.tsx → index.ts} +0 -0
- package/src/jsx/__tests__/jsx-pragma.test.tsx +1 -0
- package/src/jsx/{jsx-dev-runtime.tsx → jsx-dev-runtime.ts} +0 -0
- package/src/jsx/{jsx-local-namespace.tsx → jsx-local-namespace.ts} +0 -0
- package/src/jsx/{jsx-runtime.tsx → jsx-runtime.ts} +0 -0
- package/src/keyframes/__fixtures__/{index.tsx → index.ts} +1 -0
- package/src/keyframes/__tests__/index.test.tsx +18 -5
- package/src/keyframes/{index.tsx → index.ts} +0 -0
- package/src/runtime/__perf__/cs.test.tsx +137 -92
- package/src/runtime/__perf__/utils/cs.tsx +15 -15
- package/src/runtime/__perf__/utils/{sheet.tsx → sheet.ts} +0 -0
- package/src/runtime/__tests__/{ax.test.tsx → ax.test.ts} +0 -0
- package/src/runtime/__tests__/{css-custom-property.test.tsx → css-custom-property.test.ts} +0 -0
- package/src/runtime/__tests__/style-ssr.test.tsx +4 -0
- package/src/runtime/__tests__/style.test.tsx +0 -4
- package/src/runtime/{ax.tsx → ax.ts} +0 -0
- package/src/runtime/cache.js.flow +18 -0
- package/src/runtime/cache.ts +14 -0
- package/src/runtime/{css-custom-property.tsx → css-custom-property.ts} +0 -0
- package/src/runtime/{dev-warnings.tsx → dev-warnings.ts} +0 -0
- package/src/runtime/{index.tsx → index.ts} +0 -0
- package/src/runtime/{is-node.tsx → is-node.ts} +1 -2
- package/src/runtime/{sheet.tsx → sheet.ts} +7 -1
- package/src/runtime/style-cache.tsx +5 -0
- package/src/runtime/{types.tsx → types.ts} +0 -0
- package/src/{runtime.tsx → runtime.ts} +0 -0
- package/src/styled/__tests__/index.test.tsx +1 -0
- /package/src/styled/{index.tsx → index.ts} +0 -0
- /package/src/{types.tsx → types.ts} +0 -0
- /package/src/utils/{error.tsx → error.ts} +0 -0
|
@@ -1,7 +1,11 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
3
|
if (k2 === undefined) k2 = k;
|
|
4
|
-
Object.
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
5
9
|
}) : (function(o, m, k, k2) {
|
|
6
10
|
if (k2 === undefined) k2 = k;
|
|
7
11
|
o[k2] = m[k];
|
|
@@ -22,13 +26,14 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
22
26
|
exports.useCache = void 0;
|
|
23
27
|
var React = __importStar(require("react"));
|
|
24
28
|
var react_1 = require("react");
|
|
29
|
+
var cache_1 = require("./cache");
|
|
25
30
|
var is_node_1 = require("./is-node");
|
|
26
31
|
/**
|
|
27
32
|
* Cache to hold already used styles.
|
|
28
33
|
* React Context on the server - singleton object on the client.
|
|
29
34
|
*/
|
|
30
|
-
var Cache = is_node_1.isNodeEnvironment() ? react_1.createContext(null) : {};
|
|
31
|
-
if (!is_node_1.isNodeEnvironment()) {
|
|
35
|
+
var Cache = (0, is_node_1.isNodeEnvironment)() ? (0, react_1.createContext)(null) : {};
|
|
36
|
+
if (!(0, is_node_1.isNodeEnvironment)()) {
|
|
32
37
|
/**
|
|
33
38
|
* Iterates through all found style elements generated when server side rendering.
|
|
34
39
|
*
|
|
@@ -44,11 +49,14 @@ if (!is_node_1.isNodeEnvironment()) {
|
|
|
44
49
|
* Hook using the cache created on the server or client.
|
|
45
50
|
*/
|
|
46
51
|
var useCache = function () {
|
|
47
|
-
if (
|
|
52
|
+
if (false) {
|
|
53
|
+
return {};
|
|
54
|
+
}
|
|
55
|
+
if ((0, is_node_1.isNodeEnvironment)()) {
|
|
48
56
|
// On the server we use React Context to we don't leak the cache between SSR calls.
|
|
49
57
|
// During runtime this hook isn't conditionally called - it is at build time that the flow gets decided.
|
|
50
58
|
// eslint-disable-next-line react-hooks/rules-of-hooks
|
|
51
|
-
return react_1.useContext(Cache) || {};
|
|
59
|
+
return (0, react_1.useContext)(Cache) || {};
|
|
52
60
|
}
|
|
53
61
|
// On the client we use the object singleton.
|
|
54
62
|
return Cache;
|
|
@@ -61,10 +69,10 @@ exports.useCache = useCache;
|
|
|
61
69
|
* On the browser this turns into a fragment with no React Context.
|
|
62
70
|
*/
|
|
63
71
|
var StyleCacheProvider = function (props) {
|
|
64
|
-
if (is_node_1.isNodeEnvironment()) {
|
|
72
|
+
if ((0, is_node_1.isNodeEnvironment)()) {
|
|
65
73
|
// This code path isn't conditionally called at build time - safe to ignore.
|
|
66
74
|
// eslint-disable-next-line react-hooks/rules-of-hooks
|
|
67
|
-
var inserted = exports.useCache();
|
|
75
|
+
var inserted = (0, exports.useCache)();
|
|
68
76
|
return React.createElement(Cache.Provider, { value: inserted }, props.children);
|
|
69
77
|
}
|
|
70
78
|
return props.children;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"style-cache.js","sourceRoot":"","sources":["../../../src/runtime/style-cache.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"style-cache.js","sourceRoot":"","sources":["../../../src/runtime/style-cache.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,2CAA+B;AAC/B,+BAAkD;AAElD,iCAA0C;AAC1C,qCAA8C;AAG9C;;;GAGG;AACH,IAAM,KAAK,GAAQ,IAAA,2BAAiB,GAAE,CAAC,CAAC,CAAC,IAAA,qBAAa,EAA8B,IAAI,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC;AAE/F,IAAI,CAAC,IAAA,2BAAiB,GAAE,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;AACI,IAAM,QAAQ,GAAiB;IACpC,WAAuB;QACrB,OAAO,EAAE,CAAC;KACX;IAED,IAAI,IAAA,2BAAiB,GAAE,EAAE;QACvB,mFAAmF;QACnF,wGAAwG;QACxG,sDAAsD;QACtD,OAAO,IAAA,kBAAU,EAAC,KAAK,CAAC,IAAI,EAAE,CAAC;KAChC;IAED,6CAA6C;IAC7C,OAAO,KAAK,CAAC;AACf,CAAC,CAAC;AAdW,QAAA,QAAQ,YAcnB;AAEF;;;;;GAKG;AACH,IAAM,kBAAkB,GAAsB,UAAC,KAAK;IAClD,IAAI,IAAA,2BAAiB,GAAE,EAAE;QACvB,4EAA4E;QAC5E,sDAAsD;QACtD,IAAM,QAAQ,GAAG,IAAA,gBAAQ,GAAE,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,kBAAe,kBAAkB,CAAC"}
|
|
@@ -1,7 +1,11 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
3
|
if (k2 === undefined) k2 = k;
|
|
4
|
-
Object.
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
5
9
|
}) : (function(o, m, k, k2) {
|
|
6
10
|
if (k2 === undefined) k2 = k;
|
|
7
11
|
o[k2] = m[k];
|
|
@@ -28,12 +32,12 @@ var is_node_1 = require("./is-node");
|
|
|
28
32
|
var sheet_1 = __importStar(require("./sheet"));
|
|
29
33
|
var style_cache_1 = require("./style-cache");
|
|
30
34
|
function Style(props) {
|
|
31
|
-
var inserted = style_cache_1.useCache();
|
|
35
|
+
var inserted = (0, style_cache_1.useCache)();
|
|
32
36
|
if (process.env.NODE_ENV === 'development') {
|
|
33
37
|
props.children.forEach(dev_warnings_1.analyzeCssInDev);
|
|
34
38
|
}
|
|
35
39
|
if (props.children.length) {
|
|
36
|
-
if (is_node_1.isNodeEnvironment()) {
|
|
40
|
+
if ((0, is_node_1.isNodeEnvironment)()) {
|
|
37
41
|
var bucketedSheets_1 = {};
|
|
38
42
|
var hasSheets = false;
|
|
39
43
|
for (var i = 0; i < props.children.length; i++) {
|
|
@@ -45,7 +49,7 @@ function Style(props) {
|
|
|
45
49
|
inserted[sheet] = true;
|
|
46
50
|
hasSheets = true;
|
|
47
51
|
}
|
|
48
|
-
var bucketName = sheet_1.getStyleBucketName(sheet);
|
|
52
|
+
var bucketName = (0, sheet_1.getStyleBucketName)(sheet);
|
|
49
53
|
bucketedSheets_1[bucketName] = (bucketedSheets_1[bucketName] || '') + sheet;
|
|
50
54
|
}
|
|
51
55
|
if (!hasSheets) {
|
|
@@ -62,7 +66,7 @@ function Style(props) {
|
|
|
62
66
|
continue;
|
|
63
67
|
}
|
|
64
68
|
inserted[sheet] = true;
|
|
65
|
-
sheet_1.default(sheet, props);
|
|
69
|
+
(0, sheet_1.default)(sheet, props);
|
|
66
70
|
}
|
|
67
71
|
}
|
|
68
72
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"style.js","sourceRoot":"","sources":["../../../src/runtime/style.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"style.js","sourceRoot":"","sources":["../../../src/runtime/style.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,gDAA0B;AAE1B,+CAAiD;AACjD,qCAA8C;AAC9C,+CAA8E;AAC9E,6CAAyC;AAWzC,SAAwB,KAAK,CAAC,KAAiB;IAC7C,IAAM,QAAQ,GAAG,IAAA,sBAAQ,GAAE,CAAC;IAE5B,IAAI,OAAO,CAAC,GAAG,CAAC,QAAQ,KAAK,aAAa,EAAE;QAC1C,KAAK,CAAC,QAAQ,CAAC,OAAO,CAAC,8BAAe,CAAC,CAAC;KACzC;IAED,IAAI,KAAK,CAAC,QAAQ,CAAC,MAAM,EAAE;QACzB,IAAI,IAAA,2BAAiB,GAAE,EAAE;YACvB,I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AC,CAAC;aAC1B;SACF;KACF;IAED,OAAO,IAAI,CAAC;AACd,CAAC;AApDD,wBAoDC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../src/runtime/types.
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../src/runtime/types.ts"],"names":[],"mappings":""}
|
package/dist/cjs/runtime.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"runtime.js","sourceRoot":"","sources":["../../src/runtime.
|
|
1
|
+
{"version":3,"file":"runtime.js","sourceRoot":"","sources":["../../src/runtime.ts"],"names":[],"mappings":";;;AAAA,yCAAiD;AAAxC,2FAAA,EAAE,OAAA;AAAE,2FAAA,EAAE,OAAA;AAAE,2FAAA,EAAE,OAAA;AAAE,2FAAA,EAAE,OAAA"}
|
package/dist/cjs/styled/index.js
CHANGED
|
@@ -48,7 +48,7 @@ exports.styled = new Proxy({}, {
|
|
|
48
48
|
return function () {
|
|
49
49
|
// Blow up if the transformer isn't turned on.
|
|
50
50
|
// This code won't ever be executed when setup correctly.
|
|
51
|
-
throw error_1.createSetupError();
|
|
51
|
+
throw (0, error_1.createSetupError)();
|
|
52
52
|
};
|
|
53
53
|
},
|
|
54
54
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/styled/index.
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/styled/index.ts"],"names":[],"mappings":";;;AAGA,wCAAkD;AAwDlD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAwCG;AACU,QAAA,MAAM,GAAgC,IAAI,KAAK,CAC1D,EAAE,EACF;IACE,GAAG;QACD,OAAO;YACL,8CAA8C;YAC9C,yDAAyD;YACzD,MAAM,IAAA,wBAAgB,GAAE,CAAC;QAC3B,CAAC,CAAC;IACJ,CAAC;CACF,CACK,CAAC"}
|
package/dist/cjs/types.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../src/types.
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../src/types.ts"],"names":[],"mappings":""}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"error.js","sourceRoot":"","sources":["../../../src/utils/error.
|
|
1
|
+
{"version":3,"file":"error.js","sourceRoot":"","sources":["../../../src/utils/error.ts"],"names":[],"mappings":";;;AAAO,IAAM,gBAAgB,GAAG;IAC9B,OAAO,IAAI,KAAK,CAAC,6tEAgBlB,CAAC,CAAC;AACH,CAAC,CAAC;AAlBW,QAAA,gBAAgB,oBAkB3B"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/class-names/index.
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/class-names/index.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,gBAAgB,EAAE,MAAM,gBAAgB,CAAC;AA+ClD,MAAM,UAAU,UAAU,CAAC,MAAuB;IAChD,MAAM,gBAAgB,EAAE,CAAC;AAC3B,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/css/index.
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/css/index.ts"],"names":[],"mappings":"AAAA,kCAAkC;AAQlC,OAAO,EAAE,gBAAgB,EAAE,MAAM,gBAAgB,CAAC;AAqClD,MAAM,CAAC,OAAO,UAAU,GAAG,CACzB,OAAwC;IACxC,yBAA8E;SAA9E,UAA8E,EAA9E,qBAA8E,EAA9E,IAA8E;QAA9E,wCAA8E;;IAE9E,MAAM,gBAAgB,EAAE,CAAC;AAC3B,CAAC"}
|
package/dist/esm/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AAKtC,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AACxC,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAClC,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAC3C,OAAO,EAAE,OAAO,IAAI,GAAG,EAAE,MAAM,OAAO,CAAC;AAEvC,0CAA0C;AAC1C,kGAAkG;AAClG,MAAM,CAAC,IAAM,GAAG,GAAG,aAAa,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"jsx-dev-runtime.js","sourceRoot":"","sources":["../../../src/jsx/jsx-dev-runtime.
|
|
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 +1 @@
|
|
|
1
|
-
{"version":3,"file":"jsx-local-namespace.js","sourceRoot":"","sources":["../../../src/jsx/jsx-local-namespace.
|
|
1
|
+
{"version":3,"file":"jsx-local-namespace.js","sourceRoot":"","sources":["../../../src/jsx/jsx-local-namespace.ts"],"names":[],"mappings":""}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"jsx-runtime.js","sourceRoot":"","sources":["../../../src/jsx/jsx-runtime.
|
|
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 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/keyframes/__fixtures__/index.
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/keyframes/__fixtures__/index.ts"],"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 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/keyframes/index.
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/keyframes/index.ts"],"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"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ax.js","sourceRoot":"","sources":["../../../src/runtime/ax.
|
|
1
|
+
{"version":3,"file":"ax.js","sourceRoot":"","sources":["../../../src/runtime/ax.ts"],"names":[],"mappings":"AAAA,IAAM,kBAAkB,GAAG,EAAE,CAAC;AAE9B;;;GAGG;AACH,IAAM,mBAAmB,GAAG,CAAC,CAAC;AAE9B;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,MAAM,CAAC,OAAO,UAAU,EAAE,CAAC,UAA0C;IACnE,IAAI,UAAU,CAAC,MAAM,IAAI,CAAC,EAAE;QAC1B,iDAAiD;QACjD,OAAO,UAAU,CAAC,CAAC,CAAC,IAAI,SAAS,CAAC;KACnC;IAED,IAAM,YAAY,GAA2B,EAAE,CAAC;IAEhD,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,UAAU,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE;QAC1C,IAAM,GAAG,GAAG,UAAU,CAAC,CAAC,CAAC,CAAC;QAC1B,IAAI,CAAC,GAAG,EAAE;YACR,SAAS;SACV;QAED,IAAM,MAAM,GAAG,GAAG,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;QAE9B,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,MAAM,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE;YACtC,IAAM,MAAM,GAAG,MAAM,CAAC,CAAC,CAAC,CAAC;YACzB,IAAM,eAAe,GAAG,MAAM,CAAC,KAAK,CAClC,CAAC,EACD,MAAM,CAAC,UAAU,CAAC,CAAC,CAAC,KAAK,kBAAkB,CAAC,CAAC,CAAC,mBAAmB,CAAC,CAAC,CAAC,SAAS,CAC9E,CAAC;YACF,YAAY,CAAC,eAAe,CAAC,GAAG,MAAM,CAAC;SACxC;KACF;IAED,IAAI,GAAG,GAAG,EAAE,CAAC;IAEb,KAAK,IAAM,GAAG,IAAI,YAAY,EAAE;QAC9B,IAAM,KAAK,GAAG,YAAY,CAAC,GAAG,CAAC,CAAC;QAChC,GAAG,IAAI,KAAK,GAAG,GAAG,CAAC;KACpB;IAED,OAAO,GAAG,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC;AAC1B,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.ts"],"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"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"css-custom-property.js","sourceRoot":"","sources":["../../../src/runtime/css-custom-property.
|
|
1
|
+
{"version":3,"file":"css-custom-property.js","sourceRoot":"","sources":["../../../src/runtime/css-custom-property.ts"],"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.
|
|
1
|
+
{"version":3,"file":"dev-warnings.js","sourceRoot":"","sources":["../../../src/runtime/dev-warnings.ts"],"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"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/runtime/index.
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/runtime/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,EAAE,EAAE,MAAM,SAAS,CAAC;AACxC,OAAO,EAAE,OAAO,IAAI,EAAE,EAAE,MAAM,eAAe,CAAC;AAC9C,OAAO,EAAE,OAAO,IAAI,EAAE,EAAE,MAAM,MAAM,CAAC;AACrC,OAAO,EAAE,OAAO,IAAI,EAAE,EAAE,MAAM,uBAAuB,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.
|
|
1
|
+
{"version":3,"file":"is-node.js","sourceRoot":"","sources":["../../../src/runtime/is-node.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AACH,MAAM,CAAC,IAAM,iBAAiB,GAAG;IAC/B,OAAO,OAAO,MAAM,KAAK,WAAW,CAAC;AACvC,CAAC,CAAC"}
|
|
@@ -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 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sheet.js","sourceRoot":"","sources":["../../../src/runtime/sheet.
|
|
1
|
+
{"version":3,"file":"sheet.js","sourceRoot":"","sources":["../../../src/run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AK,GAAG,KAAK,CAAC,KAAsB,CAAC;QAE3C,uGAAuG;QACvG,IAAI;YACF,KAAK,CAAC,UAAU,CAAC,GAAG,EAAE,KAAK,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAC;SAC9C;QAAC,WAAM,GAAE;KACX;SAAM;QACL,KAAK,CAAC,WAAW,CAAC,QAAQ,CAAC,cAAc,CAAC,GAAG,CAAC,CAAC,CAAC;KACjD;AACH,CAAC"}
|
|
@@ -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;AAElD,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,QA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AC,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 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../src/runtime/types.
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../src/runtime/types.ts"],"names":[],"mappings":""}
|
package/dist/esm/runtime.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"runtime.js","sourceRoot":"","sources":["../../src/runtime.
|
|
1
|
+
{"version":3,"file":"runtime.js","sourceRoot":"","sources":["../../src/runtime.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,MAAM,iBAAiB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/styled/index.
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/styled/index.ts"],"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.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../src/types.
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../src/types.ts"],"names":[],"mappings":""}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"error.js","sourceRoot":"","sources":["../../../src/utils/error.
|
|
1
|
+
{"version":3,"file":"error.js","sourceRoot":"","sources":["../../../src/utils/error.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,IAAM,gBAAgB,GAAG;IAC9B,OAAO,IAAI,KAAK,CAAC,6tEAgBlB,CAAC,CAAC;AACH,CAAC,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@compiled/react",
|
|
3
|
-
"version": "0.10.
|
|
3
|
+
"version": "0.10.4",
|
|
4
4
|
"description": "A familiar and performant compile time CSS-in-JS library for React.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"compiled",
|
|
@@ -22,41 +22,41 @@
|
|
|
22
22
|
".": {
|
|
23
23
|
"import": [
|
|
24
24
|
"./dist/esm/index.js",
|
|
25
|
-
"./src/index.
|
|
25
|
+
"./src/index.ts"
|
|
26
26
|
],
|
|
27
27
|
"require": [
|
|
28
28
|
"./dist/cjs/index.js",
|
|
29
|
-
"./src/index.
|
|
29
|
+
"./src/index.ts"
|
|
30
30
|
]
|
|
31
31
|
},
|
|
32
32
|
"./runtime": {
|
|
33
33
|
"import": [
|
|
34
34
|
"./dist/esm/runtime.js",
|
|
35
|
-
"./src/runtime.
|
|
35
|
+
"./src/runtime.ts"
|
|
36
36
|
],
|
|
37
37
|
"require": [
|
|
38
38
|
"./dist/cjs/runtime.js",
|
|
39
|
-
"./src/runtime.
|
|
39
|
+
"./src/runtime.ts"
|
|
40
40
|
]
|
|
41
41
|
},
|
|
42
42
|
"./jsx-runtime": {
|
|
43
43
|
"import": [
|
|
44
44
|
"./dist/esm/jsx/jsx-runtime.js",
|
|
45
|
-
"./src/jsx/jsx-runtime.
|
|
45
|
+
"./src/jsx/jsx-runtime.ts"
|
|
46
46
|
],
|
|
47
47
|
"require": [
|
|
48
48
|
"./dist/cjs/jsx/jsx-runtime.js",
|
|
49
|
-
"./src/jsx/jsx-runtime.
|
|
49
|
+
"./src/jsx/jsx-runtime.ts"
|
|
50
50
|
]
|
|
51
51
|
},
|
|
52
52
|
"./jsx-dev-runtime": {
|
|
53
53
|
"import": [
|
|
54
54
|
"./dist/esm/jsx/jsx-dev-runtime.js",
|
|
55
|
-
"./src/jsx/jsx-dev-runtime.
|
|
55
|
+
"./src/jsx/jsx-dev-runtime.ts"
|
|
56
56
|
],
|
|
57
57
|
"require": [
|
|
58
58
|
"./dist/cjs/jsx/jsx-dev-runtime.js",
|
|
59
|
-
"./src/jsx/jsx-dev-runtime.
|
|
59
|
+
"./src/jsx/jsx-dev-runtime.ts"
|
|
60
60
|
]
|
|
61
61
|
}
|
|
62
62
|
},
|
|
@@ -72,11 +72,14 @@
|
|
|
72
72
|
"jsx-dev-runtime"
|
|
73
73
|
],
|
|
74
74
|
"dependencies": {
|
|
75
|
-
"csstype": "^3.0.
|
|
75
|
+
"csstype": "^3.0.11"
|
|
76
76
|
},
|
|
77
77
|
"devDependencies": {
|
|
78
|
-
"@
|
|
79
|
-
"@
|
|
78
|
+
"@compiled/benchmark": "^1.0.1",
|
|
79
|
+
"@testing-library/react": "^12.1.4",
|
|
80
|
+
"@types/jsdom": "^16.2.14",
|
|
81
|
+
"@types/react-dom": "^17.0.13",
|
|
82
|
+
"jsdom": "^19.0.0",
|
|
80
83
|
"react": "^17.0.2",
|
|
81
84
|
"react-dom": "^17.0.2"
|
|
82
85
|
},
|
|
@@ -1,13 +1,8 @@
|
|
|
1
|
+
// eslint-disable-next-line import/no-extraneous-dependencies
|
|
1
2
|
import { styled } from '@compiled/react';
|
|
2
3
|
import { render } from '@testing-library/react';
|
|
3
4
|
import React from 'react';
|
|
4
5
|
|
|
5
|
-
// TODO: When we move back to browser checking (window vs. process) we can remove
|
|
6
|
-
// this and replace with the "jest-environment node" pragma.
|
|
7
|
-
jest.mock('../../src/runtime/is-node', () => ({
|
|
8
|
-
isNodeEnvironment: () => false,
|
|
9
|
-
}));
|
|
10
|
-
|
|
11
6
|
describe('browser', () => {
|
|
12
7
|
beforeEach(() => {
|
|
13
8
|
// Reset style tags in head before each test so that it will remove styles
|
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
/** @jsxImportSource @compiled/react */
|
|
2
|
+
// This test belongs in @compiled/jest - but can't be placed there due to a circular dependency.
|
|
3
|
+
// eslint-disable-next-line import/no-extraneous-dependencies
|
|
2
4
|
import { styled } from '@compiled/react';
|
|
3
5
|
import { render } from '@testing-library/react';
|
|
4
6
|
|
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @jest-environment node
|
|
3
3
|
*/
|
|
4
|
+
// eslint-disable-next-line import/no-extraneous-dependencies
|
|
4
5
|
import { styled } from '@compiled/react';
|
|
6
|
+
// eslint-disable-next-line import/no-extraneous-dependencies
|
|
5
7
|
import { CC as CompiledRoot } from '@compiled/react/runtime';
|
|
6
8
|
import React from 'react';
|
|
7
9
|
import { renderToStaticMarkup } from 'react-dom/server';
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|