@gridland/web 0.2.16 → 0.2.17

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.
@@ -0,0 +1,23 @@
1
+ // Shim that re-exports BrowserSyntaxStyle as SyntaxStyle
2
+ export { BrowserSyntaxStyle as SyntaxStyle } from "../browser-syntax-style"
3
+
4
+ // Types that opentui imports from syntax-style
5
+ export interface StyleDefinition {
6
+ fg?: any
7
+ bg?: any
8
+ attributes?: number
9
+ [key: string]: any
10
+ }
11
+
12
+ export interface MergedStyle {
13
+ attributes: number
14
+ }
15
+
16
+ export interface ThemeTokenStyle {
17
+ scope: string | string[]
18
+ settings: Record<string, any>
19
+ }
20
+
21
+ export function convertThemeToStyles(_theme: ThemeTokenStyle[]): Record<string, StyleDefinition> {
22
+ return {}
23
+ }
@@ -0,0 +1,3 @@
1
+ // Shim that re-exports BrowserTextBuffer as TextBuffer
2
+ export { BrowserTextBuffer as TextBuffer } from "../browser-text-buffer"
3
+ export type { TextChunk, StyledTextInput } from "../browser-text-buffer"
@@ -0,0 +1,2 @@
1
+ // Shim that re-exports BrowserTextBufferView as TextBufferView
2
+ export { BrowserTextBufferView as TextBufferView } from "../browser-text-buffer-view"
@@ -0,0 +1,43 @@
1
+ // Stub for opentui/packages/core/src/animation/Timeline.ts
2
+ export class Timeline {
3
+ public isPlaying: boolean = false
4
+ public isComplete: boolean = false
5
+ public duration: number = 1000
6
+ public loop: boolean = false
7
+ public synced: boolean = false
8
+ public currentTime: number = 0
9
+ public items: any[] = []
10
+ public subTimelines: any[] = []
11
+
12
+ constructor(_options: any = {}) {}
13
+ addStateChangeListener(_listener: any): void {}
14
+ removeStateChangeListener(_listener: any): void {}
15
+ add(_target: any, _options: any): this { return this }
16
+ call(_callback: () => void): this { return this }
17
+ play(): this {
18
+ this.isPlaying = true
19
+ return this
20
+ }
21
+ pause(): this {
22
+ this.isPlaying = false
23
+ return this
24
+ }
25
+ restart(): void {}
26
+ update(_deltaTime: number): void {}
27
+ }
28
+
29
+ class TimelineEngine {
30
+ defaults = { frameRate: 60 }
31
+ attach(_renderer: any): void {}
32
+ detach(): void {}
33
+ register(_timeline: Timeline): void {}
34
+ unregister(_timeline: Timeline): void {}
35
+ clear(): void {}
36
+ update(_deltaTime: number): void {}
37
+ }
38
+
39
+ export const engine = new TimelineEngine()
40
+
41
+ export function createTimeline(options: any = {}): Timeline {
42
+ return new Timeline(options)
43
+ }
@@ -0,0 +1,47 @@
1
+ // Stub for opentui tree-sitter module
2
+ export function getTreeSitterClient(): any {
3
+ return null
4
+ }
5
+
6
+ export function createTreeSitterClient(): any {
7
+ return null
8
+ }
9
+
10
+ export function treeSitterToStyledText(..._args: any[]): any {
11
+ return null
12
+ }
13
+
14
+ export function treeSitterToTextChunks(..._args: any[]): any[] {
15
+ return []
16
+ }
17
+
18
+ export class TreeSitterClient {
19
+ static create(): any {
20
+ return null
21
+ }
22
+ setDataPath(_path: string): void {}
23
+ highlight(_code: string, _language: string): any[] {
24
+ return []
25
+ }
26
+ getLanguages(): string[] {
27
+ return []
28
+ }
29
+ }
30
+
31
+ export const defaultParsers: any[] = []
32
+ export function registerParser(): void {}
33
+ export function getParser(): any {
34
+ return null
35
+ }
36
+
37
+ // Types
38
+ export type SimpleHighlight = any
39
+ export type TreeSitterClientOptions = any
40
+
41
+ // Re-export from tree-sitter-styled-text (which also gets stubbed)
42
+ export { treeSitterToTextChunks as treeSitterToTextChunksFromStyledText }
43
+
44
+ // resolve-ft exports
45
+ export function resolveFiletype(_filename: string): string | null {
46
+ return null
47
+ }
@@ -0,0 +1,8 @@
1
+ // Stub for tree-sitter-styled-text
2
+ export function treeSitterToStyledText(..._args: any[]): any {
3
+ return null
4
+ }
5
+
6
+ export function treeSitterToTextChunks(..._args: any[]): any[] {
7
+ return []
8
+ }
@@ -0,0 +1,20 @@
1
+ // Stub for opentui/packages/core/src/zig.ts
2
+ // Provides no-op RenderLib and resolveRenderLib
3
+
4
+ export type Pointer = number
5
+
6
+ export interface LineInfo {
7
+ lineStarts: number[]
8
+ lineWidths: number[]
9
+ maxLineWidth: number
10
+ lineSources: number[]
11
+ lineWraps: number[]
12
+ }
13
+
14
+ export interface RenderLib {
15
+ [key: string]: any
16
+ }
17
+
18
+ export function resolveRenderLib(): RenderLib {
19
+ throw new Error("Zig render library not available in browser environment")
20
+ }