weml-monaco 0.11.0 → 0.11.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.
- package/CHANGELOG.md +5 -0
- package/README.md +2 -35
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -8,6 +8,11 @@ This package shares the language logic of the VS Code extension (`weml-support`)
|
|
|
8
8
|
entries below track the port catching up with its provider changes; since the shared language
|
|
9
9
|
features, both take the same code.
|
|
10
10
|
|
|
11
|
+
## [0.11.1] — 2026-10-15
|
|
12
|
+
|
|
13
|
+
### Changed
|
|
14
|
+
- The README is trimmed to what a user of the package needs.
|
|
15
|
+
|
|
11
16
|
## [0.11.0] — 2026-10-14
|
|
12
17
|
|
|
13
18
|
### Added
|
package/README.md
CHANGED
|
@@ -26,7 +26,7 @@ This package does **not** modify the original VS Code extension — it is a
|
|
|
26
26
|
standalone re-implementation living entirely in this package (`packages/weml-monaco` of the
|
|
27
27
|
monorepo).
|
|
28
28
|
|
|
29
|
-
## Install
|
|
29
|
+
## Install
|
|
30
30
|
|
|
31
31
|
```bash
|
|
32
32
|
npm install weml-monaco
|
|
@@ -44,17 +44,6 @@ The package has no runtime dependencies (`node-html-parser`,
|
|
|
44
44
|
| `weml-monaco/editor` | `dist/editor.mjs` | the editor and its workbench (below) |
|
|
45
45
|
| `weml-monaco/react` | `dist/react.mjs` | the editor as a React component |
|
|
46
46
|
|
|
47
|
-
Working on the package itself:
|
|
48
|
-
|
|
49
|
-
```bash
|
|
50
|
-
npm ci # at the repository root (npm workspaces)
|
|
51
|
-
cd packages/weml-monaco
|
|
52
|
-
npm run build # tsup → dist/ (ESM + CJS + IIFE + declarations)
|
|
53
|
-
npm run typecheck # tsc --noEmit
|
|
54
|
-
npm test # build + Node smoke test
|
|
55
|
-
npm run check:package # publint + arethetypeswrong on the packed tarball
|
|
56
|
-
```
|
|
57
|
-
|
|
58
47
|
## Usage
|
|
59
48
|
|
|
60
49
|
Monaco is **passed in** at registration time, so this works no matter how
|
|
@@ -337,7 +326,7 @@ const panel = createWemlPanel(
|
|
|
337
326
|
## The WEML preview
|
|
338
327
|
|
|
339
328
|
A live preview of the editor's document, rendered with
|
|
340
|
-
[`weml-stylesheet`](
|
|
329
|
+
[`weml-stylesheet`](https://github.com/Burjuy/weml-language-vscode-extension/tree/main/packages/weml-stylesheet) — an **optional peer dependency**:
|
|
341
330
|
install it (and load its CSS) to use this entry; nothing else needs it.
|
|
342
331
|
|
|
343
332
|
```ts
|
|
@@ -434,25 +423,3 @@ in VS Code.
|
|
|
434
423
|
The earlier flat DOM toolbar (`createWemlToolbar(monaco, editor, { container,
|
|
435
424
|
onStatus })`) still works and still registers the editor actions, but it is
|
|
436
425
|
deprecated in favour of the WEML panel and gets no new features.
|
|
437
|
-
|
|
438
|
-
## Trying it out
|
|
439
|
-
|
|
440
|
-
The monorepo's dev app, [`storybook/`](../../storybook) (`weml-storybook`)
|
|
441
|
-
(`npm start -w weml-storybook` from the repository root), runs this package from
|
|
442
|
-
its sources in a full editor: completions (Ctrl+Space), hover, "Format
|
|
443
|
-
Document", the outline, diagnostics and the toolbar.
|
|
444
|
-
|
|
445
|
-
## How it relates to the VS Code extension
|
|
446
|
-
|
|
447
|
-
The language logic is shared with the VS Code extensions, not copied — two workspace packages,
|
|
448
|
-
bundled into every build (neither is a runtime dependency):
|
|
449
|
-
|
|
450
|
-
| shared (workspace package) | adapted for Monaco |
|
|
451
|
-
| ------------------------------------ | ---------------------------------------- |
|
|
452
|
-
| `weml-language-core`: schema, structure rules, snippets, entities, markdown text, the language features (diagnostics, hover, completion, outline), tool model, wrap / renumber | `schema/docs.ts` (plain `IMarkdownString`) |
|
|
453
|
-
| `weml-normalizer`: the canonical normalizer | `wemlDocument.ts` (parse cache, offsets ↔ Monaco positions), `providers/*` (the features' data → Monaco provider types), `index.ts` (registration + diagnostics) |
|
|
454
|
-
|
|
455
|
-
The diagnostics, tooltips, suggestions and outline are computed once, in the shared package, as
|
|
456
|
-
plain data with offsets — the VS Code extension and this package only map them to their editor's
|
|
457
|
-
types, so both editors report the same problems and offer the same items. Parsing uses
|
|
458
|
-
`vscode-html-languageservice` (editor-agnostic, runs in the browser and in the worker).
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "weml-monaco",
|
|
3
|
-
"version": "0.11.
|
|
3
|
+
"version": "0.11.1",
|
|
4
4
|
"description": "WEML (White Estate Markup Language) language support for the Monaco editor: syntax highlighting, autocomplete, hover docs, structure diagnostics, outline and canonical formatting.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "commonjs",
|