@symbo.ls/preview 0.0.59 → 0.0.61
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/assets/shapes.png +0 -0
- package/src/components/Banner.js +2 -2
- package/src/components/DesignComponent.js +78 -0
- package/src/components/FontText.js +11 -9
- package/src/components/SlidersWithResponsive.js +3 -1
- package/src/components/index.js +1 -0
- package/src/pages/Color/FontText.js +4 -2
- package/src/pages/Color/chooseEnvironment.js +132 -0
- package/src/pages/Color/index.js +6 -5
- package/src/pages/DesignSystem/Dashboard/banners.js +7 -6
- package/src/pages/DesignSystem/Dashboard/index.js +2 -2
- package/src/pages/DesignSystem/Dashboard/quickstart.js +43 -16
- package/src/pages/DesignSystem/Dashboard/summary.js +133 -1
- 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 +4 -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.61",
|
|
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
|
|
Binary file
|
package/src/components/Banner.js
CHANGED
|
@@ -8,7 +8,6 @@ export const TutorialBanner = {
|
|
|
8
8
|
props: ({ state }) => ({
|
|
9
9
|
flow: 'column',
|
|
10
10
|
round: 'A',
|
|
11
|
-
flex: '1',
|
|
12
11
|
height: 'F',
|
|
13
12
|
padding: 'A2 B',
|
|
14
13
|
background: 'gray2',
|
|
@@ -17,6 +16,7 @@ export const TutorialBanner = {
|
|
|
17
16
|
overflow: 'hidden',
|
|
18
17
|
position: 'relative',
|
|
19
18
|
color: 'white',
|
|
19
|
+
flex: 1,
|
|
20
20
|
|
|
21
21
|
title: { margin: 'auto 0 0', text: state.title },
|
|
22
22
|
p: { text: state.p },
|
|
@@ -49,7 +49,7 @@ export const TutorialBanner = {
|
|
|
49
49
|
},
|
|
50
50
|
|
|
51
51
|
':hover': {
|
|
52
|
-
padding: '
|
|
52
|
+
padding: '- C1 - -',
|
|
53
53
|
':before': { opacity: '1' },
|
|
54
54
|
':after': { opacity: '1' }
|
|
55
55
|
}
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
'use strict'
|
|
2
|
+
|
|
3
|
+
import { DesignElement, Flex, Grid } from '@symbo.ls/components'
|
|
4
|
+
|
|
5
|
+
const componentHeader = {
|
|
6
|
+
tag: 'header',
|
|
7
|
+
extend: [DesignElement, Flex],
|
|
8
|
+
|
|
9
|
+
props: ({ state }) => ({
|
|
10
|
+
minWidth: '100%',
|
|
11
|
+
padding: 'Z1 - Z1 Z2',
|
|
12
|
+
flow: 'row',
|
|
13
|
+
round: '0',
|
|
14
|
+
alignItems: 'flex-start',
|
|
15
|
+
pointerEvents: 'none',
|
|
16
|
+
background: 'gray2',
|
|
17
|
+
|
|
18
|
+
button: {
|
|
19
|
+
padding: 'Y2',
|
|
20
|
+
icon: state.icon,
|
|
21
|
+
theme: state.iconTheme
|
|
22
|
+
},
|
|
23
|
+
heading: {
|
|
24
|
+
gap: '0',
|
|
25
|
+
title: {
|
|
26
|
+
text: state.title,
|
|
27
|
+
textTransform: 'capitalize'
|
|
28
|
+
},
|
|
29
|
+
p: {
|
|
30
|
+
text: state.paragraph,
|
|
31
|
+
maxWidth: 'F1'
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
})
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
const propertyNumber = {
|
|
38
|
+
extend: Grid,
|
|
39
|
+
props: ({ state }) => ({
|
|
40
|
+
columns: 'repeat(2, 1fr)',
|
|
41
|
+
property: {
|
|
42
|
+
text: state.property,
|
|
43
|
+
color: 'gray6'
|
|
44
|
+
},
|
|
45
|
+
value: {
|
|
46
|
+
text: state.value,
|
|
47
|
+
fontWeight: '500'
|
|
48
|
+
}
|
|
49
|
+
}),
|
|
50
|
+
property: {},
|
|
51
|
+
value: {}
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
const componentProperties = {
|
|
55
|
+
extend: Flex,
|
|
56
|
+
props: {
|
|
57
|
+
padding: 'Z2 A',
|
|
58
|
+
flow: 'column',
|
|
59
|
+
gap: 'Z2',
|
|
60
|
+
background: 'gray1'
|
|
61
|
+
},
|
|
62
|
+
childExtend: propertyNumber,
|
|
63
|
+
$setStateCollection: ({ state }) => state.properties
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
export const DesignComponent = {
|
|
67
|
+
extend: Flex,
|
|
68
|
+
props: {
|
|
69
|
+
flow: 'column',
|
|
70
|
+
maxWidth: 'F2',
|
|
71
|
+
round: 'A',
|
|
72
|
+
height: 'fit-content',
|
|
73
|
+
overflow: 'hidden'
|
|
74
|
+
},
|
|
75
|
+
|
|
76
|
+
componentHeader,
|
|
77
|
+
componentProperties
|
|
78
|
+
}
|
|
@@ -23,7 +23,7 @@ const fontWeights = {
|
|
|
23
23
|
top: '0',
|
|
24
24
|
fontSize: '20px'
|
|
25
25
|
},
|
|
26
|
-
childProps: { fontSize: '
|
|
26
|
+
childProps: { fontSize: 'F2' }
|
|
27
27
|
},
|
|
28
28
|
childExtend: {
|
|
29
29
|
extend: { text: 'A' }
|
|
@@ -39,20 +39,19 @@ const letterTransform = {
|
|
|
39
39
|
extend: Flex,
|
|
40
40
|
props: {
|
|
41
41
|
alignItems: 'center',
|
|
42
|
-
|
|
42
|
+
height: 'fit-content',
|
|
43
43
|
gap: 'X2',
|
|
44
44
|
childProps: {
|
|
45
45
|
minHeight: 'fit-content'
|
|
46
|
-
// border: '2px solid black'
|
|
47
46
|
}
|
|
48
47
|
},
|
|
49
48
|
childExtend: {},
|
|
50
49
|
...[
|
|
51
|
-
{ props: { text: 'a', textTransform: 'uppercase', fontSize: '
|
|
52
|
-
{ props: { text: 'b', fontWeight: '700', fontSize: '
|
|
53
|
-
{ props: { text: 'c', fontWeight: '500', fontSize: '
|
|
54
|
-
{ props: { text: 'd', fontSize: '
|
|
55
|
-
{ props: { text: 'e',
|
|
50
|
+
{ props: { text: 'a', textTransform: 'uppercase', fontSize: 'F2', fontWeight: '700' } },
|
|
51
|
+
{ props: { text: 'b', fontWeight: '700', fontSize: 'F' } },
|
|
52
|
+
{ props: { text: 'c', fontWeight: '500', fontSize: 'D2' } },
|
|
53
|
+
{ props: { text: 'd', fontSize: 'C2' } },
|
|
54
|
+
{ props: { text: 'e', fontSize: 'C' } },
|
|
56
55
|
{ props: { text: 'f', fontSize: 'B' } }
|
|
57
56
|
]
|
|
58
57
|
}
|
|
@@ -64,7 +63,7 @@ const fontStyle = {
|
|
|
64
63
|
},
|
|
65
64
|
childExtend: {
|
|
66
65
|
props: {
|
|
67
|
-
fontSize: '
|
|
66
|
+
fontSize: 'F2',
|
|
68
67
|
textTransform: 'uppercase',
|
|
69
68
|
fontWeight: '300',
|
|
70
69
|
margin: '0',
|
|
@@ -167,14 +166,17 @@ export const FontText = {
|
|
|
167
166
|
props,
|
|
168
167
|
|
|
169
168
|
fontName,
|
|
169
|
+
|
|
170
170
|
content: {
|
|
171
171
|
extend: Flex,
|
|
172
172
|
fonts: {
|
|
173
173
|
extend: Flex,
|
|
174
|
+
|
|
174
175
|
fontWeights,
|
|
175
176
|
letterTransform,
|
|
176
177
|
fontStyle
|
|
177
178
|
},
|
|
179
|
+
|
|
178
180
|
paragraph
|
|
179
181
|
},
|
|
180
182
|
|
|
@@ -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
|
}
|
package/src/components/index.js
CHANGED
|
@@ -1,11 +1,13 @@
|
|
|
1
1
|
'use strict'
|
|
2
2
|
|
|
3
3
|
export const fontText = {
|
|
4
|
+
|
|
4
5
|
HeaderHeading: {
|
|
5
|
-
|
|
6
|
+
props: { margin: '- - D2 -' },
|
|
7
|
+
caption: { text: `Let's make sure` },
|
|
6
8
|
h1: { text: 'Texts look good?' }
|
|
7
9
|
},
|
|
8
10
|
|
|
9
11
|
FontText: {},
|
|
10
|
-
ContinueButton: {}
|
|
12
|
+
ContinueButton: { props: { margin: 'F - - -' } }
|
|
11
13
|
}
|
|
@@ -0,0 +1,132 @@
|
|
|
1
|
+
'use strict'
|
|
2
|
+
|
|
3
|
+
import { Flex, CommonField, WiderButton, Button } from '@symbo.ls/components'
|
|
4
|
+
|
|
5
|
+
import { HeaderHeading } from '../../components'
|
|
6
|
+
|
|
7
|
+
const header = {
|
|
8
|
+
extend: HeaderHeading,
|
|
9
|
+
props: {
|
|
10
|
+
margin: '- - D -',
|
|
11
|
+
caption: { text: 'And finally' },
|
|
12
|
+
h1: {
|
|
13
|
+
text: 'Choose your environment',
|
|
14
|
+
flow: 'row-reverse',
|
|
15
|
+
align: 'center flex-end',
|
|
16
|
+
span: {
|
|
17
|
+
text: 'if any',
|
|
18
|
+
fontWeight: '300',
|
|
19
|
+
opacity: '.85',
|
|
20
|
+
padding: '- - - X'
|
|
21
|
+
},
|
|
22
|
+
span2: {
|
|
23
|
+
text: ',',
|
|
24
|
+
fontWeight: '300',
|
|
25
|
+
opacity: '.85'
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
},
|
|
29
|
+
|
|
30
|
+
caption: {},
|
|
31
|
+
h1: {
|
|
32
|
+
extend: Flex,
|
|
33
|
+
span: {},
|
|
34
|
+
span2: { }
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
const commonField = {
|
|
39
|
+
extend: CommonField,
|
|
40
|
+
props: {
|
|
41
|
+
gap: 'Z2',
|
|
42
|
+
element: {
|
|
43
|
+
gap: 'A',
|
|
44
|
+
maxWidth: 'I',
|
|
45
|
+
alignItems: 'center',
|
|
46
|
+
childProps: {
|
|
47
|
+
// boxSize: 'B2 C',
|
|
48
|
+
// padding: '0',
|
|
49
|
+
background: 'gray2',
|
|
50
|
+
color: 'white .8',
|
|
51
|
+
round: 'Z1'
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
},
|
|
55
|
+
|
|
56
|
+
title: {},
|
|
57
|
+
element: {
|
|
58
|
+
extend: Flex,
|
|
59
|
+
childExtend: {
|
|
60
|
+
extend: WiderButton
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
const yourEnvironment = {
|
|
65
|
+
extend: commonField,
|
|
66
|
+
props: {
|
|
67
|
+
margin: '- - C2 -',
|
|
68
|
+
title: { text: 'Your environment' },
|
|
69
|
+
element: {
|
|
70
|
+
childProps: {}
|
|
71
|
+
}
|
|
72
|
+
},
|
|
73
|
+
|
|
74
|
+
title: {},
|
|
75
|
+
element: {
|
|
76
|
+
...[
|
|
77
|
+
{ props: { icon: 'inputOutline' } },
|
|
78
|
+
{ props: { icon: 'accessibilityOutline' } },
|
|
79
|
+
{
|
|
80
|
+
props: {
|
|
81
|
+
boxSizing: 'content-box',
|
|
82
|
+
padding: 'Z C3',
|
|
83
|
+
border: '2px solid red',
|
|
84
|
+
style: { borderRadius: '50px' },
|
|
85
|
+
span: {
|
|
86
|
+
text: `I'm just playing`,
|
|
87
|
+
fontSize: 'Z'
|
|
88
|
+
}
|
|
89
|
+
},
|
|
90
|
+
icon: null,
|
|
91
|
+
span: {}
|
|
92
|
+
},
|
|
93
|
+
|
|
94
|
+
{
|
|
95
|
+
props: {
|
|
96
|
+
icon: 'inputOutline',
|
|
97
|
+
margin: '- - - auto'
|
|
98
|
+
}
|
|
99
|
+
}
|
|
100
|
+
]
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
const yourFramework = {
|
|
105
|
+
extend: commonField,
|
|
106
|
+
props: {
|
|
107
|
+
margin: '- - F -',
|
|
108
|
+
title: { text: 'Your framework' },
|
|
109
|
+
element: { childProps: { icon: 'info' } }
|
|
110
|
+
},
|
|
111
|
+
title: {},
|
|
112
|
+
element: { ...[{}, {}, {}, {}, {}, {}] }
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
const createSymbolsButton = {
|
|
116
|
+
extend: Button,
|
|
117
|
+
props: {
|
|
118
|
+
text: 'create symbols',
|
|
119
|
+
fontSize: 'Z2',
|
|
120
|
+
padding: 'Z1 C',
|
|
121
|
+
textTransform: 'capitalize',
|
|
122
|
+
round: 'C',
|
|
123
|
+
theme: 'primary'
|
|
124
|
+
}
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
export const chooseEnvironment = {
|
|
128
|
+
header,
|
|
129
|
+
yourEnvironment,
|
|
130
|
+
yourFramework,
|
|
131
|
+
createSymbolsButton
|
|
132
|
+
}
|
package/src/pages/Color/index.js
CHANGED
|
@@ -6,10 +6,10 @@ import globalThemes from './globalThemes'
|
|
|
6
6
|
import palette from './palette'
|
|
7
7
|
import themes from './themes'
|
|
8
8
|
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
9
|
+
import { themeLightDark } from './themeLightDark'
|
|
10
|
+
import { CreatePallete } from './CreatePalette'
|
|
11
|
+
import { fontText } from './FontText'
|
|
12
|
+
import { chooseEnvironment } from './chooseEnvironment'
|
|
13
13
|
|
|
14
14
|
export const Color = {
|
|
15
15
|
key: 'colors',
|
|
@@ -21,7 +21,8 @@ export const Color = {
|
|
|
21
21
|
|
|
22
22
|
// createPallete: CreatePallete,
|
|
23
23
|
// themeLightDark,
|
|
24
|
-
// fontText
|
|
24
|
+
// fontText,
|
|
25
|
+
// chooseEnvironment,
|
|
25
26
|
|
|
26
27
|
globalThemes,
|
|
27
28
|
line: { extend: Line },
|
|
@@ -6,6 +6,7 @@ import { TutorialBanner } from '../../../components'
|
|
|
6
6
|
import DARK_PNG from '../../../assets/dark.png'
|
|
7
7
|
import TYPE_PNG from '../../../assets/type.png'
|
|
8
8
|
import SPACE_PNG from '../../../assets/space.png'
|
|
9
|
+
import SHAPES_PNG from '../../../assets/shapes.png'
|
|
9
10
|
|
|
10
11
|
export default {
|
|
11
12
|
extend: Flex,
|
|
@@ -20,18 +21,18 @@ export default {
|
|
|
20
21
|
|
|
21
22
|
$setStateCollection: ({ state }) => [{
|
|
22
23
|
title: 'Setting up a dark theme',
|
|
23
|
-
p: '
|
|
24
|
+
p: '15 sec tutorial',
|
|
24
25
|
background: DARK_PNG,
|
|
25
26
|
href: ''
|
|
26
27
|
}, {
|
|
27
|
-
title: '
|
|
28
|
-
p: '
|
|
28
|
+
title: 'How to composite',
|
|
29
|
+
p: '3 mins tutorial',
|
|
29
30
|
background: TYPE_PNG,
|
|
30
31
|
href: ''
|
|
31
32
|
}, {
|
|
32
|
-
title: '
|
|
33
|
-
p: '
|
|
34
|
-
background:
|
|
33
|
+
title: 'Master Shapes',
|
|
34
|
+
p: '45 sec tutorial',
|
|
35
|
+
background: SHAPES_PNG,
|
|
35
36
|
href: ''
|
|
36
37
|
}]
|
|
37
38
|
}
|
|
@@ -1,5 +1,21 @@
|
|
|
1
1
|
'use strict'
|
|
2
2
|
|
|
3
|
+
const startElementProps = {
|
|
4
|
+
position: 'relative',
|
|
5
|
+
maxWidth: 'G',
|
|
6
|
+
width: '100%',
|
|
7
|
+
note: {
|
|
8
|
+
fontSize: 'Z1',
|
|
9
|
+
color: 'gray6',
|
|
10
|
+
position: 'absolute',
|
|
11
|
+
maxWidth: '100%',
|
|
12
|
+
whiteSpace: 'initial',
|
|
13
|
+
top: '115%',
|
|
14
|
+
left: 'Z',
|
|
15
|
+
fontFamily: 'smbls'
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
|
|
3
19
|
export default {
|
|
4
20
|
props: {
|
|
5
21
|
margin: 'C1 - E1'
|
|
@@ -17,7 +33,9 @@ export default {
|
|
|
17
33
|
align: 'flex-start space-between',
|
|
18
34
|
childProps: {
|
|
19
35
|
flex: '1',
|
|
20
|
-
|
|
36
|
+
|
|
37
|
+
Terminal: startElementProps,
|
|
38
|
+
Code: startElementProps
|
|
21
39
|
}
|
|
22
40
|
},
|
|
23
41
|
|
|
@@ -25,21 +43,20 @@ export default {
|
|
|
25
43
|
extend: 'QuickStartTerminal',
|
|
26
44
|
QuickStartNumber: { width: '.87ch', text: '1' },
|
|
27
45
|
Terminal: {
|
|
28
|
-
|
|
46
|
+
note: { text: 'Install Symbols to your project' },
|
|
47
|
+
props: {
|
|
48
|
+
command: { text: 'npm i smbls -g' }
|
|
49
|
+
}
|
|
29
50
|
}
|
|
30
51
|
},
|
|
31
52
|
|
|
32
53
|
step2: {
|
|
33
|
-
extend: '
|
|
54
|
+
extend: 'QuickStartTerminal',
|
|
34
55
|
QuickStartNumber: { text: '2' },
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
<SymbolsProvider config={{ color… }} />`,
|
|
40
|
-
domql: `import { init } from 'smbls'
|
|
41
|
-
init({ color, theme, typography… })`
|
|
42
|
-
}
|
|
56
|
+
Terminal: {
|
|
57
|
+
note: { text: 'Login to Symbols from command line' },
|
|
58
|
+
props: {
|
|
59
|
+
command: { text: 'smbls login' }
|
|
43
60
|
}
|
|
44
61
|
}
|
|
45
62
|
},
|
|
@@ -48,14 +65,24 @@ init({ color, theme, typography… })`
|
|
|
48
65
|
extend: 'QuickStartCode',
|
|
49
66
|
QuickStartNumber: { text: '3' },
|
|
50
67
|
Code: {
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
domql: `{ props: { color: 'primary' } }`
|
|
68
|
+
note: { text: 'Create .symbolsrc.js file in your project and insert your Symbols key' },
|
|
69
|
+
props: {
|
|
70
|
+
code: {
|
|
71
|
+
text: '{ "key": "key.symbo.ls" }'
|
|
56
72
|
}
|
|
57
73
|
}
|
|
58
74
|
}
|
|
75
|
+
},
|
|
76
|
+
|
|
77
|
+
step4: {
|
|
78
|
+
extend: 'QuickStartTerminal',
|
|
79
|
+
QuickStartNumber: { text: '4' },
|
|
80
|
+
Terminal: {
|
|
81
|
+
note: { text: 'Sync live changes' },
|
|
82
|
+
props: {
|
|
83
|
+
command: { text: 'smbls sync' }
|
|
84
|
+
}
|
|
85
|
+
}
|
|
59
86
|
}
|
|
60
87
|
}
|
|
61
88
|
}
|
|
@@ -1,9 +1,141 @@
|
|
|
1
1
|
'use strict'
|
|
2
|
+
import { Grid } from '@symbo.ls/components'
|
|
3
|
+
|
|
4
|
+
import { DesignComponent } from '../../../components'
|
|
5
|
+
|
|
6
|
+
const DESIGN_SYSTEM_ITEMS = [{
|
|
7
|
+
icon: 'colorOutline',
|
|
8
|
+
iconTheme: 'theme',
|
|
9
|
+
title: 'colors',
|
|
10
|
+
paragraph: 'Colorize styles manually',
|
|
11
|
+
iconBackground: 'red',
|
|
12
|
+
properties: [{
|
|
13
|
+
property: 'Colors',
|
|
14
|
+
value: '35'
|
|
15
|
+
}, {
|
|
16
|
+
property: 'Themes',
|
|
17
|
+
value: '15'
|
|
18
|
+
}]
|
|
19
|
+
}, {
|
|
20
|
+
icon: 'typographyOutline',
|
|
21
|
+
iconTheme: 'typography',
|
|
22
|
+
title: 'typography',
|
|
23
|
+
paragraph: 'style a typed material',
|
|
24
|
+
properties: [{
|
|
25
|
+
property: 'Base size',
|
|
26
|
+
value: '16px'
|
|
27
|
+
}, {
|
|
28
|
+
property: 'Ratio',
|
|
29
|
+
value: '1.2'
|
|
30
|
+
}, {
|
|
31
|
+
property: 'Style',
|
|
32
|
+
value: '8'
|
|
33
|
+
}, {
|
|
34
|
+
property: 'Fonts',
|
|
35
|
+
value: '2'
|
|
36
|
+
}, {
|
|
37
|
+
property: 'Breakpoints',
|
|
38
|
+
value: '3'
|
|
39
|
+
}]
|
|
40
|
+
}, {
|
|
41
|
+
icon: 'spaceOutline',
|
|
42
|
+
iconTheme: 'space',
|
|
43
|
+
title: 'Spacing',
|
|
44
|
+
paragraph: 'Manage properties of a size',
|
|
45
|
+
properties: [{
|
|
46
|
+
property: 'Ratio',
|
|
47
|
+
value: '1.618'
|
|
48
|
+
}, {
|
|
49
|
+
property: 'Style',
|
|
50
|
+
value: '8'
|
|
51
|
+
}, {
|
|
52
|
+
property: 'Breakpoints',
|
|
53
|
+
value: '3'
|
|
54
|
+
}]
|
|
55
|
+
}, {
|
|
56
|
+
icon: 'shape',
|
|
57
|
+
iconTheme: 'shape',
|
|
58
|
+
title: 'shapes',
|
|
59
|
+
paragraph: 'Design an outline to a chosen component',
|
|
60
|
+
properties: [{
|
|
61
|
+
property: 'HTML',
|
|
62
|
+
value: '32'
|
|
63
|
+
}, {
|
|
64
|
+
property: 'SVG',
|
|
65
|
+
value: '1'
|
|
66
|
+
}]
|
|
67
|
+
}, {
|
|
68
|
+
icon: 'iconsOutline',
|
|
69
|
+
iconTheme: 'color',
|
|
70
|
+
title: 'Icons',
|
|
71
|
+
paragraph: 'Label a role of subject with glyphs',
|
|
72
|
+
properties: [{
|
|
73
|
+
property: 'Linear',
|
|
74
|
+
value: '788'
|
|
75
|
+
}, {
|
|
76
|
+
property: 'Colored',
|
|
77
|
+
value: '64'
|
|
78
|
+
}]
|
|
79
|
+
}, {
|
|
80
|
+
icon: 'clock',
|
|
81
|
+
iconTheme: 'icons',
|
|
82
|
+
title: 'Timing',
|
|
83
|
+
paragraph: 'Tokens for transitions and animations',
|
|
84
|
+
properties: [{
|
|
85
|
+
property: 'Timing base',
|
|
86
|
+
value: '150ms'
|
|
87
|
+
}, {
|
|
88
|
+
property: 'Ratio',
|
|
89
|
+
value: '1.618'
|
|
90
|
+
}, {
|
|
91
|
+
property: 'Transitions',
|
|
92
|
+
value: '15'
|
|
93
|
+
}, {
|
|
94
|
+
property: 'Animations',
|
|
95
|
+
value: '11'
|
|
96
|
+
}]
|
|
97
|
+
}, {
|
|
98
|
+
icon: 'deviceMobileOutline',
|
|
99
|
+
title: 'Breakpoints',
|
|
100
|
+
paragraph: 'Label a role of subject with glyphs',
|
|
101
|
+
properties: [{
|
|
102
|
+
property: 'Breakpoints',
|
|
103
|
+
value: '8'
|
|
104
|
+
}, {
|
|
105
|
+
property: 'Screens',
|
|
106
|
+
value: '3'
|
|
107
|
+
}]
|
|
108
|
+
}, {
|
|
109
|
+
icon: 'threeDots',
|
|
110
|
+
title: 'Sequence',
|
|
111
|
+
paragraph: 'The mapping system of generative sizing units',
|
|
112
|
+
properties: [{
|
|
113
|
+
property: 'Breakpoints',
|
|
114
|
+
value: '8'
|
|
115
|
+
}, {
|
|
116
|
+
property: 'Screens',
|
|
117
|
+
value: '3'
|
|
118
|
+
}]
|
|
119
|
+
}]
|
|
120
|
+
|
|
121
|
+
export const designComponents = {
|
|
122
|
+
extend: Grid,
|
|
123
|
+
props: {
|
|
124
|
+
columns: 'repeat(5, 1fr)',
|
|
125
|
+
rows: 'repeat(3, 1fr)'
|
|
126
|
+
},
|
|
127
|
+
|
|
128
|
+
childExtend: { extend: DesignComponent },
|
|
129
|
+
|
|
130
|
+
$setStateCollection: () => DESIGN_SYSTEM_ITEMS
|
|
131
|
+
}
|
|
2
132
|
|
|
3
133
|
export default {
|
|
4
134
|
SectionHeader: {
|
|
5
135
|
margin: '- - C1',
|
|
6
136
|
title: 'Design System takeaways',
|
|
7
137
|
p: 'Your tokens in the system at a glance'
|
|
8
|
-
}
|
|
138
|
+
},
|
|
139
|
+
|
|
140
|
+
designComponents
|
|
9
141
|
}
|
|
@@ -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,16 @@
|
|
|
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
|
+
// SYSTEM: {}
|
|
10
11
|
}
|
|
11
12
|
|
|
12
13
|
export const context = {
|
|
13
|
-
CONFIG:
|
|
14
|
+
CONFIG: SYSTEM,
|
|
14
15
|
LIBRARY,
|
|
15
16
|
SYSTEM,
|
|
16
17
|
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
|
-
```
|