@symbo.ls/preview 2.6.11 → 2.6.16

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 CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "@symbo.ls/preview",
3
3
  "description": "",
4
4
  "author": "",
5
- "version": "2.6.11",
5
+ "version": "2.6.16",
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",
@@ -14,7 +14,7 @@ export const HeaderHeading = {
14
14
 
15
15
  H1: {
16
16
  color: 'white',
17
- text: 'First was the light',
17
+ text: 'First is the light',
18
18
  fontSize: 'H2',
19
19
  fontWeight: '700',
20
20
  margin: '0',
@@ -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
 
@@ -4,7 +4,8 @@ import {
4
4
  Flex,
5
5
  SequenceSliders,
6
6
  ClickableItem,
7
- SquareButton
7
+ SquareButton,
8
+ ThemeSwitcher
8
9
  } from '@symbo.ls/components'
9
10
 
10
11
  export default {
@@ -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
- light: {
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
- dark: {
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 make sure` },
13
- H1: { text: 'Texts look good?' }
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,22 @@ 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
+ <<<<<<< Updated upstream
29
+ s.update({ [el.parent.key]: ev.target.value })
30
+ =======
31
+ s.update({ [el.parent.key]: el.node.value })
32
+ >>>>>>> Stashed changes
33
+ }
34
+ }
23
35
  }
24
36
  },
25
37
 
26
- name: {
38
+ projectName: {
27
39
  props: {
28
40
  title: { text: 'Name the project' },
29
41
  element: { placeholder: 'You name it' }
@@ -32,19 +44,36 @@ export default {
32
44
  title: {},
33
45
  element: {
34
46
  extend: Input,
35
- attr: { value: ({ state }) => state.projectName }
47
+ <<<<<<< Updated upstream
48
+ props: ({ state }) => ({
49
+ value: state.projectName
50
+ })
51
+ =======
52
+ props: ({ state }) => ({ value: state.projectName })
53
+ >>>>>>> Stashed changes
36
54
  }
37
55
  },
38
56
 
39
- k: {
57
+ appKey: {
40
58
  props: {
41
59
  title: { text: 'Key' }
42
60
  },
43
61
  title: {},
44
62
  element: {
45
63
  extend: Input,
46
- attr: { value: ({ state }) => state.appKey && state.appKey.split('.')[0] },
47
- props: { placeholder: 'a-zA-Z0-9' }
64
+ props: ({ state }) => ({
65
+ placeholder: 'a-zA-Z0-9',
66
+ value: state.appKey && state.appKey.split('.')[0]
67
+ }),
68
+ on: {
69
+ change: (ev, el, s) => {
70
+ <<<<<<< Updated upstream
71
+ s.update({ [el.parent.key]: ev.target.value + '.symbo.ls' })
72
+ =======
73
+ s.update({ [el.parent.key]: el.node.value + '.symbo.ls' })
74
+ >>>>>>> Stashed changes
75
+ }
76
+ }
48
77
  },
49
78
  Span: {
50
79
  position: 'absolute',
@@ -56,7 +85,7 @@ export default {
56
85
  }
57
86
  },
58
87
 
59
- visibility: {
88
+ urlVisibility: {
60
89
  props: { title: { text: 'URL Access' } },
61
90
  title: {},
62
91
  element: {
@@ -100,7 +129,7 @@ export default {
100
129
  ],
101
130
  on: {
102
131
  change: (ev, { parent }) => {
103
- parent.user.update({ key: ev.target.value })
132
+ // parent.user.update({ key: ev.target.value })
104
133
  }
105
134
  }
106
135
  }
@@ -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
- Flex: {
28
- props: ({ state }) => ({
29
- gap: 'D1'
30
- }),
31
-
32
- icon,
33
- fields
34
- },
35
-
36
- ContinueButton: {
37
- href: '/init/theme'
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
  }