@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.
Files changed (150) 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 +12 -2
  52. package/eslint.config.js +0 -23
  53. package/package.json.backup +0 -83
  54. package/postcss.config.js +0 -6
  55. package/src/App.css +0 -42
  56. package/src/App.tsx +0 -17
  57. package/src/assets/react.svg +0 -1
  58. package/src/components/LanguageSwitcher.tsx +0 -67
  59. package/src/components/Layout.tsx +0 -88
  60. package/src/components/MainSidebar.tsx +0 -163
  61. package/src/components/MermaidDiagram.tsx +0 -85
  62. package/src/components/MinimalLayout.tsx +0 -51
  63. package/src/components/Navigation.tsx +0 -254
  64. package/src/components/PriorityBadge.tsx +0 -59
  65. package/src/components/ProjectSwitcher.tsx +0 -222
  66. package/src/components/QuickSearch.tsx +0 -225
  67. package/src/components/RootRedirect.tsx +0 -40
  68. package/src/components/SpecDetailLayout.context.ts +0 -10
  69. package/src/components/SpecDetailLayout.tsx +0 -14
  70. package/src/components/SpecsNavSidebar.tsx +0 -615
  71. package/src/components/StatusBadge.tsx +0 -59
  72. package/src/components/ThemeToggle.tsx +0 -25
  73. package/src/components/Tooltip.tsx +0 -29
  74. package/src/components/context/ContextClient.tsx +0 -471
  75. package/src/components/context/ContextFileDetail.tsx +0 -163
  76. package/src/components/dashboard/ActivityItem.tsx +0 -36
  77. package/src/components/dashboard/DashboardClient.tsx +0 -218
  78. package/src/components/dashboard/SpecListItem.tsx +0 -58
  79. package/src/components/dashboard/StatCard.tsx +0 -52
  80. package/src/components/dependencies/SpecNode.tsx +0 -128
  81. package/src/components/dependencies/SpecSidebar.tsx +0 -256
  82. package/src/components/dependencies/constants.ts +0 -25
  83. package/src/components/dependencies/types.ts +0 -38
  84. package/src/components/dependencies/utils.ts +0 -261
  85. package/src/components/metadata-editors/PriorityEditor.tsx +0 -89
  86. package/src/components/metadata-editors/StatusEditor.tsx +0 -85
  87. package/src/components/metadata-editors/TagsEditor.tsx +0 -207
  88. package/src/components/projects/CreateProjectDialog.tsx +0 -162
  89. package/src/components/projects/DirectoryPicker.tsx +0 -182
  90. package/src/components/shared/BackToTop.tsx +0 -39
  91. package/src/components/shared/ColorPicker.tsx +0 -68
  92. package/src/components/shared/EmptyState.tsx +0 -35
  93. package/src/components/shared/ErrorBoundary.tsx +0 -79
  94. package/src/components/shared/PageHeader.tsx +0 -23
  95. package/src/components/shared/PageTransition.tsx +0 -40
  96. package/src/components/shared/ProjectAvatar.tsx +0 -107
  97. package/src/components/shared/Skeletons.tsx +0 -184
  98. package/src/components/spec-detail/EditableMetadata.tsx +0 -129
  99. package/src/components/spec-detail/MarkdownRenderer.tsx +0 -47
  100. package/src/components/spec-detail/TableOfContents.tsx +0 -150
  101. package/src/components/specs/BoardView.tsx +0 -204
  102. package/src/components/specs/ListView.tsx +0 -62
  103. package/src/components/specs/SpecsFilters.tsx +0 -190
  104. package/src/contexts/KeyboardShortcutsContext.tsx +0 -95
  105. package/src/contexts/LayoutContext.tsx +0 -45
  106. package/src/contexts/ProjectContext.tsx +0 -163
  107. package/src/contexts/ThemeContext.tsx +0 -90
  108. package/src/contexts/index.ts +0 -7
  109. package/src/hooks/useKeyboardShortcuts.ts +0 -87
  110. package/src/index.css +0 -624
  111. package/src/lib/api.ts +0 -72
  112. package/src/lib/backend-adapter.ts +0 -382
  113. package/src/lib/date-utils.ts +0 -122
  114. package/src/lib/i18n.test.ts +0 -57
  115. package/src/lib/i18n.ts +0 -51
  116. package/src/lib/markdown-utils.ts +0 -38
  117. package/src/lib/sub-spec-utils.ts +0 -166
  118. package/src/lib/utils.ts +0 -6
  119. package/src/locales/en/common.json +0 -660
  120. package/src/locales/en/errors.json +0 -20
  121. package/src/locales/en/help.json +0 -8
  122. package/src/locales/zh-CN/common.json +0 -660
  123. package/src/locales/zh-CN/errors.json +0 -20
  124. package/src/locales/zh-CN/help.json +0 -8
  125. package/src/main.tsx +0 -12
  126. package/src/pages/ContextPage.tsx +0 -111
  127. package/src/pages/DashboardPage.tsx +0 -97
  128. package/src/pages/DependenciesPage.tsx +0 -881
  129. package/src/pages/ProjectsPage.tsx +0 -432
  130. package/src/pages/SpecDetailPage.tsx +0 -592
  131. package/src/pages/SpecsPage.tsx +0 -319
  132. package/src/pages/StatsPage.tsx +0 -307
  133. package/src/router/projectRoutes.tsx +0 -36
  134. package/src/router.tsx +0 -33
  135. package/src/test/setup.ts +0 -39
  136. package/src/types/api.ts +0 -185
  137. package/tailwind.config.ts +0 -57
  138. package/tsconfig.app.json +0 -29
  139. package/tsconfig.json +0 -7
  140. package/tsconfig.node.json +0 -26
  141. package/tsconfig.tsbuildinfo +0 -1
  142. package/vite.config.ts +0 -27
  143. package/vitest.config.ts +0 -18
  144. /package/{public → dist}/favicon.ico +0 -0
  145. /package/{public → dist}/github-mark-white.svg +0 -0
  146. /package/{public → dist}/github-mark.svg +0 -0
  147. /package/{public → dist}/logo-dark-bg.svg +0 -0
  148. /package/{public → dist}/logo-with-bg.svg +0 -0
  149. /package/{public → dist}/logo.svg +0 -0
  150. /package/{public → dist}/vite.svg +0 -0
