@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.
Files changed (234) hide show
  1. package/dist/browser/class-names/index.d.ts +22 -16
  2. package/dist/browser/class-names/index.js +1 -27
  3. package/dist/browser/class-names/index.js.flow +2 -2
  4. package/dist/browser/class-names/index.js.map +1 -1
  5. package/dist/browser/css/index.d.ts +22 -19
  6. package/dist/browser/css/index.js +4 -3
  7. package/dist/browser/css/index.js.flow +1 -1
  8. package/dist/browser/css/index.js.map +1 -1
  9. package/dist/browser/index.d.ts +12 -22
  10. package/dist/browser/index.js +4 -0
  11. package/dist/browser/index.js.flow +5 -30
  12. package/dist/browser/index.js.map +1 -1
  13. package/dist/browser/jsx/jsx-dev-runtime.d.ts +2 -0
  14. package/dist/browser/jsx/jsx-dev-runtime.js +4 -0
  15. package/dist/browser/jsx/jsx-dev-runtime.js.map +1 -0
  16. package/dist/browser/jsx/jsx-local-namespace.d.ts +66 -0
  17. package/dist/browser/jsx/jsx-local-namespace.js +2 -0
  18. package/dist/browser/jsx/jsx-local-namespace.js.map +1 -0
  19. package/dist/browser/jsx/jsx-runtime.d.ts +2 -0
  20. package/dist/browser/jsx/jsx-runtime.js +4 -0
  21. package/dist/browser/jsx/jsx-runtime.js.map +1 -0
  22. package/dist/browser/keyframes/__fixtures__/index.js +1 -0
  23. package/dist/browser/keyframes/__fixtures__/index.js.map +1 -1
  24. package/dist/browser/keyframes/index.d.ts +20 -24
  25. package/dist/browser/keyframes/index.js.flow +1 -1
  26. package/dist/browser/keyframes/index.js.map +1 -1
  27. package/dist/browser/runtime/ax.js.flow +1 -1
  28. package/dist/browser/runtime/cache.d.ts +12 -0
  29. package/dist/browser/runtime/cache.js +15 -0
  30. package/dist/browser/runtime/cache.js.flow +18 -0
  31. package/dist/browser/runtime/cache.js.map +1 -0
  32. package/dist/browser/runtime/css-custom-property.d.ts +1 -1
  33. package/dist/browser/runtime/css-custom-property.js.flow +2 -2
  34. package/dist/browser/runtime/css-custom-property.js.map +1 -1
  35. package/dist/browser/runtime/dev-warnings.js +10 -6
  36. package/dist/browser/runtime/dev-warnings.js.flow +1 -1
  37. package/dist/browser/runtime/dev-warnings.js.map +1 -1
  38. package/dist/browser/runtime/index.js.flow +1 -1
  39. package/dist/browser/runtime/is-node.js +1 -3
  40. package/dist/browser/runtime/is-node.js.flow +1 -1
  41. package/dist/browser/runtime/is-node.js.map +1 -1
  42. package/dist/browser/runtime/sheet.d.ts +1 -1
  43. package/dist/browser/runtime/sheet.js +5 -1
  44. package/dist/browser/runtime/sheet.js.flow +2 -2
  45. package/dist/browser/runtime/sheet.js.map +1 -1
  46. package/dist/browser/runtime/style-cache.js +4 -0
  47. package/dist/browser/runtime/style-cache.js.flow +1 -1
  48. package/dist/browser/runtime/style-cache.js.map +1 -1
  49. package/dist/browser/runtime/style.js +2 -2
  50. package/dist/browser/runtime/style.js.flow +1 -1
  51. package/dist/browser/runtime/style.js.map +1 -1
  52. package/dist/browser/runtime/types.js.flow +1 -1
  53. package/dist/browser/runtime.js.flow +1 -1
  54. package/dist/browser/styled/index.d.ts +35 -7
  55. package/dist/browser/styled/index.js +35 -7
  56. package/dist/browser/styled/index.js.flow +2 -2
  57. package/dist/browser/styled/index.js.map +1 -1
  58. package/dist/browser/types.js.flow +1 -1
  59. package/dist/browser/utils/error.js.flow +1 -1
  60. package/dist/cjs/class-names/index.d.ts +22 -16
  61. package/dist/cjs/class-names/index.js +2 -28
  62. package/dist/cjs/class-names/index.js.flow +2 -2
  63. package/dist/cjs/class-names/index.js.map +1 -1
  64. package/dist/cjs/css/index.d.ts +22 -19
  65. package/dist/cjs/css/index.js +5 -4
  66. package/dist/cjs/css/index.js.flow +1 -1
  67. package/dist/cjs/css/index.js.map +1 -1
  68. package/dist/cjs/index.d.ts +12 -22
  69. package/dist/cjs/index.js +5 -1
  70. package/dist/cjs/index.js.flow +5 -30
  71. package/dist/cjs/index.js.map +1 -1
  72. package/dist/cjs/jsx/jsx-dev-runtime.d.ts +2 -0
  73. package/dist/cjs/jsx/jsx-dev-runtime.js +16 -0
  74. package/dist/cjs/jsx/jsx-dev-runtime.js.map +1 -0
  75. package/dist/cjs/jsx/jsx-local-namespace.d.ts +66 -0
  76. package/dist/cjs/jsx/jsx-local-namespace.js +3 -0
  77. package/dist/cjs/jsx/jsx-local-namespace.js.map +1 -0
  78. package/dist/cjs/jsx/jsx-runtime.d.ts +2 -0
  79. package/dist/cjs/jsx/jsx-runtime.js +16 -0
  80. package/dist/cjs/jsx/jsx-runtime.js.map +1 -0
  81. package/dist/cjs/keyframes/__fixtures__/index.js +2 -1
  82. package/dist/cjs/keyframes/__fixtures__/index.js.map +1 -1
  83. package/dist/cjs/keyframes/index.d.ts +20 -24
  84. package/dist/cjs/keyframes/index.js +1 -1
  85. package/dist/cjs/keyframes/index.js.flow +1 -1
  86. package/dist/cjs/keyframes/index.js.map +1 -1
  87. package/dist/cjs/runtime/ax.js.flow +1 -1
  88. package/dist/cjs/runtime/cache.d.ts +12 -0
  89. package/dist/cjs/runtime/cache.js +19 -0
  90. package/dist/cjs/runtime/cache.js.flow +18 -0
  91. package/dist/cjs/runtime/cache.js.map +1 -0
  92. package/dist/cjs/runtime/css-custom-property.d.ts +1 -1
  93. package/dist/cjs/runtime/css-custom-property.js.flow +2 -2
  94. package/dist/cjs/runtime/css-custom-property.js.map +1 -1
  95. package/dist/cjs/runtime/dev-warnings.js +10 -6
  96. package/dist/cjs/runtime/dev-warnings.js.flow +1 -1
  97. package/dist/cjs/runtime/dev-warnings.js.map +1 -1
  98. package/dist/cjs/runtime/index.js.flow +1 -1
  99. package/dist/cjs/runtime/is-node.js +1 -3
  100. package/dist/cjs/runtime/is-node.js.flow +1 -1
  101. package/dist/cjs/runtime/is-node.js.map +1 -1
  102. package/dist/cjs/runtime/sheet.d.ts +1 -1
  103. package/dist/cjs/runtime/sheet.js +6 -2
  104. package/dist/cjs/runtime/sheet.js.flow +2 -2
  105. package/dist/cjs/runtime/sheet.js.map +1 -1
  106. package/dist/cjs/runtime/style-cache.js +10 -6
  107. package/dist/cjs/runtime/style-cache.js.flow +1 -1
  108. package/dist/cjs/runtime/style-cache.js.map +1 -1
  109. package/dist/cjs/runtime/style.js +6 -6
  110. package/dist/cjs/runtime/style.js.flow +1 -1
  111. package/dist/cjs/runtime/style.js.map +1 -1
  112. package/dist/cjs/runtime/types.js.flow +1 -1
  113. package/dist/cjs/runtime.js.flow +1 -1
  114. package/dist/cjs/styled/index.d.ts +35 -7
  115. package/dist/cjs/styled/index.js +36 -8
  116. package/dist/cjs/styled/index.js.flow +2 -2
  117. package/dist/cjs/styled/index.js.map +1 -1
  118. package/dist/cjs/types.js.flow +1 -1
  119. package/dist/cjs/utils/error.js.flow +1 -1
  120. package/dist/esm/class-names/index.d.ts +22 -16
  121. package/dist/esm/class-names/index.js +1 -27
  122. package/dist/esm/class-names/index.js.flow +2 -2
  123. package/dist/esm/class-names/index.js.map +1 -1
  124. package/dist/esm/css/index.d.ts +22 -19
  125. package/dist/esm/css/index.js +4 -3
  126. package/dist/esm/css/index.js.flow +1 -1
  127. package/dist/esm/css/index.js.map +1 -1
  128. package/dist/esm/index.d.ts +12 -22
  129. package/dist/esm/index.js +4 -0
  130. package/dist/esm/index.js.flow +5 -30
  131. package/dist/esm/index.js.map +1 -1
  132. package/dist/esm/jsx/jsx-dev-runtime.d.ts +2 -0
  133. package/dist/esm/jsx/jsx-dev-runtime.js +4 -0
  134. package/dist/esm/jsx/jsx-dev-runtime.js.map +1 -0
  135. package/dist/esm/jsx/jsx-local-namespace.d.ts +66 -0
  136. package/dist/esm/jsx/jsx-local-namespace.js +2 -0
  137. package/dist/esm/jsx/jsx-local-namespace.js.map +1 -0
  138. package/dist/esm/jsx/jsx-runtime.d.ts +2 -0
  139. package/dist/esm/jsx/jsx-runtime.js +4 -0
  140. package/dist/esm/jsx/jsx-runtime.js.map +1 -0
  141. package/dist/esm/keyframes/__fixtures__/index.js +1 -0
  142. package/dist/esm/keyframes/__fixtures__/index.js.map +1 -1
  143. package/dist/esm/keyframes/index.d.ts +20 -24
  144. package/dist/esm/keyframes/index.js.flow +1 -1
  145. package/dist/esm/keyframes/index.js.map +1 -1
  146. package/dist/esm/runtime/ax.js.flow +1 -1
  147. package/dist/esm/runtime/cache.d.ts +12 -0
  148. package/dist/esm/runtime/cache.js +15 -0
  149. package/dist/esm/runtime/cache.js.flow +18 -0
  150. package/dist/esm/runtime/cache.js.map +1 -0
  151. package/dist/esm/runtime/css-custom-property.d.ts +1 -1
  152. package/dist/esm/runtime/css-custom-property.js.flow +2 -2
  153. package/dist/esm/runtime/css-custom-property.js.map +1 -1
  154. package/dist/esm/runtime/dev-warnings.js +10 -6
  155. package/dist/esm/runtime/dev-warnings.js.flow +1 -1
  156. package/dist/esm/runtime/dev-warnings.js.map +1 -1
  157. package/dist/esm/runtime/index.js.flow +1 -1
  158. package/dist/esm/runtime/is-node.js +1 -3
  159. package/dist/esm/runtime/is-node.js.flow +1 -1
  160. package/dist/esm/runtime/is-node.js.map +1 -1
  161. package/dist/esm/runtime/sheet.d.ts +1 -1
  162. package/dist/esm/runtime/sheet.js +5 -1
  163. package/dist/esm/runtime/sheet.js.flow +2 -2
  164. package/dist/esm/runtime/sheet.js.map +1 -1
  165. package/dist/esm/runtime/style-cache.js +4 -0
  166. package/dist/esm/runtime/style-cache.js.flow +1 -1
  167. package/dist/esm/runtime/style-cache.js.map +1 -1
  168. package/dist/esm/runtime/style.js +2 -2
  169. package/dist/esm/runtime/style.js.flow +1 -1
  170. package/dist/esm/runtime/style.js.map +1 -1
  171. package/dist/esm/runtime/types.js.flow +1 -1
  172. package/dist/esm/runtime.js.flow +1 -1
  173. package/dist/esm/styled/index.d.ts +35 -7
  174. package/dist/esm/styled/index.js +35 -7
  175. package/dist/esm/styled/index.js.flow +2 -2
  176. package/dist/esm/styled/index.js.map +1 -1
  177. package/dist/esm/types.js.flow +1 -1
  178. package/dist/esm/utils/error.js.flow +1 -1
  179. package/jsx-dev-runtime/package.json +6 -0
  180. package/jsx-runtime/package.json +6 -0
  181. package/package.json +43 -14
  182. package/src/__tests__/browser.test.tsx +3 -8
  183. package/src/__tests__/display-names.test.tsx +1 -0
  184. package/src/__tests__/jest-matcher.test.tsx +199 -0
  185. package/src/__tests__/server-side-hydrate.test.tsx +1 -0
  186. package/src/__tests__/ssr.test.tsx +5 -3
  187. package/src/class-names/__tests__/index.test.tsx +2 -1
  188. package/src/class-names/index.js.flow +2 -2
  189. package/src/class-names/index.tsx +25 -14
  190. package/src/css/__tests__/index.test.tsx +10 -3
  191. package/src/css/index.js.flow +1 -1
  192. package/src/css/index.tsx +34 -24
  193. package/src/index.js.flow +5 -30
  194. package/src/index.tsx +18 -26
  195. package/src/jsx/__tests__/index.test.tsx +1 -2
  196. package/src/jsx/__tests__/jsx-import-source-pragma.test.tsx +37 -0
  197. package/src/jsx/__tests__/jsx-pragma.test.tsx +40 -0
  198. package/src/jsx/jsx-dev-runtime.tsx +5 -0
  199. package/src/jsx/jsx-local-namespace.tsx +75 -0
  200. package/src/jsx/jsx-runtime.tsx +5 -0
  201. package/src/keyframes/__fixtures__/index.tsx +1 -0
  202. package/src/keyframes/__tests__/index.test.tsx +20 -6
  203. package/src/keyframes/index.js.flow +1 -1
  204. package/src/keyframes/index.tsx +24 -28
  205. package/src/runtime/__perf__/ax.test.ts +42 -0
  206. package/src/runtime/__perf__/cs.test.tsx +111 -0
  207. package/src/runtime/__perf__/sheet.test.ts +61 -0
  208. package/src/runtime/__perf__/utils/cs.tsx +60 -0
  209. package/src/runtime/__perf__/utils/sheet.tsx +151 -0
  210. package/src/runtime/__tests__/style-ssr.test.tsx +5 -0
  211. package/src/runtime/__tests__/style.test.tsx +1 -5
  212. package/src/runtime/ax.js.flow +1 -1
  213. package/src/runtime/cache.js.flow +18 -0
  214. package/src/runtime/cache.tsx +14 -0
  215. package/src/runtime/css-custom-property.js.flow +2 -2
  216. package/src/runtime/css-custom-property.tsx +1 -1
  217. package/src/runtime/dev-warnings.js.flow +1 -1
  218. package/src/runtime/index.js.flow +1 -1
  219. package/src/runtime/is-node.js.flow +1 -1
  220. package/src/runtime/is-node.tsx +1 -2
  221. package/src/runtime/sheet.js.flow +2 -2
  222. package/src/runtime/sheet.tsx +8 -2
  223. package/src/runtime/style-cache.js.flow +1 -1
  224. package/src/runtime/style-cache.tsx +6 -0
  225. package/src/runtime/style.js.flow +1 -1
  226. package/src/runtime/style.tsx +4 -3
  227. package/src/runtime/types.js.flow +1 -1
  228. package/src/runtime.js.flow +1 -1
  229. package/src/styled/__tests__/index.test.tsx +4 -3
  230. package/src/styled/index.js.flow +2 -2
  231. package/src/styled/index.tsx +37 -8
  232. package/src/types.js.flow +1 -1
  233. package/src/utils/error.js.flow +1 -1
  234. package/CHANGELOG.md +0 -74
