@silexlabs/silex 3.0.1-0 → 3.0.1

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 (250) hide show
  1. package/.env.default +3 -2
  2. package/.silex.js +39 -1
  3. package/README.md +37 -35
  4. package/dist/client/client/api.d.ts +8 -1
  5. package/dist/client/client/assetUrl.d.ts +54 -0
  6. package/dist/client/client/config.d.ts +60 -1
  7. package/dist/client/client/events.d.ts +19 -10
  8. package/dist/client/client/grapesjs/PublicationManager.d.ts +6 -8
  9. package/dist/client/client/grapesjs/PublicationUi.d.ts +8 -10
  10. package/dist/client/client/grapesjs/breadcrumbs.d.ts +1 -0
  11. package/dist/client/client/grapesjs/css-props.d.ts +6 -0
  12. package/dist/client/client/grapesjs/footer.d.ts +2 -0
  13. package/dist/client/client/grapesjs/img.d.ts +6 -0
  14. package/dist/client/client/grapesjs/index.d.ts +6 -2
  15. package/dist/client/client/grapesjs/internal-links.d.ts +1 -1
  16. package/dist/client/client/grapesjs/keymaps.d.ts +123 -0
  17. package/dist/client/client/grapesjs/new-page-dialog.d.ts +1 -1
  18. package/dist/client/client/grapesjs/page-panel.d.ts +7 -1
  19. package/dist/client/client/grapesjs/project-bar.d.ts +20 -0
  20. package/dist/client/client/grapesjs/resize-panel.d.ts +1 -0
  21. package/dist/client/client/grapesjs/rich-text.d.ts +4 -1
  22. package/dist/client/client/grapesjs/semantic.d.ts +1 -1
  23. package/dist/client/client/grapesjs/settings-sections.d.ts +16 -0
  24. package/dist/client/client/grapesjs/settings.d.ts +3 -1
  25. package/dist/client/client/grapesjs/storage.d.ts +1 -0
  26. package/dist/client/client/grapesjs/symbolDialogs.d.ts +1 -1
  27. package/dist/client/client/grapesjs/view-buttons.d.ts +1 -0
  28. package/dist/client/client/index.d.ts +5 -0
  29. package/dist/client/client/publication-transformers.d.ts +42 -0
  30. package/dist/client/client/publish-custom-code-block.d.ts +4 -0
  31. package/dist/client/client/publish-fonts.d.ts +4 -0
  32. package/dist/client/client/utils.d.ts +22 -1
  33. package/dist/client/constants.d.ts +3 -0
  34. package/dist/client/css/admin.css +1107 -411
  35. package/dist/client/css/admin.css.map +1 -0
  36. package/dist/client/grapesjs-filter-styles/dist/index.d.ts +4 -0
  37. package/dist/client/grapesjs-fonts/dist/index.d.ts +4 -0
  38. package/dist/client/grapesjs-fonts/src/commands.d.ts +3 -0
  39. package/dist/client/grapesjs-fonts/src/fonts.d.ts +4 -0
  40. package/dist/client/grapesjs-storage-rate-limit/dist/index.d.ts +4 -0
  41. package/dist/client/grapesjs-ui-suggest-classes/dist/index.d.ts +4 -0
  42. package/dist/client/index.html +3 -2
  43. package/dist/client/js/main.js +305 -170
  44. package/dist/client/js/main.js.LICENSE.txt +21 -1
  45. package/dist/client/page.d.ts +1 -1
  46. package/dist/client/silex-lib/src/ts/client/api.d.ts +90 -0
  47. package/dist/client/silex-lib/src/ts/client/assetUrl.d.ts +54 -0
  48. package/dist/client/silex-lib/src/ts/client/config.d.ts +102 -0
  49. package/dist/client/silex-lib/src/ts/client/events.d.ts +23 -0
  50. package/dist/client/silex-lib/src/ts/client/expose.d.ts +8 -0
  51. package/dist/client/silex-lib/src/ts/client/grapesjs/LoginDialog.d.ts +15 -0
  52. package/dist/client/silex-lib/src/ts/client/grapesjs/PublicationManager.d.ts +73 -0
  53. package/dist/client/silex-lib/src/ts/client/grapesjs/PublicationUi.d.ts +59 -0
  54. package/dist/client/silex-lib/src/ts/client/grapesjs/blocks.d.ts +1 -0
  55. package/dist/client/silex-lib/src/ts/client/grapesjs/breadcrumbs.d.ts +1 -0
  56. package/dist/client/silex-lib/src/ts/client/grapesjs/css-props.d.ts +6 -0
  57. package/dist/client/silex-lib/src/ts/client/grapesjs/footer.d.ts +2 -0
  58. package/dist/client/silex-lib/src/ts/client/grapesjs/img.d.ts +6 -0
  59. package/dist/client/silex-lib/src/ts/client/grapesjs/index.d.ts +9 -0
  60. package/dist/client/silex-lib/src/ts/client/grapesjs/internal-links.d.ts +1 -0
  61. package/dist/client/silex-lib/src/ts/client/grapesjs/keymaps.d.ts +123 -0
  62. package/dist/client/silex-lib/src/ts/client/grapesjs/new-page-dialog.d.ts +2 -0
  63. package/dist/client/silex-lib/src/ts/client/grapesjs/openImport.d.ts +9 -0
  64. package/dist/client/silex-lib/src/ts/client/grapesjs/page-panel.d.ts +9 -0
  65. package/dist/client/silex-lib/src/ts/client/grapesjs/project-bar.d.ts +21 -0
  66. package/dist/client/silex-lib/src/ts/client/grapesjs/resize-panel.d.ts +1 -0
  67. package/dist/client/silex-lib/src/ts/client/grapesjs/rich-text.d.ts +4 -0
  68. package/dist/client/silex-lib/src/ts/client/grapesjs/semantic.d.ts +1 -0
  69. package/dist/client/silex-lib/src/ts/client/grapesjs/settings-sections.d.ts +16 -0
  70. package/dist/client/silex-lib/src/ts/client/grapesjs/settings.d.ts +4 -0
  71. package/dist/client/silex-lib/src/ts/client/grapesjs/storage.d.ts +2 -0
  72. package/dist/client/silex-lib/src/ts/client/grapesjs/symbolDialogs.d.ts +3 -0
  73. package/dist/client/silex-lib/src/ts/client/grapesjs/view-buttons.d.ts +1 -0
  74. package/dist/client/silex-lib/src/ts/client/index.d.ts +10 -0
  75. package/dist/client/silex-lib/src/ts/client/publication-transformers.d.ts +42 -0
  76. package/dist/client/silex-lib/src/ts/client/publish-custom-code-block.d.ts +4 -0
  77. package/dist/client/silex-lib/src/ts/client/publish-fonts.d.ts +4 -0
  78. package/dist/client/silex-lib/src/ts/client/utils.d.ts +22 -0
  79. package/dist/client/silex-lib/src/ts/constants.d.ts +32 -0
  80. package/dist/client/silex-lib/src/ts/page.d.ts +2 -0
  81. package/dist/client/silex-lib/src/ts/types.d.ts +339 -0
  82. package/dist/client/types.d.ts +59 -35
  83. package/dist/plugins/client/client/events.d.ts +19 -10
  84. package/dist/plugins/client/client/events.js +11 -0
  85. package/dist/plugins/client/client/events.js.map +1 -1
  86. package/dist/plugins/client/plugins/client/template.js +119 -71
  87. package/dist/plugins/client/plugins/client/template.js.map +1 -1
  88. package/dist/plugins/client/plugins/client/website-info.d.ts +1 -0
  89. package/dist/plugins/client/plugins/client/website-info.js +72 -0
  90. package/dist/plugins/client/plugins/client/website-info.js.map +1 -0
  91. package/dist/plugins/client/types.d.ts +59 -35
  92. package/dist/plugins/client/types.js +23 -0
  93. package/dist/plugins/client/types.js.map +1 -1
  94. package/dist/plugins/server/constants.d.ts +3 -0
  95. package/dist/plugins/server/constants.js +28 -1
  96. package/dist/plugins/server/constants.js.map +1 -1
  97. package/dist/plugins/server/plugins/server/Cache.js +9 -5
  98. package/dist/plugins/server/plugins/server/Cache.js.map +1 -1
  99. package/dist/plugins/server/plugins/server/DownloadConnector.d.ts +29 -0
  100. package/dist/plugins/server/plugins/server/DownloadConnector.js +127 -0
  101. package/dist/plugins/server/plugins/server/DownloadConnector.js.map +1 -0
  102. package/dist/plugins/server/plugins/server/FtpConnector.d.ts +5 -2
  103. package/dist/plugins/server/plugins/server/FtpConnector.js +38 -23
  104. package/dist/plugins/server/plugins/server/FtpConnector.js.map +1 -1
  105. package/dist/plugins/server/plugins/server/GitlabConnector.d.ts +63 -9
  106. package/dist/plugins/server/plugins/server/GitlabConnector.js +367 -91
  107. package/dist/plugins/server/plugins/server/GitlabConnector.js.map +1 -1
  108. package/dist/plugins/server/plugins/server/GitlabHostingConnector.d.ts +16 -0
  109. package/dist/plugins/server/plugins/server/GitlabHostingConnector.js +209 -0
  110. package/dist/plugins/server/plugins/server/GitlabHostingConnector.js.map +1 -0
  111. package/dist/plugins/server/plugins/server/SslPlugin.js +6 -6
  112. package/dist/plugins/server/plugins/server/SslPlugin.js.map +1 -1
  113. package/dist/plugins/server/plugins/server/StaticPlugin.d.ts +8 -1
  114. package/dist/plugins/server/plugins/server/StaticPlugin.js +5 -31
  115. package/dist/plugins/server/plugins/server/StaticPlugin.js.map +1 -1
  116. package/dist/plugins/server/server/config.js +8 -9
  117. package/dist/plugins/server/server/config.js.map +1 -1
  118. package/dist/plugins/server/server/connectors/FsHosting.d.ts +3 -2
  119. package/dist/plugins/server/server/connectors/FsHosting.js +18 -7
  120. package/dist/plugins/server/server/connectors/FsHosting.js.map +1 -1
  121. package/dist/plugins/server/server/connectors/FsStorage.d.ts +3 -1
  122. package/dist/plugins/server/server/connectors/FsStorage.js +35 -28
  123. package/dist/plugins/server/server/connectors/FsStorage.js.map +1 -1
  124. package/dist/plugins/server/server/connectors/connectors.d.ts +7 -7
  125. package/dist/plugins/server/server/connectors/connectors.js +6 -7
  126. package/dist/plugins/server/server/connectors/connectors.js.map +1 -1
  127. package/dist/plugins/server/server/events.js +16 -0
  128. package/dist/plugins/server/server/events.js.map +1 -1
  129. package/dist/plugins/server/server/jobs.d.ts +6 -0
  130. package/dist/plugins/server/server/jobs.js +12 -8
  131. package/dist/plugins/server/server/jobs.js.map +1 -1
  132. package/dist/plugins/server/server/utils/validation.js +1 -2
  133. package/dist/plugins/server/server/utils/validation.js.map +1 -1
  134. package/dist/plugins/server/types.d.ts +59 -35
  135. package/dist/plugins/server/types.js +24 -1
  136. package/dist/plugins/server/types.js.map +1 -1
  137. package/dist/server/constants.js +27 -1
  138. package/dist/server/plugins/server/Cache.js +9 -5
  139. package/dist/server/server/api/api.js +1 -1
  140. package/dist/server/server/api/connectorApi.js +154 -25
  141. package/dist/server/server/api/publicationApi.js +17 -25
  142. package/dist/server/server/api/websiteApi.js +30 -8
  143. package/dist/server/server/cli.js +9 -6
  144. package/dist/server/server/config.js +8 -9
  145. package/dist/server/server/connectors/FsHosting.js +17 -7
  146. package/dist/server/server/connectors/FsStorage.js +34 -28
  147. package/dist/server/server/connectors/connectors.js +6 -7
  148. package/dist/server/server/express.js +4 -5
  149. package/dist/server/server/index.js +5 -1
  150. package/dist/server/server/jobs.js +11 -8
  151. package/dist/server/server/utils/validation.js +1 -2
  152. package/dist/server/types.js +13 -1
  153. package/package.json +56 -42
  154. package/public/assets/download.png +0 -0
  155. package/public/assets/favicon.ico +0 -0
  156. package/public/assets/favicon.png +0 -0
  157. package/public/assets/ftp.png +0 -0
  158. package/public/assets/gitlab.png +0 -0
  159. package/public/assets/gitlab2.png +0 -0
  160. package/public/assets/laptop.png +0 -0
  161. package/public/assets/logo-silex-small.png +0 -0
  162. package/public/silex.js +5 -23
  163. package/src/css/_variables.scss +23 -20
  164. package/src/css/dialog.scss +27 -1
  165. package/src/css/fonts.scss +31 -0
  166. package/src/css/footer.scss +12 -0
  167. package/src/css/grapesjs-light.scss +180 -0
  168. package/src/css/grapesjs-plugins.scss +227 -0
  169. package/src/css/grapesjs.scss +84 -10
  170. package/src/css/index.scss +12 -1
  171. package/src/css/light.scss +7 -0
  172. package/src/css/project-bar.scss +32 -16
  173. package/src/css/silex.scss +79 -5
  174. package/src/css/website-info.scss +14 -0
  175. package/src/html/index.pug +3 -3
  176. package/src/ts/client/api.ts +38 -14
  177. package/src/ts/client/assetUrl.test.ts +164 -0
  178. package/src/ts/client/assetUrl.ts +254 -0
  179. package/src/ts/client/config.ts +133 -5
  180. package/src/ts/client/events.ts +21 -9
  181. package/src/ts/client/grapesjs/LoginDialog.ts +4 -2
  182. package/src/ts/client/grapesjs/PublicationManager.ts +180 -54
  183. package/src/ts/client/grapesjs/PublicationUi.ts +122 -86
  184. package/src/ts/client/grapesjs/breadcrumbs.ts +79 -0
  185. package/src/ts/client/grapesjs/css-props.ts +910 -0
  186. package/src/ts/client/grapesjs/eleventy.ts +11 -8
  187. package/{dist/plugins/client/page.js → src/ts/client/grapesjs/footer.ts} +24 -13
  188. package/src/ts/client/grapesjs/img.ts +147 -0
  189. package/src/ts/client/grapesjs/index.ts +234 -52
  190. package/src/ts/client/grapesjs/internal-links.test.ts +2 -1
  191. package/src/ts/client/grapesjs/internal-links.ts +14 -7
  192. package/src/ts/client/grapesjs/keymaps.ts +207 -0
  193. package/src/ts/client/grapesjs/new-page-dialog.ts +2 -3
  194. package/src/ts/client/grapesjs/page-panel.ts +92 -7
  195. package/src/ts/client/grapesjs/project-bar.ts +116 -72
  196. package/src/ts/client/grapesjs/resize-panel.ts +20 -0
  197. package/src/ts/client/grapesjs/rich-text.ts +21 -13
  198. package/src/ts/client/grapesjs/semantic.ts +3 -3
  199. package/src/ts/client/grapesjs/settings-sections.ts +117 -0
  200. package/src/ts/client/grapesjs/settings.ts +174 -96
  201. package/src/ts/client/grapesjs/storage.ts +98 -33
  202. package/src/ts/client/grapesjs/symbolDialogs.ts +3 -4
  203. package/src/ts/{plugins/server/AuthPlugin.ts → client/grapesjs/view-buttons.ts} +23 -19
  204. package/src/ts/client/index.ts +35 -16
  205. package/src/ts/client/publication-transformers.test.ts +207 -0
  206. package/src/ts/client/publication-transformers.ts +280 -0
  207. package/{dist/plugins/client/client/utils.js → src/ts/client/publish-custom-code-block.ts} +14 -8
  208. package/src/ts/client/publish-fonts.ts +36 -0
  209. package/src/ts/client/utils.ts +53 -1
  210. package/src/ts/constants.ts +31 -0
  211. package/src/ts/page.ts +2 -2
  212. package/src/ts/plugins/client/template.ts +125 -75
  213. package/src/ts/plugins/client/website-info.ts +84 -0
  214. package/src/ts/plugins/server/Cache.ts +6 -2
  215. package/src/ts/plugins/server/DownloadConnector.ts +146 -0
  216. package/src/ts/plugins/server/FtpConnector.ts +47 -21
  217. package/src/ts/plugins/server/GitlabConnector.ts +423 -108
  218. package/src/ts/plugins/server/GitlabHostingConnector.ts +215 -0
  219. package/src/ts/plugins/server/SslPlugin.ts +5 -5
  220. package/src/ts/plugins/server/StaticPlugin.ts +3 -30
  221. package/src/ts/server/api/connectorApi.ts +165 -28
  222. package/src/ts/server/api/publicationApi.ts +17 -24
  223. package/src/ts/server/api/websiteApi.ts +57 -14
  224. package/src/ts/server/cli.ts +7 -5
  225. package/src/ts/server/config.ts +9 -10
  226. package/src/ts/server/connectors/FsHosting.ts +14 -8
  227. package/src/ts/server/connectors/FsStorage.ts +40 -7
  228. package/src/ts/server/connectors/connectors.ts +8 -6
  229. package/src/ts/server/events.ts +17 -0
  230. package/src/ts/server/express.ts +2 -2
  231. package/src/ts/server/index.ts +6 -0
  232. package/src/ts/server/jobs.ts +14 -2
  233. package/src/ts/server/utils/BackwardCompat.ts +530 -529
  234. package/src/ts/types.ts +78 -34
  235. package/dist/plugins/client/client/utils.d.ts +0 -1
  236. package/dist/plugins/client/client/utils.js.map +0 -1
  237. package/dist/plugins/client/page.d.ts +0 -2
  238. package/dist/plugins/client/page.js.map +0 -1
  239. package/dist/plugins/client/plugins/client/publicationRenderer.d.ts +0 -2
  240. package/dist/plugins/client/plugins/client/publicationRenderer.js +0 -128
  241. package/dist/plugins/client/plugins/client/publicationRenderer.js.map +0 -1
  242. package/dist/plugins/server/plugins/server/AuthPlugin.d.ts +0 -1
  243. package/dist/plugins/server/plugins/server/AuthPlugin.js +0 -38
  244. package/dist/plugins/server/plugins/server/AuthPlugin.js.map +0 -1
  245. package/dist/plugins/server/plugins/server/HooksPlugin.d.ts +0 -7
  246. package/dist/plugins/server/plugins/server/HooksPlugin.js +0 -74
  247. package/dist/plugins/server/plugins/server/HooksPlugin.js.map +0 -1
  248. package/src/example-client-config.js +0 -64
  249. package/src/ts/plugins/client/publicationRenderer.ts +0 -128
  250. package/src/ts/plugins/server/HooksPlugin.ts +0 -76
