@stonecrop/code-editor 0.2.5 → 0.2.6

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
@@ -1,8 +1,20 @@
1
1
  {
2
2
  "name": "@stonecrop/code-editor",
3
- "version": "0.2.5",
3
+ "version": "0.2.6",
4
4
  "license": "MIT",
5
5
  "type": "module",
6
+ "author": {
7
+ "name": "Tyler Matteson",
8
+ "email": "tyler@agritheory.com"
9
+ },
10
+ "repository": {
11
+ "type": "git",
12
+ "url": "https://github.com/agritheory/stonecrop",
13
+ "directory": "code_editor"
14
+ },
15
+ "bugs": {
16
+ "url": "https://github.com/agritheory/stonecrop/issues"
17
+ },
6
18
  "exports": {
7
19
  ".": {
8
20
  "import": "./dist/code-editor.js",
@@ -11,38 +23,41 @@
11
23
  },
12
24
  "main": "dist/code-editor.js",
13
25
  "module": "dist/code-editor.js",
26
+ "umd": "dist/code-editor.umd.cjs",
14
27
  "types": "src/index",
15
28
  "files": [
16
29
  "dist/*",
17
- "src/**/*.vue"
30
+ "src/*"
18
31
  ],
19
32
  "dependencies": {
20
33
  "@monaco-editor/loader": "~1.3.2",
21
34
  "monaco-editor": "~0.34.1",
22
- "vue": "^3.2.47",
23
- "@stonecrop/themes": "0.2.5",
24
- "@stonecrop/utilities": "0.2.5"
35
+ "vue": "^3.4.23",
36
+ "@stonecrop/utilities": "0.2.6",
37
+ "@stonecrop/themes": "0.2.6"
25
38
  },
26
39
  "devDependencies": {
27
- "@histoire/plugin-vue": "^0.16.1",
40
+ "@histoire/plugin-vue": "^0.17.17",
28
41
  "@types/uuid": "^9.0.0",
29
42
  "@typescript-eslint/eslint-plugin": "^5.59.5",
30
43
  "@typescript-eslint/parser": "^5.59.5",
31
- "@vitejs/plugin-vue": "^4.2.1",
44
+ "@vitejs/plugin-vue": "^5.0.4",
32
45
  "cypress": "^12.11.0",
33
46
  "eslint": "^8.40.0",
34
47
  "eslint-config-prettier": "^8.8.0",
35
48
  "eslint-plugin-vue": "^9.11.1",
36
- "histoire": "^0.16.1",
49
+ "histoire": "^0.17.17",
37
50
  "typescript": "^5.0.4",
38
- "vite": "^4.3.5",
51
+ "vite": "^5.2.9",
39
52
  "vue-router": "^4",
40
- "@stonecrop/atable": "0.2.5"
53
+ "@stonecrop/atable": "0.2.6"
54
+ },
55
+ "publishConfig": {
56
+ "access": "public"
41
57
  },
42
58
  "engines": {
43
59
  "node": ">=20.11.0"
44
60
  },
45
- "umd": "dist/code-editor.umd.cjs",
46
61
  "scripts": {
47
62
  "build": "tsc -b && vite build",
48
63
  "dev": "vite",
@@ -0,0 +1,7 @@
1
+ import { defineSetupVue3 } from '@histoire/plugin-vue'
2
+
3
+ import ACodeEditor from '@/components/ACodeEditor.vue'
4
+
5
+ export const setupVue3 = defineSetupVue3(({ app }) => {
6
+ app.component('ACodeEditor', ACodeEditor)
7
+ })
package/src/index.ts ADDED
@@ -0,0 +1,9 @@
1
+ import { App } from 'vue'
2
+
3
+ import ACodeEditor from '@/components/ACodeEditor.vue'
4
+
5
+ function install(app: App /* options */) {
6
+ app.component('ACodeEditor', ACodeEditor)
7
+ }
8
+
9
+ export { install, ACodeEditor }
@@ -0,0 +1,5 @@
1
+ declare module '*.vue' {
2
+ import { ComponentOptions } from 'vue'
3
+ const Component: ComponentOptions
4
+ export default Component
5
+ }
@@ -0,0 +1,352 @@
1
+ import { editor } from 'monaco-editor'
2
+
3
+ // picked from https://bitwiser.in/monaco-themes/
4
+ // currently set to: Github Light
5
+ export const theme: editor.IStandaloneThemeData = {
6
+ base: 'vs',
7
+ inherit: true,
8
+ colors: {
9
+ 'editor.foreground': '#24292e',
10
+ 'editor.background': '#ffffff',
11
+ 'editor.selectionBackground': '#c8c8fa',
12
+ 'editor.inactiveSelectionBackground': '#fafbfc',
13
+ 'editor.lineHighlightBackground': '#fafbfc',
14
+ 'editorCursor.foreground': '#24292e',
15
+ 'editorWhitespace.foreground': '#959da5',
16
+ 'editorIndentGuide.background': '#959da5',
17
+ 'editorIndentGuide.activeBackground': '#24292e',
18
+ 'editor.selectionHighlightBorder': '#fafbfc',
19
+ },
20
+ rules: [
21
+ {
22
+ background: 'ffffff',
23
+ token: '',
24
+ },
25
+ {
26
+ foreground: '6a737d',
27
+ token: 'comment',
28
+ },
29
+ {
30
+ foreground: '6a737d',
31
+ token: 'punctuation.definition.comment',
32
+ },
33
+ {
34
+ foreground: '6a737d',
35
+ token: 'string.comment',
36
+ },
37
+ {
38
+ foreground: '005cc5',
39
+ token: 'constant',
40
+ },
41
+ {
42
+ foreground: '005cc5',
43
+ token: 'entity.name.constant',
44
+ },
45
+ {
46
+ foreground: '005cc5',
47
+ token: 'variable.other.constant',
48
+ },
49
+ {
50
+ foreground: '005cc5',
51
+ token: 'variable.language',
52
+ },
53
+ {
54
+ foreground: '6f42c1',
55
+ token: 'entity',
56
+ },
57
+ {
58
+ foreground: '6f42c1',
59
+ token: 'entity.name',
60
+ },
61
+ {
62
+ foreground: '24292e',
63
+ token: 'variable.parameter.function',
64
+ },
65
+ {
66
+ foreground: '22863a',
67
+ token: 'entity.name.tag',
68
+ },
69
+ {
70
+ foreground: 'd73a49',
71
+ token: 'keyword',
72
+ },
73
+ {
74
+ foreground: 'd73a49',
75
+ token: 'storage',
76
+ },
77
+ {
78
+ foreground: 'd73a49',
79
+ token: 'storage.type',
80
+ },
81
+ {
82
+ foreground: '24292e',
83
+ token: 'storage.modifier.package',
84
+ },
85
+ {
86
+ foreground: '24292e',
87
+ token: 'storage.modifier.import',
88
+ },
89
+ {
90
+ foreground: '24292e',
91
+ token: 'storage.type.java',
92
+ },
93
+ {
94
+ foreground: '032f62',
95
+ token: 'string',
96
+ },
97
+ {
98
+ foreground: '032f62',
99
+ token: 'punctuation.definition.string',
100
+ },
101
+ {
102
+ foreground: '032f62',
103
+ token: 'string punctuation.section.embedded source',
104
+ },
105
+ {
106
+ foreground: '005cc5',
107
+ token: 'support',
108
+ },
109
+ {
110
+ foreground: '005cc5',
111
+ token: 'meta.property-name',
112
+ },
113
+ {
114
+ foreground: 'e36209',
115
+ token: 'variable',
116
+ },
117
+ {
118
+ foreground: '24292e',
119
+ token: 'variable.other',
120
+ },
121
+ {
122
+ foreground: 'b31d28',
123
+ fontStyle: 'bold italic underline',
124
+ token: 'invalid.broken',
125
+ },
126
+ {
127
+ foreground: 'b31d28',
128
+ fontStyle: 'bold italic underline',
129
+ token: 'invalid.deprecated',
130
+ },
131
+ {
132
+ foreground: 'fafbfc',
133
+ background: 'b31d28',
134
+ fontStyle: 'italic underline',
135
+ token: 'invalid.illegal',
136
+ },
137
+ {
138
+ foreground: 'fafbfc',
139
+ background: 'd73a49',
140
+ fontStyle: 'italic underline',
141
+ token: 'carriage-return',
142
+ },
143
+ {
144
+ foreground: 'b31d28',
145
+ fontStyle: 'bold italic underline',
146
+ token: 'invalid.unimplemented',
147
+ },
148
+ {
149
+ foreground: 'b31d28',
150
+ token: 'message.error',
151
+ },
152
+ {
153
+ foreground: '24292e',
154
+ token: 'string source',
155
+ },
156
+ {
157
+ foreground: '005cc5',
158
+ token: 'string variable',
159
+ },
160
+ {
161
+ foreground: '032f62',
162
+ token: 'source.regexp',
163
+ },
164
+ {
165
+ foreground: '032f62',
166
+ token: 'string.regexp',
167
+ },
168
+ {
169
+ foreground: '032f62',
170
+ token: 'string.regexp.character-class',
171
+ },
172
+ {
173
+ foreground: '032f62',
174
+ token: 'string.regexp constant.character.escape',
175
+ },
176
+ {
177
+ foreground: '032f62',
178
+ token: 'string.regexp source.ruby.embedded',
179
+ },
180
+ {
181
+ foreground: '032f62',
182
+ token: 'string.regexp string.regexp.arbitrary-repitition',
183
+ },
184
+ {
185
+ foreground: '22863a',
186
+ fontStyle: 'bold',
187
+ token: 'string.regexp constant.character.escape',
188
+ },
189
+ {
190
+ foreground: '005cc5',
191
+ token: 'support.constant',
192
+ },
193
+ {
194
+ foreground: '005cc5',
195
+ token: 'support.variable',
196
+ },
197
+ {
198
+ foreground: '005cc5',
199
+ token: 'meta.module-reference',
200
+ },
201
+ {
202
+ foreground: '735c0f',
203
+ token: 'markup.list',
204
+ },
205
+ {
206
+ foreground: '005cc5',
207
+ fontStyle: 'bold',
208
+ token: 'markup.heading',
209
+ },
210
+ {
211
+ foreground: '005cc5',
212
+ fontStyle: 'bold',
213
+ token: 'markup.heading entity.name',
214
+ },
215
+ {
216
+ foreground: '22863a',
217
+ token: 'markup.quote',
218
+ },
219
+ {
220
+ foreground: '24292e',
221
+ fontStyle: 'italic',
222
+ token: 'markup.italic',
223
+ },
224
+ {
225
+ foreground: '24292e',
226
+ fontStyle: 'bold',
227
+ token: 'markup.bold',
228
+ },
229
+ {
230
+ foreground: '005cc5',
231
+ token: 'markup.raw',
232
+ },
233
+ {
234
+ foreground: 'b31d28',
235
+ background: 'ffeef0',
236
+ token: 'markup.deleted',
237
+ },
238
+ {
239
+ foreground: 'b31d28',
240
+ background: 'ffeef0',
241
+ token: 'meta.diff.header.from-file',
242
+ },
243
+ {
244
+ foreground: 'b31d28',
245
+ background: 'ffeef0',
246
+ token: 'punctuation.definition.deleted',
247
+ },
248
+ {
249
+ foreground: '22863a',
250
+ background: 'f0fff4',
251
+ token: 'markup.inserted',
252
+ },
253
+ {
254
+ foreground: '22863a',
255
+ background: 'f0fff4',
256
+ token: 'meta.diff.header.to-file',
257
+ },
258
+ {
259
+ foreground: '22863a',
260
+ background: 'f0fff4',
261
+ token: 'punctuation.definition.inserted',
262
+ },
263
+ {
264
+ foreground: 'e36209',
265
+ background: 'ffebda',
266
+ token: 'markup.changed',
267
+ },
268
+ {
269
+ foreground: 'e36209',
270
+ background: 'ffebda',
271
+ token: 'punctuation.definition.changed',
272
+ },
273
+ {
274
+ foreground: 'f6f8fa',
275
+ background: '005cc5',
276
+ token: 'markup.ignored',
277
+ },
278
+ {
279
+ foreground: 'f6f8fa',
280
+ background: '005cc5',
281
+ token: 'markup.untracked',
282
+ },
283
+ {
284
+ foreground: '6f42c1',
285
+ fontStyle: 'bold',
286
+ token: 'meta.diff.range',
287
+ },
288
+ {
289
+ foreground: '005cc5',
290
+ token: 'meta.diff.header',
291
+ },
292
+ {
293
+ foreground: '005cc5',
294
+ fontStyle: 'bold',
295
+ token: 'meta.separator',
296
+ },
297
+ {
298
+ foreground: '005cc5',
299
+ token: 'meta.output',
300
+ },
301
+ {
302
+ foreground: '586069',
303
+ token: 'brackethighlighter.tag',
304
+ },
305
+ {
306
+ foreground: '586069',
307
+ token: 'brackethighlighter.curly',
308
+ },
309
+ {
310
+ foreground: '586069',
311
+ token: 'brackethighlighter.round',
312
+ },
313
+ {
314
+ foreground: '586069',
315
+ token: 'brackethighlighter.square',
316
+ },
317
+ {
318
+ foreground: '586069',
319
+ token: 'brackethighlighter.angle',
320
+ },
321
+ {
322
+ foreground: '586069',
323
+ token: 'brackethighlighter.quote',
324
+ },
325
+ {
326
+ foreground: 'b31d28',
327
+ token: 'brackethighlighter.unmatched',
328
+ },
329
+ {
330
+ foreground: 'b31d28',
331
+ token: 'sublimelinter.mark.error',
332
+ },
333
+ {
334
+ foreground: 'e36209',
335
+ token: 'sublimelinter.mark.warning',
336
+ },
337
+ {
338
+ foreground: '959da5',
339
+ token: 'sublimelinter.gutter-mark',
340
+ },
341
+ {
342
+ foreground: '032f62',
343
+ fontStyle: 'underline',
344
+ token: 'constant.other.reference.link',
345
+ },
346
+ {
347
+ foreground: '032f62',
348
+ fontStyle: 'underline',
349
+ token: 'string.other.link',
350
+ },
351
+ ],
352
+ }
@@ -0,0 +1,6 @@
1
+ /*
2
+
3
+ Import custom themes here, e.g.
4
+ @import url('purple_theme.css');
5
+
6
+ */
@@ -0,0 +1,9 @@
1
+ @import url('https://fonts.googleapis.com/css2?family=Arimo:ital,wght@0,400;0,500;0,600;0,700;1,400;1,500;1,600;1,700&display=swap');
2
+
3
+ :root {
4
+ --primary-color: #645caa;
5
+ }
6
+
7
+ :root [data-theme='purple'] {
8
+ --row-color-zebra-light: #ebc7e8;
9
+ }