wendkeep 0.2.3 → 0.2.5
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/package.json +1 -1
- package/src/vault-theme.mjs +157 -32
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "wendkeep",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.5",
|
|
4
4
|
"description": "Automatically capture AI coding agent sessions (Claude Code, Codex) as local Markdown in your Obsidian vault — turn-by-turn history, cost/token tracking, auto-extracted decisions/bugs/learnings, rendered in the graph. Local-first.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
package/src/vault-theme.mjs
CHANGED
|
@@ -1,44 +1,169 @@
|
|
|
1
|
-
// Vault color system for `wendkeep init`.
|
|
2
|
-
//
|
|
3
|
-
// -
|
|
4
|
-
//
|
|
5
|
-
//
|
|
6
|
-
//
|
|
1
|
+
// Vault color system for `wendkeep init`. Generated CSS snippet (ported from the
|
|
2
|
+
// NutriGym-Vision design) plus Obsidian graph color groups. Two visual layers:
|
|
3
|
+
// - file explorer: each taxonomy folder gets an accent (border + dot + hover)
|
|
4
|
+
// - open note: colored by its `cssclasses` (topic-session/decision/bug/learning)
|
|
5
|
+
// via a --note-accent var driving headings, strong, tags, tables, blockquotes
|
|
6
|
+
// Folder/topic lists are derived from maps that mirror the vault taxonomy, so the
|
|
7
|
+
// snippet stays in sync. Pure + side-effect free; init does the file I/O.
|
|
7
8
|
|
|
8
9
|
export const SNIPPET_NAME = 'wendkeep-colors';
|
|
9
10
|
|
|
10
|
-
//
|
|
11
|
+
// Base palette (hex + "r, g, b" for rgba()).
|
|
12
|
+
const PALETTE = {
|
|
13
|
+
blue: { hex: '#2f80ed', rgb: '47, 128, 237' },
|
|
14
|
+
violet: { hex: '#8f5cf7', rgb: '143, 92, 247' },
|
|
15
|
+
red: { hex: '#e03131', rgb: '224, 49, 49' },
|
|
16
|
+
green: { hex: '#2f9e44', rgb: '47, 158, 68' },
|
|
17
|
+
amber: { hex: '#f59f00', rgb: '245, 159, 0' },
|
|
18
|
+
teal: { hex: '#0ca678', rgb: '12, 166, 120' },
|
|
19
|
+
indigo: { hex: '#4263eb', rgb: '66, 99, 235' },
|
|
20
|
+
slate: { hex: '#64748b', rgb: '100, 116, 139' },
|
|
21
|
+
};
|
|
22
|
+
|
|
23
|
+
// File-explorer folder -> palette key (mirrors VAULT_FOLDERS in taxonomy.mjs).
|
|
24
|
+
const FOLDER_PALETTE = [
|
|
25
|
+
['00-Inbox', 'amber'],
|
|
26
|
+
['01-Projeto', 'indigo'],
|
|
27
|
+
['02-Sessões', 'blue'],
|
|
28
|
+
['03-Linear', 'teal'],
|
|
29
|
+
['04-Decisões', 'violet'],
|
|
30
|
+
['05-Bugs', 'red'],
|
|
31
|
+
['06-Aprendizados', 'green'],
|
|
32
|
+
['Templates', 'slate'],
|
|
33
|
+
];
|
|
34
|
+
|
|
35
|
+
// Note cssclass -> palette key; `folder` is reused for the graph color groups.
|
|
11
36
|
export const NOTE_COLORS = {
|
|
12
|
-
session: { cssClass: 'topic-session', folder: '02-Sessões',
|
|
13
|
-
decision: { cssClass: 'topic-decision', folder: '04-Decisões',
|
|
14
|
-
bug: { cssClass: 'topic-bug', folder: '05-Bugs',
|
|
15
|
-
learning: { cssClass: 'topic-learning', folder: '06-Aprendizados',
|
|
37
|
+
session: { cssClass: 'topic-session', folder: '02-Sessões', palette: 'blue' },
|
|
38
|
+
decision: { cssClass: 'topic-decision', folder: '04-Decisões', palette: 'violet' },
|
|
39
|
+
bug: { cssClass: 'topic-bug', folder: '05-Bugs', palette: 'red' },
|
|
40
|
+
learning: { cssClass: 'topic-learning', folder: '06-Aprendizados', palette: 'green' },
|
|
16
41
|
};
|
|
17
42
|
|
|
18
|
-
|
|
43
|
+
// cssclasses that get the note-accent treatment (the four note types + a home note).
|
|
44
|
+
const TOPIC_CLASSES = [...Object.values(NOTE_COLORS).map((n) => n.cssClass), 'vault-home'];
|
|
45
|
+
const NOTE_ACCENTS = [
|
|
46
|
+
...Object.values(NOTE_COLORS).map((n) => ({ cssClass: n.cssClass, palette: n.palette })),
|
|
47
|
+
{ cssClass: 'vault-home', palette: 'indigo' },
|
|
48
|
+
];
|
|
49
|
+
|
|
50
|
+
const FX = '.workspace-leaf-content[data-type="file-explorer"] .nav-folder-title';
|
|
51
|
+
const folderSel = FOLDER_PALETTE.map(([f]) => `[data-path^="${f}"]`).join(',\n ');
|
|
52
|
+
const topicReading = TOPIC_CLASSES.map((c) => `.${c}`).join(', ');
|
|
19
53
|
|
|
20
54
|
export function renderColorSnippetCss() {
|
|
21
|
-
const
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
}).join('\n\n');
|
|
35
|
-
|
|
36
|
-
return `/* ${SNIPPET_NAME} — generated by wendkeep. Accents notes by type (cssclasses). */
|
|
55
|
+
const rootVars = Object.entries(PALETTE)
|
|
56
|
+
.map(([k, v]) => ` --us-${k}: ${v.hex};\n --us-${k}-rgb: ${v.rgb};`)
|
|
57
|
+
.join('\n');
|
|
58
|
+
|
|
59
|
+
const folderAccentVars = FOLDER_PALETTE.map(([folder, key]) =>
|
|
60
|
+
`${FX}[data-path^="${folder}"] {\n --folder-accent: var(--us-${key});\n --folder-accent-rgb: var(--us-${key}-rgb);\n}`,
|
|
61
|
+
).join('\n\n');
|
|
62
|
+
|
|
63
|
+
const noteAccentVars = NOTE_ACCENTS.map(({ cssClass, palette }) =>
|
|
64
|
+
`.markdown-preview-view.${cssClass},\n.markdown-source-view.${cssClass} {\n --note-accent: var(--us-${palette});\n --note-accent-rgb: var(--us-${palette}-rgb);\n}`,
|
|
65
|
+
).join('\n\n');
|
|
66
|
+
|
|
67
|
+
return `/* ${SNIPPET_NAME} — generated by wendkeep. File-explorer + note-type colors. */
|
|
37
68
|
:root {
|
|
38
|
-
${
|
|
69
|
+
${rootVars}
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
.theme-dark { --us-line-tint: 44%; }
|
|
73
|
+
.theme-light { --us-line-tint: 36%; }
|
|
74
|
+
|
|
75
|
+
/* --- File explorer: accented folders ------------------------------------- */
|
|
76
|
+
${FX} {
|
|
77
|
+
border-left: 3px solid transparent;
|
|
78
|
+
border-radius: 0 6px 6px 0;
|
|
79
|
+
margin: 1px 4px 1px 0;
|
|
80
|
+
transition: background-color 120ms ease, border-color 120ms ease, color 120ms ease;
|
|
39
81
|
}
|
|
40
82
|
|
|
41
|
-
${
|
|
83
|
+
${folderAccentVars}
|
|
84
|
+
|
|
85
|
+
${FX}:is(
|
|
86
|
+
${folderSel}
|
|
87
|
+
) {
|
|
88
|
+
border-left-color: var(--folder-accent);
|
|
89
|
+
color: color-mix(in srgb, var(--folder-accent) var(--us-line-tint), var(--text-normal));
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
${FX}:is(
|
|
93
|
+
${folderSel}
|
|
94
|
+
):hover {
|
|
95
|
+
background-color: rgba(var(--folder-accent-rgb), 0.13);
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
${FX}:is(
|
|
99
|
+
${folderSel}
|
|
100
|
+
) .nav-folder-title-content::before {
|
|
101
|
+
content: "";
|
|
102
|
+
display: inline-block;
|
|
103
|
+
width: 0.58em;
|
|
104
|
+
height: 0.58em;
|
|
105
|
+
margin-right: 0.48em;
|
|
106
|
+
border-radius: 999px;
|
|
107
|
+
background: var(--folder-accent);
|
|
108
|
+
box-shadow: 0 0 0 3px rgba(var(--folder-accent-rgb), 0.16);
|
|
109
|
+
vertical-align: 0.05em;
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
/* --- Note types: colors from frontmatter cssclasses ---------------------- */
|
|
113
|
+
${noteAccentVars}
|
|
114
|
+
|
|
115
|
+
.markdown-rendered:is(${topicReading}) h1,
|
|
116
|
+
.markdown-source-view:is(${topicReading}) .cm-header-1 {
|
|
117
|
+
color: color-mix(in srgb, var(--note-accent) 62%, var(--text-normal));
|
|
118
|
+
}
|
|
119
|
+
.markdown-rendered:is(${topicReading}) h1 {
|
|
120
|
+
border-bottom: 2px solid rgba(var(--note-accent-rgb), 0.42);
|
|
121
|
+
padding-bottom: 0.35em;
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
.markdown-rendered:is(${topicReading}) h2 {
|
|
125
|
+
border-left: 4px solid var(--note-accent);
|
|
126
|
+
border-radius: 6px;
|
|
127
|
+
padding: 0.38em 0.62em;
|
|
128
|
+
background: rgba(var(--note-accent-rgb), 0.11);
|
|
129
|
+
}
|
|
130
|
+
.markdown-source-view:is(${topicReading}) .HyperMD-header-2 {
|
|
131
|
+
border-left: 4px solid var(--note-accent);
|
|
132
|
+
border-radius: 6px;
|
|
133
|
+
padding-left: 0.62em;
|
|
134
|
+
background: rgba(var(--note-accent-rgb), 0.1);
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
.markdown-rendered:is(${topicReading}) h3,
|
|
138
|
+
.markdown-source-view:is(${topicReading}) .cm-header-3 {
|
|
139
|
+
color: color-mix(in srgb, var(--note-accent) 76%, var(--text-normal));
|
|
140
|
+
}
|
|
141
|
+
|
|
142
|
+
.markdown-rendered:is(${topicReading}) strong,
|
|
143
|
+
.markdown-source-view:is(${topicReading}) .cm-strong {
|
|
144
|
+
color: color-mix(in srgb, var(--note-accent) 70%, var(--text-normal));
|
|
145
|
+
}
|
|
146
|
+
|
|
147
|
+
.markdown-rendered:is(${topicReading}) .tag {
|
|
148
|
+
border: 1px solid rgba(var(--note-accent-rgb), 0.42);
|
|
149
|
+
background: rgba(var(--note-accent-rgb), 0.1);
|
|
150
|
+
color: color-mix(in srgb, var(--note-accent) 72%, var(--text-normal));
|
|
151
|
+
}
|
|
152
|
+
|
|
153
|
+
.markdown-rendered:is(${topicReading}) th {
|
|
154
|
+
background: rgba(var(--note-accent-rgb), 0.12);
|
|
155
|
+
color: color-mix(in srgb, var(--note-accent) 68%, var(--text-normal));
|
|
156
|
+
}
|
|
157
|
+
|
|
158
|
+
.markdown-rendered:is(${topicReading}) blockquote {
|
|
159
|
+
border-left-color: var(--note-accent);
|
|
160
|
+
background: rgba(var(--note-accent-rgb), 0.08);
|
|
161
|
+
border-radius: 0 6px 6px 0;
|
|
162
|
+
}
|
|
163
|
+
|
|
164
|
+
.markdown-rendered:is(${topicReading}) code {
|
|
165
|
+
border-color: rgba(var(--note-accent-rgb), 0.28);
|
|
166
|
+
}
|
|
42
167
|
`;
|
|
43
168
|
}
|
|
44
169
|
|
|
@@ -53,9 +178,9 @@ export function mergeAppearance(existing, snippetName = SNIPPET_NAME) {
|
|
|
53
178
|
|
|
54
179
|
// Graph color groups: one per note folder, colored from the palette.
|
|
55
180
|
export function graphColorGroups() {
|
|
56
|
-
return
|
|
181
|
+
return Object.values(NOTE_COLORS).map((v) => ({
|
|
57
182
|
query: `path:"${v.folder}"`,
|
|
58
|
-
color: { a: 1, rgb: parseInt(v.hex.slice(1), 16) },
|
|
183
|
+
color: { a: 1, rgb: parseInt(PALETTE[v.palette].hex.slice(1), 16) },
|
|
59
184
|
}));
|
|
60
185
|
}
|
|
61
186
|
|