@leanspec/ui 0.2.14 → 0.2.15-dev.21025278490
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/bin/leanspec-ui.js +191 -0
- package/dist/assets/_baseUniq-CRqreL7N.js +1 -0
- package/dist/assets/arc-DMhx9AJT.js +1 -0
- package/dist/assets/architectureDiagram-VXUJARFQ-DM0L0YzO.js +36 -0
- package/dist/assets/blockDiagram-VD42YOAC-DHQXDHsD.js +122 -0
- package/dist/assets/c4Diagram-YG6GDRKO-0L7o2gpH.js +10 -0
- package/dist/assets/channel-2tOl0nAZ.js +1 -0
- package/dist/assets/chunk-4BX2VUAB-CwFT-Uaj.js +1 -0
- package/dist/assets/chunk-55IACEB6-CjvuUHHG.js +1 -0
- package/dist/assets/chunk-B4BG7PRW-BRJBysMK.js +165 -0
- package/dist/assets/chunk-DI55MBZ5-BnNEeoaA.js +220 -0
- package/dist/assets/chunk-FMBD7UC4-BK2l30pm.js +15 -0
- package/dist/assets/chunk-QN33PNHL-BN_cZkCU.js +1 -0
- package/dist/assets/chunk-QZHKN3VN-Brc3Yrub.js +1 -0
- package/dist/assets/chunk-TZMSLE5B-D2zzpLfO.js +1 -0
- package/dist/assets/classDiagram-2ON5EDUG-BB9CSNmS.js +1 -0
- package/dist/assets/classDiagram-v2-WZHVMYZB-BB9CSNmS.js +1 -0
- package/dist/assets/clone-BjxVFtyI.js +1 -0
- package/dist/assets/core-DV6XEvTN.js +1 -0
- package/dist/assets/cose-bilkent-S5V4N54A-CLJgM3XR.js +1 -0
- package/dist/assets/cytoscape.esm-5J0xJHOV.js +321 -0
- package/dist/assets/dagre-6UL2VRFP-_IFvBJKJ.js +4 -0
- package/dist/assets/diagram-PSM6KHXK--83HIYSQ.js +24 -0
- package/dist/assets/diagram-QEK2KX5R-6jAWnCnZ.js +43 -0
- package/dist/assets/diagram-S2PKOQOG-D5pwHvjZ.js +24 -0
- package/dist/assets/erDiagram-Q2GNP2WA-B4FV3mTd.js +60 -0
- package/dist/assets/flowDiagram-NV44I4VS-mtD2kF4M.js +162 -0
- package/dist/assets/ganttDiagram-JELNMOA3-BKALgqTK.js +267 -0
- package/dist/assets/gitGraphDiagram-NY62KEGX-Bd7r0pAf.js +65 -0
- package/dist/assets/graph-B2rEI7cK.js +1 -0
- package/dist/assets/index-Bekv_o1t.css +1 -0
- package/dist/assets/index-DSRxU-E5.js +389 -0
- package/dist/assets/infoDiagram-WHAUD3N6--nJOBKqh.js +2 -0
- package/dist/assets/journeyDiagram-XKPGCS4Q-BzGutKN3.js +139 -0
- package/dist/assets/kanban-definition-3W4ZIXB7-DyQO17vq.js +89 -0
- package/dist/assets/katex-XbL3y5x-.js +261 -0
- package/dist/assets/layout-iCSHU015.js +1 -0
- package/dist/assets/min-BK_AIJdo.js +1 -0
- package/dist/assets/mindmap-definition-VGOIOE7T-BZMj_6zo.js +68 -0
- package/dist/assets/pieDiagram-ADFJNKIX-CkAGsq9p.js +30 -0
- package/dist/assets/quadrantDiagram-AYHSOK5B-CWa93px1.js +7 -0
- package/dist/assets/requirementDiagram-UZGBJVZJ-CufFVR8c.js +64 -0
- package/dist/assets/sankeyDiagram-TZEHDZUN-BEPgVgU4.js +10 -0
- package/dist/assets/sequenceDiagram-WL72ISMW-BkdBWhel.js +145 -0
- package/dist/assets/stateDiagram-FKZM4ZOC-D5T73yx0.js +1 -0
- package/dist/assets/stateDiagram-v2-4FDKWEC3-9hJWG2n6.js +1 -0
- package/dist/assets/timeline-definition-IT6M3QCI-CX7kTdU2.js +61 -0
- package/dist/assets/treemap-KMMF4GRG-ftWCQ9lJ.js +128 -0
- package/dist/assets/xychartDiagram-PRI3JC2R-Ngrels4n.js +7 -0
- package/{index.html → dist/index.html} +2 -1
- package/package.json +12 -2
- package/eslint.config.js +0 -23
- package/package.json.backup +0 -83
- package/postcss.config.js +0 -6
- package/src/App.css +0 -42
- package/src/App.tsx +0 -17
- package/src/assets/react.svg +0 -1
- package/src/components/LanguageSwitcher.tsx +0 -67
- package/src/components/Layout.tsx +0 -88
- package/src/components/MainSidebar.tsx +0 -163
- package/src/components/MermaidDiagram.tsx +0 -85
- package/src/components/MinimalLayout.tsx +0 -51
- package/src/components/Navigation.tsx +0 -254
- package/src/components/PriorityBadge.tsx +0 -59
- package/src/components/ProjectSwitcher.tsx +0 -222
- package/src/components/QuickSearch.tsx +0 -225
- package/src/components/RootRedirect.tsx +0 -40
- package/src/components/SpecDetailLayout.context.ts +0 -10
- package/src/components/SpecDetailLayout.tsx +0 -14
- package/src/components/SpecsNavSidebar.tsx +0 -615
- package/src/components/StatusBadge.tsx +0 -59
- package/src/components/ThemeToggle.tsx +0 -25
- package/src/components/Tooltip.tsx +0 -29
- package/src/components/context/ContextClient.tsx +0 -471
- package/src/components/context/ContextFileDetail.tsx +0 -163
- package/src/components/dashboard/ActivityItem.tsx +0 -36
- package/src/components/dashboard/DashboardClient.tsx +0 -218
- package/src/components/dashboard/SpecListItem.tsx +0 -58
- package/src/components/dashboard/StatCard.tsx +0 -52
- package/src/components/dependencies/SpecNode.tsx +0 -128
- package/src/components/dependencies/SpecSidebar.tsx +0 -256
- package/src/components/dependencies/constants.ts +0 -25
- package/src/components/dependencies/types.ts +0 -38
- package/src/components/dependencies/utils.ts +0 -261
- package/src/components/metadata-editors/PriorityEditor.tsx +0 -89
- package/src/components/metadata-editors/StatusEditor.tsx +0 -85
- package/src/components/metadata-editors/TagsEditor.tsx +0 -207
- package/src/components/projects/CreateProjectDialog.tsx +0 -162
- package/src/components/projects/DirectoryPicker.tsx +0 -182
- package/src/components/shared/BackToTop.tsx +0 -39
- package/src/components/shared/ColorPicker.tsx +0 -68
- package/src/components/shared/EmptyState.tsx +0 -35
- package/src/components/shared/ErrorBoundary.tsx +0 -79
- package/src/components/shared/PageHeader.tsx +0 -23
- package/src/components/shared/PageTransition.tsx +0 -40
- package/src/components/shared/ProjectAvatar.tsx +0 -107
- package/src/components/shared/Skeletons.tsx +0 -184
- package/src/components/spec-detail/EditableMetadata.tsx +0 -129
- package/src/components/spec-detail/MarkdownRenderer.tsx +0 -47
- package/src/components/spec-detail/TableOfContents.tsx +0 -150
- package/src/components/specs/BoardView.tsx +0 -204
- package/src/components/specs/ListView.tsx +0 -62
- package/src/components/specs/SpecsFilters.tsx +0 -190
- package/src/contexts/KeyboardShortcutsContext.tsx +0 -95
- package/src/contexts/LayoutContext.tsx +0 -45
- package/src/contexts/ProjectContext.tsx +0 -163
- package/src/contexts/ThemeContext.tsx +0 -90
- package/src/contexts/index.ts +0 -7
- package/src/hooks/useKeyboardShortcuts.ts +0 -87
- package/src/index.css +0 -624
- package/src/lib/api.ts +0 -72
- package/src/lib/backend-adapter.ts +0 -382
- package/src/lib/date-utils.ts +0 -122
- package/src/lib/i18n.test.ts +0 -57
- package/src/lib/i18n.ts +0 -51
- package/src/lib/markdown-utils.ts +0 -38
- package/src/lib/sub-spec-utils.ts +0 -166
- package/src/lib/utils.ts +0 -6
- package/src/locales/en/common.json +0 -660
- package/src/locales/en/errors.json +0 -20
- package/src/locales/en/help.json +0 -8
- package/src/locales/zh-CN/common.json +0 -660
- package/src/locales/zh-CN/errors.json +0 -20
- package/src/locales/zh-CN/help.json +0 -8
- package/src/main.tsx +0 -12
- package/src/pages/ContextPage.tsx +0 -111
- package/src/pages/DashboardPage.tsx +0 -97
- package/src/pages/DependenciesPage.tsx +0 -881
- package/src/pages/ProjectsPage.tsx +0 -432
- package/src/pages/SpecDetailPage.tsx +0 -592
- package/src/pages/SpecsPage.tsx +0 -319
- package/src/pages/StatsPage.tsx +0 -307
- package/src/router/projectRoutes.tsx +0 -36
- package/src/router.tsx +0 -33
- package/src/test/setup.ts +0 -39
- package/src/types/api.ts +0 -185
- package/tailwind.config.ts +0 -57
- package/tsconfig.app.json +0 -29
- package/tsconfig.json +0 -7
- package/tsconfig.node.json +0 -26
- package/tsconfig.tsbuildinfo +0 -1
- package/vite.config.ts +0 -27
- package/vitest.config.ts +0 -18
- /package/{public → dist}/favicon.ico +0 -0
- /package/{public → dist}/github-mark-white.svg +0 -0
- /package/{public → dist}/github-mark.svg +0 -0
- /package/{public → dist}/logo-dark-bg.svg +0 -0
- /package/{public → dist}/logo-with-bg.svg +0 -0
- /package/{public → dist}/logo.svg +0 -0
- /package/{public → dist}/vite.svg +0 -0
|
@@ -1,166 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Sub-spec styling utilities
|
|
3
|
-
*
|
|
4
|
-
* Auto-assigns icons and colors to sub-spec files based on filename patterns.
|
|
5
|
-
* This is a presentation concern and lives in the frontend.
|
|
6
|
-
*/
|
|
7
|
-
|
|
8
|
-
import type { LucideIcon } from 'lucide-react';
|
|
9
|
-
import {
|
|
10
|
-
Palette,
|
|
11
|
-
Map,
|
|
12
|
-
Code,
|
|
13
|
-
TestTube,
|
|
14
|
-
CheckSquare,
|
|
15
|
-
Wrench,
|
|
16
|
-
GitBranch,
|
|
17
|
-
TrendingUp,
|
|
18
|
-
FileText,
|
|
19
|
-
Network,
|
|
20
|
-
Rocket,
|
|
21
|
-
Shield,
|
|
22
|
-
Database,
|
|
23
|
-
Lightbulb,
|
|
24
|
-
BookOpen,
|
|
25
|
-
} from 'lucide-react';
|
|
26
|
-
|
|
27
|
-
interface SubSpecStyle {
|
|
28
|
-
icon: LucideIcon;
|
|
29
|
-
color: string;
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
interface PatternConfig {
|
|
33
|
-
keywords: string[];
|
|
34
|
-
icon: LucideIcon;
|
|
35
|
-
color: string;
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
const PATTERNS: PatternConfig[] = [
|
|
39
|
-
// Architecture & Structure (check before Design since "system-design" should be Architecture)
|
|
40
|
-
{
|
|
41
|
-
keywords: ['architecture', 'system', 'structure', 'diagram'],
|
|
42
|
-
icon: Map,
|
|
43
|
-
color: 'text-indigo-600',
|
|
44
|
-
},
|
|
45
|
-
// Design & UI
|
|
46
|
-
{
|
|
47
|
-
keywords: ['ui', 'ux', 'mockup', 'wireframe', 'prototype', 'design'],
|
|
48
|
-
icon: Palette,
|
|
49
|
-
color: 'text-purple-600',
|
|
50
|
-
},
|
|
51
|
-
// Implementation & Code
|
|
52
|
-
{
|
|
53
|
-
keywords: ['implementation', 'code', 'develop', 'build'],
|
|
54
|
-
icon: Code,
|
|
55
|
-
color: 'text-green-600',
|
|
56
|
-
},
|
|
57
|
-
// API & Integration
|
|
58
|
-
{
|
|
59
|
-
keywords: ['api', 'endpoint', 'integration', 'interface'],
|
|
60
|
-
icon: Network,
|
|
61
|
-
color: 'text-blue-600',
|
|
62
|
-
},
|
|
63
|
-
// Testing & QA
|
|
64
|
-
{
|
|
65
|
-
keywords: ['test', 'qa', 'quality', 'validation'],
|
|
66
|
-
icon: TestTube,
|
|
67
|
-
color: 'text-orange-600',
|
|
68
|
-
},
|
|
69
|
-
// Tasks & PM
|
|
70
|
-
{
|
|
71
|
-
keywords: ['task', 'todo', 'checklist', 'milestone'],
|
|
72
|
-
icon: CheckSquare,
|
|
73
|
-
color: 'text-slate-600',
|
|
74
|
-
},
|
|
75
|
-
// Configuration & Setup
|
|
76
|
-
{
|
|
77
|
-
keywords: ['config', 'setup', 'settings', 'environment'],
|
|
78
|
-
icon: Wrench,
|
|
79
|
-
color: 'text-amber-600',
|
|
80
|
-
},
|
|
81
|
-
// Deployment & DevOps
|
|
82
|
-
{
|
|
83
|
-
keywords: ['deploy', 'devops', 'ci', 'cd', 'pipeline', 'release'],
|
|
84
|
-
icon: Rocket,
|
|
85
|
-
color: 'text-rose-600',
|
|
86
|
-
},
|
|
87
|
-
// Migration & Updates
|
|
88
|
-
{
|
|
89
|
-
keywords: ['migration', 'upgrade', 'refactor', 'transition'],
|
|
90
|
-
icon: GitBranch,
|
|
91
|
-
color: 'text-cyan-600',
|
|
92
|
-
},
|
|
93
|
-
// Security
|
|
94
|
-
{
|
|
95
|
-
keywords: ['security', 'auth', 'permission', 'access', 'encryption'],
|
|
96
|
-
icon: Shield,
|
|
97
|
-
color: 'text-red-600',
|
|
98
|
-
},
|
|
99
|
-
// Performance
|
|
100
|
-
{
|
|
101
|
-
keywords: ['performance', 'optimization', 'speed', 'cache', 'benchmark'],
|
|
102
|
-
icon: TrendingUp,
|
|
103
|
-
color: 'text-emerald-600',
|
|
104
|
-
},
|
|
105
|
-
// Data
|
|
106
|
-
{
|
|
107
|
-
keywords: ['database', 'data', 'schema', 'model', 'query'],
|
|
108
|
-
icon: Database,
|
|
109
|
-
color: 'text-sky-600',
|
|
110
|
-
},
|
|
111
|
-
// Notes & Research
|
|
112
|
-
{
|
|
113
|
-
keywords: ['notes', 'research', 'findings', 'considerations', 'exploration'],
|
|
114
|
-
icon: Lightbulb,
|
|
115
|
-
color: 'text-yellow-600',
|
|
116
|
-
},
|
|
117
|
-
// Docs
|
|
118
|
-
{
|
|
119
|
-
keywords: ['doc', 'guide', 'manual', 'reference', 'readme'],
|
|
120
|
-
icon: BookOpen,
|
|
121
|
-
color: 'text-gray-500',
|
|
122
|
-
},
|
|
123
|
-
// Git
|
|
124
|
-
{
|
|
125
|
-
keywords: ['github', 'git', 'vcs', 'version'],
|
|
126
|
-
icon: GitBranch,
|
|
127
|
-
color: 'text-pink-600',
|
|
128
|
-
},
|
|
129
|
-
];
|
|
130
|
-
|
|
131
|
-
const DEFAULT_STYLE: SubSpecStyle = {
|
|
132
|
-
icon: FileText,
|
|
133
|
-
color: 'text-gray-600',
|
|
134
|
-
};
|
|
135
|
-
|
|
136
|
-
/**
|
|
137
|
-
* Determines icon and color for a sub-spec based on its filename
|
|
138
|
-
*/
|
|
139
|
-
export function getSubSpecStyle(fileName: string): SubSpecStyle {
|
|
140
|
-
const lower = fileName.toLowerCase();
|
|
141
|
-
|
|
142
|
-
for (const pattern of PATTERNS) {
|
|
143
|
-
if (pattern.keywords.some(keyword => lower.includes(keyword))) {
|
|
144
|
-
return {
|
|
145
|
-
icon: pattern.icon,
|
|
146
|
-
color: pattern.color,
|
|
147
|
-
};
|
|
148
|
-
}
|
|
149
|
-
}
|
|
150
|
-
|
|
151
|
-
return DEFAULT_STYLE;
|
|
152
|
-
}
|
|
153
|
-
|
|
154
|
-
/**
|
|
155
|
-
* Formats sub-spec file name into a display name
|
|
156
|
-
* Examples:
|
|
157
|
-
* - "IMPLEMENTATION.md" -> "Implementation"
|
|
158
|
-
* - "api-design.md" -> "Api Design"
|
|
159
|
-
*/
|
|
160
|
-
export function formatSubSpecName(fileName: string): string {
|
|
161
|
-
return fileName
|
|
162
|
-
.replace(/\.md$/i, '')
|
|
163
|
-
.split(/[-_]/)
|
|
164
|
-
.map(word => word.charAt(0).toUpperCase() + word.slice(1).toLowerCase())
|
|
165
|
-
.join(' ');
|
|
166
|
-
}
|