@symbo.ls/init 2.10.20 → 2.10.31

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.
Files changed (2) hide show
  1. package/index.js +9 -9
  2. package/package.json +2 -2
package/index.js CHANGED
@@ -7,7 +7,6 @@ import {
7
7
  } from '@symbo.ls/scratch'
8
8
 
9
9
  import { isObject, deepMerge } from '@domql/utils'
10
- import { initDOMQLEmotion } from 'domql/packages/emotion'
11
10
 
12
11
  import { emotion as defaultEmotion } from '@symbo.ls/emotion'
13
12
  // import { setClassname } from 'css-in-props'
@@ -24,27 +23,28 @@ const prepareInit = (config = CONFIG, RC_FILE) => {
24
23
  const SET_OPTIONS = {
25
24
  emotion: defaultEmotion,
26
25
  useVariable: true,
27
- useReset: true,
28
- initDOMQLDefine: true
26
+ useReset: true
29
27
  }
30
28
 
31
29
  export const init = (config, RC_FILE, options = SET_OPTIONS) => {
32
- if (options.initDOMQLDefine) initDOMQLEmotion(options.emotion, options)
33
-
34
30
  const resultConfig = prepareInit(config, RC_FILE)
35
31
  const emotion = options.emotion || defaultEmotion
36
32
 
37
33
  const conf = set({
38
- verbose: false,
34
+ verbose: options.verbose,
39
35
  useReset: options.useReset,
36
+ useVariable: options.useVariable,
40
37
  ...resultConfig
41
38
  }, { newConfig: options.newConfig })
42
39
 
43
40
  const FontFace = getFontFaceString(conf.FONT)
44
41
 
42
+ const useReset = conf.useReset
43
+ const useVariable = conf.useVariable
44
+
45
45
  emotion.injectGlobal(FontFace)
46
- if (options.useVariable) emotion.injectGlobal({ ':root': conf.CSS_VARS })
47
- if (options.useReset) emotion.injectGlobal(conf.RESET)
46
+ if (useVariable) emotion.injectGlobal({ ':root': conf.CSS_VARS })
47
+ if (useReset) emotion.injectGlobal(conf.RESET)
48
48
 
49
49
  return conf
50
50
  }
@@ -55,7 +55,7 @@ export const updateReset = (config, RC_FILE, options = { emotion: defaultEmotion
55
55
  verbose: false,
56
56
  ...resultConfig
57
57
  })
58
- options.emotion.injectGlobal({ ':root': conf.CSS_VARS })
58
+ options.emotion.injectGlobal({':root': conf.CSS_VARS })
59
59
  options.emotion.injectGlobal(conf.RESET)
60
60
  }
61
61
 
package/package.json CHANGED
@@ -1,8 +1,8 @@
1
1
  {
2
2
  "name": "@symbo.ls/init",
3
- "version": "2.10.20",
3
+ "version": "2.10.31",
4
4
  "license": "MIT",
5
- "gitHead": "2916a041146a954910251d5d73dd5e912858d562",
5
+ "gitHead": "828e14653b4f33040eaf9f42ba4adcc5111feb91",
6
6
  "source": "index.js",
7
7
  "main": "index.js",
8
8
  "targets": {