feat: complete TASK-WP0-01 toolchain skeleton

This commit is contained in:
suyx
2026-07-27 17:13:01 +08:00
parent 67e7a17d96
commit ae20eaf01f
39 changed files with 3588 additions and 0 deletions
+16
View File
@@ -0,0 +1,16 @@
import { StrictMode } from "react";
import { createRoot } from "react-dom/client";
import { ToolchainProbe } from "./toolchain-probe.js";
const root = document.getElementById("root");
if (!root) {
throw new Error("Dada web root element is missing.");
}
createRoot(root).render(
<StrictMode>
<ToolchainProbe />
</StrictMode>,
);
+21
View File
@@ -0,0 +1,21 @@
import { Rect, version as fabricVersion } from "fabric";
import { renderToStaticMarkup } from "react-dom/server";
export function ToolchainProbe() {
return <canvas aria-label="Dada toolchain probe" height={16} width={16} />;
}
export function renderToolchainProbe() {
const reactMarkup = renderToStaticMarkup(<ToolchainProbe />);
const fabricSvg = new Rect({
fill: "#111111",
height: 16,
width: 16,
}).toSVG();
return {
fabricSvg,
fabricVersion,
reactMarkup,
};
}