package/src/test/setup.ts DELETED
@@ -1,39 +0,0 @@
1
- import { afterEach, beforeEach, vi } from 'vitest';
2
- import { cleanup } from '@testing-library/react';
3
- import '@testing-library/jest-dom/vitest';
4
-
5
- // Mock localStorage with a simple in-memory storage
6
- const store: Record<string, string> = {};
7
-
8
- const localStorageMock = {
9
- getItem: vi.fn((key: string) => store[key] || null),
10
- setItem: vi.fn((key: string, value: string) => {
11
- store[key] = value;
12
- }),
13
- removeItem: vi.fn((key: string) => {
14
- delete store[key];
15
- }),
16
- clear: vi.fn(() => {
17
- Object.keys(store).forEach((key) => delete store[key]);
18
- }),
19
- key: vi.fn((index: number) => Object.keys(store)[index] || null),
20
- get length() {
21
- return Object.keys(store).length;
22
- },
23
- };
24
-
25
- global.localStorage = localStorageMock as Storage;
26
-
27
- beforeEach(() => {
28
- // Clear the store
29
- Object.keys(store).forEach((key) => delete store[key]);
30
- // Clear mock call history
31
- localStorageMock.getItem.mockClear();
32
- localStorageMock.setItem.mockClear();
33
- localStorageMock.removeItem.mockClear();
34
- localStorageMock.clear.mockClear();
35
- });
36
-
37
- afterEach(() => {
38
- cleanup();
39
- });
package/src/types/api.ts DELETED
@@ -1,185 +0,0 @@
1
- export type SpecStatus = 'planned' | 'in-progress' | 'complete' | 'archived';
2
- export type SpecPriority = 'low' | 'medium' | 'high' | 'critical';
3
-
4
- export interface SubSpec {
5
- name: string;
6
- file: string;
7
- content: string;
8
- // Note: icon and color are assigned in frontend via getSubSpecStyle()
9
- // Backend no longer provides these fields
10
- }
11
-
12
- export interface Spec {
13
- id: string;
14
- specName: string;
15
- specNumber?: number | null;
16
- title?: string | null;
17
- content?: string;
18
- status: SpecStatus;
19
- priority?: SpecPriority | null;
20
- tags?: string[];
21
- assignee?: string | null;
22
- createdAt?: string;
23
- updatedAt?: string;
24
- completedAt?: string;
25
- dependsOn?: string[];
26
- requiredBy?: string[];
27
- filePath?: string;
28
- relationships?: {
29
- dependsOn: string[];
30
- requiredBy?: string[];
31
- };
32
- }
33
-
34
- export interface SpecDetail extends Spec {
35
- contentMd?: string;
36
- content?: string;
37
- subSpecs?: SubSpec[];
38
- metadata?: Record<string, unknown>;
39
- }
40
-
41
- export interface Stats {
42
- totalProjects: number;
43
- totalSpecs: number;
44
- specsByStatus: { status: string; count: number }[];
45
- specsByPriority: { priority: string; count: number }[];
46
- completionRate: number;
47
- projectId?: string;
48
- }
49
-
50
- export interface DependencyNode {
51
- id: string;
52
- name: string;
53
- number: number;
54
- status: string;
55
- priority: string;
56
- tags: string[];
57
- }
58
-
59
- export interface DependencyEdge {
60
- source: string;
61
- target: string;
62
- type?: 'depends_on' | 'required_by' | 'dependsOn';
63
- }
64
-
65
- export interface DependencyGraph {
66
- nodes: DependencyNode[];
67
- edges: DependencyEdge[];
68
- }
69
-
70
- export interface Project {
71
- id: string;
72
- name?: string;
73
- displayName?: string;
74
- path?: string;
75
- specsDir?: string;
76
- favorite?: boolean;
77
- color?: string | null;
78
- description?: string | null;
79
- isFeatured?: boolean;
80
- lastAccessed?: string | Date | null;
81
- githubOwner?: string;
82
- githubRepo?: string;
83
- }
84
-
85
- export interface ProjectsResponse {
86
- projects?: Project[];
87
- recentProjects?: string[];
88
- favoriteProjects?: string[];
89
- }
90
-
91
- export interface ProjectValidationResult {
92
- isValid: boolean;
93
- error?: string | null;
94
- }
95
-
96
- export interface ProjectValidationResponse {
97
- validation: ProjectValidationResult;
98
- }
99
-
100
- export interface ProjectStatsResponse {
101
- stats: Stats;
102
- }
103
-
104
- export interface DirectoryItem {
105
- name: string;
106
- path: string;
107
- isDirectory: boolean;
108
- }
109
-
110
- export interface DirectoryListResponse {
111
- items: DirectoryItem[];
112
- path: string;
113
- }
114
-
115
- export interface ContextFileListItem {
116
- name: string;
117
- path: string;
118
- size: number;
119
- modified?: string | null;
120
- modifiedAt?: Date | null;
121
- }
122
-
123
- export interface ContextFileContent extends ContextFileListItem {
124
- content: string;
125
- fileType?: string | null;
126
- tokenCount: number;
127
- lineCount: number;
128
- }
129
-
130
- /**
131
- * Context file representation for project context visibility
132
- */
133
- export interface ContextFile {
134
- name: string;
135
- path: string;
136
- content: string;
137
- tokenCount: number;
138
- lastModified: Date | string;
139
- }
140
-
141
- /**
142
- * LeanSpec configuration (from .lean-spec/config.json)
143
- */
144
- export interface LeanSpecConfig {
145
- template?: string;
146
- specsDir?: string;
147
- structure?: {
148
- pattern?: string;
149
- prefix?: string;
150
- dateFormat?: string;
151
- sequenceDigits?: number;
152
- defaultFile?: string;
153
- };
154
- features?: {
155
- aiAgents?: boolean;
156
- };
157
- templates?: Record<string, string>;
158
- }
159
-
160
- /**
161
- * Project context containing all contextual files
162
- */
163
- export interface ProjectContext {
164
- agentInstructions: ContextFile[]; // AGENTS.md, GEMINI.md, etc.
165
- config: {
166
- file: ContextFile | null; // .lean-spec/config.json
167
- parsed: LeanSpecConfig | null; // Parsed config object
168
- };
169
- projectDocs: ContextFile[]; // README.md, CONTRIBUTING.md, etc.
170
- totalTokens: number;
171
- projectRoot: string; // Absolute path to project root (for editor links)
172
- }
173
-
174
- export interface ListParams {
175
- status?: string;
176
- priority?: string;
177
- tag?: string;
178
- search?: string;
179
- }
180
-
181
- export interface ListSpecsResponse {
182
- specs: Spec[];
183
- total: number;
184
- projectId?: string;
185
- }
@@ -1,57 +0,0 @@
1
- import type { Config } from "tailwindcss";
2
- import typography from "@tailwindcss/typography";
3
-
4
- const config: Config = {
5
- darkMode: "class",
6
- content: [
7
- "./index.html",
8
- "./src/**/*.{js,ts,jsx,tsx}",
9
- ],
10
- theme: {
11
- extend: {
12
- colors: {
13
- background: "hsl(var(--background))",
14
- foreground: "hsl(var(--foreground))",
15
- card: {
16
- DEFAULT: "hsl(var(--card))",
17
- foreground: "hsl(var(--card-foreground))",
18
- },
19
- popover: {
20
- DEFAULT: "hsl(var(--popover))",
21
- foreground: "hsl(var(--popover-foreground))",
22
- },
23
- primary: {
24
- DEFAULT: "hsl(var(--primary))",
25
- foreground: "hsl(var(--primary-foreground))",
26
- },
27
- secondary: {
28
- DEFAULT: "hsl(var(--secondary))",
29
- foreground: "hsl(var(--secondary-foreground))",
30
- },
31
- muted: {
32
- DEFAULT: "hsl(var(--muted))",
33
- foreground: "hsl(var(--muted-foreground))",
34
- },
35
- accent: {
36
- DEFAULT: "hsl(var(--accent))",
37
- foreground: "hsl(var(--accent-foreground))",
38
- },
39
- destructive: {
40
- DEFAULT: "hsl(var(--destructive))",
41
- foreground: "hsl(var(--destructive-foreground))",
42
- },
43
- border: "hsl(var(--border))",
44
- input: "hsl(var(--input))",
45
- ring: "hsl(var(--ring))",
46
- },
47
- borderRadius: {
48
- lg: "var(--radius)",
49
- md: "calc(var(--radius) - 2px)",
50
- sm: "calc(var(--radius) - 4px)",
51
- },
52
- },
53
- },
54
- plugins: [typography],
55
- }
56
-
57
- export default config;
package/tsconfig.app.json DELETED
@@ -1,29 +0,0 @@
1
- {
2
- "compilerOptions": {
3
- "tsBuildInfoFile": "./node_modules/.tmp/tsconfig.app.tsbuildinfo",
4
- "target": "ES2022",
5
- "useDefineForClassFields": true,
6
- "lib": ["ES2022", "DOM", "DOM.Iterable"],
7
- "module": "ESNext",
8
- "types": ["vite/client"],
9
- "skipLibCheck": true,
10
-
11
- /* Bundler mode */
12
- "moduleResolution": "bundler",
13
- "allowImportingTsExtensions": true,
14
- "verbatimModuleSyntax": true,
15
- "moduleDetection": "force",
16
- "noEmit": true,
17
- "jsx": "react-jsx",
18
-
19
- /* Linting */
20
- "strict": true,
21
- "noUnusedLocals": true,
22
- "noUnusedParameters": true,
23
- "erasableSyntaxOnly": true,
24
- "noFallthroughCasesInSwitch": true,
25
- "noUncheckedSideEffectImports": true
26
- },
27
- "include": ["src"],
28
- "exclude": ["src/**/*.test.ts", "src/**/*.test.tsx", "src/test"]
29
- }
package/tsconfig.json DELETED
@@ -1,7 +0,0 @@
1
- {
2
- "files": [],
3
- "references": [
4
- { "path": "./tsconfig.app.json" },
5
- { "path": "./tsconfig.node.json" }
6
- ]
7
- }
@@ -1,26 +0,0 @@
1
- {
2
- "compilerOptions": {
3
- "tsBuildInfoFile": "./node_modules/.tmp/tsconfig.node.tsbuildinfo",
4
- "target": "ES2023",
5
- "lib": ["ES2023"],
6
- "module": "ESNext",
7
- "types": ["node"],
8
- "skipLibCheck": true,
9
-
10
- /* Bundler mode */
11
- "moduleResolution": "bundler",
12
- "allowImportingTsExtensions": true,
13
- "verbatimModuleSyntax": true,
14
- "moduleDetection": "force",
15
- "noEmit": true,
16
-
17
- /* Linting */
18
- "strict": true,
19
- "noUnusedLocals": true,
20
- "noUnusedParameters": true,
21
- "erasableSyntaxOnly": true,
22
- "noFallthroughCasesInSwitch": true,
23
- "noUncheckedSideEffectImports": true
24
- },
25
- "include": ["vite.config.ts"]
26
- }