@coldsmirk/inkstone-core 0.30.0 → 0.31.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/dist/index.d.ts +15 -15
  2. package/package.json +4 -4
package/dist/index.d.ts CHANGED
@@ -6,7 +6,7 @@ import { Awaitable, HighlighterCore, HighlighterCore as HighlighterCore$1, Langu
6
6
  * Monaco reads it as a construction-option default, CodeMirror through the chrome theme —
7
7
  * one token, one look across both editors.
8
8
  */
9
- declare const CODE_FONT_FAMILY = "var(--inkstone-font-family-code, ui-monospace, SFMono-Regular, Menlo, Consolas, monospace)";
9
+ export declare const CODE_FONT_FAMILY = "var(--inkstone-font-family-code, ui-monospace, SFMono-Regular, Menlo, Consolas, monospace)";
10
10
  //#endregion
11
11
  //#region src/editor-colors.d.ts
12
12
  /**
@@ -114,7 +114,7 @@ interface EditorColorsConfig {
114
114
  * palette) are untouched, only the theme colors behind each configured role change. Returns
115
115
  * the theme itself when there is nothing to apply.
116
116
  */
117
- declare function withEditorColors(theme: ThemeRegistration, colors: EditorColors | undefined): ThemeRegistration;
117
+ export declare function withEditorColors(theme: ThemeRegistration, colors: EditorColors | undefined): ThemeRegistration;
118
118
  //#endregion
119
119
  //#region src/host-tokens.d.ts
120
120
  /**
@@ -127,7 +127,7 @@ type RadiusSize = "small" | "medium" | "large" | "xlarge";
127
127
  /**
128
128
  * A `var()` reference to the host's `--inkstone-radius-<size>` token with the given fallback.
129
129
  */
130
- declare function inkstoneRadius(size: RadiusSize, fallback: string): string;
130
+ export declare function inkstoneRadius(size: RadiusSize, fallback: string): string;
131
131
  /**
132
132
  * The elevation sizes floating chrome reads from the host: `--inkstone-shadow-<size>`, a full
133
133
  * `box-shadow` value. Same contract as the radii: Monaco maps them onto VS Code's
@@ -138,23 +138,23 @@ type ShadowSize = "medium" | "large" | "xlarge";
138
138
  /**
139
139
  * A `var()` reference to the host's `--inkstone-shadow-<size>` token with the given fallback.
140
140
  */
141
- declare function inkstoneShadow(size: ShadowSize, fallback: string): string;
141
+ export declare function inkstoneShadow(size: ShadowSize, fallback: string): string;
142
142
  //#endregion
143
143
  //#region src/shiki.d.ts
144
144
  /**
145
145
  * Shiki theme id inkstone editors use in light mode.
146
146
  */
147
- declare const INKSTONE_LIGHT_THEME = "catppuccin-latte";
147
+ export declare const INKSTONE_LIGHT_THEME = "catppuccin-latte";
148
148
  /**
149
149
  * Shiki theme id inkstone editors use in dark mode.
150
150
  */
151
- declare const INKSTONE_DARK_THEME = "catppuccin-macchiato";
151
+ export declare const INKSTONE_DARK_THEME = "catppuccin-macchiato";
152
152
  /**
153
153
  * The grammars the shared highlighter loads when {@link configureHighlighter} is not called:
154
154
  * JavaScript / TypeScript / JSON / SQL — the set the coldsmirk apps actually edit and render.
155
155
  * Spread these when adding a grammar: `configureHighlighter({ langs: [...DEFAULT_HIGHLIGHTER_LANGS, yaml] })`.
156
156
  */
157
- declare const DEFAULT_HIGHLIGHTER_LANGS: readonly LanguageInput[];
157
+ export declare const DEFAULT_HIGHLIGHTER_LANGS: readonly LanguageInput[];
158
158
  interface HighlighterConfig {
159
159
  /**
160
160
  * Grammars to load, replacing {@link DEFAULT_HIGHLIGHTER_LANGS}.
@@ -196,7 +196,7 @@ interface HighlighterConfig {
196
196
  * `fetch("/onig.wasm")` for a deployment that would rather stream-compile the binary than
197
197
  * decode it out of a script.
198
198
  */
199
- declare function onigurumaEngine(wasm?: LoadWasmOptions): Promise<RegexEngine>;
199
+ export declare function onigurumaEngine(wasm?: LoadWasmOptions): Promise<RegexEngine>;
200
200
  /**
201
201
  * The regex engine a highlighter built elsewhere from the shared one's grammars tokenizes
202
202
  * with, to tokenize as the shared one does: `javascript`, the strict JavaScript engine, where
@@ -224,14 +224,14 @@ interface HighlighterSources {
224
224
  * What the shared highlighter was built from and has loaded since (see
225
225
  * {@link HighlighterSources}); undefined for a highlighter inkstone did not build.
226
226
  */
227
- declare function highlighterSources(highlighter: HighlighterCore$1): HighlighterSources | undefined;
227
+ export declare function highlighterSources(highlighter: HighlighterCore$1): HighlighterSources | undefined;
228
228
  /**
229
229
  * Configure the shared highlighter before its first use. The highlighter is a process-wide
230
230
  * singleton (editors, static rendering, and markdown surfaces all share it for consistent
231
231
  * colors), so configuration is process-global too and must happen before the first
232
232
  * {@link getHighlighter} call — afterwards the instance is already built and this throws.
233
233
  */
234
- declare function configureHighlighter(options: HighlighterConfig): void;
234
+ export declare function configureHighlighter(options: HighlighterConfig): void;
235
235
  /**
236
236
  * Paint the editors in the host's own colors, once, before the first {@link getHighlighter}
237
237
  * call — the catppuccin pair is registered with these colors baked in (Monaco reads them from
@@ -244,12 +244,12 @@ declare function configureHighlighter(options: HighlighterConfig): void;
244
244
  * theme colors as hex and paints red for anything else, a custom property reference or an
245
245
  * `rgb(…)` alike, so those are refused here instead of failing on screen.
246
246
  */
247
- declare function configureEditorColors(config: EditorColorsConfig): void;
247
+ export declare function configureEditorColors(config: EditorColorsConfig): void;
248
248
  /**
249
249
  * The editor colors configured for a color scheme through {@link configureEditorColors}, or
250
250
  * undefined when the flavor's own colors stand.
251
251
  */
252
- declare function getEditorColors(dark: boolean): EditorColors | undefined;
252
+ export declare function getEditorColors(dark: boolean): EditorColors | undefined;
253
253
  /**
254
254
  * The shared Shiki highlighter, built lazily on first call.
255
255
  *
@@ -266,11 +266,11 @@ declare function getEditorColors(dark: boolean): EditorColors | undefined;
266
266
  * The highlighter keeps what it was built from and every grammar loaded into it since, for a
267
267
  * highlighter of the same grammars built elsewhere ({@link highlighterSources}).
268
268
  */
269
- declare function getHighlighter(): Promise<HighlighterCore$1>;
269
+ export declare function getHighlighter(): Promise<HighlighterCore$1>;
270
270
  /**
271
271
  * The Shiki theme id for a color scheme — {@link INKSTONE_DARK_THEME} when `dark`, else
272
272
  * {@link INKSTONE_LIGHT_THEME}.
273
273
  */
274
- declare function shikiThemeId(dark: boolean): string;
274
+ export declare function shikiThemeId(dark: boolean): string;
275
275
  //#endregion
276
- export { CODE_FONT_FAMILY, DEFAULT_HIGHLIGHTER_LANGS, type EditorColors, type EditorColorsConfig, type HighlighterConfig, type HighlighterCore, type HighlighterEngineKind, type HighlighterSources, INKSTONE_DARK_THEME, INKSTONE_LIGHT_THEME, type RadiusSize, type ShadowSize, configureEditorColors, configureHighlighter, getEditorColors, getHighlighter, highlighterSources, inkstoneRadius, inkstoneShadow, onigurumaEngine, shikiThemeId, withEditorColors };
276
+ export type { EditorColors, EditorColorsConfig, HighlighterConfig, HighlighterCore, HighlighterEngineKind, HighlighterSources, RadiusSize, ShadowSize };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@coldsmirk/inkstone-core",
3
- "version": "0.30.0",
3
+ "version": "0.31.0",
4
4
  "description": "Shared Shiki highlighter service for the inkstone editor toolkit: one fine-grained singleton (catppuccin themes, the JS regex engine by default or Oniguruma on request) reused by Monaco, static rendering, and markdown surfaces.",
5
5
  "keywords": [
6
6
  "shiki",
@@ -34,9 +34,9 @@
34
34
  "dist"
35
35
  ],
36
36
  "dependencies": {
37
- "@shikijs/langs": "^4.4.3",
38
- "@shikijs/themes": "^4.4.3",
39
- "shiki": "^4.4.3"
37
+ "@shikijs/langs": "^4.5.0",
38
+ "@shikijs/themes": "^4.5.0",
39
+ "shiki": "^4.5.0"
40
40
  },
41
41
  "engines": {
42
42
  "node": ">=24"