@creator-notes/cnotes 0.16.11
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/.claude-plugin/plugin.json +14 -0
- package/.mcp.json +12 -0
- package/LICENSE +21 -0
- package/README.md +303 -0
- package/dist/cn.d.ts +3 -0
- package/dist/cn.d.ts.map +1 -0
- package/dist/cn.js +124 -0
- package/dist/cn.js.map +1 -0
- package/dist/commands/auth.d.ts +10 -0
- package/dist/commands/auth.d.ts.map +1 -0
- package/dist/commands/auth.js +188 -0
- package/dist/commands/auth.js.map +1 -0
- package/dist/commands/canvas.d.ts +3 -0
- package/dist/commands/canvas.d.ts.map +1 -0
- package/dist/commands/canvas.js +1383 -0
- package/dist/commands/canvas.js.map +1 -0
- package/dist/commands/claude-hook.d.ts +28 -0
- package/dist/commands/claude-hook.d.ts.map +1 -0
- package/dist/commands/claude-hook.js +59 -0
- package/dist/commands/claude-hook.js.map +1 -0
- package/dist/commands/config.d.ts +3 -0
- package/dist/commands/config.d.ts.map +1 -0
- package/dist/commands/config.js +47 -0
- package/dist/commands/config.js.map +1 -0
- package/dist/commands/files.d.ts +3 -0
- package/dist/commands/files.d.ts.map +1 -0
- package/dist/commands/files.js +119 -0
- package/dist/commands/files.js.map +1 -0
- package/dist/commands/init.d.ts +3 -0
- package/dist/commands/init.d.ts.map +1 -0
- package/dist/commands/init.js +473 -0
- package/dist/commands/init.js.map +1 -0
- package/dist/commands/mcp.d.ts +15 -0
- package/dist/commands/mcp.d.ts.map +1 -0
- package/dist/commands/mcp.js +118 -0
- package/dist/commands/mcp.js.map +1 -0
- package/dist/commands/memory.d.ts +3 -0
- package/dist/commands/memory.d.ts.map +1 -0
- package/dist/commands/memory.js +150 -0
- package/dist/commands/memory.js.map +1 -0
- package/dist/commands/notes.d.ts +3 -0
- package/dist/commands/notes.d.ts.map +1 -0
- package/dist/commands/notes.js +706 -0
- package/dist/commands/notes.js.map +1 -0
- package/dist/commands/operations.d.ts +18 -0
- package/dist/commands/operations.d.ts.map +1 -0
- package/dist/commands/operations.js +231 -0
- package/dist/commands/operations.js.map +1 -0
- package/dist/commands/relationships.d.ts +3 -0
- package/dist/commands/relationships.d.ts.map +1 -0
- package/dist/commands/relationships.js +94 -0
- package/dist/commands/relationships.js.map +1 -0
- package/dist/commands/schema.d.ts +12 -0
- package/dist/commands/schema.d.ts.map +1 -0
- package/dist/commands/schema.js +85 -0
- package/dist/commands/schema.js.map +1 -0
- package/dist/commands/search.d.ts +3 -0
- package/dist/commands/search.d.ts.map +1 -0
- package/dist/commands/search.js +57 -0
- package/dist/commands/search.js.map +1 -0
- package/dist/commands/theme.d.ts +3 -0
- package/dist/commands/theme.d.ts.map +1 -0
- package/dist/commands/theme.js +184 -0
- package/dist/commands/theme.js.map +1 -0
- package/dist/commands/timeline.d.ts +3 -0
- package/dist/commands/timeline.d.ts.map +1 -0
- package/dist/commands/timeline.js +97 -0
- package/dist/commands/timeline.js.map +1 -0
- package/dist/commands/types.d.ts +3 -0
- package/dist/commands/types.d.ts.map +1 -0
- package/dist/commands/types.js +139 -0
- package/dist/commands/types.js.map +1 -0
- package/dist/commands/versions.d.ts +3 -0
- package/dist/commands/versions.d.ts.map +1 -0
- package/dist/commands/versions.js +120 -0
- package/dist/commands/versions.js.map +1 -0
- package/dist/commands/workspace.d.ts +13 -0
- package/dist/commands/workspace.d.ts.map +1 -0
- package/dist/commands/workspace.js +176 -0
- package/dist/commands/workspace.js.map +1 -0
- package/dist/lib/api-client.d.ts +45 -0
- package/dist/lib/api-client.d.ts.map +1 -0
- package/dist/lib/api-client.js +198 -0
- package/dist/lib/api-client.js.map +1 -0
- package/dist/lib/auth-store.d.ts +47 -0
- package/dist/lib/auth-store.d.ts.map +1 -0
- package/dist/lib/auth-store.js +116 -0
- package/dist/lib/auth-store.js.map +1 -0
- package/dist/lib/brand.d.ts +32 -0
- package/dist/lib/brand.d.ts.map +1 -0
- package/dist/lib/brand.js +32 -0
- package/dist/lib/brand.js.map +1 -0
- package/dist/lib/build-schema.d.ts +97 -0
- package/dist/lib/build-schema.d.ts.map +1 -0
- package/dist/lib/build-schema.js +139 -0
- package/dist/lib/build-schema.js.map +1 -0
- package/dist/lib/canvas-read.d.ts +54 -0
- package/dist/lib/canvas-read.d.ts.map +1 -0
- package/dist/lib/canvas-read.js +145 -0
- package/dist/lib/canvas-read.js.map +1 -0
- package/dist/lib/claude-session.d.ts +73 -0
- package/dist/lib/claude-session.d.ts.map +1 -0
- package/dist/lib/claude-session.js +104 -0
- package/dist/lib/claude-session.js.map +1 -0
- package/dist/lib/config.d.ts +28 -0
- package/dist/lib/config.d.ts.map +1 -0
- package/dist/lib/config.js +66 -0
- package/dist/lib/config.js.map +1 -0
- package/dist/lib/env.d.ts +14 -0
- package/dist/lib/env.d.ts.map +1 -0
- package/dist/lib/env.js +16 -0
- package/dist/lib/env.js.map +1 -0
- package/dist/lib/errors.d.ts +47 -0
- package/dist/lib/errors.d.ts.map +1 -0
- package/dist/lib/errors.js +194 -0
- package/dist/lib/errors.js.map +1 -0
- package/dist/lib/fs-utils.d.ts +2 -0
- package/dist/lib/fs-utils.d.ts.map +1 -0
- package/dist/lib/fs-utils.js +16 -0
- package/dist/lib/fs-utils.js.map +1 -0
- package/dist/lib/install-hook.d.ts +86 -0
- package/dist/lib/install-hook.d.ts.map +1 -0
- package/dist/lib/install-hook.js +168 -0
- package/dist/lib/install-hook.js.map +1 -0
- package/dist/lib/install-mcp.d.ts +21 -0
- package/dist/lib/install-mcp.d.ts.map +1 -0
- package/dist/lib/install-mcp.js +133 -0
- package/dist/lib/install-mcp.js.map +1 -0
- package/dist/lib/install-skill.d.ts +49 -0
- package/dist/lib/install-skill.d.ts.map +1 -0
- package/dist/lib/install-skill.js +113 -0
- package/dist/lib/install-skill.js.map +1 -0
- package/dist/lib/output.d.ts +29 -0
- package/dist/lib/output.d.ts.map +1 -0
- package/dist/lib/output.js +78 -0
- package/dist/lib/output.js.map +1 -0
- package/dist/lib/resolve-note.d.ts +7 -0
- package/dist/lib/resolve-note.d.ts.map +1 -0
- package/dist/lib/resolve-note.js +23 -0
- package/dist/lib/resolve-note.js.map +1 -0
- package/dist/lib/stdin.d.ts +5 -0
- package/dist/lib/stdin.d.ts.map +1 -0
- package/dist/lib/stdin.js +11 -0
- package/dist/lib/stdin.js.map +1 -0
- package/dist/lib/style.d.ts +10 -0
- package/dist/lib/style.d.ts.map +1 -0
- package/dist/lib/style.js +17 -0
- package/dist/lib/style.js.map +1 -0
- package/dist/lib/themes.d.ts +44 -0
- package/dist/lib/themes.d.ts.map +1 -0
- package/dist/lib/themes.js +168 -0
- package/dist/lib/themes.js.map +1 -0
- package/dist/mcp-server.d.ts +3 -0
- package/dist/mcp-server.d.ts.map +1 -0
- package/dist/mcp-server.js +782 -0
- package/dist/mcp-server.js.map +1 -0
- package/package.json +66 -0
- package/skills/cnotes/SKILL.md +680 -0
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { NotFoundError } from "./errors.js";
|
|
2
|
+
/**
|
|
3
|
+
* Resolve a display ID (e.g., "MEETING-12") to a Convex note ID.
|
|
4
|
+
* Falls back to treating the input as a Convex ID directly.
|
|
5
|
+
*/
|
|
6
|
+
export async function resolveNoteId(api, workspaceId, idOrDisplayId) {
|
|
7
|
+
// If it looks like a Convex ID (no dash with letters), use directly
|
|
8
|
+
if (!idOrDisplayId.match(/^[A-Z]+-\d+$/)) {
|
|
9
|
+
return idOrDisplayId;
|
|
10
|
+
}
|
|
11
|
+
// Resolve display ID
|
|
12
|
+
const notesList = await api.get("/api/notes", {
|
|
13
|
+
workspaceId,
|
|
14
|
+
exact_id: idOrDisplayId,
|
|
15
|
+
excludeContent: "true",
|
|
16
|
+
});
|
|
17
|
+
const note = Array.isArray(notesList) ? notesList[0] : null;
|
|
18
|
+
if (!note) {
|
|
19
|
+
throw new NotFoundError(`Note not found: ${idOrDisplayId}`, "Run `cnotes notes list` to see valid display IDs in this workspace.");
|
|
20
|
+
}
|
|
21
|
+
return String(note._id || note.id);
|
|
22
|
+
}
|
|
23
|
+
//# sourceMappingURL=resolve-note.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"resolve-note.js","sourceRoot":"","sources":["../../src/lib/resolve-note.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAE5C;;;GAGG;AACH,MAAM,CAAC,KAAK,UAAU,aAAa,CACjC,GAAc,EACd,WAAmB,EACnB,aAAqB;IAErB,oEAAoE;IACpE,IAAI,CAAC,aAAa,CAAC,KAAK,CAAC,cAAc,CAAC,EAAE,CAAC;QACzC,OAAO,aAAa,CAAC;IACvB,CAAC;IAED,qBAAqB;IACrB,MAAM,SAAS,GAAG,MAAM,GAAG,CAAC,GAAG,CAAiC,YAAY,EAAE;QAC5E,WAAW;QACX,QAAQ,EAAE,aAAa;QACvB,cAAc,EAAE,MAAM;KACvB,CAAC,CAAC;IAEH,MAAM,IAAI,GAAG,KAAK,CAAC,OAAO,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC;IAC5D,IAAI,CAAC,IAAI,EAAE,CAAC;QACV,MAAM,IAAI,aAAa,CACrB,mBAAmB,aAAa,EAAE,EAClC,qEAAqE,CACtE,CAAC;IACJ,CAAC;IAED,OAAO,MAAM,CAAC,IAAI,CAAC,GAAG,IAAI,IAAI,CAAC,EAAE,CAAC,CAAC;AACrC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"stdin.d.ts","sourceRoot":"","sources":["../../src/lib/stdin.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,wBAAsB,SAAS,IAAI,OAAO,CAAC,MAAM,CAAC,CAMjD"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Read all data from stdin as a UTF-8 string.
|
|
3
|
+
*/
|
|
4
|
+
export async function readStdin() {
|
|
5
|
+
const chunks = [];
|
|
6
|
+
for await (const chunk of process.stdin) {
|
|
7
|
+
chunks.push(chunk);
|
|
8
|
+
}
|
|
9
|
+
return Buffer.concat(chunks).toString("utf-8");
|
|
10
|
+
}
|
|
11
|
+
//# sourceMappingURL=stdin.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"stdin.js","sourceRoot":"","sources":["../../src/lib/stdin.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,MAAM,CAAC,KAAK,UAAU,SAAS;IAC7B,MAAM,MAAM,GAAa,EAAE,CAAC;IAC5B,IAAI,KAAK,EAAE,MAAM,KAAK,IAAI,OAAO,CAAC,KAAK,EAAE,CAAC;QACxC,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;IACrB,CAAC;IACD,OAAO,MAAM,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC,QAAQ,CAAC,OAAO,CAAC,CAAC;AACjD,CAAC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export declare const bold: (text: string) => string;
|
|
2
|
+
export declare const dim: (text: string) => string;
|
|
3
|
+
export declare const green: (text: string) => string;
|
|
4
|
+
export declare const cyan: (text: string) => string;
|
|
5
|
+
export declare const yellow: (text: string) => string;
|
|
6
|
+
export declare const red: (text: string) => string;
|
|
7
|
+
export declare const CHECK: string;
|
|
8
|
+
export declare const ARROW: string;
|
|
9
|
+
export declare const WARN: string;
|
|
10
|
+
//# sourceMappingURL=style.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"style.d.ts","sourceRoot":"","sources":["../../src/lib/style.ts"],"names":[],"mappings":"AAYA,eAAO,MAAM,IAAI,SAJD,MAAM,WAIyB,CAAC;AAChD,eAAO,MAAM,GAAG,SALA,MAAM,WAKwB,CAAC;AAC/C,eAAO,MAAM,KAAK,SANF,MAAM,WAM2B,CAAC;AAClD,eAAO,MAAM,IAAI,SAPD,MAAM,WAO0B,CAAC;AACjD,eAAO,MAAM,MAAM,SARH,MAAM,WAQ4B,CAAC;AACnD,eAAO,MAAM,GAAG,SATA,MAAM,WASyB,CAAC;AAEhD,eAAO,MAAM,KAAK,QAAa,CAAC;AAChC,eAAO,MAAM,KAAK,QAAY,CAAC;AAC/B,eAAO,MAAM,IAAI,QAAc,CAAC"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
// ANSI escape code helpers — zero dependencies.
|
|
2
|
+
const isColorSupported = process.env.NO_COLOR === undefined &&
|
|
3
|
+
process.env.FORCE_COLOR !== "0" &&
|
|
4
|
+
(process.env.FORCE_COLOR !== undefined || process.stdout.isTTY);
|
|
5
|
+
function wrap(code, resetCode) {
|
|
6
|
+
return (text) => isColorSupported ? `${code}${text}${resetCode}` : text;
|
|
7
|
+
}
|
|
8
|
+
export const bold = wrap("\x1b[1m", "\x1b[22m");
|
|
9
|
+
export const dim = wrap("\x1b[2m", "\x1b[22m");
|
|
10
|
+
export const green = wrap("\x1b[32m", "\x1b[39m");
|
|
11
|
+
export const cyan = wrap("\x1b[36m", "\x1b[39m");
|
|
12
|
+
export const yellow = wrap("\x1b[33m", "\x1b[39m");
|
|
13
|
+
export const red = wrap("\x1b[31m", "\x1b[39m");
|
|
14
|
+
export const CHECK = green("✓");
|
|
15
|
+
export const ARROW = cyan("→");
|
|
16
|
+
export const WARN = yellow("!");
|
|
17
|
+
//# sourceMappingURL=style.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"style.js","sourceRoot":"","sources":["../../src/lib/style.ts"],"names":[],"mappings":"AAAA,gDAAgD;AAEhD,MAAM,gBAAgB,GACpB,OAAO,CAAC,GAAG,CAAC,QAAQ,KAAK,SAAS;IAClC,OAAO,CAAC,GAAG,CAAC,WAAW,KAAK,GAAG;IAC/B,CAAC,OAAO,CAAC,GAAG,CAAC,WAAW,KAAK,SAAS,IAAI,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;AAElE,SAAS,IAAI,CAAC,IAAY,EAAE,SAAiB;IAC3C,OAAO,CAAC,IAAY,EAAE,EAAE,CACtB,gBAAgB,CAAC,CAAC,CAAC,GAAG,IAAI,GAAG,IAAI,GAAG,SAAS,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC;AAC3D,CAAC;AAED,MAAM,CAAC,MAAM,IAAI,GAAG,IAAI,CAAC,SAAS,EAAE,UAAU,CAAC,CAAC;AAChD,MAAM,CAAC,MAAM,GAAG,GAAG,IAAI,CAAC,SAAS,EAAE,UAAU,CAAC,CAAC;AAC/C,MAAM,CAAC,MAAM,KAAK,GAAG,IAAI,CAAC,UAAU,EAAE,UAAU,CAAC,CAAC;AAClD,MAAM,CAAC,MAAM,IAAI,GAAG,IAAI,CAAC,UAAU,EAAE,UAAU,CAAC,CAAC;AACjD,MAAM,CAAC,MAAM,MAAM,GAAG,IAAI,CAAC,UAAU,EAAE,UAAU,CAAC,CAAC;AACnD,MAAM,CAAC,MAAM,GAAG,GAAG,IAAI,CAAC,UAAU,EAAE,UAAU,CAAC,CAAC;AAEhD,MAAM,CAAC,MAAM,KAAK,GAAG,KAAK,CAAC,GAAG,CAAC,CAAC;AAChC,MAAM,CAAC,MAAM,KAAK,GAAG,IAAI,CAAC,GAAG,CAAC,CAAC;AAC/B,MAAM,CAAC,MAAM,IAAI,GAAG,MAAM,CAAC,GAAG,CAAC,CAAC"}
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* CLI-side mirror of theme metadata + color helpers.
|
|
3
|
+
*
|
|
4
|
+
* The CLI publishes as a standalone package, so it can't import from
|
|
5
|
+
* the Next.js project's `lib/themes/`. Keep this in sync with:
|
|
6
|
+
* - lib/themes/presets.ts (PRESETS, EDITABLE_TOKEN_NAMES)
|
|
7
|
+
* - lib/themes/color.ts (parseHex, hslTripleToHex,
|
|
8
|
+
* parseColorInput, TRANSPARENT_TRIPLE)
|
|
9
|
+
*
|
|
10
|
+
* Parity with the canonical helpers is pinned by
|
|
11
|
+
* __tests__/cli-themes.test.ts — the test fails before users see a
|
|
12
|
+
* discrepancy. Server-side validation in /api/theme uses the canonical
|
|
13
|
+
* sources, so this file is for local UX only — the server is the contract.
|
|
14
|
+
*/
|
|
15
|
+
export interface PresetMeta {
|
|
16
|
+
id: string;
|
|
17
|
+
name: string;
|
|
18
|
+
isDark: boolean;
|
|
19
|
+
description: string;
|
|
20
|
+
}
|
|
21
|
+
export declare const PRESETS: PresetMeta[];
|
|
22
|
+
/** Tokens the visual editor / `cnotes theme set-color` is allowed to override. */
|
|
23
|
+
export declare const EDITABLE_TOKEN_NAMES: string[];
|
|
24
|
+
export declare const EDITABLE_TOKEN_NAME_SET: ReadonlySet<string>;
|
|
25
|
+
/** All known preset ids — kept in sync with lib/themes/presets.ts PRESET_IDS. */
|
|
26
|
+
export declare const PRESET_IDS: ReadonlySet<string>;
|
|
27
|
+
export declare function parseHex(hex: string): [number, number, number] | null;
|
|
28
|
+
export declare const TRANSPARENT_TRIPLE = "0 0% 0% / 0";
|
|
29
|
+
/**
|
|
30
|
+
* Pure HSL→hex conversion. Alpha is dropped — this is for hex preview only.
|
|
31
|
+
* Kept byte-identical to the canonical lib/themes/color.ts hslTripleToHex
|
|
32
|
+
* so the parity test in __tests__/cli-themes.test.ts stays green.
|
|
33
|
+
*/
|
|
34
|
+
export declare function hslTripleToHex(triple: string): string;
|
|
35
|
+
/**
|
|
36
|
+
* Coerce a color argument into a stored HSL triple. Accepts:
|
|
37
|
+
* - "transparent"
|
|
38
|
+
* - "H S% L%" or "H S% L% / A"
|
|
39
|
+
* - "#rrggbb" / "#rgb" (must be `#`-prefixed; bare "abc" is too easy
|
|
40
|
+
* to confuse with a typo'd HSL triple, so we don't accept it)
|
|
41
|
+
* Returns null when nothing matches.
|
|
42
|
+
*/
|
|
43
|
+
export declare function parseColorInput(value: string): string | null;
|
|
44
|
+
//# sourceMappingURL=themes.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"themes.d.ts","sourceRoot":"","sources":["../../src/lib/themes.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAEH,MAAM,WAAW,UAAU;IACzB,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,EAAE,OAAO,CAAC;IAChB,WAAW,EAAE,MAAM,CAAC;CACrB;AAED,eAAO,MAAM,OAAO,EAAE,UAAU,EAW/B,CAAC;AAEF,kFAAkF;AAClF,eAAO,MAAM,oBAAoB,EAAE,MAAM,EAWxC,CAAC;AAEF,eAAO,MAAM,uBAAuB,EAAE,WAAW,CAAC,MAAM,CAAiC,CAAC;AAE1F,iFAAiF;AACjF,eAAO,MAAM,UAAU,EAAE,WAAW,CAAC,MAAM,CAAqC,CAAC;AAKjF,wBAAgB,QAAQ,CAAC,GAAG,EAAE,MAAM,GAAG,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC,GAAG,IAAI,CAUrE;AAMD,eAAO,MAAM,kBAAkB,gBAAgB,CAAC;AAqDhD;;;;GAIG;AACH,wBAAgB,cAAc,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,CAMrD;AAED;;;;;;;GAOG;AACH,wBAAgB,eAAe,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAyB5D"}
|
|
@@ -0,0 +1,168 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* CLI-side mirror of theme metadata + color helpers.
|
|
3
|
+
*
|
|
4
|
+
* The CLI publishes as a standalone package, so it can't import from
|
|
5
|
+
* the Next.js project's `lib/themes/`. Keep this in sync with:
|
|
6
|
+
* - lib/themes/presets.ts (PRESETS, EDITABLE_TOKEN_NAMES)
|
|
7
|
+
* - lib/themes/color.ts (parseHex, hslTripleToHex,
|
|
8
|
+
* parseColorInput, TRANSPARENT_TRIPLE)
|
|
9
|
+
*
|
|
10
|
+
* Parity with the canonical helpers is pinned by
|
|
11
|
+
* __tests__/cli-themes.test.ts — the test fails before users see a
|
|
12
|
+
* discrepancy. Server-side validation in /api/theme uses the canonical
|
|
13
|
+
* sources, so this file is for local UX only — the server is the contract.
|
|
14
|
+
*/
|
|
15
|
+
export const PRESETS = [
|
|
16
|
+
{ id: "ember", name: "Ember", isDark: true, description: "Roasted-coffee dark with glowing ember orange and a cool teal spark." },
|
|
17
|
+
{ id: "synapse", name: "Synapse", isDark: true, description: "Neural-network teal firing on pure black, connections lit in the dark." },
|
|
18
|
+
{ id: "dark", name: "Tia", isDark: true, description: "Dark with magenta accent." },
|
|
19
|
+
{ id: "catppuccin-mocha", name: "Catppuccin Mocha", isDark: true, description: "Soothing pastel dark from the Catppuccin family." },
|
|
20
|
+
{ id: "dracula", name: "Dracula", isDark: true, description: "Iconic high-contrast dark with purple accent." },
|
|
21
|
+
{ id: "solarized-dark", name: "Solarized Dark", isDark: true, description: "Ethan Schoonover's classic teal-on-navy palette." },
|
|
22
|
+
{ id: "rose-pine", name: "Rosé Pine", isDark: true, description: "Soho-vibes for the pastel-loving developer." },
|
|
23
|
+
{ id: "sage", name: "Sage", isDark: false, description: "Muted greenish-grey, easy on the eyes." },
|
|
24
|
+
{ id: "light", name: "Light", isDark: false, description: "Clean classic light." },
|
|
25
|
+
{ id: "catppuccin-latte", name: "Catppuccin Latte", isDark: false, description: "Soothing pastel light from the Catppuccin family." },
|
|
26
|
+
];
|
|
27
|
+
/** Tokens the visual editor / `cnotes theme set-color` is allowed to override. */
|
|
28
|
+
export const EDITABLE_TOKEN_NAMES = [
|
|
29
|
+
// Backgrounds
|
|
30
|
+
"background", "card", "popover", "muted", "border", "sidebar-background",
|
|
31
|
+
// Accent colors
|
|
32
|
+
"primary", "primary-foreground", "ring", "accent-teal",
|
|
33
|
+
// Text
|
|
34
|
+
"foreground", "muted-foreground", "prose-body", "prose-heading",
|
|
35
|
+
// Code & quotes
|
|
36
|
+
"code-background", "code-foreground", "blockquote-border",
|
|
37
|
+
// Status
|
|
38
|
+
"destructive", "success", "warning", "info",
|
|
39
|
+
];
|
|
40
|
+
export const EDITABLE_TOKEN_NAME_SET = new Set(EDITABLE_TOKEN_NAMES);
|
|
41
|
+
/** All known preset ids — kept in sync with lib/themes/presets.ts PRESET_IDS. */
|
|
42
|
+
export const PRESET_IDS = new Set(PRESETS.map((p) => p.id));
|
|
43
|
+
const HEX3 = /^#?([0-9a-fA-F])([0-9a-fA-F])([0-9a-fA-F])$/;
|
|
44
|
+
const HEX6 = /^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/;
|
|
45
|
+
export function parseHex(hex) {
|
|
46
|
+
const m6 = HEX6.exec(hex);
|
|
47
|
+
if (m6)
|
|
48
|
+
return [parseInt(m6[1], 16), parseInt(m6[2], 16), parseInt(m6[3], 16)];
|
|
49
|
+
const m3 = HEX3.exec(hex);
|
|
50
|
+
if (m3)
|
|
51
|
+
return [
|
|
52
|
+
parseInt(m3[1] + m3[1], 16),
|
|
53
|
+
parseInt(m3[2] + m3[2], 16),
|
|
54
|
+
parseInt(m3[3] + m3[3], 16),
|
|
55
|
+
];
|
|
56
|
+
return null;
|
|
57
|
+
}
|
|
58
|
+
// Same shape as lib/themes/color.ts — accepts an optional `/ alpha` suffix.
|
|
59
|
+
const HSL_RE = /^\s*(-?\d+(?:\.\d+)?)\s+(-?\d+(?:\.\d+)?)%\s+(-?\d+(?:\.\d+)?)%(?:\s*\/\s*(\d+(?:\.\d+)?%?|\.\d+%?))?\s*$/;
|
|
60
|
+
export const TRANSPARENT_TRIPLE = "0 0% 0% / 0";
|
|
61
|
+
function hslToRgb(h, s, l) {
|
|
62
|
+
const sNorm = Math.max(0, Math.min(100, s)) / 100;
|
|
63
|
+
const lNorm = Math.max(0, Math.min(100, l)) / 100;
|
|
64
|
+
const c = (1 - Math.abs(2 * lNorm - 1)) * sNorm;
|
|
65
|
+
const hp = (((h % 360) + 360) % 360) / 60;
|
|
66
|
+
const x = c * (1 - Math.abs((hp % 2) - 1));
|
|
67
|
+
let r1 = 0, g1 = 0, b1 = 0;
|
|
68
|
+
if (hp >= 0 && hp < 1)
|
|
69
|
+
[r1, g1, b1] = [c, x, 0];
|
|
70
|
+
else if (hp >= 1 && hp < 2)
|
|
71
|
+
[r1, g1, b1] = [x, c, 0];
|
|
72
|
+
else if (hp >= 2 && hp < 3)
|
|
73
|
+
[r1, g1, b1] = [0, c, x];
|
|
74
|
+
else if (hp >= 3 && hp < 4)
|
|
75
|
+
[r1, g1, b1] = [0, x, c];
|
|
76
|
+
else if (hp >= 4 && hp < 5)
|
|
77
|
+
[r1, g1, b1] = [x, 0, c];
|
|
78
|
+
else
|
|
79
|
+
[r1, g1, b1] = [c, 0, x];
|
|
80
|
+
const m = lNorm - c / 2;
|
|
81
|
+
return [
|
|
82
|
+
Math.round((r1 + m) * 255),
|
|
83
|
+
Math.round((g1 + m) * 255),
|
|
84
|
+
Math.round((b1 + m) * 255),
|
|
85
|
+
];
|
|
86
|
+
}
|
|
87
|
+
function rgbToHsl(r, g, b) {
|
|
88
|
+
const rN = r / 255, gN = g / 255, bN = b / 255;
|
|
89
|
+
const max = Math.max(rN, gN, bN);
|
|
90
|
+
const min = Math.min(rN, gN, bN);
|
|
91
|
+
const l = (max + min) / 2;
|
|
92
|
+
let h = 0, s = 0;
|
|
93
|
+
if (max !== min) {
|
|
94
|
+
const d = max - min;
|
|
95
|
+
s = l > 0.5 ? d / (2 - max - min) : d / (max + min);
|
|
96
|
+
switch (max) {
|
|
97
|
+
case rN:
|
|
98
|
+
h = ((gN - bN) / d + (gN < bN ? 6 : 0));
|
|
99
|
+
break;
|
|
100
|
+
case gN:
|
|
101
|
+
h = ((bN - rN) / d + 2);
|
|
102
|
+
break;
|
|
103
|
+
default: h = ((rN - gN) / d + 4);
|
|
104
|
+
}
|
|
105
|
+
h *= 60;
|
|
106
|
+
}
|
|
107
|
+
return { h, s: s * 100, l: l * 100 };
|
|
108
|
+
}
|
|
109
|
+
function parseAlpha(raw) {
|
|
110
|
+
if (raw === undefined)
|
|
111
|
+
return 1;
|
|
112
|
+
const trimmed = raw.trim();
|
|
113
|
+
if (trimmed.endsWith("%")) {
|
|
114
|
+
const n = Number(trimmed.slice(0, -1));
|
|
115
|
+
return Number.isFinite(n) ? Math.max(0, Math.min(1, n / 100)) : 1;
|
|
116
|
+
}
|
|
117
|
+
const n = Number(trimmed);
|
|
118
|
+
return Number.isFinite(n) ? Math.max(0, Math.min(1, n)) : 1;
|
|
119
|
+
}
|
|
120
|
+
/**
|
|
121
|
+
* Pure HSL→hex conversion. Alpha is dropped — this is for hex preview only.
|
|
122
|
+
* Kept byte-identical to the canonical lib/themes/color.ts hslTripleToHex
|
|
123
|
+
* so the parity test in __tests__/cli-themes.test.ts stays green.
|
|
124
|
+
*/
|
|
125
|
+
export function hslTripleToHex(triple) {
|
|
126
|
+
const m = HSL_RE.exec(triple);
|
|
127
|
+
if (!m)
|
|
128
|
+
return "#000000";
|
|
129
|
+
const [r, g, b] = hslToRgb(Number(m[1]), Number(m[2]), Number(m[3]));
|
|
130
|
+
const toHex = (n) => n.toString(16).padStart(2, "0");
|
|
131
|
+
return `#${toHex(r)}${toHex(g)}${toHex(b)}`;
|
|
132
|
+
}
|
|
133
|
+
/**
|
|
134
|
+
* Coerce a color argument into a stored HSL triple. Accepts:
|
|
135
|
+
* - "transparent"
|
|
136
|
+
* - "H S% L%" or "H S% L% / A"
|
|
137
|
+
* - "#rrggbb" / "#rgb" (must be `#`-prefixed; bare "abc" is too easy
|
|
138
|
+
* to confuse with a typo'd HSL triple, so we don't accept it)
|
|
139
|
+
* Returns null when nothing matches.
|
|
140
|
+
*/
|
|
141
|
+
export function parseColorInput(value) {
|
|
142
|
+
const trimmed = value.trim();
|
|
143
|
+
if (trimmed === "")
|
|
144
|
+
return null;
|
|
145
|
+
if (trimmed.toLowerCase() === "transparent")
|
|
146
|
+
return TRANSPARENT_TRIPLE;
|
|
147
|
+
const m = HSL_RE.exec(trimmed);
|
|
148
|
+
if (m) {
|
|
149
|
+
const round = (n) => Math.round(n * 10) / 10;
|
|
150
|
+
const base = `${round(Number(m[1]))} ${round(Number(m[2]))}% ${round(Number(m[3]))}%`;
|
|
151
|
+
const a = parseAlpha(m[4]);
|
|
152
|
+
if (a >= 1)
|
|
153
|
+
return base;
|
|
154
|
+
if (a <= 0)
|
|
155
|
+
return TRANSPARENT_TRIPLE;
|
|
156
|
+
return `${base} / ${Math.round(a * 1000) / 1000}`;
|
|
157
|
+
}
|
|
158
|
+
if (trimmed.startsWith("#")) {
|
|
159
|
+
const rgb = parseHex(trimmed);
|
|
160
|
+
if (rgb) {
|
|
161
|
+
const { h, s, l } = rgbToHsl(rgb[0], rgb[1], rgb[2]);
|
|
162
|
+
const round = (n) => Math.round(n * 10) / 10;
|
|
163
|
+
return `${round(h)} ${round(s)}% ${round(l)}%`;
|
|
164
|
+
}
|
|
165
|
+
}
|
|
166
|
+
return null;
|
|
167
|
+
}
|
|
168
|
+
//# sourceMappingURL=themes.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"themes.js","sourceRoot":"","sources":["../../src/lib/themes.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AASH,MAAM,CAAC,MAAM,OAAO,GAAiB;IACnC,EAAE,EAAE,EAAE,OAAO,EAAa,IAAI,EAAE,OAAO,EAAa,MAAM,EAAE,IAAI,EAAG,WAAW,EAAE,sEAAsE,EAAE;IACxJ,EAAE,EAAE,EAAE,SAAS,EAAW,IAAI,EAAE,SAAS,EAAW,MAAM,EAAE,IAAI,EAAG,WAAW,EAAE,wEAAwE,EAAE;IAC1J,EAAE,EAAE,EAAE,MAAM,EAAc,IAAI,EAAE,KAAK,EAAe,MAAM,EAAE,IAAI,EAAG,WAAW,EAAE,2BAA2B,EAAE;IAC7G,EAAE,EAAE,EAAE,kBAAkB,EAAE,IAAI,EAAE,kBAAkB,EAAE,MAAM,EAAE,IAAI,EAAG,WAAW,EAAE,kDAAkD,EAAE;IACpI,EAAE,EAAE,EAAE,SAAS,EAAW,IAAI,EAAE,SAAS,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