@symbo.ls/atoms 2.11.291 → 2.11.305

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/Collection.js CHANGED
@@ -17,17 +17,19 @@ export const Collection = {
17
17
 
18
18
  const { __ref: ref } = el
19
19
 
20
+ if (isObjectLike(param)) param = deepClone(param)
21
+
20
22
  if (ref.__collectionCache) {
21
23
  const equals = JSON.stringify(param) === JSON.stringify(ref.__collectionCache)
22
24
  if (equals) {
23
25
  ref.__noCollectionDifference = true
24
26
  return
25
27
  } else {
26
- ref.__collectionCache = deepClone(param)
28
+ ref.__collectionCache = param
27
29
  delete ref.__noCollectionDifference
28
30
  }
29
31
  } else {
30
- ref.__collectionCache = deepClone(param)
32
+ ref.__collectionCache = param
31
33
  }
32
34
 
33
35
  const obj = {
package/Flex.js CHANGED
@@ -1,12 +1,24 @@
1
1
  'use strict'
2
2
 
3
+ import { isUndefined } from '@domql/utils'
4
+
3
5
  export const Flex = {
4
6
  props: {
5
7
  display: 'flex'
6
8
  },
7
9
 
8
10
  class: {
9
- flow: ({ props }) => props.flow && ({ flexFlow: props.flow + (props.reverse ? '-reverse' : '') }),
11
+ flow: ({ props }) => {
12
+ const { flow } = props
13
+ if (isUndefined(flow)) return
14
+ let [direction, wrap] = flow.split(' ')
15
+ if (flow.startsWith('x') || flow.startsWith('row')) direction = 'row'
16
+ if (flow.startsWith('y') || flow.startsWith('column')) direction = 'column'
17
+ return {
18
+ flexFlow: (direction || '') + (props.reverse ? '-reverse' : '') + ' ' + (wrap || '')
19
+ }
20
+ },
21
+
10
22
  wrap: ({ props }) => props.wrap && ({ flexWrap: props.wrap }),
11
23
  align: ({ props }) => {
12
24
  if (typeof props.align !== 'string') return
package/Picture.js CHANGED
@@ -26,6 +26,7 @@ export const Picture = {
26
26
 
27
27
  Img: ({ props }) => ({
28
28
  width: 'inherit',
29
+ ignoreChildExtend: true,
29
30
  height: 'inherit',
30
31
  src: props.src
31
32
  })
package/Svg.js CHANGED
@@ -1,11 +1,8 @@
1
1
  'use strict'
2
2
 
3
- import { init } from '@symbo.ls/init'
4
-
5
3
  // create SVG symbol
6
4
  export const Svg = {
7
5
  tag: 'svg',
8
- deps: { init },
9
6
  props: {
10
7
  style: { '*': { fill: 'currentColor' } }
11
8
  },
@@ -13,8 +10,8 @@ export const Svg = {
13
10
  xmlns: 'http://www.w3.org/2000/svg',
14
11
  'xmlns:xlink': 'http://www.w3.org/1999/xlink'
15
12
  },
16
- html: ({ key, props, context, deps, ...el }) => {
17
- const { designSystem } = context
13
+ html: ({ key, props, context, ...el }) => {
14
+ const { designSystem, utils } = context
18
15
  const SVG = designSystem && designSystem.SVG
19
16
  const useSvgSprite = props.spriteId || (context.designSystem && context.designSystem.useSvgSprite)
20
17
 
@@ -31,7 +28,7 @@ export const Svg = {
31
28
 
32
29
  SVGKey = SVG[symbolId] = Math.random()
33
30
  if (props.src) {
34
- deps.init({
31
+ utils.init({
35
32
  svg: { [SVGKey]: props.src }
36
33
  }, {
37
34
  document: context.document,
package/Timing.js CHANGED
@@ -5,6 +5,7 @@ import {
5
5
  splitTransition,
6
6
  transformDuration
7
7
  } from '@symbo.ls/scratch'
8
+ import { isUndefined } from 'smbls'
8
9
 
9
10
  export const Timing = {
10
11
  deps: {
@@ -14,22 +15,22 @@ export const Timing = {
14
15
  },
15
16
 
16
17
  class: {
17
- transition: ({ props, deps }) => props.transition && ({
18
+ transition: ({ props, deps }) => !isUndefined(props.transition) && ({
18
19
  transition: deps.splitTransition(props.transition)
19
20
  }),
20
- willChange: ({ props }) => props.willChange && ({
21
+ willChange: ({ props }) => !isUndefined(props.willChange) && ({
21
22
  willChange: props.willChange
22
23
  }),
23
- transitionDuration: ({ props, deps }) => props.transitionDuration && ({
24
+ transitionDuration: ({ props, deps }) => !isUndefined(props.transitionDuration) && ({
24
25
  transitionDuration: deps.transformDuration(props.transitionDuration)
25
26
  }),
26
- transitionDelay: ({ props, deps }) => props.transitionDelay && ({
27
+ transitionDelay: ({ props, deps }) => !isUndefined(props.transitionDelay) && ({
27
28
  transitionDelay: deps.transformDuration(props.transitionDelay)
28
29
  }),
29
- transitionTimingFunction: ({ props, deps }) => props.transitionTimingFunction && ({
30
+ transitionTimingFunction: ({ props, deps }) => !isUndefined(props.transitionTimingFunction) && ({
30
31
  transitionTimingFunction: deps.getTimingFunction(props.transitionTimingFunction)
31
32
  }),
32
- transitionProperty: ({ props }) => props.transitionProperty && ({
33
+ transitionProperty: ({ props }) => !isUndefined(props.transitionProperty) && ({
33
34
  transitionProperty: props.transitionProperty,
34
35
  willChange: props.transitionProperty
35
36
  })
package/Transform.js CHANGED
@@ -1,9 +1,11 @@
1
1
  'use strict'
2
2
 
3
+ import { isUndefined } from 'smbls'
4
+
3
5
  export const Transform = {
4
6
  class: {
5
- zoom: ({ props }) => props.zoom && ({ zoom: props.zoom }),
6
- transform: ({ props }) => props.transform && ({ transform: props.transform }),
7
- transformOrigin: ({ props }) => props.transformOrigin && ({ transformOrigin: props.transformOrigin })
7
+ zoom: ({ props }) => !isUndefined(props.zoom) && ({ zoom: props.zoom }),
8
+ transform: ({ props }) => !isUndefined(props.transform) && ({ transform: props.transform }),
9
+ transformOrigin: ({ props }) => !isUndefined(props.transformOrigin) && ({ transformOrigin: props.transformOrigin })
8
10
  }
9
11
  }
package/XYZ.js CHANGED
@@ -1,7 +1,9 @@
1
1
  'use strict'
2
2
 
3
+ import { isUndefined } from 'smbls'
4
+
3
5
  export const XYZ = {
4
6
  class: {
5
- zIndex: ({ props }) => props.zIndex && ({ zIndex: props.zIndex })
7
+ zIndex: ({ props }) => !isUndefined(props.zIndex) && ({ zIndex: props.zIndex })
6
8
  }
7
9
  }
package/package.json CHANGED
@@ -1,14 +1,13 @@
1
1
  {
2
2
  "name": "@symbo.ls/atoms",
3
- "version": "2.11.291",
3
+ "version": "2.11.305",
4
4
  "main": "index.js",
5
5
  "license": "MIT",
6
- "gitHead": "54f3dd0f443356a9cc26b3005ad352d5333f0c11",
6
+ "gitHead": "14569e713ad6d47a3be207df9f23dc0338a2d562",
7
7
  "dependencies": {
8
8
  "@domql/state": "latest",
9
9
  "@domql/utils": "latest",
10
10
  "@symbo.ls/emotion": "latest",
11
- "@symbo.ls/init": "latest",
12
11
  "@symbo.ls/scratch": "latest"
13
12
  },
14
13
  "source": "src/index.js",