mdmaid-desk 0.1.0

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 (51) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +215 -0
  3. package/dist/api-client.d.ts +20 -0
  4. package/dist/api-client.js +264 -0
  5. package/dist/api-client.js.map +1 -0
  6. package/dist/api-types.d.ts +51 -0
  7. package/dist/api-types.js +2 -0
  8. package/dist/api-types.js.map +1 -0
  9. package/dist/auth-state.d.ts +2 -0
  10. package/dist/auth-state.js +113 -0
  11. package/dist/auth-state.js.map +1 -0
  12. package/dist/catalog.d.ts +46 -0
  13. package/dist/catalog.js +659 -0
  14. package/dist/catalog.js.map +1 -0
  15. package/dist/cli.d.ts +16 -0
  16. package/dist/cli.js +370 -0
  17. package/dist/cli.js.map +1 -0
  18. package/dist/daemon-state.d.ts +17 -0
  19. package/dist/daemon-state.js +204 -0
  20. package/dist/daemon-state.js.map +1 -0
  21. package/dist/domain.d.ts +49 -0
  22. package/dist/domain.js +44 -0
  23. package/dist/domain.js.map +1 -0
  24. package/dist/fs-durability.d.ts +2 -0
  25. package/dist/fs-durability.js +35 -0
  26. package/dist/fs-durability.js.map +1 -0
  27. package/dist/package-info.d.ts +1 -0
  28. package/dist/package-info.js +17 -0
  29. package/dist/package-info.js.map +1 -0
  30. package/dist/server.d.ts +18 -0
  31. package/dist/server.js +702 -0
  32. package/dist/server.js.map +1 -0
  33. package/dist/sqlite-storage.d.ts +17 -0
  34. package/dist/sqlite-storage.js +342 -0
  35. package/dist/sqlite-storage.js.map +1 -0
  36. package/dist/storage.d.ts +12 -0
  37. package/dist/storage.js +2 -0
  38. package/dist/storage.js.map +1 -0
  39. package/dist/terminal-text.d.ts +9 -0
  40. package/dist/terminal-text.js +156 -0
  41. package/dist/terminal-text.js.map +1 -0
  42. package/dist/tui.d.ts +63 -0
  43. package/dist/tui.js +912 -0
  44. package/dist/tui.js.map +1 -0
  45. package/dist/web-client.d.ts +21 -0
  46. package/dist/web-client.js +337 -0
  47. package/dist/web-client.js.map +1 -0
  48. package/dist/web-styles.d.ts +1 -0
  49. package/dist/web-styles.js +249 -0
  50. package/dist/web-styles.js.map +1 -0
  51. package/package.json +60 -0
