@symbo.ls/preview 0.0.59 → 0.0.60
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 +3 -1
- package/src/app.js +3 -9
- package/src/components/Banner.js +1 -1
- package/src/components/SlidersWithResponsive.js +3 -1
- package/src/pages/DesignSystem/Dashboard/quickstart.js +3 -2
- package/src/pages/Spaces/index.js +12 -1
- package/src/pages/Typography/index.js +5 -1
- package/src/pages/Typography/state.js +2 -2
- package/src/state.js +3 -3
- package/src/sync.js +31 -0
- package/README.md +0 -19
package/package.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"name": "@symbo.ls/preview",
|
|
3
3
|
"description": "",
|
|
4
4
|
"author": "",
|
|
5
|
-
"version": "0.0.
|
|
5
|
+
"version": "0.0.60",
|
|
6
6
|
"repository": "https://github.com/rackai/editor",
|
|
7
7
|
"main": "src/index.js",
|
|
8
8
|
"scripts": {
|
|
@@ -25,8 +25,10 @@
|
|
|
25
25
|
"dependencies": {
|
|
26
26
|
"@domql/router": "latest",
|
|
27
27
|
"@domql/tags": "latest",
|
|
28
|
+
"@symbo.ls/cli": "^0.6.23",
|
|
28
29
|
"@symbo.ls/components": "latest",
|
|
29
30
|
"@symbo.ls/config": "latest",
|
|
31
|
+
"@symbo.ls/config-default": "^1.0.1",
|
|
30
32
|
"@symbo.ls/icons": "latest",
|
|
31
33
|
"@symbo.ls/init": "^1.1.3",
|
|
32
34
|
"@symbo.ls/scratch": "latest",
|
package/src/app.js
CHANGED
|
@@ -4,11 +4,8 @@ import './config'
|
|
|
4
4
|
|
|
5
5
|
import 'domql/packages/emotion'
|
|
6
6
|
import { router } from '@domql/router'
|
|
7
|
-
import { init } from '@symbo.ls/init'
|
|
8
7
|
import { openModal } from '@symbo.ls/components'
|
|
9
8
|
|
|
10
|
-
// import { send } from '@symbo.ls/socket/client'
|
|
11
|
-
|
|
12
9
|
import { state } from './state'
|
|
13
10
|
import {
|
|
14
11
|
Components,
|
|
@@ -17,6 +14,8 @@ import {
|
|
|
17
14
|
Library
|
|
18
15
|
} from './pages'
|
|
19
16
|
|
|
17
|
+
import { Sync } from './sync'
|
|
18
|
+
|
|
20
19
|
const SUB_ROUTES = {}
|
|
21
20
|
Object.keys(DesignSystem.routes).map(route => {
|
|
22
21
|
SUB_ROUTES[route] = {
|
|
@@ -32,6 +31,7 @@ Object.keys(DesignSystem.routes).map(route => {
|
|
|
32
31
|
|
|
33
32
|
const App = {
|
|
34
33
|
key: 'app',
|
|
34
|
+
extend: [Sync],
|
|
35
35
|
|
|
36
36
|
state,
|
|
37
37
|
|
|
@@ -67,12 +67,6 @@ const App = {
|
|
|
67
67
|
router(element, url, {})
|
|
68
68
|
},
|
|
69
69
|
update: (el, s) => { openModal(el, s) },
|
|
70
|
-
stateUpdated: (el, s, changes) => {
|
|
71
|
-
if (changes.SYSTEM) {
|
|
72
|
-
init(changes.SYSTEM)
|
|
73
|
-
// send(changes.SYSTEM, s.SYSTEM)
|
|
74
|
-
}
|
|
75
|
-
},
|
|
76
70
|
scroll: (ev, el) => {
|
|
77
71
|
const { scrollTop } = el.node
|
|
78
72
|
const isFloating = scrollTop > 0
|
package/src/components/Banner.js
CHANGED
|
@@ -4,18 +4,20 @@ import { Flex } from '@symbo.ls/components'
|
|
|
4
4
|
|
|
5
5
|
export const SlidersWithResponsive = {
|
|
6
6
|
extend: Flex,
|
|
7
|
+
|
|
7
8
|
props: {
|
|
8
9
|
align: 'flex-end space-between',
|
|
9
10
|
position: 'sticky',
|
|
10
11
|
top: 'C2',
|
|
11
12
|
background: 'black .5',
|
|
12
|
-
zIndex: '
|
|
13
|
+
zIndex: '9',
|
|
13
14
|
margin: '-B2 -B -B',
|
|
14
15
|
padding: 'B2 B B',
|
|
15
16
|
style: {
|
|
16
17
|
backdropFilter: 'blur(15px)'
|
|
17
18
|
}
|
|
18
19
|
},
|
|
20
|
+
|
|
19
21
|
SequenceSliders: {},
|
|
20
22
|
DeviceButtonSet: {}
|
|
21
23
|
}
|
|
@@ -17,7 +17,8 @@ export default {
|
|
|
17
17
|
align: 'flex-start space-between',
|
|
18
18
|
childProps: {
|
|
19
19
|
flex: '1',
|
|
20
|
-
maxWidth: '
|
|
20
|
+
maxWidth: 'H'
|
|
21
|
+
// width: '100%'
|
|
21
22
|
}
|
|
22
23
|
},
|
|
23
24
|
|
|
@@ -25,7 +26,7 @@ export default {
|
|
|
25
26
|
extend: 'QuickStartTerminal',
|
|
26
27
|
QuickStartNumber: { width: '.87ch', text: '1' },
|
|
27
28
|
Terminal: {
|
|
28
|
-
command: { text: 'yarn add smbls
|
|
29
|
+
command: { text: 'yarn add smbls' }
|
|
29
30
|
}
|
|
30
31
|
},
|
|
31
32
|
|
|
@@ -16,5 +16,16 @@ export const Spaces = {
|
|
|
16
16
|
|
|
17
17
|
Line: {},
|
|
18
18
|
|
|
19
|
-
sequence
|
|
19
|
+
sequence,
|
|
20
|
+
|
|
21
|
+
init: (el, s) => {
|
|
22
|
+
if (!s.__system.SPACING) {
|
|
23
|
+
s.systemUpdate({
|
|
24
|
+
SPACING: { base: s.base, ratio: s.ratio }
|
|
25
|
+
}, { preventUpdate: true })
|
|
26
|
+
}
|
|
27
|
+
},
|
|
28
|
+
stateUpdated: (el, s, changes) => {
|
|
29
|
+
s.systemUpdate({ SPACING: changes }, { preventUpdate: true })
|
|
30
|
+
}
|
|
20
31
|
}
|
|
@@ -30,10 +30,14 @@ export const Typography = {
|
|
|
30
30
|
|
|
31
31
|
on: {
|
|
32
32
|
init: (el, s) => {
|
|
33
|
+
if (!s.__system.TYPOGRAPHY) {
|
|
34
|
+
s.systemUpdate({
|
|
35
|
+
TYPOGRAPHY: { base: s.base, ratio: s.ratio }
|
|
36
|
+
})
|
|
37
|
+
}
|
|
33
38
|
mapSequence(s, sortSequence)
|
|
34
39
|
},
|
|
35
40
|
stateUpdated: (el, s, changes) => {
|
|
36
|
-
console.log(changes)
|
|
37
41
|
s.systemUpdate({ TYPOGRAPHY: changes })
|
|
38
42
|
}
|
|
39
43
|
}
|
package/src/state.js
CHANGED
|
@@ -2,15 +2,15 @@
|
|
|
2
2
|
|
|
3
3
|
import SYSTEM from './config'
|
|
4
4
|
import { LIBRARY, COMPONENTS } from '../.symbols'
|
|
5
|
-
import BYLD from '../user_data/byld'
|
|
5
|
+
import BYLD from '../user_data/byld' // eslint-disable-line no-unused-vars
|
|
6
6
|
|
|
7
7
|
export const state = {
|
|
8
8
|
globalTheme: 'dark',
|
|
9
|
-
SYSTEM:
|
|
9
|
+
SYSTEM: {}
|
|
10
10
|
}
|
|
11
11
|
|
|
12
12
|
export const context = {
|
|
13
|
-
CONFIG:
|
|
13
|
+
CONFIG: SYSTEM,
|
|
14
14
|
LIBRARY,
|
|
15
15
|
SYSTEM,
|
|
16
16
|
COMPONENTS
|
package/src/sync.js
ADDED
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
'use strict'
|
|
2
|
+
|
|
3
|
+
// import { init } from '@symbo.ls/init'
|
|
4
|
+
import { connect, send } from '@symbo.ls/socket/client'
|
|
5
|
+
|
|
6
|
+
import CONFIG_DEFAULT from '@symbo.ls/config-default'
|
|
7
|
+
|
|
8
|
+
const receive = (element, state) => {
|
|
9
|
+
return (event, data) => {
|
|
10
|
+
state.update({ SYSTEM: data })
|
|
11
|
+
if (!state.SYSTEM.TYPOGRAPHY) {
|
|
12
|
+
state.update({
|
|
13
|
+
SYSTEM: CONFIG_DEFAULT
|
|
14
|
+
}, { preventUpdate: true })
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
export const Sync = {
|
|
20
|
+
on: {
|
|
21
|
+
init: (el, s) => {
|
|
22
|
+
connect('ws://localhost:1001', receive(el, s))
|
|
23
|
+
},
|
|
24
|
+
stateUpdated: (el, s, changes) => {
|
|
25
|
+
if (changes.SYSTEM) {
|
|
26
|
+
// init(changes.SYSTEM)
|
|
27
|
+
send(changes.SYSTEM, s.SYSTEM)
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
}
|
package/README.md
DELETED
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
# Fucking editor!
|
|
2
|
-
Example dev setup (boilerplate) to use [DOMQL](https://github.com/rackai/domql). You can also check live editor [Playground](https://github.com/rackai/playground).
|
|
3
|
-
|
|
4
|
-
### Setup
|
|
5
|
-
|
|
6
|
-
1. Clone the repo
|
|
7
|
-
```
|
|
8
|
-
git clone git@github.com:symbo-ls/preview.git
|
|
9
|
-
```
|
|
10
|
-
|
|
11
|
-
2. Install scripts
|
|
12
|
-
```
|
|
13
|
-
yarn
|
|
14
|
-
```
|
|
15
|
-
|
|
16
|
-
3. Run the project
|
|
17
|
-
```
|
|
18
|
-
yarn start
|
|
19
|
-
```
|