@animus-ui/core 0.1.1-beta.12 → 0.1.1-beta.13

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/CHANGELOG.md CHANGED
@@ -3,6 +3,14 @@
3
3
  All notable changes to this project will be documented in this file.
4
4
  See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
5
 
6
+ ## [0.1.1-beta.13](https://github.com/codecaaron/animus/compare/@animus-ui/core@0.1.1-beta.12...@animus-ui/core@0.1.1-beta.13) (2022-01-24)
7
+
8
+ **Note:** Version bump only for package @animus-ui/core
9
+
10
+
11
+
12
+
13
+
6
14
  ## [0.1.1-beta.12](https://github.com/codecaaron/animus/compare/@animus-ui/core@0.1.1-beta.11...@animus-ui/core@0.1.1-beta.12) (2022-01-24)
7
15
 
8
16
  **Note:** Version bump only for package @animus-ui/core
@@ -1,4 +1,11 @@
1
1
  export declare const compatTheme: {
2
+ readonly breakpoints: {
3
+ readonly xs: 480;
4
+ readonly sm: 768;
5
+ readonly md: 1024;
6
+ readonly lg: 1200;
7
+ readonly xl: 1440;
8
+ };
2
9
  readonly spacing: readonly [0, 4, 8, 12, 16, 24, 32, 40, 48, 64, 96];
3
10
  readonly fontSize: readonly [64, 44, 34, 26, 22, 20, 18, 16, 14];
4
11
  readonly lineHeight: {
package/dist/index.js CHANGED
@@ -77,6 +77,13 @@ const borderShorthand = (val) => {
77
77
  };
78
78
 
79
79
  const compatTheme = {
80
+ breakpoints: {
81
+ xs: 480,
82
+ sm: 768,
83
+ md: 1024,
84
+ lg: 1200,
85
+ xl: 1440,
86
+ },
80
87
  spacing: [0, 4, 8, 12, 16, 24, 32, 40, 48, 64, 96],
81
88
  fontSize: [64, 44, 34, 26, 22, 20, 18, 16, 14],
82
89
  lineHeight: {
@@ -294,13 +301,6 @@ const orderBreakpoints$1 = (styles, breakpoints) => {
294
301
  return orderedStyles;
295
302
  };
296
303
 
297
- const defaultBreakpoints$1 = {
298
- xs: 480,
299
- sm: 768,
300
- md: 1024,
301
- lg: 1200,
302
- xl: 1440,
303
- };
304
304
  const renderPropValue$1 = (styles, prop, props, property, ctx) => {
305
305
  const value = get(props, prop);
306
306
  switch (typeof value) {
@@ -334,7 +334,7 @@ function createParser$1(config) {
334
334
  // Attempt to cache the breakpoints if we have not yet or if theme has become available.
335
335
  if (ctx.mediaQueries === null) {
336
336
  // Save the breakpoints if we can
337
- ctx.mediaQueries = createMediaQueries$1(theme?.breakpoints ?? defaultBreakpoints$1);
337
+ ctx.mediaQueries = createMediaQueries$1(theme?.breakpoints ?? compatTheme.breakpoints);
338
338
  }
339
339
  if (!isCss) {
340
340
  // Loops over all prop names on the configured config to check for configured styles
@@ -469,7 +469,7 @@ const createStylist = (parser, base = {}, variants = {}, states = {}) => {
469
469
  const context = {
470
470
  parser,
471
471
  getMediaSelectors: ({ theme }) => {
472
- const breakpoints = theme?.breakpoints ?? defaultBreakpoints$1;
472
+ const breakpoints = theme?.breakpoints ?? compatTheme.breakpoints;
473
473
  return ['xs', 'sm', 'md', 'lg', 'xl'].map((key) => breakpoints[key]);
474
474
  },
475
475
  getActiveOverrides: createGetActiveStyleIds(variants, states),
@@ -1004,13 +1004,6 @@ const orderBreakpoints = (styles, breakpoints) => {
1004
1004
  return orderedStyles;
1005
1005
  };
1006
1006
 
1007
- const defaultBreakpoints = {
1008
- xs: 480,
1009
- sm: 768,
1010
- md: 1024,
1011
- lg: 1200,
1012
- xl: 1440,
1013
- };
1014
1007
  const renderPropValue = (styles, prop, props, property, ctx) => {
1015
1008
  const value = get(props, prop);
1016
1009
  switch (typeof value) {
@@ -1044,7 +1037,7 @@ function createParser(config) {
1044
1037
  // Attempt to cache the breakpoints if we have not yet or if theme has become available.
1045
1038
  if (ctx.mediaQueries === null) {
1046
1039
  // Save the breakpoints if we can
1047
- ctx.mediaQueries = createMediaQueries(theme?.breakpoints ?? defaultBreakpoints);
1040
+ ctx.mediaQueries = createMediaQueries(theme?.breakpoints ?? compatTheme.breakpoints);
1048
1041
  }
1049
1042
  if (!isCss) {
1050
1043
  // Loops over all prop names on the configured config to check for configured styles
@@ -1,9 +1,2 @@
1
1
  import { AbstractPropTransformer, Parser } from './config';
2
- export declare const defaultBreakpoints: {
3
- xs: number;
4
- sm: number;
5
- md: number;
6
- lg: number;
7
- xl: number;
8
- };
9
2
  export declare function createParser<Config extends Record<string, AbstractPropTransformer>>(config: Config): Parser<Config>;
@@ -1,9 +1,2 @@
1
1
  import { Parser, Prop } from '../types/config';
2
- export declare const defaultBreakpoints: {
3
- xs: number;
4
- sm: number;
5
- md: number;
6
- lg: number;
7
- xl: number;
8
- };
9
2
  export declare function createParser<Config extends Record<string, Prop>>(config: Config): Parser<Config>;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@animus-ui/core",
3
3
  "description": "Constraint based CSS in JS Foundations",
4
- "version": "0.1.1-beta.12",
4
+ "version": "0.1.1-beta.13",
5
5
  "keywords": [
6
6
  "emotion",
7
7
  "css",
@@ -36,5 +36,5 @@
36
36
  "dependencies": {
37
37
  "csstype": "^3.0.7"
38
38
  },
39
- "gitHead": "5642ca93c52aec07326da5d2a466c9ce54d0e8c8"
39
+ "gitHead": "a524996043ae5e449c4192522f6564c3951a5187"
40
40
  }