@symbo.ls/create 2.10.38 → 2.10.41

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
@@ -13,6 +13,7 @@ import { fetchProject } from '@symbo.ls/fetch'
13
13
 
14
14
  import { emotion as defaultEmotion, createEmotion } from '@symbo.ls/emotion'
15
15
  import { defaultDefine } from './define'
16
+ import { appendIconsSVGSprite } from '@symbo.ls/scratch'
16
17
 
17
18
  const { SYMBOLS_KEY } = process.env
18
19
 
@@ -24,7 +25,10 @@ const defaultOptions = {
24
25
  pages: {},
25
26
  system: {
26
27
  useReset: true,
27
- useVariable: true
28
+ useVariable: true,
29
+ useIconSprite: true,
30
+ useSvgSprite: true,
31
+ useFontImport: true
28
32
  },
29
33
  components: {},
30
34
  initOptions: {
@@ -46,15 +50,18 @@ export const create = async (App, options = defaultOptions) => {
46
50
  }
47
51
  }
48
52
 
49
- const emotion = defaultEmotion || createEmotion()
50
- const initOptions = options.initOptions || { emotion }
53
+ const initOptions = options.initOptions || {}
54
+ const emotion = initOptions.emotion || defaultEmotion || createEmotion()
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: 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.41",
4
4
  "license": "MIT",
5
- "gitHead": "d37db9c4535473bd491cf59beaf4877aac944b74",
5
+ "gitHead": "fe191d138564726ccb26fb5a6643c4d78709f0d3",
6
6
  "source": "index.js",
7
7
  "main": "index.js",
8
8
  "dependencies": {