@effect-tui/react 0.2.0 → 0.2.1
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/dist/jsx-runtime.d.ts +6 -6
- package/dist/jsx-runtime.d.ts.map +1 -1
- package/dist/src/codeblock.js.map +1 -1
- package/dist/src/components/Divider.d.ts.map +1 -1
- package/dist/src/components/Divider.js +1 -1
- package/dist/src/components/Divider.js.map +1 -1
- package/dist/src/components/Markdown.d.ts.map +1 -1
- package/dist/src/components/Markdown.js +1 -1
- package/dist/src/components/Markdown.js.map +1 -1
- package/dist/src/components/MultilineTextInput.d.ts.map +1 -1
- package/dist/src/components/MultilineTextInput.js +2 -2
- package/dist/src/components/MultilineTextInput.js.map +1 -1
- package/dist/src/components/Static.d.ts.map +1 -1
- package/dist/src/components/Static.js +1 -1
- package/dist/src/components/Static.js.map +1 -1
- package/dist/src/components/TextInput.d.ts.map +1 -1
- package/dist/src/components/TextInput.js +2 -2
- package/dist/src/components/TextInput.js.map +1 -1
- package/dist/src/components/index.d.ts +4 -4
- package/dist/src/components/index.d.ts.map +1 -1
- package/dist/src/components/index.js +4 -4
- package/dist/src/components/index.js.map +1 -1
- package/dist/src/console/ConsoleCapture.d.ts.map +1 -1
- package/dist/src/console/ConsoleCapture.js +1 -1
- package/dist/src/console/ConsoleCapture.js.map +1 -1
- package/dist/src/console/ConsolePopover.d.ts.map +1 -1
- package/dist/src/console/ConsolePopover.js +5 -7
- package/dist/src/console/ConsolePopover.js.map +1 -1
- package/dist/src/console/index.d.ts +1 -1
- package/dist/src/console/index.d.ts.map +1 -1
- package/dist/src/console/index.js +1 -1
- package/dist/src/console/index.js.map +1 -1
- package/dist/src/console/useConsole.d.ts.map +1 -1
- package/dist/src/console/useConsole.js +2 -2
- package/dist/src/console/useConsole.js.map +1 -1
- package/dist/src/debug/DebugOverlay.d.ts +1 -1
- package/dist/src/debug/DebugOverlay.d.ts.map +1 -1
- package/dist/src/debug/DebugOverlay.js +1 -1
- package/dist/src/debug/DebugOverlay.js.map +1 -1
- package/dist/src/dev/Toast.d.ts.map +1 -1
- package/dist/src/dev/Toast.js +2 -2
- package/dist/src/dev/Toast.js.map +1 -1
- package/dist/src/dev/index.d.ts +1 -1
- package/dist/src/dev/index.d.ts.map +1 -1
- package/dist/src/dev/index.js +1 -1
- package/dist/src/dev/index.js.map +1 -1
- package/dist/src/dev.d.ts +1 -2
- package/dist/src/dev.d.ts.map +1 -1
- package/dist/src/dev.js +10 -10
- package/dist/src/dev.js.map +1 -1
- package/dist/src/highlight.d.ts +1 -1
- package/dist/src/highlight.d.ts.map +1 -1
- package/dist/src/highlight.js.map +1 -1
- package/dist/src/hooks/index.d.ts +3 -3
- package/dist/src/hooks/index.d.ts.map +1 -1
- package/dist/src/hooks/index.js.map +1 -1
- package/dist/src/hooks/use-keyboard.d.ts.map +1 -1
- package/dist/src/hooks/use-keyboard.js.map +1 -1
- package/dist/src/hooks/use-mouse.d.ts +1 -1
- package/dist/src/hooks/use-mouse.d.ts.map +1 -1
- package/dist/src/hooks/use-mouse.js.map +1 -1
- package/dist/src/hooks/use-scroll.d.ts.map +1 -1
- package/dist/src/hooks/use-scroll.js +2 -2
- package/dist/src/hooks/use-scroll.js.map +1 -1
- package/dist/src/hooks/useFrameStats.d.ts.map +1 -1
- package/dist/src/hooks/useFrameStats.js.map +1 -1
- package/dist/src/hosts/base.d.ts +2 -2
- package/dist/src/hosts/base.d.ts.map +1 -1
- package/dist/src/hosts/box.d.ts +3 -3
- package/dist/src/hosts/box.d.ts.map +1 -1
- package/dist/src/hosts/box.js +1 -1
- package/dist/src/hosts/box.js.map +1 -1
- package/dist/src/hosts/canvas.d.ts +3 -3
- package/dist/src/hosts/canvas.d.ts.map +1 -1
- package/dist/src/hosts/canvas.js +1 -1
- package/dist/src/hosts/canvas.js.map +1 -1
- package/dist/src/hosts/codeblock.d.ts +2 -2
- package/dist/src/hosts/codeblock.d.ts.map +1 -1
- package/dist/src/hosts/codeblock.js +1 -1
- package/dist/src/hosts/codeblock.js.map +1 -1
- package/dist/src/hosts/flex-container.d.ts +3 -3
- package/dist/src/hosts/flex-container.d.ts.map +1 -1
- package/dist/src/hosts/flex-container.js +1 -1
- package/dist/src/hosts/flex-container.js.map +1 -1
- package/dist/src/hosts/hstack.d.ts +1 -1
- package/dist/src/hosts/index.d.ts +8 -8
- package/dist/src/hosts/index.d.ts.map +1 -1
- package/dist/src/hosts/index.js +13 -13
- package/dist/src/hosts/index.js.map +1 -1
- package/dist/src/hosts/overlay-item.d.ts +1 -1
- package/dist/src/hosts/overlay.d.ts +1 -1
- package/dist/src/hosts/overlay.d.ts.map +1 -1
- package/dist/src/hosts/overlay.js +1 -1
- package/dist/src/hosts/overlay.js.map +1 -1
- package/dist/src/hosts/scroll.d.ts +2 -2
- package/dist/src/hosts/scroll.d.ts.map +1 -1
- package/dist/src/hosts/scroll.js +1 -1
- package/dist/src/hosts/scroll.js.map +1 -1
- package/dist/src/hosts/single-child.d.ts +1 -1
- package/dist/src/hosts/single-child.d.ts.map +1 -1
- package/dist/src/hosts/spacer.d.ts +1 -1
- package/dist/src/hosts/spacer.d.ts.map +1 -1
- package/dist/src/hosts/text.d.ts +2 -2
- package/dist/src/hosts/text.d.ts.map +1 -1
- package/dist/src/hosts/text.js +1 -1
- package/dist/src/hosts/text.js.map +1 -1
- package/dist/src/hosts/vstack.d.ts +1 -1
- package/dist/src/hosts/zstack.d.ts +2 -2
- package/dist/src/hosts/zstack.d.ts.map +1 -1
- package/dist/src/hosts/zstack.js +1 -1
- package/dist/src/hosts/zstack.js.map +1 -1
- package/dist/src/index.d.ts +17 -21
- package/dist/src/index.d.ts.map +1 -1
- package/dist/src/index.js +11 -15
- package/dist/src/index.js.map +1 -1
- package/dist/src/inline/index.d.ts.map +1 -1
- package/dist/src/inline/index.js +1 -1
- package/dist/src/inline/index.js.map +1 -1
- package/dist/src/motion/color-motion-value.d.ts +1 -1
- package/dist/src/motion/color-motion-value.d.ts.map +1 -1
- package/dist/src/motion/color-motion-value.js.map +1 -1
- package/dist/src/motion/color.d.ts +1 -1
- package/dist/src/motion/color.d.ts.map +1 -1
- package/dist/src/motion/color.js +1 -1
- package/dist/src/motion/color.js.map +1 -1
- package/dist/src/motion/color.test.js +2 -2
- package/dist/src/motion/color.test.js.map +1 -1
- package/dist/src/motion/hooks.d.ts +3 -3
- package/dist/src/motion/hooks.d.ts.map +1 -1
- package/dist/src/motion/hooks.js +1 -1
- package/dist/src/motion/hooks.js.map +1 -1
- package/dist/src/motion/index.d.ts +2 -2
- package/dist/src/motion/index.d.ts.map +1 -1
- package/dist/src/motion/index.js +3 -3
- package/dist/src/motion/index.js.map +1 -1
- package/dist/src/motion/motion-value.d.ts +5 -5
- package/dist/src/motion/motion-value.d.ts.map +1 -1
- package/dist/src/motion/motion-value.js +4 -4
- package/dist/src/motion/motion-value.js.map +1 -1
- package/dist/src/motion/motion-value.test.js +1 -1
- package/dist/src/motion/motion-value.test.js.map +1 -1
- package/dist/src/reconciler/host-config.d.ts +1 -1
- package/dist/src/reconciler/host-config.d.ts.map +1 -1
- package/dist/src/reconciler/host-config.js +1 -1
- package/dist/src/reconciler/host-config.js.map +1 -1
- package/dist/src/reconciler/types.d.ts +1 -1
- package/dist/src/remote/Procedures.d.ts.map +1 -1
- package/dist/src/remote/Procedures.js.map +1 -1
- package/dist/src/remote/Router.d.ts +1 -1
- package/dist/src/remote/Router.d.ts.map +1 -1
- package/dist/src/remote/Router.js +1 -1
- package/dist/src/remote/Router.js.map +1 -1
- package/dist/src/remote/Server.d.ts +1 -1
- package/dist/src/remote/Server.d.ts.map +1 -1
- package/dist/src/remote/Server.js +3 -3
- package/dist/src/remote/Server.js.map +1 -1
- package/dist/src/remote/index.d.ts +2 -2
- package/dist/src/remote/index.d.ts.map +1 -1
- package/dist/src/remote/index.js +5 -5
- package/dist/src/remote/index.js.map +1 -1
- package/dist/src/renderer/core/FrameBuilder.d.ts.map +1 -1
- package/dist/src/renderer/core/FrameBuilder.js.map +1 -1
- package/dist/src/renderer/input/InputProcessor.js +1 -1
- package/dist/src/renderer/input/InputProcessor.js.map +1 -1
- package/dist/src/renderer/lifecycle/TerminalSetup.d.ts +1 -1
- package/dist/src/renderer/lifecycle/TerminalSetup.d.ts.map +1 -1
- package/dist/src/renderer/lifecycle/index.d.ts +1 -1
- package/dist/src/renderer/lifecycle/index.d.ts.map +1 -1
- package/dist/src/renderer/lifecycle/index.js +1 -1
- package/dist/src/renderer/lifecycle/index.js.map +1 -1
- package/dist/src/renderer/modes/FullscreenRenderer.d.ts +1 -1
- package/dist/src/renderer/modes/FullscreenRenderer.d.ts.map +1 -1
- package/dist/src/renderer/modes/InlineRenderer.d.ts +1 -1
- package/dist/src/renderer/modes/InlineRenderer.d.ts.map +1 -1
- package/dist/src/renderer/modes/InlineRenderer.js +1 -1
- package/dist/src/renderer/modes/InlineRenderer.js.map +1 -1
- package/dist/src/renderer/modes/StaticContentRenderer.d.ts.map +1 -1
- package/dist/src/renderer/modes/StaticContentRenderer.js.map +1 -1
- package/dist/src/renderer/modes/index.d.ts +1 -1
- package/dist/src/renderer/modes/index.d.ts.map +1 -1
- package/dist/src/renderer/modes/index.js.map +1 -1
- package/dist/src/renderer-context.js +1 -1
- package/dist/src/renderer-context.js.map +1 -1
- package/dist/src/renderer-types.d.ts +1 -1
- package/dist/src/renderer-types.d.ts.map +1 -1
- package/dist/src/renderer.d.ts +2 -2
- package/dist/src/renderer.d.ts.map +1 -1
- package/dist/src/renderer.js +6 -6
- package/dist/src/renderer.js.map +1 -1
- package/dist/src/test/index.d.ts +2 -2
- package/dist/src/test/index.d.ts.map +1 -1
- package/dist/src/test/index.js +1 -1
- package/dist/src/test/index.js.map +1 -1
- package/dist/src/test/render-tui.d.ts +2 -2
- package/dist/src/test/render-tui.d.ts.map +1 -1
- package/dist/src/test/render-tui.js +2 -2
- package/dist/src/test/render-tui.js.map +1 -1
- package/dist/src/utils/flex-layout.d.ts +1 -1
- package/dist/src/utils/flex-layout.d.ts.map +1 -1
- package/dist/src/utils/flex-layout.js +1 -1
- package/dist/src/utils/flex-layout.js.map +1 -1
- package/dist/src/utils/index.d.ts +4 -4
- package/dist/src/utils/index.d.ts.map +1 -1
- package/dist/src/utils/index.js +2 -2
- package/dist/src/utils/index.js.map +1 -1
- package/dist/src/utils/styles.d.ts.map +1 -1
- package/dist/src/utils/styles.js.map +1 -1
- package/dist/src/visualize/index.js +2 -2
- package/dist/src/visualize/index.js.map +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/jsx-runtime.ts +6 -6
- package/package.json +2 -2
- package/src/codeblock.tsx +1 -1
- package/src/components/Divider.tsx +1 -1
- package/src/components/Markdown.tsx +2 -2
- package/src/components/MultilineTextInput.tsx +9 -9
- package/src/components/Static.tsx +1 -1
- package/src/components/TextInput.tsx +8 -8
- package/src/components/index.ts +4 -4
- package/src/console/ConsoleCapture.ts +1 -1
- package/src/console/ConsolePopover.tsx +27 -26
- package/src/console/index.ts +1 -3
- package/src/console/useConsole.ts +2 -2
- package/src/debug/DebugOverlay.ts +3 -6
- package/src/dev/Toast.tsx +12 -10
- package/src/dev/index.ts +1 -1
- package/src/dev.tsx +11 -12
- package/src/highlight.ts +1 -1
- package/src/hooks/index.ts +3 -3
- package/src/hooks/use-keyboard.ts +1 -1
- package/src/hooks/use-mouse.ts +1 -1
- package/src/hooks/use-scroll.ts +9 -11
- package/src/hooks/useFrameStats.ts +1 -1
- package/src/hosts/base.ts +2 -2
- package/src/hosts/box.ts +4 -4
- package/src/hosts/canvas.ts +3 -3
- package/src/hosts/codeblock.ts +3 -3
- package/src/hosts/flex-container.ts +3 -3
- package/src/hosts/hstack.ts +1 -1
- package/src/hosts/index.ts +14 -14
- package/src/hosts/overlay-item.ts +1 -1
- package/src/hosts/overlay.ts +2 -2
- package/src/hosts/scroll.ts +3 -3
- package/src/hosts/single-child.ts +1 -1
- package/src/hosts/spacer.ts +1 -1
- package/src/hosts/text.ts +3 -3
- package/src/hosts/vstack.ts +1 -1
- package/src/hosts/zstack.ts +2 -2
- package/src/index.ts +60 -60
- package/src/inline/index.tsx +1 -1
- package/src/motion/color-motion-value.ts +1 -1
- package/src/motion/color.test.ts +2 -2
- package/src/motion/color.ts +2 -2
- package/src/motion/hooks.ts +3 -3
- package/src/motion/index.ts +8 -8
- package/src/motion/motion-value.test.ts +1 -1
- package/src/motion/motion-value.ts +11 -11
- package/src/reconciler/host-config.ts +3 -3
- package/src/reconciler/types.ts +1 -1
- package/src/remote/Procedures.ts +1 -7
- package/src/remote/Router.ts +3 -7
- package/src/remote/Server.ts +7 -12
- package/src/remote/index.ts +6 -10
- package/src/renderer/core/FrameBuilder.ts +1 -1
- package/src/renderer/input/InputProcessor.ts +1 -1
- package/src/renderer/lifecycle/TerminalSetup.ts +1 -1
- package/src/renderer/lifecycle/index.ts +1 -1
- package/src/renderer/modes/FullscreenRenderer.ts +1 -1
- package/src/renderer/modes/InlineRenderer.ts +2 -2
- package/src/renderer/modes/StaticContentRenderer.ts +1 -1
- package/src/renderer/modes/index.ts +1 -1
- package/src/renderer-context.ts +1 -1
- package/src/renderer-types.ts +1 -1
- package/src/renderer.ts +18 -19
- package/src/test/index.ts +4 -4
- package/src/test/render-tui.ts +3 -3
- package/src/utils/flex-layout.ts +2 -2
- package/src/utils/index.ts +8 -8
- package/src/utils/styles.ts +2 -2
- package/src/visualize/index.tsx +2 -2
package/src/hosts/scroll.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
// scroll.ts — Scrollable container host
|
|
2
|
-
import type { CellBuffer,
|
|
3
|
-
import type { HostContext, Rect, Size
|
|
4
|
-
import { SingleChildHost } from "./single-child.js"
|
|
2
|
+
import type { CellBuffer, Color, Palette } from "@effect-tui/core"
|
|
3
|
+
import type { CommonProps, HostContext, Rect, Size } from "../reconciler/types.js"
|
|
5
4
|
import { resolveInheritedBgStyle } from "../utils/index.js"
|
|
5
|
+
import { SingleChildHost } from "./single-child.js"
|
|
6
6
|
|
|
7
7
|
export interface ScrollProps extends CommonProps {
|
|
8
8
|
/** Scroll axis: "vertical" (default), "horizontal", or "both" */
|
package/src/hosts/spacer.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { CellBuffer, Palette } from "@effect-tui/core"
|
|
2
|
-
import type { HostContext, Rect, Size
|
|
2
|
+
import type { CommonProps, HostContext, Rect, Size } from "../reconciler/types.js"
|
|
3
3
|
import { BaseHost } from "./base.js"
|
|
4
4
|
|
|
5
5
|
export interface SpacerProps extends CommonProps {
|
package/src/hosts/text.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import type { HostContext, Rect, Size
|
|
3
|
-
import { BaseHost, getInheritedBg } from "./base.js"
|
|
1
|
+
import { type CellBuffer, type Color, displayWidth, type Palette } from "@effect-tui/core"
|
|
2
|
+
import type { CommonProps, HostContext, Rect, Size } from "../reconciler/types.js"
|
|
4
3
|
import { resolveInheritedBgStyle, styleIdFromProps } from "../utils/index.js"
|
|
4
|
+
import { BaseHost, getInheritedBg } from "./base.js"
|
|
5
5
|
|
|
6
6
|
export interface TextProps extends CommonProps {
|
|
7
7
|
fg?: Color
|
package/src/hosts/vstack.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { CommonProps, HostContext } from "../reconciler/types.js"
|
|
2
2
|
import { FlexContainerHost, type FlexContainerProps } from "./flex-container.js"
|
|
3
3
|
|
|
4
4
|
export interface VStackProps extends CommonProps {
|
package/src/hosts/zstack.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { CellBuffer, Palette } from "@effect-tui/core"
|
|
2
|
-
import type { HostContext, Rect, Size
|
|
3
|
-
import { BaseHost } from "./base.js"
|
|
2
|
+
import type { CommonProps, HostContext, Rect, Size } from "../reconciler/types.js"
|
|
4
3
|
import { alignInRect, type HAlign, type VAlign } from "../utils/index.js"
|
|
4
|
+
import { BaseHost } from "./base.js"
|
|
5
5
|
|
|
6
6
|
export interface ZStackProps extends CommonProps {
|
|
7
7
|
alignment?: { h?: "leading" | "center" | "trailing"; v?: "top" | "center" | "bottom" }
|
package/src/index.ts
CHANGED
|
@@ -1,88 +1,88 @@
|
|
|
1
1
|
// Convenience: re-export core theming/types so apps can import from one place
|
|
2
2
|
export * from "@effect-tui/core"
|
|
3
|
-
|
|
4
|
-
// Renderer
|
|
5
|
-
export {
|
|
6
|
-
createRenderer,
|
|
7
|
-
createRoot,
|
|
8
|
-
render,
|
|
9
|
-
useRenderer,
|
|
10
|
-
useTerminalSize,
|
|
11
|
-
RendererContext,
|
|
12
|
-
} from "./renderer.js"
|
|
13
|
-
export type { TuiRenderer, RendererOptions, Root, FrameStats, RenderInstance } from "./renderer.js"
|
|
14
|
-
|
|
3
|
+
export type { CodeBlockProps } from "./codeblock.js"
|
|
15
4
|
// CodeBlock (syntax highlighting)
|
|
16
5
|
export { CodeBlock } from "./codeblock.js"
|
|
17
|
-
|
|
18
|
-
|
|
6
|
+
// Input components
|
|
7
|
+
export {
|
|
8
|
+
Markdown,
|
|
9
|
+
type MarkdownProps,
|
|
10
|
+
type MarkdownTheme,
|
|
11
|
+
MultilineTextInput,
|
|
12
|
+
type MultilineTextInputProps,
|
|
13
|
+
Overlay,
|
|
14
|
+
type OverlayItemProps,
|
|
15
|
+
type OverlayProps,
|
|
16
|
+
Static,
|
|
17
|
+
type StaticProps,
|
|
18
|
+
TextInput,
|
|
19
|
+
type TextInputProps,
|
|
20
|
+
} from "./components/index.js"
|
|
21
|
+
// Debug
|
|
22
|
+
export { DiagnosticsPanel } from "./debug/DiagnosticsPanel.js"
|
|
23
|
+
// Development utilities (HMR)
|
|
24
|
+
export {
|
|
25
|
+
autoHmr,
|
|
26
|
+
type DevRenderOptions,
|
|
27
|
+
type DevRenderResult,
|
|
28
|
+
devMain,
|
|
29
|
+
devRender,
|
|
30
|
+
hmr,
|
|
31
|
+
hmrState,
|
|
32
|
+
} from "./dev.js"
|
|
19
33
|
// Highlight utilities
|
|
20
34
|
export {
|
|
21
|
-
highlightCode,
|
|
22
|
-
toPlainLines,
|
|
23
35
|
type HighlightLine,
|
|
24
36
|
type HighlightToken,
|
|
25
37
|
type HighlightTokenStyle,
|
|
38
|
+
highlightCode,
|
|
39
|
+
toPlainLines,
|
|
26
40
|
} from "./highlight.js"
|
|
27
|
-
|
|
28
|
-
// Hooks
|
|
29
|
-
export { useKeyboard, useMouse, usePaste, useScroll } from "./hooks/index.js"
|
|
30
|
-
export { useFrameStats } from "./hooks/useFrameStats.js"
|
|
31
41
|
export type {
|
|
42
|
+
ScrollState,
|
|
32
43
|
UseKeyboardOptions,
|
|
33
44
|
UseMouseOptions,
|
|
34
45
|
UseScrollOptions,
|
|
35
46
|
UseScrollReturn,
|
|
36
|
-
ScrollState,
|
|
37
47
|
} from "./hooks/index.js"
|
|
38
|
-
|
|
48
|
+
// Hooks
|
|
49
|
+
export { useKeyboard, useMouse, usePaste, useQuit, useScroll } from "./hooks/index.js"
|
|
50
|
+
export { useFrameStats } from "./hooks/useFrameStats.js"
|
|
51
|
+
export type { BorderKind, BoxProps } from "./hosts/box.js"
|
|
52
|
+
export type { CanvasProps, DrawContext } from "./hosts/canvas.js"
|
|
53
|
+
export type { HStackProps } from "./hosts/hstack.js"
|
|
54
|
+
export type { ScrollProps } from "./hosts/scroll.js"
|
|
55
|
+
export type { SpacerProps } from "./hosts/spacer.js"
|
|
56
|
+
export type { TextProps } from "./hosts/text.js"
|
|
57
|
+
export type { VStackProps } from "./hosts/vstack.js"
|
|
58
|
+
export type { ZStackProps } from "./hosts/zstack.js"
|
|
59
|
+
export type { ColorInput, MotionValue, RGBA, SpringOptions } from "./motion/index.js"
|
|
39
60
|
// Motion (spring animations)
|
|
40
61
|
export {
|
|
41
|
-
useMotionValue,
|
|
42
|
-
useSpring,
|
|
43
|
-
useSprings,
|
|
44
|
-
useSpringRenderer,
|
|
45
|
-
useMotionValueEvent,
|
|
46
|
-
useAnimationFrame,
|
|
47
|
-
motionValue,
|
|
48
62
|
// Color springs
|
|
49
63
|
ColorMotionValue,
|
|
64
|
+
motionValue,
|
|
65
|
+
useAnimationFrame,
|
|
50
66
|
useColorMotionValue,
|
|
51
67
|
useColorSpring,
|
|
68
|
+
useMotionValue,
|
|
69
|
+
useMotionValueEvent,
|
|
70
|
+
useSpring,
|
|
71
|
+
useSpringRenderer,
|
|
72
|
+
useSprings,
|
|
52
73
|
} from "./motion/index.js"
|
|
53
|
-
export type { SpringOptions, MotionValue, RGBA, ColorInput } from "./motion/index.js"
|
|
54
|
-
|
|
55
74
|
// Types
|
|
56
|
-
export type {
|
|
57
|
-
export type {
|
|
58
|
-
|
|
59
|
-
export type { VStackProps } from "./hosts/vstack.js"
|
|
60
|
-
export type { HStackProps } from "./hosts/hstack.js"
|
|
61
|
-
export type { ZStackProps } from "./hosts/zstack.js"
|
|
62
|
-
export type { BoxProps, BorderKind } from "./hosts/box.js"
|
|
63
|
-
export type { CanvasProps, DrawContext } from "./hosts/canvas.js"
|
|
64
|
-
export type { ScrollProps } from "./hosts/scroll.js"
|
|
65
|
-
|
|
66
|
-
// Debug
|
|
67
|
-
export { DiagnosticsPanel } from "./debug/DiagnosticsPanel.js"
|
|
68
|
-
|
|
69
|
-
// Input components
|
|
70
|
-
export { TextInput, type TextInputProps } from "./components/index.js"
|
|
71
|
-
export { MultilineTextInput, type MultilineTextInputProps } from "./components/index.js"
|
|
72
|
-
export { Markdown, type MarkdownProps, type MarkdownTheme } from "./components/index.js"
|
|
73
|
-
export { Static, type StaticProps } from "./components/index.js"
|
|
74
|
-
export { Overlay, type OverlayProps, type OverlayItemProps } from "./components/index.js"
|
|
75
|
-
|
|
76
|
-
// Development utilities (HMR)
|
|
75
|
+
export type { CommonProps, HostContext, HostInstance, Rect, Size } from "./reconciler/types.js"
|
|
76
|
+
export type { FrameStats, RendererOptions, RenderInstance, Root, TuiRenderer } from "./renderer.js"
|
|
77
|
+
// Renderer
|
|
77
78
|
export {
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
} from "./dev.js"
|
|
79
|
+
createRenderer,
|
|
80
|
+
createRoot,
|
|
81
|
+
RendererContext,
|
|
82
|
+
render,
|
|
83
|
+
useRenderer,
|
|
84
|
+
useTerminalSize,
|
|
85
|
+
} from "./renderer.js"
|
|
86
86
|
|
|
87
87
|
// JSX types are provided via jsxImportSource: "@effect-tui/react"
|
|
88
88
|
// See jsx-runtime.ts at package root for the JSX namespace
|
package/src/inline/index.tsx
CHANGED
|
@@ -7,8 +7,8 @@
|
|
|
7
7
|
// }).pipe(Effect.provide(InlineRendererLive))
|
|
8
8
|
// Effect.runPromise(program)
|
|
9
9
|
|
|
10
|
-
import { Context, Effect, Either, Layer } from "effect"
|
|
11
10
|
import { Colors } from "@effect-tui/core"
|
|
11
|
+
import { Context, Effect, Either, Layer } from "effect"
|
|
12
12
|
import { createRenderer, createRoot } from "../renderer.js"
|
|
13
13
|
|
|
14
14
|
// Spinner frames
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* ColorMotionValue - animates RGBA colors using 4 internal numeric springs.
|
|
3
3
|
*/
|
|
4
4
|
|
|
5
|
-
import { parseColor, type RGBA
|
|
5
|
+
import { type ColorInput, parseColor, type RGBA } from "./color.js"
|
|
6
6
|
import { EventEmitter } from "./event-emitter.js"
|
|
7
7
|
import { MotionValue } from "./motion-value.js"
|
|
8
8
|
import type { SpringOptions } from "./types.js"
|
package/src/motion/color.test.ts
CHANGED
package/src/motion/color.ts
CHANGED
package/src/motion/hooks.ts
CHANGED
|
@@ -4,11 +4,11 @@
|
|
|
4
4
|
|
|
5
5
|
import { useCallback, useEffect, useRef } from "react"
|
|
6
6
|
import { useRenderer } from "../renderer.js"
|
|
7
|
-
import {
|
|
7
|
+
import type { ColorInput } from "./color.js"
|
|
8
8
|
import { ColorMotionValue } from "./color-motion-value.js"
|
|
9
|
-
import type { SpringOptions } from "./types.js"
|
|
10
9
|
import type { EventName, Subscriber } from "./event-emitter.js"
|
|
11
|
-
import
|
|
10
|
+
import { MotionValue } from "./motion-value.js"
|
|
11
|
+
import type { SpringOptions } from "./types.js"
|
|
12
12
|
|
|
13
13
|
// Global requestRender callback - set by useSpringRenderer hook
|
|
14
14
|
let globalRequestRender: (() => void) | null = null
|
package/src/motion/index.ts
CHANGED
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
// Motion-inspired animation system for TUI
|
|
2
2
|
// Analytical spring physics (not Euler integration) + setTimeout-based frame loop
|
|
3
3
|
|
|
4
|
-
export
|
|
4
|
+
export { useAnimationFrame } from "./frame.js"
|
|
5
|
+
export type { ColorInput, MotionValue, RGBA, SpringOptions } from "./motion-value.js"
|
|
5
6
|
export {
|
|
6
|
-
motionValue,
|
|
7
|
-
useMotionValue,
|
|
8
|
-
useSpring,
|
|
9
|
-
useSprings,
|
|
10
|
-
useSpringRenderer,
|
|
11
|
-
useMotionValueEvent,
|
|
12
7
|
// Color springs
|
|
13
8
|
ColorMotionValue,
|
|
9
|
+
motionValue,
|
|
14
10
|
useColorMotionValue,
|
|
15
11
|
useColorSpring,
|
|
12
|
+
useMotionValue,
|
|
13
|
+
useMotionValueEvent,
|
|
14
|
+
useSpring,
|
|
15
|
+
useSpringRenderer,
|
|
16
|
+
useSprings,
|
|
16
17
|
} from "./motion-value.js"
|
|
17
|
-
export { useAnimationFrame } from "./frame.js"
|
|
@@ -3,10 +3,10 @@
|
|
|
3
3
|
* Inspired by framer-motion's MotionValue.
|
|
4
4
|
*/
|
|
5
5
|
|
|
6
|
-
import { subscribeFrame } from "./frame.js"
|
|
7
6
|
import { EventEmitter } from "./event-emitter.js"
|
|
7
|
+
import { subscribeFrame } from "./frame.js"
|
|
8
8
|
import { createSpringResolver, springFromVisualDuration } from "./spring-math.js"
|
|
9
|
-
import { type SpringOptions
|
|
9
|
+
import { DEFAULT_SPRING_OPTIONS, type SpringOptions } from "./types.js"
|
|
10
10
|
|
|
11
11
|
/** Create a MotionValue. Factory function like Motion's motionValue(). */
|
|
12
12
|
export function motionValue<T>(initial: T): MotionValue<T> {
|
|
@@ -123,18 +123,18 @@ export class MotionValue<T = number> extends EventEmitter<T> {
|
|
|
123
123
|
}
|
|
124
124
|
}
|
|
125
125
|
|
|
126
|
-
|
|
127
|
-
export { type SpringOptions, DEFAULT_SPRING_OPTIONS } from "./types.js"
|
|
128
|
-
export type { EventName, Subscriber } from "./event-emitter.js"
|
|
129
|
-
export { createSpringResolver, springFromVisualDuration, isSpringSettled } from "./spring-math.js"
|
|
126
|
+
export type { ColorInput, RGBA } from "./color.js"
|
|
130
127
|
export { ColorMotionValue } from "./color-motion-value.js"
|
|
128
|
+
export type { EventName, Subscriber } from "./event-emitter.js"
|
|
131
129
|
export {
|
|
130
|
+
useColorMotionValue,
|
|
131
|
+
useColorSpring,
|
|
132
132
|
useMotionValue,
|
|
133
|
+
useMotionValueEvent,
|
|
133
134
|
useSpring,
|
|
134
|
-
useSprings,
|
|
135
135
|
useSpringRenderer,
|
|
136
|
-
|
|
137
|
-
useColorMotionValue,
|
|
138
|
-
useColorSpring,
|
|
136
|
+
useSprings,
|
|
139
137
|
} from "./hooks.js"
|
|
140
|
-
export
|
|
138
|
+
export { createSpringResolver, isSpringSettled, springFromVisualDuration } from "./spring-math.js"
|
|
139
|
+
// Re-export everything for backwards compatibility
|
|
140
|
+
export { DEFAULT_SPRING_OPTIONS, type SpringOptions } from "./types.js"
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import Reconciler from "react-reconciler"
|
|
2
1
|
import { createContext } from "react"
|
|
3
|
-
import
|
|
4
|
-
import { createHostInstance, createTextInstance, type RawTextHost
|
|
2
|
+
import Reconciler from "react-reconciler"
|
|
3
|
+
import { type BaseHost, createHostInstance, createTextInstance, type RawTextHost } from "../hosts/index.js"
|
|
5
4
|
import { noopMethods } from "./noop-methods.js"
|
|
5
|
+
import type { HostContext, HostInstance } from "./types.js"
|
|
6
6
|
|
|
7
7
|
// ============================================================================
|
|
8
8
|
// Type Definitions
|
package/src/reconciler/types.ts
CHANGED
package/src/remote/Procedures.ts
CHANGED
|
@@ -47,10 +47,4 @@ const Info = Rpc.make("Info", {
|
|
|
47
47
|
})
|
|
48
48
|
|
|
49
49
|
// Group all RPCs together
|
|
50
|
-
export class TuiRpcs extends RpcGroup.make(
|
|
51
|
-
Screenshot,
|
|
52
|
-
SendKey,
|
|
53
|
-
Paste,
|
|
54
|
-
Resize,
|
|
55
|
-
Info,
|
|
56
|
-
) {}
|
|
50
|
+
export class TuiRpcs extends RpcGroup.make(Screenshot, SendKey, Paste, Resize, Info) {}
|
package/src/remote/Router.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
// RPC handlers for remote session control
|
|
2
2
|
import type { Rpc } from "@effect/rpc"
|
|
3
|
-
import { Effect, Layer, Context } from "effect"
|
|
4
3
|
import type { KeyMsg } from "@effect-tui/core"
|
|
4
|
+
import { Context, Effect, type Layer } from "effect"
|
|
5
5
|
import { TuiRpcs } from "./Procedures.js"
|
|
6
6
|
|
|
7
7
|
// Service interface for the TUI session
|
|
@@ -19,10 +19,7 @@ export interface TuiSessionImpl {
|
|
|
19
19
|
}
|
|
20
20
|
}
|
|
21
21
|
|
|
22
|
-
export class TuiSession extends Context.Tag("TuiSession")<
|
|
23
|
-
TuiSession,
|
|
24
|
-
TuiSessionImpl
|
|
25
|
-
>() {}
|
|
22
|
+
export class TuiSession extends Context.Tag("TuiSession")<TuiSession, TuiSessionImpl>() {}
|
|
26
23
|
|
|
27
24
|
// Create the RPC handlers layer
|
|
28
25
|
export const HandlersLive: Layer.Layer<
|
|
@@ -55,8 +52,7 @@ export const HandlersLive: Layer.Layer<
|
|
|
55
52
|
|
|
56
53
|
Paste: ({ text }) => Effect.sync(() => session.dispatchPaste(text)),
|
|
57
54
|
|
|
58
|
-
Resize: ({ width, height }) =>
|
|
59
|
-
Effect.sync(() => session.dispatchResize(width, height)),
|
|
55
|
+
Resize: ({ width, height }) => Effect.sync(() => session.dispatchResize(width, height)),
|
|
60
56
|
|
|
61
57
|
Info: () => Effect.sync(() => session.getInfo()),
|
|
62
58
|
}
|
package/src/remote/Server.ts
CHANGED
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
// Remote server that exposes TUI session via Unix socket
|
|
2
|
-
|
|
3
|
-
import { RpcSerialization, RpcServer } from "@effect/rpc"
|
|
4
|
-
import { BunSocketServer } from "@effect/platform-bun"
|
|
2
|
+
|
|
5
3
|
import * as fs from "node:fs"
|
|
6
4
|
import * as path from "node:path"
|
|
5
|
+
import { BunSocketServer } from "@effect/platform-bun"
|
|
6
|
+
import { RpcSerialization, RpcServer } from "@effect/rpc"
|
|
7
|
+
import { Effect, Layer } from "effect"
|
|
7
8
|
import { TuiRpcs } from "./Procedures.js"
|
|
8
9
|
import { HandlersLive, TuiSession, type TuiSessionImpl } from "./Router.js"
|
|
9
10
|
|
|
@@ -18,8 +19,7 @@ const ensureSocketDir = Effect.sync(() => {
|
|
|
18
19
|
})
|
|
19
20
|
|
|
20
21
|
// Get socket path for current process
|
|
21
|
-
export const getSocketPath = (pid?: number) =>
|
|
22
|
-
path.join(SOCKET_DIR, `${pid ?? process.pid}.sock`)
|
|
22
|
+
export const getSocketPath = (pid?: number) => path.join(SOCKET_DIR, `${pid ?? process.pid}.sock`)
|
|
23
23
|
|
|
24
24
|
// Clean up socket file
|
|
25
25
|
const cleanupSocket = (socketPath: string) =>
|
|
@@ -34,10 +34,7 @@ const cleanupSocket = (socketPath: string) =>
|
|
|
34
34
|
})
|
|
35
35
|
|
|
36
36
|
// Create the server layer
|
|
37
|
-
export const makeServerLayer = (
|
|
38
|
-
sessionImpl: TuiSessionImpl,
|
|
39
|
-
socketPath?: string,
|
|
40
|
-
) => {
|
|
37
|
+
export const makeServerLayer = (sessionImpl: TuiSessionImpl, socketPath?: string) => {
|
|
41
38
|
const actualPath = socketPath ?? getSocketPath()
|
|
42
39
|
|
|
43
40
|
// Setup layer - creates directory, cleans stale socket
|
|
@@ -52,9 +49,7 @@ export const makeServerLayer = (
|
|
|
52
49
|
)
|
|
53
50
|
|
|
54
51
|
// RPC handlers layer (needs TuiSession)
|
|
55
|
-
const HandlersLayer = HandlersLive.pipe(
|
|
56
|
-
Layer.provide(Layer.succeed(TuiSession, sessionImpl)),
|
|
57
|
-
)
|
|
52
|
+
const HandlersLayer = HandlersLive.pipe(Layer.provide(Layer.succeed(TuiSession, sessionImpl)))
|
|
58
53
|
|
|
59
54
|
// Full RPC server stack:
|
|
60
55
|
// 1. RpcServer.layer creates the RPC server, needs handlers
|
package/src/remote/index.ts
CHANGED
|
@@ -8,14 +8,14 @@
|
|
|
8
8
|
// 2. Connect using etui CLI or raw socket at /tmp/effect-tui-sessions/<pid>.sock
|
|
9
9
|
|
|
10
10
|
export { TuiRpcs } from "./Procedures.js"
|
|
11
|
-
export {
|
|
12
|
-
export {
|
|
11
|
+
export { HandlersLive, TuiSession } from "./Router.js"
|
|
12
|
+
export { getSocketPath, makeServerLayer } from "./Server.js"
|
|
13
13
|
|
|
14
|
-
import { Effect, Exit, Layer, Scope } from "effect"
|
|
15
14
|
import * as fs from "node:fs"
|
|
15
|
+
import { Effect, Exit, Layer, Scope } from "effect"
|
|
16
16
|
import type { TuiRenderer } from "../renderer-types.js"
|
|
17
17
|
import type { TuiSessionImpl } from "./Router.js"
|
|
18
|
-
import {
|
|
18
|
+
import { getSocketPath, makeServerLayer } from "./Server.js"
|
|
19
19
|
|
|
20
20
|
export interface EnableRemoteOptions {
|
|
21
21
|
/** Custom socket path (defaults to /tmp/effect-tui-sessions/<pid>.sock) */
|
|
@@ -55,13 +55,9 @@ function deriveSessionName(entryPath: string): string {
|
|
|
55
55
|
* @param options - Socket path and entry path for session identification
|
|
56
56
|
* @returns A cleanup function to stop the server
|
|
57
57
|
*/
|
|
58
|
-
export function enableRemote(
|
|
59
|
-
renderer: TuiRenderer,
|
|
60
|
-
options?: EnableRemoteOptions | string,
|
|
61
|
-
): () => void {
|
|
58
|
+
export function enableRemote(renderer: TuiRenderer, options?: EnableRemoteOptions | string): () => void {
|
|
62
59
|
// Support old API: enableRemote(renderer, socketPath?)
|
|
63
|
-
const opts: EnableRemoteOptions =
|
|
64
|
-
typeof options === "string" ? { socketPath: options } : options ?? {}
|
|
60
|
+
const opts: EnableRemoteOptions = typeof options === "string" ? { socketPath: options } : (options ?? {})
|
|
65
61
|
const actualPath = opts.socketPath ?? getSocketPath()
|
|
66
62
|
|
|
67
63
|
// Derive session name from entry path
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { performance } from "node:perf_hooks"
|
|
2
2
|
import type { CellBuffer, Palette } from "@effect-tui/core"
|
|
3
|
-
import type { HostInstance } from "../../reconciler/types.js"
|
|
4
3
|
import * as Prof from "../../profiler.js"
|
|
4
|
+
import type { HostInstance } from "../../reconciler/types.js"
|
|
5
5
|
|
|
6
6
|
export interface FrameTimings {
|
|
7
7
|
clear: number
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ANSI, Terminal } from "@effect-tui/core"
|
|
2
|
-
import type {
|
|
2
|
+
import type { TuiReadStream, TuiWriteStream } from "../../renderer-types.js"
|
|
3
3
|
|
|
4
4
|
export interface TerminalSetupConfig {
|
|
5
5
|
mode: "fullscreen" | "inline"
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
export { EventBus } from "./EventBus.js"
|
|
2
|
+
export { ResizeManager, type ResizeResult, type ResizeState } from "./ResizeManager.js"
|
|
2
3
|
export { TerminalSetup, type TerminalSetupConfig } from "./TerminalSetup.js"
|
|
3
|
-
export { ResizeManager, type ResizeState, type ResizeResult } from "./ResizeManager.js"
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ANSI, emitRowWithReset, rowChanged } from "@effect-tui/core"
|
|
2
|
-
import type {
|
|
2
|
+
import type { RenderContext, RendererMode, RenderOutput } from "./RendererMode.js"
|
|
3
3
|
|
|
4
4
|
/**
|
|
5
5
|
* Fullscreen rendering mode using alternate buffer.
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { ANSI, emitRowWithReset,
|
|
2
|
-
import type {
|
|
1
|
+
import { ANSI, emitRowWithReset, findChangeWindow, rowContentWidth } from "@effect-tui/core"
|
|
2
|
+
import type { RenderContext, RendererMode, RenderOutput } from "./RendererMode.js"
|
|
3
3
|
|
|
4
4
|
/**
|
|
5
5
|
* Inline rendering mode that renders in-place without alternate buffer.
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { CellBuffer, emitRowWithReset,
|
|
1
|
+
import { CellBuffer, emitRowWithReset, type Palette, rowContentWidth } from "@effect-tui/core"
|
|
2
2
|
import type { HostInstance } from "../../reconciler/types.js"
|
|
3
3
|
import type { TuiWriteStream } from "../../renderer-types.js"
|
|
4
4
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export type { RendererMode, RenderContext, RenderOutput } from "./RendererMode.js"
|
|
2
1
|
export { FullscreenRenderer } from "./FullscreenRenderer.js"
|
|
3
2
|
export { InlineRenderer } from "./InlineRenderer.js"
|
|
3
|
+
export type { RenderContext, RendererMode, RenderOutput } from "./RendererMode.js"
|
|
4
4
|
export { StaticContentRenderer } from "./StaticContentRenderer.js"
|
package/src/renderer-context.ts
CHANGED
package/src/renderer-types.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { KeyMsg, MouseMsg } from "@effect-tui/core"
|
|
2
|
-
import type {
|
|
2
|
+
import type { HostContext, HostInstance } from "./reconciler/types.js"
|
|
3
3
|
|
|
4
4
|
/** Minimal write stream interface for renderer output */
|
|
5
5
|
export interface TuiWriteStream {
|
package/src/renderer.ts
CHANGED
|
@@ -1,30 +1,29 @@
|
|
|
1
|
-
import React, { type ReactNode } from "react"
|
|
2
1
|
import { performance } from "node:perf_hooks"
|
|
3
|
-
import { ANSI, type KeyMsg, type MouseMsg
|
|
4
|
-
import {
|
|
5
|
-
import type { HostContext } from "./reconciler/types.js"
|
|
6
|
-
import * as Prof from "./profiler.js"
|
|
2
|
+
import { ANSI, bufferToString, type KeyMsg, type MouseMsg } from "@effect-tui/core"
|
|
3
|
+
import React, { type ReactNode } from "react"
|
|
7
4
|
import { DEFAULT_FPS } from "./constants.js"
|
|
5
|
+
import * as Prof from "./profiler.js"
|
|
6
|
+
import { flushSync, reconciler } from "./reconciler/host-config.js"
|
|
7
|
+
import type { HostContext } from "./reconciler/types.js"
|
|
8
|
+
// Extracted modules
|
|
9
|
+
import { FrameBuilder, RendererState } from "./renderer/core/index.js"
|
|
10
|
+
import { InputProcessor } from "./renderer/input/index.js"
|
|
11
|
+
import { EventBus, TerminalSetup } from "./renderer/lifecycle/index.js"
|
|
12
|
+
import { FullscreenRenderer, InlineRenderer, StaticContentRenderer } from "./renderer/modes/index.js"
|
|
13
|
+
import { RendererContext } from "./renderer-context.js"
|
|
8
14
|
import type {
|
|
9
|
-
|
|
15
|
+
Container,
|
|
16
|
+
FrameStats,
|
|
17
|
+
RendererOptions,
|
|
10
18
|
TuiReadStream,
|
|
11
19
|
TuiRenderer,
|
|
12
20
|
TuiRendererInternal,
|
|
13
|
-
|
|
14
|
-
RendererOptions,
|
|
15
|
-
FrameStats,
|
|
21
|
+
TuiWriteStream,
|
|
16
22
|
} from "./renderer-types.js"
|
|
17
|
-
import { RendererContext } from "./renderer-context.js"
|
|
18
23
|
|
|
19
|
-
// Extracted modules
|
|
20
|
-
import { RendererState, FrameBuilder } from "./renderer/core/index.js"
|
|
21
|
-
import { InputProcessor } from "./renderer/input/index.js"
|
|
22
|
-
import { EventBus, TerminalSetup } from "./renderer/lifecycle/index.js"
|
|
23
|
-
import { FullscreenRenderer, InlineRenderer, StaticContentRenderer } from "./renderer/modes/index.js"
|
|
24
|
-
|
|
25
|
-
// Re-export types and context for backwards compatibility
|
|
26
|
-
export type { TuiWriteStream, TuiReadStream, TuiRenderer, RendererOptions, FrameStats } from "./renderer-types.js"
|
|
27
24
|
export { RendererContext, useRenderer, useTerminalSize } from "./renderer-context.js"
|
|
25
|
+
// Re-export types and context for backwards compatibility
|
|
26
|
+
export type { FrameStats, RendererOptions, TuiReadStream, TuiRenderer, TuiWriteStream } from "./renderer-types.js"
|
|
28
27
|
|
|
29
28
|
export function createRenderer(options?: RendererOptions): TuiRenderer {
|
|
30
29
|
const fps = options?.fps ?? DEFAULT_FPS
|
|
@@ -167,7 +166,7 @@ export function createRenderer(options?: RendererOptions): TuiRenderer {
|
|
|
167
166
|
})
|
|
168
167
|
|
|
169
168
|
// Combine static + dynamic output for atomic write
|
|
170
|
-
|
|
169
|
+
const output = staticOutput + modeOutput + state.palette.sgr(0)
|
|
171
170
|
contentH = contentHeight
|
|
172
171
|
const diffAnsiMs = performance.now() - diffStartMs
|
|
173
172
|
Prof.endPhase("diff+ansi", t)
|
package/src/test/index.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
export { renderTUI, type RenderTUIOptions, type RenderTUIResult } from "./render-tui.js"
|
|
2
1
|
export {
|
|
3
|
-
MockStdout,
|
|
4
|
-
MockStdin,
|
|
5
2
|
encodeKey,
|
|
6
|
-
stripAnsi,
|
|
7
3
|
getVisibleLines,
|
|
4
|
+
MockStdin,
|
|
5
|
+
MockStdout,
|
|
6
|
+
stripAnsi,
|
|
8
7
|
} from "./mock-streams.js"
|
|
8
|
+
export { type RenderTUIOptions, type RenderTUIResult, renderTUI } from "./render-tui.js"
|