@coldsmirk/inkstone-react 0.28.0 → 0.29.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.
Files changed (2) hide show
  1. package/README.md +2 -2
  2. package/package.json +4 -4
package/README.md CHANGED
@@ -52,7 +52,7 @@ import { CodeMirrorEditor } from "@coldsmirk/inkstone-react/codemirror";
52
52
  />;
53
53
  ```
54
54
 
55
- A controlled CM6 editor: create-once view, external value changes reconcile without resetting cursor/undo, catppuccin latte/macchiato flipped by `dark`, and restyled chrome (completion tooltip with a currentColor SVG icon set, hover / lint tooltips on the same frame with severity bars in flavor colors, themed scrollbars, real search-panel metrics).
55
+ A controlled CM6 editor: create-once view, external value changes reconcile without resetting cursor/undo, catppuccin latte/macchiato flipped by `dark`, and restyled chrome (completion tooltip with a currentColor SVG icon set, hover / lint tooltips on the same frame, each diagnostic led by its severity's mark in flavor colors, themed scrollbars, real search-panel metrics).
56
56
 
57
57
  - **`language`** lazily imports the matching grammar as its own chunk — the official Lezer parsers plus the `@codemirror/legacy-modes` catalog (`shell`, `dockerfile`, `ini` / `env`, `toml`, `nginx`, …). Includes the MiniJinja family — `minijinja` standalone or `minijinja-<host>` mixed variants (`minijinja-yaml`, `-json`, `-html`, `-sql`, `-shell`, `-dockerfile`, …).
58
58
  - **`context`** — pass `{ schema }` (JSON Schema) or `{ sample }` (representative value) and MiniJinja completion suggests the render context's variables with member access. Memoize/hoist it — a fresh identity each render re-normalizes.
@@ -61,7 +61,7 @@ A controlled CM6 editor: create-once view, external value changes reconcile with
61
61
  - **Metrics & layout** — `fontSize` 14 and `lineHeight` 1.6 by default; `height` / `width` size the editor; `lineWrapping`, `showLineNumbers`, `folding` are opt-in.
62
62
  - **Accessibility** — the textbox defaults to `ariaLabel="Editor content"`; pass a workflow-specific `ariaLabel` when needed. Focus presentation belongs to the surrounding application chrome.
63
63
  - **Extensions** — `extensions` is create-once; `dynamicExtensions` reconfigures live. The catppuccin theme sits at low precedence, so a caller theme in `dynamicExtensions` overrides it.
64
- - **Surfaces & tokens** — to paint both editors' chrome in your design language, configure `@coldsmirk/inkstone-core`'s `configureEditorSurface` once before the first editor mounts (per-scheme colors for background, current line, line numbers, caret, selection, scrollbars, floating widgets and their text, the accent, diagnostics) and declare `--inkstone-radius-*` / `--inkstone-shadow-*` on your root; the syntax palette stays catppuccin's.
64
+ - **Editor colors & tokens** — to paint both editors' chrome in your design language, configure `@coldsmirk/inkstone-core`'s `configureEditorColors` once before the first editor mounts (per-scheme colors for background, current line, line numbers, caret, selection, scrollbars, floating widgets and their text, the accent, diagnostics) and declare `--inkstone-radius-*` / `--inkstone-shadow-*` on your root; the syntax palette stays catppuccin's.
65
65
 
66
66
  `useShikiHighlighter` is exported from `@coldsmirk/inkstone-react/shiki`; `codeMirrorLanguages` / `normalizeContext` / `searchPhrasesZhCn` live on the CodeMirror entry, and `monacoLanguages` lives on the Monaco entry. The aggregate root re-exports them for compatibility.
67
67
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@coldsmirk/inkstone-react",
3
- "version": "0.28.0",
3
+ "version": "0.29.0",
4
4
  "description": "Drop-in React code editors: a preconfigured Monaco <MonacoEditor> (offline workers, Shiki catppuccin themes, dark switching, opt-in zh-CN UI) and a controlled CodeMirror 6 <CodeMirrorEditor> (catppuccin themes, dark switching, sizing).",
5
5
  "keywords": [
6
6
  "react",
@@ -48,9 +48,9 @@
48
48
  ],
49
49
  "dependencies": {
50
50
  "@monaco-editor/react": "^4.7.0",
51
- "@coldsmirk/inkstone-codemirror": "^0.28.0",
52
- "@coldsmirk/inkstone-core": "^0.28.0",
53
- "@coldsmirk/inkstone-monaco": "^0.28.0"
51
+ "@coldsmirk/inkstone-codemirror": "^0.29.0",
52
+ "@coldsmirk/inkstone-core": "^0.29.0",
53
+ "@coldsmirk/inkstone-monaco": "^0.29.0"
54
54
  },
55
55
  "devDependencies": {
56
56
  "@codemirror/autocomplete": "^6.20.3",