@symbo.ls/preview 0.0.91 → 0.0.92
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/package.json +1 -1
- package/src/app.js +0 -5
- package/src/index.js +8 -19
- package/src/state.js +0 -20
package/package.json
CHANGED
package/src/app.js
CHANGED
|
@@ -5,7 +5,6 @@ import style from './style'
|
|
|
5
5
|
|
|
6
6
|
import { Flex } from '@symbo.ls/components'
|
|
7
7
|
|
|
8
|
-
import { state } from './state'
|
|
9
8
|
import {
|
|
10
9
|
Init,
|
|
11
10
|
Components,
|
|
@@ -16,8 +15,6 @@ import {
|
|
|
16
15
|
Account
|
|
17
16
|
} from './pages'
|
|
18
17
|
|
|
19
|
-
import { Sync } from './sync' // eslint-disable-line no-unused-vars
|
|
20
|
-
|
|
21
18
|
const SUB_ROUTES = {}
|
|
22
19
|
Object.keys(DesignSystem.routes).map(route => {
|
|
23
20
|
SUB_ROUTES[route] = {
|
|
@@ -35,10 +32,8 @@ const App = {
|
|
|
35
32
|
key: 'app',
|
|
36
33
|
extend: Flex,
|
|
37
34
|
|
|
38
|
-
state,
|
|
39
35
|
props: style,
|
|
40
36
|
|
|
41
|
-
define: { routes: param => param },
|
|
42
37
|
routes: {
|
|
43
38
|
'/init': Init,
|
|
44
39
|
'/account': Account,
|
package/src/index.js
CHANGED
|
@@ -1,31 +1,24 @@
|
|
|
1
1
|
'use strict'
|
|
2
2
|
|
|
3
|
-
import '
|
|
4
|
-
import DOM from 'domql'
|
|
5
|
-
import SYMBOLS_CONF from '@symbo.ls/config'
|
|
3
|
+
import '@symbo.ls/platform-init'
|
|
6
4
|
|
|
7
|
-
import '
|
|
5
|
+
import DOM from 'domql'
|
|
8
6
|
import * as smbls from '@symbo.ls/components'
|
|
9
|
-
import * as components from './components'
|
|
10
7
|
|
|
11
8
|
import App from './app'
|
|
12
|
-
import { DesignSystem, Library } from './pages' // eslint-disable-line
|
|
13
9
|
import { router, lastLevel } from '@domql/router'
|
|
14
|
-
|
|
15
|
-
import { context } from './state'
|
|
16
|
-
import { Sync } from './sync' // eslint-disable-line
|
|
17
|
-
|
|
18
|
-
smbls.init({ verbose: false, ...SYMBOLS_CONF })
|
|
10
|
+
import { platformOptions } from '@symbo.ls/platform-options'
|
|
19
11
|
|
|
20
12
|
DOM.define({
|
|
13
|
+
routes: param => param,
|
|
14
|
+
__filepath: param => param,
|
|
21
15
|
$setCollection: smbls.Collection.define.$setCollection,
|
|
22
16
|
$setStateCollection: smbls.Collection.define.$setStateCollection
|
|
23
17
|
})
|
|
24
18
|
|
|
25
|
-
// export default DOM.create(App, DevFocus, 'app', { TODO: try this
|
|
26
19
|
const app = DOM.create({
|
|
27
|
-
|
|
28
|
-
|
|
20
|
+
extend: App,
|
|
21
|
+
|
|
29
22
|
HeaderOnRouter: {},
|
|
30
23
|
|
|
31
24
|
on: {
|
|
@@ -39,11 +32,7 @@ const app = DOM.create({
|
|
|
39
32
|
smbls.openModal(el.parent, s)
|
|
40
33
|
}
|
|
41
34
|
}
|
|
42
|
-
}, undefined, 'app',
|
|
43
|
-
extend: [smbls.Box],
|
|
44
|
-
components: { ...smbls, ...components },
|
|
45
|
-
context
|
|
46
|
-
})
|
|
35
|
+
}, undefined, 'app', platformOptions)
|
|
47
36
|
|
|
48
37
|
window.onpopstate = e => {
|
|
49
38
|
const { pathname, hash } = window.location
|
package/src/state.js
DELETED
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
'use strict'
|
|
2
|
-
|
|
3
|
-
import SYSTEM from './config'
|
|
4
|
-
import { LIBRARY, COMPONENTS } from '@symbo.ls/preview/.symbols'
|
|
5
|
-
import USR_DATA from '@symbo.ls/temp-db' // eslint-disable-line
|
|
6
|
-
|
|
7
|
-
export const state = {
|
|
8
|
-
globalTheme: 'dark',
|
|
9
|
-
appKey: '4it.symbo.ls'
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
state.SYSTEM = USR_DATA[state.appKey]
|
|
13
|
-
// state.SYSTEM = {}
|
|
14
|
-
state.SYSTEM.COMPONENTS = {}
|
|
15
|
-
|
|
16
|
-
export const context = {
|
|
17
|
-
LIBRARY,
|
|
18
|
-
SYSTEM,
|
|
19
|
-
COMPONENTS
|
|
20
|
-
}
|