@symbo.ls/preview 0.0.98 → 2.0.7

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 (216) hide show
  1. package/README.md +19 -0
  2. package/app.webmanifest +4 -0
  3. package/index.html +14 -4
  4. package/netlify.toml +19 -0
  5. package/package.json +32 -32
  6. package/protect-pwd.js +65 -0
  7. package/src/animations.js +71 -0
  8. package/src/app.js +68 -30
  9. package/src/assets/dots.png +0 -0
  10. package/src/assets/dotsDark.png +0 -0
  11. package/src/config/index.js +31 -12
  12. package/src/config/theme.js +71 -1
  13. package/src/data/Symbols.sketch +0 -0
  14. package/src/data/_Symbols.sketch/document.json +1 -0
  15. package/src/data/_Symbols.sketch/fonts/6c9956fc8970ec3d8268c3f286afe19d954fc40b +0 -0
  16. package/src/data/_Symbols.sketch/fonts/750e9b005158d57108ebbcf288e2582f078d6735 +0 -0
  17. package/src/data/_Symbols.sketch/fonts/86c45cb69ad4ba2a8e6d0b81f20964b33f4eca6c +0 -0
  18. package/src/data/_Symbols.sketch/fonts/f97cec7aed309ec77b4fd3005d1a3e0d86c2a7b9 +0 -0
  19. package/src/data/_Symbols.sketch/images/0427bc225ee7dc33db78252defd5b2e4cd5b7467.png +0 -0
  20. package/src/data/_Symbols.sketch/images/0c4846cdd2f11ffb23c9ce063380fc934f7a11ea.png +0 -0
  21. package/src/data/_Symbols.sketch/images/55d3f5e93869fbd70e8dfbca1ce3dfa0cc9f2dbe.png +0 -0
  22. package/src/data/_Symbols.sketch/images/67ae1583a9d77eec7106f5016f48b5594a02b3f6.png +0 -0
  23. package/src/data/_Symbols.sketch/images/7152b3ea22388d53052d0212995a1805527ea862.png +0 -0
  24. package/src/data/_Symbols.sketch/images/72f1896a8462385fd596bc35f240382ba15814fc.png +0 -0
  25. package/src/data/_Symbols.sketch/images/73e4245b1f867343001657193ff2318c9cf2ef53.png +0 -0
  26. package/src/data/_Symbols.sketch/images/7b89dae77676fb4cfd072e0830cff9c27afd11c6.png +0 -0
  27. package/src/data/_Symbols.sketch/images/811e2b516575d3b4e7709dfef6369bce7dae0a26.png +0 -0
  28. package/src/data/_Symbols.sketch/images/82d006789579f2ee1fa45c9116f7cd7dd1bcbe37.png +0 -0
  29. package/src/data/_Symbols.sketch/images/8a896270aa4da8e2401d0ea76e46dc9b9125e59a.png +0 -0
  30. package/src/data/_Symbols.sketch/images/966688c4a579283836f15ab69c8b76e11b236ff5.png +0 -0
  31. package/src/data/_Symbols.sketch/images/b903a498e1d438e8bb12de5422f732c717b79eff.png +0 -0
  32. package/src/data/_Symbols.sketch/images/b9f3cae81a855e21ae75185dcb6ae6551c5447f1.png +0 -0
  33. package/src/data/_Symbols.sketch/images/cd0f908410abf4cad7a4501539eb0711c41a182f.png +0 -0
  34. package/src/data/_Symbols.sketch/images/d54f15f130ba4f1d4ad56f03c01ac06fe0ab4f56.png +0 -0
  35. package/src/data/_Symbols.sketch/images/df5a20029363f95abc58b2c8972e1417d84c8aa7.png +0 -0
  36. package/src/data/_Symbols.sketch/images/e889546970c931244400c2f70412c39123029cb3.png +0 -0
  37. package/src/data/_Symbols.sketch/images/f420a7a2beb15bee5d2ecbba8f296c6d4b22dfa3.png +0 -0
  38. package/src/data/_Symbols.sketch/meta.json +1 -0
  39. package/src/data/_Symbols.sketch/pages/31D11772-FB33-42EC-A3CC-79F63922E04D.json +1 -0
  40. package/src/data/_Symbols.sketch/pages/35BD91AD-F0ED-4002-891D-F1B3250E88C1.json +1 -0
  41. package/src/data/_Symbols.sketch/pages/4831AF31-ECB8-4DA6-B4D0-C1095D42146C.json +1 -0
  42. package/src/data/_Symbols.sketch/pages/6FCC0155-B3F4-4792-892E-523D45315AFD.json +1 -0
  43. package/src/data/_Symbols.sketch/pages/7996D5DD-C5B2-4EE7-9DE8-2C05E2ACA9F3.json +1 -0
  44. package/src/data/_Symbols.sketch/pages/B314C0F3-0038-473F-A127-536AF28E5272.json +1 -0
  45. package/src/data/_Symbols.sketch/pages/B6798E64-F7E9-40F5-9BD0-88A548478438.json +1 -0
  46. package/src/data/_Symbols.sketch/pages/B9B28DF3-EDC2-4D5B-A412-12B3B2E7DE58.json +1 -0
  47. package/src/data/_Symbols.sketch/pages/CA6E47E4-DAF7-4D1D-8DDC-D5A60508D9A0.json +1 -0
  48. package/src/data/_Symbols.sketch/pages/D6F5EB10-9D31-47AC-9077-1CE8CB2C2448.json +1 -0
  49. package/src/data/_Symbols.sketch/previews/preview.png +0 -0
  50. package/src/data/_Symbols.sketch/user.json +1 -0
  51. package/src/data/categories.js +44 -0
  52. package/src/data/components/button-archived/index.js +63 -0
  53. package/src/data/components/button-archived/style.js +5 -0
  54. package/src/data/components/button-circle/index.js +54 -0
  55. package/src/data/components/button-contacts/index.js +56 -0
  56. package/src/data/components/button-contacts/style.js +13 -0
  57. package/src/data/components/button-download/index.js +63 -0
  58. package/src/data/components/button-pro/index.js +98 -0
  59. package/src/data/components/button-pro/style.js +19 -0
  60. package/src/data/components/button-theme-switcher/index.js +104 -0
  61. package/src/data/components/button-theme-switcher/style.js +16 -0
  62. package/src/data/components/button-user/index.js +82 -0
  63. package/src/data/components/button-user/style.js +25 -0
  64. package/src/data/components/datepicker/index.js +40 -0
  65. package/src/data/components/datepicker/style.js +4 -0
  66. package/src/data/components/dropdown-list/index.js +56 -0
  67. package/src/data/components/field/index.js +40 -0
  68. package/src/data/components/index.js +34 -0
  69. package/src/data/components/label/index.js +40 -0
  70. package/src/data/components/notification/index.js +55 -0
  71. package/src/data/components/notification/style.js +20 -0
  72. package/src/data/components/pills/index.js +37 -0
  73. package/src/data/components/tooltip/index.js +38 -0
  74. package/src/data/index.js +3 -0
  75. package/src/data/library/button-circle/index.js +52 -0
  76. package/src/data/library/button-join/index.js +61 -0
  77. package/src/data/library/family-bundle/index.js +99 -0
  78. package/src/data/library/family-bundle/style.js +27 -0
  79. package/src/data/library/index.js +15 -0
  80. package/src/data/library/join-class/index.js +45 -0
  81. package/src/data/library/parent-mode/index.js +69 -0
  82. package/src/data/library/parent-mode/style.js +25 -0
  83. package/src/index.html +57 -0
  84. package/src/index.js +7 -0
  85. package/src/pages/Account/index.js +147 -17
  86. package/src/pages/Account/{__/setUpProject.js → setUpProject.js} +10 -10
  87. package/src/pages/Color/colors.js +58 -0
  88. package/src/pages/Color/documentThemes.js +101 -0
  89. package/src/pages/Color/index.js +10 -7
  90. package/src/pages/Color/style.js +7 -0
  91. package/src/pages/Color/themes.js +117 -23
  92. package/src/pages/ColorEditor/colorTone.js +163 -0
  93. package/src/pages/{Theme → ColorEditor}/friendTheme.js +3 -3
  94. package/src/pages/ColorEditor/index.js +178 -0
  95. package/src/pages/{Theme → ColorEditor}/interactivity.js +7 -6
  96. package/src/pages/{Theme → ColorEditor}/style.js +12 -1
  97. package/src/pages/{Theme → ColorEditor}/themingTools.js +12 -12
  98. package/src/pages/Editor/index.js +9 -7
  99. package/src/pages/Editor/layers.js +14 -14
  100. package/src/pages/Editor/scene.js +9 -7
  101. package/src/pages/Editor/tools.js +22 -22
  102. package/{.legacy → src/pages/Export}/_tools_old.js +6 -7
  103. package/src/pages/Export/const.js +4 -3
  104. package/src/pages/Export/description.js +87 -58
  105. package/src/pages/Export/header.js +37 -0
  106. package/src/pages/Export/index.js +39 -48
  107. package/src/pages/Export/scene.js +61 -98
  108. package/src/pages/Export/state.js +5 -11
  109. package/src/pages/Export/style.js +28 -0
  110. package/src/pages/Export/tools.js +86 -41
  111. package/src/pages/Icons/index.js +69 -73
  112. package/src/pages/Icons/style.js +18 -0
  113. package/src/pages/Library/index.js +47 -24
  114. package/src/pages/Library/style.js +43 -0
  115. package/src/pages/PageProto.js +26 -0
  116. package/src/pages/Shapes/index.js +204 -54
  117. package/src/pages/Shapes/style.js +28 -0
  118. package/src/pages/Spaces/boxModel.js +3 -0
  119. package/src/pages/Spaces/index.js +47 -23
  120. package/{.legacy → src/pages/Spaces}/preview.js +14 -14
  121. package/src/pages/Spaces/sequence.js +1 -30
  122. package/src/pages/Spaces/state.js +14 -12
  123. package/{.legacy → src/pages/Spaces}/style.js +3 -0
  124. package/src/pages/Typography/docFonts.js +128 -0
  125. package/src/pages/Typography/docStyles.js +97 -0
  126. package/src/pages/Typography/index.js +36 -28
  127. package/src/pages/Typography/shared.js +3 -2
  128. package/src/pages/Typography/state.js +8 -9
  129. package/src/pages/Typography/style.js +11 -0
  130. package/src/pages/Typography/typeScale.js +82 -63
  131. package/src/pages/index.js +23 -15
  132. package/src/protect.js +114 -0
  133. package/src/state.js +3 -0
  134. package/src/style.js +12 -15
  135. package/src/test.js +30 -0
  136. package/svgSprite.config.js +1 -2
  137. package/test/index.test.js +5 -0
  138. package/.legacy/index copy.js +0 -45
  139. package/.vscode/extensions.json +0 -5
  140. package/index.js +0 -44
  141. package/src/assets/dark.png +0 -0
  142. package/src/assets/mask1.png +0 -0
  143. package/src/assets/mask2.png +0 -0
  144. package/src/assets/shapes.png +0 -0
  145. package/src/assets/space.png +0 -0
  146. package/src/assets/type.png +0 -0
  147. package/src/components/Aside.js +0 -101
  148. package/src/components/Banner.js +0 -58
  149. package/src/components/ColorText.js +0 -29
  150. package/src/components/ColorsPalette.js +0 -69
  151. package/src/components/ColumnParagrphs.js +0 -23
  152. package/src/components/ContinueButton.js +0 -14
  153. package/src/components/DesignComponent.js +0 -80
  154. package/src/components/FontText.js +0 -193
  155. package/src/components/Header.js +0 -50
  156. package/src/components/HeaderHeading.js +0 -23
  157. package/src/components/IconsGroup.js +0 -60
  158. package/src/components/Page.js +0 -135
  159. package/src/components/ResponsivePreview.js +0 -44
  160. package/src/components/Route.js +0 -1
  161. package/src/components/ShapePreview.js +0 -63
  162. package/src/components/ShapeSet.js +0 -85
  163. package/src/components/SlidersWithResponsive.js +0 -23
  164. package/src/components/SpacingButton/actionButtons.js +0 -41
  165. package/src/components/SpacingButton/dropdown.js +0 -114
  166. package/src/components/SpacingButton/index.js +0 -248
  167. package/src/components/SpacingButton/props.js +0 -45
  168. package/src/components/SpacingPreview.js +0 -154
  169. package/src/components/SpacingTable.js +0 -210
  170. package/src/components/ThemeButtons.js +0 -42
  171. package/src/components/UploadImage.js +0 -61
  172. package/src/components/Widget.js +0 -1
  173. package/src/components/index.js +0 -25
  174. package/src/pages/Account/__/index.js +0 -241
  175. package/src/pages/Color/globalThemes.js +0 -30
  176. package/src/pages/Color/palette.js +0 -35
  177. package/src/pages/Components/grid.js +0 -99
  178. package/src/pages/Components/index.js +0 -37
  179. package/src/pages/Components/sidebar.js +0 -28
  180. package/src/pages/Components/style.js +0 -16
  181. package/src/pages/DesignSystem/Dashboard/banners.js +0 -38
  182. package/src/pages/DesignSystem/Dashboard/designElements.js +0 -124
  183. package/src/pages/DesignSystem/Dashboard/index.js +0 -22
  184. package/src/pages/DesignSystem/Dashboard/quickstart.js +0 -86
  185. package/src/pages/DesignSystem/Dashboard/state.js +0 -118
  186. package/src/pages/DesignSystem/Dashboard/summary.js +0 -40
  187. package/src/pages/DesignSystem/index.js +0 -187
  188. package/src/pages/Export/gist.js +0 -23
  189. package/src/pages/Fonts/fontFaces.js +0 -50
  190. package/src/pages/Fonts/fontFamilies.js +0 -47
  191. package/src/pages/Fonts/index.js +0 -15
  192. package/src/pages/Fonts/state.js +0 -5
  193. package/src/pages/Init/ChooseEnvironment.js +0 -104
  194. package/src/pages/Init/CreateDocumentTheme.js +0 -166
  195. package/src/pages/Init/CreatePalette.js +0 -72
  196. package/src/pages/Init/FontText.js +0 -23
  197. package/src/pages/Init/Personalize/fields.js +0 -109
  198. package/src/pages/Init/Personalize/icon.js +0 -42
  199. package/src/pages/Init/Personalize/index.js +0 -37
  200. package/src/pages/Init/index.js +0 -36
  201. package/src/pages/Library/disabled.js +0 -38
  202. package/src/pages/MediaQuery/index.js +0 -46
  203. package/src/pages/MediaQuery/lists.js +0 -285
  204. package/src/pages/MediaQuery/state.js +0 -150
  205. package/src/pages/MediaQuery/typeScale.js +0 -69
  206. package/src/pages/Shapes/shapeSet.js +0 -133
  207. package/src/pages/State/index.js +0 -86
  208. package/src/pages/Theme/index.js +0 -197
  209. package/src/pages/Theme/preview.js +0 -153
  210. package/src/pages/Typography/collection.js +0 -110
  211. package/src/pages/Typography/documentStyles.js +0 -125
  212. package/src/pages/Typography/rangeButtons.js +0 -58
  213. package/src/pages/Typography/stylesHelpers.js +0 -30
  214. /package/{.legacy/boxModel.js → src/data/favorites.js} +0 -0
  215. /package/{.legacy/sequence.js → src/data/filters.js} +0 -0
  216. /package/src/pages/{Theme → ColorEditor}/ntc.js +0 -0
