@symbo.ls/preview 2.6.11 → 2.6.17
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/components/HeaderHeading.js +1 -1
- package/src/pages/Export/index.js +1 -1
- package/src/pages/Export/tools.js +2 -1
- package/src/pages/Init/CreateDocumentTheme.js +9 -4
- package/src/pages/Init/FontText.js +13 -3
- package/src/pages/Init/Personalize/fields.js +22 -7
- package/src/pages/Init/Personalize/index.js +35 -12
package/package.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"name": "@symbo.ls/preview",
|
|
3
3
|
"description": "",
|
|
4
4
|
"author": "",
|
|
5
|
-
"version": "2.6.
|
|
5
|
+
"version": "2.6.17",
|
|
6
6
|
"main": "src/app.js",
|
|
7
7
|
"scripts": {
|
|
8
8
|
"link:all": "yarn link smbls domql css-in-props @symbo.ls/icons @symbo.ls/config @symbo.ls/components @symbo.ls/scratch @symbo.ls/playground @symbo.ls/utils @symbo.ls/init @symbo.ls/config-default @domql/router @domql/utils @domql/router",
|
|
@@ -8,7 +8,7 @@ import { Page } from '../../components'
|
|
|
8
8
|
import state from './state'
|
|
9
9
|
import scene from './scene'
|
|
10
10
|
import tools from './tools'
|
|
11
|
-
import description from './description'
|
|
11
|
+
import description from './description' // eslint-disable-line no-unused-vars
|
|
12
12
|
|
|
13
13
|
import { fetchGist } from './gist'
|
|
14
14
|
|
|
@@ -141,15 +141,20 @@ export const CreateDocumentTheme = {
|
|
|
141
141
|
const dark = document['@dark']
|
|
142
142
|
const light = document['@light']
|
|
143
143
|
|
|
144
|
-
const colorRef = {
|
|
145
|
-
|
|
144
|
+
const colorRef = {}
|
|
145
|
+
|
|
146
|
+
if (light) {
|
|
147
|
+
colorRef.light = {
|
|
146
148
|
key: 'light',
|
|
147
149
|
title: 'Day',
|
|
148
150
|
icon: 'sun',
|
|
149
151
|
color: COLOR[light.color] || light.color || '#000000',
|
|
150
152
|
background: COLOR[light.background] || light.background || '#FFFFFF'
|
|
151
|
-
}
|
|
152
|
-
|
|
153
|
+
}
|
|
154
|
+
}
|
|
155
|
+
|
|
156
|
+
if (dark) {
|
|
157
|
+
colorRef.dark = {
|
|
153
158
|
key: 'dark',
|
|
154
159
|
title: 'Night',
|
|
155
160
|
icon: 'moon',
|
|
@@ -2,19 +2,29 @@
|
|
|
2
2
|
|
|
3
3
|
import { InitPage } from '../../components'
|
|
4
4
|
|
|
5
|
+
import tools from '../Export/tools'
|
|
6
|
+
|
|
5
7
|
export const FontText = {
|
|
6
8
|
extend: InitPage,
|
|
7
9
|
|
|
8
10
|
back: { props: { href: '/init/pallete' } },
|
|
9
11
|
|
|
12
|
+
state: {
|
|
13
|
+
base: 16,
|
|
14
|
+
ratio: 1.618
|
|
15
|
+
},
|
|
16
|
+
|
|
10
17
|
HeaderHeading: {
|
|
11
18
|
props: { margin: '- - D2 -' },
|
|
12
|
-
Caption: { text: `Let's
|
|
13
|
-
H1: { text: '
|
|
19
|
+
Caption: { text: `Let's customize` },
|
|
20
|
+
H1: { text: 'Typography' }
|
|
14
21
|
},
|
|
15
22
|
|
|
16
23
|
FontText: {
|
|
17
|
-
margin: '- -Z'
|
|
24
|
+
margin: '- -Z A'
|
|
25
|
+
},
|
|
26
|
+
tools: {
|
|
27
|
+
extend: tools.tools
|
|
18
28
|
},
|
|
19
29
|
|
|
20
30
|
ContinueButton: {
|
|
@@ -20,10 +20,18 @@ export default {
|
|
|
20
20
|
width: 'auto',
|
|
21
21
|
padding: 'Z1 A2'
|
|
22
22
|
}
|
|
23
|
+
},
|
|
24
|
+
title: {},
|
|
25
|
+
element: {
|
|
26
|
+
on: {
|
|
27
|
+
change: (ev, el, s) => {
|
|
28
|
+
s.update({ [el.parent.key]: ev.target.value })
|
|
29
|
+
}
|
|
30
|
+
}
|
|
23
31
|
}
|
|
24
32
|
},
|
|
25
33
|
|
|
26
|
-
|
|
34
|
+
projectName: {
|
|
27
35
|
props: {
|
|
28
36
|
title: { text: 'Name the project' },
|
|
29
37
|
element: { placeholder: 'You name it' }
|
|
@@ -32,19 +40,26 @@ export default {
|
|
|
32
40
|
title: {},
|
|
33
41
|
element: {
|
|
34
42
|
extend: Input,
|
|
35
|
-
|
|
43
|
+
props: ({ state }) => ({ value: state.projectName })
|
|
36
44
|
}
|
|
37
45
|
},
|
|
38
46
|
|
|
39
|
-
|
|
47
|
+
appKey: {
|
|
40
48
|
props: {
|
|
41
49
|
title: { text: 'Key' }
|
|
42
50
|
},
|
|
43
51
|
title: {},
|
|
44
52
|
element: {
|
|
45
53
|
extend: Input,
|
|
46
|
-
|
|
47
|
-
|
|
54
|
+
props: ({ state }) => ({
|
|
55
|
+
placeholder: 'a-zA-Z0-9',
|
|
56
|
+
value: state.appKey && state.appKey.split('.')[0]
|
|
57
|
+
}),
|
|
58
|
+
on: {
|
|
59
|
+
change: (ev, el, s) => {
|
|
60
|
+
s.update({ [el.parent.key]: ev.target.value + '.symbo.ls' })
|
|
61
|
+
}
|
|
62
|
+
}
|
|
48
63
|
},
|
|
49
64
|
Span: {
|
|
50
65
|
position: 'absolute',
|
|
@@ -56,7 +71,7 @@ export default {
|
|
|
56
71
|
}
|
|
57
72
|
},
|
|
58
73
|
|
|
59
|
-
|
|
74
|
+
urlVisibility: {
|
|
60
75
|
props: { title: { text: 'URL Access' } },
|
|
61
76
|
title: {},
|
|
62
77
|
element: {
|
|
@@ -100,7 +115,7 @@ export default {
|
|
|
100
115
|
],
|
|
101
116
|
on: {
|
|
102
117
|
change: (ev, { parent }) => {
|
|
103
|
-
parent.user.update({ key: ev.target.value })
|
|
118
|
+
// parent.user.update({ key: ev.target.value })
|
|
104
119
|
}
|
|
105
120
|
}
|
|
106
121
|
}
|
|
@@ -2,18 +2,24 @@
|
|
|
2
2
|
|
|
3
3
|
import { InitPage } from '../../../components'
|
|
4
4
|
|
|
5
|
+
import { Flex, Form } from '@symbo.ls/components'
|
|
6
|
+
import { router } from '@domql/router'
|
|
7
|
+
|
|
5
8
|
import icon from './icon'
|
|
6
9
|
import fields from './fields'
|
|
7
10
|
|
|
8
11
|
export const Personalize = {
|
|
9
12
|
extend: InitPage,
|
|
13
|
+
props: {
|
|
14
|
+
height: '100%'
|
|
15
|
+
},
|
|
10
16
|
|
|
11
17
|
back: null,
|
|
12
18
|
|
|
13
19
|
HeaderHeading: {
|
|
14
20
|
props: { margin: '- - D1 -' },
|
|
15
21
|
Caption: { text: `Let's personalize your Symbols` },
|
|
16
|
-
H1: { text: ({ state }) => `Hi ${state.userName}` }
|
|
22
|
+
H1: { text: ({ state }) => `Hi ${state.userName || ''}` }
|
|
17
23
|
},
|
|
18
24
|
|
|
19
25
|
ColumnParagraphs: {
|
|
@@ -24,16 +30,33 @@ export const Personalize = {
|
|
|
24
30
|
]
|
|
25
31
|
},
|
|
26
32
|
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
33
|
+
Form: {
|
|
34
|
+
extend: [Form, Flex],
|
|
35
|
+
props: {
|
|
36
|
+
flex: 1,
|
|
37
|
+
flow: 'column',
|
|
38
|
+
align: 'flex-start space-between'
|
|
39
|
+
},
|
|
40
|
+
|
|
41
|
+
Flex: {
|
|
42
|
+
props: ({ state }) => ({
|
|
43
|
+
gap: 'D1'
|
|
44
|
+
}),
|
|
45
|
+
|
|
46
|
+
icon,
|
|
47
|
+
fields
|
|
48
|
+
},
|
|
49
|
+
|
|
50
|
+
ContinueButton: {
|
|
51
|
+
type: 'submit'
|
|
52
|
+
},
|
|
53
|
+
|
|
54
|
+
on: {
|
|
55
|
+
submit: (ev, el, s) => {
|
|
56
|
+
ev.preventDefault()
|
|
57
|
+
console.log(s.parse())
|
|
58
|
+
router(el.__root, '/init/theme', {})
|
|
59
|
+
}
|
|
60
|
+
}
|
|
38
61
|
}
|
|
39
62
|
}
|