@opentui/core 0.1.90 → 0.1.92
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/3d.js +3 -4
- package/3d.js.map +3 -3
- package/NativeSpanFeed.d.ts +2 -2
- package/buffer.d.ts +2 -2
- package/{index-dwq2qe5p.js → index-j5fb4966.js} +3 -3
- package/index-j5fb4966.js.map +10 -0
- package/{index-k03avn41.js → index-jdn8a604.js} +27 -4
- package/{index-k03avn41.js.map → index-jdn8a604.js.map} +10 -10
- package/{index-e89anq5x.js → index-mdxq0qtt.js} +10 -10
- package/{index-e89anq5x.js.map → index-mdxq0qtt.js.map} +12 -12
- package/index.js +2 -2
- package/lib/detect-links.d.ts +2 -2
- package/lib/stdin-parser.d.ts +5 -5
- package/lib/terminal-palette.d.ts +1 -1
- package/lib/tree-sitter/default-parsers.d.ts +1 -1
- package/package.json +7 -7
- package/parser.worker.js +16 -21
- package/parser.worker.js.map +3 -3
- package/plugins/core-slot.d.ts +5 -5
- package/plugins/registry.d.ts +6 -2
- package/plugins/types.d.ts +1 -1
- package/post/effects.d.ts +1 -1
- package/renderables/TextTable.d.ts +7 -7
- package/renderables/TimeToFirstDraw.d.ts +4 -4
- package/runtime-plugin-support.d.ts +1 -1
- package/runtime-plugin-support.js +3 -3
- package/runtime-plugin-support.js.map +1 -1
- package/runtime-plugin.js +3 -3
- package/testing/manual-clock.d.ts +1 -1
- package/testing.js +1 -1
- package/index-dwq2qe5p.js.map +0 -10
package/NativeSpanFeed.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { type Pointer } from "bun:ffi";
|
|
2
|
-
import type { NativeSpanFeedOptions } from "./zig-structs";
|
|
3
|
-
export type { GrowthPolicy, NativeSpanFeedOptions, NativeSpanFeedStats } from "./zig-structs";
|
|
2
|
+
import type { NativeSpanFeedOptions } from "./zig-structs.js";
|
|
3
|
+
export type { GrowthPolicy, NativeSpanFeedOptions, NativeSpanFeedStats } from "./zig-structs.js";
|
|
4
4
|
export type DataHandler = (data: Uint8Array) => void | Promise<void>;
|
|
5
5
|
/**
|
|
6
6
|
* Zero-copy wrapper over Zig memory; not a full stream interface.
|
package/buffer.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { RGBA } from "./lib";
|
|
2
|
-
import { type RenderLib } from "./zig";
|
|
1
|
+
import { RGBA } from "./lib/index.js";
|
|
2
|
+
import { type RenderLib } from "./zig.js";
|
|
3
3
|
import { type Pointer } from "bun:ffi";
|
|
4
4
|
import { type BorderStyle, type BorderSides } from "./lib/index.js";
|
|
5
5
|
import { TargetChannel, type WidthMethod, type CapturedLine } from "./types.js";
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
// @bun
|
|
2
2
|
import {
|
|
3
3
|
exports_src
|
|
4
|
-
} from "./index-
|
|
4
|
+
} from "./index-jdn8a604.js";
|
|
5
5
|
import {
|
|
6
6
|
__require
|
|
7
|
-
} from "./index-
|
|
7
|
+
} from "./index-mdxq0qtt.js";
|
|
8
8
|
|
|
9
9
|
// src/runtime-plugin.ts
|
|
10
10
|
var CORE_RUNTIME_SPECIFIER = "@opentui/core";
|
|
@@ -185,4 +185,4 @@ function createRuntimePlugin(input = {}) {
|
|
|
185
185
|
export { isCoreRuntimeModuleSpecifier, runtimeModuleIdForSpecifier, createRuntimePlugin };
|
|
186
186
|
|
|
187
187
|
//# debugId=320B34A5E2C7118F64756E2164756E21
|
|
188
|
-
//# sourceMappingURL=index-
|
|
188
|
+
//# sourceMappingURL=index-j5fb4966.js.map
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../src/runtime-plugin.ts"],
|
|
4
|
+
"sourcesContent": [
|
|
5
|
+
"import { type BunPlugin } from \"bun\"\nimport * as coreRuntime from \"./index.js\"\n\nexport type RuntimeModuleExports = Record<string, unknown>\nexport type RuntimeModuleLoader = () => RuntimeModuleExports | Promise<RuntimeModuleExports>\nexport type RuntimeModuleEntry = RuntimeModuleExports | RuntimeModuleLoader\n\nexport interface CreateRuntimePluginOptions {\n core?: RuntimeModuleEntry\n additional?: Record<string, RuntimeModuleEntry>\n}\n\nconst CORE_RUNTIME_SPECIFIER = \"@opentui/core\"\nconst CORE_TESTING_RUNTIME_SPECIFIER = \"@opentui/core/testing\"\nconst RUNTIME_MODULE_PREFIX = \"opentui:runtime-module:\"\nconst MAX_RUNTIME_RESOLVE_PARENTS = 64\n\nconst DEFAULT_CORE_RUNTIME_MODULE_SPECIFIERS = [CORE_RUNTIME_SPECIFIER, CORE_TESTING_RUNTIME_SPECIFIER] as const\n\nconst DEFAULT_CORE_RUNTIME_MODULE_SPECIFIER_SET = new Set<string>(DEFAULT_CORE_RUNTIME_MODULE_SPECIFIERS)\n\nexport const isCoreRuntimeModuleSpecifier = (specifier: string): boolean => {\n return DEFAULT_CORE_RUNTIME_MODULE_SPECIFIER_SET.has(specifier)\n}\n\nconst loadCoreTestingRuntimeModule = async (): Promise<RuntimeModuleExports> => {\n return (await import(\"./testing.js\")) as RuntimeModuleExports\n}\n\nconst escapeRegExp = (value: string): string => {\n return value.replace(/[.*+?^${}()|[\\]\\\\]/g, \"\\\\$&\")\n}\n\nconst exactSpecifierFilter = (specifier: string): RegExp => {\n return new RegExp(`^${escapeRegExp(specifier)}$`)\n}\n\nexport const runtimeModuleIdForSpecifier = (specifier: string): string => {\n return `${RUNTIME_MODULE_PREFIX}${encodeURIComponent(specifier)}`\n}\n\nconst resolveRuntimeModuleExports = async (moduleEntry: RuntimeModuleEntry): Promise<RuntimeModuleExports> => {\n if (typeof moduleEntry === \"function\") {\n return await moduleEntry()\n }\n\n return moduleEntry\n}\n\nconst sourcePath = (path: string): string => {\n const searchIndex = path.indexOf(\"?\")\n const hashIndex = path.indexOf(\"#\")\n const end = [searchIndex, hashIndex].filter((index) => index >= 0).sort((a, b) => a - b)[0]\n return end === undefined ? path : path.slice(0, end)\n}\n\nconst runtimeLoaderForPath = (path: string): \"js\" | \"ts\" | \"jsx\" | \"tsx\" | null => {\n const cleanPath = sourcePath(path)\n\n if (cleanPath.endsWith(\".tsx\")) {\n return \"tsx\"\n }\n\n if (cleanPath.endsWith(\".jsx\")) {\n return \"jsx\"\n }\n\n if (cleanPath.endsWith(\".ts\") || cleanPath.endsWith(\".mts\") || cleanPath.endsWith(\".cts\")) {\n return \"ts\"\n }\n\n if (cleanPath.endsWith(\".js\") || cleanPath.endsWith(\".mjs\") || cleanPath.endsWith(\".cjs\")) {\n return \"js\"\n }\n\n return null\n}\n\nconst runtimeSourceFilter = /^(?!.*(?:\\/|\\\\)node_modules(?:\\/|\\\\)).*\\.(?:[cm]?js|[cm]?ts|jsx|tsx)(?:[?#].*)?$/\n\nconst resolveImportSpecifierPatterns = [\n /(from\\s+[\"'])([^\"']+)([\"'])/g,\n /(import\\s+[\"'])([^\"']+)([\"'])/g,\n /(import\\s*\\(\\s*[\"'])([^\"']+)([\"']\\s*\\))/g,\n /(require\\s*\\(\\s*[\"'])([^\"']+)([\"']\\s*\\))/g,\n] as const\n\nconst isBareSpecifier = (specifier: string): boolean => {\n if (specifier.startsWith(\".\") || specifier.startsWith(\"/\") || specifier.startsWith(\"\\\\\")) {\n return false\n }\n\n if (\n specifier.startsWith(\"node:\") ||\n specifier.startsWith(\"bun:\") ||\n specifier.startsWith(\"http:\") ||\n specifier.startsWith(\"https:\") ||\n specifier.startsWith(\"file:\") ||\n specifier.startsWith(\"data:\")\n ) {\n return false\n }\n\n if (specifier.startsWith(RUNTIME_MODULE_PREFIX)) {\n return false\n }\n\n return true\n}\n\nconst registerResolveParent = (resolveParentsByRecency: string[], resolveParent: string): void => {\n const existingIndex = resolveParentsByRecency.indexOf(resolveParent)\n if (existingIndex >= 0) {\n resolveParentsByRecency.splice(existingIndex, 1)\n }\n\n resolveParentsByRecency.push(resolveParent)\n\n if (resolveParentsByRecency.length > MAX_RUNTIME_RESOLVE_PARENTS) {\n resolveParentsByRecency.shift()\n }\n}\n\nconst rewriteImportSpecifiers = (code: string, resolveReplacement: (specifier: string) => string | null): string => {\n let transformedCode = code\n\n for (const pattern of resolveImportSpecifierPatterns) {\n transformedCode = transformedCode.replace(pattern, (fullMatch, prefix, specifier, suffix) => {\n const replacement = resolveReplacement(specifier)\n if (!replacement || replacement === specifier) {\n return fullMatch\n }\n\n return `${prefix}${replacement}${suffix}`\n })\n }\n\n return transformedCode\n}\n\nconst resolveFromParent = (specifier: string, parent: string): string | null => {\n try {\n const resolvedSpecifier = import.meta.resolve(specifier, parent)\n if (\n resolvedSpecifier === specifier ||\n resolvedSpecifier.startsWith(\"node:\") ||\n resolvedSpecifier.startsWith(\"bun:\")\n ) {\n return null\n }\n\n return resolvedSpecifier\n } catch {\n return null\n }\n}\n\nconst rewriteImportsFromResolveParents = (code: string, resolveParentsByRecency: string[]): string => {\n if (resolveParentsByRecency.length === 0) {\n return code\n }\n\n const resolveFromParents = (specifier: string): string | null => {\n if (!isBareSpecifier(specifier)) {\n return null\n }\n\n for (let index = resolveParentsByRecency.length - 1; index >= 0; index -= 1) {\n const resolveParent = resolveParentsByRecency[index]\n const resolvedSpecifier = resolveFromParent(specifier, resolveParent)\n if (resolvedSpecifier) {\n return resolvedSpecifier\n }\n }\n\n return null\n }\n\n return rewriteImportSpecifiers(code, resolveFromParents)\n}\n\nconst rewriteRuntimeSpecifiers = (code: string, runtimeModuleIdsBySpecifier: Map<string, string>): string => {\n return rewriteImportSpecifiers(code, (specifier) => {\n const runtimeModuleId = runtimeModuleIdsBySpecifier.get(specifier)\n return runtimeModuleId ?? null\n })\n}\n\nexport function createRuntimePlugin(input: CreateRuntimePluginOptions = {}): BunPlugin {\n const runtimeModules = new Map<string, RuntimeModuleEntry>()\n runtimeModules.set(CORE_RUNTIME_SPECIFIER, input.core ?? (coreRuntime as RuntimeModuleExports))\n runtimeModules.set(CORE_TESTING_RUNTIME_SPECIFIER, loadCoreTestingRuntimeModule)\n\n for (const [specifier, moduleEntry] of Object.entries(input.additional ?? {})) {\n runtimeModules.set(specifier, moduleEntry)\n }\n\n const runtimeModuleIdsBySpecifier = new Map<string, string>()\n for (const specifier of runtimeModules.keys()) {\n runtimeModuleIdsBySpecifier.set(specifier, runtimeModuleIdForSpecifier(specifier))\n }\n\n return {\n name: \"bun-plugin-opentui-runtime-modules\",\n setup: (build) => {\n const resolveParentsByRecency: string[] = []\n\n for (const [specifier, moduleEntry] of runtimeModules.entries()) {\n const moduleId = runtimeModuleIdsBySpecifier.get(specifier)\n\n if (!moduleId) {\n continue\n }\n\n build.module(moduleId, async () => ({\n exports: await resolveRuntimeModuleExports(moduleEntry),\n loader: \"object\",\n }))\n\n build.onResolve({ filter: exactSpecifierFilter(specifier) }, () => ({ path: moduleId }))\n }\n\n build.onLoad({ filter: runtimeSourceFilter }, async (args) => {\n const path = sourcePath(args.path)\n const loader = runtimeLoaderForPath(args.path)\n if (!loader) {\n throw new Error(`Unable to determine runtime loader for path: ${args.path}`)\n }\n\n const file = Bun.file(path)\n const contents = await file.text()\n const runtimeRewrittenContents = rewriteRuntimeSpecifiers(contents, runtimeModuleIdsBySpecifier)\n\n if (runtimeRewrittenContents !== contents) {\n registerResolveParent(resolveParentsByRecency, path)\n }\n\n const transformedContents = rewriteImportsFromResolveParents(runtimeRewrittenContents, resolveParentsByRecency)\n\n return {\n contents: transformedContents,\n loader,\n }\n })\n },\n }\n}\n"
|
|
6
|
+
],
|
|
7
|
+
"mappings": ";;;;;;;;;AAYA,IAAM,yBAAyB;AAC/B,IAAM,iCAAiC;AACvC,IAAM,wBAAwB;AAC9B,IAAM,8BAA8B;AAEpC,IAAM,yCAAyC,CAAC,wBAAwB,8BAA8B;AAEtG,IAAM,4CAA4C,IAAI,IAAY,sCAAsC;AAEjG,IAAM,+BAA+B,CAAC,cAA+B;AAAA,EAC1E,OAAO,0CAA0C,IAAI,SAAS;AAAA;AAGhE,IAAM,+BAA+B,YAA2C;AAAA,EAC9E,OAAQ,MAAa;AAAA;AAGvB,IAAM,eAA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164756E21",
|
|
9
|
+
"names": []
|
|
10
|
+
}
|
|
@@ -162,7 +162,7 @@ import {
|
|
|
162
162
|
white,
|
|
163
163
|
wrapWithDelegates,
|
|
164
164
|
yellow
|
|
165
|
-
} from "./index-
|
|
165
|
+
} from "./index-mdxq0qtt.js";
|
|
166
166
|
|
|
167
167
|
// src/index.ts
|
|
168
168
|
var exports_src2 = {};
|
|
@@ -2927,6 +2927,8 @@ class SlotRegistry {
|
|
|
2927
2927
|
errorListeners = new Set;
|
|
2928
2928
|
pluginErrors = [];
|
|
2929
2929
|
registrationOrder = 0;
|
|
2930
|
+
batchDepth = 0;
|
|
2931
|
+
batchedNotify = false;
|
|
2930
2932
|
rendererInstance;
|
|
2931
2933
|
hostContext;
|
|
2932
2934
|
options;
|
|
@@ -3050,6 +3052,18 @@ class SlotRegistry {
|
|
|
3050
3052
|
this.errorListeners.delete(listener);
|
|
3051
3053
|
};
|
|
3052
3054
|
}
|
|
3055
|
+
batch(run) {
|
|
3056
|
+
this.batchDepth += 1;
|
|
3057
|
+
try {
|
|
3058
|
+
return run();
|
|
3059
|
+
} finally {
|
|
3060
|
+
this.batchDepth -= 1;
|
|
3061
|
+
if (this.batchDepth === 0 && this.batchedNotify) {
|
|
3062
|
+
this.batchedNotify = false;
|
|
3063
|
+
this.flushListeners();
|
|
3064
|
+
}
|
|
3065
|
+
}
|
|
3066
|
+
}
|
|
3053
3067
|
getPluginErrors() {
|
|
3054
3068
|
return this.pluginErrors;
|
|
3055
3069
|
}
|
|
@@ -3141,6 +3155,13 @@ class SlotRegistry {
|
|
|
3141
3155
|
this.sortedPluginsCache = null;
|
|
3142
3156
|
}
|
|
3143
3157
|
notifyListeners() {
|
|
3158
|
+
if (this.batchDepth > 0) {
|
|
3159
|
+
this.batchedNotify = true;
|
|
3160
|
+
return;
|
|
3161
|
+
}
|
|
3162
|
+
this.flushListeners();
|
|
3163
|
+
}
|
|
3164
|
+
flushListeners() {
|
|
3144
3165
|
for (const listener of this.listeners) {
|
|
3145
3166
|
try {
|
|
3146
3167
|
listener();
|
|
@@ -12589,10 +12610,12 @@ class SelectRenderable extends Renderable {
|
|
|
12589
12610
|
}
|
|
12590
12611
|
}
|
|
12591
12612
|
refreshFrameBuffer() {
|
|
12592
|
-
if (!this.frameBuffer
|
|
12613
|
+
if (!this.frameBuffer)
|
|
12593
12614
|
return;
|
|
12594
12615
|
const bgColor = this._focused ? this._focusedBackgroundColor : this._backgroundColor;
|
|
12595
12616
|
this.frameBuffer.clear(bgColor);
|
|
12617
|
+
if (this._options.length === 0)
|
|
12618
|
+
return;
|
|
12596
12619
|
const contentX = 0;
|
|
12597
12620
|
const contentY = 0;
|
|
12598
12621
|
const contentWidth = this.width;
|
|
@@ -13272,5 +13295,5 @@ class TimeToFirstDrawRenderable extends Renderable {
|
|
|
13272
13295
|
}
|
|
13273
13296
|
export { TextBufferView, EditBuffer, EditorView, convertThemeToStyles, SyntaxStyle, DistortionEffect, VignetteEffect, CloudsEffect, FlamesEffect, CRTRollingBarEffect, RainbowTextEffect, applyScanlines, applyInvert, applyNoise, applyChromaticAberration, applyAsciiArt, applyBrightness, applyGain, applySaturation, BloomEffect, SEPIA_MATRIX, PROTANOPIA_SIM_MATRIX, DEUTERANOPIA_SIM_MATRIX, TRITANOPIA_SIM_MATRIX, ACHROMATOPSIA_MATRIX, PROTANOPIA_COMP_MATRIX, DEUTERANOPIA_COMP_MATRIX, TRITANOPIA_COMP_MATRIX, TECHNICOLOR_MATRIX, SOLARIZATION_MATRIX, SYNTHWAVE_MATRIX, GREENSCALE_MATRIX, GRAYSCALE_MATRIX, INVERT_MATRIX, Timeline, engine, createTimeline, SlotRegistry, createSlotRegistry, createCoreSlotRegistry, registerCorePlugin, resolveCoreSlot, SlotRenderable, NativeSpanFeed, FrameBufferRenderable, ASCIIFontRenderable, BoxRenderable, TextBufferRenderable, CodeRenderable, isTextNodeRenderable, TextNodeRenderable, RootTextNodeRenderable, Generic, Box, Text, ASCIIFont, Input, Select, TabSelect, FrameBuffer, Code, ScrollBox, vstyles, VRenderable, LineNumberRenderable, TextRenderable, DiffRenderable, TextareaRenderable, InputRenderableEvents, InputRenderable, TextTableRenderable, MarkdownRenderable, SliderRenderable, ScrollBarRenderable, ArrowRenderable, ScrollBoxRenderable, SelectRenderableEvents, SelectRenderable, TabSelectRenderableEvents, TabSelectRenderable, TimeToFirstDrawRenderable, exports_src2 as exports_src };
|
|
13274
13297
|
|
|
13275
|
-
//# debugId=
|
|
13276
|
-
//# sourceMappingURL=index-
|
|
13298
|
+
//# debugId=B6536531C9BC040064756E2164756E21
|
|
13299
|
+
//# sourceMappingURL=index-jdn8a604.js.map
|