@@ -1,36 +1,130 @@
1
1
  'use strict'
2
2
 
3
- import { ThemeTemplate, SectionHeader, Grid } from '@symbo.ls/components'
3
+ import { Block, COLOR, IconText, Link, opacify, Shape, Text, Flex, SectionHeader } from '@symbo.ls/all'
4
4
 
5
- const mapThemes = (el, s) => {
6
- if (!s.__system) return
7
- const { THEME } = s.__system
8
- const themeKeys = Object.keys(THEME)
9
- return themeKeys.map(v => ({ ...THEME[v], key: v }))
5
+ const style = {
6
+ width: '100%',
7
+ maxWidth: '25%',
8
+ flex: '.25 .3333 25%',
9
+ cursor: 'pointer',
10
+ color: 'white',
11
+ textDecoration: 'none',
12
+ boxSizing: 'border-box',
13
+ caption: {
14
+ marginTop: `${12 / 13}em`
15
+ },
16
+
17
+ '> *': {
18
+ transition: '350ms',
19
+ transitionProperty: 'opacity, transform',
20
+ opacity: 0.35
21
+ },
22
+
23
+ '&:hover > *': {
24
+ opacity: 1,
25
+ transform: 'scale(1.015)'
26
+ }
27
+ }
28
+
29
+ export const ThemeTemplate = {
30
+ proto: [Link, Block],
31
+ style,
32
+
33
+ props: (el) => ({
34
+ href: `/theme/${el.key}`,
35
+ padding: 'A Z1'
36
+ }),
37
+
38
+ theme: {
39
+ colors: {
40
+ proto: [Block, Text, Shape, Flex],
41
+ props: {
42
+ round: 'Z1'
43
+ },
44
+
45
+ style: {
46
+ boxShadow: `${COLOR.blue && opacify(COLOR.blue.value, 0.2)} 0 2px 35px`,
47
+ overflow: 'hidden',
48
+ div: {
49
+ flex: 1,
50
+ display: 'flex',
51
+ alignItems: 'center'
52
+ }
53
+ },
54
+ _icon: '',
55
+ sun: {
56
+ proto: [Shape, Block, IconText, Flex],
57
+ props: {
58
+ icon: 'sun',
59
+ size: 'Z',
60
+ padding: 'Z1 0 Z1 A',
61
+ round: 'Z1 0 0 Z1'
62
+ },
63
+ style: (element, state) => ({
64
+ background: state.background,
65
+ color: state.color,
66
+ borderBottomLeftRadius: '12px',
67
+ '&:only-child': {
68
+ borderRadius: 12
69
+ }
70
+ })
71
+ },
72
+ moon: {
73
+ if: (el, state) => state.themes,
74
+ proto: [Shape, Block, IconText, Flex],
75
+ props: {
76
+ theme: 'secondary',
77
+ padding: 'Z1 0 Z1 A',
78
+ icon: 'moon',
79
+ round: '0 Z1 Z1 0'
80
+ },
81
+ style: (element, state) => ({
82
+ background: '', // state.themes.dark.backgroundColor,
83
+ color: '' // state.themes.dark.color
84
+ })
85
+ }
86
+ }
87
+ },
88
+ caption: {
89
+ proto: [Block, Text],
90
+ props: {
91
+ size: 'Y',
92
+ padding: 'Z 0 0 0'
93
+ },
94
+ text: (el, state) => el.parent.key
95
+ }
10
96
  }
11
97
 
12
98
  export default {
99
+ tag: 'section',
13
100
  header: {
14
- extend: SectionHeader,
15
- state: {
16
- title: 'Themes',
17
- p: 'Themes are used to prepare color setting abstractly and apply it to any component',
18
- nav: [{
19
- icon: 'plus',
20
- href: '/colors/add-color'
21
- }]
101
+ proto: SectionHeader,
102
+ props: { padding: 'C 0 0 0' },
103
+ heading: {
104
+ caption: 'Theme',
105
+ p: { text: 'Themes are used to prepare color setting abstractly and apply it to any component' }
22
106
  }
23
107
  },
24
-
25
- content: {
26
- extend: Grid,
27
- props: {
28
- columns: 'repeat(5, 1fr)',
29
- gap: 'C2',
30
- margin: '0 -Z'
108
+ colors: {
109
+ style: {
110
+ display: 'flex',
111
+ flexWrap: 'wrap',
112
+ margin: '0 -16px'
31
113
  },
32
114
 
33
- childExtend: ThemeTemplate,
34
- $setStateCollection: (el, s) => mapThemes(el, s)
115
+ content: (el, s) => {
116
+ if (!el.__root.state.CONFIG) return
117
+ const { THEME } = el.__root.state.CONFIG
118
+
119
+ const Themes = {}
120
+ Object.keys(THEME).map(v => (Themes[v] = { state: THEME[v].value }))
121
+
122
+ return {
123
+ childProto: ThemeTemplate,
124
+ tag: 'fragment',
125
+
126
+ ...Themes
127
+ }
128
+ }
35
129
  }
36
130
  }
@@ -0,0 +1,163 @@
1
+ 'use strict'
2
+
3
+ import { Block, Text, opacify, Shape, Grid, Overflow } from '@symbo.ls/all'
4
+
5
+ const classOpacify = (el, opacity) => {
6
+ if (!el.state.value) return
7
+ const { background, backgroundColor, color } = el.state.value
8
+ const bg = background || backgroundColor || color
9
+ if (!bg) return
10
+ return { background: opacify(bg, opacity) }
11
+ }
12
+
13
+ const TONES_AMOUNT = 13
14
+ const TONES_ARR = new Array(TONES_AMOUNT).fill(0).map((_, i) => i)
15
+
16
+ export const Tones = {
17
+ proto: [Shape, Block, Grid, Overflow],
18
+ props: {
19
+ columns: `repeat(${TONES_AMOUNT}, 1fr)`,
20
+ height: 'B',
21
+ round: 'Z'
22
+ },
23
+ childProto: {
24
+ tag: 'span',
25
+ proto: Shape,
26
+ props: { round: 0 },
27
+ class: {
28
+ transition: {
29
+ transition: '165ms cubic-bezier(.29,.67,.51,.97)',
30
+ transitionProperty: 'color, background'
31
+ }
32
+ }
33
+ },
34
+ ...TONES_ARR.map(v => ({
35
+ class: { background: el => classOpacify(el, (100 / TONES_AMOUNT * v) / 100) }
36
+ }))
37
+ }
38
+
39
+ export const colorTones = {
40
+ tag: 'aside',
41
+ // proto: Block,
42
+ // style: styleColorTones,
43
+ props: { flexFlow: 'column' },
44
+ span: {
45
+ proto: [Text, Block],
46
+ props: {
47
+ text: 'Preview',
48
+ size: 'Z'
49
+ },
50
+ style: {
51
+ display: 'block',
52
+ marginBottom: '8px',
53
+ opacity: '.65'
54
+ }
55
+ },
56
+
57
+ preview: {
58
+ proto: [Shape, Block],
59
+ style: {
60
+ background: 'rgba(255, 255, 255, .06)',
61
+ '&, & *': { transition: '165ms cubic-bezier(.29,.67,.51,.97)', transitionProperty: 'color, background' }
62
+ },
63
+ props: (el, s) => ({
64
+ padding: 'X1',
65
+ round: 'Z2',
66
+ theme: `${s.sceneTheme || 'dark'}Scene`
67
+ }),
68
+ scene: {
69
+ proto: [Block],
70
+ props: { padding: 'A' },
71
+ style: {
72
+ boxSizing: 'border-box',
73
+ backgroundPosition: `center`,
74
+ backgroundRepeat: `repeat`,
75
+ backgroundSize: '100px 100px'
76
+ },
77
+ circle: {
78
+ proto: [Block, Shape],
79
+ props: (el, s) => ({
80
+ theme: s.value,
81
+ flexFlow: 'column',
82
+ flexAlign: 'center center',
83
+ width: 'G',
84
+ aspectRatio: '1 / 1',
85
+ round: '100%'
86
+ }),
87
+ style: { position: 'relative', borderWidth: '1px', borderStyle: 'solid' },
88
+ h6: {
89
+ proto: Text,
90
+ style: { fontSize: `${26 / 16}em`, fontWeight: 'Bold' },
91
+ span: {
92
+ text: 'The',
93
+ style: {
94
+ fontWeight: 'normal',
95
+ marginRight: '6px'
96
+ }
97
+ },
98
+ text: 'Text Color'
99
+ },
100
+ span: {
101
+ proto: Text,
102
+ props: { text: (el, s) => s.value },
103
+ style: {
104
+ position: 'absolute',
105
+ top: '86%',
106
+ left: '50%',
107
+ transform: 'translate(-50%, -50%)',
108
+ fontWeight: '600'
109
+ }
110
+ }
111
+ }
112
+ }
113
+ },
114
+
115
+ opacity: {
116
+ proto: Block,
117
+ props: {
118
+ padding: 'B1 0 0 0'
119
+ },
120
+ caption: {
121
+ proto: [Text, Block],
122
+ props: {
123
+ text: 'Opacity',
124
+ size: 'Z',
125
+ padding: '0 0 Z1 0'
126
+ },
127
+ style: { opacity: '.65' }
128
+ },
129
+ tones: { proto: Tones }
130
+ },
131
+
132
+ shades: {
133
+ proto: [Block],
134
+ props: { padding: 'B 0 0 0' },
135
+ caption: {
136
+ proto: [Text, Block],
137
+ props: {
138
+ text: 'Shades',
139
+ size: 'Z',
140
+ padding: '0 0 Z1 0'
141
+ },
142
+ style: { opacity: '.65' }
143
+ },
144
+
145
+ generate: {
146
+ proto: [Block, Shape, Overflow],
147
+ props: { flexFlow: 'column', round: 'Z', gap: '2px' },
148
+
149
+ childProto: {
150
+ proto: [Tones],
151
+ props: { round: 'X' },
152
+ ...TONES_ARR.map(v => ({
153
+ class: { background: el => classOpacify(el, (100 / TONES_AMOUNT * v) / 100) }
154
+ }))
155
+ },
156
+
157
+ dark: {},
158
+ light: {
159
+ props: { theme: 'lightScene' }
160
+ }
161
+ }
162
+ }
163
+ }
@@ -1,9 +1,9 @@
1
1
  'use strict'
2
2
 
3
- import { CommonField, SelectField } from '@symbo.ls/components'
3
+ import { CommonField, SelectTool } from '@symbo.ls/all'
4
4
 
5
5
  export const friendTheme = {
6
- extend: CommonField,
6
+ proto: CommonField,
7
7
  style: { paddingBlock: 0 },
8
8
  caption: {
9
9
  tag: 'h6',
@@ -11,7 +11,7 @@ export const friendTheme = {
11
11
  style: { opacity: 1, fontWeight: 'normal', margin: 0 }
12
12
  },
13
13
  element: {
14
- extend: SelectField,
14
+ proto: SelectTool,
15
15
  style: {
16
16
  background: 'transparent',
17
17
  paddingLeft: 0,
@@ -0,0 +1,178 @@
1
+ 'use strict'
2
+
3
+ import { Block, Text, Button, Flex, SectionHeader, AccessibilityCheck, SceneThemingBar } from '@symbo.ls/all'
4
+
5
+ import { PageProto } from '..'
6
+ import { colorTones } from './colorTone'
7
+ import { themingTools } from './themingTools'
8
+ import { interactivity } from './interactivity'
9
+ import { friendTheme } from './friendTheme'
10
+
11
+ import style, { styleLabel } from './style'
12
+
13
+ // import ntc from './ntc'
14
+
15
+ // const returnColor = element => element.lookup('ColorEditor').state.color
16
+ // const setBackground = (element, opacity = 1) => `background: ${opacify(returnColor(element), opacity)}`
17
+
18
+ const nameTheTheme = {
19
+ tag: 'label',
20
+ style: styleLabel,
21
+ attr: { for: 'name-it' },
22
+ caption: {
23
+ proto: [Block, Text],
24
+ props: {
25
+ text: 'Name the theme',
26
+ padding: '0 0 Y1 0',
27
+ size: 'Z'
28
+ }
29
+ },
30
+ span: {
31
+ tag: 'span',
32
+ proto: Text,
33
+ props: {
34
+ text: (el, s) => s.value,
35
+ size: 'E'
36
+ },
37
+ attr: { contentEditable: true, placeholder: 'you name it', id: 'name-it' }
38
+ }
39
+ }
40
+
41
+ const footer = { //eslint-disable-line
42
+ proto: [Flex, Block],
43
+ props: {
44
+ height: 'C2',
45
+ padding: '0 A'
46
+ },
47
+ style: {
48
+ margin: 'auto -80px 0',
49
+ justifyContent: 'space-between',
50
+ alignItems: 'center'
51
+ },
52
+ nav: {
53
+ proto: [Flex, Block],
54
+ props: { gap: 'A' },
55
+ childProto: {
56
+ proto: [Button, Text],
57
+ props: {
58
+ size: 'Z',
59
+ width: 'B2',
60
+ height: 'B2',
61
+ theme: 'transparent'
62
+ }
63
+ },
64
+ ...[
65
+ { props: { icon: 'starOutline' } },
66
+ { props: { icon: 'copyOutline' } },
67
+ { props: { icon: 'share' } }
68
+ ]
69
+ },
70
+ span: {
71
+ proto: Text,
72
+ props: {
73
+ text: 'Autosaved 1 second ago',
74
+ size: 'Y'
75
+ },
76
+ style: { opacity: '.35' }
77
+ },
78
+
79
+ export: {
80
+ proto: Flex,
81
+ style: {
82
+ alignItems: 'center'
83
+ },
84
+ span: {
85
+ proto: [Text, Block],
86
+ props: {
87
+ text: 'Export:',
88
+ size: 'Y',
89
+ padding: '0 B1 0 0'
90
+ },
91
+ style: { opacity: '.35' }
92
+ },
93
+ nav: {
94
+ proto: [Flex, Block],
95
+ props: { gap: 'Y2' },
96
+ childProto: {
97
+ proto: [Button, Text],
98
+ props: {
99
+ size: 'Z',
100
+ width: 'B2',
101
+ height: 'B2',
102
+ theme: 'transparent'
103
+ },
104
+ style: {
105
+ color: 'white'
106
+ }
107
+ },
108
+ ...[
109
+ { props: { icon: 'themeOutline' } },
110
+ { props: { icon: 'sketch' } },
111
+ { props: { icon: 'arrowAngleMirroringHorizontal' } }
112
+ ]
113
+ }
114
+ }
115
+ }
116
+
117
+ export default {
118
+ key: 'ColorEditor',
119
+
120
+ proto: PageProto,
121
+
122
+ style,
123
+
124
+ state: {
125
+ sceneTheme: 'dark'
126
+ },
127
+
128
+ on: {
129
+ init: (el, s) => {
130
+ if (!el.__root || !el.__root.state.CONFIG) return
131
+
132
+ var route = window.location.pathname
133
+ var routes = route.slice(1).split('/')
134
+ var param = routes[1]
135
+
136
+ const { THEME } = el.__root.state.CONFIG
137
+ var content = THEME[`${param}`].value
138
+ content.title = param
139
+ el.state.value = content
140
+ }
141
+ },
142
+
143
+ header: {
144
+ proto: SectionHeader,
145
+ props: {
146
+ padding: 'C 0 B2 0',
147
+ margin: '0'
148
+ },
149
+ heading: '',
150
+ label: nameTheTheme,
151
+ nav: { proto: SceneThemingBar }
152
+ },
153
+
154
+ cnt: {
155
+ proto: [Flex],
156
+ props: {
157
+ gap: 'D'
158
+ },
159
+
160
+ aside: colorTones,
161
+ colorEdit: {
162
+ proto: Block,
163
+ props: { gap: 'C2', flexFlow: 'column' },
164
+ themingTools,
165
+ interactivity,
166
+ friendTheme
167
+ }
168
+ },
169
+
170
+ check: {
171
+ proto: AccessibilityCheck,
172
+ props: {
173
+ padding: 'E 0 F'
174
+ }
175
+ }
176
+
177
+ // footer
178
+ }
@@ -1,15 +1,15 @@
1
1
  'use strict'
2
2
 
3
- import { Block, Grid, Text, SelectField, CommonField } from '@symbo.ls/components'
3
+ import { Block, Grid, Text, SelectTool, CommonField } from '@symbo.ls/all'
4
4
 
5
5
  export const interactivity = {
6
6
  h6: {
7
- extend: [Text, Block],
7
+ proto: [Text, Block],
8
8
  props: { text: 'Interactivity', padding: '0 0 Z2 0', size: 'B' },
9
9
  style: { fontWeight: 'normal', margin: 0 }
10
10
  },
11
11
  interactivitySet: {
12
- extend: Grid,
12
+ proto: Grid,
13
13
  props: {
14
14
  columns: 'repeat(4, 1fr)',
15
15
  rows: 'repear(2, 1fr)',
@@ -17,11 +17,11 @@ export const interactivity = {
17
17
  rowGap: 'A2'
18
18
  },
19
19
  style: { width: 'fit-content' },
20
- childExtend: {
21
- extend: CommonField,
20
+ childProto: {
21
+ proto: CommonField,
22
22
  props: { padding: 0 },
23
23
  element: {
24
- extend: SelectField,
24
+ proto: SelectTool,
25
25
  buttons: { ...[{ props: { icon: 'plus' } }] }
26
26
  }
27
27
  },
@@ -112,4 +112,5 @@ export const interactivity = {
112
112
  }
113
113
  ]
114
114
  }
115
+
115
116
  }
@@ -1,11 +1,22 @@
1
1
  'use strict'
2
2
 
3
+ export const styleLabel = {
4
+ caption: { whiteSpace: 'nowrap', opacity: 0.65 },
5
+ span: {
6
+ display: 'block',
7
+ whiteSpace: 'nowrap',
8
+ minWidth: `1.618em`,
9
+ maxWidth: 'fit-content',
10
+ borderBottom: '1px dashed rgba(255, 255, 255, .35)',
11
+ outline: 'none'
12
+ }
13
+ }
14
+
3
15
  export const styleTool = {
4
16
  caption: { opacity: '.65' },
5
17
  '> div span': { opacity: '.5' },
6
18
  '> div > div': { gap: '1px' }
7
19
  }
8
-
9
20
  export const styleColorTones = {
10
21
  width: '22em',
11
22
  display: 'flex',
@@ -1,6 +1,6 @@
1
1
  'use strict'
2
2
 
3
- import { Grid, ColorSwitcher, CommonField, SelectField, ButtonSet, ClickableItem } from '@symbo.ls/components'
3
+ import { Grid, ColorSwitcher, CommonField, SelectTool, ButtonSet, ClickableItem } from '@symbo.ls/all'
4
4
 
5
5
 
6
6
  ColorSwitcher.props = (el, s) => {
@@ -14,7 +14,7 @@ ColorSwitcher.props = (el, s) => {
14
14
  }
15
15
 
16
16
  export const themingTools = {
17
- extend: Grid,
17
+ proto: Grid,
18
18
  style: {
19
19
  width: 'fit-content'
20
20
  },
@@ -23,8 +23,8 @@ export const themingTools = {
23
23
  columnGap: 'C',
24
24
  rowGap: 'C'
25
25
  },
26
- childExtend: {
27
- extend: CommonField,
26
+ childProto: {
27
+ proto: CommonField,
28
28
  props: { padding: 0 },
29
29
  caption: { text: el => el.parent.props.caption },
30
30
  element: {}
@@ -33,7 +33,7 @@ export const themingTools = {
33
33
  props: { caption: 'Background color' },
34
34
  caption: {},
35
35
  element: {
36
- extend: ColorSwitcher,
36
+ proto: ColorSwitcher,
37
37
  props: { type: 'background' },
38
38
 
39
39
  title: {},
@@ -46,7 +46,7 @@ export const themingTools = {
46
46
  props: { caption: 'Text color' },
47
47
  caption: {},
48
48
  element: {
49
- extend: ColorSwitcher,
49
+ proto: ColorSwitcher,
50
50
  props: { type: 'color' },
51
51
 
52
52
  title: {},
@@ -59,7 +59,7 @@ export const themingTools = {
59
59
  props: { caption: 'Border color' },
60
60
  caption: {},
61
61
  element: {
62
- extend: ColorSwitcher,
62
+ proto: ColorSwitcher,
63
63
  props: { type: 'border' },
64
64
 
65
65
  title: {},
@@ -72,7 +72,7 @@ export const themingTools = {
72
72
  props: { caption: 'Use as' },
73
73
  caption: {},
74
74
  element: {
75
- extend: SelectField,
75
+ proto: SelectTool,
76
76
  title: { props: { text: 'Background color' } },
77
77
  buttons: { ...[{ props: { icon: 'arrowAngleMirroringVertical', theme: 'transparent' } }] }
78
78
  }
@@ -82,8 +82,8 @@ export const themingTools = {
82
82
  props: { caption: 'Border' },
83
83
  caption: {},
84
84
  element: {
85
- extend: ButtonSet,
86
- childExtend: { extend: [ClickableItem] },
85
+ proto: ButtonSet,
86
+ childProto: { proto: [ClickableItem] },
87
87
  props: { gap: 'Z' },
88
88
  ...[
89
89
  { props: { icon: 'colorsColored' } },
@@ -98,8 +98,8 @@ export const themingTools = {
98
98
  props: { caption: 'Shadow' },
99
99
  caption: {},
100
100
  element: {
101
- extend: ButtonSet,
102
- childExtend: { extend: [ClickableItem] },
101
+ proto: ButtonSet,
102
+ childProto: { proto: [ClickableItem] },
103
103
  ...[{ props: { icon: 'plus' } }]
104
104
  }
105
105
  }
@@ -1,8 +1,9 @@
1
1
  'use strict'
2
2
 
3
- import { Block, Flex, Footer, ResponsiveToolBar } from '@symbo.ls/components'
3
+ import { Block, Flex, Footer, ResponsiveToolBar } from '@symbo.ls/all'
4
4
 
5
- import { LIBRARY } from '../../../.symbols'
5
+ import COMPONENTS from '../../data/components'
6
+ import LIBRARIES from '../../data/library'
6
7
 
7
8
  import LayerSidebar from './layers'
8
9
  import ToolSidebar from './tools'
@@ -10,13 +11,14 @@ import scene from './scene'
10
11
 
11
12
  import style from './style'
12
13
  const COMPONENT_ROUTES = {}
13
- LIBRARY.map(v => (COMPONENT_ROUTES[`/${v.key}`] = v))
14
+ COMPONENTS.map(v => (COMPONENT_ROUTES[`/${v.key}`] = v.component))
15
+ LIBRARIES.map(v => (COMPONENT_ROUTES[`/${v.key}`] = v.component))
14
16
 
15
17
  export default {
16
18
  style,
17
- extend: Flex,
19
+ proto: Flex,
18
20
  mainContainer: {
19
- extend: [Block, Flex],
21
+ proto: [Block, Flex],
20
22
  props: {
21
23
  padding: '0 A2',
22
24
  gap: 'B'
@@ -28,11 +30,11 @@ export default {
28
30
  },
29
31
 
30
32
  footer: {
31
- extend: Footer,
33
+ proto: Footer,
32
34
  FooterBar: {},
33
35
  // span: 'Autosaved 1 secsond ago',
34
36
  screenChanger: {
35
- extend: ResponsiveToolBar,
37
+ proto: ResponsiveToolBar,
36
38
  style: {
37
39
  marginLeft: 'auto'
38
40
  }