@markii/ansi 0.17.0-next.5 → 0.17.0-next.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/dist/index.d.ts +4 -10
- package/dist/index.js +8 -10
- package/dist/render.js +4 -1
- package/package.json +5 -5
package/dist/index.d.ts
CHANGED
|
@@ -1,17 +1,11 @@
|
|
|
1
1
|
export { renderMarkToAnsi, renderMarkNodeToAnsi, renderMarkInlineToAnsi, buildMarkElement, type RenderCode, type RenderCodeBlock, type RenderMarkOptions, } from './render.js';
|
|
2
|
-
export {
|
|
2
|
+
export { detectColorLevel, resolveColorOption, type ColorLevel, type ColorOption, } from './ansi.js';
|
|
3
3
|
export { defaultAnsiTheme, type AnsiTheme, type Tier1Token } from './theme.js';
|
|
4
|
-
export {
|
|
5
|
-
export {
|
|
6
|
-
export { createAnsiRegistry, mergeAnsiRegistries, registryAliases, readRegistryComponent, resolveDirectiveAlias, childrenText, REGISTRY_ALIASES, type DirectiveAttributes, type AnsiRegistry, type AnsiRegistryEntry, type AnsiComponent, type AnsiComponentProps, type AnsiRenderContext, type RegistryAlias, type RegistryAliases, type ResolvedDirective, type ValueResolution, } from './registry.js';
|
|
7
|
-
export { resolveStorePath, resolveScopedPath, VAULT_NAME_PREFIX, type StorePathResolution, type ValueScope, } from './resolve.js';
|
|
8
|
-
export { failurePhrase, failureTitle, failureToken, dataStateSuffix, emptyInlineTitle, invalidAttributeValueLabel, invalidAttributeValueTitle, unsafeImageSrcLabel, unsafeImageSrcTitle, } from './failure-presentation.js';
|
|
9
|
-
export { stringifyStoredValue } from './value-format.js';
|
|
10
|
-
export { stripControlCharacters, sanitizeBlockText, sanitizeUrlText, BLOCK_TAB_WIDTH, } from './sanitize.js';
|
|
11
|
-
export { resolveLayoutAttributes, applyLayout, LAYOUT_ATTRIBUTE_KEYS, type ResolvedLayoutAttributes, type ResolvedLayoutPresets, type WidthPreset, type AlignPreset, } from './layout.js';
|
|
4
|
+
export type { BoxStyle, GlyphSet } from './glyphs.js';
|
|
5
|
+
export type { DirectiveAttributes, AnsiRegistry, AnsiRegistryEntry, AnsiComponent, AnsiComponentProps, AnsiRenderContext, ValueResolution, } from './registry.js';
|
|
12
6
|
export { type ResolveImageSrc } from './image-resolve.js';
|
|
13
7
|
export { type ResolveHref } from './href-resolve.js';
|
|
14
8
|
export type { AnsiValueStore, AnsiVaultStore, FailureKind, StoredValue, ValueStatus, } from './value-types.js';
|
|
15
9
|
export { defaultAnsiRegistry } from './components/index.js';
|
|
16
|
-
export {
|
|
10
|
+
export { installAnsiPacks, type AnsiPackComponentModules, type AnsiPackToInstall, type InstallAnsiPacksResult, } from './pack-loader.js';
|
|
17
11
|
export { loadTerminalPackScript, installTerminalPackGlobals, TERMINAL_REGISTER_GLOBAL, TERMINAL_REACT_GLOBAL, TERMINAL_INK_GLOBAL, type LoadTerminalPackScriptResult, } from './pack-script.js';
|
package/dist/index.js
CHANGED
|
@@ -4,17 +4,15 @@
|
|
|
4
4
|
// wants text with no HTML runtime — plus, for a live viewer, the Ink element
|
|
5
5
|
// tree itself (`buildMarkElement`). It is a third platform renderer alongside
|
|
6
6
|
// @markii/html and @markii/react.
|
|
7
|
+
//
|
|
8
|
+
// This entry is the package's semver promise: the render entry points, the
|
|
9
|
+
// registry and pack-loading seam, the types a pack's terminal view names, and
|
|
10
|
+
// the `TERMINAL_*_GLOBAL` names that form the terminal pack ABI. The escape
|
|
11
|
+
// helpers, failure wording, sanitizers and layout helpers stay inside the
|
|
12
|
+
// package.
|
|
7
13
|
export { renderMarkToAnsi, renderMarkNodeToAnsi, renderMarkInlineToAnsi, buildMarkElement, } from './render.js';
|
|
8
|
-
export {
|
|
14
|
+
export { detectColorLevel, resolveColorOption, } from './ansi.js';
|
|
9
15
|
export { defaultAnsiTheme } from './theme.js';
|
|
10
|
-
export { BOX_STYLES, isBoxStyle, glyphsFor, } from './glyphs.js';
|
|
11
|
-
export { style } from './style.js';
|
|
12
|
-
export { createAnsiRegistry, mergeAnsiRegistries, registryAliases, readRegistryComponent, resolveDirectiveAlias, childrenText, REGISTRY_ALIASES, } from './registry.js';
|
|
13
|
-
export { resolveStorePath, resolveScopedPath, VAULT_NAME_PREFIX, } from './resolve.js';
|
|
14
|
-
export { failurePhrase, failureTitle, failureToken, dataStateSuffix, emptyInlineTitle, invalidAttributeValueLabel, invalidAttributeValueTitle, unsafeImageSrcLabel, unsafeImageSrcTitle, } from './failure-presentation.js';
|
|
15
|
-
export { stringifyStoredValue } from './value-format.js';
|
|
16
|
-
export { stripControlCharacters, sanitizeBlockText, sanitizeUrlText, BLOCK_TAB_WIDTH, } from './sanitize.js';
|
|
17
|
-
export { resolveLayoutAttributes, applyLayout, LAYOUT_ATTRIBUTE_KEYS, } from './layout.js';
|
|
18
16
|
export { defaultAnsiRegistry } from './components/index.js';
|
|
19
|
-
export {
|
|
17
|
+
export { installAnsiPacks, } from './pack-loader.js';
|
|
20
18
|
export { loadTerminalPackScript, installTerminalPackGlobals, TERMINAL_REGISTER_GLOBAL, TERMINAL_REACT_GLOBAL, TERMINAL_INK_GLOBAL, } from './pack-script.js';
|
package/dist/render.js
CHANGED
|
@@ -436,8 +436,11 @@ function renderDirectiveContentString(name, kind, isBlock, attributes, childrenT
|
|
|
436
436
|
const label = invalidAttributeValueLabel(name, invalidEnum.attribute);
|
|
437
437
|
rendered = `${rendered}${markerSeparator}${dim(`[${label}]`, wctx.color)}`;
|
|
438
438
|
}
|
|
439
|
+
// The same rule as the other engines: no content and no attributes. A
|
|
440
|
+
// component given attributes draws from them and is not flagged.
|
|
439
441
|
if (isRegisteredInline(entry) &&
|
|
440
|
-
safeChildrenText(childrenText).trim() === ''
|
|
442
|
+
safeChildrenText(childrenText).trim() === '' &&
|
|
443
|
+
Object.keys(attributes).length === 0) {
|
|
441
444
|
reportDiagnostic(wctx.onDiagnostic, {
|
|
442
445
|
kind: 'empty-inline',
|
|
443
446
|
directive: name,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@markii/ansi",
|
|
3
|
-
"version": "0.17.0-next.
|
|
3
|
+
"version": "0.17.0-next.6",
|
|
4
4
|
"description": "The terminal renderer for Markii (.mk.md): a registry-driven hast-to-terminal engine built on Ink. Renders a note once as a string with optional color, for a pipe or a log, or as a live Ink tree a host can mount.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"markdown",
|
|
@@ -51,15 +51,15 @@
|
|
|
51
51
|
"regenerate:fixtures": "npm run build:dist && node scripts/regenerate-ansi-fixtures.ts"
|
|
52
52
|
},
|
|
53
53
|
"dependencies": {
|
|
54
|
-
"@markii/core": "^0.17.0-next.
|
|
55
|
-
"@markii/pack": "^0.17.0-next.
|
|
56
|
-
"@markii/stdlib": "^0.17.0-next.
|
|
54
|
+
"@markii/core": "^0.17.0-next.6",
|
|
55
|
+
"@markii/pack": "^0.17.0-next.6",
|
|
56
|
+
"@markii/stdlib": "^0.17.0-next.6",
|
|
57
57
|
"ink": "^7.1.1",
|
|
58
58
|
"react": "^19.2.0"
|
|
59
59
|
},
|
|
60
60
|
"devDependencies": {
|
|
61
61
|
"@types/hast": "^3.0.4",
|
|
62
|
-
"@markii/runtime": "^0.17.0-next.
|
|
62
|
+
"@markii/runtime": "^0.17.0-next.6",
|
|
63
63
|
"@types/react": "^19.2.0"
|
|
64
64
|
}
|
|
65
65
|
}
|