Skip to content

Commit 7c65332

Browse files
committed
chore: improved use-cases
1 parent a6ff091 commit 7c65332

20 files changed

Lines changed: 554 additions & 212 deletions

.github/banner.svg

Lines changed: 2 additions & 2 deletions
Loading

.github/dataflow.svg

Lines changed: 9 additions & 9 deletions
Loading

.github/lifecycle.svg

Lines changed: 4 additions & 4 deletions
Loading

.github/sanitization.svg

Lines changed: 7 additions & 7 deletions
Loading

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,4 +14,4 @@ node_modules
1414
!.yarn/cache
1515
#.pnp.*
1616
.vscode
17-
lib
17+
/lib

usecases/basic/App.tsx

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,7 @@ import { createTodo, deleteTodo, editTodo } from '~usecases/lib/store/actions';
77
import type { Todo } from '~usecases/lib/store/types';
88
import { generateId, simulateAPIRequest } from '~usecases/lib/utils/mock-api';
99

10-
const C = ({ children }: { children: string }) => <code className="text-emerald-400 font-mono text-[11px]">{children}</code>;
11-
const O = ({ children }: { children: string }) => <code className="text-blue-400 font-mono text-[11px]">{children}</code>;
12-
const F = ({ children }: { children: string }) => <code className="text-amber-400 font-mono text-[11px]">{children}</code>;
13-
const X = ({ children }: { children: string }) => <code className="text-red-400 font-mono text-[11px]">{children}</code>;
10+
import { C, F, O, X } from '~usecases/lib/components/todo/CodeTags';
1411

1512
const description: UsecaseDescription = {
1613
subtitle: 'Component-level async — the simplest optimistic pattern.',

usecases/index.html

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,14 +13,23 @@
1313
colors: {
1414
surface: { 0: '#0f1117', 1: '#161820', 2: '#1c1f2b', 3: '#252836' },
1515
border: { subtle: '#2a2d3a', DEFAULT: '#353849' },
16+
/** Semantic optimistron palette — single source for Tailwind classes */
17+
oc: {
18+
stage: '#4ade80',
19+
commit: '#38bdf8',
20+
amend: '#c4b5fd',
21+
fail: '#f472b6',
22+
stash: '#facc15',
23+
conflict: '#fb923c',
24+
muted: '#484f58',
25+
},
1626
},
1727
},
1828
},
1929
};
2030
</script>
21-
<script src="https://cdn.jsdelivr.net/npm/mermaid@10.7.0/dist/mermaid.min.js"></script>
2231
<title>Optimistron usecases</title>
23-
<link rel="stylesheet" href="./dist/styles.css" />
32+
<link rel="stylesheet" href="./dist/index.css" />
2433
</head>
2534
<body class="h-screen bg-surface-0 text-gray-200">
2635
<div id="root" class="flex items-center justify-center w-screen h-screen font-medium"></div>

0 commit comments

Comments
 (0)