@docpod/themes 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.
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Integritis
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md ADDED
@@ -0,0 +1,30 @@
1
+ # @docpod/themes
2
+
3
+ The four preset themes for [docpod](https://github.com/integritis/docpod).
4
+ All share a quiet, WCAG AA-validated light/dark base and differ in their accent
5
+ colors:
6
+
7
+ | id | Mood |
8
+ | ---------- | -------------------------------- |
9
+ | `slate` | Achromatic, editorial — default |
10
+ | `indigo` | Calm indigo, engineering-leaning |
11
+ | `sapphire` | Cool blue |
12
+ | `ember` | Warm amber |
13
+
14
+ In `docpod.config.ts` you normally just name one (`theme: "indigo"`), or
15
+ extend one with partial overrides:
16
+
17
+ ```ts
18
+ export default {
19
+ theme: { extends: "slate", colors: { light: { accent: "#7A1F1F" } } },
20
+ };
21
+ ```
22
+
23
+ Programmatic use:
24
+
25
+ ```ts
26
+ import { presets, getPreset } from "@docpod/themes";
27
+ import indigo from "@docpod/themes/indigo";
28
+ ```
29
+
30
+ MIT © docpod
package/dist/base.d.ts ADDED
@@ -0,0 +1,28 @@
1
+ import type { ColorTokens, Theme } from "@docpod/theme-schema";
2
+ /**
3
+ * Shared structural / text / state / code tokens. Presets differ only in their
4
+ * accent trio (accent, accentHover, accentSoft), focus ring and selection — the
5
+ * "quiet by default" surface stays identical across the family.
6
+ */
7
+ export declare const lightBase: Omit<ColorTokens, "accent" | "accentHover" | "accentSoft" | "fgOnAccent" | "focusRing" | "selectionBg">;
8
+ export declare const darkBase: Omit<ColorTokens, "accent" | "accentHover" | "accentSoft" | "fgOnAccent" | "focusRing" | "selectionBg">;
9
+ export type AccentSpec = {
10
+ accent: string;
11
+ accentHover: string;
12
+ accentSoft: string;
13
+ fgOnAccent: string;
14
+ selectionBg: string;
15
+ };
16
+ /** Assemble a full preset from the shared bases + per-mode accent specs. */
17
+ export declare function makeTheme(args: {
18
+ id: string;
19
+ name: string;
20
+ description: string;
21
+ light: AccentSpec;
22
+ dark: AccentSpec;
23
+ preview: NonNullable<Theme["preview"]>;
24
+ code?: {
25
+ light: string;
26
+ dark: string;
27
+ };
28
+ }): Theme;
package/dist/base.js ADDED
@@ -0,0 +1,84 @@
1
+ //#region src/base.ts
2
+ /**
3
+ * Shared structural / text / state / code tokens. Presets differ only in their
4
+ * accent trio (accent, accentHover, accentSoft), focus ring and selection — the
5
+ * "quiet by default" surface stays identical across the family.
6
+ */
7
+ const lightBase = {
8
+ bg: "#FAFAF7",
9
+ bgElevated: "#FFFFFF",
10
+ bgSubtle: "#F1F1EC",
11
+ border: "#E4E4DE",
12
+ borderStrong: "#C9C9C1",
13
+ fg: "#0F0F10",
14
+ fgMuted: "#55555A",
15
+ fgSubtle: "#6E6E74",
16
+ success: "#1F7A46",
17
+ warning: "#9A5B00",
18
+ danger: "#B42318",
19
+ info: "#1E5FB4",
20
+ codeBg: "#F6F6F1",
21
+ codeBorder: "#E4E4DE",
22
+ codeInlineBg: "#EEEEE8",
23
+ kbdBg: "#FFFFFF",
24
+ kbdBorder: "#D6D6CE"
25
+ };
26
+ const darkBase = {
27
+ bg: "#0B0B0D",
28
+ bgElevated: "#16161A",
29
+ bgSubtle: "#121216",
30
+ border: "#26262C",
31
+ borderStrong: "#3A3A42",
32
+ fg: "#E8E8EA",
33
+ fgMuted: "#A0A0A8",
34
+ fgSubtle: "#87878F",
35
+ success: "#4ED08A",
36
+ warning: "#E8B765",
37
+ danger: "#FF8A7A",
38
+ info: "#7FB2FF",
39
+ codeBg: "#121216",
40
+ codeBorder: "#26262C",
41
+ codeInlineBg: "#1B1B20",
42
+ kbdBg: "#1B1B20",
43
+ kbdBorder: "#3A3A42"
44
+ };
45
+ /** Assemble a full preset from the shared bases + per-mode accent specs. */
46
+ function makeTheme(args) {
47
+ return {
48
+ $schema: "https://docpod.dev/schema/theme/v1.json",
49
+ id: args.id,
50
+ name: args.name,
51
+ description: args.description,
52
+ version: "0.1.0",
53
+ author: "docpod",
54
+ license: "MIT",
55
+ colors: {
56
+ light: {
57
+ ...lightBase,
58
+ ...args.light,
59
+ focusRing: args.light.accent
60
+ },
61
+ dark: {
62
+ ...darkBase,
63
+ ...args.dark,
64
+ focusRing: args.dark.accent
65
+ }
66
+ },
67
+ fonts: {
68
+ sans: "IBM Plex Sans",
69
+ mono: "IBM Plex Mono",
70
+ serif: "Source Serif 4"
71
+ },
72
+ motion: {
73
+ enabled: true,
74
+ intensity: "subtle"
75
+ },
76
+ code: {
77
+ light: args.code?.light ?? "github-light",
78
+ dark: args.code?.dark ?? "github-dark-dimmed"
79
+ },
80
+ preview: args.preview
81
+ };
82
+ }
83
+ //#endregion
84
+ export { makeTheme as t };
@@ -0,0 +1,4 @@
1
+ import type { Theme } from "@docpod/theme-schema";
2
+ /** Docpod Ember — warm, friendly. For libraries that want some temperature. */
3
+ declare const ember: Theme;
4
+ export default ember;
package/dist/ember.js ADDED
@@ -0,0 +1,28 @@
1
+ import { t as makeTheme } from "./base.js";
2
+ //#region src/ember.ts
3
+ /** Docpod Ember — warm, friendly. For libraries that want some temperature. */
4
+ const ember = makeTheme({
5
+ id: "docpod-ember",
6
+ name: "Docpod Ember",
7
+ description: "Warm ember tone for friendly, approachable docs.",
8
+ light: {
9
+ accent: "#A8521F",
10
+ accentHover: "#8A4318",
11
+ accentSoft: "#F7E9DF",
12
+ fgOnAccent: "#FFFFFF",
13
+ selectionBg: "#F3DCC9"
14
+ },
15
+ dark: {
16
+ accent: "#FFB07A",
17
+ accentHover: "#FFC59A",
18
+ accentSoft: "#2A1C12",
19
+ fgOnAccent: "#0B0B0D",
20
+ selectionBg: "#3A2618"
21
+ },
22
+ preview: {
23
+ accent: "#A8521F",
24
+ mood: ["warm", "friendly"]
25
+ }
26
+ });
27
+ //#endregion
28
+ export { ember as default };
@@ -0,0 +1,13 @@
1
+ import type { Theme } from "@docpod/theme-schema";
2
+ import slate from "./slate.js";
3
+ import indigo from "./indigo.js";
4
+ import sapphire from "./sapphire.js";
5
+ import ember from "./ember.js";
6
+ export { slate, indigo, sapphire, ember };
7
+ /** Preset id (the short form accepted in config: `theme: "slate"`). */
8
+ export type PresetId = "slate" | "indigo" | "sapphire" | "ember";
9
+ /** Registry keyed by the short id used in `docpod.config.ts`. */
10
+ export declare const presets: Record<PresetId, Theme>;
11
+ export declare const presetList: Theme[];
12
+ /** Resolve a short id (or the long `docpod-*` id) to a preset, or undefined. */
13
+ export declare function getPreset(id: string): Theme | undefined;
package/dist/index.js ADDED
@@ -0,0 +1,25 @@
1
+ import ember from "./ember.js";
2
+ import slate from "./slate.js";
3
+ import indigo from "./indigo.js";
4
+ import sapphire from "./sapphire.js";
5
+ //#region src/index.ts
6
+ /** Registry keyed by the short id used in `docpod.config.ts`. */
7
+ const presets = {
8
+ slate,
9
+ indigo,
10
+ sapphire,
11
+ ember
12
+ };
13
+ const presetList = [
14
+ slate,
15
+ indigo,
16
+ sapphire,
17
+ ember
18
+ ];
19
+ /** Resolve a short id (or the long `docpod-*` id) to a preset, or undefined. */
20
+ function getPreset(id) {
21
+ if (id in presets) return presets[id];
22
+ return presetList.find((t) => t.id === id);
23
+ }
24
+ //#endregion
25
+ export { ember, getPreset, indigo, presetList, presets, sapphire, slate };
@@ -0,0 +1,4 @@
1
+ import type { Theme } from "@docpod/theme-schema";
2
+ /** Docpod Indigo — calm, engineering-leaning. */
3
+ declare const indigo: Theme;
4
+ export default indigo;
package/dist/indigo.js ADDED
@@ -0,0 +1,28 @@
1
+ import { t as makeTheme } from "./base.js";
2
+ //#region src/indigo.ts
3
+ /** Docpod Indigo — calm, engineering-leaning. */
4
+ const indigo = makeTheme({
5
+ id: "docpod-indigo",
6
+ name: "Docpod Indigo",
7
+ description: "Calm indigo with a technical edge.",
8
+ light: {
9
+ accent: "#3D3D7A",
10
+ accentHover: "#2E2E60",
11
+ accentSoft: "#E9E9F4",
12
+ fgOnAccent: "#FFFFFF",
13
+ selectionBg: "#DEDEF2"
14
+ },
15
+ dark: {
16
+ accent: "#9B9BFF",
17
+ accentHover: "#B4B4FF",
18
+ accentSoft: "#1E1E2C",
19
+ fgOnAccent: "#0B0B0D",
20
+ selectionBg: "#262640"
21
+ },
22
+ preview: {
23
+ accent: "#3D3D7A",
24
+ mood: ["tech", "calm"]
25
+ }
26
+ });
27
+ //#endregion
28
+ export { indigo as default };
@@ -0,0 +1,4 @@
1
+ import type { Theme } from "@docpod/theme-schema";
2
+ /** Docpod Sapphire — clear, general-purpose blue. Good for API/SDK docs. */
3
+ declare const sapphire: Theme;
4
+ export default sapphire;
@@ -0,0 +1,32 @@
1
+ import { t as makeTheme } from "./base.js";
2
+ //#region src/sapphire.ts
3
+ /** Docpod Sapphire — clear, general-purpose blue. Good for API/SDK docs. */
4
+ const sapphire = makeTheme({
5
+ id: "docpod-sapphire",
6
+ name: "Docpod Sapphire",
7
+ description: "Clear, general-purpose sapphire blue.",
8
+ light: {
9
+ accent: "#1E4F8F",
10
+ accentHover: "#173E72",
11
+ accentSoft: "#E3ECF7",
12
+ fgOnAccent: "#FFFFFF",
13
+ selectionBg: "#D5E4F5"
14
+ },
15
+ dark: {
16
+ accent: "#6FA6FF",
17
+ accentHover: "#92BCFF",
18
+ accentSoft: "#142235",
19
+ fgOnAccent: "#0B0B0D",
20
+ selectionBg: "#1C3147"
21
+ },
22
+ preview: {
23
+ accent: "#1E4F8F",
24
+ mood: [
25
+ "clear",
26
+ "neutral",
27
+ "tech"
28
+ ]
29
+ }
30
+ });
31
+ //#endregion
32
+ export { sapphire as default };
@@ -0,0 +1,4 @@
1
+ import type { Theme } from "@docpod/theme-schema";
2
+ /** Docpod Slate — achromatic, the quietest preset. The default. */
3
+ declare const slate: Theme;
4
+ export default slate;
package/dist/slate.js ADDED
@@ -0,0 +1,32 @@
1
+ import { t as makeTheme } from "./base.js";
2
+ //#region src/slate.ts
3
+ /** Docpod Slate — achromatic, the quietest preset. The default. */
4
+ const slate = makeTheme({
5
+ id: "docpod-slate",
6
+ name: "Docpod Slate",
7
+ description: "Achromatic and quiet. The default — quiet by default, made literal.",
8
+ light: {
9
+ accent: "#1F1F22",
10
+ accentHover: "#38383C",
11
+ accentSoft: "#ECECE6",
12
+ fgOnAccent: "#FAFAF7",
13
+ selectionBg: "#E2E2DA"
14
+ },
15
+ dark: {
16
+ accent: "#E8E8EA",
17
+ accentHover: "#FFFFFF",
18
+ accentSoft: "#222228",
19
+ fgOnAccent: "#0B0B0D",
20
+ selectionBg: "#2A2A30"
21
+ },
22
+ preview: {
23
+ accent: "#1F1F22",
24
+ mood: [
25
+ "neutral",
26
+ "quiet",
27
+ "editorial"
28
+ ]
29
+ }
30
+ });
31
+ //#endregion
32
+ export { slate as default };
package/package.json ADDED
@@ -0,0 +1,56 @@
1
+ {
2
+ "name": "@docpod/themes",
3
+ "version": "0.1.0",
4
+ "description": "docpod preset themes: slate, indigo, sapphire, ember.",
5
+ "type": "module",
6
+ "license": "MIT",
7
+ "repository": {
8
+ "type": "git",
9
+ "url": "git+https://github.com/integritis/docpod.git",
10
+ "directory": "packages/themes"
11
+ },
12
+ "homepage": "https://github.com/integritis/docpod#readme",
13
+ "bugs": "https://github.com/integritis/docpod/issues",
14
+ "publishConfig": {
15
+ "access": "public",
16
+ "registry": "https://registry.npmjs.org/"
17
+ },
18
+ "exports": {
19
+ ".": {
20
+ "types": "./dist/index.d.ts",
21
+ "import": "./dist/index.js"
22
+ },
23
+ "./slate": {
24
+ "types": "./dist/slate.d.ts",
25
+ "import": "./dist/slate.js"
26
+ },
27
+ "./indigo": {
28
+ "types": "./dist/indigo.d.ts",
29
+ "import": "./dist/indigo.js"
30
+ },
31
+ "./sapphire": {
32
+ "types": "./dist/sapphire.d.ts",
33
+ "import": "./dist/sapphire.js"
34
+ },
35
+ "./ember": {
36
+ "types": "./dist/ember.d.ts",
37
+ "import": "./dist/ember.js"
38
+ }
39
+ },
40
+ "main": "./dist/index.js",
41
+ "types": "./dist/index.d.ts",
42
+ "files": [
43
+ "dist"
44
+ ],
45
+ "dependencies": {
46
+ "@docpod/theme-schema": "^0.1.0"
47
+ },
48
+ "devDependencies": {
49
+ "tsdown": "^0.12.0",
50
+ "typescript": "^5.7.0"
51
+ },
52
+ "scripts": {
53
+ "build": "tsdown && tsc -p tsconfig.build.json",
54
+ "typecheck": "tsc --noEmit"
55
+ }
56
+ }