@symbo.ls/preview 0.0.70 → 0.0.72

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": "0.0.70",
5
+ "version": "0.0.72",
6
6
  "repository": "https://github.com/rackai/editor",
7
7
  "main": "src/index.js",
8
8
  "scripts": {
package/src/app.js CHANGED
@@ -1,9 +1,10 @@
1
1
  'use strict'
2
2
 
3
3
  import './config'
4
+ import style from './style'
4
5
 
5
6
  import { router } from '@domql/router'
6
- import { openModal } from '@symbo.ls/components'
7
+ import { Flex, openModal } from '@symbo.ls/components'
7
8
 
8
9
  import { state } from './state'
9
10
  import {
@@ -31,19 +32,10 @@ Object.keys(DesignSystem.routes).map(route => {
31
32
 
32
33
  const App = {
33
34
  key: 'app',
34
- extend: [Sync],
35
+ extend: Flex,
35
36
 
36
37
  state,
37
-
38
- props: {
39
- theme: 'document',
40
- boxSize: '100% 100%',
41
- position: 'absolute',
42
- top: '0',
43
- left: '0',
44
- flexFlow: 'column',
45
- flexAlign: 'center flex-start'
46
- },
38
+ props: style,
47
39
 
48
40
  define: { routes: param => param },
49
41
  routes: {
@@ -55,9 +47,7 @@ const App = {
55
47
  ...SUB_ROUTES
56
48
  },
57
49
 
58
- content: {
59
- props: { position: 'relative' }
60
- },
50
+ content: {},
61
51
 
62
52
  Modal: {},
63
53
 
@@ -1,5 +1,8 @@
1
1
  'use strict'
2
2
 
3
+ import { router } from '@domql/router'
4
+ import { HeaderInitial, HeaderOfMember } from '@symbo.ls/components'
5
+
3
6
  export const Header = {
4
7
  props: {
5
8
  position: 'sticky',
@@ -12,6 +15,23 @@ export const Header = {
12
15
  width: '100%'
13
16
  }
14
17
  }
18
+ }
19
+
20
+ export const HeaderOnRouter = {
21
+ extend: Header,
22
+ props: { width: '100%' },
15
23
 
16
- // define: { isFloating: param => param }
24
+ define: { routes: param => param },
25
+ routes: {
26
+ '/': HeaderInitial,
27
+ '/*': HeaderOfMember
28
+ },
29
+
30
+ on: {
31
+ render: element => {
32
+ const { pathname, hash } = window.location
33
+ const url = pathname + hash
34
+ router(element, url, {}, { updateState: false })
35
+ }
36
+ }
17
37
  }
@@ -1,6 +1,6 @@
1
1
  'use strict'
2
2
 
3
- import { PageTemplate, Flex } from '@symbo.ls/components'
3
+ import { PageTemplate, Overlay, Flex } from '@symbo.ls/components'
4
4
 
5
5
  import MASK1 from '../assets/mask1.png'
6
6
  import MASK2 from '../assets/mask2.png' // eslint-disable-line
@@ -34,7 +34,9 @@ export const DisabledPage = {
34
34
  overflow: 'hidden'
35
35
  },
36
36
 
37
- Overlay: {
37
+ disablingOverlay: {
38
+ extend: [Overlay, Flex],
39
+
38
40
  props: {
39
41
  overflow: 'hidden',
40
42
  background: 'shadow-overlay',
@@ -43,28 +45,35 @@ export const DisabledPage = {
43
45
  },
44
46
 
45
47
  Overlay: {
46
- props: {
47
- background: 'gradient-colorful',
48
- inset: '0 0 0 0',
49
- opacity: '.9',
50
- style: {
51
- // filter: 'blur(110px)',
52
- WebkitMaskImage: 'url(' + MASK1 + ')',
53
- WebkitMaskSize: '100% 100%'
54
- }
48
+ background: 'gradient-colorful',
49
+ inset: '0 0 0 0',
50
+ opacity: '.9',
51
+ style: {
52
+ WebkitMaskImage: 'url(' + MASK1 + ')',
53
+ WebkitMaskSize: '100% 100%'
55
54
  }
56
55
  },
57
56
 
58
- H4: {
59
- position: 'absolute',
60
- margin: '0',
61
- color: 'black',
62
- left: 'C',
63
- bottom: 'B',
64
- text: 'Custom library will come up soon…',
65
- animation: 'fadeInUpLong',
66
- animationDuration: 'G',
67
- animationDelay: 'G'
57
+ message: {
58
+ props: {
59
+ animation: 'fadeInUpShort',
60
+ animationDuration: 'G',
61
+ animationDelay: 'G',
62
+ margin: 'auto auto 0',
63
+ padding: 'C1 E C',
64
+ color: 'black',
65
+ width: '100%',
66
+ maxWidth: 'K-default'
67
+ },
68
+
69
+ H3: 'Custom library will come up soon',
70
+ P: {
71
+ text: 'Meanwhile, please check the components page',
72
+ margin: 'X 0 0',
73
+ animation: 'fadeInUpShort',
74
+ animationDuration: 'G',
75
+ animationDelay: 'G2'
76
+ }
68
77
  }
69
78
  }
70
79
  }
package/src/index.js CHANGED
@@ -3,7 +3,6 @@
3
3
  import './config'
4
4
  import DOM from 'domql'
5
5
  import SYMBOLS_CONF from '@symbo.ls/config'
6
- import style from './style'
7
6
 
8
7
  import 'smbls'
9
8
  import * as smbls from '@symbo.ls/components'
@@ -14,6 +13,7 @@ import { DesignSystem, Library } from './pages' // eslint-disable-line
14
13
  import { router, lastLevel } from '@domql/router'
15
14
 
16
15
  import { context } from './state'
16
+ import { Sync } from './sync'
17
17
 
18
18
  smbls.init({ verbose: false, ...SYMBOLS_CONF })
19
19
 
@@ -25,29 +25,12 @@ DOM.define({
25
25
 
26
26
  // export default DOM.create(App, DevFocus, 'app', { TODO: try this
27
27
  const app = DOM.create({
28
- extend: App,
29
- style,
28
+ // extend: [Sync, App],
29
+ extend: [App],
30
30
 
31
- Header: {
32
- props: {},
31
+ HeaderOnRouter: {},
33
32
 
34
- define: { routes: param => param },
35
- routes: {
36
- '/': smbls.HeaderInitial,
37
- '/*': smbls.HeaderOfMember
38
- },
39
-
40
- on: {
41
- render: element => {
42
- const { pathname, hash } = window.location
43
- const url = pathname + hash
44
- router(element, url, {}, { updateState: false })
45
- }
46
- }
47
- },
48
- routes: {
49
- // '/': Library
50
- }
33
+ routes: {}
51
34
  }, undefined, 'app', {
52
35
  extend: [smbls.Box],
53
36
  components: { ...smbls, ...components },
@@ -66,13 +66,14 @@ const modes = {
66
66
 
67
67
  ThemeButtons: {
68
68
  position: 'absolute',
69
- left: 'X2',
70
- right: 'X2',
71
- bottom: 'X2',
69
+ left: 'W',
70
+ right: 'W',
71
+ bottom: 'W',
72
72
  opacity: '0',
73
73
  transition: 'B default-bezier',
74
74
  transitionProperty: 'transform, opacity',
75
- transform: 'translate3d(0, 100%, 0)'
75
+ transform: 'translate3d(0, 100%, 0)',
76
+ columnGap: 'W'
76
77
  },
77
78
 
78
79
  Span: {
@@ -13,7 +13,7 @@ export const Init = {
13
13
  props: {
14
14
  boxSize: '100% 100%',
15
15
  gap: 'A',
16
- padding: '7.5% E1 D1 12.5%'
16
+ padding: '8.5% E1 E1 12.5%'
17
17
  },
18
18
 
19
19
  define: { routes: param => param },
@@ -26,7 +26,6 @@ export const Spaces = {
26
26
  }
27
27
  },
28
28
  stateUpdated: (el, s, changes) => {
29
- console.log(s)
30
29
  s.systemUpdate({ SPACING: { base: s.base, ratio: s.ratio } }, { preventUpdate: true })
31
30
  }
32
31
  }
package/src/state.js CHANGED
@@ -7,8 +7,9 @@ import FIT from '../user_data/4it' // eslint-disable-line no-unused-vars
7
7
 
8
8
  export const state = {
9
9
  globalTheme: 'dark',
10
- // SYSTEM: {}
10
+ appKey: '4it.symbo.ls',
11
11
  SYSTEM: FIT
12
+ // SYSTEM: {}
12
13
  // SYSTEM
13
14
  // SYSTEM: BYLD
14
15
  }
package/src/style.js CHANGED
@@ -1,11 +1,20 @@
1
1
  'use strict'
2
2
 
3
3
  export default {
4
+ theme: 'document',
5
+ boxSize: '100% 100%',
6
+ position: 'absolute',
7
+ top: '0',
8
+ left: '0',
9
+ flow: 'column',
10
+ align: 'center flex-start',
11
+ overflow: 'hidden auto',
4
12
  boxSizing: 'border-box',
5
- overflow: 'hidden',
6
- overflowY: 'auto',
7
13
  cursor: 'default',
8
- 'button, a': {
9
- cursor: 'default'
10
- }
14
+ style: {
15
+ 'button, a': {
16
+ cursor: 'default'
17
+ }
18
+ },
19
+ content: { position: 'relative' }
11
20
  }
package/src/sync.js CHANGED
@@ -3,7 +3,7 @@
3
3
  // import { init } from '@symbo.ls/init'
4
4
  import { connect, send } from '@symbo.ls/socket/client'
5
5
 
6
- const receive = (element, state) => {
6
+ const onChange = (element, state) => {
7
7
  return (event, data) => {
8
8
  state.update({ SYSTEM: data })
9
9
  }
@@ -12,13 +12,12 @@ const receive = (element, state) => {
12
12
  export const Sync = {
13
13
  on: {
14
14
  init: (el, s) => {
15
- connect('ws://localhost:1001', receive(el, s))
15
+ if (s.appKey) connect(s.appKey, onChange(el, s))
16
16
  },
17
17
  stateUpdated: (el, s, changes) => {
18
- if (changes.SYSTEM) {
19
- // init(changes.SYSTEM)
20
- console.log(changes)
18
+ if (s.appKey && changes.SYSTEM) {
21
19
  send(changes.SYSTEM, s.SYSTEM)
20
+ // init(changes.SYSTEM)
22
21
  }
23
22
  }
24
23
  }