artifactuse 0.1.22 → 0.1.24
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/README.md +23 -3
- package/dist/{index-CQXV7Rft.js → index-CdjLieSe.js} +1234 -1197
- package/dist/index.js +1 -1
- package/dist/react/index.js +2 -2
- package/dist/svelte/index.js +2 -2
- package/dist/vue/index.js +2 -2
- package/dist/vue2/index.js +51 -11
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -594,17 +594,36 @@ provideArtifactuse({
|
|
|
594
594
|
// Code Editor (Optional) — CodeMirror 6 for the edit tab
|
|
595
595
|
// Requires: @codemirror/state, @codemirror/view, @codemirror/commands,
|
|
596
596
|
// @codemirror/language, @codemirror/autocomplete
|
|
597
|
-
// Optional:
|
|
597
|
+
// Optional: language packages and @lezer/highlight (for syntax highlighting)
|
|
598
598
|
editor: {
|
|
599
599
|
modules: {
|
|
600
|
+
// Required
|
|
600
601
|
state: cmState, // @codemirror/state
|
|
601
602
|
view: cmView, // @codemirror/view
|
|
602
603
|
commands: cmCommands, // @codemirror/commands
|
|
603
604
|
language: cmLanguage, // @codemirror/language
|
|
604
605
|
autocomplete: cmAutocomplete, // @codemirror/autocomplete
|
|
605
|
-
|
|
606
|
+
// Syntax highlighting (optional)
|
|
607
|
+
lezerHighlight: lezerHighlight, // @lezer/highlight
|
|
608
|
+
// Language packages (all optional — add only what you need)
|
|
609
|
+
langJavascript: cmLangJavascript, // @codemirror/lang-javascript (js/jsx/ts/tsx)
|
|
606
610
|
langPython: cmLangPython, // @codemirror/lang-python
|
|
607
|
-
|
|
611
|
+
langHtml: cmLangHtml, // @codemirror/lang-html
|
|
612
|
+
langCss: cmLangCss, // @codemirror/lang-css
|
|
613
|
+
langJson: cmLangJson, // @codemirror/lang-json
|
|
614
|
+
langMarkdown: cmLangMarkdown, // @codemirror/lang-markdown
|
|
615
|
+
langXml: cmLangXml, // @codemirror/lang-xml
|
|
616
|
+
langYaml: cmLangYaml, // @codemirror/lang-yaml
|
|
617
|
+
langSql: cmLangSql, // @codemirror/lang-sql
|
|
618
|
+
langJava: cmLangJava, // @codemirror/lang-java
|
|
619
|
+
langCpp: cmLangCpp, // @codemirror/lang-cpp (c/c++)
|
|
620
|
+
langGo: cmLangGo, // @codemirror/lang-go
|
|
621
|
+
langRust: cmLangRust, // @codemirror/lang-rust
|
|
622
|
+
langPhp: cmLangPhp, // @codemirror/lang-php
|
|
623
|
+
langVue: cmLangVue, // @codemirror/lang-vue
|
|
624
|
+
langAngular: cmLangAngular, // @codemirror/lang-angular
|
|
625
|
+
langLess: cmLangLess, // @codemirror/lang-less
|
|
626
|
+
langSass: cmLangSass, // @codemirror/lang-sass (sass/scss)
|
|
608
627
|
},
|
|
609
628
|
theme: 'dark', // 'dark' | 'light' | 'auto'
|
|
610
629
|
},
|
|
@@ -718,6 +737,7 @@ openFile('utils.py', code, {
|
|
|
718
737
|
| `options.tabs` | `string[]` | No | Visible tabs: `'preview'`, `'code'`, `'split'`, `'edit'` |
|
|
719
738
|
| `options.viewMode` | `string` | No | Initial view mode |
|
|
720
739
|
| `options.language` | `string` | No | Override auto-detected language |
|
|
740
|
+
| `options.panelUrl` | `string` | No | Custom iframe URL (bypasses panel registry) |
|
|
721
741
|
|
|
722
742
|
### openCode
|
|
723
743
|
|