critique 0.0.0
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/AGENTS.md +59 -0
- package/README.md +34 -0
- package/bun.lock +84 -0
- package/diff-viewer-demo.png +0 -0
- package/index.tsx +1244 -0
- package/package.json +20 -0
- package/transparency-repro.tsx +32 -0
- package/tsconfig.json +31 -0
package/package.json
ADDED
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "critique",
|
|
3
|
+
"module": "src/index.tsx",
|
|
4
|
+
"type": "module",
|
|
5
|
+
"version": "0.0.0",
|
|
6
|
+
"private": false,
|
|
7
|
+
"devDependencies": {
|
|
8
|
+
"@types/bun": "latest"
|
|
9
|
+
},
|
|
10
|
+
"peerDependencies": {
|
|
11
|
+
"typescript": "^5"
|
|
12
|
+
},
|
|
13
|
+
"dependencies": {
|
|
14
|
+
"@opentui/core": "^0.1.25",
|
|
15
|
+
"@opentui/react": "^0.1.25",
|
|
16
|
+
"diff": "^8.0.2",
|
|
17
|
+
"react": "^19.1.1",
|
|
18
|
+
"react-error-boundary": "^6.0.0"
|
|
19
|
+
}
|
|
20
|
+
}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { RGBA } from "@opentui/core";
|
|
2
|
+
import { render } from "@opentui/react";
|
|
3
|
+
import * as React from "react";
|
|
4
|
+
|
|
5
|
+
function TransparencyDemo() {
|
|
6
|
+
// Using RGBA.fromInts - this works
|
|
7
|
+
const workingColor = RGBA.fromInts(255, 0, 0, 128); // Red with 50% opacity
|
|
8
|
+
|
|
9
|
+
return (
|
|
10
|
+
<box style={{ flexDirection: "column", padding: 2 }}>
|
|
11
|
+
<text>Transparency Bug Repro</text>
|
|
12
|
+
|
|
13
|
+
<box style={{ flexDirection: "row", marginTop: 2, gap: 2 }}>
|
|
14
|
+
<box style={{ flexDirection: "column" }}>
|
|
15
|
+
<text>✅ Works (RGBA.fromInts)</text>
|
|
16
|
+
<box style={{ padding: 3, backgroundColor: workingColor, marginTop: 1 }}>
|
|
17
|
+
<text>Semi-transparent red</text>
|
|
18
|
+
</box>
|
|
19
|
+
</box>
|
|
20
|
+
|
|
21
|
+
<box style={{ flexDirection: "column" }}>
|
|
22
|
+
<text>❌ Doesn't work (hex with alpha)</text>
|
|
23
|
+
<box style={{ padding: 3, backgroundColor: "#ff000080", marginTop: 1 }}>
|
|
24
|
+
<text>Should be semi-transparent</text>
|
|
25
|
+
</box>
|
|
26
|
+
</box>
|
|
27
|
+
</box>
|
|
28
|
+
</box>
|
|
29
|
+
);
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
await render(<TransparencyDemo />);
|
package/tsconfig.json
ADDED
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
{
|
|
2
|
+
"compilerOptions": {
|
|
3
|
+
// Environment setup & latest features
|
|
4
|
+
"lib": ["ESNext"],
|
|
5
|
+
"target": "ESNext",
|
|
6
|
+
"module": "Preserve",
|
|
7
|
+
"moduleDetection": "force",
|
|
8
|
+
"jsx": "react-jsx",
|
|
9
|
+
"jsxImportSource": "@opentui/react",
|
|
10
|
+
"allowJs": true,
|
|
11
|
+
|
|
12
|
+
"noImplicitAny": false,
|
|
13
|
+
// Bundler mode
|
|
14
|
+
"moduleResolution": "bundler",
|
|
15
|
+
"allowImportingTsExtensions": true,
|
|
16
|
+
"verbatimModuleSyntax": true,
|
|
17
|
+
"noEmit": true,
|
|
18
|
+
|
|
19
|
+
// Best practices
|
|
20
|
+
"strict": true,
|
|
21
|
+
"skipLibCheck": true,
|
|
22
|
+
"noFallthroughCasesInSwitch": true,
|
|
23
|
+
"noUncheckedIndexedAccess": true,
|
|
24
|
+
"noImplicitOverride": true,
|
|
25
|
+
|
|
26
|
+
// Some stricter flags (disabled by default)
|
|
27
|
+
"noUnusedLocals": false,
|
|
28
|
+
"noUnusedParameters": false,
|
|
29
|
+
"noPropertyAccessFromIndexSignature": false
|
|
30
|
+
}
|
|
31
|
+
}
|