@pyreon/code 0.11.4 → 0.11.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/README.md +18 -18
- package/lib/analysis/index.js.html +1 -1
- package/lib/index.js +42 -20
- package/lib/index.js.map +1 -1
- package/lib/types/index.d.ts +7 -4
- package/lib/types/index.d.ts.map +1 -1
- package/package.json +28 -28
- package/src/components/code-editor.tsx +4 -4
- package/src/components/diff-editor.tsx +61 -48
- package/src/components/tabbed-editor.tsx +8 -8
- package/src/editor.ts +38 -38
- package/src/index.ts +8 -8
- package/src/languages.ts +19 -19
- package/src/minimap.ts +16 -16
- package/src/tabbed-editor.ts +11 -11
- package/src/tests/code.test.ts +193 -193
- package/src/themes.ts +48 -48
- package/src/types.ts +27 -27
package/README.md
CHANGED
|
@@ -31,7 +31,7 @@ editor.value.set('new') // updates editor
|
|
|
31
31
|
```tsx
|
|
32
32
|
import { DiffEditor } from '@pyreon/code'
|
|
33
33
|
|
|
34
|
-
|
|
34
|
+
;<DiffEditor original="const a = 1" modified="const a = 2" style="height: 300px" />
|
|
35
35
|
```
|
|
36
36
|
|
|
37
37
|
## Tabbed Editor
|
|
@@ -39,7 +39,7 @@ import { DiffEditor } from '@pyreon/code'
|
|
|
39
39
|
```tsx
|
|
40
40
|
import { TabbedEditor } from '@pyreon/code'
|
|
41
41
|
|
|
42
|
-
|
|
42
|
+
;<TabbedEditor
|
|
43
43
|
tabs={[
|
|
44
44
|
{ id: 'main', label: 'main.ts', value: 'export {}', language: 'typescript' },
|
|
45
45
|
{ id: 'style', label: 'style.css', value: 'body {}', language: 'css' },
|
|
@@ -56,22 +56,22 @@ Create a reactive editor instance. Config options: `value`, `language`, `theme`,
|
|
|
56
56
|
|
|
57
57
|
**Returns `EditorInstance`:**
|
|
58
58
|
|
|
59
|
-
| Property
|
|
60
|
-
|
|
|
61
|
-
| `value`
|
|
62
|
-
| `language`
|
|
63
|
-
| `theme`
|
|
64
|
-
| `readOnly`
|
|
65
|
-
| `cursor`
|
|
66
|
-
| `selection`
|
|
67
|
-
| `lineCount`
|
|
68
|
-
| `focused`
|
|
69
|
-
| `focus()`
|
|
70
|
-
| `insert(text)`
|
|
71
|
-
| `replaceSelection(text)`
|
|
72
|
-
| `goToLine(line)`
|
|
73
|
-
| `undo()` / `redo()`
|
|
74
|
-
| `foldAll()` / `unfoldAll()` | method
|
|
59
|
+
| Property | Type | Description |
|
|
60
|
+
| --------------------------- | ------------------------ | ----------------------------- |
|
|
61
|
+
| `value` | `Signal<string>` | Two-way synced editor content |
|
|
62
|
+
| `language` | `Signal<EditorLanguage>` | Dynamic language switching |
|
|
63
|
+
| `theme` | `Signal<EditorTheme>` | Dynamic theme switching |
|
|
64
|
+
| `readOnly` | `Signal<boolean>` | Toggle read-only mode |
|
|
65
|
+
| `cursor` | `Computed<number>` | Cursor position |
|
|
66
|
+
| `selection` | `Computed<{from, to}>` | Current selection range |
|
|
67
|
+
| `lineCount` | `Computed<number>` | Number of lines |
|
|
68
|
+
| `focused` | `Computed<boolean>` | Whether editor has focus |
|
|
69
|
+
| `focus()` | method | Focus the editor |
|
|
70
|
+
| `insert(text)` | method | Insert text at cursor |
|
|
71
|
+
| `replaceSelection(text)` | method | Replace current selection |
|
|
72
|
+
| `goToLine(line)` | method | Scroll to line |
|
|
73
|
+
| `undo()` / `redo()` | method | Undo/redo |
|
|
74
|
+
| `foldAll()` / `unfoldAll()` | method | Code folding |
|
|
75
75
|
|
|
76
76
|
### `loadLanguage(lang)`
|
|
77
77
|
|
|
@@ -5386,7 +5386,7 @@ var drawChart = (function (exports) {
|
|
|
5386
5386
|
</script>
|
|
5387
5387
|
<script>
|
|
5388
5388
|
/*<!--*/
|
|
5389
|
-
const data = {"version":2,"tree":{"name":"root","children":[{"name":"index.js","children":[{"name":"\u0000rolldown/runtime.js","uid":"96363bbd-1"},{"name":"home/runner/work/pyreon/pyreon/packages/core/core/lib/jsx-runtime.js","uid":"96363bbd-3"},{"name":"src","children":[{"name":"components","children":[{"uid":"96363bbd-5","name":"code-editor.tsx"},{"uid":"96363bbd-11","name":"diff-editor.tsx"},{"uid":"96363bbd-13","name":"tabbed-editor.tsx"}]},{"uid":"96363bbd-7","name":"languages.ts"},{"uid":"96363bbd-9","name":"themes.ts"},{"uid":"96363bbd-15","name":"minimap.ts"},{"uid":"96363bbd-17","name":"editor.ts"},{"uid":"96363bbd-19","name":"index.ts"}]}]},{"name":"dist-5FA-omYL.js","children":[{"name":"home/runner/work/pyreon/pyreon/node_modules/.bun","children":[{"name":"@lezer+go@1.0.1/node_modules/@lezer/go/dist/index.js","uid":"96363bbd-21"},{"name":"@codemirror+lang-go@6.0.1/node_modules/@codemirror/lang-go/dist/index.js","uid":"96363bbd-23"}]}]},{"name":"dist-BisvZuec.js","children":[{"name":"home/runner/work/pyreon/pyreon/node_modules/.bun","children":[{"name":"@lezer+json@1.0.3/node_modules/@lezer/json/dist/index.js","uid":"96363bbd-25"},{"name":"@codemirror+lang-json@6.0.2/node_modules/@codemirror/lang-json/dist/index.js","uid":"96363bbd-27"}]}]},{"name":"dist-BrE8YJpx.js","children":[{"name":"home/runner/work/pyreon/pyreon/node_modules/.bun","children":[{"name":"@lezer+html@1.3.13/node_modules/@lezer/html/dist/index.js","uid":"96363bbd-29"},{"name":"@codemirror+lang-html@6.4.11/node_modules/@codemirror/lang-html/dist/index.js","uid":"96363bbd-31"}]}]},{"name":"dist-BxzbGcJt.js","children":[{"name":"home/runner/work/pyreon/pyreon/node_modules/.bun","children":[{"name":"@lezer+cpp@1.1.5/node_modules/@lezer/cpp/dist/index.js","uid":"96363bbd-33"},{"name":"@codemirror+lang-cpp@6.0.3/node_modules/@codemirror/lang-cpp/dist/index.js","uid":"96363bbd-35"}]}]},{"name":"dist-CXUY-Nzh.js","children":[{"name":"home/runner/work/pyreon/pyreon/node_modules/.bun","children":[{"name":"@lezer+rust@1.0.2/node_modules/@lezer/rust/dist/index.js","uid":"96363bbd-37"},{"name":"@codemirror+lang-rust@6.0.2/node_modules/@codemirror/lang-rust/dist/index.js","uid":"96363bbd-39"}]}]},{"name":"dist-CfapY6Xm.js","children":[{"name":"home/runner/work/pyreon/pyreon/node_modules/.bun","children":[{"name":"@lezer+common@1.5.1/node_modules/@lezer/common/dist/index.js","uid":"96363bbd-41"},{"name":"@lezer+lr@1.4.8/node_modules/@lezer/lr/dist/index.js","uid":"96363bbd-43"},{"name":"@lezer+highlight@1.2.3/node_modules/@lezer/highlight/dist/index.js","uid":"96363bbd-45"}]}]},{"name":"dist-CkzBqhDP.js","children":[{"name":"home/runner/work/pyreon/pyreon/node_modules/.bun","children":[{"name":"@lezer+css@1.3.3/node_modules/@lezer/css/dist/index.js","uid":"96363bbd-47"},{"name":"@codemirror+lang-css@6.3.1/node_modules/@codemirror/lang-css/dist/index.js","uid":"96363bbd-49"}]}]},{"name":"dist-DGt-lmGy.js","children":[{"name":"home/runner/work/pyreon/pyreon/node_modules/.bun/@codemirror+lang-sql@6.10.0/node_modules/@codemirror/lang-sql/dist/index.js","uid":"96363bbd-51"}]},{"name":"dist-DqTrMnaP.js","children":[{"name":"home/runner/work/pyreon/pyreon/node_modules/.bun","children":[{"name":"@lezer+xml@1.0.6/node_modules/@lezer/xml/dist/index.js","uid":"96363bbd-53"},{"name":"@codemirror+lang-xml@6.1.0/node_modules/@codemirror/lang-xml/dist/index.js","uid":"96363bbd-55"}]}]},{"name":"dist-DwKx52QE.js","children":[{"name":"home/runner/work/pyreon/pyreon/node_modules/.bun","children":[{"name":"@lezer+php@1.0.5/node_modules/@lezer/php/dist/index.js","uid":"96363bbd-57"},{"name":"@codemirror+lang-php@6.0.2/node_modules/@codemirror/lang-php/dist/index.js","uid":"96363bbd-59"}]}]},{"name":"dist-Oei2Buyd.js","children":[{"name":"home/runner/work/pyreon/pyreon/node_modules/.bun","children":[{"name":"@lezer+yaml@1.0.4/node_modules/@lezer/yaml/dist/index.js","uid":"96363bbd-61"},{"name":"@codemirror+lang-yaml@6.1.3/node_modules/@codemirror/lang-yaml/dist/index.js","uid":"96363bbd-63"}]}]},{"name":"dist-TrbJHyZy.js","children":[{"name":"home/runner/work/pyreon/pyreon/node_modules/.bun","children":[{"name":"@lezer+python@1.1.18/node_modules/@lezer/python/dist/index.js","uid":"96363bbd-65"},{"name":"@codemirror+lang-python@6.2.1/node_modules/@codemirror/lang-python/dist/index.js","uid":"96363bbd-67"}]}]},{"name":"dist-jF2joTkO.js","children":[{"name":"home/runner/work/pyreon/pyreon/node_modules/.bun","children":[{"name":"@lezer+java@1.1.3/node_modules/@lezer/java/dist/index.js","uid":"96363bbd-69"},{"name":"@codemirror+lang-java@6.0.2/node_modules/@codemirror/lang-java/dist/index.js","uid":"96363bbd-71"}]}]},{"name":"dist-pDxtX_z4.js","children":[{"name":"home/runner/work/pyreon/pyreon/node_modules/.bun","children":[{"name":"@lezer+javascript@1.5.4/node_modules/@lezer/javascript/dist/index.js","uid":"96363bbd-73"},{"name":"@codemirror+lang-javascript@6.2.5/node_modules/@codemirror/lang-javascript/dist/index.js","uid":"96363bbd-75"}]}]},{"name":"dist-sGMMCnKq.js","children":[{"name":"home/runner/work/pyreon/pyreon/node_modules/.bun","children":[{"name":"@lezer+markdown@1.6.3/node_modules/@lezer/markdown/dist/index.js","uid":"96363bbd-77"},{"name":"@codemirror+lang-markdown@6.5.0/node_modules/@codemirror/lang-markdown/dist/index.js","uid":"96363bbd-79"}]}]}],"isRoot":true},"nodeParts":{"96363bbd-1":{"renderedLength":848,"gzipLength":487,"brotliLength":0,"metaUid":"96363bbd-0"},"96363bbd-3":{"renderedLength":1599,"gzipLength":807,"brotliLength":0,"metaUid":"96363bbd-2"},"96363bbd-5":{"renderedLength":731,"gzipLength":441,"brotliLength":0,"metaUid":"96363bbd-4"},"96363bbd-7":{"renderedLength":2245,"gzipLength":736,"brotliLength":0,"metaUid":"96363bbd-6"},"96363bbd-9":{"renderedLength":1544,"gzipLength":554,"brotliLength":0,"metaUid":"96363bbd-8"},"96363bbd-11":{"renderedLength":1594,"gzipLength":734,"brotliLength":0,"metaUid":"96363bbd-10"},"96363bbd-13":{"renderedLength":2681,"gzipLength":1174,"brotliLength":0,"metaUid":"96363bbd-12"},"96363bbd-15":{"renderedLength":3907,"gzipLength":1561,"brotliLength":0,"metaUid":"96363bbd-14"},"96363bbd-17":{"renderedLength":11849,"gzipLength":3501,"brotliLength":0,"metaUid":"96363bbd-16"},"96363bbd-19":{"renderedLength":0,"gzipLength":0,"brotliLength":0,"metaUid":"96363bbd-18"},"96363bbd-21":{"renderedLength":28601,"gzipLength":11397,"brotliLength":0,"metaUid":"96363bbd-20"},"96363bbd-23":{"renderedLength":6785,"gzipLength":2297,"brotliLength":0,"metaUid":"96363bbd-22"},"96363bbd-25":{"renderedLength":1938,"gzipLength":1154,"brotliLength":0,"metaUid":"96363bbd-24"},"96363bbd-27":{"renderedLength":756,"gzipLength":427,"brotliLength":0,"metaUid":"96363bbd-26"},"96363bbd-29":{"renderedLength":20067,"gzipLength":7172,"brotliLength":0,"metaUid":"96363bbd-28"},"96363bbd-31":{"renderedLength":22646,"gzipLength":6816,"brotliLength":0,"metaUid":"96363bbd-30"},"96363bbd-33":{"renderedLength":102369,"gzipLength":33579,"brotliLength":0,"metaUid":"96363bbd-32"},"96363bbd-35":{"renderedLength":1473,"gzipLength":734,"brotliLength":0,"metaUid":"96363bbd-34"},"96363bbd-37":{"renderedLength":72535,"gzipLength":25860,"brotliLength":0,"metaUid":"96363bbd-36"},"96363bbd-39":{"renderedLength":1193,"gzipLength":672,"brotliLength":0,"metaUid":"96363bbd-38"},"96363bbd-41":{"renderedLength":63580,"gzipLength":17558,"brotliLength":0,"metaUid":"96363bbd-40"},"96363bbd-43":{"renderedLength":48118,"gzipLength":13327,"brotliLength":0,"metaUid":"96363bbd-42"},"96363bbd-45":{"renderedLength":14883,"gzipLength":5154,"brotliLength":0,"metaUid":"96363bbd-44"},"96363bbd-47":{"renderedLength":18528,"gzipLength":8035,"brotliLength":0,"metaUid":"96363bbd-46"},"96363bbd-49":{"renderedLength":15651,"gzipLength":5292,"brotliLength":0,"metaUid":"96363bbd-48"},"96363bbd-51":{"renderedLength":44478,"gzipLength":14909,"brotliLength":0,"metaUid":"96363bbd-50"},"96363bbd-53":{"renderedLength":10378,"gzipLength":4022,"brotliLength":0,"metaUid":"96363bbd-52"},"96363bbd-55":{"renderedLength":11204,"gzipLength":3380,"brotliLength":0,"metaUid":"96363bbd-54"},"96363bbd-57":{"renderedLength":100189,"gzipLength":28339,"brotliLength":0,"metaUid":"96363bbd-56"},"96363bbd-59":{"renderedLength":2340,"gzipLength":1091,"brotliLength":0,"metaUid":"96363bbd-58"},"96363bbd-61":{"renderedLength":15737,"gzipLength":5561,"brotliLength":0,"metaUid":"96363bbd-60"},"96363bbd-63":{"renderedLength":2694,"gzipLength":1257,"brotliLength":0,"metaUid":"96363bbd-62"},"96363bbd-65":{"renderedLength":43367,"gzipLength":17192,"brotliLength":0,"metaUid":"96363bbd-64"},"96363bbd-67":{"renderedLength":11179,"gzipLength":3599,"brotliLength":0,"metaUid":"96363bbd-66"},"96363bbd-69":{"renderedLength":40941,"gzipLength":16436,"brotliLength":0,"metaUid":"96363bbd-68"},"96363bbd-71":{"renderedLength":1550,"gzipLength":788,"brotliLength":0,"metaUid":"96363bbd-70"},"96363bbd-73":{"renderedLength":81010,"gzipLength":31199,"brotliLength":0,"metaUid":"96363bbd-72"},"96363bbd-75":{"renderedLength":12490,"gzipLength":3908,"brotliLength":0,"metaUid":"96363bbd-74"},"96363bbd-77":{"renderedLength":66310,"gzipLength":17756,"brotliLength":0,"metaUid":"96363bbd-76"},"96363bbd-79":{"renderedLength":17438,"gzipLength":5526,"brotliLength":0,"metaUid":"96363bbd-78"}},"nodeMetas":{"96363bbd-0":{"id":"\u0000rolldown/runtime.js","moduleParts":{"index.js":"96363bbd-1"},"imported":[],"importedBy":[]},"96363bbd-2":{"id":"/home/runner/work/pyreon/pyreon/packages/core/core/lib/jsx-runtime.js","moduleParts":{"index.js":"96363bbd-3"},"imported":[],"importedBy":[{"uid":"96363bbd-4"},{"uid":"96363bbd-10"},{"uid":"96363bbd-12"}]},"96363bbd-4":{"id":"/src/components/code-editor.tsx","moduleParts":{"index.js":"96363bbd-5"},"imported":[{"uid":"96363bbd-2"}],"importedBy":[{"uid":"96363bbd-18"},{"uid":"96363bbd-12"}]},"96363bbd-6":{"id":"/src/languages.ts","moduleParts":{"index.js":"96363bbd-7"},"imported":[{"uid":"96363bbd-74","dynamic":true},{"uid":"96363bbd-30","dynamic":true},{"uid":"96363bbd-48","dynamic":true},{"uid":"96363bbd-26","dynamic":true},{"uid":"96363bbd-78","dynamic":true},{"uid":"96363bbd-66","dynamic":true},{"uid":"96363bbd-38","dynamic":true},{"uid":"96363bbd-50","dynamic":true},{"uid":"96363bbd-54","dynamic":true},{"uid":"96363bbd-62","dynamic":true},{"uid":"96363bbd-34","dynamic":true},{"uid":"96363bbd-70","dynamic":true},{"uid":"96363bbd-22","dynamic":true},{"uid":"96363bbd-58","dynamic":true}],"importedBy":[{"uid":"96363bbd-18"},{"uid":"96363bbd-10"},{"uid":"96363bbd-16"}]},"96363bbd-8":{"id":"/src/themes.ts","moduleParts":{"index.js":"96363bbd-9"},"imported":[{"uid":"96363bbd-83"}],"importedBy":[{"uid":"96363bbd-18"},{"uid":"96363bbd-10"},{"uid":"96363bbd-16"}]},"96363bbd-10":{"id":"/src/components/diff-editor.tsx","moduleParts":{"index.js":"96363bbd-11"},"imported":[{"uid":"96363bbd-80"},{"uid":"96363bbd-81"},{"uid":"96363bbd-82"},{"uid":"96363bbd-83"},{"uid":"96363bbd-6"},{"uid":"96363bbd-8"},{"uid":"96363bbd-2"}],"importedBy":[{"uid":"96363bbd-18"}]},"96363bbd-12":{"id":"/src/components/tabbed-editor.tsx","moduleParts":{"index.js":"96363bbd-13"},"imported":[{"uid":"96363bbd-4"},{"uid":"96363bbd-2"}],"importedBy":[{"uid":"96363bbd-18"}]},"96363bbd-14":{"id":"/src/minimap.ts","moduleParts":{"index.js":"96363bbd-15"},"imported":[{"uid":"96363bbd-83"}],"importedBy":[{"uid":"96363bbd-18"},{"uid":"96363bbd-16"}]},"96363bbd-16":{"id":"/src/editor.ts","moduleParts":{"index.js":"96363bbd-17"},"imported":[{"uid":"96363bbd-84"},{"uid":"96363bbd-85"},{"uid":"96363bbd-80"},{"uid":"96363bbd-86"},{"uid":"96363bbd-87"},{"uid":"96363bbd-82"},{"uid":"96363bbd-83"},{"uid":"96363bbd-88"},{"uid":"96363bbd-6"},{"uid":"96363bbd-14"},{"uid":"96363bbd-8"}],"importedBy":[{"uid":"96363bbd-18"}]},"96363bbd-18":{"id":"/src/index.ts","moduleParts":{"index.js":"96363bbd-19"},"imported":[{"uid":"96363bbd-4"},{"uid":"96363bbd-10"},{"uid":"96363bbd-12"},{"uid":"96363bbd-16"},{"uid":"96363bbd-6"},{"uid":"96363bbd-14"},{"uid":"96363bbd-8"}],"importedBy":[],"isEntry":true},"96363bbd-20":{"id":"/home/runner/work/pyreon/pyreon/node_modules/.bun/@lezer+go@1.0.1/node_modules/@lezer/go/dist/index.js","moduleParts":{"dist-5FA-omYL.js":"96363bbd-21"},"imported":[{"uid":"96363bbd-42"},{"uid":"96363bbd-44"}],"importedBy":[{"uid":"96363bbd-22"}]},"96363bbd-22":{"id":"/home/runner/work/pyreon/pyreon/node_modules/.bun/@codemirror+lang-go@6.0.1/node_modules/@codemirror/lang-go/dist/index.js","moduleParts":{"dist-5FA-omYL.js":"96363bbd-23"},"imported":[{"uid":"96363bbd-20"},{"uid":"96363bbd-80"},{"uid":"96363bbd-84"},{"uid":"96363bbd-40"}],"importedBy":[{"uid":"96363bbd-6"}]},"96363bbd-24":{"id":"/home/runner/work/pyreon/pyreon/node_modules/.bun/@lezer+json@1.0.3/node_modules/@lezer/json/dist/index.js","moduleParts":{"dist-BisvZuec.js":"96363bbd-25"},"imported":[{"uid":"96363bbd-42"},{"uid":"96363bbd-44"}],"importedBy":[{"uid":"96363bbd-26"}]},"96363bbd-26":{"id":"/home/runner/work/pyreon/pyreon/node_modules/.bun/@codemirror+lang-json@6.0.2/node_modules/@codemirror/lang-json/dist/index.js","moduleParts":{"dist-BisvZuec.js":"96363bbd-27"},"imported":[{"uid":"96363bbd-24"},{"uid":"96363bbd-80"}],"importedBy":[{"uid":"96363bbd-6"}]},"96363bbd-28":{"id":"/home/runner/work/pyreon/pyreon/node_modules/.bun/@lezer+html@1.3.13/node_modules/@lezer/html/dist/index.js","moduleParts":{"dist-BrE8YJpx.js":"96363bbd-29"},"imported":[{"uid":"96363bbd-42"},{"uid":"96363bbd-44"},{"uid":"96363bbd-40"}],"importedBy":[{"uid":"96363bbd-30"}]},"96363bbd-30":{"id":"/home/runner/work/pyreon/pyreon/node_modules/.bun/@codemirror+lang-html@6.4.11/node_modules/@codemirror/lang-html/dist/index.js","moduleParts":{"dist-BrE8YJpx.js":"96363bbd-31"},"imported":[{"uid":"96363bbd-28"},{"uid":"96363bbd-48"},{"uid":"96363bbd-74"},{"uid":"96363bbd-83"},{"uid":"96363bbd-82"},{"uid":"96363bbd-80"}],"importedBy":[{"uid":"96363bbd-6"},{"uid":"96363bbd-78"},{"uid":"96363bbd-58"}]},"96363bbd-32":{"id":"/home/runner/work/pyreon/pyreon/node_modules/.bun/@lezer+cpp@1.1.5/node_modules/@lezer/cpp/dist/index.js","moduleParts":{"dist-BxzbGcJt.js":"96363bbd-33"},"imported":[{"uid":"96363bbd-42"},{"uid":"96363bbd-44"}],"importedBy":[{"uid":"96363bbd-34"}]},"96363bbd-34":{"id":"/home/runner/work/pyreon/pyreon/node_modules/.bun/@codemirror+lang-cpp@6.0.3/node_modules/@codemirror/lang-cpp/dist/index.js","moduleParts":{"dist-BxzbGcJt.js":"96363bbd-35"},"imported":[{"uid":"96363bbd-32"},{"uid":"96363bbd-80"}],"importedBy":[{"uid":"96363bbd-6"}]},"96363bbd-36":{"id":"/home/runner/work/pyreon/pyreon/node_modules/.bun/@lezer+rust@1.0.2/node_modules/@lezer/rust/dist/index.js","moduleParts":{"dist-CXUY-Nzh.js":"96363bbd-37"},"imported":[{"uid":"96363bbd-42"},{"uid":"96363bbd-44"}],"importedBy":[{"uid":"96363bbd-38"}]},"96363bbd-38":{"id":"/home/runner/work/pyreon/pyreon/node_modules/.bun/@codemirror+lang-rust@6.0.2/node_modules/@codemirror/lang-rust/dist/index.js","moduleParts":{"dist-CXUY-Nzh.js":"96363bbd-39"},"imported":[{"uid":"96363bbd-36"},{"uid":"96363bbd-80"}],"importedBy":[{"uid":"96363bbd-6"}]},"96363bbd-40":{"id":"/home/runner/work/pyreon/pyreon/node_modules/.bun/@lezer+common@1.5.1/node_modules/@lezer/common/dist/index.js","moduleParts":{"dist-CfapY6Xm.js":"96363bbd-41"},"imported":[],"importedBy":[{"uid":"96363bbd-74"},{"uid":"96363bbd-48"},{"uid":"96363bbd-78"},{"uid":"96363bbd-66"},{"uid":"96363bbd-62"},{"uid":"96363bbd-22"},{"uid":"96363bbd-58"},{"uid":"96363bbd-28"},{"uid":"96363bbd-76"},{"uid":"96363bbd-44"},{"uid":"96363bbd-42"}]},"96363bbd-42":{"id":"/home/runner/work/pyreon/pyreon/node_modules/.bun/@lezer+lr@1.4.8/node_modules/@lezer/lr/dist/index.js","moduleParts":{"dist-CfapY6Xm.js":"96363bbd-43"},"imported":[{"uid":"96363bbd-40"}],"importedBy":[{"uid":"96363bbd-50"},{"uid":"96363bbd-62"},{"uid":"96363bbd-72"},{"uid":"96363bbd-28"},{"uid":"96363bbd-46"},{"uid":"96363bbd-24"},{"uid":"96363bbd-64"},{"uid":"96363bbd-36"},{"uid":"96363bbd-52"},{"uid":"96363bbd-60"},{"uid":"96363bbd-32"},{"uid":"96363bbd-68"},{"uid":"96363bbd-20"},{"uid":"96363bbd-56"}]},"96363bbd-44":{"id":"/home/runner/work/pyreon/pyreon/node_modules/.bun/@lezer+highlight@1.2.3/node_modules/@lezer/highlight/dist/index.js","moduleParts":{"dist-CfapY6Xm.js":"96363bbd-45"},"imported":[{"uid":"96363bbd-40"}],"importedBy":[{"uid":"96363bbd-50"},{"uid":"96363bbd-62"},{"uid":"96363bbd-72"},{"uid":"96363bbd-28"},{"uid":"96363bbd-46"},{"uid":"96363bbd-24"},{"uid":"96363bbd-76"},{"uid":"96363bbd-64"},{"uid":"96363bbd-36"},{"uid":"96363bbd-52"},{"uid":"96363bbd-60"},{"uid":"96363bbd-32"},{"uid":"96363bbd-68"},{"uid":"96363bbd-20"},{"uid":"96363bbd-56"}]},"96363bbd-46":{"id":"/home/runner/work/pyreon/pyreon/node_modules/.bun/@lezer+css@1.3.3/node_modules/@lezer/css/dist/index.js","moduleParts":{"dist-CkzBqhDP.js":"96363bbd-47"},"imported":[{"uid":"96363bbd-42"},{"uid":"96363bbd-44"}],"importedBy":[{"uid":"96363bbd-48"}]},"96363bbd-48":{"id":"/home/runner/work/pyreon/pyreon/node_modules/.bun/@codemirror+lang-css@6.3.1/node_modules/@codemirror/lang-css/dist/index.js","moduleParts":{"dist-CkzBqhDP.js":"96363bbd-49"},"imported":[{"uid":"96363bbd-46"},{"uid":"96363bbd-80"},{"uid":"96363bbd-40"}],"importedBy":[{"uid":"96363bbd-6"},{"uid":"96363bbd-30"}]},"96363bbd-50":{"id":"/home/runner/work/pyreon/pyreon/node_modules/.bun/@codemirror+lang-sql@6.10.0/node_modules/@codemirror/lang-sql/dist/index.js","moduleParts":{"dist-DGt-lmGy.js":"96363bbd-51"},"imported":[{"uid":"96363bbd-80"},{"uid":"96363bbd-44"},{"uid":"96363bbd-42"},{"uid":"96363bbd-84"}],"importedBy":[{"uid":"96363bbd-6"}]},"96363bbd-52":{"id":"/home/runner/work/pyreon/pyreon/node_modules/.bun/@lezer+xml@1.0.6/node_modules/@lezer/xml/dist/index.js","moduleParts":{"dist-DqTrMnaP.js":"96363bbd-53"},"imported":[{"uid":"96363bbd-42"},{"uid":"96363bbd-44"}],"importedBy":[{"uid":"96363bbd-54"}]},"96363bbd-54":{"id":"/home/runner/work/pyreon/pyreon/node_modules/.bun/@codemirror+lang-xml@6.1.0/node_modules/@codemirror/lang-xml/dist/index.js","moduleParts":{"dist-DqTrMnaP.js":"96363bbd-55"},"imported":[{"uid":"96363bbd-52"},{"uid":"96363bbd-80"},{"uid":"96363bbd-82"},{"uid":"96363bbd-83"}],"importedBy":[{"uid":"96363bbd-6"}]},"96363bbd-56":{"id":"/home/runner/work/pyreon/pyreon/node_modules/.bun/@lezer+php@1.0.5/node_modules/@lezer/php/dist/index.js","moduleParts":{"dist-DwKx52QE.js":"96363bbd-57"},"imported":[{"uid":"96363bbd-42"},{"uid":"96363bbd-44"}],"importedBy":[{"uid":"96363bbd-58"}]},"96363bbd-58":{"id":"/home/runner/work/pyreon/pyreon/node_modules/.bun/@codemirror+lang-php@6.0.2/node_modules/@codemirror/lang-php/dist/index.js","moduleParts":{"dist-DwKx52QE.js":"96363bbd-59"},"imported":[{"uid":"96363bbd-56"},{"uid":"96363bbd-40"},{"uid":"96363bbd-30"},{"uid":"96363bbd-80"}],"importedBy":[{"uid":"96363bbd-6"}]},"96363bbd-60":{"id":"/home/runner/work/pyreon/pyreon/node_modules/.bun/@lezer+yaml@1.0.4/node_modules/@lezer/yaml/dist/index.js","moduleParts":{"dist-Oei2Buyd.js":"96363bbd-61"},"imported":[{"uid":"96363bbd-42"},{"uid":"96363bbd-44"}],"importedBy":[{"uid":"96363bbd-62"}]},"96363bbd-62":{"id":"/home/runner/work/pyreon/pyreon/node_modules/.bun/@codemirror+lang-yaml@6.1.3/node_modules/@codemirror/lang-yaml/dist/index.js","moduleParts":{"dist-Oei2Buyd.js":"96363bbd-63"},"imported":[{"uid":"96363bbd-60"},{"uid":"96363bbd-80"},{"uid":"96363bbd-40"},{"uid":"96363bbd-44"},{"uid":"96363bbd-42"}],"importedBy":[{"uid":"96363bbd-6"}]},"96363bbd-64":{"id":"/home/runner/work/pyreon/pyreon/node_modules/.bun/@lezer+python@1.1.18/node_modules/@lezer/python/dist/index.js","moduleParts":{"dist-TrbJHyZy.js":"96363bbd-65"},"imported":[{"uid":"96363bbd-42"},{"uid":"96363bbd-44"}],"importedBy":[{"uid":"96363bbd-66"}]},"96363bbd-66":{"id":"/home/runner/work/pyreon/pyreon/node_modules/.bun/@codemirror+lang-python@6.2.1/node_modules/@codemirror/lang-python/dist/index.js","moduleParts":{"dist-TrbJHyZy.js":"96363bbd-67"},"imported":[{"uid":"96363bbd-64"},{"uid":"96363bbd-80"},{"uid":"96363bbd-40"},{"uid":"96363bbd-84"}],"importedBy":[{"uid":"96363bbd-6"}]},"96363bbd-68":{"id":"/home/runner/work/pyreon/pyreon/node_modules/.bun/@lezer+java@1.1.3/node_modules/@lezer/java/dist/index.js","moduleParts":{"dist-jF2joTkO.js":"96363bbd-69"},"imported":[{"uid":"96363bbd-42"},{"uid":"96363bbd-44"}],"importedBy":[{"uid":"96363bbd-70"}]},"96363bbd-70":{"id":"/home/runner/work/pyreon/pyreon/node_modules/.bun/@codemirror+lang-java@6.0.2/node_modules/@codemirror/lang-java/dist/index.js","moduleParts":{"dist-jF2joTkO.js":"96363bbd-71"},"imported":[{"uid":"96363bbd-68"},{"uid":"96363bbd-80"}],"importedBy":[{"uid":"96363bbd-6"}]},"96363bbd-72":{"id":"/home/runner/work/pyreon/pyreon/node_modules/.bun/@lezer+javascript@1.5.4/node_modules/@lezer/javascript/dist/index.js","moduleParts":{"dist-pDxtX_z4.js":"96363bbd-73"},"imported":[{"uid":"96363bbd-42"},{"uid":"96363bbd-44"}],"importedBy":[{"uid":"96363bbd-74"}]},"96363bbd-74":{"id":"/home/runner/work/pyreon/pyreon/node_modules/.bun/@codemirror+lang-javascript@6.2.5/node_modules/@codemirror/lang-javascript/dist/index.js","moduleParts":{"dist-pDxtX_z4.js":"96363bbd-75"},"imported":[{"uid":"96363bbd-72"},{"uid":"96363bbd-80"},{"uid":"96363bbd-82"},{"uid":"96363bbd-83"},{"uid":"96363bbd-84"},{"uid":"96363bbd-40"}],"importedBy":[{"uid":"96363bbd-6"},{"uid":"96363bbd-30"}]},"96363bbd-76":{"id":"/home/runner/work/pyreon/pyreon/node_modules/.bun/@lezer+markdown@1.6.3/node_modules/@lezer/markdown/dist/index.js","moduleParts":{"dist-sGMMCnKq.js":"96363bbd-77"},"imported":[{"uid":"96363bbd-40"},{"uid":"96363bbd-44"}],"importedBy":[{"uid":"96363bbd-78"}]},"96363bbd-78":{"id":"/home/runner/work/pyreon/pyreon/node_modules/.bun/@codemirror+lang-markdown@6.5.0/node_modules/@codemirror/lang-markdown/dist/index.js","moduleParts":{"dist-sGMMCnKq.js":"96363bbd-79"},"imported":[{"uid":"96363bbd-82"},{"uid":"96363bbd-83"},{"uid":"96363bbd-80"},{"uid":"96363bbd-84"},{"uid":"96363bbd-76"},{"uid":"96363bbd-30"},{"uid":"96363bbd-40"}],"importedBy":[{"uid":"96363bbd-6"}]},"96363bbd-80":{"id":"@codemirror/language","moduleParts":{},"imported":[],"importedBy":[{"uid":"96363bbd-10"},{"uid":"96363bbd-16"},{"uid":"96363bbd-74"},{"uid":"96363bbd-30"},{"uid":"96363bbd-48"},{"uid":"96363bbd-26"},{"uid":"96363bbd-78"},{"uid":"96363bbd-66"},{"uid":"96363bbd-38"},{"uid":"96363bbd-50"},{"uid":"96363bbd-54"},{"uid":"96363bbd-62"},{"uid":"96363bbd-34"},{"uid":"96363bbd-70"},{"uid":"96363bbd-22"},{"uid":"96363bbd-58"}]},"96363bbd-81":{"id":"@codemirror/merge","moduleParts":{},"imported":[],"importedBy":[{"uid":"96363bbd-10"}]},"96363bbd-82":{"id":"@codemirror/state","moduleParts":{},"imported":[],"importedBy":[{"uid":"96363bbd-10"},{"uid":"96363bbd-16"},{"uid":"96363bbd-74"},{"uid":"96363bbd-30"},{"uid":"96363bbd-78"},{"uid":"96363bbd-54"}]},"96363bbd-83":{"id":"@codemirror/view","moduleParts":{},"imported":[],"importedBy":[{"uid":"96363bbd-10"},{"uid":"96363bbd-16"},{"uid":"96363bbd-14"},{"uid":"96363bbd-8"},{"uid":"96363bbd-74"},{"uid":"96363bbd-30"},{"uid":"96363bbd-78"},{"uid":"96363bbd-54"}]},"96363bbd-84":{"id":"@codemirror/autocomplete","moduleParts":{},"imported":[],"importedBy":[{"uid":"96363bbd-16"},{"uid":"96363bbd-74"},{"uid":"96363bbd-78"},{"uid":"96363bbd-66"},{"uid":"96363bbd-50"},{"uid":"96363bbd-22"}]},"96363bbd-85":{"id":"@codemirror/commands","moduleParts":{},"imported":[],"importedBy":[{"uid":"96363bbd-16"}]},"96363bbd-86":{"id":"@codemirror/lint","moduleParts":{},"imported":[],"importedBy":[{"uid":"96363bbd-16"}]},"96363bbd-87":{"id":"@codemirror/search","moduleParts":{},"imported":[],"importedBy":[{"uid":"96363bbd-16"}]},"96363bbd-88":{"id":"@pyreon/reactivity","moduleParts":{},"imported":[],"importedBy":[{"uid":"96363bbd-16"}]}},"env":{"rollup":"4.23.0"},"options":{"gzip":true,"brotli":false,"sourcemap":false}};
|
|
5389
|
+
const data = {"version":2,"tree":{"name":"root","children":[{"name":"index.js","children":[{"name":"\u0000rolldown/runtime.js","uid":"328803c4-1"},{"name":"home/runner/work/pyreon/pyreon/packages/core/core/lib/jsx-runtime.js","uid":"328803c4-3"},{"name":"src","children":[{"name":"components","children":[{"uid":"328803c4-5","name":"code-editor.tsx"},{"uid":"328803c4-11","name":"diff-editor.tsx"},{"uid":"328803c4-13","name":"tabbed-editor.tsx"}]},{"uid":"328803c4-7","name":"languages.ts"},{"uid":"328803c4-9","name":"themes.ts"},{"uid":"328803c4-15","name":"minimap.ts"},{"uid":"328803c4-17","name":"editor.ts"},{"uid":"328803c4-19","name":"index.ts"}]}]},{"name":"dist-5FA-omYL.js","children":[{"name":"home/runner/work/pyreon/pyreon/node_modules/.bun","children":[{"name":"@lezer+go@1.0.1/node_modules/@lezer/go/dist/index.js","uid":"328803c4-21"},{"name":"@codemirror+lang-go@6.0.1/node_modules/@codemirror/lang-go/dist/index.js","uid":"328803c4-23"}]}]},{"name":"dist-BisvZuec.js","children":[{"name":"home/runner/work/pyreon/pyreon/node_modules/.bun","children":[{"name":"@lezer+json@1.0.3/node_modules/@lezer/json/dist/index.js","uid":"328803c4-25"},{"name":"@codemirror+lang-json@6.0.2/node_modules/@codemirror/lang-json/dist/index.js","uid":"328803c4-27"}]}]},{"name":"dist-BrE8YJpx.js","children":[{"name":"home/runner/work/pyreon/pyreon/node_modules/.bun","children":[{"name":"@lezer+html@1.3.13/node_modules/@lezer/html/dist/index.js","uid":"328803c4-29"},{"name":"@codemirror+lang-html@6.4.11/node_modules/@codemirror/lang-html/dist/index.js","uid":"328803c4-31"}]}]},{"name":"dist-BxzbGcJt.js","children":[{"name":"home/runner/work/pyreon/pyreon/node_modules/.bun","children":[{"name":"@lezer+cpp@1.1.5/node_modules/@lezer/cpp/dist/index.js","uid":"328803c4-33"},{"name":"@codemirror+lang-cpp@6.0.3/node_modules/@codemirror/lang-cpp/dist/index.js","uid":"328803c4-35"}]}]},{"name":"dist-CXUY-Nzh.js","children":[{"name":"home/runner/work/pyreon/pyreon/node_modules/.bun","children":[{"name":"@lezer+rust@1.0.2/node_modules/@lezer/rust/dist/index.js","uid":"328803c4-37"},{"name":"@codemirror+lang-rust@6.0.2/node_modules/@codemirror/lang-rust/dist/index.js","uid":"328803c4-39"}]}]},{"name":"dist-CfapY6Xm.js","children":[{"name":"home/runner/work/pyreon/pyreon/node_modules/.bun","children":[{"name":"@lezer+common@1.5.1/node_modules/@lezer/common/dist/index.js","uid":"328803c4-41"},{"name":"@lezer+lr@1.4.8/node_modules/@lezer/lr/dist/index.js","uid":"328803c4-43"},{"name":"@lezer+highlight@1.2.3/node_modules/@lezer/highlight/dist/index.js","uid":"328803c4-45"}]}]},{"name":"dist-CkzBqhDP.js","children":[{"name":"home/runner/work/pyreon/pyreon/node_modules/.bun","children":[{"name":"@lezer+css@1.3.3/node_modules/@lezer/css/dist/index.js","uid":"328803c4-47"},{"name":"@codemirror+lang-css@6.3.1/node_modules/@codemirror/lang-css/dist/index.js","uid":"328803c4-49"}]}]},{"name":"dist-DGt-lmGy.js","children":[{"name":"home/runner/work/pyreon/pyreon/node_modules/.bun/@codemirror+lang-sql@6.10.0/node_modules/@codemirror/lang-sql/dist/index.js","uid":"328803c4-51"}]},{"name":"dist-DqTrMnaP.js","children":[{"name":"home/runner/work/pyreon/pyreon/node_modules/.bun","children":[{"name":"@lezer+xml@1.0.6/node_modules/@lezer/xml/dist/index.js","uid":"328803c4-53"},{"name":"@codemirror+lang-xml@6.1.0/node_modules/@codemirror/lang-xml/dist/index.js","uid":"328803c4-55"}]}]},{"name":"dist-DwKx52QE.js","children":[{"name":"home/runner/work/pyreon/pyreon/node_modules/.bun","children":[{"name":"@lezer+php@1.0.5/node_modules/@lezer/php/dist/index.js","uid":"328803c4-57"},{"name":"@codemirror+lang-php@6.0.2/node_modules/@codemirror/lang-php/dist/index.js","uid":"328803c4-59"}]}]},{"name":"dist-Oei2Buyd.js","children":[{"name":"home/runner/work/pyreon/pyreon/node_modules/.bun","children":[{"name":"@lezer+yaml@1.0.4/node_modules/@lezer/yaml/dist/index.js","uid":"328803c4-61"},{"name":"@codemirror+lang-yaml@6.1.3/node_modules/@codemirror/lang-yaml/dist/index.js","uid":"328803c4-63"}]}]},{"name":"dist-TrbJHyZy.js","children":[{"name":"home/runner/work/pyreon/pyreon/node_modules/.bun","children":[{"name":"@lezer+python@1.1.18/node_modules/@lezer/python/dist/index.js","uid":"328803c4-65"},{"name":"@codemirror+lang-python@6.2.1/node_modules/@codemirror/lang-python/dist/index.js","uid":"328803c4-67"}]}]},{"name":"dist-jF2joTkO.js","children":[{"name":"home/runner/work/pyreon/pyreon/node_modules/.bun","children":[{"name":"@lezer+java@1.1.3/node_modules/@lezer/java/dist/index.js","uid":"328803c4-69"},{"name":"@codemirror+lang-java@6.0.2/node_modules/@codemirror/lang-java/dist/index.js","uid":"328803c4-71"}]}]},{"name":"dist-pDxtX_z4.js","children":[{"name":"home/runner/work/pyreon/pyreon/node_modules/.bun","children":[{"name":"@lezer+javascript@1.5.4/node_modules/@lezer/javascript/dist/index.js","uid":"328803c4-73"},{"name":"@codemirror+lang-javascript@6.2.5/node_modules/@codemirror/lang-javascript/dist/index.js","uid":"328803c4-75"}]}]},{"name":"dist-sGMMCnKq.js","children":[{"name":"home/runner/work/pyreon/pyreon/node_modules/.bun","children":[{"name":"@lezer+markdown@1.6.3/node_modules/@lezer/markdown/dist/index.js","uid":"328803c4-77"},{"name":"@codemirror+lang-markdown@6.5.0/node_modules/@codemirror/lang-markdown/dist/index.js","uid":"328803c4-79"}]}]}],"isRoot":true},"nodeParts":{"328803c4-1":{"renderedLength":848,"gzipLength":487,"brotliLength":0,"metaUid":"328803c4-0"},"328803c4-3":{"renderedLength":1599,"gzipLength":807,"brotliLength":0,"metaUid":"328803c4-2"},"328803c4-5":{"renderedLength":731,"gzipLength":441,"brotliLength":0,"metaUid":"328803c4-4"},"328803c4-7":{"renderedLength":2245,"gzipLength":736,"brotliLength":0,"metaUid":"328803c4-6"},"328803c4-9":{"renderedLength":1544,"gzipLength":554,"brotliLength":0,"metaUid":"328803c4-8"},"328803c4-11":{"renderedLength":2290,"gzipLength":1017,"brotliLength":0,"metaUid":"328803c4-10"},"328803c4-13":{"renderedLength":2681,"gzipLength":1174,"brotliLength":0,"metaUid":"328803c4-12"},"328803c4-15":{"renderedLength":3907,"gzipLength":1561,"brotliLength":0,"metaUid":"328803c4-14"},"328803c4-17":{"renderedLength":11849,"gzipLength":3501,"brotliLength":0,"metaUid":"328803c4-16"},"328803c4-19":{"renderedLength":0,"gzipLength":0,"brotliLength":0,"metaUid":"328803c4-18"},"328803c4-21":{"renderedLength":28601,"gzipLength":11397,"brotliLength":0,"metaUid":"328803c4-20"},"328803c4-23":{"renderedLength":6785,"gzipLength":2297,"brotliLength":0,"metaUid":"328803c4-22"},"328803c4-25":{"renderedLength":1938,"gzipLength":1154,"brotliLength":0,"metaUid":"328803c4-24"},"328803c4-27":{"renderedLength":756,"gzipLength":427,"brotliLength":0,"metaUid":"328803c4-26"},"328803c4-29":{"renderedLength":20067,"gzipLength":7172,"brotliLength":0,"metaUid":"328803c4-28"},"328803c4-31":{"renderedLength":22646,"gzipLength":6816,"brotliLength":0,"metaUid":"328803c4-30"},"328803c4-33":{"renderedLength":102369,"gzipLength":33579,"brotliLength":0,"metaUid":"328803c4-32"},"328803c4-35":{"renderedLength":1473,"gzipLength":734,"brotliLength":0,"metaUid":"328803c4-34"},"328803c4-37":{"renderedLength":72535,"gzipLength":25860,"brotliLength":0,"metaUid":"328803c4-36"},"328803c4-39":{"renderedLength":1193,"gzipLength":672,"brotliLength":0,"metaUid":"328803c4-38"},"328803c4-41":{"renderedLength":63580,"gzipLength":17558,"brotliLength":0,"metaUid":"328803c4-40"},"328803c4-43":{"renderedLength":48118,"gzipLength":13327,"brotliLength":0,"metaUid":"328803c4-42"},"328803c4-45":{"renderedLength":14883,"gzipLength":5154,"brotliLength":0,"metaUid":"328803c4-44"},"328803c4-47":{"renderedLength":18528,"gzipLength":8035,"brotliLength":0,"metaUid":"328803c4-46"},"328803c4-49":{"renderedLength":15651,"gzipLength":5292,"brotliLength":0,"metaUid":"328803c4-48"},"328803c4-51":{"renderedLength":44478,"gzipLength":14909,"brotliLength":0,"metaUid":"328803c4-50"},"328803c4-53":{"renderedLength":10378,"gzipLength":4022,"brotliLength":0,"metaUid":"328803c4-52"},"328803c4-55":{"renderedLength":11204,"gzipLength":3380,"brotliLength":0,"metaUid":"328803c4-54"},"328803c4-57":{"renderedLength":100189,"gzipLength":28339,"brotliLength":0,"metaUid":"328803c4-56"},"328803c4-59":{"renderedLength":2340,"gzipLength":1091,"brotliLength":0,"metaUid":"328803c4-58"},"328803c4-61":{"renderedLength":15737,"gzipLength":5561,"brotliLength":0,"metaUid":"328803c4-60"},"328803c4-63":{"renderedLength":2694,"gzipLength":1257,"brotliLength":0,"metaUid":"328803c4-62"},"328803c4-65":{"renderedLength":43367,"gzipLength":17192,"brotliLength":0,"metaUid":"328803c4-64"},"328803c4-67":{"renderedLength":11179,"gzipLength":3599,"brotliLength":0,"metaUid":"328803c4-66"},"328803c4-69":{"renderedLength":40941,"gzipLength":16436,"brotliLength":0,"metaUid":"328803c4-68"},"328803c4-71":{"renderedLength":1550,"gzipLength":788,"brotliLength":0,"metaUid":"328803c4-70"},"328803c4-73":{"renderedLength":81010,"gzipLength":31199,"brotliLength":0,"metaUid":"328803c4-72"},"328803c4-75":{"renderedLength":12490,"gzipLength":3908,"brotliLength":0,"metaUid":"328803c4-74"},"328803c4-77":{"renderedLength":66310,"gzipLength":17756,"brotliLength":0,"metaUid":"328803c4-76"},"328803c4-79":{"renderedLength":17438,"gzipLength":5526,"brotliLength":0,"metaUid":"328803c4-78"}},"nodeMetas":{"328803c4-0":{"id":"\u0000rolldown/runtime.js","moduleParts":{"index.js":"328803c4-1"},"imported":[],"importedBy":[]},"328803c4-2":{"id":"/home/runner/work/pyreon/pyreon/packages/core/core/lib/jsx-runtime.js","moduleParts":{"index.js":"328803c4-3"},"imported":[],"importedBy":[{"uid":"328803c4-4"},{"uid":"328803c4-10"},{"uid":"328803c4-12"}]},"328803c4-4":{"id":"/src/components/code-editor.tsx","moduleParts":{"index.js":"328803c4-5"},"imported":[{"uid":"328803c4-2"}],"importedBy":[{"uid":"328803c4-18"},{"uid":"328803c4-12"}]},"328803c4-6":{"id":"/src/languages.ts","moduleParts":{"index.js":"328803c4-7"},"imported":[{"uid":"328803c4-74","dynamic":true},{"uid":"328803c4-30","dynamic":true},{"uid":"328803c4-48","dynamic":true},{"uid":"328803c4-26","dynamic":true},{"uid":"328803c4-78","dynamic":true},{"uid":"328803c4-66","dynamic":true},{"uid":"328803c4-38","dynamic":true},{"uid":"328803c4-50","dynamic":true},{"uid":"328803c4-54","dynamic":true},{"uid":"328803c4-62","dynamic":true},{"uid":"328803c4-34","dynamic":true},{"uid":"328803c4-70","dynamic":true},{"uid":"328803c4-22","dynamic":true},{"uid":"328803c4-58","dynamic":true}],"importedBy":[{"uid":"328803c4-18"},{"uid":"328803c4-10"},{"uid":"328803c4-16"}]},"328803c4-8":{"id":"/src/themes.ts","moduleParts":{"index.js":"328803c4-9"},"imported":[{"uid":"328803c4-83"}],"importedBy":[{"uid":"328803c4-18"},{"uid":"328803c4-10"},{"uid":"328803c4-16"}]},"328803c4-10":{"id":"/src/components/diff-editor.tsx","moduleParts":{"index.js":"328803c4-11"},"imported":[{"uid":"328803c4-80"},{"uid":"328803c4-81"},{"uid":"328803c4-82"},{"uid":"328803c4-83"},{"uid":"328803c4-84"},{"uid":"328803c4-85"},{"uid":"328803c4-6"},{"uid":"328803c4-8"},{"uid":"328803c4-2"}],"importedBy":[{"uid":"328803c4-18"}]},"328803c4-12":{"id":"/src/components/tabbed-editor.tsx","moduleParts":{"index.js":"328803c4-13"},"imported":[{"uid":"328803c4-4"},{"uid":"328803c4-2"}],"importedBy":[{"uid":"328803c4-18"}]},"328803c4-14":{"id":"/src/minimap.ts","moduleParts":{"index.js":"328803c4-15"},"imported":[{"uid":"328803c4-83"}],"importedBy":[{"uid":"328803c4-18"},{"uid":"328803c4-16"}]},"328803c4-16":{"id":"/src/editor.ts","moduleParts":{"index.js":"328803c4-17"},"imported":[{"uid":"328803c4-86"},{"uid":"328803c4-87"},{"uid":"328803c4-80"},{"uid":"328803c4-88"},{"uid":"328803c4-89"},{"uid":"328803c4-82"},{"uid":"328803c4-83"},{"uid":"328803c4-85"},{"uid":"328803c4-6"},{"uid":"328803c4-14"},{"uid":"328803c4-8"}],"importedBy":[{"uid":"328803c4-18"}]},"328803c4-18":{"id":"/src/index.ts","moduleParts":{"index.js":"328803c4-19"},"imported":[{"uid":"328803c4-4"},{"uid":"328803c4-10"},{"uid":"328803c4-12"},{"uid":"328803c4-16"},{"uid":"328803c4-6"},{"uid":"328803c4-14"},{"uid":"328803c4-8"}],"importedBy":[],"isEntry":true},"328803c4-20":{"id":"/home/runner/work/pyreon/pyreon/node_modules/.bun/@lezer+go@1.0.1/node_modules/@lezer/go/dist/index.js","moduleParts":{"dist-5FA-omYL.js":"328803c4-21"},"imported":[{"uid":"328803c4-42"},{"uid":"328803c4-44"}],"importedBy":[{"uid":"328803c4-22"}]},"328803c4-22":{"id":"/home/runner/work/pyreon/pyreon/node_modules/.bun/@codemirror+lang-go@6.0.1/node_modules/@codemirror/lang-go/dist/index.js","moduleParts":{"dist-5FA-omYL.js":"328803c4-23"},"imported":[{"uid":"328803c4-20"},{"uid":"328803c4-80"},{"uid":"328803c4-86"},{"uid":"328803c4-40"}],"importedBy":[{"uid":"328803c4-6"}]},"328803c4-24":{"id":"/home/runner/work/pyreon/pyreon/node_modules/.bun/@lezer+json@1.0.3/node_modules/@lezer/json/dist/index.js","moduleParts":{"dist-BisvZuec.js":"328803c4-25"},"imported":[{"uid":"328803c4-42"},{"uid":"328803c4-44"}],"importedBy":[{"uid":"328803c4-26"}]},"328803c4-26":{"id":"/home/runner/work/pyreon/pyreon/node_modules/.bun/@codemirror+lang-json@6.0.2/node_modules/@codemirror/lang-json/dist/index.js","moduleParts":{"dist-BisvZuec.js":"328803c4-27"},"imported":[{"uid":"328803c4-24"},{"uid":"328803c4-80"}],"importedBy":[{"uid":"328803c4-6"}]},"328803c4-28":{"id":"/home/runner/work/pyreon/pyreon/node_modules/.bun/@lezer+html@1.3.13/node_modules/@lezer/html/dist/index.js","moduleParts":{"dist-BrE8YJpx.js":"328803c4-29"},"imported":[{"uid":"328803c4-42"},{"uid":"328803c4-44"},{"uid":"328803c4-40"}],"importedBy":[{"uid":"328803c4-30"}]},"328803c4-30":{"id":"/home/runner/work/pyreon/pyreon/node_modules/.bun/@codemirror+lang-html@6.4.11/node_modules/@codemirror/lang-html/dist/index.js","moduleParts":{"dist-BrE8YJpx.js":"328803c4-31"},"imported":[{"uid":"328803c4-28"},{"uid":"328803c4-48"},{"uid":"328803c4-74"},{"uid":"328803c4-83"},{"uid":"328803c4-82"},{"uid":"328803c4-80"}],"importedBy":[{"uid":"328803c4-6"},{"uid":"328803c4-78"},{"uid":"328803c4-58"}]},"328803c4-32":{"id":"/home/runner/work/pyreon/pyreon/node_modules/.bun/@lezer+cpp@1.1.5/node_modules/@lezer/cpp/dist/index.js","moduleParts":{"dist-BxzbGcJt.js":"328803c4-33"},"imported":[{"uid":"328803c4-42"},{"uid":"328803c4-44"}],"importedBy":[{"uid":"328803c4-34"}]},"328803c4-34":{"id":"/home/runner/work/pyreon/pyreon/node_modules/.bun/@codemirror+lang-cpp@6.0.3/node_modules/@codemirror/lang-cpp/dist/index.js","moduleParts":{"dist-BxzbGcJt.js":"328803c4-35"},"imported":[{"uid":"328803c4-32"},{"uid":"328803c4-80"}],"importedBy":[{"uid":"328803c4-6"}]},"328803c4-36":{"id":"/home/runner/work/pyreon/pyreon/node_modules/.bun/@lezer+rust@1.0.2/node_modules/@lezer/rust/dist/index.js","moduleParts":{"dist-CXUY-Nzh.js":"328803c4-37"},"imported":[{"uid":"328803c4-42"},{"uid":"328803c4-44"}],"importedBy":[{"uid":"328803c4-38"}]},"328803c4-38":{"id":"/home/runner/work/pyreon/pyreon/node_modules/.bun/@codemirror+lang-rust@6.0.2/node_modules/@codemirror/lang-rust/dist/index.js","moduleParts":{"dist-CXUY-Nzh.js":"328803c4-39"},"imported":[{"uid":"328803c4-36"},{"uid":"328803c4-80"}],"importedBy":[{"uid":"328803c4-6"}]},"328803c4-40":{"id":"/home/runner/work/pyreon/pyreon/node_modules/.bun/@lezer+common@1.5.1/node_modules/@lezer/common/dist/index.js","moduleParts":{"dist-CfapY6Xm.js":"328803c4-41"},"imported":[],"importedBy":[{"uid":"328803c4-74"},{"uid":"328803c4-48"},{"uid":"328803c4-78"},{"uid":"328803c4-66"},{"uid":"328803c4-62"},{"uid":"328803c4-22"},{"uid":"328803c4-58"},{"uid":"328803c4-28"},{"uid":"328803c4-76"},{"uid":"328803c4-44"},{"uid":"328803c4-42"}]},"328803c4-42":{"id":"/home/runner/work/pyreon/pyreon/node_modules/.bun/@lezer+lr@1.4.8/node_modules/@lezer/lr/dist/index.js","moduleParts":{"dist-CfapY6Xm.js":"328803c4-43"},"imported":[{"uid":"328803c4-40"}],"importedBy":[{"uid":"328803c4-50"},{"uid":"328803c4-62"},{"uid":"328803c4-72"},{"uid":"328803c4-28"},{"uid":"328803c4-46"},{"uid":"328803c4-24"},{"uid":"328803c4-64"},{"uid":"328803c4-36"},{"uid":"328803c4-52"},{"uid":"328803c4-60"},{"uid":"328803c4-32"},{"uid":"328803c4-68"},{"uid":"328803c4-20"},{"uid":"328803c4-56"}]},"328803c4-44":{"id":"/home/runner/work/pyreon/pyreon/node_modules/.bun/@lezer+highlight@1.2.3/node_modules/@lezer/highlight/dist/index.js","moduleParts":{"dist-CfapY6Xm.js":"328803c4-45"},"imported":[{"uid":"328803c4-40"}],"importedBy":[{"uid":"328803c4-50"},{"uid":"328803c4-62"},{"uid":"328803c4-72"},{"uid":"328803c4-28"},{"uid":"328803c4-46"},{"uid":"328803c4-24"},{"uid":"328803c4-76"},{"uid":"328803c4-64"},{"uid":"328803c4-36"},{"uid":"328803c4-52"},{"uid":"328803c4-60"},{"uid":"328803c4-32"},{"uid":"328803c4-68"},{"uid":"328803c4-20"},{"uid":"328803c4-56"}]},"328803c4-46":{"id":"/home/runner/work/pyreon/pyreon/node_modules/.bun/@lezer+css@1.3.3/node_modules/@lezer/css/dist/index.js","moduleParts":{"dist-CkzBqhDP.js":"328803c4-47"},"imported":[{"uid":"328803c4-42"},{"uid":"328803c4-44"}],"importedBy":[{"uid":"328803c4-48"}]},"328803c4-48":{"id":"/home/runner/work/pyreon/pyreon/node_modules/.bun/@codemirror+lang-css@6.3.1/node_modules/@codemirror/lang-css/dist/index.js","moduleParts":{"dist-CkzBqhDP.js":"328803c4-49"},"imported":[{"uid":"328803c4-46"},{"uid":"328803c4-80"},{"uid":"328803c4-40"}],"importedBy":[{"uid":"328803c4-6"},{"uid":"328803c4-30"}]},"328803c4-50":{"id":"/home/runner/work/pyreon/pyreon/node_modules/.bun/@codemirror+lang-sql@6.10.0/node_modules/@codemirror/lang-sql/dist/index.js","moduleParts":{"dist-DGt-lmGy.js":"328803c4-51"},"imported":[{"uid":"328803c4-80"},{"uid":"328803c4-44"},{"uid":"328803c4-42"},{"uid":"328803c4-86"}],"importedBy":[{"uid":"328803c4-6"}]},"328803c4-52":{"id":"/home/runner/work/pyreon/pyreon/node_modules/.bun/@lezer+xml@1.0.6/node_modules/@lezer/xml/dist/index.js","moduleParts":{"dist-DqTrMnaP.js":"328803c4-53"},"imported":[{"uid":"328803c4-42"},{"uid":"328803c4-44"}],"importedBy":[{"uid":"328803c4-54"}]},"328803c4-54":{"id":"/home/runner/work/pyreon/pyreon/node_modules/.bun/@codemirror+lang-xml@6.1.0/node_modules/@codemirror/lang-xml/dist/index.js","moduleParts":{"dist-DqTrMnaP.js":"328803c4-55"},"imported":[{"uid":"328803c4-52"},{"uid":"328803c4-80"},{"uid":"328803c4-82"},{"uid":"328803c4-83"}],"importedBy":[{"uid":"328803c4-6"}]},"328803c4-56":{"id":"/home/runner/work/pyreon/pyreon/node_modules/.bun/@lezer+php@1.0.5/node_modules/@lezer/php/dist/index.js","moduleParts":{"dist-DwKx52QE.js":"328803c4-57"},"imported":[{"uid":"328803c4-42"},{"uid":"328803c4-44"}],"importedBy":[{"uid":"328803c4-58"}]},"328803c4-58":{"id":"/home/runner/work/pyreon/pyreon/node_modules/.bun/@codemirror+lang-php@6.0.2/node_modules/@codemirror/lang-php/dist/index.js","moduleParts":{"dist-DwKx52QE.js":"328803c4-59"},"imported":[{"uid":"328803c4-56"},{"uid":"328803c4-40"},{"uid":"328803c4-30"},{"uid":"328803c4-80"}],"importedBy":[{"uid":"328803c4-6"}]},"328803c4-60":{"id":"/home/runner/work/pyreon/pyreon/node_modules/.bun/@lezer+yaml@1.0.4/node_modules/@lezer/yaml/dist/index.js","moduleParts":{"dist-Oei2Buyd.js":"328803c4-61"},"imported":[{"uid":"328803c4-42"},{"uid":"328803c4-44"}],"importedBy":[{"uid":"328803c4-62"}]},"328803c4-62":{"id":"/home/runner/work/pyreon/pyreon/node_modules/.bun/@codemirror+lang-yaml@6.1.3/node_modules/@codemirror/lang-yaml/dist/index.js","moduleParts":{"dist-Oei2Buyd.js":"328803c4-63"},"imported":[{"uid":"328803c4-60"},{"uid":"328803c4-80"},{"uid":"328803c4-40"},{"uid":"328803c4-44"},{"uid":"328803c4-42"}],"importedBy":[{"uid":"328803c4-6"}]},"328803c4-64":{"id":"/home/runner/work/pyreon/pyreon/node_modules/.bun/@lezer+python@1.1.18/node_modules/@lezer/python/dist/index.js","moduleParts":{"dist-TrbJHyZy.js":"328803c4-65"},"imported":[{"uid":"328803c4-42"},{"uid":"328803c4-44"}],"importedBy":[{"uid":"328803c4-66"}]},"328803c4-66":{"id":"/home/runner/work/pyreon/pyreon/node_modules/.bun/@codemirror+lang-python@6.2.1/node_modules/@codemirror/lang-python/dist/index.js","moduleParts":{"dist-TrbJHyZy.js":"328803c4-67"},"imported":[{"uid":"328803c4-64"},{"uid":"328803c4-80"},{"uid":"328803c4-40"},{"uid":"328803c4-86"}],"importedBy":[{"uid":"328803c4-6"}]},"328803c4-68":{"id":"/home/runner/work/pyreon/pyreon/node_modules/.bun/@lezer+java@1.1.3/node_modules/@lezer/java/dist/index.js","moduleParts":{"dist-jF2joTkO.js":"328803c4-69"},"imported":[{"uid":"328803c4-42"},{"uid":"328803c4-44"}],"importedBy":[{"uid":"328803c4-70"}]},"328803c4-70":{"id":"/home/runner/work/pyreon/pyreon/node_modules/.bun/@codemirror+lang-java@6.0.2/node_modules/@codemirror/lang-java/dist/index.js","moduleParts":{"dist-jF2joTkO.js":"328803c4-71"},"imported":[{"uid":"328803c4-68"},{"uid":"328803c4-80"}],"importedBy":[{"uid":"328803c4-6"}]},"328803c4-72":{"id":"/home/runner/work/pyreon/pyreon/node_modules/.bun/@lezer+javascript@1.5.4/node_modules/@lezer/javascript/dist/index.js","moduleParts":{"dist-pDxtX_z4.js":"328803c4-73"},"imported":[{"uid":"328803c4-42"},{"uid":"328803c4-44"}],"importedBy":[{"uid":"328803c4-74"}]},"328803c4-74":{"id":"/home/runner/work/pyreon/pyreon/node_modules/.bun/@codemirror+lang-javascript@6.2.5/node_modules/@codemirror/lang-javascript/dist/index.js","moduleParts":{"dist-pDxtX_z4.js":"328803c4-75"},"imported":[{"uid":"328803c4-72"},{"uid":"328803c4-80"},{"uid":"328803c4-82"},{"uid":"328803c4-83"},{"uid":"328803c4-86"},{"uid":"328803c4-40"}],"importedBy":[{"uid":"328803c4-6"},{"uid":"328803c4-30"}]},"328803c4-76":{"id":"/home/runner/work/pyreon/pyreon/node_modules/.bun/@lezer+markdown@1.6.3/node_modules/@lezer/markdown/dist/index.js","moduleParts":{"dist-sGMMCnKq.js":"328803c4-77"},"imported":[{"uid":"328803c4-40"},{"uid":"328803c4-44"}],"importedBy":[{"uid":"328803c4-78"}]},"328803c4-78":{"id":"/home/runner/work/pyreon/pyreon/node_modules/.bun/@codemirror+lang-markdown@6.5.0/node_modules/@codemirror/lang-markdown/dist/index.js","moduleParts":{"dist-sGMMCnKq.js":"328803c4-79"},"imported":[{"uid":"328803c4-82"},{"uid":"328803c4-83"},{"uid":"328803c4-80"},{"uid":"328803c4-86"},{"uid":"328803c4-76"},{"uid":"328803c4-30"},{"uid":"328803c4-40"}],"importedBy":[{"uid":"328803c4-6"}]},"328803c4-80":{"id":"@codemirror/language","moduleParts":{},"imported":[],"importedBy":[{"uid":"328803c4-10"},{"uid":"328803c4-16"},{"uid":"328803c4-74"},{"uid":"328803c4-30"},{"uid":"328803c4-48"},{"uid":"328803c4-26"},{"uid":"328803c4-78"},{"uid":"328803c4-66"},{"uid":"328803c4-38"},{"uid":"328803c4-50"},{"uid":"328803c4-54"},{"uid":"328803c4-62"},{"uid":"328803c4-34"},{"uid":"328803c4-70"},{"uid":"328803c4-22"},{"uid":"328803c4-58"}]},"328803c4-81":{"id":"@codemirror/merge","moduleParts":{},"imported":[],"importedBy":[{"uid":"328803c4-10"}]},"328803c4-82":{"id":"@codemirror/state","moduleParts":{},"imported":[],"importedBy":[{"uid":"328803c4-10"},{"uid":"328803c4-16"},{"uid":"328803c4-74"},{"uid":"328803c4-30"},{"uid":"328803c4-78"},{"uid":"328803c4-54"}]},"328803c4-83":{"id":"@codemirror/view","moduleParts":{},"imported":[],"importedBy":[{"uid":"328803c4-10"},{"uid":"328803c4-16"},{"uid":"328803c4-14"},{"uid":"328803c4-8"},{"uid":"328803c4-74"},{"uid":"328803c4-30"},{"uid":"328803c4-78"},{"uid":"328803c4-54"}]},"328803c4-84":{"id":"@pyreon/core","moduleParts":{},"imported":[],"importedBy":[{"uid":"328803c4-10"}]},"328803c4-85":{"id":"@pyreon/reactivity","moduleParts":{},"imported":[],"importedBy":[{"uid":"328803c4-10"},{"uid":"328803c4-16"}]},"328803c4-86":{"id":"@codemirror/autocomplete","moduleParts":{},"imported":[],"importedBy":[{"uid":"328803c4-16"},{"uid":"328803c4-74"},{"uid":"328803c4-78"},{"uid":"328803c4-66"},{"uid":"328803c4-50"},{"uid":"328803c4-22"}]},"328803c4-87":{"id":"@codemirror/commands","moduleParts":{},"imported":[],"importedBy":[{"uid":"328803c4-16"}]},"328803c4-88":{"id":"@codemirror/lint","moduleParts":{},"imported":[],"importedBy":[{"uid":"328803c4-16"}]},"328803c4-89":{"id":"@codemirror/search","moduleParts":{},"imported":[],"importedBy":[{"uid":"328803c4-16"}]}},"env":{"rollup":"4.23.0"},"options":{"gzip":true,"brotli":false,"sourcemap":false}};
|
|
5390
5390
|
|
|
5391
5391
|
const run = () => {
|
|
5392
5392
|
const width = window.innerWidth;
|
package/lib/index.js
CHANGED
|
@@ -2,11 +2,12 @@ import { bracketMatching, defaultHighlightStyle, foldGutter, foldKeymap, indentO
|
|
|
2
2
|
import { MergeView } from "@codemirror/merge";
|
|
3
3
|
import { Compartment, EditorState } from "@codemirror/state";
|
|
4
4
|
import { Decoration, EditorView, GutterMarker, ViewPlugin, crosshairCursor, drawSelection, dropCursor, gutter, highlightActiveLine, highlightActiveLineGutter, keymap, lineNumbers, placeholder, rectangularSelection } from "@codemirror/view";
|
|
5
|
+
import { onUnmount } from "@pyreon/core";
|
|
6
|
+
import { computed, effect, signal, watch } from "@pyreon/reactivity";
|
|
5
7
|
import { autocompletion, closeBrackets, closeBracketsKeymap, completionKeymap } from "@codemirror/autocomplete";
|
|
6
8
|
import { defaultKeymap, history, historyKeymap, indentWithTab, redo, undo } from "@codemirror/commands";
|
|
7
9
|
import { lintKeymap, setDiagnostics } from "@codemirror/lint";
|
|
8
10
|
import { highlightSelectionMatches, searchKeymap } from "@codemirror/search";
|
|
9
|
-
import { computed, effect, signal } from "@pyreon/reactivity";
|
|
10
11
|
|
|
11
12
|
//#region \0rolldown/runtime.js
|
|
12
13
|
var __defProp = Object.defineProperty;
|
|
@@ -233,9 +234,14 @@ function resolveTheme(theme) {
|
|
|
233
234
|
|
|
234
235
|
//#endregion
|
|
235
236
|
//#region src/components/diff-editor.tsx
|
|
237
|
+
const readText = (value) => typeof value === "string" ? value : value();
|
|
238
|
+
const isSignal = (value) => typeof value === "function";
|
|
236
239
|
/**
|
|
237
240
|
* Side-by-side or inline diff editor using @codemirror/merge.
|
|
238
241
|
*
|
|
242
|
+
* Supports reactive `original` and `modified` props — pass a Signal<string>
|
|
243
|
+
* and the diff view updates automatically when the signal changes.
|
|
244
|
+
*
|
|
239
245
|
* @example
|
|
240
246
|
* ```tsx
|
|
241
247
|
* <DiffEditor
|
|
@@ -248,7 +254,9 @@ function resolveTheme(theme) {
|
|
|
248
254
|
* ```
|
|
249
255
|
*/
|
|
250
256
|
function DiffEditor(props) {
|
|
251
|
-
const { original, modified, language = "plain", theme = "light", readOnly = true
|
|
257
|
+
const { original, modified, language = "plain", theme = "light", readOnly = true } = props;
|
|
258
|
+
let mergeView = null;
|
|
259
|
+
const cleanups = [];
|
|
252
260
|
const containerRef = async (el) => {
|
|
253
261
|
if (!el) return;
|
|
254
262
|
const langExt = await loadLanguage(language);
|
|
@@ -260,25 +268,10 @@ function DiffEditor(props) {
|
|
|
260
268
|
EditorView.editable.of(!readOnly),
|
|
261
269
|
EditorState.readOnly.of(readOnly)
|
|
262
270
|
];
|
|
263
|
-
const originalText =
|
|
264
|
-
const modifiedText =
|
|
271
|
+
const originalText = readText(original);
|
|
272
|
+
const modifiedText = readText(modified);
|
|
265
273
|
el.innerHTML = "";
|
|
266
|
-
|
|
267
|
-
a: {
|
|
268
|
-
doc: originalText,
|
|
269
|
-
extensions
|
|
270
|
-
},
|
|
271
|
-
b: {
|
|
272
|
-
doc: modifiedText,
|
|
273
|
-
extensions
|
|
274
|
-
},
|
|
275
|
-
parent: el,
|
|
276
|
-
collapseUnchanged: {
|
|
277
|
-
margin: 3,
|
|
278
|
-
minSize: 4
|
|
279
|
-
}
|
|
280
|
-
});
|
|
281
|
-
else new MergeView({
|
|
274
|
+
mergeView = new MergeView({
|
|
282
275
|
a: {
|
|
283
276
|
doc: originalText,
|
|
284
277
|
extensions
|
|
@@ -293,7 +286,36 @@ function DiffEditor(props) {
|
|
|
293
286
|
minSize: 4
|
|
294
287
|
}
|
|
295
288
|
});
|
|
289
|
+
if (isSignal(original)) {
|
|
290
|
+
const stop = watch(original, (text) => {
|
|
291
|
+
if (!mergeView) return;
|
|
292
|
+
const editor = mergeView.a;
|
|
293
|
+
editor.dispatch({ changes: {
|
|
294
|
+
from: 0,
|
|
295
|
+
to: editor.state.doc.length,
|
|
296
|
+
insert: text
|
|
297
|
+
} });
|
|
298
|
+
});
|
|
299
|
+
cleanups.push(stop);
|
|
300
|
+
}
|
|
301
|
+
if (isSignal(modified)) {
|
|
302
|
+
const stop = watch(modified, (text) => {
|
|
303
|
+
if (!mergeView) return;
|
|
304
|
+
const editor = mergeView.b;
|
|
305
|
+
editor.dispatch({ changes: {
|
|
306
|
+
from: 0,
|
|
307
|
+
to: editor.state.doc.length,
|
|
308
|
+
insert: text
|
|
309
|
+
} });
|
|
310
|
+
});
|
|
311
|
+
cleanups.push(stop);
|
|
312
|
+
}
|
|
296
313
|
};
|
|
314
|
+
onUnmount(() => {
|
|
315
|
+
for (const cleanup of cleanups) cleanup();
|
|
316
|
+
mergeView?.destroy();
|
|
317
|
+
mergeView = null;
|
|
318
|
+
});
|
|
297
319
|
const baseStyle = `width: 100%; height: 100%; overflow: hidden; ${props.style ?? ""}`;
|
|
298
320
|
return /* @__PURE__ */ jsx("div", {
|
|
299
321
|
ref: containerRef,
|