@markii/stdlib 0.17.0-next.1 → 0.17.0-next.2
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/dist/diagnostics.d.ts +20 -1
- package/dist/index.d.ts +1 -1
- package/package.json +1 -1
package/dist/diagnostics.d.ts
CHANGED
|
@@ -33,11 +33,28 @@
|
|
|
33
33
|
* the fallback box, labeled as a missing view rather than an unknown
|
|
34
34
|
* component. Only reported when the host passed `unavailableComponents`.
|
|
35
35
|
*
|
|
36
|
+
* `'unknown-directive'` — a directive names no registered component and
|
|
37
|
+
* rendered as the unknown-component fallback box. Reported by the terminal
|
|
38
|
+
* engine only, so a host that wants a finding for every unknown directive
|
|
39
|
+
* (the language server) can place it; the other engines draw the same
|
|
40
|
+
* fallback and stay quiet.
|
|
41
|
+
*
|
|
36
42
|
* `'code-renderer-failed'` — a host's `renderCode` callback threw for an
|
|
37
43
|
* ordinary fenced code block; the block rendered as usual. Carries no
|
|
38
44
|
* directive or attribute.
|
|
39
45
|
*/
|
|
40
|
-
export type DiagnosticKind = 'invalid-attribute-value' | 'unsafe-image-src' | 'form-mismatch' | 'no-engine-view' | 'code-renderer-failed';
|
|
46
|
+
export type DiagnosticKind = 'invalid-attribute-value' | 'unsafe-image-src' | 'form-mismatch' | 'no-engine-view' | 'unknown-directive' | 'code-renderer-failed';
|
|
47
|
+
/**
|
|
48
|
+
* Where in the note's source an event happened: the directive's range, in
|
|
49
|
+
* unist coordinates (1-based line, 1-based column, end exclusive). Present
|
|
50
|
+
* only when the engine knows the node the event came from.
|
|
51
|
+
*/
|
|
52
|
+
export interface DiagnosticPosition {
|
|
53
|
+
readonly startLine: number;
|
|
54
|
+
readonly startColumn: number;
|
|
55
|
+
readonly endLine: number;
|
|
56
|
+
readonly endColumn: number;
|
|
57
|
+
}
|
|
41
58
|
export interface DiagnosticEvent {
|
|
42
59
|
readonly kind: DiagnosticKind;
|
|
43
60
|
/** The directive name the event happened on, when there is a single unambiguous one. */
|
|
@@ -46,6 +63,8 @@ export interface DiagnosticEvent {
|
|
|
46
63
|
readonly attribute?: string;
|
|
47
64
|
/** The same human-readable text the in-page marker's tooltip carries. */
|
|
48
65
|
readonly message: string;
|
|
66
|
+
/** The source range of the directive the event came from, when the engine can say. */
|
|
67
|
+
readonly position?: DiagnosticPosition;
|
|
49
68
|
}
|
|
50
69
|
export type OnDiagnostic = (event: DiagnosticEvent) => void;
|
|
51
70
|
/**
|
package/dist/index.d.ts
CHANGED
|
@@ -3,5 +3,5 @@ export { ALIGN_PRESETS, LAYOUT_ATTRIBUTE_KEYS, LAYOUT_ATTRIBUTES, WIDTH_PRESETS,
|
|
|
3
3
|
export { TEXT_ALIGN_ATTRIBUTE, TEXT_ALIGN_COMPONENTS, TEXT_ALIGN_PRESETS, type TextAlignPreset, } from './text-align.js';
|
|
4
4
|
export { formatValue, isNumericLike, FORMAT_ATTRIBUTE, DECIMALS_ATTRIBUTE, type ValueFormat, } from './value-format.js';
|
|
5
5
|
export { deriveTableShape, type TableShape } from './table-shape.js';
|
|
6
|
-
export { reportDiagnostic, createUnavailableComponentLookup, type UnavailableComponent, type UnavailableComponentLookup, type DiagnosticEvent, type DiagnosticKind, type OnDiagnostic, } from './diagnostics.js';
|
|
6
|
+
export { reportDiagnostic, createUnavailableComponentLookup, type UnavailableComponent, type UnavailableComponentLookup, type DiagnosticEvent, type DiagnosticPosition, type DiagnosticKind, type OnDiagnostic, } from './diagnostics.js';
|
|
7
7
|
export { INTERACTIVE_ATTRIBUTE } from './interactive.js';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@markii/stdlib",
|
|
3
|
-
"version": "0.17.0-next.
|
|
3
|
+
"version": "0.17.0-next.2",
|
|
4
4
|
"description": "Neutral, framework-agnostic standard component contracts for Mark (.mk.md) — the kind/attribute-schema seam every renderer (e.g. @markii/react) implements against. No React, zero dependencies.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"markdown",
|