源码快照 @ 2026-09-01 (source-only, 剔除非源码素材)
Publish Claude Code Binaries / Stage and publish binaries (push) Canceled after 0s
Publish Tutti App Runtime / Build darwin-arm64 (push) Canceled after 0s
Publish Tutti App Runtime / Build darwin-amd64 (push) Canceled after 0s
Publish Tutti App Runtime / Build linux-amd64 (push) Canceled after 0s
Publish Tutti App Runtime / Build windows-amd64 (push) Canceled after 0s
Sync Tutti Agent Skills / sync (push) Canceled after 0s
Windows Agent Adapters / Test Windows agent adapters (push) Canceled after 0s
Windows Daemon Adapters / Test Windows daemon adapters (push) Canceled after 0s
Publish Tutti App Runtime / Publish runtime catalog (push) Canceled after 0s
Publish Claude Code Binaries / Stage and publish binaries (push) Canceled after 0s
Publish Tutti App Runtime / Build darwin-arm64 (push) Canceled after 0s
Publish Tutti App Runtime / Build darwin-amd64 (push) Canceled after 0s
Publish Tutti App Runtime / Build linux-amd64 (push) Canceled after 0s
Publish Tutti App Runtime / Build windows-amd64 (push) Canceled after 0s
Sync Tutti Agent Skills / sync (push) Canceled after 0s
Windows Agent Adapters / Test Windows agent adapters (push) Canceled after 0s
Windows Daemon Adapters / Test Windows daemon adapters (push) Canceled after 0s
Publish Tutti App Runtime / Publish runtime catalog (push) Canceled after 0s
This commit is contained in:
commit
2ed3415fb7
8018 files changed
+1936476
No files matched your search
@@ -0,0 +1,3 @@
|
||||
.tutti-ui-system-dev/
|
||||
dist/
|
||||
node_modules/
|
||||
@@ -0,0 +1,12 @@
|
||||
<!doctype html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||
<title>Tutti UI System External Vite Fixture</title>
|
||||
</head>
|
||||
<body>
|
||||
<div id="root"></div>
|
||||
<script type="module" src="/src/main.tsx"></script>
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,26 @@
|
||||
{
|
||||
"name": "@tutti-os/fixture-ui-system-external-vite",
|
||||
"version": "0.0.0",
|
||||
"private": true,
|
||||
"type": "module",
|
||||
"scripts": {
|
||||
"build": "vite build",
|
||||
"dev": "vite dev",
|
||||
"smoke:serve": "vite dev --host 127.0.0.1 --port 4179 --strictPort"
|
||||
},
|
||||
"dependencies": {
|
||||
"@tutti-os/ui-system": "workspace:*",
|
||||
"react": "^19.1.0",
|
||||
"react-dom": "^19.1.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@tailwindcss/vite": "^4.1.8",
|
||||
"@types/node": "^24.0.1",
|
||||
"@types/react": "^19.1.6",
|
||||
"@types/react-dom": "^19.1.5",
|
||||
"@vitejs/plugin-react": "^4.5.2",
|
||||
"tailwindcss": "^4.1.8",
|
||||
"typescript": "^5.8.3",
|
||||
"vite": "^6.3.5"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,29 @@
|
||||
import { createRoot } from "react-dom/client";
|
||||
|
||||
import { Button } from "@tutti-os/ui-system";
|
||||
import "@tutti-os/ui-system/styles.css";
|
||||
import "./style.css";
|
||||
|
||||
export function FixtureApp() {
|
||||
return (
|
||||
<main className="fixture-shell">
|
||||
<section className="fixture-panel" aria-labelledby="fixture-title">
|
||||
<p className="fixture-kicker">External Vite fixture</p>
|
||||
<h1 id="fixture-title">Tutti UI System</h1>
|
||||
<p className="fixture-copy">
|
||||
This app consumes the stable package entrypoints and renders a real UI
|
||||
system button.
|
||||
</p>
|
||||
<Button type="button">Rendered with Button</Button>
|
||||
</section>
|
||||
</main>
|
||||
);
|
||||
}
|
||||
|
||||
const rootElement = document.getElementById("root");
|
||||
|
||||
if (rootElement === null) {
|
||||
throw new Error("Fixture root element was not found");
|
||||
}
|
||||
|
||||
createRoot(rootElement).render(<FixtureApp />);
|
||||
@@ -0,0 +1,68 @@
|
||||
@import "tailwindcss";
|
||||
@source ".";
|
||||
@source "../../../../packages/ui/system/src";
|
||||
@source "../.tutti-ui-system-dev";
|
||||
@source "../node_modules/@tutti-os/ui-system/dist";
|
||||
@reference "@tutti-os/ui-system/styles.css";
|
||||
|
||||
:root {
|
||||
color: #1f2937;
|
||||
background: #f6f7f9;
|
||||
font-family:
|
||||
Inter,
|
||||
ui-sans-serif,
|
||||
system-ui,
|
||||
-apple-system,
|
||||
BlinkMacSystemFont,
|
||||
"Segoe UI",
|
||||
sans-serif;
|
||||
font-synthesis: none;
|
||||
text-rendering: optimizeLegibility;
|
||||
}
|
||||
|
||||
* {
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
body {
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
.fixture-shell {
|
||||
display: grid;
|
||||
min-height: 100vh;
|
||||
place-items: center;
|
||||
padding: 32px;
|
||||
}
|
||||
|
||||
.fixture-panel {
|
||||
width: min(100%, 520px);
|
||||
border: 1px solid #d7dde5;
|
||||
border-radius: 8px;
|
||||
background: #ffffff;
|
||||
box-shadow: 0 16px 48px rgb(15 23 42 / 0.08);
|
||||
padding: 28px;
|
||||
}
|
||||
|
||||
.fixture-kicker {
|
||||
margin: 0 0 8px;
|
||||
color: #52606d;
|
||||
font-size: 0.78rem;
|
||||
font-weight: 700;
|
||||
letter-spacing: 0;
|
||||
text-transform: uppercase;
|
||||
}
|
||||
|
||||
.fixture-panel h1 {
|
||||
margin: 0;
|
||||
color: #111827;
|
||||
font-size: 1.9rem;
|
||||
line-height: 1.15;
|
||||
}
|
||||
|
||||
.fixture-copy {
|
||||
margin: 12px 0 20px;
|
||||
color: #4b5563;
|
||||
font-size: 0.95rem;
|
||||
line-height: 1.6;
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
{
|
||||
"extends": "../../../packages/configs/tsconfig/base.json",
|
||||
"compilerOptions": {
|
||||
"jsx": "react-jsx",
|
||||
"types": ["node", "vite/client"]
|
||||
},
|
||||
"include": ["vite.config.ts", "src/**/*"]
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
import tailwindcss from "@tailwindcss/vite";
|
||||
import react from "@vitejs/plugin-react";
|
||||
import { defineConfig } from "vite";
|
||||
|
||||
import { tuttiUISystemDev } from "@tutti-os/ui-system/dev-vite";
|
||||
|
||||
export default defineConfig({
|
||||
plugins: [react(), tailwindcss(), tuttiUISystemDev()]
|
||||
});
|
||||
@@ -0,0 +1,11 @@
|
||||
<!doctype html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||
<title>Workspace File Manager Vite Asset Fixture</title>
|
||||
</head>
|
||||
<body>
|
||||
<script type="module" src="/src/main.ts"></script>
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,19 @@
|
||||
{
|
||||
"name": "@tutti-os/fixture-workspace-file-manager-external-vite",
|
||||
"version": "0.0.0",
|
||||
"private": true,
|
||||
"type": "module",
|
||||
"scripts": {
|
||||
"build": "vite build",
|
||||
"test": "pnpm --filter @tutti-os/workspace-file-manager build && node ./vite-dev-assets.test.mjs"
|
||||
},
|
||||
"dependencies": {
|
||||
"@tutti-os/workspace-file-manager": "workspace:*",
|
||||
"react": "^19.1.0",
|
||||
"react-dom": "^19.1.0",
|
||||
"valtio": "^2.3.2"
|
||||
},
|
||||
"devDependencies": {
|
||||
"vite": "^6.3.5"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
import { WorkspaceFileEntryIcon } from "@tutti-os/workspace-file-manager";
|
||||
|
||||
globalThis.__workspaceFileManagerFixture = WorkspaceFileEntryIcon;
|
||||
@@ -0,0 +1,53 @@
|
||||
import assert from "node:assert/strict";
|
||||
import { dirname } from "node:path";
|
||||
import { fileURLToPath } from "node:url";
|
||||
|
||||
import { createServer } from "vite";
|
||||
|
||||
const fixtureRoot = dirname(fileURLToPath(import.meta.url));
|
||||
const server = await createServer({
|
||||
configFile: fileURLToPath(new URL("./vite.config.ts", import.meta.url)),
|
||||
logLevel: "error",
|
||||
root: fixtureRoot,
|
||||
server: {
|
||||
host: "127.0.0.1",
|
||||
port: 0
|
||||
}
|
||||
});
|
||||
|
||||
try {
|
||||
await server.listen();
|
||||
const address = server.httpServer?.address();
|
||||
assert.ok(address && typeof address !== "string");
|
||||
const origin = `http://127.0.0.1:${address.port}`;
|
||||
|
||||
const entrySource = await fetchText(`${origin}/src/main.ts`);
|
||||
const optimizedModulePath = matchFirst(
|
||||
entrySource,
|
||||
/from\s+["']([^"']*@tutti-os_workspace-file-manager[^"']*)["']/u,
|
||||
"optimized workspace-file-manager module"
|
||||
);
|
||||
const optimizedSource = await fetchText(
|
||||
new URL(optimizedModulePath, origin).href
|
||||
);
|
||||
assert.doesNotMatch(
|
||||
optimizedSource,
|
||||
/workspace-(?:archive|folder)-fallback\.png/u
|
||||
);
|
||||
assert.match(optimizedSource, /FileArchiveIcon/u);
|
||||
assert.match(optimizedSource, /FolderFilledIcon/u);
|
||||
} finally {
|
||||
await server.close();
|
||||
}
|
||||
|
||||
async function fetchText(url) {
|
||||
const response = await fetch(url);
|
||||
assert.equal(response.status, 200, `${url} should be served`);
|
||||
return response.text();
|
||||
}
|
||||
|
||||
function matchFirst(source, pattern, label) {
|
||||
const match = source.match(pattern);
|
||||
assert.ok(match?.[1], `expected ${label}`);
|
||||
return match[1];
|
||||
}
|
||||
@@ -0,0 +1,22 @@
|
||||
import { fileURLToPath } from "node:url";
|
||||
|
||||
import { defineConfig } from "vite";
|
||||
|
||||
const packageRoot = new URL(
|
||||
"../../../packages/workspace/file-manager/dist/",
|
||||
import.meta.url
|
||||
);
|
||||
|
||||
export default defineConfig({
|
||||
optimizeDeps: {
|
||||
include: ["@tutti-os/workspace-file-manager"]
|
||||
},
|
||||
resolve: {
|
||||
alias: [
|
||||
{
|
||||
find: /^@tutti-os\/workspace-file-manager$/u,
|
||||
replacement: fileURLToPath(new URL("index.js", packageRoot))
|
||||
}
|
||||
]
|
||||
}
|
||||
});
|
||||
Reference in new issue
Block a user