Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
588 changes: 326 additions & 262 deletions .pnp.cjs

Large diffs are not rendered by default.

106 changes: 78 additions & 28 deletions .pnp.loader.mjs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions examples/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ runExit(class Main extends Command {
}

async executeJsApi(streams: ScreenStreams) {
const {default: demo} = await import(path.resolve(this.examplePath));
const demo = await import(path.resolve(this.examplePath));

return run(streams, screen => {
const animate = demo.run(screen);
Expand All @@ -54,7 +54,7 @@ runExit(class Main extends Command {
}

async executeJsxApi(streams: ScreenStreams) {
const {default: demo} = await import(path.resolve(this.examplePath));
const demo = await import(path.resolve(this.examplePath));

return render(streams, React.createElement(demo.App));
}
Expand Down
12 changes: 6 additions & 6 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "terminosaurus",
"version": "3.0.0-rc.5",
"packageManager": "yarn@4.1.0+sha224.bc24d7f5afc738464f3d4e95f4e6e7829a35cee54a0fd527ea5baa83",
"packageManager": "yarn@4.6.0+sha256.eaf1eeabc164a44ca0b65dbdccd54af7e55f3ff9294b3ff318d5aaec92f2b20b",
"workspaces": [
"website"
],
Expand Down Expand Up @@ -29,7 +29,7 @@
"@xterm/addon-fit": "^0.9.0",
"mono-layout": "^0.14.3",
"node-pty": "1.1.0-beta27",
"react-reconciler": "^0.29.0",
"react-reconciler": "^0.31.0",
"react-refresh": "^0.14.0",
"term-strings": "^0.16.2",
"vscode-oniguruma": "^1.7.0",
Expand All @@ -41,20 +41,20 @@
"@anthropic-ai/sdk": "^0.18.0",
"@reduxjs/toolkit": "^2.5.0",
"@types/node": "^20.11.24",
"@types/react": "^18.0.26",
"@types/react-reconciler": "^0.28.0",
"@types/react": "^19.0.10",
"@types/react-reconciler": "^0.28.9",
"@types/react-refresh": "^0.14.0",
"@types/zen-observable": "^0.8.3",
"@xterm/xterm": "^5.4.0",
"clipanion": "^3.2.1",
"esbuild": "^0.20.1",
"lorem-ipsum": "^2.0.8",
"ollama": "^0.5.12",
"react": "^18.2.0",
"react": "^19.0.0",
"react-redux": "^9.2.0",
"tailwindcss": "^3.4.1",
"tsx": "^4.7.1",
"typescript": "^5.3.3",
"typescript": "^5.7.3",
"vitest": "^1.3.1"
},
"peerDependencies": {
Expand Down
3 changes: 2 additions & 1 deletion sources/react.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import {RunOptions, TermScreen} from '
import {run} from '#sources/index';
import {Rect} from '#sources/misc/Rect';
import {ReactElement} from '#sources/react/Tree';
import { ConcurrentRoot } from 'react-reconciler/constants';

export * from '#sources/index';

Expand Down Expand Up @@ -106,7 +107,7 @@ export async function render(arg1: RunOptions | React.ReactNode, arg2?: React.Re
await run(opts, screen => {
const onRecoverableError = () => {};

container = Reconciler.createContainer(new ReactElement(screen.rootNode), 0, null, false, null, `term-`, onRecoverableError, null);
container = Reconciler.createContainer(new ReactElement(screen.rootNode), ConcurrentRoot, null, false, null, `term-`, onRecoverableError, null);
Reconciler.updateContainer(wrap(element, {screen}), container, null, null);
});

Expand Down
4 changes: 2 additions & 2 deletions sources/react/ElementMap.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/* eslint-disable @typescript-eslint/naming-convention */

import React, {LegacyRef} from 'react';
import React from 'react';

import {TermElement} from '#sources/dom/TermElement';
import {TermCanvas} from '#sources/elements/TermCanvas';
Expand Down Expand Up @@ -34,7 +34,7 @@ type AllReactPropsFor<T extends object> = {
[K in Extract<keyof T, string> as K extends CheckIsProp<T, K> ? K : never]?: T[K];
};

declare global {
declare module 'react' {
namespace JSX {
interface IntrinsicElements {
'term:button': AllReactPropsFor<TermButton> & AllReactEventsFor<TermButton> & HasChildren;
Expand Down
Loading