@symbo.ls/preview 2.6.6 → 2.6.8

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.6",
5
+ "version": "2.6.8",
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",
package/src/app.js CHANGED
@@ -1,8 +1,6 @@
1
1
  'use strict'
2
2
 
3
- import './config'
4
3
  import style from './style'
5
-
6
4
  import { Flex } from '@symbo.ls/components'
7
5
 
8
6
  import {
@@ -30,7 +28,7 @@ Object.keys(DesignSystem.routes).map(route => {
30
28
 
31
29
  const App = {
32
30
  extend: Flex,
33
-
31
+
34
32
  props: style,
35
33
 
36
34
  routes: {
@@ -42,7 +42,7 @@ export const InitPage = {
42
42
  }
43
43
 
44
44
  const ifWeHaveComponents = (state) => {
45
- const keys = Object.keys(state.__client_system.COMPONENTS)
45
+ const keys = Object.keys(state.__projectLibrary)
46
46
  return !!keys.length
47
47
  }
48
48
 
@@ -25,36 +25,7 @@ export const UploadImage = {
25
25
  p: { span: null },
26
26
  input: {
27
27
  on: {
28
- change: async (ev, el, s) => {
29
- const { context } = el
30
- const { client } = context
31
- s.update({ icon: { pending: true } })
32
-
33
- try {
34
- let id
35
- await client.file(ev.target.files[0]).then(async d => { id = d.id })
36
-
37
- await client.observe({
38
- $id: id,
39
- $all: true
40
- }, async (data) => {
41
- console.log(data)
42
- s.update({ icon: { pending: false, ...data } })
43
-
44
- // await client.set({
45
- // $id: s.projectId,
46
- // icon: data
47
- // }, d => console.log('d', d))
48
-
49
- await client.set({
50
- $id: s.projectId,
51
- icon: data.id
52
- }, d => console.log('d2', d))
53
- })
54
- } catch (e) {
55
- console.log(e)
56
- }
57
- }
28
+ change: async (ev, el, s) => {}
58
29
  }
59
30
  }
60
31
  }
@@ -3,8 +3,8 @@
3
3
  import { SectionHeader, ColorTemplate, Flex } from '@symbo.ls/components'
4
4
 
5
5
  const mapColors = (el, s) => {
6
- if (!s.__client_system) return
7
- const { COLOR } = s.__client_system
6
+ if (!s.__projectSystem) return
7
+ const { COLOR } = s.__projectSystem
8
8
  const colorKeys = Object.keys(COLOR)
9
9
  return colorKeys.map(v => ({ key: v, value: COLOR[v] }))
10
10
  }
@@ -3,8 +3,8 @@
3
3
  import { ThemeTemplate, SectionHeader, Grid } from '@symbo.ls/components'
4
4
 
5
5
  const mapThemes = (el, s) => {
6
- if (!s.__client_system) return
7
- const { THEME } = s.__client_system
6
+ if (!s.__projectSystem) return
7
+ const { THEME } = s.__projectSystem
8
8
  const themeKeys = Object.keys(THEME)
9
9
  return themeKeys.map(v => ({ ...THEME[v], key: v }))
10
10
  }
@@ -24,7 +24,7 @@ export default {
24
24
  p: {
25
25
  opacity: '0',
26
26
  text: 'All Categories'
27
- },
27
+ }
28
28
  }
29
29
  },
30
30
 
@@ -1,6 +1,6 @@
1
1
  'use strict'
2
2
 
3
- export default ({ parent: { state: { __client_system } } }) => __client_system && ({
3
+ export default ({ parent: { state: { __projectSystem } } }) => __projectSystem && ({
4
4
  data: [{
5
5
  icon: 'colorOutline',
6
6
  iconTheme: 'theme',
@@ -9,10 +9,10 @@ export default ({ parent: { state: { __client_system } } }) => __client_system &
9
9
  iconBackground: 'red',
10
10
  properties: [{
11
11
  property: 'Colors',
12
- value: __client_system.COLOR && Object.keys(__client_system.COLOR).length
12
+ value: __projectSystem.COLOR && Object.keys(__projectSystem.COLOR).length
13
13
  }, {
14
14
  property: 'Themes',
15
- value: __client_system.THEME && Object.keys(__client_system.THEME).length
15
+ value: __projectSystem.THEME && Object.keys(__projectSystem.THEME).length
16
16
  }]
17
17
  }, {
18
18
  icon: 'typographyOutline',
@@ -21,19 +21,19 @@ export default ({ parent: { state: { __client_system } } }) => __client_system &
21
21
  paragraph: 'style a typed material',
22
22
  properties: [{
23
23
  property: 'Base size',
24
- value: __client_system.TYPOGRAPHY && __client_system.TYPOGRAPHY.base + 'px'
24
+ value: __projectSystem.TYPOGRAPHY && __projectSystem.TYPOGRAPHY.base + 'px'
25
25
  }, {
26
26
  property: 'Ratio',
27
- value: __client_system.TYPOGRAPHY && __client_system.TYPOGRAPHY.ratio
27
+ value: __projectSystem.TYPOGRAPHY && __projectSystem.TYPOGRAPHY.ratio
28
28
  }, {
29
29
  property: 'Styles',
30
- value: __client_system.TYPOGRAPHY && __client_system.TYPOGRAPHY.styles && Object.keys(__client_system.TYPOGRAPHY.styles).length
30
+ value: __projectSystem.TYPOGRAPHY && __projectSystem.TYPOGRAPHY.styles && Object.keys(__projectSystem.TYPOGRAPHY.styles).length
31
31
  }, {
32
32
  property: 'Fonts',
33
- value: __client_system.FONT && Object.keys(__client_system.FONT).length
33
+ value: __projectSystem.FONT && Object.keys(__projectSystem.FONT).length
34
34
  }, {
35
35
  property: 'Families',
36
- value: __client_system.FONT_FAMILY && Object.keys(__client_system.FONT_FAMILY).length - 1
36
+ value: __projectSystem.FONT_FAMILY && Object.keys(__projectSystem.FONT_FAMILY).length - 1
37
37
  }]
38
38
  }, {
39
39
  icon: 'spaceOutline',
@@ -42,7 +42,7 @@ export default ({ parent: { state: { __client_system } } }) => __client_system &
42
42
  paragraph: 'Manage properties of a size',
43
43
  properties: [{
44
44
  property: 'Ratio',
45
- value: __client_system.SPACING && __client_system.SPACING.ratio
45
+ value: __projectSystem.SPACING && __projectSystem.SPACING.ratio
46
46
  }, {
47
47
  property: 'Templates',
48
48
  value: 'TBA'
@@ -66,13 +66,13 @@ export default ({ parent: { state: { __client_system } } }) => __client_system &
66
66
  paragraph: 'Label a role of subject with glyphs',
67
67
  properties: [{
68
68
  property: 'All',
69
- value: __client_system.ICONS && Object.keys(__client_system.ICONS).length
69
+ value: __projectSystem.ICONS && Object.keys(__projectSystem.ICONS).length
70
70
  }, {
71
71
  property: 'Linear',
72
- value: __client_system.ICONS && Object.keys(__client_system.ICONS).filter(v => v.includes('Outline')).length
72
+ value: __projectSystem.ICONS && Object.keys(__projectSystem.ICONS).filter(v => v.includes('Outline')).length
73
73
  }, {
74
74
  property: 'Colored',
75
- value: __client_system.ICONS && Object.keys(__client_system.ICONS).filter(v => v.includes('Colored')).length
75
+ value: __projectSystem.ICONS && Object.keys(__projectSystem.ICONS).filter(v => v.includes('Colored')).length
76
76
  }]
77
77
  }, {
78
78
  icon: 'clock',
@@ -81,10 +81,10 @@ export default ({ parent: { state: { __client_system } } }) => __client_system &
81
81
  paragraph: 'Tokens for transitions and animations',
82
82
  properties: [{
83
83
  property: 'Timing base',
84
- value: __client_system.TIMING && __client_system.TIMING.base + 'ms'
84
+ value: __projectSystem.TIMING && __projectSystem.TIMING.base + 'ms'
85
85
  }, {
86
86
  property: 'Ratio',
87
- value: __client_system.TIMING && __client_system.TIMING.ratio
87
+ value: __projectSystem.TIMING && __projectSystem.TIMING.ratio
88
88
  }, {
89
89
  property: 'Transitions',
90
90
  value: 'TBA'
@@ -98,10 +98,10 @@ export default ({ parent: { state: { __client_system } } }) => __client_system &
98
98
  paragraph: 'Label a role of subject with glyphs',
99
99
  properties: [{
100
100
  property: 'Breakpoints',
101
- value: __client_system.MEDIA && Object.keys(__client_system.MEDIA).length
101
+ value: __projectSystem.MEDIA && Object.keys(__projectSystem.MEDIA).length
102
102
  }, {
103
103
  property: 'Screens',
104
- value: __client_system.DEVICES && Object.keys(__client_system.DEVICES).length
104
+ value: __projectSystem.DEVICES && Object.keys(__projectSystem.DEVICES).length
105
105
  }]
106
106
  }, {
107
107
  icon: 'threeDots',
@@ -52,7 +52,7 @@ export default {
52
52
 
53
53
  comp: (el, s) => {
54
54
  if (s.live) {
55
- const CLIENT_SYSTEM = s.__client_system
55
+ const PROJECT_SYSTEM = s.__projectSystem
56
56
  const styleNode = document.createElement('head')
57
57
  const emotion = createEmotion('client', styleNode)
58
58
  emCache['client'] = emotion
@@ -67,12 +67,12 @@ export default {
67
67
  extend: [Box],
68
68
  define: { style: emotionStyle, class: emotionClass },
69
69
  components,
70
- context: { SYSTEM: CLIENT_SYSTEM }
70
+ context: { system: PROJECT_SYSTEM }
71
71
  })
72
72
 
73
73
  newDom.node.appendChild(styleNode)
74
74
 
75
- init(CLIENT_SYSTEM, null, { emotion, initDOMQLDefine: false, newConfig: 'client' })
75
+ init(PROJECT_SYSTEM, null, { emotion, initDOMQLDefine: false, newConfig: 'client' })
76
76
  activateConfig('client')
77
77
 
78
78
  newDom.set({
@@ -4,8 +4,8 @@ import { Grid, Hoverable, FontObject } from '@symbo.ls/components'
4
4
  import { TypeSection } from '../Typography/shared'
5
5
 
6
6
  const mapFonts = (el, s) => {
7
- if (!s.__client_system) return
8
- const { FONT } = s.__client_system
7
+ if (!s.__projectSystem) return
8
+ const { FONT } = s.__projectSystem
9
9
  const fontKeys = Object.keys(FONT)
10
10
 
11
11
  return fontKeys.map(v => {
@@ -4,8 +4,8 @@ import { Grid, Hoverable, FontFamilyObject } from '@symbo.ls/components'
4
4
  import { TypeSection } from '../Typography/shared'
5
5
 
6
6
  const mapFontFamilies = (el, s) => {
7
- if (!s.__client_system) return
8
- const { FONT_FAMILY } = s.__client_system
7
+ if (!s.__projectSystem) return
8
+ const { FONT_FAMILY } = s.__projectSystem
9
9
  const fontFamilyKeys = Object.keys(FONT_FAMILY)
10
10
 
11
11
  return fontFamilyKeys.map(v => {
@@ -1,14 +1,21 @@
1
1
  'use strict'
2
2
 
3
- import { Flex, CommonField, WiderButton, ClickableItem } from '@symbo.ls/components'
4
-
5
3
  import { InitPage } from '../../components'
4
+ import {
5
+ Flex,
6
+ CommonField,
7
+ WiderButton,
8
+ ClickableItem,
9
+ TooltipParent
10
+ } from '@symbo.ls/components'
11
+ import { setCookie } from 'domql/packages/cookie'
6
12
 
7
13
  const ButtonOptions = {
8
14
  tag: 'section',
9
15
  extend: CommonField,
10
16
 
11
17
  props: {
18
+ margin: '- - C2 -',
12
19
  gap: 'Z2',
13
20
  element: {
14
21
  gap: 'A',
@@ -27,30 +34,68 @@ const ButtonOptions = {
27
34
  element: {
28
35
  extend: Flex,
29
36
  childExtend: {
30
- extend: [WiderButton, ClickableItem],
37
+ extend: [ClickableItem, WiderButton, TooltipParent],
38
+ props: ({ key, state, parent }) => ({
39
+ active: state[parent.parent.key] === key,
40
+
41
+ style: {
42
+ '&:hover, &:focus-visible': {
43
+ zIndex: 1000,
44
+ '& [tooltip]': {
45
+ transform: 'translate3d(-50%,0,0)',
46
+ opacity: 1,
47
+ visibility: 'visible'
48
+ }
49
+ }
50
+ }
51
+ }),
52
+
53
+ Tooltip: {
54
+ props: {
55
+ background: 'gray2 .95',
56
+ position: 'absolute',
57
+ pointerEvents: 'none',
58
+ top: '115%',
59
+ left: '50%',
60
+ shape: 'tooltip',
61
+ shapeDirection: 'top',
62
+ fontSize: 'Z1',
63
+ padding: 'Y Z1',
64
+ transform: 'translate3d(-50%, 10%, 0)',
65
+ transition: 'C defaultBezier, C defaultBezier, B defaultBezier',
66
+ transitionProperty: 'opacity, visibility, transform',
67
+ textAlign: 'center',
68
+ opacity: '0',
69
+ visibility: 'hidden',
70
+ zIndex: 9,
71
+ lineHeight: 1
72
+ },
73
+ title: ({ parent }) => parent.key,
74
+ p: null
75
+ },
76
+
31
77
  on: {
32
78
  click: (ev, el, s) => {
33
- s.parent.update({ })
79
+ const key = el.parent.parent.key
80
+ const value = el.key
81
+ setCookie(key, value, 3)
82
+ s.update({ [key]: value })
34
83
  }
35
84
  }
36
85
  }
37
86
  }
38
87
  }
39
88
 
40
- const yourEnvironment = {
89
+ const language = {
41
90
  extend: ButtonOptions,
42
- props: {
43
- margin: '- - C2 -',
44
- title: { text: 'Your environment' }
45
- },
91
+ title: { text: 'Your environment' },
46
92
 
47
- title: {},
48
- element: { ...[
49
- { props: { icon: 'html' } },
50
- { props: { icon: 'js outline' } },
51
- { props: { icon: 'ts outline' } },
52
- { props: { icon: 'pdf' } },
53
- {
93
+ element: {
94
+ HTML: { props: { icon: 'html' } },
95
+ JavaScript: { props: { icon: 'js outline' } },
96
+ TypeScript: { props: { icon: 'ts outline' } },
97
+ PDF: { props: { icon: 'pdf' } },
98
+ none: {
54
99
  props: {
55
100
  boxSizing: 'content-box',
56
101
  padding: 'Z B',
@@ -61,24 +106,21 @@ const yourEnvironment = {
61
106
  },
62
107
  icon: null
63
108
  }
64
- ] }
109
+ }
65
110
  }
66
111
 
67
- const yourFramework = {
112
+ const framework = {
68
113
  extend: ButtonOptions,
69
- props: {
70
- margin: '- - F -',
71
- title: { text: 'Your framework' }
72
- },
73
- title: {},
74
- element: { ...[
75
- { props: { icon: 'domql' } },
76
- { props: { icon: 'react' } },
77
- { props: { icon: 'vue' } },
78
- { props: { icon: 'angular' } },
79
- { props: { icon: 'svelte' } },
80
- { props: { icon: 'webComponents' } }
81
- ] }
114
+ title: { text: 'Your framework' },
115
+
116
+ element: {
117
+ DOMQL: { props: { icon: 'domql' } },
118
+ React: { props: { icon: 'react' } },
119
+ Vue: { props: { icon: 'vue' } },
120
+ Angular: { props: { icon: 'angular' } },
121
+ Svelte: { props: { icon: 'svelte' } },
122
+ WebComponents: { props: { icon: 'webComponents' } }
123
+ }
82
124
  }
83
125
 
84
126
  export const ChooseEnvironment = {
@@ -93,8 +135,8 @@ export const ChooseEnvironment = {
93
135
  H1: { text: 'Your environment' }
94
136
  },
95
137
 
96
- yourEnvironment,
97
- yourFramework,
138
+ language,
139
+ framework,
98
140
 
99
141
  ContinueButton: {
100
142
  text: 'Create Symbols',
@@ -136,7 +136,7 @@ export const CreateDocumentTheme = {
136
136
 
137
137
  on: {
138
138
  init: ({ state }) => {
139
- const { THEME, COLOR } = state.__client_system
139
+ const { THEME, COLOR } = state.__projectSystem
140
140
  const { document } = THEME
141
141
  const dark = document['@dark']
142
142
  const light = document['@light']
@@ -1,5 +1,6 @@
1
1
  'use strict'
2
2
 
3
+ import { set } from '@symbo.ls/based'
3
4
  import { User } from '@symbo.ls/components'
4
5
  import { UploadImage } from '../../../components'
5
6
 
@@ -37,6 +38,26 @@ export default {
37
38
  opacity: (state.icon && state.icon.src) ? '1' : '0',
38
39
  pointerEvents: 'none'
39
40
  })
41
+ },
42
+
43
+ input: {
44
+ on: {
45
+ change: async (ev, el, s) => {
46
+ s.update({ icon: { pending: true } })
47
+
48
+ try {
49
+ set({
50
+ $id: s.projectId,
51
+ icon: ev.target.files[0]
52
+ }, d => {
53
+ console.log('udpateIcon', d)
54
+ s.update({ icon: { pending: false } })
55
+ })
56
+ } catch (e) {
57
+ console.log(e)
58
+ }
59
+ }
60
+ }
40
61
  }
41
62
  }
42
63
  }
@@ -1,7 +1,8 @@
1
1
  'use strict'
2
2
 
3
+ import { mapSequence, sortSequence } from '@symbo.ls/components'
3
4
  import sequence from './sequence'
4
- import { state } from './state'
5
+ import state from './state'
5
6
 
6
7
  export const Spaces = {
7
8
  state,
@@ -19,16 +20,10 @@ export const Spaces = {
19
20
  sequence,
20
21
 
21
22
  on: {
22
- init: (el, s) => {
23
- if (!s.__client_system.SPACING) {
24
- s.systemUpdate({
25
- SPACING: { base: s.base, ratio: s.ratio }
26
- }, { preventUpdate: true })
27
- }
28
- },
23
+ init: (el, s) => {},
29
24
  stateUpdated: (el, s, changes) => {
30
25
  s.systemUpdate({
31
- SPACING: { base: s.base, ratio: s.ratio }
26
+ SPACING: changes
32
27
  }, {
33
28
  preventUpdate: true
34
29
  })
@@ -2,15 +2,20 @@
2
2
 
3
3
  import { SPACING } from '@symbo.ls/scratch'
4
4
 
5
- export const state = {
6
- base: SPACING.base,
7
- ratio: SPACING.ratio,
8
- subSequence: true,
9
- range: [-5, +12],
10
- scales: {},
11
- sequence: {},
12
- vars: {},
13
- type: 'spacing-scale',
5
+ export default ({ parent }) => {
6
+ const rootState = parent.state
7
+ const spacing = rootState.__projectSystem.SPACING || {}
8
+ console.log(spacing)
14
9
 
15
- props: {}
10
+ return {
11
+ base: spacing.base || SPACING.base,
12
+ ratio: spacing.ratio || SPACING.ratio,
13
+ subSequence: spacing.subSequence || SPACING.subSequence || true,
14
+ range: spacing.range || SPACING.range || [-5, +12],
15
+ scales: {},
16
+ sequence: {},
17
+ vars: {},
18
+ type: 'spacing-scale',
19
+ props: {}
20
+ }
16
21
  }
@@ -27,7 +27,7 @@ export const State = {
27
27
  input: (ev, el, s) => {
28
28
  const rootState = el.__root.state
29
29
  const obj = {
30
- CLIENT_STATE: { [el.parent.key]: el.node.value }
30
+ PROJECT_STATE: { [el.parent.key]: el.node.value }
31
31
  }
32
32
  rootState.update(obj)
33
33
  }
@@ -80,7 +80,7 @@ export const State = {
80
80
 
81
81
  on: {
82
82
  stateUpdated: (el, s) => {
83
- s.systemUpdate({ CLIENT_STATE: s.parse })
83
+ s.systemUpdate({ PROJECT_STATE: s.parse })
84
84
  }
85
85
  }
86
86
  }
@@ -145,11 +145,11 @@ export const Theme = {
145
145
 
146
146
  on: {
147
147
  init: (el, s) => {
148
- if (!s.__client_system) return
148
+ if (!s.__projectSystem) return
149
149
  const path = window.location.pathname
150
150
  const pathArray = path.split('theme/')
151
- if (!s.__client_system) return
152
- const { THEME } = s.__client_system
151
+ if (!s.__projectSystem) return
152
+ const { THEME } = s.__projectSystem
153
153
  const themeName = pathArray[1]
154
154
  var value = THEME[themeName]
155
155
 
@@ -50,11 +50,11 @@ const isTag = v => HTML_TAGS.root.indexOf(v) > -1 || HTML_TAGS.body.indexOf(v) >
50
50
  const isHelper = v => v.slice(0, 1) === '.'
51
51
 
52
52
  const getCollectionFromArray = (arr, s) => {
53
- const { __client_system } = s
54
- const { TYPOGRAPHY } = __client_system
53
+ const { __projectSystem } = s
54
+ const { TYPOGRAPHY } = __projectSystem
55
55
  const { styles } = TYPOGRAPHY
56
56
  return arr.map((v, k) => {
57
- const result = getTypeStyle(v, __client_system)
57
+ const result = getTypeStyle(v, __projectSystem)
58
58
  return {
59
59
  key: v,
60
60
  value: {
@@ -82,8 +82,8 @@ export const headingsCollection = (el, s) => {
82
82
  }
83
83
 
84
84
  export const tagsCollection = (el, s) => {
85
- const { __client_system } = s
86
- const { TYPOGRAPHY } = __client_system
85
+ const { __projectSystem } = s
86
+ const { TYPOGRAPHY } = __projectSystem
87
87
  const { styles } = TYPOGRAPHY
88
88
  if (!styles.body) styles.body = {}
89
89
  el.removeContent()
@@ -97,8 +97,8 @@ export const tagsCollection = (el, s) => {
97
97
  }
98
98
 
99
99
  export const helpersCollection = (el, s) => {
100
- const { __client_system } = s
101
- const { TYPOGRAPHY } = __client_system
100
+ const { __projectSystem } = s
101
+ const { TYPOGRAPHY } = __projectSystem
102
102
  const { styles } = TYPOGRAPHY
103
103
 
104
104
  const HELPERS = Object.keys(styles)
@@ -113,9 +113,9 @@ export default {
113
113
 
114
114
  on: {
115
115
  init: (el, s) => {
116
- if (!s.__client_system) return
117
- const { __client_system } = s
118
- const { TYPOGRAPHY } = __client_system
116
+ if (!s.__projectSystem) return
117
+ const { __projectSystem } = s
118
+ const { TYPOGRAPHY } = __projectSystem
119
119
  const { styles } = TYPOGRAPHY
120
120
  if (styles) {
121
121
  s.update({ styles }, { preventUpdate: true })
@@ -30,15 +30,14 @@ export const Typography = {
30
30
 
31
31
  on: {
32
32
  init: (el, s) => {
33
- if (!s.__client_system.TYPOGRAPHY) {
34
- s.systemUpdate({
35
- TYPOGRAPHY: { base: s.base, ratio: s.ratio }
36
- })
37
- }
38
33
  mapSequence(s, sortSequence)
39
34
  },
40
35
  stateUpdated: (el, s, changes) => {
41
- s.systemUpdate({ TYPOGRAPHY: changes })
36
+ s.systemUpdate({
37
+ TYPOGRAPHY: changes
38
+ }, {
39
+ preventUpdate: true
40
+ })
42
41
  }
43
42
  }
44
43
  }
@@ -1,16 +1,18 @@
1
1
  'use strict'
2
2
 
3
- export default ({ parent }) => ({
4
- base: 16,
5
- ratio: 1.125,
6
- range: [-3, +8],
7
- h1Matches: +6,
8
- scales: {},
9
- sequence: {},
10
- vars: {},
11
- // subSequence: true,
12
- type: 'demo-font-size',
13
-
14
- sampleText: 'Today is a big day for our tribe. The year ends.',
15
- activeTab: ''
16
- })
3
+ export default ({ parent }) => {
4
+ const rootState = parent.state
5
+ const typography = rootState.__projectSystem.TYPOGRAPHY || {}
6
+ return {
7
+ base: typography.base || 16,
8
+ ratio: typography.ratio || 1.125,
9
+ range: typography.range || [-3, +8],
10
+ subsequence: typography.subsequence || true,
11
+ h1Matches: +6,
12
+ scales: {},
13
+ sequence: {},
14
+ vars: {},
15
+ type: 'demo-font-size',
16
+ sampleText: 'Today is a big day for our tribe. The year ends.'
17
+ }
18
+ }
@@ -1,8 +0,0 @@
1
- 'use strict'
2
-
3
- export const EDITOR_COLORS = {
4
- modalBackground: '#141414',
5
- modalFade: '#0E0E0E',
6
- shapeColor: '#343434',
7
- darkPurple: '#1c172a'
8
- }
File without changes
@@ -1,19 +0,0 @@
1
- 'use strict'
2
-
3
- import { init } from '@symbo.ls/components'
4
-
5
- import { EDITOR_COLORS } from './color'
6
- import { COMPONENT_THEMES, EDITOR_THEMES } from './theme'
7
-
8
- const PREVIEW_CONF = {
9
- color: {
10
- blue2: '#4676EC',
11
- ...EDITOR_COLORS
12
- },
13
- theme: {
14
- ...EDITOR_THEMES,
15
- ...COMPONENT_THEMES
16
- }
17
- }
18
-
19
- export default init(PREVIEW_CONF)
@@ -1,15 +0,0 @@
1
- 'use strict'
2
-
3
- export const EDITOR_THEMES = {
4
- shape: {
5
- background: 'shapeColor',
6
- border: 'none'
7
- }
8
- }
9
-
10
- export const COMPONENT_THEMES = {
11
- label: {
12
- background: 'brown',
13
- color: 'white'
14
- }
15
- }