@compiled/react 0.13.1 → 0.14.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (106) hide show
  1. package/dist/browser/class-names/index.js.flow +1 -1
  2. package/dist/browser/css/index.js.flow +1 -1
  3. package/dist/browser/css-map/index.d.ts +21 -0
  4. package/dist/browser/css-map/index.js +5 -0
  5. package/dist/browser/css-map/index.js.flow +26 -0
  6. package/dist/browser/css-map/index.js.map +1 -0
  7. package/dist/browser/index.d.ts +1 -0
  8. package/dist/browser/index.js +1 -0
  9. package/dist/browser/index.js.flow +2 -1
  10. package/dist/browser/index.js.map +1 -1
  11. package/dist/browser/keyframes/index.js.flow +1 -1
  12. package/dist/browser/runtime/ac.js.flow +1 -1
  13. package/dist/browser/runtime/ax.js.flow +1 -1
  14. package/dist/browser/runtime/cache.js.flow +1 -1
  15. package/dist/browser/runtime/css-custom-property.js.flow +1 -1
  16. package/dist/browser/runtime/dev-warnings.js.flow +1 -1
  17. package/dist/browser/runtime/index.js.flow +1 -1
  18. package/dist/browser/runtime/is-server-environment.js.flow +1 -1
  19. package/dist/browser/runtime/sheet.js.flow +1 -1
  20. package/dist/browser/runtime/style-cache.js.flow +1 -1
  21. package/dist/browser/runtime/style.js.flow +1 -1
  22. package/dist/browser/runtime/types.js.flow +1 -1
  23. package/dist/browser/runtime.js.flow +1 -1
  24. package/dist/browser/styled/index.js.flow +1 -1
  25. package/dist/browser/types.d.ts +3 -3
  26. package/dist/browser/types.js.flow +4 -4
  27. package/dist/browser/utils/error.js.flow +1 -1
  28. package/dist/cjs/class-names/index.js.flow +1 -1
  29. package/dist/cjs/css/index.js.flow +1 -1
  30. package/dist/cjs/css-map/index.d.ts +21 -0
  31. package/dist/cjs/css-map/index.js +8 -0
  32. package/dist/cjs/css-map/index.js.flow +26 -0
  33. package/dist/cjs/css-map/index.js.map +1 -0
  34. package/dist/cjs/index.d.ts +1 -0
  35. package/dist/cjs/index.js +3 -1
  36. package/dist/cjs/index.js.flow +2 -1
  37. package/dist/cjs/index.js.map +1 -1
  38. package/dist/cjs/keyframes/index.js.flow +1 -1
  39. package/dist/cjs/runtime/ac.js.flow +1 -1
  40. package/dist/cjs/runtime/ax.js.flow +1 -1
  41. package/dist/cjs/runtime/cache.js.flow +1 -1
  42. package/dist/cjs/runtime/css-custom-property.js.flow +1 -1
  43. package/dist/cjs/runtime/dev-warnings.js.flow +1 -1
  44. package/dist/cjs/runtime/index.js.flow +1 -1
  45. package/dist/cjs/runtime/is-server-environment.js.flow +1 -1
  46. package/dist/cjs/runtime/sheet.js.flow +1 -1
  47. package/dist/cjs/runtime/style-cache.js.flow +1 -1
  48. package/dist/cjs/runtime/style.js.flow +1 -1
  49. package/dist/cjs/runtime/types.js.flow +1 -1
  50. package/dist/cjs/runtime.js.flow +1 -1
  51. package/dist/cjs/styled/index.js.flow +1 -1
  52. package/dist/cjs/types.d.ts +3 -3
  53. package/dist/cjs/types.js.flow +4 -4
  54. package/dist/cjs/utils/error.js.flow +1 -1
  55. package/dist/esm/class-names/index.js.flow +1 -1
  56. package/dist/esm/css/index.js.flow +1 -1
  57. package/dist/esm/css-map/index.d.ts +21 -0
  58. package/dist/esm/css-map/index.js +5 -0
  59. package/dist/esm/css-map/index.js.flow +26 -0
  60. package/dist/esm/css-map/index.js.map +1 -0
  61. package/dist/esm/index.d.ts +1 -0
  62. package/dist/esm/index.js +1 -0
  63. package/dist/esm/index.js.flow +2 -1
  64. package/dist/esm/index.js.map +1 -1
  65. package/dist/esm/keyframes/index.js.flow +1 -1
  66. package/dist/esm/runtime/ac.js.flow +1 -1
  67. package/dist/esm/runtime/ax.js.flow +1 -1
  68. package/dist/esm/runtime/cache.js.flow +1 -1
  69. package/dist/esm/runtime/css-custom-property.js.flow +1 -1
  70. package/dist/esm/runtime/dev-warnings.js.flow +1 -1
  71. package/dist/esm/runtime/index.js.flow +1 -1
  72. package/dist/esm/runtime/is-server-environment.js.flow +1 -1
  73. package/dist/esm/runtime/sheet.js.flow +1 -1
  74. package/dist/esm/runtime/style-cache.js.flow +1 -1
  75. package/dist/esm/runtime/style.js.flow +1 -1
  76. package/dist/esm/runtime/types.js.flow +1 -1
  77. package/dist/esm/runtime.js.flow +1 -1
  78. package/dist/esm/styled/index.js.flow +1 -1
  79. package/dist/esm/types.d.ts +3 -3
  80. package/dist/esm/types.js.flow +4 -4
  81. package/dist/esm/utils/error.js.flow +1 -1
  82. package/package.json +3 -3
  83. package/src/class-names/index.js.flow +1 -1
  84. package/src/css/index.js.flow +1 -1
  85. package/src/css-map/__tests__/index.test.tsx +52 -0
  86. package/src/css-map/index.js.flow +26 -0
  87. package/src/css-map/index.ts +27 -0
  88. package/src/index.js.flow +2 -1
  89. package/src/index.ts +1 -0
  90. package/src/keyframes/index.js.flow +1 -1
  91. package/src/runtime/ac.js.flow +1 -1
  92. package/src/runtime/ax.js.flow +1 -1
  93. package/src/runtime/cache.js.flow +1 -1
  94. package/src/runtime/css-custom-property.js.flow +1 -1
  95. package/src/runtime/dev-warnings.js.flow +1 -1
  96. package/src/runtime/index.js.flow +1 -1
  97. package/src/runtime/is-server-environment.js.flow +1 -1
  98. package/src/runtime/sheet.js.flow +1 -1
  99. package/src/runtime/style-cache.js.flow +1 -1
  100. package/src/runtime/style.js.flow +1 -1
  101. package/src/runtime/types.js.flow +1 -1
  102. package/src/runtime.js.flow +1 -1
  103. package/src/styled/index.js.flow +1 -1
  104. package/src/types.js.flow +4 -4
  105. package/src/types.ts +3 -3
  106. package/src/utils/error.js.flow +1 -1
