cortexcode 0.2.2__py3-none-any.whl → 0.4.0__py3-none-any.whl

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.
@@ -0,0 +1,174 @@
1
+ """HTML/CSS templates for documentation."""
2
+
3
+ D3_CDN_URL = "https://cdnjs.cloudflare.com/ajax/libs/d3/7.8.5/d3.min.js"
4
+
5
+ CSS_TEMPLATE = """
6
+ :root {
7
+ --bg: #0f172a; --bg2: #1e293b; --bg3: #334155;
8
+ --text: #e2e8f0; --text2: #94a3b8; --text3: #64748b;
9
+ --accent: #38bdf8; --accent2: #818cf8; --green: #34d399;
10
+ --yellow: #fbbf24; --red: #f87171; --pink: #f472b6;
11
+ --radius: 12px; --radius-sm: 8px;
12
+ }
13
+ * { margin: 0; padding: 0; box-sizing: border-box; }
14
+ body { font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif; background: var(--bg); color: var(--text); min-height: 100vh; }
15
+
16
+ .sidebar {
17
+ position: fixed; left: 0; top: 0; width: 260px; height: 100vh;
18
+ background: var(--bg2); border-right: 1px solid var(--bg3); overflow-y: auto;
19
+ padding: 20px; z-index: 50;
20
+ }
21
+ .sidebar::-webkit-scrollbar { width: 4px; }
22
+ .sidebar::-webkit-scrollbar-thumb { background: var(--bg3); border-radius: 4px; }
23
+
24
+ .logo { font-size: 20px; font-weight: 700; color: var(--accent); margin-bottom: 24px; display: flex; align-items: center; gap: 10px; }
25
+ .logo-icon { width: 32px; height: 32px; background: linear-gradient(135deg, #38bdf8, #818cf8); border-radius: 8px; display: flex; align-items: center; justify-content: center; font-weight: 900; color: white; font-size: 14px; }
26
+
27
+ .sidebar-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 20px; }
28
+ .sidebar-stat { background: var(--bg); padding: 12px 10px; border-radius: var(--radius-sm); text-align: center; }
29
+ .sidebar-stat-val { font-size: 22px; font-weight: 700; color: var(--accent); }
30
+ .sidebar-stat-lbl { font-size: 10px; color: var(--text3); text-transform: uppercase; letter-spacing: 0.5px; margin-top: 2px; }
31
+
32
+ .nav-section { margin-bottom: 16px; }
33
+ .nav-title { font-size: 10px; text-transform: uppercase; color: var(--text3); letter-spacing: 1px; margin-bottom: 8px; font-weight: 600; }
34
+ .nav-item { display: flex; align-items: center; gap: 10px; padding: 9px 12px; border-radius: var(--radius-sm); cursor: pointer; transition: all 0.15s; color: var(--text2); font-size: 13px; }
35
+ .nav-item:hover { background: var(--bg3); color: var(--text); }
36
+ .nav-item.active { background: var(--accent); color: white; font-weight: 600; }
37
+ .nav-item .badge { margin-left: auto; background: var(--bg); color: var(--text3); padding: 2px 8px; border-radius: 10px; font-size: 11px; }
38
+ .nav-item.active .badge { background: rgba(255,255,255,0.2); color: white; }
39
+
40
+ .main { margin-left: 260px; padding: 24px 30px; min-height: 100vh; }
41
+
42
+ .header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 24px; gap: 20px; }
43
+ .project-name { font-size: 26px; font-weight: 700; }
44
+ .last-indexed { color: var(--text3); font-size: 13px; margin-top: 4px; }
45
+
46
+ .search-wrapper { position: relative; flex-shrink: 0; }
47
+ .search-box { background: var(--bg2); border: 1px solid var(--bg3); border-radius: var(--radius-sm); padding: 10px 14px 10px 36px; color: white; width: 360px; font-size: 13px; transition: border 0.15s; }
48
+ .search-box:focus { outline: none; border-color: var(--accent); }
49
+ .search-icon { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--text3); font-size: 14px; pointer-events: none; }
50
+ .search-results { display: none; position: absolute; top: 100%; right: 0; width: 460px; max-height: 400px; overflow-y: auto; background: var(--bg2); border: 1px solid var(--bg3); border-radius: var(--radius-sm); z-index: 100; margin-top: 4px; box-shadow: 0 8px 30px rgba(0,0,0,0.4); }
51
+ .search-result-item { display: flex; align-items: center; gap: 10px; padding: 10px 14px; cursor: pointer; border-bottom: 1px solid var(--bg3); font-size: 13px; }
52
+ .search-result-item:hover { background: var(--bg3); }
53
+ .search-result-item:last-child { border-bottom: none; }
54
+
55
+ .tab-content { display: none; }
56
+ .tab-content.active { display: block; }
57
+
58
+ .card { background: var(--bg2); border-radius: var(--radius); padding: 24px; margin-bottom: 16px; border: 1px solid var(--bg3); }
59
+ .card-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; }
60
+ .card-title { font-size: 16px; font-weight: 600; }
61
+ .card-subtitle { font-size: 12px; color: var(--text3); margin-top: 4px; }
62
+
63
+ .dash-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 16px; }
64
+ .dash-stat { background: var(--bg2); border: 1px solid var(--bg3); border-radius: var(--radius); padding: 20px; position: relative; overflow: hidden; }
65
+ .dash-stat::after { content: ''; position: absolute; top: 0; left: 0; width: 4px; height: 100%; }
66
+ .dash-stat:nth-child(1)::after { background: var(--accent); }
67
+ .dash-stat:nth-child(2)::after { background: var(--green); }
68
+ .dash-stat:nth-child(3)::after { background: var(--yellow); }
69
+ .dash-stat:nth-child(4)::after { background: var(--accent2); }
70
+ .dash-stat-icon { font-size: 28px; margin-bottom: 8px; }
71
+ .dash-stat-val { font-size: 32px; font-weight: 700; }
72
+ .dash-stat:nth-child(1) .dash-stat-val { color: var(--accent); }
73
+ .dash-stat:nth-child(2) .dash-stat-val { color: var(--green); }
74
+ .dash-stat:nth-child(3) .dash-stat-val { color: var(--yellow); }
75
+ .dash-stat:nth-child(4) .dash-stat-val { color: var(--accent2); }
76
+ .dash-stat-lbl { font-size: 12px; color: var(--text3); margin-top: 4px; text-transform: uppercase; letter-spacing: 0.5px; }
77
+
78
+ .charts-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-bottom: 16px; }
79
+ .chart-container { display: flex; align-items: center; justify-content: center; gap: 24px; padding: 10px 0; }
80
+ .chart-svg { flex-shrink: 0; }
81
+ .chart-legend { display: flex; flex-direction: column; gap: 6px; }
82
+ .chart-legend-item { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--text2); }
83
+ .chart-legend-dot { width: 10px; height: 10px; border-radius: 50%; flex-shrink: 0; }
84
+ .chart-legend-val { margin-left: auto; font-weight: 600; color: var(--text); min-width: 28px; text-align: right; }
85
+
86
+ .mini-table { width: 100%; }
87
+ .mini-table th { text-align: left; font-size: 11px; color: var(--text3); text-transform: uppercase; letter-spacing: 0.5px; padding: 8px 0; border-bottom: 1px solid var(--bg3); }
88
+ .mini-table td { padding: 8px 0; font-size: 13px; border-bottom: 1px solid rgba(51,65,85,0.5); }
89
+ .mini-table tr:last-child td { border-bottom: none; }
90
+ .mini-table .bar { height: 6px; background: var(--accent); border-radius: 3px; min-width: 4px; }
91
+
92
+ .tree-view { font-family: 'Fira Code', 'Cascadia Code', monospace; font-size: 13px; }
93
+ .tree-item { padding: 6px 12px; border-radius: 6px; cursor: pointer; display: flex; align-items: center; gap: 8px; transition: background 0.1s; }
94
+ .tree-item:hover { background: var(--bg3); }
95
+ .tree-item.folder { color: var(--yellow); }
96
+ .tree-item.file { color: var(--text2); }
97
+ .tree-count { margin-left: auto; color: var(--text3); font-size: 11px; }
98
+
99
+ .symbol-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 12px; }
100
+ .symbol-card { background: var(--bg); border-radius: var(--radius-sm); padding: 16px; border: 1px solid var(--bg3); transition: all 0.15s; cursor: pointer; }
101
+ .symbol-card:hover { border-color: var(--accent); transform: translateY(-1px); box-shadow: 0 4px 12px rgba(56,189,248,0.1); }
102
+ .symbol-name { font-size: 14px; font-weight: 600; color: var(--accent); margin-bottom: 6px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
103
+ .symbol-meta { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; margin-bottom: 8px; }
104
+ .badge { display: inline-block; padding: 2px 8px; border-radius: 10px; font-size: 11px; font-weight: 500; }
105
+ .badge-type { background: var(--bg3); color: var(--text2); }
106
+ .badge-fw { background: #7c3aed; color: white; }
107
+ .badge-doc { background: rgba(52,211,153,0.2); color: var(--green); }
108
+ .symbol-file { font-size: 11px; color: var(--text3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
109
+ .symbol-params { font-size: 12px; color: var(--text2); font-family: 'Fira Code', monospace; margin-top: 6px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
110
+
111
+ .filter-tabs { display: flex; gap: 6px; margin-bottom: 16px; flex-wrap: wrap; }
112
+ .filter-tab { padding: 6px 14px; background: var(--bg); border: 1px solid var(--bg3); border-radius: 20px; cursor: pointer; color: var(--text2); font-size: 12px; transition: all 0.15s; }
113
+ .filter-tab:hover { border-color: var(--accent); color: var(--text); }
114
+ .filter-tab.active { background: var(--accent); color: white; border-color: var(--accent); }
115
+
116
+ .graph-controls { display: flex; gap: 8px; margin-bottom: 12px; align-items: center; flex-wrap: wrap; }
117
+ .graph-btn { padding: 6px 14px; background: var(--bg); border: 1px solid var(--bg3); border-radius: var(--radius-sm); cursor: pointer; color: var(--text2); font-size: 12px; transition: all 0.15s; }
118
+ .graph-btn:hover { border-color: var(--accent); color: var(--text); }
119
+ .graph-btn.active { background: var(--accent); color: white; border-color: var(--accent); }
120
+ .graph-search { background: var(--bg); border: 1px solid var(--bg3); border-radius: var(--radius-sm); padding: 6px 12px; color: white; font-size: 12px; width: 200px; }
121
+ .graph-search:focus { outline: none; border-color: var(--accent); }
122
+ .graph-container { width: 100%; height: 600px; background: var(--bg); border-radius: var(--radius-sm); position: relative; overflow: hidden; }
123
+ .graph-container svg { width: 100%; height: 100%; }
124
+ .graph-tooltip { position: absolute; background: var(--bg2); border: 1px solid var(--bg3); border-radius: var(--radius-sm); padding: 12px; font-size: 12px; pointer-events: none; z-index: 10; display: none; max-width: 300px; box-shadow: 0 4px 20px rgba(0,0,0,0.4); }
125
+ .graph-info { margin-top: 12px; padding: 16px; background: var(--bg); border-radius: var(--radius-sm); display: none; }
126
+ .graph-info.active { display: block; }
127
+
128
+ .link { stroke-opacity: 0.4; }
129
+ .link.highlighted { stroke-opacity: 1; stroke: var(--accent); stroke-width: 2.5; }
130
+ .node circle { transition: r 0.2s; }
131
+ .node.dimmed circle { opacity: 0.15; }
132
+ .node.dimmed text { opacity: 0.15; }
133
+ .link.dimmed { stroke-opacity: 0.05; }
134
+
135
+ .deps-container { width: 100%; height: 500px; background: var(--bg); border-radius: var(--radius-sm); position: relative; overflow: hidden; }
136
+ .deps-container svg { width: 100%; height: 100%; }
137
+
138
+ .modal { display: none; position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.7); z-index: 1000; backdrop-filter: blur(4px); }
139
+ .modal.active { display: flex; align-items: center; justify-content: center; }
140
+ .modal-content { background: var(--bg2); border-radius: var(--radius); padding: 28px; max-width: 640px; width: 90%; max-height: 80vh; overflow-y: auto; border: 1px solid var(--bg3); box-shadow: 0 20px 60px rgba(0,0,0,0.5); }
141
+ .modal-header { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 20px; }
142
+ .modal-title { font-size: 22px; font-weight: 700; color: var(--accent); }
143
+ .modal-close { background: none; border: none; color: var(--text3); font-size: 22px; cursor: pointer; padding: 4px 8px; border-radius: 6px; }
144
+ .modal-close:hover { background: var(--bg3); color: var(--text); }
145
+ .modal-section { margin-bottom: 16px; }
146
+ .modal-section-title { font-size: 11px; text-transform: uppercase; letter-spacing: 1px; color: var(--text3); margin-bottom: 8px; font-weight: 600; }
147
+ .modal-code { background: var(--bg); padding: 10px 14px; border-radius: var(--radius-sm); font-family: 'Fira Code', monospace; font-size: 13px; }
148
+ .modal-tag { display: inline-block; background: var(--bg); padding: 4px 10px; border-radius: 6px; margin: 2px; font-size: 12px; color: var(--text2); border: 1px solid var(--bg3); cursor: pointer; }
149
+ .modal-tag:hover { border-color: var(--accent); color: var(--accent); }
150
+
151
+ @media (max-width: 1200px) {
152
+ .dash-stats { grid-template-columns: repeat(2, 1fr); }
153
+ .charts-row { grid-template-columns: 1fr; }
154
+ }
155
+ """
156
+
157
+ TYPE_COLORS = {
158
+ "function": "#38bdf8",
159
+ "class": "#a78bfa",
160
+ "method": "#34d399",
161
+ "interface": "#fbbf24",
162
+ "type": "#f472b6",
163
+ "enum": "#fb923c",
164
+ }
165
+
166
+ LANG_COLORS = {
167
+ ".ts": "#3178c6", ".tsx": "#3178c6",
168
+ ".js": "#f7df1e", ".jsx": "#f7df1e",
169
+ ".py": "#3572A5",
170
+ ".go": "#00ADD8",
171
+ ".rs": "#dea584",
172
+ ".java": "#b07219",
173
+ ".cs": "#178600",
174
+ }