@leanspec/ui 0.2.13 → 0.2.15-dev.21022397862

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.
Files changed (149) hide show
  1. package/bin/leanspec-ui.js +191 -0
  2. package/dist/assets/_baseUniq-CRqreL7N.js +1 -0
  3. package/dist/assets/arc-DMhx9AJT.js +1 -0
  4. package/dist/assets/architectureDiagram-VXUJARFQ-DM0L0YzO.js +36 -0
  5. package/dist/assets/blockDiagram-VD42YOAC-DHQXDHsD.js +122 -0
  6. package/dist/assets/c4Diagram-YG6GDRKO-0L7o2gpH.js +10 -0
  7. package/dist/assets/channel-2tOl0nAZ.js +1 -0
  8. package/dist/assets/chunk-4BX2VUAB-CwFT-Uaj.js +1 -0
  9. package/dist/assets/chunk-55IACEB6-CjvuUHHG.js +1 -0
  10. package/dist/assets/chunk-B4BG7PRW-BRJBysMK.js +165 -0
  11. package/dist/assets/chunk-DI55MBZ5-BnNEeoaA.js +220 -0
  12. package/dist/assets/chunk-FMBD7UC4-BK2l30pm.js +15 -0
  13. package/dist/assets/chunk-QN33PNHL-BN_cZkCU.js +1 -0
  14. package/dist/assets/chunk-QZHKN3VN-Brc3Yrub.js +1 -0
  15. package/dist/assets/chunk-TZMSLE5B-D2zzpLfO.js +1 -0
  16. package/dist/assets/classDiagram-2ON5EDUG-BB9CSNmS.js +1 -0
  17. package/dist/assets/classDiagram-v2-WZHVMYZB-BB9CSNmS.js +1 -0
  18. package/dist/assets/clone-BjxVFtyI.js +1 -0
  19. package/dist/assets/core-DV6XEvTN.js +1 -0
  20. package/dist/assets/cose-bilkent-S5V4N54A-CLJgM3XR.js +1 -0
  21. package/dist/assets/cytoscape.esm-5J0xJHOV.js +321 -0
  22. package/dist/assets/dagre-6UL2VRFP-_IFvBJKJ.js +4 -0
  23. package/dist/assets/diagram-PSM6KHXK--83HIYSQ.js +24 -0
  24. package/dist/assets/diagram-QEK2KX5R-6jAWnCnZ.js +43 -0
  25. package/dist/assets/diagram-S2PKOQOG-D5pwHvjZ.js +24 -0
  26. package/dist/assets/erDiagram-Q2GNP2WA-B4FV3mTd.js +60 -0
  27. package/dist/assets/flowDiagram-NV44I4VS-mtD2kF4M.js +162 -0
  28. package/dist/assets/ganttDiagram-JELNMOA3-BKALgqTK.js +267 -0
  29. package/dist/assets/gitGraphDiagram-NY62KEGX-Bd7r0pAf.js +65 -0
  30. package/dist/assets/graph-B2rEI7cK.js +1 -0
  31. package/dist/assets/index-Bekv_o1t.css +1 -0
  32. package/dist/assets/index-DSRxU-E5.js +389 -0
  33. package/dist/assets/infoDiagram-WHAUD3N6--nJOBKqh.js +2 -0
  34. package/dist/assets/journeyDiagram-XKPGCS4Q-BzGutKN3.js +139 -0
  35. package/dist/assets/kanban-definition-3W4ZIXB7-DyQO17vq.js +89 -0
  36. package/dist/assets/katex-XbL3y5x-.js +261 -0
  37. package/dist/assets/layout-iCSHU015.js +1 -0
  38. package/dist/assets/min-BK_AIJdo.js +1 -0
  39. package/dist/assets/mindmap-definition-VGOIOE7T-BZMj_6zo.js +68 -0
  40. package/dist/assets/pieDiagram-ADFJNKIX-CkAGsq9p.js +30 -0
  41. package/dist/assets/quadrantDiagram-AYHSOK5B-CWa93px1.js +7 -0
  42. package/dist/assets/requirementDiagram-UZGBJVZJ-CufFVR8c.js +64 -0
  43. package/dist/assets/sankeyDiagram-TZEHDZUN-BEPgVgU4.js +10 -0
  44. package/dist/assets/sequenceDiagram-WL72ISMW-BkdBWhel.js +145 -0
  45. package/dist/assets/stateDiagram-FKZM4ZOC-D5T73yx0.js +1 -0
  46. package/dist/assets/stateDiagram-v2-4FDKWEC3-9hJWG2n6.js +1 -0
  47. package/dist/assets/timeline-definition-IT6M3QCI-CX7kTdU2.js +61 -0
  48. package/dist/assets/treemap-KMMF4GRG-ftWCQ9lJ.js +128 -0
  49. package/dist/assets/xychartDiagram-PRI3JC2R-Ngrels4n.js +7 -0
  50. package/{index.html → dist/index.html} +2 -1
  51. package/package.json +13 -3
  52. package/eslint.config.js +0 -23
  53. package/postcss.config.js +0 -6
  54. package/src/App.css +0 -42
  55. package/src/App.tsx +0 -17
  56. package/src/assets/react.svg +0 -1
  57. package/src/components/LanguageSwitcher.tsx +0 -67
  58. package/src/components/Layout.tsx +0 -88
  59. package/src/components/MainSidebar.tsx +0 -163
  60. package/src/components/MermaidDiagram.tsx +0 -85
  61. package/src/components/MinimalLayout.tsx +0 -51
  62. package/src/components/Navigation.tsx +0 -254
  63. package/src/components/PriorityBadge.tsx +0 -59
  64. package/src/components/ProjectSwitcher.tsx +0 -222
  65. package/src/components/QuickSearch.tsx +0 -225
  66. package/src/components/RootRedirect.tsx +0 -40
  67. package/src/components/SpecDetailLayout.context.ts +0 -10
  68. package/src/components/SpecDetailLayout.tsx +0 -14
  69. package/src/components/SpecsNavSidebar.tsx +0 -615
  70. package/src/components/StatusBadge.tsx +0 -59
  71. package/src/components/ThemeToggle.tsx +0 -25
  72. package/src/components/Tooltip.tsx +0 -29
  73. package/src/components/context/ContextClient.tsx +0 -471
  74. package/src/components/context/ContextFileDetail.tsx +0 -163
  75. package/src/components/dashboard/ActivityItem.tsx +0 -36
  76. package/src/components/dashboard/DashboardClient.tsx +0 -218
  77. package/src/components/dashboard/SpecListItem.tsx +0 -58
  78. package/src/components/dashboard/StatCard.tsx +0 -52
  79. package/src/components/dependencies/SpecNode.tsx +0 -128
  80. package/src/components/dependencies/SpecSidebar.tsx +0 -256
  81. package/src/components/dependencies/constants.ts +0 -25
  82. package/src/components/dependencies/types.ts +0 -38
  83. package/src/components/dependencies/utils.ts +0 -261
  84. package/src/components/metadata-editors/PriorityEditor.tsx +0 -89
  85. package/src/components/metadata-editors/StatusEditor.tsx +0 -85
  86. package/src/components/metadata-editors/TagsEditor.tsx +0 -207
  87. package/src/components/projects/CreateProjectDialog.tsx +0 -162
  88. package/src/components/projects/DirectoryPicker.tsx +0 -182
  89. package/src/components/shared/BackToTop.tsx +0 -39
  90. package/src/components/shared/ColorPicker.tsx +0 -68
  91. package/src/components/shared/EmptyState.tsx +0 -35
  92. package/src/components/shared/ErrorBoundary.tsx +0 -79
  93. package/src/components/shared/PageHeader.tsx +0 -23
  94. package/src/components/shared/PageTransition.tsx +0 -40
  95. package/src/components/shared/ProjectAvatar.tsx +0 -107
  96. package/src/components/shared/Skeletons.tsx +0 -184
  97. package/src/components/spec-detail/EditableMetadata.tsx +0 -129
  98. package/src/components/spec-detail/MarkdownRenderer.tsx +0 -47
  99. package/src/components/spec-detail/TableOfContents.tsx +0 -150
  100. package/src/components/specs/BoardView.tsx +0 -204
  101. package/src/components/specs/ListView.tsx +0 -62
  102. package/src/components/specs/SpecsFilters.tsx +0 -190
  103. package/src/contexts/KeyboardShortcutsContext.tsx +0 -95
  104. package/src/contexts/LayoutContext.tsx +0 -45
  105. package/src/contexts/ProjectContext.tsx +0 -163
  106. package/src/contexts/ThemeContext.tsx +0 -90
  107. package/src/contexts/index.ts +0 -7
  108. package/src/hooks/useKeyboardShortcuts.ts +0 -87
  109. package/src/index.css +0 -624
  110. package/src/lib/api.ts +0 -72
  111. package/src/lib/backend-adapter.ts +0 -382
  112. package/src/lib/date-utils.ts +0 -122
  113. package/src/lib/i18n.test.ts +0 -57
  114. package/src/lib/i18n.ts +0 -51
  115. package/src/lib/markdown-utils.ts +0 -38
  116. package/src/lib/sub-spec-utils.ts +0 -166
  117. package/src/lib/utils.ts +0 -6
  118. package/src/locales/en/common.json +0 -660
  119. package/src/locales/en/errors.json +0 -20
  120. package/src/locales/en/help.json +0 -8
  121. package/src/locales/zh-CN/common.json +0 -660
  122. package/src/locales/zh-CN/errors.json +0 -20
  123. package/src/locales/zh-CN/help.json +0 -8
  124. package/src/main.tsx +0 -12
  125. package/src/pages/ContextPage.tsx +0 -111
  126. package/src/pages/DashboardPage.tsx +0 -97
  127. package/src/pages/DependenciesPage.tsx +0 -881
  128. package/src/pages/ProjectsPage.tsx +0 -432
  129. package/src/pages/SpecDetailPage.tsx +0 -592
  130. package/src/pages/SpecsPage.tsx +0 -319
  131. package/src/pages/StatsPage.tsx +0 -307
  132. package/src/router/projectRoutes.tsx +0 -36
  133. package/src/router.tsx +0 -33
  134. package/src/test/setup.ts +0 -39
  135. package/src/types/api.ts +0 -185
  136. package/tailwind.config.ts +0 -57
  137. package/tsconfig.app.json +0 -29
  138. package/tsconfig.json +0 -7
  139. package/tsconfig.node.json +0 -26
  140. package/tsconfig.tsbuildinfo +0 -1
  141. package/vite.config.ts +0 -27
  142. package/vitest.config.ts +0 -18
  143. /package/{public → dist}/favicon.ico +0 -0
  144. /package/{public → dist}/github-mark-white.svg +0 -0
  145. /package/{public → dist}/github-mark.svg +0 -0
  146. /package/{public → dist}/logo-dark-bg.svg +0 -0
  147. /package/{public → dist}/logo-with-bg.svg +0 -0
  148. /package/{public → dist}/logo.svg +0 -0
  149. /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
- }
package/src/lib/utils.ts DELETED
@@ -1,6 +0,0 @@
1
- import { clsx, type ClassValue } from 'clsx';
2
- import { twMerge } from 'tailwind-merge';
3
-
4
- export function cn(...inputs: ClassValue[]) {
5
- return twMerge(clsx(inputs));
6
- }