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
11 changes: 0 additions & 11 deletions .babelrc

This file was deleted.

2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,5 @@
node_modules
dist
.idea
**/*.js

73 changes: 73 additions & 0 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
{
// Use IntelliSense to learn about possible attributes.
// Hover to view descriptions of existing attributes.
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
{
"type": "node",
"request": "launch",
"name": "Debug AVA test file",
"runtimeExecutable": "${workspaceFolder}/node_modules/.bin/ava",
"runtimeArgs": [
"debug",
"--break",
"${file}"
],
"port": 9229,
"outputCapture": "std",
"skipFiles": [
"<node_internals>/**/*.js"
]
},
{
"type": "node",
"request": "attach",
"name": "Attach",
"port": 9229,
// "skipFiles": [
// "<node_internals>/**"
// ]
},
{
"type": "node",
"request": "launch",
"name": "Mocha All",
"program": "${workspaceFolder}/node_modules/mocha/bin/_mocha",
"args": [
"--timeout",
"999999",
"--colors",
"${workspaceFolder}/test"
],
"console": "integratedTerminal",
"internalConsoleOptions": "neverOpen"
},
{
"type": "node",
"request": "launch",
"name": "Mocha Current File",
"program": "${workspaceFolder}/node_modules/mocha/bin/_mocha",
"args": [
"--timeout",
"999999",
"--colors",
"${file}"
],
"console": "integratedTerminal",
"internalConsoleOptions": "neverOpen"
},
{
"type": "node",
"request": "launch",
"name": "Launch Program",
"skipFiles": [
"<node_internals>/**"
],
"program": "${workspaceFolder}/src/index.js",
"outFiles": [
"${workspaceFolder}/**/*.js"
]
}
]
}
16 changes: 0 additions & 16 deletions examples/animation.jsx

This file was deleted.

41 changes: 0 additions & 41 deletions examples/components/AnimatedBox.jsx

This file was deleted.

34 changes: 34 additions & 0 deletions examples/components/AnimatedBox.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
import React from "react";

export function AnimatedBox(props: {
// 10%, 100%
width?: string;
// 10%, 100%
height?: string;
time?: number;
initialPosition?: number;
}) {
const [position, setPosition] = React.useState(props.initialPosition || 0);
const [dir, setDir] = React.useState(true);

React.useEffect(() => {
const iv = setInterval(() => {
const newDirection = position === (dir ? 90 : 0) ? !dir : dir;
setDir(newDirection);
const newPosition = newDirection ? position + 1 : position - 1;
setPosition(newPosition);
}, props.time || 33.333333);
return () => clearInterval(iv);
});

return (
<box
border={{ type: "line" }}
height={props.height || "20%"}
left={position + "%"}
style={{ bg: "cyan", border: { fg: "blue" } }}
top="center"
width={props.width || "10%"}
/>
);
}
67 changes: 0 additions & 67 deletions examples/context.jsx

This file was deleted.

Loading