@@ -1,7 +1,7 @@
1
1
  /**
2
2
  * Flowtype definitions for index
3
3
  * Generated by Flowgen from a Typescript Definition
4
- * Flowgen v1.20.1
4
+ * Flowgen v1.21.0
5
5
  * @flow
6
6
  */
7
7
  import type { Node } from 'react';
@@ -1,7 +1,7 @@
1
1
  /**
2
2
  * Flowtype definitions for index
3
3
  * Generated by Flowgen from a Typescript Definition
4
- * Flowgen v1.20.1
4
+ * Flowgen v1.21.0
5
5
  * @flow
6
6
  */
7
7
  import type { CSSProps, CssObject, CssFunction } from '../types';
@@ -0,0 +1,21 @@
1
+ import type { CSSProps, CssObject } from '../types';
2
+ /**
3
+ * ## cssMap
4
+ *
5
+ * Creates a collection of named CSS rules that are statically typed and useable with other Compiled APIs.
6
+ * For further details [read the documentation](https://compiledcssinjs.com/docs/api-cssmap).
7
+ *
8
+ * @example
9
+ * ```
10
+ * const borderStyleMap = cssMap({
11
+ * none: { borderStyle: 'none' },
12
+ * solid: { borderStyle: 'solid' },
13
+ * });
14
+ * const Component = ({ borderStyle }) => <div css={css(borderStyleMap[borderStyle])} />
15
+ *
16
+ * <Component borderStyle="solid" />
17
+ * ```
18
+ */
19
+ type returnType<T extends string, P> = Record<T, CSSProps<P>>;
20
+ export default function cssMap<T extends string, TProps = unknown>(_styles: Record<T, CssObject<TProps> | CssObject<TProps>[]>): Readonly<returnType<T, TProps>>;
21
+ export {};
@@ -0,0 +1,5 @@
1
+ import { createSetupError } from '../utils/error';
2
+ export default function cssMap(_styles) {
3
+ throw createSetupError();
4
+ }
5
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1,26 @@
1
+ /**
2
+ * Flowtype definitions for index
3
+ * Generated by Flowgen from a Typescript Definition
4
+ * Flowgen v1.21.0
5
+ * @flow
6
+ */
7
+ import type { CSSProps, CssObject } from '../types';
8
+ /**
9
+ * ## cssMap
10
+ *
11
+ * Creates a collection of named CSS rules that are statically typed and useable with other Compiled APIs.
12
+ * For further details [read the documentation](https://compiledcssinjs.com/docs/api-cssmap).
13
+ * @example ```
14
+ * const borderStyleMap = cssMap({
15
+ * none: { borderStyle: 'none' },
16
+ * solid: { borderStyle: 'solid' },
17
+ * });
18
+ * const Component = ({ borderStyle }) => <div css={css(borderStyleMap[borderStyle])} />
19
+ *
20
+ * <Component borderStyle="solid" />
21
+ * ```
22
+ */
23
+ declare type returnType<T: string, P> = { [key: T]: CSSProps<P> };
24
+ declare export default function cssMap<T: string, TProps>(_styles: {
25
+ [key: T]: CssObject<TProps> | CssObject<TProps>[],
26
+ }): $ReadOnly<returnType<T, TProps>>;
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/css-map/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,gBAAgB,EAAE,MAAM,gBAAgB,CAAC;AAqBlD,MAAM,CAAC,OAAO,UAAU,MAAM,CAC5B,OAA2D;IAE3D,MAAM,gBAAgB,EAAE,CAAC;AAC3B,CAAC"}
@@ -6,6 +6,7 @@ export { keyframes } from './keyframes';
6
6
  export { styled } from './styled';
