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

OpenTUI 0.5.15

npmGitHub release

Breaking changes

  • core: DiffRenderable.destroyRecursively() is removed. Call destroy() instead. DiffRenderable now frees its internal views in the protected destroySelf() method. See Lifecycle and cleanup. (8ec0082)

Added

  • core: CreateRuntimePluginOptions.preserve takes a list or set of specifiers, or a predicate. The runtime plugin leaves matching bare specifiers unchanged, so a module that the host registers with build.module() is not replaced by a copy from node_modules. core and additional modules still take precedence. See Load plugins and modules at runtime. (#1569)
  • react: ReactRuntimePluginSupportOptions.preserve accepts the same values. See Load plugins and modules at runtime. (#1569)
  • solid: SolidRuntimePluginSupportOptions.preserve accepts the same values. See Load plugins and modules at runtime. (#1569)

Fixed

  • core: drawBox and drawPackedBuffer draw nothing when the width or height is zero or negative. Before, a negative extent reached native code as a very large value and could crash it, and a zero packed-buffer width divided by zero. pushScissorRect clips to an empty rectangle for such extents, so the matching pop stays balanced. See Buffer API. (#1559)
  • native: Blended cell writes reject negative coordinates. Before, an off-screen write could overflow or address an invalid cell. See Buffer API. (#1556)
  • core: DiffRenderable and LineNumberRenderable free their cached internal views when you destroy them. LineNumberRenderable now has its own destroy() method. See Lifecycle and cleanup. (8ec0082)
  • solid: Slot placeholders are freed when their slot child is destroyed. See Solid plugin slots. (8ec0082)

API changes#

@opentui/core#

Added

  • protected method DiffRenderable.destroySelf(): void
  • method LineNumberRenderable.destroy(): void

Removed

  • method DiffRenderable.destroyRecursively(): void

@opentui/core/runtime-plugin#

Added

  • property CreateRuntimePluginOptions.preserve?: RuntimeSpecifierPreserve
  • type RuntimeSpecifierPreserve = readonly string[] | ReadonlySet<string> | ((specifier: string) => boolean)

@opentui/core/runtime-plugin-support#

Added

  • property CreateRuntimePluginOptions.preserve?: RuntimeSpecifierPreserve
  • type RuntimeSpecifierPreserve = readonly string[] | ReadonlySet<string> | ((specifier: string) => boolean)

@opentui/core/runtime-plugin-support/configure#

Added

  • property CreateRuntimePluginOptions.preserve?: RuntimeSpecifierPreserve
  • type RuntimeSpecifierPreserve = readonly string[] | ReadonlySet<string> | ((specifier: string) => boolean)

@opentui/react/runtime-plugin-support#

Added

  • property ReactRuntimePluginSupportOptions.preserve?: RuntimeSpecifierPreserve

@opentui/react/runtime-plugin-support/configure#

Added

  • property ReactRuntimePluginSupportOptions.preserve?: RuntimeSpecifierPreserve

@opentui/solid#

Added

  • method LayoutSlotRenderable.destroyRecursively(): void
  • method SlotRenderable.didDestroySlotChild(child: LayoutSlotRenderable | TextSlotRenderable): void

Changed

  • method SlotRenderable.getSlotChild(parent: BaseRenderable): TextSlotRenderable | LayoutSlotRenderablemethod SlotRenderable.getSlotChild(parent: BaseRenderable): LayoutSlotRenderable | TextSlotRenderable

@opentui/solid/runtime-plugin-support#

Added

  • property SolidRuntimePluginSupportOptions.preserve?: RuntimeSpecifierPreserve

@opentui/solid/runtime-plugin-support/configure#

Added

  • property SolidRuntimePluginSupportOptions.preserve?: RuntimeSpecifierPreserve