@symbo.ls/preview 2.6.16 → 2.6.18
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 +1 -1
- package/src/app.js +0 -1
- package/src/components/ThemeButtons.js +0 -1
- package/src/pages/Export/description.js +1 -1
- package/src/pages/Export/index.js +3 -2
- package/src/pages/Export/scene.js +15 -84
- package/src/pages/Export/state.js +2 -0
- package/src/pages/Export/tools.js +54 -6
- package/src/pages/Icons/index.js +1 -1
- package/src/pages/Init/Personalize/fields.js +0 -14
package/package.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"name": "@symbo.ls/preview",
|
|
3
3
|
"description": "",
|
|
4
4
|
"author": "",
|
|
5
|
-
"version": "2.6.
|
|
5
|
+
"version": "2.6.18",
|
|
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
|
@@ -52,6 +52,7 @@ export const Export = {
|
|
|
52
52
|
...content
|
|
53
53
|
}, { preventUpdate: true })
|
|
54
54
|
}
|
|
55
|
+
|
|
55
56
|
if (componentKey.length === 32) { // this might be Gist
|
|
56
57
|
fetchGist(componentKey, state)
|
|
57
58
|
}
|
|
@@ -73,8 +74,8 @@ export const Export = {
|
|
|
73
74
|
flex: '1'
|
|
74
75
|
},
|
|
75
76
|
|
|
76
|
-
tools
|
|
77
|
-
|
|
77
|
+
tools,
|
|
78
|
+
description
|
|
78
79
|
}
|
|
79
80
|
|
|
80
81
|
// footer: { extend: Footer }
|
|
@@ -1,17 +1,7 @@
|
|
|
1
1
|
'use strict'
|
|
2
2
|
|
|
3
|
-
import
|
|
4
|
-
import {
|
|
5
|
-
import { createEmotion } from '@symbo.ls/create-emotion'
|
|
6
|
-
import { updateReset } from '@symbo.ls/init'
|
|
7
|
-
import { isString } from '@domql/utils'
|
|
8
|
-
|
|
9
|
-
import { getActiveConfig, activateConfig } from '@symbo.ls/scratch'
|
|
10
|
-
import { init, Box, Scene } from '@symbo.ls/components'
|
|
11
|
-
|
|
12
|
-
import * as components from '../../components'
|
|
13
|
-
|
|
14
|
-
const emCache = {}
|
|
3
|
+
import { getActiveConfig } from '@symbo.ls/scratch'
|
|
4
|
+
import { Scene } from '@symbo.ls/components'
|
|
15
5
|
|
|
16
6
|
export default {
|
|
17
7
|
extend: Scene,
|
|
@@ -31,6 +21,7 @@ export default {
|
|
|
31
21
|
props: {
|
|
32
22
|
padding: 'B 0',
|
|
33
23
|
maxHeight: '40em',
|
|
24
|
+
position: 'relative',
|
|
34
25
|
minHeight: '65vh'
|
|
35
26
|
},
|
|
36
27
|
|
|
@@ -42,86 +33,26 @@ export default {
|
|
|
42
33
|
})
|
|
43
34
|
},
|
|
44
35
|
|
|
45
|
-
|
|
46
|
-
props: {
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
const PROJECT_SYSTEM = s.__projectSystem
|
|
56
|
-
const styleNode = document.createElement('head')
|
|
57
|
-
const emotion = createEmotion('client', styleNode)
|
|
58
|
-
emCache['client'] = emotion
|
|
59
|
-
|
|
60
|
-
const emotionStyle = transformEmotionStyle(emotion, true)
|
|
61
|
-
const emotionClass = transformEmotionClass(emotion, true)
|
|
62
|
-
|
|
63
|
-
const newDom = DOM.create({
|
|
64
|
-
tag: 'shadow',
|
|
65
|
-
state: s.state
|
|
66
|
-
}, el.parent.node, 'comp', {
|
|
67
|
-
extend: [Box],
|
|
68
|
-
define: { style: emotionStyle, class: emotionClass },
|
|
69
|
-
components,
|
|
70
|
-
context: { system: PROJECT_SYSTEM }
|
|
71
|
-
})
|
|
72
|
-
|
|
73
|
-
newDom.node.appendChild(styleNode)
|
|
74
|
-
|
|
75
|
-
init(PROJECT_SYSTEM, null, { emotion, initDOMQLDefine: false, newConfig: 'client' })
|
|
76
|
-
activateConfig('client')
|
|
77
|
-
|
|
78
|
-
newDom.set({
|
|
79
|
-
tag: 'fragment',
|
|
80
|
-
[s.key]: {
|
|
81
|
-
extend: isString(s.component) ? document.eval(s.component) : s.component,
|
|
82
|
-
props: { inheritSpacingRatio: true }
|
|
83
|
-
},
|
|
84
|
-
on: {
|
|
85
|
-
render: (el) => {
|
|
86
|
-
// const appKey = el.__root.state.appKey && el.__root.state.appKey.split('.')[0]
|
|
87
|
-
}
|
|
88
|
-
}
|
|
89
|
-
})
|
|
90
|
-
|
|
91
|
-
activateConfig(0)
|
|
92
|
-
return newDom
|
|
93
|
-
}
|
|
94
|
-
|
|
95
|
-
return {
|
|
96
|
-
extend: {
|
|
97
|
-
extend: isString(s.component) ? document.eval(s.component) : s.component
|
|
98
|
-
},
|
|
99
|
-
props: { inheritSpacingRatio: true }
|
|
100
|
-
}
|
|
101
|
-
},
|
|
102
|
-
|
|
36
|
+
Iframe: {
|
|
37
|
+
props: (el, s) => ({
|
|
38
|
+
id: 'component',
|
|
39
|
+
src: `/scene/${s.key}`,
|
|
40
|
+
border: '0',
|
|
41
|
+
background: 'transparent',
|
|
42
|
+
position: 'absolute',
|
|
43
|
+
boxSize: '100% 100%',
|
|
44
|
+
inset: '0 0 0 0'
|
|
45
|
+
}),
|
|
103
46
|
on: {
|
|
104
47
|
initUpdate: (el, s) => {
|
|
105
|
-
|
|
106
|
-
activateConfig('client')
|
|
107
|
-
updateReset({ emotion: emCache['client'] })
|
|
108
|
-
} else {
|
|
109
|
-
el.comp.setProps({
|
|
110
|
-
base: s.base,
|
|
111
|
-
fontSize: s.base + 'px',
|
|
112
|
-
spacingRatio: s.ratio,
|
|
113
|
-
direction: s.direction
|
|
114
|
-
}, { preventUpdate: true })
|
|
115
|
-
updateReset()
|
|
116
|
-
}
|
|
117
|
-
activateConfig(0)
|
|
48
|
+
return false
|
|
118
49
|
}
|
|
119
50
|
}
|
|
120
51
|
}
|
|
121
52
|
},
|
|
122
53
|
|
|
123
54
|
on: {
|
|
124
|
-
|
|
55
|
+
stateUpdated: (el, s) => {
|
|
125
56
|
el.__root.node.scrollTo({ top: 0, behavior: 'smooth' })
|
|
126
57
|
}
|
|
127
58
|
}
|
|
@@ -5,8 +5,10 @@ import {
|
|
|
5
5
|
SequenceSliders,
|
|
6
6
|
ClickableItem,
|
|
7
7
|
SquareButton,
|
|
8
|
-
ThemeSwitcher
|
|
8
|
+
ThemeSwitcher // eslint-disable-line no-unused-vars
|
|
9
9
|
} from '@symbo.ls/components'
|
|
10
|
+
import { Link } from '@symbo.ls/components/src/Link'
|
|
11
|
+
import { toolsState } from './state'
|
|
10
12
|
|
|
11
13
|
export default {
|
|
12
14
|
props: {
|
|
@@ -18,6 +20,54 @@ export default {
|
|
|
18
20
|
extend: Flex,
|
|
19
21
|
props: { gap: 'B1' },
|
|
20
22
|
// theme: { extend: ThemeSwitcher },
|
|
23
|
+
state: toolsState,
|
|
24
|
+
|
|
25
|
+
on: {
|
|
26
|
+
stateUpdated: (el, s, changes) => {
|
|
27
|
+
// window.componentRoot.context.system = s.__projectSystem
|
|
28
|
+
window.componentState.update(changes)
|
|
29
|
+
}
|
|
30
|
+
},
|
|
31
|
+
|
|
32
|
+
editors: {
|
|
33
|
+
extend: Flex,
|
|
34
|
+
props: { gap: 'Z2' },
|
|
35
|
+
|
|
36
|
+
childExtend: {
|
|
37
|
+
extend: [ClickableItem, SquareButton],
|
|
38
|
+
props: {}
|
|
39
|
+
},
|
|
40
|
+
|
|
41
|
+
add: {
|
|
42
|
+
props: {
|
|
43
|
+
icon: 'plus'
|
|
44
|
+
}
|
|
45
|
+
},
|
|
46
|
+
remix: {
|
|
47
|
+
props: {
|
|
48
|
+
icon: 'magicstar outline'
|
|
49
|
+
},
|
|
50
|
+
on: {
|
|
51
|
+
click: (ev, el, s) => {
|
|
52
|
+
window.componentState.update({
|
|
53
|
+
system: s.__projectSystem
|
|
54
|
+
})
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
},
|
|
58
|
+
editor: {
|
|
59
|
+
extend: Link,
|
|
60
|
+
props: {
|
|
61
|
+
icon: 'edit',
|
|
62
|
+
href: '/editor/' + window.location.pathname.split('component/')[1]
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
},
|
|
66
|
+
|
|
67
|
+
VerticalLine: {
|
|
68
|
+
margin: 'auto 0',
|
|
69
|
+
height: 'A2'
|
|
70
|
+
},
|
|
21
71
|
|
|
22
72
|
sliders: {
|
|
23
73
|
extend: SequenceSliders,
|
|
@@ -31,13 +81,11 @@ export default {
|
|
|
31
81
|
|
|
32
82
|
direction: {
|
|
33
83
|
extend: [ClickableItem, SquareButton],
|
|
34
|
-
props: {
|
|
35
|
-
icon: 'languageDirection'
|
|
36
|
-
},
|
|
84
|
+
props: { icon: 'languageDirection' },
|
|
37
85
|
on: {
|
|
38
86
|
click: (ev, el, s) => {
|
|
39
|
-
|
|
40
|
-
direction:
|
|
87
|
+
window.componentState.update({
|
|
88
|
+
direction: window.componentState.direction === 'rtl' ? 'ltr' : 'rtl'
|
|
41
89
|
})
|
|
42
90
|
}
|
|
43
91
|
}
|
package/src/pages/Icons/index.js
CHANGED
|
@@ -8,7 +8,7 @@ import * as LOGOS from '@symbo.ls/icons/src/logos'
|
|
|
8
8
|
import * as SIGNS from '@symbo.ls/icons/src/signs'
|
|
9
9
|
import * as STYLE from '@symbo.ls/icons/src/style'
|
|
10
10
|
import * as KEYBOARD from '@symbo.ls/icons/src/keyboard'
|
|
11
|
-
import * as SVG from '@symbo.ls/icons/src/
|
|
11
|
+
import * as SVG from '@symbo.ls/icons/src/miscellaneous'
|
|
12
12
|
import * as TECH from '@symbo.ls/icons/src/tech'
|
|
13
13
|
import * as TEXT from '@symbo.ls/icons/src/text'
|
|
14
14
|
|
|
@@ -25,11 +25,7 @@ export default {
|
|
|
25
25
|
element: {
|
|
26
26
|
on: {
|
|
27
27
|
change: (ev, el, s) => {
|
|
28
|
-
<<<<<<< Updated upstream
|
|
29
28
|
s.update({ [el.parent.key]: ev.target.value })
|
|
30
|
-
=======
|
|
31
|
-
s.update({ [el.parent.key]: el.node.value })
|
|
32
|
-
>>>>>>> Stashed changes
|
|
33
29
|
}
|
|
34
30
|
}
|
|
35
31
|
}
|
|
@@ -44,13 +40,7 @@ export default {
|
|
|
44
40
|
title: {},
|
|
45
41
|
element: {
|
|
46
42
|
extend: Input,
|
|
47
|
-
<<<<<<< Updated upstream
|
|
48
|
-
props: ({ state }) => ({
|
|
49
|
-
value: state.projectName
|
|
50
|
-
})
|
|
51
|
-
=======
|
|
52
43
|
props: ({ state }) => ({ value: state.projectName })
|
|
53
|
-
>>>>>>> Stashed changes
|
|
54
44
|
}
|
|
55
45
|
},
|
|
56
46
|
|
|
@@ -67,11 +57,7 @@ export default {
|
|
|
67
57
|
}),
|
|
68
58
|
on: {
|
|
69
59
|
change: (ev, el, s) => {
|
|
70
|
-
<<<<<<< Updated upstream
|
|
71
60
|
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
61
|
}
|
|
76
62
|
}
|
|
77
63
|
},
|