@stonecrop/code-editor 0.4.36 → 0.5.0

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,6 +1,6 @@
1
1
  {
2
2
  "name": "@stonecrop/code-editor",
3
- "version": "0.4.36",
3
+ "version": "0.5.0",
4
4
  "license": "MIT",
5
5
  "type": "module",
6
6
  "author": {
@@ -30,27 +30,27 @@
30
30
  "src/*"
31
31
  ],
32
32
  "dependencies": {
33
- "@monaco-editor/loader": "^1.5.0",
34
- "monaco-editor": "^0.52.2",
33
+ "@monaco-editor/loader": "^1.6.1",
34
+ "monaco-editor": "^0.54.0",
35
35
  "vue": "^3.5.22",
36
- "@stonecrop/themes": "0.4.36",
37
- "@stonecrop/utilities": "0.4.36"
36
+ "@stonecrop/themes": "0.5.0",
37
+ "@stonecrop/utilities": "0.5.0"
38
38
  },
39
39
  "devDependencies": {
40
- "@microsoft/api-documenter": "^7.26.31",
41
- "@rushstack/heft": "^0.74.2",
42
- "@typescript-eslint/eslint-plugin": "^7.18.0",
43
- "@typescript-eslint/parser": "^7.18.0",
40
+ "@eslint/js": "^9.38.0",
41
+ "@microsoft/api-documenter": "^7.27.3",
42
+ "@rushstack/heft": "^1.1.3",
44
43
  "@vitejs/plugin-vue": "^6.0.1",
45
- "cypress": "^14.5.3",
46
- "eslint": "^8.57.1",
47
- "eslint-config-prettier": "^8.10.0",
48
- "eslint-plugin-vue": "^9.33.0",
44
+ "eslint": "^9.38.0",
45
+ "eslint-config-prettier": "^10.1.8",
46
+ "eslint-plugin-vue": "^10.5.1",
47
+ "globals": "^16.4.0",
49
48
  "typescript": "^5.9.3",
49
+ "typescript-eslint": "^8.46.2",
50
50
  "vite": "^7.1.1",
51
51
  "vue-router": "^4.6.3",
52
- "@stonecrop/atable": "0.4.36",
53
- "stonecrop-rig": "0.2.22"
52
+ "stonecrop-rig": "0.2.22",
53
+ "@stonecrop/atable": "0.5.0"
54
54
  },
55
55
  "publishConfig": {
56
56
  "access": "public"
@@ -64,7 +64,7 @@
64
64
  "build": "heft build && vite build && rushx docs",
65
65
  "dev": "vite",
66
66
  "docs": "cd ../common/autoinstallers/doc-tools && node generate-docs.mjs code_editor",
67
- "lint": "eslint . --ext .ts,.vue",
67
+ "lint": "eslint .",
68
68
  "preview": "vite preview"
69
69
  }
70
70
  }
@@ -1,6 +1,6 @@
1
1
  <template>
2
2
  <div id="editor-container">
3
- <div ref="aCodeEditor" id="editor-area"></div>
3
+ <div id="editor-area" ref="aCodeEditor"></div>
4
4
  </div>
5
5
  </template>
6
6
 
@@ -11,7 +11,7 @@ import { onMounted, useTemplateRef } from 'vue'
11
11
 
12
12
  import { theme } from '../theme/code_editor/agritheory'
13
13
 
14
- const { options } = defineProps<{ options?: editor.IStandaloneEditorConstructionOptions }>()
14
+ const { options = {} } = defineProps<{ options?: editor.IStandaloneEditorConstructionOptions }>()
15
15
 
16
16
  const editorRef = useTemplateRef<HTMLDivElement>('aCodeEditor')
17
17
  const editorOptions = {
@@ -28,7 +28,10 @@ onMounted(async () => {
28
28
 
29
29
  editor.defineTheme('agritheory', theme)
30
30
  editor.setTheme('agritheory')
31
- editor.create(editorRef.value, editorOptions)
31
+
32
+ if (editorRef.value) {
33
+ editor.create(editorRef.value, editorOptions)
34
+ }
32
35
  })
33
36
  </script>
34
37