@opentui/core 0.0.0-20250930-a8fe63ce → 0.0.0-20251001-886e38c1

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/index.js CHANGED
@@ -130,7 +130,7 @@ import {
130
130
  white,
131
131
  wrapWithDelegates,
132
132
  yellow
133
- } from "./index-h87jjatk.js";
133
+ } from "./index-r19wz8xa.js";
134
134
  // src/post/filters.ts
135
135
  function applyScanlines(buffer, strength = 0.8, step = 2) {
136
136
  const width = buffer.width;
@@ -13,6 +13,8 @@ export declare class TreeSitterClient extends EventEmitter<TreeSitterClientEvent
13
13
  private debouncer;
14
14
  private options;
15
15
  constructor(options: TreeSitterClientOptions);
16
+ private emitError;
17
+ private emitWarning;
16
18
  private startWorker;
17
19
  private stopWorker;
18
20
  private handleReset;
@@ -1,2 +1,2 @@
1
1
  import type { FiletypeParserOptions } from "./types";
2
- export declare const DEFAULT_PARSERS: FiletypeParserOptions[];
2
+ export declare function getParsers(): FiletypeParserOptions[];
@@ -1,55 +1,2 @@
1
- import { Query, Language } from "web-tree-sitter";
2
- import type { Edit } from "web-tree-sitter";
3
- import type { HighlightResponse, FiletypeParserOptions, PerformanceStats } from "./types";
4
- interface FiletypeParser {
5
- filetype: string;
6
- queries: {
7
- highlights: Query;
8
- };
9
- language: Language;
10
- }
11
- export declare class ParserWorker {
12
- private bufferParsers;
13
- private filetypeParserOptions;
14
- private filetypeParsers;
15
- private filetypeParserPromises;
16
- private reusableParsers;
17
- private reusableParserPromises;
18
- private initializePromise;
19
- performance: PerformanceStats;
20
- private dataPath;
21
- private initialized;
22
- constructor();
23
- private fetchHighlightQueries;
24
- initialize({ dataPath }: {
25
- dataPath: string;
26
- }): Promise<void>;
27
- addFiletypeParser(filetypeParser: FiletypeParserOptions): void;
28
- private createQueries;
29
- private loadLanguage;
30
- private resolveFiletypeParser;
31
- private loadFiletypeParser;
32
- preloadParser(filetype: string): Promise<FiletypeParser | undefined>;
33
- private getReusableParser;
34
- private createReusableParser;
35
- handleInitializeParser(bufferId: number, version: number, content: string, filetype: string, messageId: string): Promise<void>;
36
- private initialQuery;
37
- private editToRange;
38
- handleEdits(bufferId: number, content: string, edits: Edit[]): Promise<{
39
- highlights?: HighlightResponse[];
40
- warning?: string;
41
- error?: string;
42
- }>;
43
- private nodeContainsRange;
44
- private getHighlights;
45
- private getSimpleHighlights;
46
- handleResetBuffer(bufferId: number, version: number, content: string): Promise<{
47
- highlights?: HighlightResponse[];
48
- warning?: string;
49
- error?: string;
50
- }>;
51
- disposeBuffer(bufferId: number): void;
52
- handleOneShotHighlight(content: string, filetype: string, messageId: string): Promise<void>;
53
- updateDataPath(dataPath: string): Promise<void>;
54
- }
55
- export {};
1
+ declare const _default: string;
2
+ export default _default;
@@ -0,0 +1,2 @@
1
+ declare const workerPath: string;
2
+ export default workerPath;
package/package.json CHANGED
@@ -4,7 +4,7 @@
4
4
  "main": "index.js",
5
5
  "types": "index.d.ts",
6
6
  "type": "module",
7
- "version": "0.0.0-20250930-a8fe63ce",
7
+ "version": "0.0.0-20251001-886e38c1",
8
8
  "description": "OpenTUI is a TypeScript library for building terminal user interfaces (TUIs)",
9
9
  "license": "MIT",
10
10
  "repository": {
@@ -27,24 +27,42 @@
27
27
  "import": "./testing.js",
28
28
  "require": "./testing.js",
29
29
  "types": "./testing.d.ts"
30
+ },
31
+ "./parser.worker": {
32
+ "import": "./parser.worker.js",
33
+ "require": "./parser.worker.js",
34
+ "types": "./parser.worker.d.ts"
35
+ },
36
+ "./parser.worker.path": {
37
+ "import": "./parser.worker.path.js",
38
+ "require": "./parser.worker.path.js",
39
+ "types": "./parser.worker.path.d.ts"
30
40
  }
31
41
  },
42
+ "dependencies": {
43
+ "jimp": "1.6.0",
44
+ "yoga-layout": "3.2.1"
45
+ },
32
46
  "devDependencies": {
33
47
  "@types/bun": "latest",
34
48
  "@types/three": "0.177.0",
35
49
  "commander": "^13.1.0",
36
- "typescript": "^5"
50
+ "typescript": "^5",
51
+ "web-tree-sitter": "^0.26.0"
52
+ },
53
+ "peerDependencies": {
54
+ "web-tree-sitter": ">=0.25.0"
37
55
  },
38
56
  "optionalDependencies": {
39
57
  "@dimforge/rapier2d-simd-compat": "^0.17.3",
40
58
  "bun-webgpu": "0.1.3",
41
59
  "planck": "^1.4.2",
42
60
  "three": "0.177.0",
43
- "@opentui/core-darwin-x64": "0.0.0-20250930-a8fe63ce",
44
- "@opentui/core-darwin-arm64": "0.0.0-20250930-a8fe63ce",
45
- "@opentui/core-linux-x64": "0.0.0-20250930-a8fe63ce",
46
- "@opentui/core-linux-arm64": "0.0.0-20250930-a8fe63ce",
47
- "@opentui/core-win32-x64": "0.0.0-20250930-a8fe63ce",
48
- "@opentui/core-win32-arm64": "0.0.0-20250930-a8fe63ce"
61
+ "@opentui/core-darwin-x64": "0.0.0-20251001-886e38c1",
62
+ "@opentui/core-darwin-arm64": "0.0.0-20251001-886e38c1",
63
+ "@opentui/core-linux-x64": "0.0.0-20251001-886e38c1",
64
+ "@opentui/core-linux-arm64": "0.0.0-20251001-886e38c1",
65
+ "@opentui/core-win32-x64": "0.0.0-20251001-886e38c1",
66
+ "@opentui/core-win32-arm64": "0.0.0-20251001-886e38c1"
49
67
  }
50
68
  }
@@ -0,0 +1,2 @@
1
+ declare const parser_worker_path: string;
2
+ export default parser_worker_path;