smbls 0.9.16 → 0.11.1

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/README.md CHANGED
@@ -19,7 +19,7 @@ import { Box } from 'smbls'
19
19
  3. Use it inside your DOMQL code
20
20
  ```
21
21
  const Header = {
22
- proto: Box,
22
+ extend: Box,
23
23
  // ...Other Properties
24
24
  }
25
25
  ```
package/package.json CHANGED
@@ -3,7 +3,7 @@
3
3
  "description": "UI Library built on Scratch and DOMQL",
4
4
  "private": false,
5
5
  "author": "symbo.ls",
6
- "version": "0.9.16",
6
+ "version": "0.11.1",
7
7
  "repository": "https://github.com/symbo-ls/smbls",
8
8
  "main": "src/index.js",
9
9
  "files": [
@@ -7,17 +7,17 @@ import { UserBundle } from '../User'
7
7
  import { styleParentMode } from './style'
8
8
 
9
9
  export const ParentMode = {
10
- proto: Shape,
10
+ extend: Shape,
11
11
  round: 10,
12
12
  theme: 'purple',
13
13
  style: styleParentMode,
14
14
  icon: {
15
- proto: Icon,
15
+ extend: Icon,
16
16
  props: { icon: 'checkMedium' }
17
17
  },
18
18
  h2: 'Welcome to parent Mode',
19
19
  description: {
20
- proto: UserBundle,
20
+ extend: UserBundle,
21
21
  users: { ...[{}, {}, {}] },
22
22
  span: 'You’ll now be able to chat with tutor privately. No other participants will see the messages.'
23
23
  }
package/src/Block.js CHANGED
@@ -1,29 +1,30 @@
1
1
  'use strict'
2
2
 
3
- import { SPACING, mapSpacing } from '@symbo.ls/scratch'
3
+ import { SPACING, getSpacingByKey } from '@symbo.ls/scratch'
4
4
 
5
- export const mapBasedOnRatio = (props, prop, unit) => {
5
+ export const getSpacingBasedOnRatio = (props, prop, unit) => {
6
6
  const { spacingRatio } = props
7
7
  const val = props[prop]
8
- // TODO: move this to mapSpacing
8
+ // TODO: move this to getSpacingByKey
9
9
  if (spacingRatio) {
10
- const params = SPACING[spacingRatio]
10
+ let params = SPACING[spacingRatio]
11
11
 
12
12
  if (!params) {
13
- SPACING[spacingRatio] = {
13
+ params = SPACING[spacingRatio] = {
14
14
  base: SPACING.base,
15
- type: 'spacing',
15
+ type: SPACING.type,
16
16
  ratio: spacingRatio,
17
- range: [-5, +7],
18
- subSequence: true,
17
+ range: SPACING.range,
18
+ subSequence: SPACING.subSequence,
19
19
  sequence: {},
20
- scales: {}
20
+ scales: {},
21
+ vars: {}
21
22
  }
22
23
  }
23
24
 
24
- return mapSpacing(val, prop, params, unit)
25
+ return getSpacingByKey(val, prop, params, unit)
25
26
  }
26
- return mapSpacing(val, prop, null, unit)
27
+ return getSpacingByKey(val, prop, null, unit)
27
28
  }
28
29
 
29
30
  export const Block = {
@@ -36,47 +37,47 @@ export const Block = {
36
37
 
37
38
  hide: ({ props }) => props.hide && ({ display: 'none' }),
38
39
 
39
- width: ({ props }) => props.width && mapBasedOnRatio(props, 'width'),
40
- height: ({ props }) => props.height && mapBasedOnRatio(props, 'height'),
40
+ width: ({ props }) => props.width && getSpacingBasedOnRatio(props, 'width'),
41
+ height: ({ props }) => props.height && getSpacingBasedOnRatio(props, 'height'),
41
42
  boxSize: ({ props }) => {
42
43
  if (typeof props.boxSize !== 'string') return
43
44
  const [height, width] = props.boxSize.split(' ')
44
45
  return {
45
- ...mapSpacing(height, 'height'),
46
- ...mapSpacing(width || height, 'width')
46
+ ...getSpacingByKey(height, 'height'),
47
+ ...getSpacingByKey(width || height, 'width')
47
48
  }
48
49
  },
49
50
 
50
- maxWidth: ({ props }) => props.maxWidth && mapBasedOnRatio(props, 'maxWidth'),
51
- minWidth: ({ props }) => props.minWidth && mapBasedOnRatio(props, 'minWidth'),
51
+ maxWidth: ({ props }) => props.maxWidth && getSpacingBasedOnRatio(props, 'maxWidth'),
52
+ minWidth: ({ props }) => props.minWidth && getSpacingBasedOnRatio(props, 'minWidth'),
52
53
  widthRange: ({ props }) => {
53
54
  if (typeof props.widthRange !== 'string') return
54
55
  const [minWidth, maxWidth] = props.widthRange.split(' ')
55
56
  return {
56
- ...mapSpacing(minWidth, 'minWidth'),
57
- ...mapSpacing(maxWidth, 'maxWidth')
57
+ ...getSpacingByKey(minWidth, 'minWidth'),
58
+ ...getSpacingByKey(maxWidth || minWidth, 'maxWidth')
58
59
  }
59
60
  },
60
61
 
61
- maxHeight: ({ props }) => props.maxHeight && mapBasedOnRatio(props, 'maxHeight'),
62
- minHeight: ({ props }) => props.minHeight && mapBasedOnRatio(props, 'minHeight'),
62
+ maxHeight: ({ props }) => props.maxHeight && getSpacingBasedOnRatio(props, 'maxHeight'),
63
+ minHeight: ({ props }) => props.minHeight && getSpacingBasedOnRatio(props, 'minHeight'),
63
64
  heightRange: ({ props }) => {
64
65
  if (typeof props.heightRange !== 'string') return
65
66
  const [minHeight, maxHeight] = props.heightRange.split(' ')
66
67
  return {
67
- ...mapSpacing(minHeight, 'minHeight'),
68
- ...mapSpacing(maxHeight || minHeight, 'maxHeight')
68
+ ...getSpacingByKey(minHeight, 'minHeight'),
69
+ ...getSpacingByKey(maxHeight || minHeight, 'maxHeight')
69
70
  }
70
71
  },
71
72
 
72
73
  aspectRatio: ({ props }) => props.aspectRatio && ({ aspectRatio: props.aspectRatio }),
73
74
 
74
- borderWidth: ({ props }) => props.borderWidth ? mapBasedOnRatio(props, 'borderWidth') : null,
75
+ borderWidth: ({ props }) => props.borderWidth ? getSpacingBasedOnRatio(props, 'borderWidth') : null,
75
76
 
76
- padding: ({ props }) => props.padding ? mapBasedOnRatio(props, 'padding') : null,
77
- margin: ({ props }) => props.margin ? mapBasedOnRatio(props, 'margin') : null,
77
+ padding: ({ props }) => props.padding ? getSpacingBasedOnRatio(props, 'padding') : null,
78
+ margin: ({ props }) => props.margin ? getSpacingBasedOnRatio(props, 'margin') : null,
78
79
 
79
- gap: ({ props }) => props.gap ? mapBasedOnRatio(props, 'gap') : null,
80
+ gap: ({ props }) => props.gap ? getSpacingBasedOnRatio(props, 'gap') : null,
80
81
  gridArea: ({ props }) => props.gridArea && ({ gridArea: props.gridArea }),
81
82
 
82
83
  flex: ({ props }) => props.flex && ({ flex: props.flex }),
@@ -85,6 +86,7 @@ export const Block = {
85
86
  justifyContent: ({ props }) => props.justifyContent && ({ justifyContent: props.justifyContent }),
86
87
  flexDirection: ({ props }) => props.flexDirection && ({ flexDirection: props.flexDirection }),
87
88
  alignSelf: ({ props }) => props.alignSelf && ({ alignSelf: props.alignSelf }),
89
+ order: ({ props }) => props.order && ({ order: props.order }),
88
90
 
89
91
  flexWrap: ({ props }) => props.flexWrap && ({
90
92
  display: 'flex',
@@ -111,8 +113,8 @@ export const Block = {
111
113
  if (typeof props.heightRange !== 'string') return
112
114
  const [minHeight, maxHeight] = props.heightRange.split(' ')
113
115
  return {
114
- ...mapSpacing(minHeight, 'minHeight'),
115
- ...mapSpacing(maxHeight || minHeight, 'maxHeight')
116
+ ...getSpacingByKey(minHeight, 'minHeight'),
117
+ ...getSpacingByKey(maxHeight || minHeight, 'maxHeight')
116
118
  }
117
119
  }
118
120
  }
package/src/Box.js CHANGED
@@ -9,5 +9,5 @@ const PropsCSS = {
9
9
  }
10
10
 
11
11
  export const Box = {
12
- proto: [Shape, Position, Theme, Block, Text, Overflow, Transition, Transform, Responsive, PropsCSS, Interaction]
12
+ extend: [Shape, Position, Theme, Block, Text, Overflow, Transition, Transform, Responsive, PropsCSS, Interaction]
13
13
  }
package/src/Button.js CHANGED
@@ -11,7 +11,7 @@ const style = {
11
11
  }
12
12
 
13
13
  export const Button = {
14
- proto: IconText,
14
+ extend: IconText,
15
15
  tag: 'button',
16
16
  props: {
17
17
  fontSize: 'A',
@@ -33,7 +33,7 @@ export const Button = {
33
33
  }
34
34
 
35
35
  export const SquareButton = {
36
- proto: Button,
36
+ extend: Button,
37
37
  props: {
38
38
  fontSize: 'A',
39
39
  width: 'A',
@@ -46,7 +46,7 @@ export const SquareButton = {
46
46
  }
47
47
 
48
48
  export const CircleButton = {
49
- proto: SquareButton,
49
+ extend: SquareButton,
50
50
  props: { round: 'C' }
51
51
  }
52
52
 
@@ -54,6 +54,6 @@ export const KangorooButton = {
54
54
  tag: 'button',
55
55
  props: { style },
56
56
 
57
- iconText: { proto: IconText },
58
- child: { proto: IconText }
57
+ iconText: { extend: IconText },
58
+ child: { extend: IconText }
59
59
  }
package/src/ButtonSet.js CHANGED
@@ -5,6 +5,6 @@ import { Flex } from './Flex'
5
5
 
6
6
  export const ButtonSet = {
7
7
  tag: 'nav',
8
- proto: Flex,
9
- childProto: SquareButton
8
+ extend: Flex,
9
+ childExtend: SquareButton
10
10
  }
@@ -15,7 +15,7 @@ export const DatePicker = {
15
15
  },
16
16
 
17
17
  aside: {
18
- childProto: { tag: 'button' },
18
+ childExtend: { tag: 'button' },
19
19
  ...[
20
20
  { text: '2020' },
21
21
  { text: '2021' },
@@ -32,11 +32,11 @@ export const DatePicker = {
32
32
  main: {
33
33
  header: {
34
34
  icon: {
35
- proto: Icon,
35
+ extend: Icon,
36
36
  props: { icon: 'arrowMediumLeft' }
37
37
  },
38
38
  month: {
39
- childProto: { tag: 'span' },
39
+ childExtend: { tag: 'span' },
40
40
  ...[
41
41
  { text: 'january' },
42
42
  { text: 'february' },
@@ -53,14 +53,14 @@ export const DatePicker = {
53
53
  ]
54
54
  },
55
55
  icon2: {
56
- proto: Icon,
56
+ extend: Icon,
57
57
  props: { icon: 'arrowMediumRight' }
58
58
  }
59
59
  },
60
60
  days: {
61
61
  tag: 'section',
62
62
  header: {
63
- childProto: { tag: 'span' },
63
+ childExtend: { tag: 'span' },
64
64
  ...[
65
65
  { text: 'Mo' },
66
66
  { text: 'Tu' },
@@ -72,7 +72,7 @@ export const DatePicker = {
72
72
  ]
73
73
  },
74
74
  content: {
75
- childProto: { tag: 'button' },
75
+ childExtend: { tag: 'button' },
76
76
  ...[
77
77
  { text: '1' },
78
78
  { text: '2' },
@@ -6,15 +6,15 @@ export const DropdownList = {
6
6
  style: styleDropDown,
7
7
  tag: 'ul',
8
8
 
9
- proto: Shape,
9
+ extend: Shape,
10
10
 
11
11
  state: {
12
12
  active: 0
13
13
  },
14
14
 
15
- childProto: {
15
+ childExtend: {
16
16
  tag: 'li',
17
- proto: [Shape],
17
+ extend: [Shape],
18
18
 
19
19
  style: styleRow,
20
20
  props: (el, s) => ({
@@ -24,7 +24,7 @@ export const DropdownList = {
24
24
  }),
25
25
 
26
26
  span: {
27
- proto: [IconText],
27
+ extend: [IconText],
28
28
  props: {
29
29
  icon: 'checkmark',
30
30
  text: ''
package/src/Field.js CHANGED
@@ -3,7 +3,7 @@
3
3
  import { IconText, Input } from '.'
4
4
 
5
5
  export const Field = {
6
- proto: IconText,
6
+ extend: IconText,
7
7
  props: (el, s) => ({
8
8
  value: s[el.key],
9
9
 
@@ -36,5 +36,5 @@ export const Field = {
36
36
  }
37
37
  }),
38
38
 
39
- input: { proto: Input }
39
+ input: { extend: Input }
40
40
  }
package/src/Grid.js CHANGED
@@ -1,6 +1,6 @@
1
1
  'use strict'
2
2
 
3
- import { mapBasedOnRatio } from './Block'
3
+ import { getSpacingBasedOnRatio } from './Block'
4
4
 
5
5
  export const Grid = {
6
6
  props: { display: 'grid' },
@@ -11,7 +11,7 @@ export const Grid = {
11
11
  area: ({ props }) => props.area ? ({ gridArea: props.area }) : null,
12
12
  template: ({ props }) => props.template ? ({ gridTemplate: props.template }) : null,
13
13
  templateAreas: ({ props }) => props.templateAreas ? ({ gridTemplateAreas: props.templateAreas }) : null,
14
- columnGap: ({ props }) => props.columnGap ? mapBasedOnRatio(props, 'columnGap') : null,
15
- rowGap: ({ props }) => props.rowGap ? mapBasedOnRatio(props, 'rowGap') : null
14
+ columnGap: ({ props }) => props.columnGap ? getSpacingBasedOnRatio(props, 'columnGap') : null,
15
+ rowGap: ({ props }) => props.rowGap ? getSpacingBasedOnRatio(props, 'rowGap') : null
16
16
  }
17
17
  }
@@ -5,7 +5,7 @@ import { Button, Link } from '..'
5
5
  import { styleGrid, styleGrid2 } from './style'
6
6
 
7
7
  const componentLink = {
8
- proto: Link,
8
+ extend: Link,
9
9
  attr: {
10
10
  href: '#'
11
11
  }
package/src/Icon.js CHANGED
@@ -5,7 +5,7 @@ import { SVG } from '.'
5
5
  import { ICONS } from '@symbo.ls/scratch'
6
6
 
7
7
  export const Icon = {
8
- proto: SVG,
8
+ extend: SVG,
9
9
  props: ({ key, props, parent }) => {
10
10
  let iconName = props.inheritedString || props.name || props.icon || key
11
11
 
package/src/IconText.js CHANGED
@@ -3,7 +3,7 @@
3
3
  import { Flex, Icon } from '.'
4
4
 
5
5
  export const IconText = {
6
- proto: Flex,
6
+ extend: Flex,
7
7
 
8
8
  props: {
9
9
  align: 'center center',
@@ -11,7 +11,7 @@ export const IconText = {
11
11
  },
12
12
 
13
13
  icon: {
14
- proto: Icon,
14
+ extend: Icon,
15
15
  if: ({ parent }) => parent.props.icon,
16
16
  props: 'match'
17
17
  },
package/src/Label.js CHANGED
@@ -4,7 +4,7 @@ import { Shape } from './Shape'
4
4
  import { Text } from './Text'
5
5
 
6
6
  export const Label = {
7
- proto: [Shape, Block, Text],
7
+ extend: [Shape, Block, Text],
8
8
 
9
9
  style: { lineHeight: 1 },
10
10
 
@@ -4,9 +4,9 @@ import { Shape, Block, IconText, Direction, Flex, Text } from '.'
4
4
 
5
5
  export const Notification = {
6
6
  style: { cursor: 'pointer' },
7
- proto: [Shape, Block, Direction, Flex],
7
+ extend: [Shape, Block, Direction, Flex],
8
8
  icon: {
9
- proto: [IconText],
9
+ extend: [IconText],
10
10
  props: {
11
11
  icon: 'info'
12
12
  },
@@ -16,17 +16,15 @@ export const Notification = {
16
16
  }
17
17
  },
18
18
  article: {
19
- proto: [Flex],
19
+ extend: [Flex],
20
20
  style: {
21
21
  flexDirection: 'column',
22
22
  alignItems: 'flex-start'
23
23
  },
24
24
  caption: {
25
- proto: Text,
26
25
  text: 'Notification'
27
26
  },
28
27
  p: {
29
- proto: Text,
30
28
  props: {
31
29
  fontSize: 'Z',
32
30
  text: 'is not always a distraction'
package/src/Pills.js CHANGED
@@ -15,7 +15,7 @@ export const Pills = {
15
15
  'div:nth-child(2)': { opacity: '.3' },
16
16
  'div:nth-child(3)': { opacity: '.3' }
17
17
  },
18
- childProto: {
18
+ childExtend: {
19
19
  tag: 'div',
20
20
  props: {
21
21
  round: 42,
package/src/Position.js CHANGED
@@ -1,6 +1,6 @@
1
1
  'use strict'
2
2
 
3
- import { mapSpacing } from '@symbo.ls/scratch'
3
+ import { getSpacingByKey } from '@symbo.ls/scratch'
4
4
 
5
5
  export const Position = {
6
6
  props: {},
@@ -10,12 +10,12 @@ export const Position = {
10
10
  inset: ({ props }) => {
11
11
  const { inset } = props
12
12
  if (typeof inset !== 'string') return
13
- return { inset: inset.split(' ').map(v => mapSpacing(v,'k').k).join(' ') }
13
+ return { inset: inset.split(' ').map(v => getSpacingByKey(v,'k').k).join(' ') }
14
14
  },
15
15
 
16
- left: ({ props }) => mapSpacing(props.left, 'left'),
17
- top: ({ props }) => mapSpacing(props.top, 'top'),
18
- right: ({ props }) => mapSpacing(props.right, 'right'),
19
- bottom: ({ props }) => mapSpacing(props.bottom, 'bottom')
16
+ left: ({ props }) => getSpacingByKey(props.left, 'left'),
17
+ top: ({ props }) => getSpacingByKey(props.top, 'top'),
18
+ right: ({ props }) => getSpacingByKey(props.right, 'right'),
19
+ bottom: ({ props }) => getSpacingByKey(props.bottom, 'bottom')
20
20
  }
21
21
  }
package/src/Select.js CHANGED
@@ -12,7 +12,7 @@ export const Select = {
12
12
  }
13
13
  },
14
14
 
15
- childProto: {
15
+ childExtend: {
16
16
  tag: 'option',
17
17
  props: {
18
18
  value: '',
package/src/Sidebar.js CHANGED
@@ -3,10 +3,10 @@
3
3
  import { Icon, Link } from '.'
4
4
 
5
5
  const MenuItem = {
6
- proto: Link,
6
+ extend: Link,
7
7
  props: { icon: '' },
8
8
  glyph: {
9
- proto: Icon,
9
+ extend: Icon,
10
10
  name: ({ props }) => props.icon
11
11
  }
12
12
  }
@@ -17,7 +17,7 @@ export const Sidebar = {
17
17
  style: {
18
18
  a: { cursor: 'pointer' }
19
19
  },
20
- childProto: MenuItem,
20
+ childExtend: MenuItem,
21
21
  ...[{}]
22
22
  }
23
23
  }
@@ -65,7 +65,7 @@ const listenProp = (el, prop, def) => {
65
65
 
66
66
  export const Slider = {
67
67
  minus: {
68
- proto: SquareButton,
68
+ extend: SquareButton,
69
69
  props: { icon: 'minus' },
70
70
  on: {
71
71
  click: (ev, el, s) => {
@@ -87,7 +87,7 @@ export const Slider = {
87
87
  }
88
88
  },
89
89
  input: {
90
- proto: RangeSlider,
90
+ extend: RangeSlider,
91
91
  attr: {
92
92
  value: (el, s) => listenProp(el, 'value', 50),
93
93
  min: (el, s) => listenProp(el, 'min', 0),
@@ -100,7 +100,7 @@ export const Slider = {
100
100
  }
101
101
  },
102
102
  plus: {
103
- proto: SquareButton,
103
+ extend: SquareButton,
104
104
  props: { icon: 'plus' },
105
105
  on: {
106
106
  click: (ev, el, s) => {
package/src/Text.js CHANGED
@@ -1,6 +1,6 @@
1
1
  'use strict'
2
2
 
3
- import { mapFontSize, getFontFamily, FONT_FAMILY } from '@symbo.ls/scratch'
3
+ import { getFontSizeByKey, getFontFamily } from '@symbo.ls/scratch'
4
4
 
5
5
  export const Text = {
6
6
  props: {},
@@ -8,10 +8,10 @@ export const Text = {
8
8
  text: ({ props }) => props.text,
9
9
 
10
10
  class: {
11
- fontSize: ({ props }) => props.fontSize ? mapFontSize(props.fontSize) : null,
12
- fontFamily: ({ props }) => props.fontFamily && ({ fontFamily: getFontFamily(FONT_FAMILY, props.fontFamily) || props.fontFamily }),
11
+ fontSize: ({ props }) => props.fontSize ? getFontSizeByKey(props.fontSize) : null,
12
+ fontFamily: ({ props }) => props.fontFamily && ({ fontFamily: getFontFamily(props.fontFamily) || props.fontFamily }),
13
13
  lineHeight: ({ props }) => props.lineHeight && ({ lineHeight: props.lineHeight }),
14
- // lineHeight: ({ props }) => props.lineHeight && mapBasedOnRatio(props, 'lineHeight', null, ''),
14
+ // lineHeight: ({ props }) => props.lineHeight && getSpacingBasedOnRatio(props, 'lineHeight', null, ''),
15
15
  textDecoration: ({ props }) => props.textDecoration && ({ textDecoration: props.textDecoration }),
16
16
  textTransform: ({ props }) => props.textTransform && ({ textTransform: props.textTransform }),
17
17
  whiteSpace: ({ props }) => props.whiteSpace && ({ whiteSpace: props.whiteSpace }),
package/src/Theme.js CHANGED
@@ -1,7 +1,7 @@
1
1
  'use strict'
2
2
 
3
3
  import { isArray, isObject } from '@domql/utils'
4
- import { mapSpacing, getTheme, getColor } from '@symbo.ls/scratch'
4
+ import { getSpacingByKey, getTheme, getColor } from '@symbo.ls/scratch'
5
5
 
6
6
  import { depth } from './Shape/style'
7
7
 
@@ -33,15 +33,15 @@ const transformShadow = shadow => ({
33
33
 
34
34
  const arr = v.split(' ')
35
35
  if (!arr.length) return v
36
- return arr.map(v => mapSpacing(v, 'shadow').shadow).join(' ')
36
+ return arr.map(v => getSpacingByKey(v, 'shadow').shadow).join(' ')
37
37
  }).join(' ')
38
38
  })
39
39
 
40
40
  export const Theme = {
41
41
  class: {
42
42
  depth: ({ props }) => depth[props.depth],
43
- round: ({ props, key, ...el }) => props.round ? (mapSpacing(props.round, 'borderRadius') || ({ borderRadius: props.round })) : null,
44
- borderRadius: ({ props, key, ...el }) => props.borderRadius ? (mapSpacing(props.borderRadius, 'borderRadius') || ({ borderRadius: props.borderRadius })) : null,
43
+ round: ({ props, key, ...el }) => props.round ? (getSpacingByKey(props.round, 'borderRadius') || ({ borderRadius: props.round })) : null,
44
+ borderRadius: ({ props, key, ...el }) => props.borderRadius ? (getSpacingByKey(props.borderRadius, 'borderRadius') || ({ borderRadius: props.borderRadius })) : null,
45
45
 
46
46
  theme: ({ props, key }) => {
47
47
  if (!props.theme) return
@@ -6,7 +6,7 @@ import style from './style'
6
6
 
7
7
  export const Tooltip = {
8
8
  style,
9
- proto: Shape,
9
+ extend: Shape,
10
10
  props: { theme: 'purple2' },
11
11
  caption: 'And tooltip is coming',
12
12
  span: 'and winter too'
package/src/Transition.js CHANGED
@@ -1,6 +1,6 @@
1
1
  'use strict'
2
2
 
3
- import { mapTiming } from '@symbo.ls/scratch'
3
+ import { getTimingByKey } from '@symbo.ls/scratch'
4
4
 
5
5
  const transformTransition = transition => {
6
6
  const arr = transition.split(' ')
@@ -9,7 +9,7 @@ const transformTransition = transition => {
9
9
 
10
10
  return arr.map(v => {
11
11
  if (v.length < 3 || v.includes('ms')) {
12
- const mapWithSequence = mapTiming(v)
12
+ const mapWithSequence = getTimingByKey(v)
13
13
  return mapWithSequence.duration
14
14
  }
15
15
  return v
package/src/User/index.js CHANGED
@@ -4,7 +4,7 @@ import { Shape, Block } from '..'
4
4
  import { styleUser, styleUserBundle } from './style'
5
5
 
6
6
  export const User = {
7
- proto: [Shape, Block],
7
+ extend: [Shape, Block],
8
8
  props: { boxSize: 'B B' },
9
9
  style: styleUser,
10
10
  tag: 'img',
@@ -16,7 +16,7 @@ export const User = {
16
16
  export const UserBundle = {
17
17
  style: styleUserBundle,
18
18
  users: {
19
- childProto: User,
19
+ childExtend: User,
20
20
  ...[{}]
21
21
  },
22
22
  span: 'join classroom'