@@ -0,0 +1,249 @@
1
+ export const WEB_STYLES = `
2
+ @font-face {
3
+ font-family: "Departure Mono";
4
+ src: url("/assets/departure-mono.woff2") format("woff2");
5
+ font-display: swap;
6
+ }
7
+
8
+ :root {
9
+ color-scheme: light;
10
+ --bg: #f4f1e8;
11
+ --surface: #fffdf5;
12
+ --surface-2: #ebe7dc;
13
+ --ink: #161612;
14
+ --muted: #6f6c63;
15
+ --line: #c8c3b7;
16
+ --accent: #ff5a36;
17
+ --accent-soft: #ffe0d7;
18
+ --reading: #3569e8;
19
+ --done: #27825c;
20
+ --shadow: 5px 5px 0 #161612;
21
+ font-family: "Departure Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
22
+ }
23
+
24
+ :root[data-theme="dark"] {
25
+ color-scheme: dark;
26
+ --bg: #151512;
27
+ --surface: #1f1f1a;
28
+ --surface-2: #2a2923;
29
+ --ink: #f6f1e5;
30
+ --muted: #aaa69a;
31
+ --line: #4a4840;
32
+ --accent: #ff7758;
33
+ --accent-soft: #4a261e;
34
+ --reading: #7ca0ff;
35
+ --done: #69c69a;
36
+ --shadow: 5px 5px 0 #000;
37
+ }
38
+
39
+ * { box-sizing: border-box; }
40
+
41
+ body {
42
+ margin: 0;
43
+ min-height: 100vh;
44
+ background:
45
+ linear-gradient(90deg, color-mix(in srgb, var(--line) 18%, transparent) 1px, transparent 1px),
46
+ linear-gradient(color-mix(in srgb, var(--line) 18%, transparent) 1px, transparent 1px),
47
+ var(--bg);
48
+ background-size: 24px 24px;
49
+ color: var(--ink);
50
+ }
51
+
52
+ button, input { font: inherit; }
53
+ button { color: inherit; }
54
+ [hidden] { display: none !important; }
55
+
56
+ .topbar {
57
+ position: sticky;
58
+ top: 0;
59
+ z-index: 20;
60
+ display: flex;
61
+ align-items: center;
62
+ justify-content: space-between;
63
+ min-height: 62px;
64
+ padding: 10px 18px;
65
+ border-bottom: 2px solid var(--ink);
66
+ background: color-mix(in srgb, var(--surface) 94%, transparent);
67
+ backdrop-filter: blur(12px);
68
+ }
69
+
70
+ .brand { display: flex; align-items: baseline; gap: 12px; }
71
+ .brand strong { font-size: 17px; letter-spacing: -.04em; }
72
+ .brand span, .eyebrow {
73
+ color: var(--muted);
74
+ font-size: 10px;
75
+ letter-spacing: .14em;
76
+ text-transform: uppercase;
77
+ }
78
+
79
+ .top-actions { display: flex; gap: 9px; align-items: center; }
80
+ .live { font-size: 10px; color: var(--done); text-transform: uppercase; }
81
+ .live.offline { color: var(--accent); }
82
+
83
+ .icon-button, .action, .status-filter, .project-button, .document-card {
84
+ border: 1px solid var(--ink);
85
+ background: var(--surface);
86
+ cursor: pointer;
87
+ }
88
+ .icon-button, .action { padding: 8px 11px; }
89
+ .icon-button:hover, .action:hover { background: var(--ink); color: var(--surface); }
90
+
91
+ .workspace {
92
+ display: grid;
93
+ grid-template-columns: 230px minmax(0, 1fr);
94
+ min-height: calc(100vh - 62px);
95
+ }
96
+
97
+ .sidebar {
98
+ border-right: 2px solid var(--ink);
99
+ background: color-mix(in srgb, var(--surface) 92%, transparent);
100
+ padding: 24px 14px;
101
+ }
102
+
103
+ .sidebar h2, .queue-header h1 {
104
+ margin: 0;
105
+ font-size: 11px;
106
+ letter-spacing: .12em;
107
+ text-transform: uppercase;
108
+ }
109
+
110
+ .project-nav { display: grid; gap: 7px; margin-top: 14px; }
111
+ .project-button {
112
+ display: flex;
113
+ justify-content: space-between;
114
+ width: 100%;
115
+ padding: 10px;
116
+ text-align: left;
117
+ border-color: transparent;
118
+ background: transparent;
119
+ }
120
+ .project-button:hover { border-color: var(--line); background: var(--surface-2); }
121
+ .project-button.active { border-color: var(--ink); background: var(--ink); color: var(--surface); }
122
+ .count { opacity: .68; font-variant-numeric: tabular-nums; }
123
+
124
+ .shortcut-card {
125
+ margin-top: 30px;
126
+ padding: 12px;
127
+ border: 1px dashed var(--line);
128
+ color: var(--muted);
129
+ font-size: 10px;
130
+ line-height: 1.8;
131
+ }
132
+ kbd { border: 1px solid var(--line); padding: 1px 4px; background: var(--surface); color: var(--ink); }
133
+
134
+ .main { min-width: 0; padding: 28px clamp(16px, 4vw, 60px) 60px; }
135
+ .queue-header { display: grid; gap: 18px; margin-bottom: 22px; }
136
+ .queue-title-row { display: flex; align-items: end; justify-content: space-between; gap: 20px; }
137
+ .queue-title-row h1 { font-size: clamp(20px, 4vw, 36px); letter-spacing: -.06em; text-transform: none; }
138
+ .queue-title-row p { margin: 0; color: var(--muted); font-size: 11px; }
139
+
140
+ .controls { display: flex; flex-wrap: wrap; gap: 9px; }
141
+ .search {
142
+ min-width: min(340px, 100%);
143
+ flex: 1;
144
+ border: 1px solid var(--ink);
145
+ background: var(--surface);
146
+ color: var(--ink);
147
+ padding: 11px 12px;
148
+ outline: none;
149
+ }
150
+ .search:focus { box-shadow: 3px 3px 0 var(--accent); }
151
+ .status-filters { display: flex; gap: 6px; flex-wrap: wrap; }
152
+ .status-filter { padding: 9px 10px; font-size: 10px; text-transform: uppercase; }
153
+ .status-filter.active { background: var(--ink); color: var(--surface); }
154
+
155
+ .document-queue {
156
+ display: grid;
157
+ grid-template-columns: repeat(auto-fill, minmax(min(310px, 100%), 1fr));
158
+ gap: 16px;
159
+ }
160
+
161
+ .document-card {
162
+ position: relative;
163
+ display: flex;
164
+ flex-direction: column;
165
+ gap: 13px;
166
+ min-height: 184px;
167
+ padding: 16px;
168
+ text-align: left;
169
+ box-shadow: var(--shadow);
170
+ transition: transform .12s, box-shadow .12s;
171
+ }
172
+ .document-card:hover, .document-card:focus-visible {
173
+ transform: translate(-2px, -2px);
174
+ box-shadow: 8px 8px 0 var(--ink);
175
+ outline: none;
176
+ }
177
+ .document-card::before {
178
+ content: "";
179
+ position: absolute;
180
+ top: -1px; left: -1px; bottom: -1px;
181
+ width: 6px;
182
+ background: var(--accent);
183
+ }
184
+ .document-card.status-reading::before { background: var(--reading); }
185
+ .document-card.status-done::before { background: var(--done); }
186
+ .card-topline { display: flex; justify-content: space-between; gap: 10px; color: var(--muted); font-size: 9px; text-transform: uppercase; }
187
+ .status-label { color: var(--accent); }
188
+ .status-reading .status-label { color: var(--reading); }
189
+ .status-done .status-label { color: var(--done); }
190
+ .document-card strong { font-size: 17px; line-height: 1.35; }
191
+ .card-detail { color: var(--muted); font-size: 10px; line-height: 1.6; }
192
+ .tag-row { display: flex; flex-wrap: wrap; gap: 5px; margin-top: auto; }
193
+ .tag { padding: 3px 6px; background: var(--surface-2); font-size: 9px; color: var(--muted); }
194
+
195
+ .empty {
196
+ border: 1px dashed var(--line);
197
+ padding: 48px 20px;
198
+ text-align: center;
199
+ color: var(--muted);
200
+ }
201
+
202
+ .reader { max-width: 1060px; margin: 0 auto; }
203
+ .reader-toolbar {
204
+ position: sticky;
205
+ top: 74px;
206
+ z-index: 10;
207
+ display: flex;
208
+ justify-content: space-between;
209
+ gap: 14px;
210
+ padding: 10px;
211
+ border: 1px solid var(--ink);
212
+ background: var(--surface);
213
+ box-shadow: 3px 3px 0 var(--ink);
214
+ }
215
+ .reader-actions { display: flex; gap: 6px; flex-wrap: wrap; justify-content: end; }
216
+ .reader-heading { margin: 34px 0 20px; }
217
+ .reader-heading h1 { margin: 0 0 10px; font-size: clamp(25px, 5vw, 48px); line-height: 1.12; letter-spacing: -.07em; }
218
+ .reader-heading p { color: var(--muted); font-size: 10px; text-transform: uppercase; }
219
+
220
+ .reader-content {
221
+ overflow-wrap: anywhere;
222
+ border: 1px solid var(--ink);
223
+ background: var(--surface);
224
+ padding: clamp(20px, 5vw, 64px);
225
+ box-shadow: var(--shadow);
226
+ font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
227
+ font-size: 15px;
228
+ line-height: 1.7;
229
+ }
230
+ .reader-content h1, .reader-content h2, .reader-content h3 { font-family: "Departure Mono", monospace; line-height: 1.25; }
231
+ .reader-content h2 { margin-top: 2.3em; border-bottom: 1px dashed var(--line); padding-bottom: .35em; }
232
+ .reader-content pre { overflow: auto; padding: 16px; background: var(--surface-2); border-left: 4px solid var(--accent); }
233
+ .reader-content code { font-family: "Departure Mono", monospace; font-size: .88em; }
234
+ .reader-content table { display: block; max-width: 100%; overflow-x: auto; border-collapse: collapse; }
235
+ .reader-content th, .reader-content td { border: 1px solid var(--line); padding: 8px 10px; }
236
+ .reader-content img, .reader-content svg { max-width: 100%; height: auto; }
237
+ .reader-content a { color: var(--reading); text-decoration-thickness: 1px; }
238
+ .mermaid { overflow-x: auto; padding: 20px 0; text-align: center; }
239
+
240
+ @media (max-width: 760px) {
241
+ .workspace { grid-template-columns: 1fr; }
242
+ .sidebar { border-right: 0; border-bottom: 2px solid var(--ink); }
243
+ .project-nav { grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); }
244
+ .shortcut-card { display: none; }
245
+ .queue-title-row { align-items: start; flex-direction: column; }
246
+ .reader-toolbar { top: 68px; flex-direction: column; }
247
+ }
248
+ `;
249
+ //# sourceMappingURL=web-styles.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"web-styles.js","sourceRoot":"","sources":["../src/web-styles.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,UAAU,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAuPzB,CAAC"}
package/package.json ADDED
@@ -0,0 +1,60 @@
1
+ {
2
+ "name": "mdmaid-desk",
3
+ "version": "0.1.0",
4
+ "type": "module",
5
+ "description": "Persistent local document inbox and reading workspace for Markdown artifacts",
6
+ "keywords": [
7
+ "markdown",
8
+ "mermaid",
9
+ "document-inbox",
10
+ "reader",
11
+ "tui",
12
+ "cli"
13
+ ],
14
+ "author": "Oleksandr Besan",
15
+ "license": "MIT",
16
+ "repository": {
17
+ "type": "git",
18
+ "url": "https://github.com/OleksandrBesan/mdmaid.desk"
19
+ },
20
+ "homepage": "https://github.com/OleksandrBesan/mdmaid.desk#readme",
21
+ "bugs": {
22
+ "url": "https://github.com/OleksandrBesan/mdmaid.desk/issues"
23
+ },
24
+ "files": [
25
+ "dist",
26
+ "!dist/*.test.*"
27
+ ],
28
+ "bin": {
29
+ "mdmaid-desk": "dist/cli.js"
30
+ },
31
+ "scripts": {
32
+ "build": "tsc -p tsconfig.json",
33
+ "test": "npm run build && node --test dist/*.test.js",
34
+ "test:coverage": "npm run build && node --test --experimental-test-coverage dist/*.test.js",
35
+ "check": "npm run test",
36
+ "package:smoke": "npm run build && node scripts/package-smoke.mjs",
37
+ "prepublishOnly": "npm run check && npm run package:smoke"
38
+ },
39
+ "engines": {
40
+ "node": ">=22"
41
+ },
42
+ "publishConfig": {
43
+ "access": "public",
44
+ "provenance": true
45
+ },
46
+ "devDependencies": {
47
+ "@types/better-sqlite3": "^9.6.0",
48
+ "@types/node": "^24.1.0",
49
+ "@types/sanitize-html": "^2.16.1",
50
+ "typescript": "^5.8.3"
51
+ },
52
+ "dependencies": {
53
+ "better-sqlite3": "^12.11.1",
54
+ "chalk": "^5.6.2",
55
+ "mdmaid": "^0.1.16",
56
+ "sanitize-html": "^2.17.6",
57
+ "slice-ansi": "^7.1.2",
58
+ "string-width": "^7.2.0"
59
+ }
60
+ }