@symbo.ls/scratch 0.7.1 → 0.7.3
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 +1 -1
- package/src/defaultConfig/timing.js +1 -1
- package/src/system/theme.js +1 -4
- package/src/system/timing.js +3 -1
- package/src/utils/sequence.js +1 -1
- package/src/utils/var.js +2 -2
package/package.json
CHANGED
package/src/system/theme.js
CHANGED
|
@@ -225,16 +225,13 @@ export const getMediaTheme = (val, mod, themeObj) => {
|
|
|
225
225
|
if (isString(val) && val.slice(0, 2) === '--') val = getMediaTheme(val.slice(2))
|
|
226
226
|
|
|
227
227
|
if (!val || !isString(val)) {
|
|
228
|
-
|
|
228
|
+
if ((ENV === 'test' || ENV === 'development') && CONFIG.verbose) console.warn(val, '- theme is not string')
|
|
229
229
|
return
|
|
230
230
|
}
|
|
231
231
|
|
|
232
|
-
// console.group(val)
|
|
233
232
|
const [name, ...modifier] = isArray(val) ? val : val.split(' ')
|
|
234
233
|
let value = CONFIG.THEME[name]
|
|
235
234
|
if (value && (modifier || mod)) value = findModifier(value, modifier.length ? modifier : mod)
|
|
236
|
-
// console.log('finalval', value)
|
|
237
|
-
// console.groupEnd(val)
|
|
238
235
|
return recursiveTheme(value)
|
|
239
236
|
}
|
|
240
237
|
|
package/src/system/timing.js
CHANGED
|
@@ -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
|
-
'
|
|
19
|
+
'timing',
|
|
18
20
|
TIMING
|
|
19
21
|
)
|
package/src/utils/sequence.js
CHANGED
|
@@ -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.
|
|
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 ===
|
|
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]
|