@symbo.ls/create 2.10.38 → 2.10.42

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 +16 -7
  2. package/package.json +2 -2
package/index.js CHANGED
@@ -24,7 +24,10 @@ const defaultOptions = {
24
24
  pages: {},
25
25
  system: {
26
26
  useReset: true,
27
- useVariable: true
27
+ useVariable: true,
28
+ useIconSprite: true,
29
+ useSvgSprite: true,
30
+ useFontImport: true
28
31
  },
29
32
  components: {},
30
33
  initOptions: {
@@ -46,15 +49,19 @@ export const create = async (App, options = defaultOptions) => {
46
49
  }
47
50
  }
48
51
 
49
- const emotion = defaultEmotion || createEmotion()
50
- const initOptions = options.initOptions || { emotion }
52
+ const initOptions = options.initOptions || {}
53
+ const emotion = initOptions.emotion || defaultEmotion || createEmotion()
54
+ if (!initOptions.emotion) initOptions.emotion = emotion
51
55
  const emotionDefine = options.registry || transformDOMQLEmotion(initOptions.emotion, options)
52
56
 
57
+ const doc = options.parent || document
58
+
53
59
  const designSystem = init(options.system || {}, null, {
54
60
  key,
61
+ emotion,
55
62
  verbose: options.verbose,
56
- useReset: true,
57
- useVariable: true,
63
+ document: doc,
64
+ ...defaultOptions.system,
58
65
  ...initOptions
59
66
  })
60
67
 
@@ -71,9 +78,11 @@ export const create = async (App, options = defaultOptions) => {
71
78
  utils: { ...utils, ...domqlUtils },
72
79
  define: defaultDefine,
73
80
  registry: emotionDefine,
74
- router: options.router || router
81
+ router: options.router || router,
82
+ emotion,
83
+ document: doc
75
84
  }
76
- }, (options.parent || document).body, key, {
85
+ }, doc.body, key, {
77
86
  extend: [uikit.Box],
78
87
  verbose: options.verbose,
79
88
  ...options.domqlOptions
package/package.json CHANGED
@@ -1,8 +1,8 @@
1
1
  {
2
2
  "name": "@symbo.ls/create",
3
- "version": "2.10.38",
3
+ "version": "2.10.42",
4
4
  "license": "MIT",
5
- "gitHead": "d37db9c4535473bd491cf59beaf4877aac944b74",
5
+ "gitHead": "6d3b7e1e99273510b765357b3668e6f889e28a07",
6
6
  "source": "index.js",
7
7
  "main": "index.js",
8
8
  "dependencies": {