@symbo.ls/create 2.10.17 → 2.10.18
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/define.js +18 -1
- package/index.js +3 -4
- package/package.json +2 -2
package/define.js
CHANGED
|
@@ -3,8 +3,25 @@
|
|
|
3
3
|
import { Collection } from '@symbo.ls/uikit'
|
|
4
4
|
|
|
5
5
|
export const define = {
|
|
6
|
-
__filepath: param => param,
|
|
7
6
|
routes: param => param,
|
|
7
|
+
|
|
8
|
+
$router: (param, el) => {
|
|
9
|
+
if (!param) return
|
|
10
|
+
|
|
11
|
+
const obj = { tag: 'fragment', ...param }
|
|
12
|
+
|
|
13
|
+
const set = () => {
|
|
14
|
+
el.set(obj, { preventDefineUpdate: '$router' })
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
if (el.props.lazyLoad) {
|
|
18
|
+
window.requestAnimationFrame(set)
|
|
19
|
+
} else set()
|
|
20
|
+
|
|
21
|
+
return obj
|
|
22
|
+
},
|
|
23
|
+
|
|
24
|
+
__filepath: param => param,
|
|
8
25
|
__collectionCache: param => param,
|
|
9
26
|
$setCollection: Collection.define.$setCollection,
|
|
10
27
|
__stateCollectionCache: param => param,
|
package/index.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
'use strict'
|
|
2
2
|
|
|
3
3
|
import DOM from 'domql'
|
|
4
|
-
import { isString, overwriteDeep } from '@domql/utils'
|
|
4
|
+
import { isString, overwriteDeep, deepDestringify } from '@domql/utils'
|
|
5
5
|
|
|
6
6
|
import * as smbls from '@symbo.ls/uikit'
|
|
7
7
|
import { init, DYNAMIC_JSON } from '@symbo.ls/init' // eslint-disable-line no-unused-vars
|
|
@@ -31,12 +31,11 @@ export const create = async (App, options = defaultOptions) => {
|
|
|
31
31
|
if (key) {
|
|
32
32
|
if (options.remote) {
|
|
33
33
|
const data = await fetchRemote(key, { endpoint: options.endpoint })
|
|
34
|
-
|
|
34
|
+
const evalData = deepDestringify(data)
|
|
35
|
+
overwriteDeep(evalData, options)
|
|
35
36
|
}
|
|
36
37
|
}
|
|
37
38
|
|
|
38
|
-
console.log(App, options)
|
|
39
|
-
|
|
40
39
|
const components = { ...smbls, ...options.components }
|
|
41
40
|
const designSystem = init(options.system)
|
|
42
41
|
|
package/package.json
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@symbo.ls/create",
|
|
3
|
-
"version": "2.10.
|
|
3
|
+
"version": "2.10.18",
|
|
4
4
|
"license": "MIT",
|
|
5
|
-
"gitHead": "
|
|
5
|
+
"gitHead": "812f51e2eb033542b47c94b7477c95ba295a0f75",
|
|
6
6
|
"source": "index.js",
|
|
7
7
|
"main": "index.js",
|
|
8
8
|
"dependencies": {
|