@symbo.ls/create 2.10.188 → 2.10.211

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/index.js CHANGED
@@ -76,4 +76,48 @@ export const create = async (App, options = DEFAULT_CREATE_OPTIONS, optionsExter
76
76
  return domqlApp
77
77
  }
78
78
 
79
+ export const createSync = (App, options = DEFAULT_CREATE_OPTIONS, optionsExternalFile) => {
80
+ const appIsKey = isString(App)
81
+ options = mergeWithLocalFile(options, optionsExternalFile)
82
+
83
+ const key = options.key || SYMBOLS_KEY || (appIsKey ? App : '')
84
+
85
+ if (appIsKey) App = {}
86
+
87
+ const doc = options.parent || options.document || document
88
+ const [scratchSystem, emotion, registry] = initEmotion(key, options)
89
+
90
+ const state = options.state || {}
91
+ const components = options.components ? { ...uikit, ...options.components } : uikit
92
+ const designSystem = scratchSystem || {}
93
+ const snippets = { ...utils, ...(options.snippets || {}) }
94
+ const define = options.define || defaultDefine
95
+
96
+ const extend = applySyncDebug([App], options)
97
+
98
+ const domqlApp = DOM.create({
99
+ extend,
100
+ state,
101
+ context: {
102
+ key,
103
+ components,
104
+ state,
105
+ designSystem,
106
+ snippets,
107
+ utils: snippets,
108
+ define,
109
+ registry,
110
+ emotion,
111
+ document: doc
112
+ }
113
+ }, doc.body, key, {
114
+ //extend: [uikit.Box],
115
+ verbose: options.verbose,
116
+ ...options.domqlOptions
117
+ })
118
+
119
+ return domqlApp
120
+ }
121
+
79
122
  export default create
123
+
package/package.json CHANGED
@@ -1,8 +1,8 @@
1
1
  {
2
2
  "name": "@symbo.ls/create",
3
- "version": "2.10.188",
3
+ "version": "2.10.211",
4
4
  "license": "MIT",
5
- "gitHead": "101a03940d79cdd43dfcfb78c2086f4d13a0142d",
5
+ "gitHead": "75d8f8e2aedb0d9791e7c7fc84990bd42231bbc7",
6
6
  "source": "index.js",
7
7
  "main": "index.js",
8
8
  "dependencies": {
package/router.js CHANGED
@@ -11,7 +11,7 @@ const DEFAULT_ROUTING_OPTIONS = {
11
11
  }
12
12
 
13
13
  export const initRouter = (root, options) => {
14
- const routerOptions = options.routerOptions || DEFAULT_ROUTING_OPTIONS
14
+ let routerOptions = options.routerOptions || DEFAULT_ROUTING_OPTIONS
15
15
 
16
16
  if (routerOptions === false) return
17
17
  if (routerOptions === true) routerOptions = DEFAULT_ROUTING_OPTIONS
package/utilImports.js CHANGED
@@ -1,12 +1,10 @@
1
1
  'use strict'
2
2
 
3
+ export { scratchUtils, scratchSystem, set } from '@symbo.ls/scratch'
4
+
3
5
  export * from '@domql/utils'
4
6
  export * from '@symbo.ls/utils'
5
- export { set } from '@symbo.ls/scratch'
6
- export * from '@symbo.ls/scratch/src/utils'
7
- export * from '@symbo.ls/scratch/src/system'
8
7
  export { init, updateReset } from '@symbo.ls/init'
9
-
10
8
  export * from '@domql/cookie'
11
9
  export * from '@domql/report'
12
10
  export * from '@domql/router'