@symbo.ls/scratch 0.7.1 → 0.7.2

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/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "@symbo.ls/scratch",
3
3
  "description": "Φ / CSS framework and methodology.",
4
4
  "author": "symbo.ls",
5
- "version": "0.7.1",
5
+ "version": "0.7.2",
6
6
  "files": [
7
7
  "src"
8
8
  ],
@@ -5,7 +5,7 @@ import { SEQUENCE } from '.'
5
5
  const defaultProps = {
6
6
  default: 150,
7
7
  base: 150,
8
- type: 'duration',
8
+ type: 'timing',
9
9
  ratio: SEQUENCE['perfect-fourth'],
10
10
  range: [-3, +12],
11
11
  unit: 'ms',
@@ -12,8 +12,10 @@ export const applyTimingSequence = () => {
12
12
  applySequenceVars(TIMING)
13
13
  }
14
14
 
15
+ export const getTimingFunction = value => TIMING[value] || value
16
+
15
17
  export const getTimingByKey = value => getSequenceValuePropertyPair(
16
18
  value,
17
- 'duration',
19
+ 'timing',
18
20
  TIMING
19
21
  )
@@ -158,7 +158,7 @@ export const getSequenceValue = (value = 'A', sequenceProps) => {
158
158
  if (!sequenceItem) return console.warn('can\'t find', sequence, absValue)
159
159
 
160
160
  if (unit === 'ms' || unit === 's') {
161
- return isNegative + sequenceItem.value + unit
161
+ return isNegative + sequenceItem.val + unit
162
162
  }
163
163
 
164
164
  return isNegative + sequenceItem.scaling + unit
package/src/utils/var.js CHANGED
@@ -1,6 +1,6 @@
1
1
  'use strict'
2
2
 
3
- import { MEDIA } from '../defaultConfig'
3
+ import { MEDIA, TIMING } from '../defaultConfig'
4
4
  import { CONFIG, CSS_VARS } from '../factory'
5
5
  import { isObjectLike } from './object'
6
6
 
@@ -26,7 +26,7 @@ export const applySequenceVars = (props, mediaName, options = {}) => {
26
26
 
27
27
  for (const key in sequence) {
28
28
  const item = sequence[key]
29
- const value = (props.type === 'duration' ? sequence[key].val : scales[key]) + unit
29
+ const value = (props.type === TIMING.type ? sequence[key].val : scales[key]) + unit
30
30
 
31
31
  if (mediaName) {
32
32
  const query = MEDIA[mediaName]