@symbo.ls/scratch 0.3.24 → 0.3.27

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.3.24",
5
+ "version": "0.3.27",
6
6
  "files": [
7
7
  "src"
8
8
  ],
package/src/factory.js CHANGED
@@ -3,4 +3,4 @@
3
3
  import * as CONFIG from './config'
4
4
 
5
5
  export const CSS_VARS = {}
6
- export default CONFIG
6
+ export { CONFIG }
package/src/index.js CHANGED
@@ -1,11 +1,7 @@
1
1
  'use strict'
2
2
 
3
- import CONFIG from './factory'
4
-
5
3
  export * from './factory'
6
4
  export * from './utils'
7
5
  export * from './set'
8
6
  export * from './config'
9
7
  export * from './reset'
10
-
11
- export { CONFIG }
package/src/set.js CHANGED
@@ -1,7 +1,7 @@
1
1
  'use strict'
2
2
 
3
3
  import { applyDocument, applySpacingSequence, applyTimingSequence, applyTypographySequence } from './config'
4
- import CONFIG, { CSS_VARS } from './factory'
4
+ import { CONFIG, CSS_VARS } from './factory'
5
5
  import { applyReset } from './reset'
6
6
  import { setColor, setGradient, setFont, setFontFamily, setTheme } from './system'
7
7
  import {
@@ -1,6 +1,6 @@
1
1
  'use strict'
2
2
 
3
- import CONFIG, { CSS_VARS } from '../factory' // eslint-disable-line
3
+ import { CONFIG, CSS_VARS } from '../factory' // eslint-disable-line
4
4
 
5
5
  import {
6
6
  isArray,
@@ -1,6 +1,6 @@
1
1
  'use strict'
2
2
 
3
- import CONFIG, { CSS_VARS } from '../factory' // eslint-disable-line
3
+ import { CONFIG, CSS_VARS } from '../factory' // eslint-disable-line
4
4
 
5
5
  import {
6
6
  getDefaultOrFirstKey,
@@ -1,7 +1,7 @@
1
1
  'use strict'
2
2
 
3
3
  import { getColor } from './color'
4
- import CONFIG, { CSS_VARS } from '../factory' // eslint-disable-line
4
+ import { CONFIG, CSS_VARS } from '../factory' // eslint-disable-line
5
5
 
6
6
  import {
7
7
  isObject,
package/src/utils/font.js CHANGED
@@ -9,6 +9,8 @@ export const getDefaultOrFirstKey = (LIBRARY, key) => {
9
9
 
10
10
  export const getFontFormat = url => url.split(/[#?]/)[0].split('.').pop().trim()
11
11
 
12
+ export const setInCustomFontMedia = str => `@font-face { ${str} }`
13
+
12
14
  export const setCustomFont = (name, weight, url) => `
13
15
  font-family: '${name}';
14
16
  font-style: normal;
@@ -28,13 +30,16 @@ export const getFontFaceEach = (name, weightsObject) => {
28
30
  })
29
31
  }
30
32
 
31
- export const getFontFaceEachString = (name, weightsObject) => {
32
- return getFontFaceEach(name, weightsObject).join('\n')
33
- }
34
-
35
33
  export const getFontFace = LIBRARY => {
36
34
  const keys = Object.keys(LIBRARY)
37
35
  return keys.map(key => getFontFaceEach(key, LIBRARY[key].value))
38
36
  }
39
37
 
40
- export const getFontFaceString = LIBRARY => getFontFace(LIBRARY).join('\n')
38
+ export const getFontFaceEachString = (name, weightsObject) => {
39
+ return getFontFaceEach(name, weightsObject).map(setInCustomFontMedia)
40
+ }
41
+
42
+ export const getFontFaceString = LIBRARY => {
43
+ const keys = Object.keys(LIBRARY)
44
+ return keys.map(key => getFontFaceEachString(key, LIBRARY[key].value))
45
+ }
@@ -24,7 +24,11 @@ export const numToLetterMap = {
24
24
  12: 'M',
25
25
  13: 'N',
26
26
  14: 'O',
27
- 15: 'P'
27
+ 15: 'P',
28
+ 16: 'Q',
29
+ 17: 'R',
30
+ 18: 'S',
31
+ 19: 'T'
28
32
  }
29
33
 
30
34
  const setSequenceValue = ({ key, variable, value, scaling, state, index }) => {