@@ -23,17 +23,17 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
23
23
  };
24
24
  Object.defineProperty(exports, "__esModule", { value: true });
25
25
  var react_1 = __importDefault(require("react"));
26
- var sheet_1 = __importStar(require("./sheet"));
27
26
  var dev_warnings_1 = require("./dev-warnings");
28
- var style_cache_1 = require("./style-cache");
29
27
  var is_node_1 = require("./is-node");
28
+ var sheet_1 = __importStar(require("./sheet"));
29
+ var style_cache_1 = require("./style-cache");
30
30
  function Style(props) {
31
- var inserted = style_cache_1.useCache();
31
+ var inserted = (0, style_cache_1.useCache)();
32
32
  if (process.env.NODE_ENV === 'development') {
33
33
  props.children.forEach(dev_warnings_1.analyzeCssInDev);
34
34
  }
35
35
  if (props.children.length) {
36
- if (is_node_1.isNodeEnvironment()) {
36
+ if ((0, is_node_1.isNodeEnvironment)()) {
37
37
  var bucketedSheets_1 = {};
38
38
  var hasSheets = false;
39
39
  for (var i = 0; i < props.children.length; i++) {
@@ -45,7 +45,7 @@ function Style(props) {
45
45
  inserted[sheet] = true;
46
46
  hasSheets = true;
47
47
  }
48
- var bucketName = sheet_1.getStyleBucketName(sheet);
48
+ var bucketName = (0, sheet_1.getStyleBucketName)(sheet);
49
49
  bucketedSheets_1[bucketName] = (bucketedSheets_1[bucketName] || '') + sheet;
50
50
  }
51
51
  if (!hasSheets) {
@@ -62,7 +62,7 @@ function Style(props) {
62
62
  continue;
63
63
  }
64
64
  inserted[sheet] = true;
65
- sheet_1.default(sheet, props);
65
+ (0, sheet_1.default)(sheet, props);
66
66
  }
67
67
  }
68
68
  }
@@ -1,7 +1,7 @@
1
1
  /**
2
2
  * Flowtype definitions for style
3
3
  * Generated by Flowgen from a Typescript Definition
4
- * Flowgen v1.14.1
4
+ * Flowgen v1.15.0
5
5
  * @flow
6
6
  */
7
7
  import type { StyleSheetOpts } from './types';
@@ -1 +1 @@
1
- {"version":3,"file":"style.js","sourceRoot":"","sources":["../../../src/runtime/style.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;AAAA,gDAA0B;AAC1B,+CAA8E;AAC9E,+CAAiD;AAEjD,6CAAyC;AACzC,qCAA8C;AAU9C,SAAwB,KAAK,CAAC,KAAiB;IAC7C,IAAM,QAAQ,GAAG,sBAAQ,EAAE,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,2BAAiB,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,0BAAkB,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,6DAEE,KAAK,EAAE,KAAK,CAAC,KAAK,EAClB,uBAAuB,EAAE;oBACvB,MAAM,EAAE,2BAAmB,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,eAAU,CAAC,KAAK,EAAE,KAAK,CAAC,CAAC;aAC1B;SACF;KACF;IAED,OAAO,IAAI,CAAC;AACd,CAAC;AApDD,wBAoDC"}
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,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,IAAA,0BAAkB,EAAC,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,6DAEE,KAAK,EAAE,KAAK,CAAC,KAAK,EAClB,uBAAuB,EAAE;oBACvB,MAAM,EAAE,2BAAmB,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,IAAA,eAAU,EAAC,KAAK,EAAE,KAAK,CAAC,CAAC;aAC1B;SACF;KACF;IAED,OAAO,IAAI,CAAC;AACd,CAAC;AApDD,wBAoDC"}
@@ -1,7 +1,7 @@
1
1
  /**
2
2
  * Flowtype definitions for types
3
3
  * Generated by Flowgen from a Typescript Definition
4
- * Flowgen v1.14.1
4
+ * Flowgen v1.15.0
5
5
  * @flow
6
6
  */
7
7
  export interface StyleSheetOpts {
@@ -1,7 +1,7 @@
1
1
  /**
2
2
  * Flowtype definitions for runtime
3
3
  * Generated by Flowgen from a Typescript Definition
4
- * Flowgen v1.14.1
4
+ * Flowgen v1.15.0
5
5
  * @flow
6
6
  */
7
7
  declare export { CC, CS, ax, ix } from './runtime/index';
@@ -32,16 +32,44 @@ export interface StyledComponentInstantiator extends StyledComponentMap {
32
32
  <TInheritedProps extends unknown>(Component: ComponentType<TInheritedProps>): StyledFunctionFromComponent<TInheritedProps>;
33
33
  }
34
34
  /**
35
- * Create a component that ties styles to an element which comes with built-in behavior such as `ref` and `as` prop support.
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`font-size: 12px`; // Template literal CSS
39
- * styled.div({ fontSize: 12 }); // Object CSS
40
- * styled.div([{ fontSize: 12 }, `font-size: 12px;`]) // Array CSS
41
- * styled.div({ fontSize: 12 }, `font-size: 12px`) Multi arguments CSS
53
+ * styled.div`
54
+ * font-size: 12px
55
+ * `;
42
56
  * ```
43
57
  *
44
- * For more help, read the docs:
45
- * https://compiledcssinjs.com/docs/api-styled
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;
@@ -3,24 +3,52 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.styled = void 0;
4
4
  var error_1 = require("../utils/error");
5
5
  /**
6
- * Create a component that ties styles to an element which comes with built-in behavior such as `ref` and `as` prop support.
6
+ * ## Styled component
7
7
  *
8
+ * Create a component that styles a JSX element which comes with built-in behavior such as `ref` and `as` prop support.
9
+ * For further details [read the documentation](https://compiledcssinjs.com/docs/api-styled).
10
+ *
11
+ * ### Style with objects
12
+ *
13
+ * @example
14
+ * ```
15
+ * styled.div({
16
+ * fontSize: 12,
17
+ * });
18
+ * ```
19
+ *
20
+ * ### Style with template literals
21
+ *
22
+ * @example
8
23
  * ```
9
- * styled.div`font-size: 12px`; // Template literal CSS
10
- * styled.div({ fontSize: 12 }); // Object CSS
11
- * styled.div([{ fontSize: 12 }, `font-size: 12px;`]) // Array CSS
12
- * styled.div({ fontSize: 12 }, `font-size: 12px`) Multi arguments CSS
24
+ * styled.div`
25
+ * font-size: 12px
26
+ * `;
13
27
  * ```
14
28
  *
15
- * For more help, read the docs:
16
- * https://compiledcssinjs.com/docs/api-styled
29
+ * ### Compose styles with arrays
30
+ *
31
+ * @example
32
+ * ```
33
+ * import { css } from '@compiled/react';
34
+ *
35
+ * styled.div([
36
+ * { fontSize: 12 },
37
+ * css`font-size: 12px;`
38
+ * ]);
39
+ *
40
+ * styled.div(
41
+ * { fontSize: 12 },
42
+ * css`font-size: 12px`
43
+ * );
44
+ * ```
17
45
  */
18
46
  exports.styled = new Proxy({}, {
19
47
  get: function () {
20
48
  return function () {
21
49
  // Blow up if the transformer isn't turned on.
22
50
  // This code won't ever be executed when setup correctly.
23
- throw error_1.createSetupError();
51
+ throw (0, error_1.createSetupError)();
24
52
  };
25
53
  },
26
54
  });
@@ -1,7 +1,7 @@
1
1
  /**
2
2
  * Flowtype definitions for index
3
3
  * Generated by Flowgen from a Typescript Definition
4
- * Flowgen v1.14.1
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":";;;AACA,wCAAkD;AAyDlD;;;;;;;;;;;;GAYG;AACU,QAAA,MAAM,GAAgC,IAAI,KAAK,CAC1D,EAAE,EACF;IACE,GAAG;QACD,OAAO;YACL,8CAA8C;YAC9C,yDAAyD;YACzD,MAAM,wBAAgB,EAAE,CAAC;QAC3B,CAAC,CAAC;IACJ,CAAC;CACF,CACK,CAAC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/styled/index.tsx"],"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"}
@@ -1,7 +1,7 @@
1
1
  /**
2
2
  * Flowtype definitions for types
3
3
  * Generated by Flowgen from a Typescript Definition
4
- * Flowgen v1.14.1
4
+ * Flowgen v1.15.0
5
5
  * @flow
6
6
  */
7
7
  import * as CSS from 'csstype';
@@ -1,7 +1,7 @@
1
1
  /**
2
2
  * Flowtype definitions for error
3
3
  * Generated by Flowgen from a Typescript Definition
4
- * Flowgen v1.14.1
4
+ * Flowgen v1.15.0
5
5
  * @flow
6
6
  */
7
7
  declare export var createSetupError: () => Error;
@@ -1,38 +1,44 @@
1
- import type { ReactNode } from 'react';
2
- import type { CssFunction, BasicTemplateInterpolations } from '../types';
1
+ import type { ReactNode, CSSProperties } from 'react';
2
+ import type { BasicTemplateInterpolations, CssFunction } from '../types';
3
3
  export declare type Interpolations = (BasicTemplateInterpolations | CssFunction | CssFunction[])[];
4
4
  export interface ClassNamesProps {
5
5
  children: (opts: {
6
6
  css: (css: CssFunction | CssFunction[], ...interpolations: Interpolations) => string;
7
- style: {
8
- [key: string]: string;
9
- };
7
+ style: CSSProperties;
10
8
  }) => ReactNode;
11
9
  }
12
10
  /**
13
- * Use a component where styles are not necessarily tied to an element.
11
+ * ## Class names
14
12
  *
13
+ * Use a component where styles are not necessarily used on a JSX element.
14
+ * For further details [read the documentation](https://compiledcssinjs.com/docs/api-class-names).
15
+ *
16
+ * ### Style with objects
17
+ *
18
+ * @example
15
19
  * ```
16
- * // Object CSS
17
20
  * <ClassNames>
18
21
  * {({ css, style }) => children({ className: css({ fontSize: 12 }) })}
19
22
  * </ClassNames>
23
+ * ```
20
24
  *
21
- * // Template literal CSS
25
+ * ### Style with template literals
26
+ *
27
+ * @example
28
+ * ```
22
29
  * <ClassNames>
23
30
  * {({ css, style }) => children({ className: css`font-size: 12px;` })}
24
31
  * </ClassNames>
32
+ * ```
33
+ *
34
+ * ### Compose styles with arrays
25
35
  *
26
- * // Array CSS
36
+ * @example
37
+ * ```
27
38
  * <ClassNames>
28
39
  * {({ css, style }) =>
29
- * children({ className: css([{ fontSize: 12 }, `font-size: 12px`]) })}
40
+ * children({ className: css([{ fontSize: 12 }, css`font-size: 12px`]) })}
30
41
  * </ClassNames>
31
42
  * ```
32
- *
33
- * For more help, read the docs:
34
- * https://compiledcssinjs.com/docs/api-class-names
35
- *
36
- * @param props
37
43
  */
38
- export declare function ClassNames(_: ClassNamesProps): JSX.Element;
44
+ export declare function ClassNames({ children }: ClassNamesProps): JSX.Element;
@@ -1,31 +1,5 @@
1
1
  import { createSetupError } from '../utils/error';
2
- /**
3
- * Use a component where styles are not necessarily tied to an element.
4
- *
5
- * ```
6
- * // Object CSS
7
- * <ClassNames>
8
- * {({ css, style }) => children({ className: css({ fontSize: 12 }) })}
9
- * </ClassNames>
10
- *
11
- * // Template literal CSS
12
- * <ClassNames>
13
- * {({ css, style }) => children({ className: css`font-size: 12px;` })}
14
- * </ClassNames>
15
- *
16
- * // Array CSS
17
- * <ClassNames>
18
- * {({ css, style }) =>
19
- * children({ className: css([{ fontSize: 12 }, `font-size: 12px`]) })}
20
- * </ClassNames>
21
- * ```
22
- *
23
- * For more help, read the docs:
24
- * https://compiledcssinjs.com/docs/api-class-names
25
- *
26
- * @param props
27
- */
28
- export function ClassNames(_) {
2
+ export function ClassNames(_props) {
29
3
  throw createSetupError();
30
4
  }
31
5
  //# sourceMappingURL=index.js.map
@@ -1,11 +1,11 @@
1
1
  /**
2
2
  * Flowtype definitions for index
3
3
  * Generated by Flowgen from a Typescript Definition
4
- * Flowgen v1.14.1
4
+ * Flowgen v1.15.0
5
5
  * @flow
6
6
  */
7
7
  import type { Node } from 'react';
8
- import type { CssFunction, BasicTemplateInterpolations } from '../types';
8
+ import type { BasicTemplateInterpolations, CssFunction } from '../types';
9
9
  export type Interpolations = (BasicTemplateInterpolations | CssFunction<> | CssFunction<>[])[];
10
10
  export interface ClassNamesProps {
11
11
  children: (opts: {
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/class-names/index.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,gBAAgB,EAAE,MAAM,gBAAgB,CAAC;AAYlD;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AACH,MAAM,UAAU,UAAU,CAAC,CAAkB;IAC3C,MAAM,gBAAgB,EAAE,CAAC;AAC3B,CAAC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/class-names/index.tsx"],"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,28 +1,31 @@
1
- import type { BasicTemplateInterpolations, CSSProps, FunctionInterpolation } from '../types';
1
+ import type { AnyKeyCssProps, BasicTemplateInterpolations, CSSProps, FunctionInterpolation } from '../types';
2
2
  /**
3
- * Create styles that can be re-used between components with a template literal.
3
+ * ## CSS
4
4
  *
5
- * ```
6
- * css`color: red;`;
7
- * ```
8
- *
9
- * For more help, read the docs:
10
- * https://compiledcssinjs.com/docs/api-css
5
+ * Define styles that are statically typed and useable with other Compiled APIs.
6
+ * For further details [read the documentation](https://compiledcssinjs.com/docs/api-css).
11
7
  *
12
- * @param css
13
- * @param values
14
- */
15
- export default function css<T = void>(_css: TemplateStringsArray, ..._values: (BasicTemplateInterpolations | FunctionInterpolation<T>)[]): CSSProps;
16
- /**
17
- * Create styles that can be re-used between components with an object
8
+ * ### Style with objects
18
9
  *
10
+ * @example
19
11
  * ```
20
- * css({ color: 'red' });
12
+ * const redText = css({
13
+ * color: 'red',
14
+ * });
15
+ *
16
+ * <div css={redText} />
21
17
  * ```
22
18
  *
23
- * For more help, read the docs:
24
- * https://compiledcssinjs.com/docs/api-css
19
+ * ### Style with template literals
20
+ *
21
+ * @example
22
+ * ```
23
+ * const redText = css`
24
+ * color: red;
25
+ * `;
25
26
  *
26
- * @param css
27
+ * <div css={redText} />
28
+ * ```
27
29
  */
28
- export default function css(_css: CSSProps): CSSProps;
30
+ export default function css<T = void>(styles: TemplateStringsArray, ...interpolations: (BasicTemplateInterpolations | FunctionInterpolation<T>)[]): CSSProps;
31
+ export default function css(styles: AnyKeyCssProps<void> | CSSProps): CSSProps;
@@ -1,8 +1,9 @@
1
+ /* eslint-disable import/export */
1
2
  import { createSetupError } from '../utils/error';
2
- export default function css(_css) {
3
- var _values = [];
3
+ export default function css(_styles) {
4
+ var _interpolations = [];
4
5
  for (var _i = 1; _i < arguments.length; _i++) {
5
- _values[_i - 1] = arguments[_i];
6
+ _interpolations[_i - 1] = arguments[_i];
6
7
  }
7
8
  throw createSetupError();
8
9
  }
@@ -1,7 +1,7 @@
1
1
  /**
2
2
  * Flowtype definitions for index
3
3
  * Generated by Flowgen from a Typescript Definition
4
- * Flowgen v1.14.1
4
+ * Flowgen v1.15.0
5
5
  * @flow
6
6
  */
7
7
  import type { BasicTemplateInterpolations, CSSProps, FunctionInterpolation } from '../types';
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/css/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,gBAAgB,CAAC;AAmClD,MAAM,CAAC,OAAO,UAAU,GAAG,CACzB,IAAqC;IACrC,iBAAsE;SAAtE,UAAsE,EAAtE,qBAAsE,EAAtE,IAAsE;QAAtE,gCAAsE;;IAEtE,MAAM,gBAAgB,EAAE,CAAC;AAC3B,CAAC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/css/index.tsx"],"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"}
@@ -1,32 +1,22 @@
1
+ import { createElement } from 'react';
2
+ import type { CompiledJSX } from './jsx/jsx-local-namespace';
1
3
  import type { CssFunction, CSSProps } from './types';
2
4
  export { keyframes } from './keyframes';
3
5
  export { styled } from './styled';
4
6
  export { ClassNames } from './class-names';
5
7
  export { default as css } from './css';
8
+ export declare const jsx: typeof createElement;
6
9
  export type { CssFunction, CSSProps };
7
10
  export type { CssObject } from './styled';
8
- declare module 'react' {
9
- interface DOMAttributes<T> {
10
- css?: CssFunction | CssFunction[];
11
- }
12
- }
13
- declare global {
11
+ export declare namespace jsx {
14
12
  namespace JSX {
15
- interface IntrinsicAttributes {
16
- /**
17
- * Tie styles to an element.
18
- * It is available when the `@compiled/react` module is in scope.
19
- *
20
- * ```
21
- * css={{ fontSize: 12 }} // Object CSS
22
- * css={`font-size: 12px;`} // Template literal CSS
23
- * css={[{ fontSize: 12 }, `font-size: 12px;`]} // Array CSS
24
- * ```
25
- *
26
- * For more help, read the docs:
27
- * https://compiledcssinjs.com/docs/api-css-prop
28
- */
29
- css?: CssFunction | CssFunction[];
30
- }
13
+ type Element = CompiledJSX.Element;
14
+ type ElementClass = CompiledJSX.ElementClass;
15
+ type ElementAttributesProperty = CompiledJSX.ElementAttributesProperty;
16
+ type ElementChildrenAttribute = CompiledJSX.ElementChildrenAttribute;
17
+ type LibraryManagedAttributes<C, P> = CompiledJSX.LibraryManagedAttributes<C, P>;
18
+ type IntrinsicAttributes = CompiledJSX.IntrinsicAttributes;
19
+ type IntrinsicClassAttributes<T> = CompiledJSX.IntrinsicClassAttributes<T>;
20
+ type IntrinsicElements = CompiledJSX.IntrinsicElements;
31
21
  }
32
22
  }
package/dist/esm/index.js CHANGED
@@ -1,5 +1,9 @@
1
+ import { createElement } from 'react';
1
2
  export { keyframes } from './keyframes';
2
3
  export { styled } from './styled';
3
4
  export { ClassNames } from './class-names';
4
5
  export { default as css } from './css';
6
+ // Pass through the (classic) jsx runtime.
7
+ // Compiled currently doesn't define its own and uses this purely to enable a local jsx namespace.
8
+ export var jsx = createElement;
5
9
  //# sourceMappingURL=index.js.map
@@ -1,40 +1,15 @@
1
1
  /**
2
- * Flowtype definitions for index
2
+ * THIS IS A MANUALLY CURATED FLOW FILE.
3
+ *
4
+ * Flowtype definitions for runtime
3
5
  * Generated by Flowgen from a Typescript Definition
4
- * Flowgen v1.14.1
6
+ * Flowgen v1.15.0
5
7
  * @flow
6
8
  */
7
- import type { CssFunction, CSSProps } from './types';
9
+ import type { CSSProps, CssFunction } from './types';
8
10
  declare export { keyframes } from './keyframes';
9
11
  declare export { styled } from './styled';
10
12
  declare export { ClassNames } from './class-names';
11
13
  declare export { default as css } from './css';
12
14
  export type { CssFunction, CSSProps };
13
15
  export type { CssObject } from './styled';
14
- declare module 'react' {
15
- declare interface DOMAttributes<T> {
16
- css?: CssFunction<> | CssFunction<>[];
17
- }
18
- }
19
- declare module 'global' {
20
- declare var JSX: typeof npm$namespace$JSX;
21
- declare var npm$namespace$JSX: {|
22
- IntrinsicAttributes: Class<JSX$IntrinsicAttributes>,
23
- |};
24
- declare interface JSX$IntrinsicAttributes {
25
- /**
26
- * Tie styles to an element.
27
- * It is available when the `@compiled/react` module is in scope.
28
- *
29
- * ```
30
- * css={{ fontSize: 12 }} // Object CSS
31
- * css={`font-size: 12px;`} // Template literal CSS
32
- * css={[{ fontSize: 12 }, `font-size: 12px;`]} // Array CSS
33
- * ```
34
- *
35
- * For more help, read the docs:
36
- * https://compiledcssinjs.com/docs/api-css-prop
37
- */
38
- css?: CssFunction<> | CssFunction<>[];
39
- }
40
- }
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.tsx"],"names":[],"mappings":"AAEA,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"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.tsx"],"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"}
@@ -0,0 +1,2 @@
1
+ export type { CompiledJSX as JSX } from './jsx-local-namespace';
2
+ export * from 'react/jsx-dev-runtime';
@@ -0,0 +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';
4
+ //# sourceMappingURL=jsx-dev-runtime.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"jsx-dev-runtime.js","sourceRoot":"","sources":["../../../src/jsx/jsx-dev-runtime.tsx"],"names":[],"mappings":"AAEA,gDAAgD;AAChD,kGAAkG;AAClG,cAAc,uBAAuB,CAAC"}
@@ -0,0 +1,66 @@
1
+ /// <reference types="react" />
2
+ import type { CssFunction } from '../types';
3
+ declare type WithConditionalCSSProp<TProps> = 'className' extends keyof TProps ? string extends TProps['className' & keyof TProps] ? {
4
+ /**
5
+ * ## CSS prop
6
+ *
7
+ * Style a JSX element.
8
+ * For further details [read the API documentation](https://compiledcssinjs.com/docs/api-css-prop).
9
+ *
10
+ * ### Style with objects
11
+ *
12
+ * @example
13
+ * ```
14
+ * import { css } from '@compiled/react';
15
+ *
16
+ * <div css={css({ fontSize: 12 })} />
17
+ * ```
18
+ *
19
+ * ### Style with template literals
20
+ *
21
+ * @example
22
+ * ```
23
+ * import { css } from '@compiled/react';
24
+ *
25
+ * <div css={css`color: red;`} />
26
+ * ```
27
+ *
28
+ * ### Compose styles with arrays
29
+ *
30
+ * @example
31
+ * ```
32
+ * import { css } from '@compiled/react';
33
+ *
34
+ * <div
35
+ * css={[
36
+ * css({ fontSize: 12 }),
37
+ * css`color: red;`,
38
+ * ]}
39
+ * />
40
+ * ```
41
+ */
42
+ css?: CssFunction | CssFunction[];
43
+ } : {} : {};
44
+ declare type ReactJSXElement = JSX.Element;
45
+ declare type ReactJSXElementClass = JSX.ElementClass;
46
+ declare type ReactJSXElementAttributesProperty = JSX.ElementAttributesProperty;
47
+ declare type ReactJSXElementChildrenAttribute = JSX.ElementChildrenAttribute;
48
+ declare type ReactJSXLibraryManagedAttributes<C, P> = JSX.LibraryManagedAttributes<C, P>;
49
+ declare type ReactJSXIntrinsicAttributes = JSX.IntrinsicAttributes;
50
+ declare type ReactJSXIntrinsicClassAttributes<T> = JSX.IntrinsicClassAttributes<T>;
51
+ declare type ReactJSXIntrinsicElements = JSX.IntrinsicElements;
52
+ export declare namespace CompiledJSX {
53
+ type Element = ReactJSXElement;
54
+ type ElementClass = ReactJSXElementClass;
55
+ type ElementAttributesProperty = ReactJSXElementAttributesProperty;
56
+ type ElementChildrenAttribute = ReactJSXElementChildrenAttribute;
57
+ type LibraryManagedAttributes<C, P> = WithConditionalCSSProp<P> & ReactJSXLibraryManagedAttributes<C, P>;
58
+ type IntrinsicAttributes = ReactJSXIntrinsicAttributes;
59
+ type IntrinsicClassAttributes<T> = ReactJSXIntrinsicClassAttributes<T>;
60
+ type IntrinsicElements = {
61
+ [K in keyof ReactJSXIntrinsicElements]: ReactJSXIntrinsicElements[K] & {
62
+ css?: CssFunction | CssFunction[];
63
+ };
64
+ };
65
+ }
66
+ export {};
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=jsx-local-namespace.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"jsx-local-namespace.js","sourceRoot":"","sources":["../../../src/jsx/jsx-local-namespace.tsx"],"names":[],"mappings":""}
@@ -0,0 +1,2 @@
1
+ export type { CompiledJSX as JSX } from './jsx-local-namespace';
2
+ export * from 'react/jsx-runtime';
@@ -0,0 +1,4 @@
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';
4
+ //# sourceMappingURL=jsx-runtime.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"jsx-runtime.js","sourceRoot":"","sources":["../../../src/jsx/jsx-runtime.tsx"],"names":[],"mappings":"AAEA,4CAA4C;AAC5C,kGAAkG;AAClG,cAAc,mBAAmB,CAAC"}
@@ -1,3 +1,4 @@
1
+ // eslint-disable-next-line import/no-extraneous-dependencies
1
2
  import { keyframes } from '@compiled/react';
2
3
  export var fadeOut = keyframes({
3
4
  from: {