@symbo.ls/atoms 2.11.331 → 2.11.333

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 (2) hide show
  1. package/Block.js +14 -14
  2. package/package.json +2 -2
package/Block.js CHANGED
@@ -36,7 +36,7 @@ export const Block = {
36
36
  height: ({ props, deps }) => deps.transformSizeRatio('height', props),
37
37
 
38
38
  boxSize: ({ props, deps }) => {
39
- if (typeof props.boxSize !== 'string') return
39
+ if (!isString(props.boxSize)) return
40
40
  const [height, width] = props.boxSize.split(' ')
41
41
  return {
42
42
  ...deps.transformSize('height', height),
@@ -47,7 +47,7 @@ export const Block = {
47
47
  minWidth: ({ props, deps }) => deps.transformSizeRatio('minWidth', props),
48
48
  maxWidth: ({ props, deps }) => deps.transformSizeRatio('maxWidth', props),
49
49
  widthRange: ({ props, deps }) => {
50
- if (typeof props.widthRange !== 'string') return
50
+ if (!isString(props.widthRange)) return
51
51
  const [minWidth, maxWidth] = props.widthRange.split(' ')
52
52
  return {
53
53
  ...deps.transformSize('minWidth', minWidth),
@@ -58,7 +58,7 @@ export const Block = {
58
58
  minHeight: ({ props, deps }) => deps.transformSizeRatio('minHeight', props),
59
59
  maxHeight: ({ props, deps }) => deps.transformSizeRatio('maxHeight', props),
60
60
  heightRange: ({ props, deps }) => {
61
- if (typeof props.heightRange !== 'string') return
61
+ if (!isString(props.heightRange)) return
62
62
  const [minHeight, maxHeight] = props.heightRange.split(' ')
63
63
  return {
64
64
  ...deps.transformSize('minHeight', minHeight),
@@ -67,8 +67,8 @@ export const Block = {
67
67
  },
68
68
 
69
69
  minSize: ({ props, deps }) => {
70
- if (typeof props.heightRange !== 'string') return
71
- const [minHeight, minWidth] = props.heightRange.split(' ')
70
+ if (!isString(props.minSize)) return
71
+ const [minHeight, minWidth] = props.minSize.split(' ')
72
72
  return {
73
73
  ...deps.transformSize('minHeight', minHeight),
74
74
  ...deps.transformSize('minWidth', minWidth || minHeight)
@@ -76,8 +76,8 @@ export const Block = {
76
76
  },
77
77
 
78
78
  maxSize: ({ props, deps }) => {
79
- if (typeof props.heightRange !== 'string') return
80
- const [maxHeight, maxWidth] = props.heightRange.split(' ')
79
+ if (!isString(props.maxSize)) return
80
+ const [maxHeight, maxWidth] = props.maxSize.split(' ')
81
81
  return {
82
82
  ...deps.transformSize('maxHeight', maxHeight),
83
83
  ...deps.transformSize('maxWidth', maxWidth || maxHeight)
@@ -97,7 +97,7 @@ export const Block = {
97
97
  padding: ({ props, deps }) => deps.transformSizeRatio('padding', props),
98
98
  scrollPadding: ({ props, deps }) => deps.transformSizeRatio('scrollPadding', props),
99
99
  paddingInline: ({ props, deps }) => {
100
- if (typeof props.paddingInline !== 'string') return
100
+ if (!isString(props.paddingInline)) return
101
101
  const [paddingInlineStart, paddingInlineEnd] = props.paddingInline.split(' ')
102
102
  return {
103
103
  ...deps.transformSize('paddingInlineStart', paddingInlineStart),
@@ -105,7 +105,7 @@ export const Block = {
105
105
  }
106
106
  },
107
107
  paddingBlock: ({ props, deps }) => {
108
- if (isString(props.paddingBlock)) return
108
+ if (!isString(props.paddingBlock)) return
109
109
  const [paddingBlockStart, paddingBlockEnd] = props.paddingBlock.split(' ')
110
110
  return {
111
111
  ...deps.transformSize('paddingBlockStart', paddingBlockStart),
@@ -119,7 +119,7 @@ export const Block = {
119
119
 
120
120
  margin: ({ props, deps }) => deps.transformSizeRatio('margin', props),
121
121
  marginInline: ({ props, deps }) => {
122
- if (typeof props.marginInline !== 'string') return
122
+ if (!isString(props.marginInline)) return
123
123
  const [marginInlineStart, marginInlineEnd] = props.marginInline.split(' ')
124
124
  return {
125
125
  ...deps.transformSize('marginInlineStart', marginInlineStart),
@@ -127,7 +127,7 @@ export const Block = {
127
127
  }
128
128
  },
129
129
  marginBlock: ({ props, deps }) => {
130
- if (typeof props.marginBlock !== 'string') return
130
+ if (!isString(props.marginBlock)) return
131
131
  const [marginBlockStart, marginBlockEnd] = props.marginBlock.split(' ')
132
132
  return {
133
133
  ...deps.transformSize('marginBlockStart', marginBlockStart),
@@ -178,7 +178,7 @@ export const Block = {
178
178
  flexFlow: props.flexFlow + (props.reverse ? '-reverse' : '')
179
179
  }),
180
180
  flexAlign: ({ props }) => {
181
- if (typeof props.flexAlign !== 'string') return
181
+ if (!isString(props.flexAlign)) return
182
182
  const [alignItems, justifyContent] = props.flexAlign.split(' ')
183
183
  return {
184
184
  display: 'flex',
@@ -201,7 +201,7 @@ export const Block = {
201
201
  }),
202
202
 
203
203
  size: ({ props, deps }) => {
204
- if (typeof props.heightRange !== 'string') return
204
+ if (!isString(props.heightRange)) return
205
205
  const [minHeight, maxHeight] = props.heightRange.split(' ')
206
206
  return {
207
207
  ...deps.transformSizeRatio('minHeight', minHeight),
@@ -251,7 +251,7 @@ export const Gutter = {
251
251
  },
252
252
  class: {
253
253
  size: ({ props, deps }) => {
254
- if (typeof props.size !== 'string') return
254
+ if (!isString(props.size)) return
255
255
  const [height, width] = props.size.split(' ')
256
256
  return {
257
257
  ...deps.getSpacingByKey('height', height),
package/package.json CHANGED
@@ -1,9 +1,9 @@
1
1
  {
2
2
  "name": "@symbo.ls/atoms",
3
- "version": "2.11.331",
3
+ "version": "2.11.333",
4
4
  "main": "index.js",
5
5
  "license": "MIT",
6
- "gitHead": "c1ce82619a9c90dcb12862a1cef1d7fc10b8718b",
6
+ "gitHead": "8c0ee0deb6786d87ae0ece3b87462269af4db917",
7
7
  "dependencies": {
8
8
  "@domql/state": "latest",
9
9
  "@domql/utils": "latest",