7
7
  export { ClassNames } from './class-names';
8
8
  export { default as css } from './css';
9
+ export { default as cssMap } from './css-map';
9
10
  export declare const jsx: typeof createElement;
10
11
  export declare namespace jsx {
11
12
  namespace JSX {
@@ -3,6 +3,7 @@ export { keyframes } from './keyframes';
3
3
  export { styled } from './styled';
4
4
  export { ClassNames } from './class-names';
5
5
  export { default as css } from './css';
6
+ export { default as cssMap } from './css-map';
6
7
  // Pass through the (classic) jsx runtime.
7
8
  // Compiled currently doesn't define its own and uses this purely to enable a local jsx namespace.
8
9
  export const jsx = createElement;
@@ -1,7 +1,7 @@
1
1
  /**
2
2
  * Flowtype definitions for index
3
3
  * Generated by Flowgen from a Typescript Definition
4
- * Flowgen v1.20.1
4
+ * Flowgen v1.21.0
5
5
  * @flow
6
6
  */
7
7
  import type { CssFunction, CSSProps, CssType } from './types';
@@ -10,3 +10,4 @@ declare export { keyframes } from './keyframes';
10
10
  declare export { styled } from './styled';
11
11
  declare export { ClassNames } from './class-names';
12
12
  declare export { default as css } from './css';
13
+ declare export { default as cssMap } from './css-map';
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AAOtC,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,MAAM,GAAG,GAAG,aAAa,CAAC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AAOtC,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;AACvC,OAAO,EAAE,OAAO,IAAI,MAAM,EAAE,MAAM,WAAW,CAAC;AAE9C,0CAA0C;AAC1C,kGAAkG;AAClG,MAAM,CAAC,MAAM,GAAG,GAAG,aAAa,CAAC"}
@@ -1,7 +1,7 @@
1
1
  /**
2
2
  * Flowtype definitions for index
3
3
  * Generated by Flowgen from a Typescript Definition
4
- * Flowgen v1.20.1
4
+ * Flowgen v1.21.0
5
5
  * @flow
6
6
  */
7
7
  import type { BasicTemplateInterpolations, CSSProps } from '../types';
@@ -1,7 +1,7 @@
1
1
  /**
2
2
  * Flowtype definitions for ac
3
3
  * Generated by Flowgen from a Typescript Definition
4
- * Flowgen v1.20.1
4
+ * Flowgen v1.21.0
5
5
  * @flow
6
6
  */
7
7
  /**
@@ -1,7 +1,7 @@
1
1
  /**
2
2
  * Flowtype definitions for ax
3
3
  * Generated by Flowgen from a Typescript Definition
4
- * Flowgen v1.20.1
4
+ * Flowgen v1.21.0
5
5
  * @flow
6
6
  */
7
7
  /**
@@ -1,7 +1,7 @@
1
1
  /**
2
2
  * Flowtype definitions for cache
3
3
  * Generated by Flowgen from a Typescript Definition
4
- * Flowgen v1.20.1
4
+ * Flowgen v1.21.0
5
5
  * @flow
6
6
  */
7
7
  /**
@@ -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.20.1
4
+ * Flowgen v1.21.0
5
5
  * @flow
6
6
  */
7
7
  /**
@@ -1,7 +1,7 @@
1
1
  /**
2
2
  * Flowtype definitions for dev-warnings
3
3
  * Generated by Flowgen from a Typescript Definition
4
- * Flowgen v1.20.1
4
+ * Flowgen v1.21.0
5
5
  * @flow
6
6
  */
7
7
  declare export var analyzeCssInDev: (sheet: string) => void;
@@ -1,7 +1,7 @@
1
1
  /**
2
2
  * Flowtype definitions for index
3
3
  * Generated by Flowgen from a Typescript Definition
4
- * Flowgen v1.20.1
4
+ * Flowgen v1.21.0
5
5
  * @flow
6
6
  */
7
7
  declare export { default as CS } from './style';
@@ -1,7 +1,7 @@
1
1
  /**
2
2
  * Flowtype definitions for is-server-environment
3
3
  * Generated by Flowgen from a Typescript Definition
4
- * Flowgen v1.20.1
4
+ * Flowgen v1.21.0
5
5
  * @flow
6
6
  */
7
7
  /**
@@ -1,7 +1,7 @@
1
1
  /**
2
2
  * Flowtype definitions for sheet
3
3
  * Generated by Flowgen from a Typescript Definition
4
- * Flowgen v1.20.1
4
+ * Flowgen v1.21.0
5
5
  * @flow
6
6
  */
7
7
  import type { Bucket, StyleSheetOpts } from './types';
@@ -1,7 +1,7 @@
1
1
  /**
2
2
  * Flowtype definitions for style-cache
3
3
  * Generated by Flowgen from a Typescript Definition
4
- * Flowgen v1.20.1
4
+ * Flowgen v1.21.0
5
5
  * @flow
6
6
  */
7
7
  import type { ProviderComponent, UseCacheHook } from './types';
@@ -1,7 +1,7 @@
1
1
  /**
2
2
  * Flowtype definitions for style
3
3
  * Generated by Flowgen from a Typescript Definition
4
- * Flowgen v1.20.1
4
+ * Flowgen v1.21.0
5
5
  * @flow
6
6
  */
7
7
  import type { StyleSheetOpts } from './types';
@@ -1,7 +1,7 @@
1
1
  /**
2
2
  * Flowtype definitions for types
3
3
  * Generated by Flowgen from a Typescript Definition
4
- * Flowgen v1.20.1
4
+ * Flowgen v1.21.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.20.1
4
+ * Flowgen v1.21.0
5
5
  * @flow
6
6
  */
7
7
  declare export { CC, CS, ax, ac, clearAcCache, ix } from './runtime/index';
@@ -1,7 +1,7 @@
1
1
  /**
2
2
  * Flowtype definitions for index
3
3
  * Generated by Flowgen from a Typescript Definition
4
- * Flowgen v1.20.1
4
+ * Flowgen v1.21.0
5
5
  * @flow
6
6
  */
7
7
  import type { ComponentType } from 'react';
@@ -13,8 +13,8 @@ export type CssType<TProps> = CSSProps<TProps> | CssObject<TProps> | FunctionInt
13
13
  /**
14
14
  * These are all the CSS props that will exist.
15
15
  */
16
- export type CSSProps<TProps> = CSS.Properties<CssFunction<TProps>>;
17
- export type CssObject<TProps> = {
16
+ export type CSSProps<TProps> = Readonly<CSS.Properties<CssFunction<TProps>>>;
17
+ export type CssObject<TProps> = Readonly<{
18
18
  [key: string]: CssFunction<TProps>;
19
- };
19
+ }>;
20
20
  export type CssFunction<TProps = unknown> = CssType<TProps> | BasicTemplateInterpolations | boolean | undefined;
@@ -1,7 +1,7 @@
1
1
  /**
2
2
  * Flowtype definitions for types
3
3
  * Generated by Flowgen from a Typescript Definition
4
- * Flowgen v1.20.1
4
+ * Flowgen v1.21.0
5
5
  * @flow
6
6
  */
7
7
  import * as CSS from 'csstype';
@@ -19,11 +19,11 @@ export type CssType<TProps> = CssObject<TProps> | FunctionInterpolation<TProps>
19
19
  /**
20
20
  * These are all the CSS props that will exist.
21
21
  */
22
- export type CSSProps<TProps> = CSS.Properties<CssFunction<TProps>>;
23
- export type CssObject<TProps> = {
22
+ export type CSSProps<TProps> = $ReadOnly<CSS.Properties<CssFunction<TProps>>>;
23
+ export type CssObject<TProps> = $ReadOnly<{
24
24
  ...CSSProps<TProps>,
25
25
  [key: string]: CssFunction<TProps>,
26
- };
26
+ }>;
27
27
  export type CssFunction<TProps = mixed> =
28
28
  | CssType<TProps>
29
29
  | BasicTemplateInterpolations
@@ -1,7 +1,7 @@
1
1
  /**
2
2
  * Flowtype definitions for error
3
3
  * Generated by Flowgen from a Typescript Definition
4
- * Flowgen v1.20.1
4
+ * Flowgen v1.21.0
5
5
  * @flow
6
6
  */
7
7
  declare export var createSetupError: () => Error;
@@ -1,7 +1,7 @@
1
1
  /**
2
2
  * Flowtype definitions for index
3
3
  * Generated by Flowgen from a Typescript Definition
4
- * Flowgen v1.20.1
4
+ * Flowgen v1.21.0
5
5
  * @flow
6
6
  */
7
7
  import type { Node } from 'react';
@@ -1,7 +1,7 @@
1
1
  /**
2
2
  * Flowtype definitions for index
3
3
  * Generated by Flowgen from a Typescript Definition
4
- * Flowgen v1.20.1
4
+ * Flowgen v1.21.0
5
5
  * @flow
6
6
  */
7
7
  import type { CSSProps, CssObject, CssFunction } from '../types';
@@ -0,0 +1,21 @@
1
+ import type { CSSProps, CssObject } from '../types';
2
+ /**
3
+ * ## cssMap
4
+ *
5
+ * Creates a collection of named CSS rules that are statically typed and useable with other Compiled APIs.
6
+ * For further details [read the documentation](https://compiledcssinjs.com/docs/api-cssmap).
7
+ *
8
+ * @example
9
+ * ```
10
+ * const borderStyleMap = cssMap({
11
+ * none: { borderStyle: 'none' },
12
+ * solid: { borderStyle: 'solid' },
13
+ * });
14
+ * const Component = ({ borderStyle }) => <div css={css(borderStyleMap[borderStyle])} />
15
+ *
16
+ * <Component borderStyle="solid" />
17
+ * ```
18
+ */
19
+ type returnType<T extends string, P> = Record<T, CSSProps<P>>;
20
+ export default function cssMap<T extends string, TProps = unknown>(_styles: Record<T, CssObject<TProps> | CssObject<TProps>[]>): Readonly<returnType<T, TProps>>;
21
+ export {};
@@ -0,0 +1,8 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const error_1 = require("../utils/error");
4
+ function cssMap(_styles) {
5
+ throw (0, error_1.createSetupError)();
6
+ }
7
+ exports.default = cssMap;
8
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1,26 @@
1
+ /**
2
+ * Flowtype definitions for index
3
+ * Generated by Flowgen from a Typescript Definition
4
+ * Flowgen v1.21.0
5
+ * @flow
6
+ */
7
+ import type { CSSProps, CssObject } from '../types';
8
+ /**
9
+ * ## cssMap
10
+ *
11
+ * Creates a collection of named CSS rules that are statically typed and useable with other Compiled APIs.
12
+ * For further details [read the documentation](https://compiledcssinjs.com/docs/api-cssmap).
13
+ * @example ```
14
+ * const borderStyleMap = cssMap({
15
+ * none: { borderStyle: 'none' },
16
+ * solid: { borderStyle: 'solid' },
17
+ * });
18
+ * const Component = ({ borderStyle }) => <div css={css(borderStyleMap[borderStyle])} />
19
+ *
20
+ * <Component borderStyle="solid" />
21
+ * ```
22
+ */
23
+ declare type returnType<T: string, P> = { [key: T]: CSSProps<P> };
24
+ declare export default function cssMap<T: string, TProps>(_styles: {
25
+ [key: T]: CssObject<TProps> | CssObject<TProps>[],
26
+ }): $ReadOnly<returnType<T, TProps>>;
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/css-map/index.ts"],"names":[],"mappings":";;AACA,0CAAkD;AAqBlD,SAAwB,MAAM,CAC5B,OAA2D;IAE3D,MAAM,IAAA,wBAAgB,GAAE,CAAC;AAC3B,CAAC;AAJD,yBAIC"}
@@ -6,6 +6,7 @@ export { keyframes } from './keyframes';
6
6
  export { styled } from './styled';
7
7
  export { ClassNames } from './class-names';
8
8
  export { default as css } from './css';
9
+ export { default as cssMap } from './css-map';
9
10
  export declare const jsx: typeof createElement;
10
11
  export declare namespace jsx {
11
12
  namespace JSX {
package/dist/cjs/index.js CHANGED
@@ -3,7 +3,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
3
3
  return (mod && mod.__esModule) ? mod : { "default": mod };
4
4
  };
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
- exports.jsx = exports.css = exports.ClassNames = exports.styled = exports.keyframes = void 0;
6
+ exports.jsx = exports.cssMap = exports.css = exports.ClassNames = exports.styled = exports.keyframes = void 0;
7
7
  const react_1 = require("react");
8
8
  var keyframes_1 = require("./keyframes");
9
9
  Object.defineProperty(exports, "keyframes", { enumerable: true, get: function () { return keyframes_1.keyframes; } });
@@ -13,6 +13,8 @@ var class_names_1 = require("./class-names");
13
13
  Object.defineProperty(exports, "ClassNames", { enumerable: true, get: function () { return class_names_1.ClassNames; } });
14
14
  var css_1 = require("./css");
15
15
  Object.defineProperty(exports, "css", { enumerable: true, get: function () { return __importDefault(css_1).default; } });
16
+ var css_map_1 = require("./css-map");
17
+ Object.defineProperty(exports, "cssMap", { enumerable: true, get: function () { return __importDefault(css_map_1).default; } });
16
18
  // Pass through the (classic) jsx runtime.
17
19
  // Compiled currently doesn't define its own and uses this purely to enable a local jsx namespace.
18
20
  exports.jsx = react_1.createElement;
@@ -1,7 +1,7 @@
1
1
  /**
2
2
  * Flowtype definitions for index
3
3
  * Generated by Flowgen from a Typescript Definition
4
- * Flowgen v1.20.1
4
+ * Flowgen v1.21.0
5
5
  * @flow
6
6
  */
7
7
  import type { CssFunction, CSSProps, CssType } from './types';
@@ -10,3 +10,4 @@ declare export { keyframes } from './keyframes';
10
10
  declare export { styled } from './styled';
11
11
  declare export { ClassNames } from './class-names';
12
12
  declare export { default as css } from './css';
13
+ declare export { default as cssMap } from './css-map';
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":";;;;;;AAAA,iCAAsC;AAOtC,yCAAwC;AAA/B,sGAAA,SAAS,OAAA;AAClB,mCAAkC;AAAzB,gGAAA,MAAM,OAAA;AACf,6CAA2C;AAAlC,yGAAA,UAAU,OAAA;AACnB,6BAAuC;AAA9B,2GAAA,OAAO,OAAO;AAEvB,0CAA0C;AAC1C,kGAAkG;AACrF,QAAA,GAAG,GAAG,qBAAa,CAAC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":";;;;;;AAAA,iCAAsC;AAOtC,yCAAwC;AAA/B,sGAAA,SAAS,OAAA;AAClB,mCAAkC;AAAzB,gGAAA,MAAM,OAAA;AACf,6CAA2C;AAAlC,yGAAA,UAAU,OAAA;AACnB,6BAAuC;AAA9B,2GAAA,OAAO,OAAO;AACvB,qCAA8C;AAArC,kHAAA,OAAO,OAAU;AAE1B,0CAA0C;AAC1C,kGAAkG;AACrF,QAAA,GAAG,GAAG,qBAAa,CAAC"}
@@ -1,7 +1,7 @@
1
1
  /**
2
2
  * Flowtype definitions for index
3
3
  * Generated by Flowgen from a Typescript Definition
4
- * Flowgen v1.20.1
4
+ * Flowgen v1.21.0
5
5
  * @flow
6
6
  */
7
7
  import type { BasicTemplateInterpolations, CSSProps } from '../types';
@@ -1,7 +1,7 @@
1
1
  /**
2
2
  * Flowtype definitions for ac
3
3
  * Generated by Flowgen from a Typescript Definition
4
- * Flowgen v1.20.1
4
+ * Flowgen v1.21.0
5
5
  * @flow
6
6
  */
7
7
  /**
@@ -1,7 +1,7 @@
1
1
  /**
2
2
  * Flowtype definitions for ax
3
3
  * Generated by Flowgen from a Typescript Definition
4
- * Flowgen v1.20.1
4
+ * Flowgen v1.21.0
5
5
  * @flow
6
6
  */
7
7
  /**
@@ -1,7 +1,7 @@
1
1
  /**
2
2
  * Flowtype definitions for cache
3
3
  * Generated by Flowgen from a Typescript Definition
4
- * Flowgen v1.20.1
4
+ * Flowgen v1.21.0
5
5
  * @flow
6
6
  */
7
7
  /**
@@ -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.20.1
4
+ * Flowgen v1.21.0
5
5
  * @flow
6
6
  */
7
7
  /**
@@ -1,7 +1,7 @@
1
1
  /**
2
2
  * Flowtype definitions for dev-warnings
3
3
  * Generated by Flowgen from a Typescript Definition
4
- * Flowgen v1.20.1
4
+ * Flowgen v1.21.0
5
5
  * @flow
6
6
  */
7
7
  declare export var analyzeCssInDev: (sheet: string) => void;
@@ -1,7 +1,7 @@
1
1
  /**
2
2
  * Flowtype definitions for index
3
3
  * Generated by Flowgen from a Typescript Definition
4
- * Flowgen v1.20.1
4
+ * Flowgen v1.21.0
5
5
  * @flow
6
6
  */
7
7
  declare export { default as CS } from './style';
@@ -1,7 +1,7 @@
1
1
  /**
2
2
  * Flowtype definitions for is-server-environment
3
3
  * Generated by Flowgen from a Typescript Definition
4
- * Flowgen v1.20.1
4
+ * Flowgen v1.21.0
5
5
  * @flow
6
6
  */
7
7
  /**
@@ -1,7 +1,7 @@
1
1
  /**
2
2
  * Flowtype definitions for sheet
3
3
  * Generated by Flowgen from a Typescript Definition
4
- * Flowgen v1.20.1
4
+ * Flowgen v1.21.0
5
5
  * @flow
6
6
  */
7
7
  import type { Bucket, StyleSheetOpts } from './types';
@@ -1,7 +1,7 @@
1
1
  /**
2
2
  * Flowtype definitions for style-cache
3
3
  * Generated by Flowgen from a Typescript Definition
4
- * Flowgen v1.20.1
4
+ * Flowgen v1.21.0
5
5
  * @flow
6
6
  */
7
7
  import type { ProviderComponent, UseCacheHook } from './types';
@@ -1,7 +1,7 @@
1
1
  /**
2
2
  * Flowtype definitions for style
3
3
  * Generated by Flowgen from a Typescript Definition
4
- * Flowgen v1.20.1
4
+ * Flowgen v1.21.0
5
5
  * @flow
6
6
  */
7
7
  import type { StyleSheetOpts } from './types';
@@ -1,7 +1,7 @@
1
1
  /**
2
2
  * Flowtype definitions for types
3
3
  * Generated by Flowgen from a Typescript Definition
4
- * Flowgen v1.20.1
4
+ * Flowgen v1.21.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.20.1
4
+ * Flowgen v1.21.0
5
5
  * @flow
6
6
  */
7
7
  declare export { CC, CS, ax, ac, clearAcCache, ix } from './runtime/index';
@@ -1,7 +1,7 @@
1
1
  /**
2
2
  * Flowtype definitions for index
3
3
  * Generated by Flowgen from a Typescript Definition
4
- * Flowgen v1.20.1
4
+ * Flowgen v1.21.0
5
5
  * @flow
6
6
  */
7
7
  import type { ComponentType } from 'react';
@@ -13,8 +13,8 @@ export type CssType<TProps> = CSSProps<TProps> | CssObject<TProps> | FunctionInt
13
13
  /**
14
14
  * These are all the CSS props that will exist.
15
15
  */
16
- export type CSSProps<TProps> = CSS.Properties<CssFunction<TProps>>;
17
- export type CssObject<TProps> = {
16
+ export type CSSProps<TProps> = Readonly<CSS.Properties<CssFunction<TProps>>>;
17
+ export type CssObject<TProps> = Readonly<{
18
18
  [key: string]: CssFunction<TProps>;
19
- };
19
+ }>;
20
20
  export type CssFunction<TProps = unknown> = CssType<TProps> | BasicTemplateInterpolations | boolean | undefined;
@@ -1,7 +1,7 @@
1
1
  /**
2
2
  * Flowtype definitions for types
3
3
  * Generated by Flowgen from a Typescript Definition
4
- * Flowgen v1.20.1
4
+ * Flowgen v1.21.0
5
5
  * @flow
6
6
  */
7
7
  import * as CSS from 'csstype';
@@ -19,11 +19,11 @@ export type CssType<TProps> = CssObject<TProps> | FunctionInterpolation<TProps>
19
19
  /**
20
20
  * These are all the CSS props that will exist.
21
21
  */
22
- export type CSSProps<TProps> = CSS.Properties<CssFunction<TProps>>;
23
- export type CssObject<TProps> = {
22
+ export type CSSProps<TProps> = $ReadOnly<CSS.Properties<CssFunction<TProps>>>;
23
+ export type CssObject<TProps> = $ReadOnly<{
24
24
  ...CSSProps<TProps>,
25
25
  [key: string]: CssFunction<TProps>,
26
- };
26
+ }>;
27
27
  export type CssFunction<TProps = mixed> =
28
28
  | CssType<TProps>
29
29
  | BasicTemplateInterpolations
@@ -1,7 +1,7 @@
1
1
  /**
2
2
  * Flowtype definitions for error
3
3
  * Generated by Flowgen from a Typescript Definition
4
- * Flowgen v1.20.1
4
+ * Flowgen v1.21.0
5
5
  * @flow
6
6
  */
7
7
  declare export var createSetupError: () => Error;
@@ -1,7 +1,7 @@
1
1
  /**
2
2
  * Flowtype definitions for index
3
3
  * Generated by Flowgen from a Typescript Definition
4
- * Flowgen v1.20.1
4
+ * Flowgen v1.21.0
5
5
  * @flow
6
6
  */
7
7
  import type { Node } from 'react';