@symbo.ls/create 2.10.210 → 2.10.225

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.210",
3
+ "version": "2.10.225",
4
4
  "license": "MIT",
5
- "gitHead": "364bd3909a9e03a42e837ab05d6421dfcc83304b",
5
+ "gitHead": "ab9664d8dfad6716978095254e3e3526f8cad696",
6
6
  "source": "index.js",
7
7
  "main": "index.js",
8
8
  "dependencies": {
package/router.js CHANGED
@@ -41,7 +41,11 @@ export const popStateRouter = (root, options) => {
41
41
  const routerOptions = options.routerOptions || DEFAULT_ROUTING_OPTIONS
42
42
  if (!routerOptions.popState) return
43
43
  const router = options.snippets && options.snippets.router || defaultRouter
44
- window.onpopstate = e => router(root, window.location.pathname, {}, 0, false)
44
+ console.log(router)
45
+ // window.onpopstate = e => router(root, window.location.pathname, {}, 0, false)
46
+ window.onpopstate = e => router(root, window.location.pathname, {
47
+ pushState: false, level: 0
48
+ })
45
49
  }
46
50
 
47
51
  export const injectRouterInLinkComponent = (routerOptions) => {
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'