@@ -0,0 +1,910 @@
1
+ /*
2
+ * Silex website builder, free/libre no-code tool for makers.
3
+ * Copyright (c) 2023 lexoyo and Silex Labs foundation
4
+ *
5
+ * This program is free software: you can redistribute it and/or modify
6
+ * it under the terms of the GNU Affero General Public License as published by
7
+ * the Free Software Foundation, either version 3 of the License, or any later version.
8
+ *
9
+ * This program is distributed in the hope that it will be useful,
10
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
11
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12
+ * GNU Affero General Public License for more details.
13
+ *
14
+ * You should have received a copy of the GNU Affero General Public License
15
+ * along with this program. If not, see <https://www.gnu.org/licenses/>.
16
+ */
17
+
18
+ import { Editor } from 'grapesjs'
19
+
20
+ /**
21
+ * @fileoverview Adds various css properties
22
+ */
23
+
24
+ export default (editor: Editor, opts) => {
25
+ editor.on('load', () => {
26
+ /***************/
27
+ /* General */
28
+ /***************/
29
+ editor.StyleManager.removeProperty('general', 'display')
30
+ editor.StyleManager.addProperty('general', {
31
+ name: 'Display',
32
+ property: 'display',
33
+ type: 'select',
34
+ defaults: '',
35
+ options: [
36
+ /* @ts-ignore */
37
+ { value: '', name: '' },
38
+ /* @ts-ignore */
39
+ { value: 'block', name: 'block' },
40
+ /* @ts-ignore */
41
+ { value: 'inline', name: 'inline' },
42
+ /* @ts-ignore */
43
+ { value: 'inline-block', name: 'inline-block' },
44
+ /* @ts-ignore */
45
+ { value: 'flex', name: 'flex' },
46
+ /* @ts-ignore */
47
+ { value: 'none', name: 'none' },
48
+ ],
49
+ info: '',
50
+ })
51
+ editor.StyleManager.addProperty('general', {
52
+ name: 'Visibility',
53
+ property: 'visibility',
54
+ type: 'select',
55
+ defaults: '',
56
+ options: [
57
+ /* @ts-ignore */
58
+ { value: '', name: '' },
59
+ /* @ts-ignore */
60
+ { value: 'visible', name: 'visible' },
61
+ /* @ts-ignore */
62
+ { value: 'hidden', name: 'hidden' },
63
+ /* @ts-ignore */
64
+ { value: 'collapse', name: 'collapse' },
65
+ ],
66
+ info: 'The visibility CSS property shows or hides an element without changing the layout of a document. The property can also hide rows or columns in a <table>.',
67
+ })
68
+ editor.StyleManager.removeProperty('general', 'float')
69
+ editor.StyleManager.removeProperty('general', 'position')
70
+ editor.StyleManager.addProperty('general', {
71
+ name: 'Position',
72
+ property: 'position',
73
+ type: 'select',
74
+ defaults: '',
75
+ full: true,
76
+ options: [
77
+ /* @ts-ignore */
78
+ { value: '', name: '' },
79
+ /* @ts-ignore */
80
+ { value: 'static', name: 'static' },
81
+ /* @ts-ignore */
82
+ { value: 'relative', name: 'relative' },
83
+ /* @ts-ignore */
84
+ { value: 'absolute', name: 'absolute' },
85
+ /* @ts-ignore */
86
+ { value: 'fixed', name: 'fixed' },
87
+ ],
88
+ info: '',
89
+ })
90
+ editor.StyleManager.removeProperty('general', 'top')
91
+ editor.StyleManager.addProperty('general', {
92
+ name: 'Top',
93
+ property: 'top',
94
+ type: 'number',
95
+ defaults: '',
96
+ units: [ 'px', '%', 'em', 'rem', 'vh', 'vw' ],
97
+ info: '',
98
+ })
99
+ editor.StyleManager.removeProperty('general', 'bottom')
100
+ editor.StyleManager.addProperty('general', {
101
+ name: 'Bottom',
102
+ property: 'bottom',
103
+ type: 'number',
104
+ defaults: '',
105
+ units: [ 'px', '%', 'em', 'rem', 'vh', 'vw' ],
106
+ info: '',
107
+ })
108
+ editor.StyleManager.removeProperty('general', 'right')
109
+ editor.StyleManager.addProperty('general', {
110
+ name: 'Right',
111
+ property: 'right',
112
+ type: 'number',
113
+ defaults: '',
114
+ units: [ 'px', '%', 'em', 'rem', 'vh', 'vw' ],
115
+ info: '',
116
+ })
117
+ editor.StyleManager.removeProperty('general', 'left')
118
+ editor.StyleManager.addProperty('general', {
119
+ name: 'Left',
120
+ property: 'left',
121
+ type: 'number',
122
+ defaults: '',
123
+ units: [ 'px', '%', 'em', 'rem', 'vh', 'vw' ],
124
+ info: '',
125
+ })
126
+ const contentProp = editor.StyleManager.addProperty('general', {
127
+ name: 'Content',
128
+ property: 'content',
129
+ type: 'text',
130
+ defaults: '',
131
+ info: 'The content CSS property replaces an element with a generated value. Objects inserted using the content property are anonymous replaced elements.',
132
+ full: true,
133
+ visible: false,
134
+ }, { at: 0 })
135
+ /***************/
136
+ /* Dimension */
137
+ /***************/
138
+ editor.StyleManager.removeProperty('dimension', 'width')
139
+ editor.StyleManager.addProperty('dimension', {
140
+ name: 'Width',
141
+ property: 'width',
142
+ type: 'integer',
143
+ units: ['px', '%', 'em', 'rem', 'vh', 'vw'],
144
+ default: '',
145
+ fixedValues: ['inherit', 'initial', 'unset', 'none', 'max-content', 'min-content', 'fit-content', 'auto'],
146
+ }, { at: 0 })
147
+ editor.StyleManager.removeProperty('dimension', 'height')
148
+ editor.StyleManager.addProperty('dimension', {
149
+ name: 'Height',
150
+ property: 'height',
151
+ type: 'integer',
152
+ units: [ 'px', '%', 'em', 'rem', 'vh', 'vw' ],
153
+ default: '',
154
+ fixedValues: ['inherit', 'initial', 'unset', 'none', 'max-content', 'min-content', 'fit-content', 'auto'],
155
+ }, { at: 1 })
156
+ editor.StyleManager.addProperty('dimension', {
157
+ name: 'Min width',
158
+ property: 'min-width',
159
+ type: 'integer',
160
+ units: ['px', '%', 'em', 'rem', 'vh', 'vw'],
161
+ default: '',
162
+ fixedValues: ['inherit', 'initial', 'unset', 'none', 'max-content', 'min-content', 'fit-content', 'auto'],
163
+ }, { at: 2 })
164
+ editor.StyleManager.removeProperty('dimension', 'max-width')
165
+ editor.StyleManager.addProperty('dimension', {
166
+ name: 'Max width',
167
+ property: 'max-width',
168
+ type: 'integer',
169
+ units: ['px', '%', 'em', 'rem', 'vh', 'vw'],
170
+ default: '',
171
+ fixedValues: ['inherit', 'initial', 'unset', 'none', 'max-content', 'min-content', 'fit-content', 'auto'],
172
+ }, { at: 3 })
173
+ editor.StyleManager.removeProperty('dimension', 'min-height')
174
+ editor.StyleManager.addProperty('dimension', {
175
+ name: 'Min height',
176
+ property: 'min-height',
177
+ type: 'integer',
178
+ units: ['px', '%', 'em', 'rem', 'vh', 'vw'],
179
+ default: '',
180
+ fixedValues: ['inherit', 'initial', 'unset', 'none', 'max-content', 'min-content', 'fit-content', 'auto'],
181
+ }, { at: 4 })
182
+ editor.StyleManager.addProperty('dimension', {
183
+ name: 'Max height',
184
+ property: 'max-height',
185
+ type: 'integer',
186
+ units: ['px', '%', 'em', 'rem', 'vh', 'vw'],
187
+ default: '',
188
+ fixedValues: ['inherit', 'initial', 'unset', 'none', 'max-content', 'min-content', 'fit-content', 'auto'],
189
+ }, { at: 5 })
190
+ editor.StyleManager.addProperty('dimension', {
191
+ name: 'Overflow',
192
+ property: 'overflow',
193
+ type: 'composite',
194
+ properties: [{
195
+ name: 'Overflow X',
196
+ type: 'select',
197
+ defaults: '',
198
+ options: [
199
+ /* @ts-ignore */
200
+ { value: '', name: '' },
201
+ /* @ts-ignore */
202
+ { value: 'auto', name: 'auto' },
203
+ /* @ts-ignore */
204
+ { value: 'hidden', name: 'hidden' },
205
+ /* @ts-ignore */
206
+ { value: 'visible', name: 'visible' },
207
+ /* @ts-ignore */
208
+ { value: 'scroll', name: 'scroll' },
209
+ ],
210
+ }, {
211
+ name: 'Overflow Y',
212
+ type: 'select',
213
+ defaults: '',
214
+ options: [
215
+ /* @ts-ignore */
216
+ { value: '', name: '' },
217
+ /* @ts-ignore */
218
+ { value: 'auto', name: 'auto' },
219
+ /* @ts-ignore */
220
+ { value: 'hidden', name: 'hidden' },
221
+ /* @ts-ignore */
222
+ { value: 'visible', name: 'visible' },
223
+ /* @ts-ignore */
224
+ { value: 'scroll', name: 'scroll' },
225
+ ],
226
+ }],
227
+ info: 'The overflow CSS property sets what to do when an element\'s content is too big to fit in its block formatting context. It is a shorthand for overflow-x and overflow-y.',
228
+ }, { at: 6 })
229
+ editor.StyleManager.removeProperty('dimension', 'margin')
230
+ editor.StyleManager.addProperty('dimension', {
231
+ name: 'Margin',
232
+ property: 'margin',
233
+ type: 'composite',
234
+ defaults: '',
235
+ fixedValues: [ 'initial', 'inherit', 'auto' ],
236
+ full: true,
237
+ properties: [{
238
+ property: 'margin-top',
239
+ name: 'Margin top',
240
+ type: 'number',
241
+ default: '',
242
+ fixedValues: [ 'initial', 'inherit', 'auto' ],
243
+ units: [ 'px', '%', 'em', 'rem', 'vh', 'vw' ],
244
+ }, {
245
+ property: 'margin-right',
246
+ name: 'Margin right',
247
+ type: 'number',
248
+ default: '',
249
+ fixedValues: [ 'initial', 'inherit', 'auto' ],
250
+ units: [ 'px', '%', 'em', 'rem', 'vh', 'vw' ],
251
+ }, {
252
+ property: 'margin-bottom',
253
+ name: 'Margin bottom',
254
+ type: 'number',
255
+ default: '',
256
+ fixedValues: [ 'initial', 'inherit', 'auto' ],
257
+ units: [ 'px', '%', 'em', 'rem', 'vh', 'vw' ],
258
+ }, {
259
+ property: 'margin-left',
260
+ name: 'Margin left',
261
+ type: 'number',
262
+ default: '',
263
+ fixedValues: [ 'initial', 'inherit', 'auto' ],
264
+ units: [ 'px', '%', 'em', 'rem', 'vh', 'vw' ],
265
+ }],
266
+ }, { at: 7 })
267
+ editor.StyleManager.removeProperty('dimension', 'padding')
268
+ editor.StyleManager.addProperty('dimension', {
269
+ name: 'Padding',
270
+ property: 'padding',
271
+ type: 'composite',
272
+ fixedValues: [ 'initial', 'inherit', 'auto' ],
273
+ full: true,
274
+ properties: [{
275
+ property: 'padding-top',
276
+ name: 'Padding top',
277
+ type: 'number',
278
+ default: '',
279
+ value: '10',
280
+ fixedValues: [ 'initial', 'inherit', 'auto' ],
281
+ units: [ 'px', '%', 'em', 'rem', 'vh', 'vw' ],
282
+ }, {
283
+ property: 'padding-right',
284
+ name: 'Padding right',
285
+ type: 'number',
286
+ default: '',
287
+ value: '10',
288
+ fixedValues: [ 'initial', 'inherit', 'auto' ],
289
+ units: [ 'px', '%', 'em', 'rem', 'vh', 'vw' ],
290
+ }, {
291
+ property: 'padding-bottom',
292
+ name: 'Padding bottom',
293
+ type: 'number',
294
+ default: '',
295
+ value: '10',
296
+ fixedValues: [ 'initial', 'inherit', 'auto' ],
297
+ units: [ 'px', '%', 'em', 'rem', 'vh', 'vw' ],
298
+ }, {
299
+ property: 'padding-left',
300
+ name: 'Padding left',
301
+ type: 'number',
302
+ default: '',
303
+ value: '10',
304
+ fixedValues: [ 'initial', 'inherit', 'auto' ],
305
+ units: [ 'px', '%', 'em', 'rem', 'vh', 'vw' ],
306
+ }],
307
+ }, { at: 8 })
308
+ /***************/
309
+ /* Typography */
310
+ /***************/
311
+ editor.StyleManager.removeProperty('typography', 'font-size')
312
+ editor.StyleManager.addProperty('typography', {
313
+ name: 'Font size',
314
+ property: 'font-size',
315
+ type: 'number',
316
+ default: '',
317
+ fixedValues: [ 'medium', 'xx-small', 'x-small', 'small', 'large', 'x-large', 'xx-large', 'smaller', 'larger', 'length', 'initial', 'inherit' ],
318
+ units: [ 'px', '%', 'em', 'rem', 'vh', 'vw' ],
319
+ }, { at: 1 })
320
+ editor.StyleManager.removeProperty('typography', 'font-weight')
321
+ editor.StyleManager.addProperty('typography', {
322
+ name: 'Font weight',
323
+ property: 'font-weight',
324
+ type: 'select',
325
+ default: '',
326
+ fixedValues: ['inherit', 'initial', 'unset', 'auto'],
327
+ options: [
328
+ /* @ts-ignore */
329
+ { id: '', label: '' },
330
+ /* @ts-ignore */
331
+ { id: '100', label: 'Thin' },
332
+ /* @ts-ignore */
333
+ { id: '200', label: 'Extra-Light' },
334
+ /* @ts-ignore */
335
+ { id: '300', label: 'Light' },
336
+ /* @ts-ignore */
337
+ { id: '400', label: 'Normal' },
338
+ /* @ts-ignore */
339
+ { id: '500', label: 'Medium' },
340
+ /* @ts-ignore */
341
+ { id: '600', label: 'Semi-Bold' },
342
+ /* @ts-ignore */
343
+ { id: '700', label: 'Bold' },
344
+ /* @ts-ignore */
345
+ { id: '800', label: 'Extra-Bold' },
346
+ /* @ts-ignore */
347
+ { id: '900', label: 'Ultra-Bold' }
348
+ ]
349
+ }, { at: 2 })
350
+ editor.StyleManager.removeProperty('typography', 'letter-spacing')
351
+ editor.StyleManager.addProperty('typography', {
352
+ name: 'Letter spacing',
353
+ property: 'letter-spacing',
354
+ type: 'number',
355
+ default: '',
356
+ fixedValues: [ 'normal', 'initial', 'inherit', 'unset' ],
357
+ units: [ 'px', '%', 'em', 'rem', 'vh', 'vw' ],
358
+ }, { at: 3 })
359
+ editor.StyleManager.removeProperty('typography', 'color')
360
+ editor.StyleManager.addProperty('typography', {
361
+ name: 'Color',
362
+ property: 'color',
363
+ type: 'color',
364
+ default: '',
365
+ full: true,
366
+ }, { at: 4 })
367
+ editor.StyleManager.removeProperty('typography', 'line-height')
368
+ editor.StyleManager.addProperty('typography', {
369
+ name: 'Line height',
370
+ property: 'line-height',
371
+ type: 'number',
372
+ default: '',
373
+ fixedValues: [ 'normal', 'initial', 'inherit', 'unset' ],
374
+ units: [ 'px', '%', 'em', 'rem', 'vh', 'vw' ],
375
+ }, { at: 5 })
376
+ editor.StyleManager.removeProperty('typography', 'text-align')
377
+ editor.StyleManager.addProperty('typography', {
378
+ name: 'Text align',
379
+ property: 'text-align',
380
+ type: 'select',
381
+ defaults: '',
382
+ options: [
383
+ /* @ts-ignore */
384
+ { id: '', label: '' },
385
+ /* @ts-ignore */
386
+ { id: 'left', label: 'left' },
387
+ /* @ts-ignore */
388
+ { id: 'center', label: 'center' },
389
+ /* @ts-ignore */
390
+ { id: 'right', label: 'right' },
391
+ /* @ts-ignore */
392
+ { id: 'justified', label: 'justified' },
393
+ ],
394
+ }, { at: 6 })
395
+ editor.StyleManager.addProperty('typography', {
396
+ name: 'Word break',
397
+ property: 'word-break',
398
+ type: 'select',
399
+ defaults: '',
400
+ options: [
401
+ /* @ts-ignore */
402
+ { value: '', name: '' },
403
+ /* @ts-ignore */
404
+ { value: 'normal', name: 'normal' },
405
+ /* @ts-ignore */
406
+ { value: 'break-all', name: 'break-all' },
407
+ /* @ts-ignore */
408
+ { value: 'keep-all', name: 'keep-all' },
409
+ /* @ts-ignore */
410
+ { value: 'break-word', name: 'break-word' },
411
+ ],
412
+ info: 'The word-break CSS property sets whether line breaks appear wherever the text would otherwise overflow its content box.',
413
+ }, { at: 7 })
414
+ editor.StyleManager.addProperty('typography', {
415
+ name: 'Word wrap',
416
+ property: 'word-wrap',
417
+ type: 'select',
418
+ defaults: '',
419
+ options: [
420
+ /* @ts-ignore */
421
+ { value: '', name: '' },
422
+ /* @ts-ignore */
423
+ { value: 'normal', name: 'normal' },
424
+ /* @ts-ignore */
425
+ { value: 'break-word', name: 'break-word' },
426
+ ],
427
+ info: 'The word-wrap CSS property sets whether the line may be broken within a word in order to prevent overflow when an otherwise unbreakable string is too long to fit in its containing box.',
428
+ }, { at: 8 })
429
+ editor.StyleManager.addProperty('typography', {
430
+ name: 'White space',
431
+ property: 'white-space',
432
+ type: 'select',
433
+ defaults: '',
434
+ options: [
435
+ /* @ts-ignore */
436
+ { value: '', name: '' },
437
+ /* @ts-ignore */
438
+ { value: 'normal', name: 'normal' },
439
+ /* @ts-ignore */
440
+ { value: 'nowrap', name: 'nowrap' },
441
+ /* @ts-ignore */
442
+ { value: 'pre', name: 'pre' },
443
+ /* @ts-ignore */
444
+ { value: 'pre-wrap', name: 'pre-wrap' },
445
+ /* @ts-ignore */
446
+ { value: 'pre-line', name: 'pre-line' },
447
+ /* @ts-ignore */
448
+ { value: 'break-spaces', name: 'break-spaces' },
449
+ ],
450
+ info: 'The white-space CSS property sets how white space inside an element is handled.',
451
+ }, { at: 9 })
452
+ editor.StyleManager.addProperty('typography', {
453
+ name: 'Text decoration',
454
+ property: 'text-decoration',
455
+ type: 'composite',
456
+ properties: [{
457
+ name: 'Text decoration line',
458
+ property: 'text-decoration-line',
459
+ type: 'select',
460
+ defaults: '',
461
+ fixedValues: ['auto', 'inherit', 'initial', 'revert', 'unset'],
462
+ options: [
463
+ /* @ts-ignore */
464
+ { value: '', name: '' },
465
+ /* @ts-ignore */
466
+ { value: 'none', name: 'none' },
467
+ /* @ts-ignore */
468
+ { value: 'underline', name: 'underline' },
469
+ /* @ts-ignore */
470
+ { value: 'overline', name: 'overline' },
471
+ /* @ts-ignore */
472
+ { value: 'line-through', name: 'line-through' },
473
+ /* @ts-ignore */
474
+ { value: 'blink', name: 'blink' },
475
+ ],
476
+ info: 'The text-decoration CSS property sets the appearance of decorative lines on text.',
477
+ }, {
478
+ name: 'Text decoration style',
479
+ property: 'text-decoration-style',
480
+ type: 'select',
481
+ defaults: '',
482
+ options: [
483
+ /* @ts-ignore */
484
+ { value: '', name: '' },
485
+ /* @ts-ignore */
486
+ { value: 'solid', name: 'solid' },
487
+ /* @ts-ignore */
488
+ { value: 'double', name: 'double' },
489
+ /* @ts-ignore */
490
+ { value: 'dotted', name: 'dotted' },
491
+ /* @ts-ignore */
492
+ { value: 'dashed', name: 'dashed' },
493
+ /* @ts-ignore */
494
+ { value: 'wavy', name: 'wavy' },
495
+ ],
496
+ info: 'The text-decoration-style CSS property sets the style of the lines specified by text-decoration-line. The style applies to all lines, there is no way to define different styles for each of the lines.',
497
+ }, {
498
+ name: 'Text decoration color',
499
+ property: 'text-decoration-color',
500
+ type: 'color',
501
+ defaults: '',
502
+ fixedValues: ['inherit', 'initial', 'revert', 'unset'],
503
+ info: 'The text-decoration-color CSS property sets the color of decorations added to text by text-decoration-line.',
504
+ }, {
505
+ name: 'Text decoration thickness',
506
+ property: 'text-decoration-thickness',
507
+ type: 'integer',
508
+ units: ['px', '%', 'em'],
509
+ info: 'The text-decoration-thickness CSS property sets the stroke thickness of the decoration line that is used on text in an element, such as a line-through, underline, or overline.',
510
+ default: '',
511
+ fixedValues: ['auto', 'inherit', 'initial', 'revert', 'unset'],
512
+ }],
513
+ }, { at: 10 })
514
+ editor.StyleManager.addProperty('typography', {
515
+ name: 'Text transform',
516
+ property: 'text-transform',
517
+ type: 'select',
518
+ defaults: '',
519
+ options: [
520
+ /* @ts-ignore */
521
+ { value: '', name: '' },
522
+ /* @ts-ignore */
523
+ { value: 'none', name: 'none' },
524
+ /* @ts-ignore */
525
+ { value: 'capitalize', name: 'capitalize' },
526
+ /* @ts-ignore */
527
+ { value: 'uppercase', name: 'uppercase' },
528
+ /* @ts-ignore */
529
+ { value: 'lowercase', name: 'lowercase' },
530
+ ],
531
+ info: 'The text-transform CSS property sets how to capitalize an element\'s text. It can be used to make text appear in all-uppercase or all-lowercase, or with each word capitalized.',
532
+ }, { at: 11 })
533
+ editor.StyleManager.addProperty('typography', {
534
+ name: 'Text overflow',
535
+ property: 'text-overflow',
536
+ type: 'select',
537
+ defaults: '',
538
+ options: [
539
+ /* @ts-ignore */
540
+ { value: '', name: '' },
541
+ /* @ts-ignore */
542
+ { value: 'clip', name: 'clip' },
543
+ /* @ts-ignore */
544
+ { value: 'ellipsis', name: 'ellipsis' },
545
+ ],
546
+ info: 'The text-overflow CSS property sets how hidden overflow content is signaled to users. It can be clipped, display an ellipsis (\'…\', U+2026 HORIZONTAL ELLIPSIS) or a Web author-defined string. It covers the two long-hand properties text-overflow-clip and text-overflow-string.',
547
+ }, { at: 12 })
548
+ /***************/
549
+ /* Decorations */
550
+ /***************/
551
+ editor.StyleManager.removeProperty('decorations', 'background-color')
552
+ editor.StyleManager.addProperty('decorations', {
553
+ name: 'Background color',
554
+ property: 'background-color',
555
+ type: 'color',
556
+ default: '',
557
+ full: true,
558
+ }, { at: 0 })
559
+ editor.StyleManager.removeProperty('decorations', 'border-radius')
560
+ editor.StyleManager.addProperty('decorations', {
561
+ name: 'Border radius',
562
+ property: 'border-radius',
563
+ type: 'composite',
564
+ defaults: '',
565
+ fixedValues: [ 'initial', 'inherit', 'auto' ],
566
+ full: true,
567
+ properties: [{
568
+ property: 'border-top-left-radius',
569
+ name: 'Top left',
570
+ type: 'number',
571
+ default: '',
572
+ fixedValues: [ 'initial', 'inherit', 'auto' ],
573
+ units: [ 'px', '%', 'em', 'rem', 'vh', 'vw' ],
574
+ }, {
575
+ property: 'border-top-right-radius',
576
+ name: 'Top right',
577
+ type: 'number',
578
+ default: '',
579
+ fixedValues: [ 'initial', 'inherit', 'auto' ],
580
+ units: [ 'px', '%', 'em', 'rem', 'vh', 'vw' ],
581
+ }, {
582
+ property: 'border-bottom-right-radius',
583
+ name: 'Bottom right',
584
+ type: 'number',
585
+ default: '',
586
+ fixedValues: [ 'initial', 'inherit', 'auto' ],
587
+ units: [ 'px', '%', 'em', 'rem', 'vh', 'vw' ],
588
+ }, {
589
+ property: 'border-bottom-left-radius',
590
+ name: 'Bottom left',
591
+ type: 'number',
592
+ default: '',
593
+ fixedValues: [ 'initial', 'inherit', 'auto' ],
594
+ units: [ 'px', '%', 'em', 'rem', 'vh', 'vw' ],
595
+ }],
596
+ }, { at: 2 })
597
+
598
+ editor.StyleManager.addProperty('decorations', {
599
+ name: 'Outline',
600
+ property: 'outline',
601
+ type: 'composite',
602
+ properties: [{
603
+ name: 'Outline width',
604
+ property: 'outline-width',
605
+ type: 'integer',
606
+ units: ['px', '%', 'em'],
607
+ info: 'The outline-width CSS property sets the thickness of an element\'s outline. An outline is a line that is drawn around an element, outside the border.',
608
+ default: '',
609
+ fixedValues: ['medium', 'thin', 'thick', 'inherit', 'initial', 'revert', 'unset'],
610
+ }, {
611
+ name: 'Outline style',
612
+ property: 'outline-style',
613
+ type: 'select',
614
+ defaults: '',
615
+ options: [
616
+ /* @ts-ignore */
617
+ { value: '', name: '' },
618
+ /* @ts-ignore */
619
+ { value: 'none', name: 'none' },
620
+ /* @ts-ignore */
621
+ { value: 'hidden', name: 'hidden' },
622
+ /* @ts-ignore */
623
+ { value: 'dotted', name: 'dotted' },
624
+ /* @ts-ignore */
625
+ { value: 'dashed', name: 'dashed' },
626
+ /* @ts-ignore */
627
+ { value: 'solid', name: 'solid' },
628
+ /* @ts-ignore */
629
+ { value: 'double', name: 'double' },
630
+ /* @ts-ignore */
631
+ { value: 'groove', name: 'groove' },
632
+ /* @ts-ignore */
633
+ { value: 'ridge', name: 'ridge' },
634
+ /* @ts-ignore */
635
+ { value: 'inset', name: 'inset' },
636
+ /* @ts-ignore */
637
+ { value: 'outset', name: 'outset' },
638
+ ],
639
+ info: 'The outline-style CSS property sets the style of an element\'s outline. An outline is a line that is drawn around an element, outside the border.',
640
+ }, {
641
+ name: 'Outline color',
642
+ property: 'outline-color',
643
+ type: 'color',
644
+ defaults: '',
645
+ info: 'The outline-color CSS property sets the color of an element\'s outline.',
646
+ }],
647
+ }, { at: 8 })
648
+ /***************/
649
+ /* Extra */
650
+ /***************/
651
+ editor.StyleManager.addProperty('extra', {
652
+ name: 'Z index',
653
+ property: 'z-index',
654
+ type: 'slider',
655
+ step: 1,
656
+ min: -10000,
657
+ max: 10000,
658
+ units: [],
659
+ info: 'Stacking order of the element',
660
+ default: '',
661
+ fixedValues: ['auto', 'unset', 'initial', 'inherit', 'revert'],
662
+ }, { at: 1 })
663
+ editor.StyleManager.addProperty('extra', {
664
+ name: 'Pointer events',
665
+ property: 'pointer-events',
666
+ type: 'select',
667
+ defaults: '',
668
+ options: [
669
+ /* @ts-ignore */
670
+ { value: '', name: '' },
671
+ /* @ts-ignore */
672
+ { value: 'auto', name: 'auto' },
673
+ /* @ts-ignore */
674
+ { value: 'none', name: 'none' },
675
+ /* @ts-ignore */
676
+ { value: 'visiblePainted', name: 'visiblePainted' },
677
+ /* @ts-ignore */
678
+ { value: 'visibleFill', name: 'visibleFill' },
679
+ /* @ts-ignore */
680
+ { value: 'visibleStroke', name: 'visibleStroke' },
681
+ /* @ts-ignore */
682
+ { value: 'visible', name: 'visible' },
683
+ /* @ts-ignore */
684
+ { value: 'painted', name: 'painted' },
685
+ /* @ts-ignore */
686
+ { value: 'fill', name: 'fill' },
687
+ /* @ts-ignore */
688
+ { value: 'stroke', name: 'stroke' },
689
+ /* @ts-ignore */
690
+ { value: 'all', name: 'all' },
691
+ ],
692
+ info: 'The pointer-events CSS property sets under what circumstances (if any) a particular graphic element can become the target of pointer events.',
693
+ }, { at: 2 })
694
+ editor.StyleManager.addProperty('extra', {
695
+ name: 'Cursor',
696
+ property: 'cursor',
697
+ type: 'select',
698
+ defaults: '',
699
+ options: [
700
+ /* @ts-ignore */
701
+ { value: '', name: '' },
702
+ /* @ts-ignore */
703
+ { value: 'auto', name: 'auto' },
704
+ /* @ts-ignore */
705
+ { value: 'default', name: 'default' },
706
+ /* @ts-ignore */
707
+ { value: 'none', name: 'none' },
708
+ /* @ts-ignore */
709
+ { value: 'context-menu', name: 'context-menu' },
710
+ /* @ts-ignore */
711
+ { value: 'help', name: 'help' },
712
+ /* @ts-ignore */
713
+ { value: 'pointer', name: 'pointer' },
714
+ /* @ts-ignore */
715
+ { value: 'progress', name: 'progress' },
716
+ /* @ts-ignore */
717
+ { value: 'wait', name: 'wait' },
718
+ /* @ts-ignore */
719
+ { value: 'cell', name: 'cell' },
720
+ /* @ts-ignore */
721
+ { value: 'crosshair', name: 'crosshair' },
722
+ /* @ts-ignore */
723
+ { value: 'text', name: 'text' },
724
+ /* @ts-ignore */
725
+ { value: 'vertical-text', name: 'vertical-text' },
726
+ /* @ts-ignore */
727
+ { value: 'alias', name: 'alias' },
728
+ /* @ts-ignore */
729
+ { value: 'copy', name: 'copy' },
730
+ /* @ts-ignore */
731
+ { value: 'move', name: 'move' },
732
+ /* @ts-ignore */
733
+ { value: 'no-drop', name: 'no-drop' },
734
+ /* @ts-ignore */
735
+ { value: 'not-allowed', name: 'not-allowed' },
736
+ /* @ts-ignore */
737
+ { value: 'grab', name: 'grab' },
738
+ /* @ts-ignore */
739
+ { value: 'grabbing', name: 'grabbing' },
740
+ /* @ts-ignore */
741
+ { value: 'all-scroll', name: 'all-scroll' },
742
+ /* @ts-ignore */
743
+ { value: 'col-resize', name: 'col-resize' },
744
+ /* @ts-ignore */
745
+ { value: 'row-resize', name: 'row-resize' },
746
+ /* @ts-ignore */
747
+ { value: 'n-resize', name: 'n-resize' },
748
+ /* @ts-ignore */
749
+ { value: 'e-resize', name: 'e-resize' },
750
+ /* @ts-ignore */
751
+ { value: 's-resize', name: 's-resize' },
752
+ /* @ts-ignore */
753
+ { value: 'w-resize', name: 'w-resize' },
754
+ /* @ts-ignore */
755
+ { value: 'ne-resize', name: 'ne-resize' },
756
+ /* @ts-ignore */
757
+ { value: 'nw-resize', name: 'nw-resize' },
758
+ /* @ts-ignore */
759
+ { value: 'se-resize', name: 'se-resize' },
760
+ /* @ts-ignore */
761
+ { value: 'sw-resize', name: 'sw-resize' },
762
+ /* @ts-ignore */
763
+ { value: 'ew-resize', name: 'ew-resize' },
764
+ /* @ts-ignore */
765
+ { value: 'ns-resize', name: 'ns-resize' },
766
+ /* @ts-ignore */
767
+ { value: 'nesw-resize', name: 'nesw-resize' },
768
+ /* @ts-ignore */
769
+ { value: 'nwse-resize', name: 'nwse-resize' },
770
+ /* @ts-ignore */
771
+ { value: 'zoom-in', name: 'zoom-in' },
772
+ /* @ts-ignore */
773
+ { value: 'zoom-out', name: 'zoom-out' },
774
+ ],
775
+ info: 'The cursor CSS property sets the type of mouse cursor, if any, to show when the mouse pointer is over an element.',
776
+ }, { at: 3 })
777
+ editor.StyleManager.addProperty('extra', {
778
+ name: 'Column count',
779
+ property: 'column-count',
780
+ type: 'integer',
781
+ units: [],
782
+ info: 'The column-count CSS property breaks an element\'s content into the specified number of columns.',
783
+ default: '',
784
+ fixedValues: ['auto', 'inherit', 'initial', 'revert', 'unset'],
785
+ min: 1,
786
+ }, { at: 4 })
787
+ editor.StyleManager.addProperty('extra', {
788
+ name: 'Column width',
789
+ property: 'column-width',
790
+ type: 'integer',
791
+ units: ['px', '%', 'em'],
792
+ info: 'The column-width CSS property suggests an optimal column width. This is not an absolute value but a mere hint. Browser will adjust the width of the element automatically.',
793
+ default: '',
794
+ fixedValues: ['auto', 'inherit', 'initial', 'revert', 'unset'],
795
+ }, { at: 5 })
796
+ editor.StyleManager.addProperty('extra', {
797
+ name: 'Column gap',
798
+ property: 'column-gap',
799
+ type: 'integer',
800
+ units: ['px', '%', 'em'],
801
+ info: 'The column-gap CSS property sets the size of the gap (gutter) between an element\'s columns.',
802
+ default: '',
803
+ fixedValues: ['normal', 'inherit', 'initial', 'revert', 'unset'],
804
+ }, { at: 6 })
805
+ editor.StyleManager.addProperty('extra', {
806
+ name: 'Column rule',
807
+ property: 'column-rule',
808
+ type: 'composite',
809
+ properties: [{
810
+ name: 'Column rule width',
811
+ property: 'column-rule-width',
812
+ type: 'integer',
813
+ units: ['px', '%', 'em'],
814
+ info: 'The column-rule-width CSS property sets the width of the line drawn between columns in a multi-column layout.',
815
+ default: '',
816
+ fixedValues: ['medium', 'thin', 'thick', 'inherit', 'initial', 'revert', 'unset'],
817
+ }, {
818
+ name: 'Column rule style',
819
+ property: 'column-rule-style',
820
+ type: 'select',
821
+ defaults: '',
822
+ options: [
823
+ /* @ts-ignore */
824
+ { value: '', name: '' },
825
+ /* @ts-ignore */
826
+ { value: 'none', name: 'none' },
827
+ /* @ts-ignore */
828
+ { value: 'hidden', name: 'hidden' },
829
+ /* @ts-ignore */
830
+ { value: 'dotted', name: 'dotted' },
831
+ /* @ts-ignore */
832
+ { value: 'dashed', name: 'dashed' },
833
+ /* @ts-ignore */
834
+ { value: 'solid', name: 'solid' },
835
+ /* @ts-ignore */
836
+ { value: 'double', name: 'double' },
837
+ /* @ts-ignore */
838
+ { value: 'groove', name: 'groove' },
839
+ /* @ts-ignore */
840
+ { value: 'ridge', name: 'ridge' },
841
+ /* @ts-ignore */
842
+ { value: 'inset', name: 'inset' },
843
+ /* @ts-ignore */
844
+ { value: 'outset', name: 'outset' },
845
+ /* @ts-ignore */
846
+ { value: 'inherit', name: 'inherit' },
847
+ ],
848
+ info: 'The column-rule-style CSS property sets the style of the line drawn between columns in a multi-column layout.',
849
+ }, {
850
+ name: 'Column rule color',
851
+ property: 'column-rule-color',
852
+ type: 'color',
853
+ defaults: '',
854
+ info: 'The column-rule-color CSS property sets the color of the line drawn between columns in a multi-column layout.',
855
+ }],
856
+ }, { at: 7 })
857
+ editor.StyleManager.addProperty('extra', {
858
+ name: 'Column span',
859
+ property: 'column-span',
860
+ type: 'select',
861
+ defaults: '',
862
+ options: [
863
+ /* @ts-ignore */
864
+ { value: '', name: '' },
865
+ /* @ts-ignore */
866
+ { value: 'none', name: 'none' },
867
+ /* @ts-ignore */
868
+ { value: 'all', name: 'all' },
869
+ ],
870
+ info: 'The column-span CSS property makes it possible for an element to span across all columns when its value is set to all.',
871
+ }, { at: 8 })
872
+ function refreshContentProp() {
873
+ const state = editor.SelectorManager.getState()
874
+ if (['before', 'after'].includes(state)) {
875
+ contentProp.set('visible', true)
876
+ } else {
877
+ contentProp.set('visible', false)
878
+ }
879
+ }
880
+ editor.on('selector:state component:selected component:styleUpdate style:sector:update', (state, opts) => setTimeout(() => refreshContentProp()))
881
+ editor.StyleManager.getSector('general').on('change', () => refreshContentProp())
882
+ editor.SelectorManager.states.add({name: 'before', label: 'Before'})
883
+ editor.SelectorManager.states.add({name: 'after', label: 'After'})
884
+ editor.SelectorManager.states.add({name: 'active', label: 'Active'})
885
+ editor.SelectorManager.states.add({name: 'first-child', label: 'First child'})
886
+ editor.SelectorManager.states.add({name: 'last-child', label: 'Last child'})
887
+ editor.SelectorManager.states.add({name: 'focus', label: 'Focus'})
888
+ editor.SelectorManager.states.add({name: 'visited', label: 'Visited'})
889
+ editor.SelectorManager.states.add({name: 'link', label: 'Link'})
890
+ editor.SelectorManager.states.add({name: 'first-letter', label: 'First letter'})
891
+ editor.SelectorManager.states.add({name: 'first-line', label: 'First line'})
892
+ editor.SelectorManager.states.add({name: 'selection', label: 'Selection'})
893
+ editor.SelectorManager.states.add({name: 'empty', label: 'Empty'})
894
+ editor.SelectorManager.states.add({name: 'enabled', label: 'Enabled'})
895
+ editor.SelectorManager.states.add({name: 'disabled', label: 'Disabled'})
896
+ editor.SelectorManager.states.add({name: 'checked', label: 'Checked'})
897
+ editor.SelectorManager.states.add({name: 'indeterminate', label: 'Indeterminate'})
898
+ editor.SelectorManager.states.add({name: 'placeholder-shown', label: 'Placeholder shown'})
899
+ editor.SelectorManager.states.add({name: 'placeholder', label: 'Placeholder'})
900
+ editor.SelectorManager.states.add({name: 'default', label: 'Default'})
901
+ editor.SelectorManager.states.add({name: 'valid', label: 'Valid'})
902
+ editor.SelectorManager.states.add({name: 'invalid', label: 'Invalid'})
903
+ editor.SelectorManager.states.add({name: 'in-range', label: 'In range'})
904
+ editor.SelectorManager.states.add({name: 'out-of-range', label: 'Out of range'})
905
+ editor.SelectorManager.states.add({name: 'required', label: 'Required'})
906
+ editor.SelectorManager.states.add({name: 'optional', label: 'Optional'})
907
+ editor.SelectorManager.states.add({name: 'read-only', label: 'Read only'})
908
+ editor.SelectorManager.states.add({name: 'read-write', label: 'Read write'})
909
+ })
910
+ }