@symbo.ls/preview 2.7.21 → 2.7.24

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.
Files changed (149) hide show
  1. package/.eslintrc.js +2 -8
  2. package/.vscode/settings.json +4 -1
  3. package/README.md +1 -0
  4. package/config.js +6 -0
  5. package/define.js +10 -0
  6. package/index.html +5 -5
  7. package/index.js +6 -9
  8. package/package.json +9 -28
  9. package/src/app.js +33 -38
  10. package/state.js +14 -0
  11. package/svgSprite.config.js +2 -2
  12. package/.babelrc.js +0 -5
  13. package/.coveralls.yml +0 -1
  14. package/.eslintignore +0 -1
  15. package/.legacy/_tools_old.js +0 -49
  16. package/.legacy/boxModel.js +0 -3
  17. package/.legacy/index copy.js +0 -45
  18. package/.legacy/preview.js +0 -133
  19. package/.legacy/sequence.js +0 -3
  20. package/.legacy/style.js +0 -30
  21. package/.prettierrc +0 -4
  22. package/.vscode/extensions.json +0 -5
  23. package/src/assets/dark.png +0 -0
  24. package/src/assets/fonts/FiraGO/FiraGO-Bold.woff2 +0 -0
  25. package/src/assets/fonts/FiraGO/FiraGO-Light.woff2 +0 -0
  26. package/src/assets/fonts/FiraGO/FiraGO-Medium.woff2 +0 -0
  27. package/src/assets/fonts/FiraGO/FiraGO-Regular.woff2 +0 -0
  28. package/src/assets/fonts/europa-bold-webfont.woff2 +0 -0
  29. package/src/assets/fonts/europa-bolditalic-webfont.woff2 +0 -0
  30. package/src/assets/fonts/europa-light-webfont.woff2 +0 -0
  31. package/src/assets/fonts/europa-lightitalic-webfont.woff2 +0 -0
  32. package/src/assets/fonts/europa-regular-webfont.woff2 +0 -0
  33. package/src/assets/fonts/europa-regularitalic-webfont.woff2 +0 -0
  34. package/src/assets/mask1.png +0 -0
  35. package/src/assets/mask2.png +0 -0
  36. package/src/assets/ovalCircle.svg +0 -9
  37. package/src/assets/shapes.png +0 -0
  38. package/src/assets/space.png +0 -0
  39. package/src/assets/type.png +0 -0
  40. package/src/components/Aside.js +0 -101
  41. package/src/components/Banner.js +0 -58
  42. package/src/components/ColorText.js +0 -29
  43. package/src/components/ColorsPalette.js +0 -69
  44. package/src/components/ColumnParagrphs.js +0 -22
  45. package/src/components/ContinueButton.js +0 -14
  46. package/src/components/DesignComponent.js +0 -81
  47. package/src/components/FontText.js +0 -193
  48. package/src/components/Header.js +0 -53
  49. package/src/components/HeaderHeading.js +0 -23
  50. package/src/components/IconsGroup.js +0 -64
  51. package/src/components/Page.js +0 -135
  52. package/src/components/ResponsivePreview.js +0 -44
  53. package/src/components/Route.js +0 -1
  54. package/src/components/ShapePreview.js +0 -63
  55. package/src/components/ShapeSet.js +0 -85
  56. package/src/components/SlidersWithResponsive.js +0 -23
  57. package/src/components/SpacingButton/actionButtons.js +0 -41
  58. package/src/components/SpacingButton/dropdown.js +0 -114
  59. package/src/components/SpacingButton/index.js +0 -250
  60. package/src/components/SpacingButton/props.js +0 -45
  61. package/src/components/SpacingPreview.js +0 -156
  62. package/src/components/SpacingTable.js +0 -213
  63. package/src/components/ThemeButtons.js +0 -41
  64. package/src/components/UploadImage.js +0 -31
  65. package/src/components/Widget.js +0 -1
  66. package/src/components/index.js +0 -25
  67. package/src/pages/Account/Personal.js +0 -59
  68. package/src/pages/Account/Project.js +0 -40
  69. package/src/pages/Account/fields.js +0 -74
  70. package/src/pages/Account/fieldsGridProps.js +0 -15
  71. package/src/pages/Account/index.js +0 -117
  72. package/src/pages/Color/globalThemes.js +0 -32
  73. package/src/pages/Color/index.js +0 -18
  74. package/src/pages/Color/palette.js +0 -36
  75. package/src/pages/Color/themes.js +0 -37
  76. package/src/pages/Components/grid.js +0 -99
  77. package/src/pages/Components/index.js +0 -37
  78. package/src/pages/Components/sidebar.js +0 -28
  79. package/src/pages/Components/style.js +0 -16
  80. package/src/pages/DesignSystem/Dashboard/banners.js +0 -38
  81. package/src/pages/DesignSystem/Dashboard/designElements.js +0 -124
  82. package/src/pages/DesignSystem/Dashboard/index.js +0 -22
  83. package/src/pages/DesignSystem/Dashboard/quickstart.js +0 -84
  84. package/src/pages/DesignSystem/Dashboard/state.js +0 -142
  85. package/src/pages/DesignSystem/Dashboard/summary.js +0 -52
  86. package/src/pages/DesignSystem/index.js +0 -187
  87. package/src/pages/Editor/index.js +0 -46
  88. package/src/pages/Editor/layers.js +0 -126
  89. package/src/pages/Editor/scene.js +0 -95
  90. package/src/pages/Editor/style.js +0 -13
  91. package/src/pages/Editor/tools.js +0 -360
  92. package/src/pages/Export/const.js +0 -19
  93. package/src/pages/Export/description.js +0 -88
  94. package/src/pages/Export/gist.js +0 -23
  95. package/src/pages/Export/index.js +0 -82
  96. package/src/pages/Export/scene.js +0 -59
  97. package/src/pages/Export/state.js +0 -23
  98. package/src/pages/Export/tools.js +0 -101
  99. package/src/pages/Fonts/fontFaces.js +0 -50
  100. package/src/pages/Fonts/fontFamilies.js +0 -48
  101. package/src/pages/Fonts/index.js +0 -16
  102. package/src/pages/Fonts/state.js +0 -5
  103. package/src/pages/Icons/index.js +0 -92
  104. package/src/pages/Icons/style.js +0 -1
  105. package/src/pages/Init/ChooseEnvironment.js +0 -149
  106. package/src/pages/Init/ChooseProject.js +0 -61
  107. package/src/pages/Init/CreateDocumentTheme.js +0 -176
  108. package/src/pages/Init/CreatePalette.js +0 -94
  109. package/src/pages/Init/FontText.js +0 -33
  110. package/src/pages/Init/Personalize/fields.js +0 -120
  111. package/src/pages/Init/Personalize/icon.js +0 -76
  112. package/src/pages/Init/Personalize/index.js +0 -120
  113. package/src/pages/Init/index.js +0 -39
  114. package/src/pages/Library/disabled.js +0 -38
  115. package/src/pages/Library/index.js +0 -33
  116. package/src/pages/MediaQuery/index.js +0 -46
  117. package/src/pages/MediaQuery/lists.js +0 -299
  118. package/src/pages/MediaQuery/state.js +0 -149
  119. package/src/pages/MediaQuery/typeScale.js +0 -69
  120. package/src/pages/Shapes/index.js +0 -75
  121. package/src/pages/Shapes/shapeSet.js +0 -133
  122. package/src/pages/Shapes/style.js +0 -11
  123. package/src/pages/Spaces/index.js +0 -65
  124. package/src/pages/Spaces/sequence.js +0 -34
  125. package/src/pages/Spaces/templates.js +0 -37
  126. package/src/pages/State/index.js +0 -87
  127. package/src/pages/Theme/buttonTitlesGrid.js +0 -47
  128. package/src/pages/Theme/buttonsHeader.js +0 -33
  129. package/src/pages/Theme/friendTheme.js +0 -30
  130. package/src/pages/Theme/index.js +0 -226
  131. package/src/pages/Theme/interactivity.js +0 -115
  132. package/src/pages/Theme/ntc.js +0 -1689
  133. package/src/pages/Theme/preview.js +0 -152
  134. package/src/pages/Theme/selectsGrid.js +0 -74
  135. package/src/pages/Theme/style.js +0 -38
  136. package/src/pages/Theme/themingTools.js +0 -106
  137. package/src/pages/Typography/collection.js +0 -115
  138. package/src/pages/Typography/documentStyles.js +0 -113
  139. package/src/pages/Typography/index.js +0 -71
  140. package/src/pages/Typography/rangeButtons.js +0 -58
  141. package/src/pages/Typography/shared.js +0 -9
  142. package/src/pages/Typography/stylesHelpers.js +0 -30
  143. package/src/pages/Typography/typeScale.js +0 -83
  144. package/src/pages/__Account/__/index.js +0 -241
  145. package/src/pages/__Account/__/setUpProject.js +0 -142
  146. package/src/pages/__Account/index.js +0 -111
  147. package/src/pages/index.js +0 -17
  148. package/src/state.js +0 -20
  149. package/src/style.js +0 -20
