These docs describe the main branch, including unreleased changes. Read the 0.6.0 docs.

OpenTUI 0.4.0

npm

This release has no release notes. The list below comes from its published type declarations.

API changes#

@opentui/core#

Added

  • function destroyTreeSitterClient(): Promise<void>
  • method TreeSitterClient.onDestroy(callback: () => void): () => void
  • type TreeSitterWorkerLogType = "log" | "error" | "warn"
  • type TreeSitterWorkerRequest = { type: "INIT"; dataPath: string; } | { type: "ADD_FILETYPE_PARSER"; filetypeParser: FiletypeParserOptions; } | { type: "PRELOAD_PARSER"; filetype: string; messageId: string; } | { type: "INITIALIZE_PARSER"; bufferId: number; version: number; content: string; filetype: string; messageId: string; } | { type: "HANDLE_EDITS"; bufferId: number; version: number; content: string; edits: Edit[]; } | { type: "GET_PERFORMANCE"; messageId: string; } | { type: "RESET_BUFFER"; bufferId: number; version: number; content: string; edits: Edit[]; } | { type: "DISPOSE_BUFFER"; bufferId: number; } | { type: "ONESHOT_HIGHLIGHT"; content: string; filetype: string; messageId: string; } | { type: "UPDATE_DATA_PATH"; dataPath: string; messageId: string; } | { type: "CLEAR_CACHE"; messageId: string; }
  • type TreeSitterWorkerResponse = { type: "INIT_RESPONSE"; error?: string; } | { type: "PARSER_INIT_RESPONSE"; bufferId: number; messageId: string; hasParser: boolean; warning?: string; error?: string; } | { type: "HIGHLIGHT_RESPONSE"; bufferId: number; version: number; highlights: HighlightResponse[]; } | { type: "PRELOAD_PARSER_RESPONSE"; messageId: string; hasParser: boolean; } | { type: "BUFFER_DISPOSED"; bufferId: number; } | { type: "PERFORMANCE_RESPONSE"; performance: PerformanceStats; messageId: string; } | { type: "ONESHOT_HIGHLIGHT_RESPONSE"; messageId: string; hasParser: boolean; highlights?: SimpleHighlight[]; warning?: string; error?: string; } | { type: "UPDATE_DATA_PATH_RESPONSE"; messageId: string; error?: string; } | { type: "CLEAR_CACHE_RESPONSE"; messageId: string; error?: string; } | { type: "WARNING"; bufferId?: number; warning: string; } | { type: "ERROR"; bufferId?: number; error: string; } | { type: "WORKER_LOG"; logType: TreeSitterWorkerLogType; data: unknown[]; }

Changed

  • constructor TreeSitterClient(options: TreeSitterClientOptions)constructor TreeSitterClient(options: TreeSitterClientOptions, internalOptions?: TreeSitterClientInternalOptions)
  • property RenderLib.textBufferSetSyntaxStyle: (buffer: TextBufferHandle, style: SyntaxStyleHandle | null) => voidproperty RenderLib.textBufferSetSyntaxStyle: (buffer: TextBufferHandle, style: SyntaxStyleHandle | null) => boolean
  • property TreeSitterClientEvents."worker:log": [ logType: "log" | "error", message: string ]property TreeSitterClientEvents."worker:log": [ logType: TreeSitterWorkerLogType, message: string ]

@opentui/core/testing#

Added

  • method MockTreeSitterClient.destroy(): Promise<void>

Changed

  • constructor MockTreeSitterClient(options?: { autoResolveTimeout?: number; })constructor MockTreeSitterClient(options?: { autoResolveTimeout?: number; clock?: Clock; })

@opentui/keymap/runtime-modules#

Changed

  • const runtimeModules: { "@opentui/keymap": typeof keymap; "@opentui/keymap/extras": typeof keymapExtras; "@opentui/keymap/extras/graph": typeof keymapGraphExtra; "@opentui/keymap/addons": typeof keymapAddons; "@opentui/keymap/addons/opentui": typeof keymapOpenTuiAddons; "@opentui/keymap/html": typeof keymapHtml; "@opentui/keymap/opentui": typeof keymapOpenTui; "@opentui/keymap/react": typeof keymapReact; "@opentui/keymap/solid": typeof keymapSolid; }const runtimeModules: { "@opentui/keymap": typeof keymap; "@opentui/keymap/extras": typeof keymapExtras; "@opentui/keymap/extras/graph": typeof keymapGraphExtra; "@opentui/keymap/addons": typeof keymapAddons; "@opentui/keymap/addons/opentui": typeof keymapOpenTuiAddons; "@opentui/keymap/html": typeof keymapHtml; "@opentui/keymap/opentui": typeof keymapOpenTui; "@opentui/keymap/react": () => Promise<RuntimeModuleExports>; "@opentui/keymap/solid": () => Promise<RuntimeModuleExports>; }

@opentui/solid#

Changed

  • function Portal(props: { mount?: DomNode; ref?: (el: {}) => void; children: JSX.Element; }): DomNodefunction Portal(props: { mount?: DomNode; ref?: (el: {}) => void; children: JSX.Element; }): JSX.Element
  • type JSX.Element = DomNode | ArrayElement | string | number | boolean | null | undefinedtype JSX.Element = SolidJSX.Element

Removed

  • type JSX.ArrayElement = Array<Element>

@opentui/solid/bun-plugin#

Removed

  • type ResolveImportPath = (specifier: string) => string | null

@opentui/solid/jsx-dev-runtime#

Added

  • function Fragment(props: { children?: JSX.Element; }): JSX.Element
  • function jsxDEV(type: string | JsxComponent, props?: Record<string, unknown> | null): JSX.Element

Changed

  • type JSX.Element = DomNode | ArrayElement | string | number | boolean | null | undefinedtype JSX.Element = SolidJSX.Element

Removed

  • type JSX.ArrayElement = Array<Element>

@opentui/solid/jsx-runtime#

Added

  • const jsxs: typeof jsx
  • function Fragment(props: { children?: JSX.Element; }): JSX.Element
  • function jsx(type: string | JsxComponent, props?: Record<string, unknown> | null): JSX.Element
  • function jsxDEV(type: string | JsxComponent, props?: Record<string, unknown> | null): JSX.Element
  • type JsxComponent = (props: Record<string, unknown>) => unknown

Changed

  • type JSX.Element = DomNode | ArrayElement | string | number | boolean | null | undefinedtype JSX.Element = SolidJSX.Element

Removed

  • type JSX.ArrayElement = Array<Element>

@opentui/three#

Changed

  • constructor RapierPhysicsWorld(rapierWorld: RAPIER.World)constructor RapierPhysicsWorld(rapierWorld: World)
  • constructor RapierRigidBody(rapierBody: RAPIER.RigidBody)constructor RapierRigidBody(rapierBody: RigidBody)
  • static method RapierPhysicsWorld.createFromRapierWorld(rapierWorld: RAPIER.World): RapierPhysicsWorldstatic method RapierPhysicsWorld.createFromRapierWorld(rapierWorld: World): RapierPhysicsWorld
  • readonly property RapierRigidBody.nativeBody: RAPIER.RigidBodyreadonly property RapierRigidBody.nativeBody: RigidBody