@@ -1,176 +0,0 @@
1
- 'use strict'
2
-
3
- import { Clickable, Flex, GlobalThemeTemplate } from '@symbo.ls/components'
4
- import { InitPage } from '../../components'
5
-
6
- const paragraphs = {
7
- extend: Flex,
8
- childExtend: { tag: 'p' },
9
- ...['To personalize your Symbols experience, we need to get started with themes',
10
- 'Please fill in the document dark and light themes']
11
- }
12
-
13
- const modes = {
14
- extend: Flex,
15
- props: {
16
- gap: 'C',
17
- margin: '- -Z E2'
18
- },
19
-
20
- childExtend: {
21
- extend: [Clickable, GlobalThemeTemplate],
22
-
23
- props: ({ state }) => ({
24
- minWidth: 'G3',
25
- maxWidth: '406px',
26
- position: 'relative',
27
- maxHeight: 'E2',
28
- boxSizing: 'content-box',
29
- align: 'flex-start flex-start',
30
- padding: 'A A Z',
31
- overflow: 'hidden',
32
- round: 'A1',
33
- color: state.color,
34
- background: state.background,
35
- wrap: 'wrap',
36
- transitionProperty: 'transform, opacity, border-radius',
37
-
38
- icon: {
39
- boxSize: 'C C',
40
- color: 'yellow 1 +5',
41
- background: 'yellow .2',
42
- pointerEvents: 'none',
43
- fontSize: `B`
44
- },
45
-
46
- article: {
47
- padding: 'X2 - - -',
48
- title: { fontSize: 'D2', fontWeight: 'bold' }
49
- },
50
-
51
- '.active': {
52
- opacity: '1',
53
- round: 'A1 A1 Y2 Y2',
54
-
55
- style: {
56
- '[buttons]': {
57
- opacity: '1',
58
- transform: 'translate3d(0, 0, 0)'
59
- }
60
- }
61
- }
62
- }),
63
-
64
- icon: {},
65
- article: {
66
-
67
- },
68
-
69
- ThemeButtons: {
70
- position: 'absolute',
71
- left: 'W',
72
- right: 'W',
73
- bottom: 'W',
74
- opacity: '0',
75
- transition: 'B defaultBezier',
76
- transitionProperty: 'transform, opacity',
77
- transform: 'translate3d(0, 100%, 0)',
78
- columnGap: 'W'
79
- },
80
-
81
- Span: {
82
- width: '100%',
83
- fontSize: 'Z',
84
- color: 'gray7',
85
- fontStyle: 'italic',
86
- pointerEvents: 'none',
87
- margin: 'C 0 0 X2',
88
- text: 'click to change'
89
- },
90
-
91
- on: {
92
- click: (ev, el, s) => {
93
- if (ev.target === el.node) {
94
- el.setProps({ active: !el.props.active })
95
- }
96
- },
97
- stateUpdated: (el, s, changes) => {
98
- const { color, background } = s
99
- s.projectSystemUpdate({
100
- THEME: {
101
- document: {
102
- ['@' + s.key]: { color, background }
103
- }
104
- }
105
- }, { preventUpdate: true })
106
- }
107
- }
108
- },
109
-
110
- $setStateCollection: ({ state }) => state.values
111
- }
112
-
113
- export const CreateDocumentTheme = {
114
- extend: InitPage,
115
-
116
- props: {
117
- flow: 'column',
118
- align: 'flex-start',
119
-
120
- paragraphs: {
121
- gap: 'E',
122
- margin: '- - D1 -',
123
- childProps: {
124
- color: 'gray6',
125
- maxWidth: `G1`
126
- }
127
- }
128
- },
129
-
130
- back: { props: { href: '/init/personalize' } },
131
-
132
- HeaderHeading: {},
133
- paragraphs,
134
- modes,
135
-
136
- ContinueButton: {
137
- href: '/init/pallete'
138
- },
139
-
140
- on: {
141
- init: ({ state }) => {
142
- const { THEME, COLOR } = state.__projectSystem
143
- console.log(state.__projectSystem)
144
- if (!THEME || !THEME.document) return
145
- const { document } = THEME
146
- const dark = document['@dark']
147
- const light = document['@light']
148
-
149
- const colorRef = {}
150
-
151
- if (dark) {
152
- colorRef.dark = {
153
- key: 'dark',
154
- title: 'Night',
155
- icon: 'moon',
156
- color: COLOR[dark.color] || dark.color || '#FFFFFF',
157
- background: COLOR[dark.background] || dark.background || '#000000'
158
- }
159
- }
160
-
161
- if (light) {
162
- colorRef.light = {
163
- key: 'light',
164
- title: 'Day',
165
- icon: 'sun',
166
- color: COLOR[light.color] || light.color || '#000000',
167
- background: COLOR[light.background] || light.background || '#FFFFFF'
168
- }
169
- }
170
-
171
- state.update({
172
- values: colorRef
173
- }, { preventUpdate: true, ignoreInitUpdate: true })
174
- }
175
- }
176
- }
@@ -1,94 +0,0 @@
1
- 'use strict'
2
-
3
- import { observe, upload } from '@symbo.ls/based'
4
- import { Flex, ColorPickerWithTitle } from '@symbo.ls/components'
5
- import { InitPage } from '../../components'
6
-
7
- const colors = {
8
- extend: Flex,
9
- props: {
10
- width: 'F3',
11
- flow: 'column',
12
- gap: 'B1',
13
- opacity: '.75'
14
- },
15
-
16
- childExtend: {
17
- extend: ColorPickerWithTitle,
18
- props: ({ state }) => ({
19
- title: { text: state.title }
20
- })
21
- },
22
-
23
- $setStateCollection: ({ state }) => [{
24
- title: 'Accent color',
25
- value: state[0]
26
- }, {
27
- title: 'Secondary Color',
28
- value: state[1]
29
- }, {
30
- title: 'Inactive Color',
31
- value: state[2]
32
- }]
33
- }
34
-
35
- const content = {
36
- extend: Flex,
37
- props: {
38
- margin: '- - F -',
39
- align: 'flex-start',
40
- gap: 'E2',
41
- ColorsPalette: {
42
- margin: '- - - auto'
43
- }
44
- },
45
-
46
- colors,
47
-
48
- ImageColorPicker: {
49
- props: {},
50
- title: {},
51
- element: {
52
- upload: {
53
- input: {
54
- on: {
55
- change: (ev, el, s) => {
56
- upload(ev.target.files[0], d => {
57
- observe({
58
- $id: d.id,
59
- $all: true
60
- }, pic => {
61
- if (pic.progress) s.update({ imageUrl: pic.src })
62
- })
63
- })
64
- }
65
- }
66
- }
67
- }
68
- }
69
- },
70
- ColorsPalette: {
71
- props: ({ state }) => ({
72
- hide: state.imageUrl,
73
- margin: '- - auto'
74
- })
75
- }
76
- }
77
-
78
- export const CreatePallete = {
79
- extend: InitPage,
80
-
81
- back: { props: { href: '/init/theme' } },
82
-
83
- HeaderHeading: {
84
- margin: '- - D -',
85
- Caption: { text: `Let's get started` },
86
- H1: { text: 'Create your palette' }
87
- },
88
-
89
- content,
90
-
91
- ContinueButton: {
92
- href: '/init/font'
93
- }
94
- }
@@ -1,33 +0,0 @@
1
- 'use strict'
2
-
3
- import { InitPage } from '../../components'
4
-
5
- import tools from '../Export/tools'
6
-
7
- export const FontText = {
8
- extend: InitPage,
9
-
10
- back: { props: { href: '/init/pallete' } },
11
-
12
- state: {
13
- base: 16,
14
- ratio: 1.618
15
- },
16
-
17
- HeaderHeading: {
18
- props: { margin: '- - D2 -' },
19
- Caption: { text: `Let's customize` },
20
- H1: { text: 'Typography' }
21
- },
22
-
23
- FontText: {
24
- margin: '- -Z A'
25
- },
26
- tools: {
27
- extend: tools.tools
28
- },
29
-
30
- ContinueButton: {
31
- href: '/init/env'
32
- }
33
- }
@@ -1,120 +0,0 @@
1
- 'use strict'
2
-
3
- import { CommonField, Input, Grid, SelectField } from '@symbo.ls/components'
4
-
5
- export default {
6
- extend: Grid,
7
- props: {
8
- columns: 'repeat(2, 270px)',
9
- columnGap: 'C',
10
- rowGap: 'C2'
11
- },
12
-
13
- childExtend: {
14
- extend: CommonField,
15
- props: {
16
- position: 'relative',
17
- align: 'stretch flex-start',
18
- element: {
19
- margin: '- -Z',
20
- width: 'auto',
21
- padding: 'Z1 A2'
22
- }
23
- },
24
- title: {},
25
- element: {
26
- on: {
27
- change: (ev, el, s) => {
28
- s.update({ [el.parent.key]: ev.target.value })
29
- }
30
- }
31
- }
32
- },
33
-
34
- projectName: {
35
- title: { text: 'Name the project' },
36
- element: {
37
- extend: Input,
38
- props: ({ state }) => ({
39
- placeholder: 'You name it',
40
- value: state.projectName,
41
- required: true
42
- })
43
- }
44
- },
45
-
46
- appKey: {
47
- title: { text: 'Key' },
48
- element: {
49
- extend: Input,
50
- props: ({ state }) => ({
51
- placeholder: 'a-zA-Z0-9',
52
- value: state.appKey && state.appKey.split('.')[0],
53
- required: true
54
- }),
55
- on: {
56
- change: (ev, el, s) => {
57
- s.update({ [el.parent.key]: ev.target.value + '.symbo.ls' })
58
- }
59
- }
60
- },
61
- Span: {
62
- position: 'absolute',
63
- opacity: '.65',
64
- text: '.symbo.ls',
65
- right: 'Z2',
66
- bottom: 'Z',
67
- pointerEvents: 'none'
68
- }
69
- },
70
-
71
- urlVisibility: {
72
- title: { text: 'URL Access' },
73
- element: {
74
- extend: [SelectField],
75
- props: {
76
- style: { padding: '0' },
77
- round: 'C1'
78
- },
79
- title: null,
80
- buttons: {
81
- props: {
82
- position: 'absolute',
83
- right: 'Z',
84
- pointerEvents: 'none'
85
- }
86
- },
87
-
88
- Select: {
89
- props: {
90
- outline: 'none',
91
- border: 'none',
92
- background: 'transparent',
93
- color: 'currentColor',
94
- padding: 'Z1 A2',
95
- round: 'C1',
96
- width: '100%',
97
-
98
- style: {
99
- cursor: 'default',
100
- appearance: 'none'
101
- },
102
-
103
- name: 'user',
104
- id: 'user'
105
- },
106
-
107
- childExtend: { tag: 'option', text: ({ state }) => state.text },
108
- $setCollection: () => [
109
- { text: 'Private' },
110
- { text: 'Public' }
111
- ],
112
- on: {
113
- change: (ev, { parent }) => {
114
- // parent.user.update({ key: ev.target.value })
115
- }
116
- }
117
- }
118
- }
119
- }
120
- }
@@ -1,76 +0,0 @@
1
- 'use strict'
2
-
3
- import { observe, set, upload } from '@symbo.ls/based'
4
- import { User } from '@symbo.ls/components'
5
- import { UploadImage } from '../../../components'
6
-
7
- export default {
8
- extend: UploadImage,
9
- props: ({ state }) => ({
10
- position: 'relative',
11
-
12
- title: { text: 'Project icon' },
13
-
14
- element: {
15
- flow: 'column',
16
- position: 'relative',
17
- width: 'fit-content',
18
- padding: 'A',
19
- gap: '0',
20
- opacity: !!state.icon,
21
-
22
- p: {
23
- text: 'Drag and drop or click',
24
- maxWidth: 'E',
25
- textAlign: 'center'
26
- }
27
- }
28
- }),
29
-
30
- title: {},
31
- element: {
32
- input: {
33
- on: {
34
- change: (ev, el, s) => {
35
- s.update({ icon: { pending: true } })
36
-
37
- try {
38
- upload(ev.target.files[0], d => {
39
- observe({
40
- $id: d.id,
41
- $all: true
42
- }, icon => {
43
- if (icon.progress) {
44
- delete s.icon.pending
45
- set({
46
- $id: s.projectId,
47
- type: 'project',
48
- icon
49
- })
50
- s.update({ icon })
51
- }
52
- })
53
- })
54
- } catch (e) {
55
- console.log(e)
56
- }
57
- }
58
- }
59
- }
60
- },
61
-
62
- User: {
63
- extend: User,
64
- props: ({ state }) => ({
65
- position: 'absolute',
66
- fontSize: 'H',
67
- bottom: 'Y',
68
- left: 'Y1',
69
- src: state.icon && state.icon.src,
70
- key: state.projectName,
71
- transition: 'C defaultBezier opacity',
72
- opacity: (state.icon && state.icon.src) ? '1' : '0',
73
- pointerEvents: 'none'
74
- })
75
- }
76
- }
@@ -1,120 +0,0 @@
1
- 'use strict'
2
-
3
- import { InitPage } from '../../../components'
4
-
5
- import { Flex, Form } from '@symbo.ls/components'
6
- import { router } from '@domql/router'
7
- import { isArray } from '@domql/utils'
8
-
9
- import icon from './icon'
10
- import fields from './fields'
11
- import { set } from '@symbo.ls/based'
12
-
13
- export const Personalize = {
14
- extend: InitPage,
15
- props: {
16
- height: '100%'
17
- },
18
-
19
- back: { props: { href: '/init/' } },
20
-
21
- HeaderHeading: {
22
- props: { margin: '- - D1 -' },
23
- Caption: { text: `Let's personalize your Symbols` },
24
- H1: { text: ({ state }) => `Hi ${(state.userName && state.userName.split(' ')[0]) || ''}` }
25
- },
26
-
27
- ColumnParagraphs: {
28
- extend: true,
29
- ...[
30
- { props: { text: `In this example we'll initialize a Symbols Design System for you.` } },
31
- { props: { text: `You can connect Symbols to your app and style it online.` } }
32
- ]
33
- },
34
-
35
- Form: {
36
- extend: [Form, Flex],
37
- props: {
38
- flex: 1,
39
- flow: 'column',
40
- align: 'flex-start space-between'
41
- },
42
-
43
- Flex: {
44
- props: { gap: 'D1', align: 'flex-start' },
45
-
46
- icon,
47
- fields
48
- },
49
-
50
- ContinueButton: {
51
- href: null,
52
- type: 'submit'
53
- },
54
-
55
- on: {
56
- submit: (ev, el, s) => {
57
- ev.preventDefault()
58
- console.log(1, s.parse())
59
- router(el.__root, '/init/theme', {})
60
- }
61
- }
62
- }
63
- }
64
-
65
- export const CreateProject = {
66
- extend: Personalize,
67
-
68
- back: null,
69
-
70
- HeaderHeading: {
71
- props: { margin: '- - D1 -' },
72
- Caption: { text: ({ state }) => `Hi ${state.userName}, let's start` },
73
- H1: { text: `Creating a Project` }
74
- },
75
-
76
- ColumnParagraphs: {
77
- extend: true,
78
- ...[
79
- { props: { text: `In this example we'll initialize a Symbols Design System for you.` } },
80
- { props: { text: `You can connect Symbols to your app and style it online.` } }
81
- ]
82
- },
83
-
84
- Form: {
85
- state: {},
86
- Flex: {},
87
-
88
- ContinueButton: {
89
- href: null,
90
- type: 'submit'
91
- },
92
-
93
- on: {
94
- submit: (ev, el, s) => {
95
- ev.preventDefault()
96
- console.log(2, s.parse())
97
- const parentState = s.parent
98
- const { projects, userId, username } = parentState
99
- const setProject = {
100
- type: 'project',
101
- key: s.appKey,
102
- name: s.projectName,
103
- icon: s.icon,
104
- visibility: s.visibility || 'private',
105
- users: userId
106
- }
107
- console.log(setProject)
108
- set(setProject, async d => {
109
- await el.context.fetchProject(el, s.parent, {
110
- username,
111
- projectId: d.id,
112
- activeProject: isArray(projects) ? projects.length : 0
113
- })
114
- router(el.__root, '/init/theme', {})
115
- })
116
- // router(el.__root, '/init/theme', {})
117
- }
118
- }
119
- }
120
- }
@@ -1,39 +0,0 @@
1
- 'use strict'
2
-
3
- import { Flex } from '@symbo.ls/components'
4
- import { CreateProject, Personalize } from './Personalize'
5
- import { ChooseProject } from './ChooseProject'
6
- import { CreateDocumentTheme } from './CreateDocumentTheme'
7
- import { CreatePallete } from './CreatePalette'
8
- import { FontText } from './FontText'
9
- import { ChooseEnvironment } from './ChooseEnvironment'
10
- import { router } from '@domql/router'
11
-
12
- export const Init = {
13
- extend: Flex,
14
-
15
- props: {
16
- boxSize: '100% 100%',
17
- gap: 'A',
18
- padding: '8.5% E1 E1 12.5%'
19
- },
20
-
21
- define: { routes: param => param },
22
- routes: {
23
- '/*': ChooseProject,
24
- '/create': CreateProject,
25
- '/personalize': Personalize,
26
- '/theme': CreateDocumentTheme,
27
- '/pallete': CreatePallete,
28
- '/font': FontText,
29
- '/env': ChooseEnvironment
30
- },
31
-
32
- on: {
33
- render: element => {
34
- const { pathname, hash } = window.location
35
- const url = pathname + hash
36
- router(element, url, {}, { level: 1 })
37
- }
38
- }
39
- }
@@ -1,38 +0,0 @@
1
- 'use strict'
2
-
3
- import { ComponentTemplate } from '@symbo.ls/components'
4
- import { Page, DisabledPage } from '../../components'
5
-
6
- import { COMPONENTS } from '../../../.symbols' // eslint-disable-line
7
-
8
- export const Library = {
9
- extend: [Page, DisabledPage],
10
-
11
- SectionHeader: {
12
- title: 'My Symbols',
13
- p: 'This is the first collection of your components'
14
- },
15
-
16
- Grid: {
17
- props: {
18
- flex: 1,
19
- templateColumns: 'repeat(12, 1fr)',
20
- autoFlow: 'dense',
21
- autoColumns: 'auto',
22
- autoRows: 'auto',
23
- justifyItems: 'stretch',
24
-
25
- margin: '- -Z2 B1',
26
- gap: 'A'
27
- },
28
-
29
- childExtend: ComponentTemplate,
30
- $setStateCollection: () => {
31
- return new Array(15).fill(void 0).map(v => ({
32
- settings: {
33
- gridOptions: { colspan: 3, rowspan: 1 }
34
- }
35
- }))
36
- }
37
- }
38
- }