doxtr-theme-solarized 0.1.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,667 @@
1
+ """
2
+ Doxtr Brand Theme — Solarized (Ethan Schoonover's ``altercation/solarized``).
3
+
4
+ Verifies clean separation between color schemes/fonts/branding and layout/renderer
5
+ packages by configuring the Aubergine HTML, EPUB, and PDF renderers strictly
6
+ through :class:`~doxtr_theme_core.ThemeSpec` and theme defaults without redefining
7
+ boxes, spacing, or document geometry.
8
+ """
9
+
10
+ from __future__ import annotations
11
+
12
+ from pathlib import Path
13
+ from typing import Any
14
+
15
+ from doxtr_theme_core import (
16
+ BrandConfig,
17
+ ColorPalette,
18
+ FontSpec,
19
+ ThemeSpec,
20
+ register_brand_theme,
21
+ register_renderer,
22
+ setup_brand_theme,
23
+ )
24
+
25
+ __version__ = "0.1.0"
26
+
27
+ PACKAGE_DIR = Path(__file__).resolve().parent
28
+ ASSETS_DIR = PACKAGE_DIR / "assets"
29
+ FONTS_DIR = PACKAGE_DIR / "fonts"
30
+
31
+ # ---------------------------------------------------------------------------
32
+ # Official 16-color Solarized Palette (https://github.com/altercation/solarized)
33
+ # ---------------------------------------------------------------------------
34
+ # Monotone background / content tones
35
+ SOLARIZED_BASE03 = "#002B36"
36
+ SOLARIZED_BASE02 = "#073642"
37
+ SOLARIZED_BASE01 = "#586E75"
38
+ SOLARIZED_BASE00 = "#657B83"
39
+ SOLARIZED_BASE0 = "#839496"
40
+ SOLARIZED_BASE1 = "#93A1A1"
41
+ SOLARIZED_BASE2 = "#EEE8D5"
42
+ SOLARIZED_BASE3 = "#FDF6E3"
43
+
44
+ # Accent tones (shared identically across light and dark modes by design)
45
+ SOLARIZED_YELLOW = "#B58900"
46
+ SOLARIZED_ORANGE = "#CB4B16"
47
+ SOLARIZED_RED = "#DC322F"
48
+ SOLARIZED_MAGENTA = "#D33682"
49
+ SOLARIZED_VIOLET = "#6C71C4"
50
+ SOLARIZED_BLUE = "#268BD2"
51
+ SOLARIZED_CYAN = "#2AA198"
52
+ SOLARIZED_GREEN = "#859900"
53
+
54
+ SOLARIZED_SWATCHES: dict[str, str] = {
55
+ "base03": SOLARIZED_BASE03,
56
+ "base02": SOLARIZED_BASE02,
57
+ "base01": SOLARIZED_BASE01,
58
+ "base00": SOLARIZED_BASE00,
59
+ "base0": SOLARIZED_BASE0,
60
+ "base1": SOLARIZED_BASE1,
61
+ "base2": SOLARIZED_BASE2,
62
+ "base3": SOLARIZED_BASE3,
63
+ "yellow": SOLARIZED_YELLOW,
64
+ "orange": SOLARIZED_ORANGE,
65
+ "red": SOLARIZED_RED,
66
+ "magenta": SOLARIZED_MAGENTA,
67
+ "violet": SOLARIZED_VIOLET,
68
+ "blue": SOLARIZED_BLUE,
69
+ "cyan": SOLARIZED_CYAN,
70
+ "green": SOLARIZED_GREEN,
71
+ }
72
+
73
+ SOLARIZED_LIGHT_PALETTE = ColorPalette(
74
+ primary=SOLARIZED_BLUE,
75
+ secondary=SOLARIZED_CYAN,
76
+ info=SOLARIZED_VIOLET,
77
+ success=SOLARIZED_GREEN,
78
+ warning=SOLARIZED_YELLOW,
79
+ danger=SOLARIZED_RED,
80
+ page=SOLARIZED_BASE3,
81
+ text=SOLARIZED_BASE00,
82
+ text_muted=SOLARIZED_BASE01,
83
+ surface=SOLARIZED_BASE2,
84
+ surface_alt=SOLARIZED_BASE3,
85
+ border=SOLARIZED_BASE1,
86
+ accent=SOLARIZED_ORANGE,
87
+ extra={
88
+ "link": SOLARIZED_BLUE,
89
+ "code_bg": SOLARIZED_BASE2,
90
+ "code_fg": SOLARIZED_BASE01,
91
+ **SOLARIZED_SWATCHES,
92
+ },
93
+ )
94
+
95
+ SOLARIZED_DARK_PALETTE = ColorPalette(
96
+ primary=SOLARIZED_BLUE,
97
+ secondary=SOLARIZED_CYAN,
98
+ info=SOLARIZED_VIOLET,
99
+ success=SOLARIZED_GREEN,
100
+ warning=SOLARIZED_YELLOW,
101
+ danger=SOLARIZED_RED,
102
+ page=SOLARIZED_BASE03,
103
+ text=SOLARIZED_BASE0,
104
+ text_muted=SOLARIZED_BASE1,
105
+ surface=SOLARIZED_BASE02,
106
+ surface_alt=SOLARIZED_BASE03,
107
+ border=SOLARIZED_BASE01,
108
+ accent=SOLARIZED_ORANGE,
109
+ extra={
110
+ "link": SOLARIZED_BLUE,
111
+ "code_bg": SOLARIZED_BASE02,
112
+ "code_fg": SOLARIZED_BASE1,
113
+ **SOLARIZED_SWATCHES,
114
+ },
115
+ )
116
+
117
+ SOLARIZED_FONTS = FontSpec(
118
+ main_font="IBM Plex Serif",
119
+ main_font_options="Ligatures=TeX",
120
+ sans_font="IBM Plex Sans Condensed",
121
+ sans_font_options="Scale=MatchLowercase",
122
+ mono_font="IBM Plex Mono",
123
+ mono_font_options="Scale=MatchLowercase",
124
+ main_font_size="11pt",
125
+ css_body_stack="'IBM Plex Serif', Georgia, serif",
126
+ css_heading_stack="'IBM Plex Sans Condensed', 'IBM Plex Sans', system-ui, sans-serif",
127
+ css_mono_stack="'IBM Plex Mono', ui-monospace, 'Cascadia Mono', monospace",
128
+ fonts_dirs=(str(FONTS_DIR),),
129
+ registered_families={
130
+ "IBM Plex Serif": {
131
+ "dir": str(FONTS_DIR),
132
+ "upright": "IBMPlexSerif-Regular.ttf",
133
+ "bold": "IBMPlexSerif-Bold.ttf",
134
+ "italic": "IBMPlexSerif-Italic.ttf",
135
+ "bold_italic": "IBMPlexSerif-BoldItalic.ttf",
136
+ "options": "Ligatures=TeX",
137
+ },
138
+ "IBM Plex Sans Condensed": {
139
+ "dir": str(FONTS_DIR),
140
+ "upright": "IBMPlexSansCondensed-Regular.ttf",
141
+ "bold": "IBMPlexSansCondensed-Bold.ttf",
142
+ "italic": "IBMPlexSansCondensed-Italic.ttf",
143
+ "bold_italic": "IBMPlexSansCondensed-BoldItalic.ttf",
144
+ "options": "Scale=MatchLowercase",
145
+ },
146
+ "IBM Plex Mono": {
147
+ "dir": str(FONTS_DIR),
148
+ "upright": "IBMPlexMono-Regular.ttf",
149
+ "bold": "IBMPlexMono-Bold.ttf",
150
+ "italic": "IBMPlexMono-Italic.ttf",
151
+ "bold_italic": "IBMPlexMono-BoldItalic.ttf",
152
+ "options": "Scale=MatchLowercase",
153
+ },
154
+ },
155
+ heading_fonts={
156
+ "part": "IBM Plex Sans Condensed",
157
+ "chapter": "IBM Plex Sans Condensed",
158
+ "section": "IBM Plex Sans Condensed",
159
+ "subsection": "IBM Plex Sans Condensed",
160
+ "subsubsection": "IBM Plex Serif",
161
+ },
162
+ )
163
+
164
+ SOLARIZED_BRANDING = BrandConfig(
165
+ name="solarized",
166
+ display_name="Doxtr Solarized",
167
+ short_name="Solarized",
168
+ logo_light=str(ASSETS_DIR / "solarized_logo_light.png"),
169
+ logo_dark=str(ASSETS_DIR / "solarized_logo_dark.png"),
170
+ favicon=str(ASSETS_DIR / "solarized_favicon.png"),
171
+ tagline="Precision colors for machines and people",
172
+ footer_text="Solarized Light & Dark color scheme on Aubergine layout.",
173
+ repository_url="https://github.com/doxtr/doxtr-theme-solarized",
174
+ )
175
+
176
+ # ---------------------------------------------------------------------------
177
+ # Output Renderer Configurations (Aubergine HTML / EPUB / PDF + Swift tokens)
178
+ # ---------------------------------------------------------------------------
179
+ SOLARIZED_HTML_OPTIONS: dict[str, Any] = {
180
+ "show_prev_next": True,
181
+ "show_toc": True,
182
+ "show_nav": True,
183
+ "navigation_depth": 4,
184
+ "navigation_expand": "current_subtree",
185
+ "color_scheme_toggle": True,
186
+ "show_full_width_toggle": True,
187
+ "show_sidebar_toggles": True,
188
+ "show_search_button": True,
189
+ "search_shortcut": "k",
190
+ "skip_link_label": "Skip to Solarized content",
191
+ "repo_url": SOLARIZED_BRANDING.repository_url,
192
+ "brand_name": SOLARIZED_BRANDING.display_name,
193
+ "short_name": SOLARIZED_BRANDING.short_name,
194
+ "logo": SOLARIZED_BRANDING.logo_light,
195
+ "logo_light": SOLARIZED_BRANDING.logo_light,
196
+ "logo_dark": SOLARIZED_BRANDING.logo_dark,
197
+ "logo_alt": "Solarized geometric sun emblem",
198
+ "tagline": SOLARIZED_BRANDING.tagline,
199
+ "announcement_banner": "Solarized Light & Dark color scheme on Aubergine HTML layout",
200
+ "header_links": [
201
+ {"label": "Solarized Spec", "url": "https://ethanschoonover.com/solarized/"},
202
+ {"label": "Doxtr", "url": SOLARIZED_BRANDING.repository_url},
203
+ ],
204
+ }
205
+
206
+ SOLARIZED_EPUB_OPTIONS: dict[str, Any] = {
207
+ "embed_fonts": True,
208
+ "auto_cover": True,
209
+ "dark_images": True,
210
+ "image_brightness_threshold": 0.62,
211
+ "cover_style": {
212
+ "background_color": SOLARIZED_BASE03,
213
+ "surface_color": SOLARIZED_BASE02,
214
+ "accent_color": SOLARIZED_ORANGE,
215
+ "title_color": SOLARIZED_BASE3,
216
+ "muted_color": SOLARIZED_BASE1,
217
+ "subtitle": SOLARIZED_BRANDING.tagline,
218
+ },
219
+ }
220
+
221
+
222
+ def _solarized_admon(bg_token: str, icon_bg_expr: str | None = None) -> dict[str, str]:
223
+ """Build color/font-only admonition overrides backed by Solarized tokens."""
224
+ icon_bg = icon_bg_expr or f"dd:{bg_token}:darken:20"
225
+ return {
226
+ "title_background_color": f"dd:{bg_token}",
227
+ "title_icon_box_background_color": icon_bg,
228
+ "title_font_color": f"dd:{bg_token}:contrast:fg:page",
229
+ "title_icon_color": "dd:this:title_icon_box_background_color:contrast:fg:page",
230
+ "title_font": "IBM Plex Sans Condensed",
231
+ "content_background_color": "dd:surface",
232
+ "content_background_color_nested": "dd:surface_alt",
233
+ "content_font_color": "dd:text",
234
+ "content_font": "IBM Plex Serif",
235
+ }
236
+
237
+
238
+ def _solarized_need_variant(token: str) -> dict[str, str]:
239
+ """Build color/font-only need overrides backed by Solarized tokens."""
240
+ return {
241
+ "title_background_color": f"dd:{token}",
242
+ "title_font_color": f"dd:{token}:contrast:fg:page",
243
+ "title_color": f"dd:{token}:contrast:fg:page",
244
+ "title_icon_color": f"dd:{token}:contrast:fg:page",
245
+ "title_font": "IBM Plex Sans Condensed",
246
+ "segmentation_color": f"dd:{token}",
247
+ "metadata_background_color": "dd:surface",
248
+ "metadata_key_color": f"dd:{token}",
249
+ "metadata_key_font": "IBM Plex Sans Condensed",
250
+ "metadata_font_color": "dd:text_muted",
251
+ "metadata_font": "IBM Plex Sans Condensed",
252
+ "content_background_color": "dd:page",
253
+ "content_font_color": "dd:text",
254
+ "content_font": "IBM Plex Serif",
255
+ }
256
+
257
+
258
+ # Strictly colors, fonts, and branding — Aubergine supplies all box geometry & layout.
259
+ SOLARIZED_PDF_DEFAULTS: dict[str, Any] = {
260
+ "semantic_palette": {
261
+ **SOLARIZED_LIGHT_PALETTE.to_semantic_dict(),
262
+ "dark": SOLARIZED_DARK_PALETTE.to_semantic_dict(),
263
+ },
264
+ "globals": {
265
+ "light": {
266
+ "main_font": SOLARIZED_FONTS.main_font,
267
+ "main_font_options": SOLARIZED_FONTS.main_font_options,
268
+ "sans_font": SOLARIZED_FONTS.sans_font,
269
+ "sans_font_options": SOLARIZED_FONTS.sans_font_options,
270
+ "mono_font": SOLARIZED_FONTS.mono_font,
271
+ "mono_font_options": SOLARIZED_FONTS.mono_font_options,
272
+ "main_font_size": SOLARIZED_FONTS.main_font_size,
273
+ "footer_logo": SOLARIZED_BRANDING.logo_light,
274
+ "wcag_level": 4.5,
275
+ },
276
+ "dark": {
277
+ "footer_logo": SOLARIZED_BRANDING.logo_dark,
278
+ "wcag_level": 4.5,
279
+ },
280
+ },
281
+ "title_page": {
282
+ "page_color": "dd:base02",
283
+ "title_font": "IBM Plex Sans Condensed",
284
+ "title_color": "dd:base3",
285
+ "subtitle_font": "IBM Plex Sans Condensed",
286
+ "subtitle_color": "dd:orange",
287
+ "author_font": "IBM Plex Serif",
288
+ "author_color": "dd:base2",
289
+ "date_font": "IBM Plex Serif",
290
+ "date_color": "dd:base1",
291
+ "release_version_font": "IBM Plex Mono",
292
+ "release_version_color": "dd:cyan",
293
+ },
294
+ "headings": {
295
+ "chapter": {
296
+ "font": "IBM Plex Sans Condensed",
297
+ "color": "dd:primary",
298
+ "line_color": "dd:orange",
299
+ "number_font": "IBM Plex Sans Condensed",
300
+ "number_color": "dd:primary",
301
+ },
302
+ "section": {
303
+ "font": "IBM Plex Sans Condensed",
304
+ "color": "dd:secondary",
305
+ "number_font": "IBM Plex Sans Condensed",
306
+ "number_color": "dd:secondary",
307
+ },
308
+ "subsection": {
309
+ "font": "IBM Plex Sans Condensed",
310
+ "color": "dd:primary",
311
+ "number_font": "IBM Plex Sans Condensed",
312
+ "number_color": "dd:primary",
313
+ },
314
+ "subsubsection": {
315
+ "font": "IBM Plex Serif",
316
+ "color": "dd:text_muted",
317
+ "number_font": "IBM Plex Serif",
318
+ "number_color": "dd:text_muted",
319
+ },
320
+ },
321
+ "parts": {
322
+ "font": "IBM Plex Sans Condensed",
323
+ "color": "dd:primary",
324
+ "number_font": "IBM Plex Sans Condensed",
325
+ "number_color": "dd:accent",
326
+ "number_part_font": "IBM Plex Sans Condensed",
327
+ "number_part_color": "dd:text_muted",
328
+ "number_number_font": "IBM Plex Sans Condensed",
329
+ "number_number_color": "dd:accent",
330
+ },
331
+ "epigraphs": {
332
+ "font": "IBM Plex Serif",
333
+ "color": "dd:text_muted",
334
+ "author_font": "IBM Plex Sans Condensed",
335
+ "author_color": "dd:primary",
336
+ },
337
+ "draft": {
338
+ "color": "dd:border",
339
+ "font": "IBM Plex Sans Condensed",
340
+ },
341
+ "admonitions": {
342
+ "generic": _solarized_admon("primary", "dd:primary:darken:25"),
343
+ "note": _solarized_admon("info"),
344
+ "tip": _solarized_admon("success"),
345
+ "hint": _solarized_admon("cyan"),
346
+ "important": _solarized_admon("primary"),
347
+ "warning": _solarized_admon("warning"),
348
+ "caution": _solarized_admon("orange"),
349
+ "danger": _solarized_admon("danger"),
350
+ "error": _solarized_admon("red", "dd:red:darken:25"),
351
+ "attention": _solarized_admon("magenta"),
352
+ "seealso": _solarized_admon("secondary"),
353
+ },
354
+ "tables": {
355
+ "generic": {
356
+ "title_background_fade_mask_color": "dd:page",
357
+ "header_background_color": "dd:primary",
358
+ "header_font_color": "dd:primary:contrast:fg:page",
359
+ "header_font": "IBM Plex Sans Condensed",
360
+ "row_color_odd": "dd:surface",
361
+ "row_color_even": "dd:page",
362
+ "title_background_color": "dd:primary",
363
+ "title_font_color": "dd:primary:contrast:fg:page",
364
+ "title_font": "IBM Plex Sans Condensed",
365
+ },
366
+ },
367
+ "figures": {
368
+ "generic": {
369
+ "caption_background_color": "dd:surface",
370
+ "caption_font_color": "dd:primary",
371
+ "caption_font": "IBM Plex Sans Condensed",
372
+ },
373
+ },
374
+ "code": {
375
+ "generic": {
376
+ "title_background_color": "dd:surface",
377
+ "title_font_color": "dd:orange",
378
+ "title_font": "IBM Plex Sans Condensed",
379
+ "icon_color": "dd:orange",
380
+ "content_background_color": "dd:code_bg",
381
+ "content_font_color": "dd:code_fg",
382
+ "content_font": "IBM Plex Mono",
383
+ "border_color": "dd:border",
384
+ },
385
+ "bash": {
386
+ "title_background_color": "dd:surface",
387
+ "title_font_color": "dd:green",
388
+ "icon_color": "dd:green",
389
+ "border_color": "dd:border",
390
+ },
391
+ "sh": {
392
+ "title_background_color": "dd:surface",
393
+ "title_font_color": "dd:green",
394
+ "icon_color": "dd:green",
395
+ "border_color": "dd:border",
396
+ },
397
+ "python": {
398
+ "title_background_color": "dd:blue",
399
+ "title_font_color": "dd:blue:contrast:fg:page",
400
+ "icon_color": "dd:blue:contrast:fg:page",
401
+ "border_color": "dd:blue",
402
+ },
403
+ },
404
+ "containers": {
405
+ "default": {
406
+ "title_font": "IBM Plex Sans Condensed",
407
+ "title_color": "dd:blue",
408
+ "title_font_color": "dd:blue:contrast:fg:page",
409
+ "title_icon_color": "dd:blue:contrast:fg:page",
410
+ "content_font": "IBM Plex Serif",
411
+ "content_font_color": "dd:text",
412
+ "content_background_color": "dd:surface",
413
+ },
414
+ "typewriter": {
415
+ "title_font": "IBM Plex Mono",
416
+ "title_color": "dd:surface_alt",
417
+ "title_font_color": "dd:text",
418
+ "title_icon_color": "dd:orange",
419
+ "content_font": "IBM Plex Mono",
420
+ "content_font_color": "dd:text",
421
+ "content_background_color": "dd:page",
422
+ },
423
+ "highlight-section": {
424
+ "title_font": "IBM Plex Sans Condensed",
425
+ "title_color": "dd:blue",
426
+ "title_font_color": "dd:blue:contrast:fg:page",
427
+ "title_icon_color": "dd:yellow",
428
+ "content_font": "IBM Plex Serif",
429
+ "content_font_color": "dd:text",
430
+ "content_background_color": "dd:surface_alt",
431
+ },
432
+ "alice": {
433
+ "title_font": "IBM Plex Sans Condensed",
434
+ "title_color": "dd:blue",
435
+ "title_font_color": "dd:blue:contrast:fg:page",
436
+ "title_icon_color": "dd:yellow",
437
+ "content_font": "IBM Plex Serif",
438
+ "content_font_color": "dd:text",
439
+ "content_background_color": "dd:surface",
440
+ },
441
+ "bob": {
442
+ "title_font": "IBM Plex Sans Condensed",
443
+ "title_color": "dd:cyan",
444
+ "title_font_color": "dd:cyan:contrast:fg:page",
445
+ "title_icon_color": "dd:orange",
446
+ "content_font": "IBM Plex Serif",
447
+ "content_font_color": "dd:text",
448
+ "content_background_color": "dd:surface_alt",
449
+ },
450
+ "folder": {
451
+ "title_font": "IBM Plex Sans Condensed",
452
+ "title_color": "dd:blue",
453
+ "title_font_color": "dd:cyan:contrast:fg:page",
454
+ "title_background_color": "dd:cyan",
455
+ "content_font": "IBM Plex Serif",
456
+ "content_font_color": "dd:text",
457
+ "content_background_color": "dd:surface",
458
+ "shadow_color": "dd:border",
459
+ },
460
+ },
461
+ "needs": {
462
+ "generic": _solarized_need_variant("blue"),
463
+ "req": _solarized_need_variant("cyan"),
464
+ "spec": _solarized_need_variant("violet"),
465
+ "decision": _solarized_need_variant("green"),
466
+ "risk": _solarized_need_variant("red"),
467
+ },
468
+ "sidebar": {
469
+ "border_color": "dd:blue",
470
+ "title_font": "IBM Plex Sans Condensed",
471
+ "title_background_color": "dd:blue",
472
+ "title_font_color": "dd:blue:contrast:fg:page",
473
+ "title_icon_color": "dd:yellow",
474
+ "subtitle_font": "IBM Plex Sans Condensed",
475
+ "subtitle_font_color": "dd:cyan",
476
+ "content_font": "IBM Plex Serif",
477
+ "content_font_color": "dd:text",
478
+ "content_background_color": "dd:surface",
479
+ },
480
+ "highlights": {
481
+ "title_font": "IBM Plex Sans Condensed",
482
+ "title_font_color": "dd:blue",
483
+ "border_color": "dd:orange",
484
+ "content_font": "IBM Plex Serif",
485
+ "content_font_color": "dd:text",
486
+ "content_background_color": "dd:surface",
487
+ },
488
+ "todo": {
489
+ "title_font": "IBM Plex Sans Condensed",
490
+ "title_font_color": "dd:orange:contrast:fg:page",
491
+ "title_background_color": "dd:orange",
492
+ "content_font": "IBM Plex Serif",
493
+ "content_font_color": "dd:text",
494
+ "content_background_color": "dd:surface",
495
+ },
496
+ "topic": {
497
+ "title_font": "IBM Plex Sans Condensed",
498
+ "title_font_color": "dd:blue:contrast:fg:page",
499
+ "title_icon_color": "dd:yellow",
500
+ "title_background_color": "dd:blue",
501
+ "border_color": "dd:border",
502
+ "bottom_frame_color": "dd:blue",
503
+ "cutaway_fill_color": "dd:page",
504
+ "content_font": "IBM Plex Serif",
505
+ "content_font_color": "dd:text",
506
+ "content_background_color": "dd:surface",
507
+ },
508
+ "contents": {
509
+ "title_font": "IBM Plex Sans Condensed",
510
+ "title_font_color": "dd:blue:contrast:fg:page",
511
+ "title_icon_color": "dd:yellow",
512
+ "title_background_color": "dd:blue",
513
+ "border_color": "dd:border",
514
+ "bottom_frame_color": "dd:blue",
515
+ "cutaway_fill_color": "dd:page",
516
+ "content_font": "IBM Plex Serif",
517
+ "content_font_color": "dd:text",
518
+ "content_background_color": "dd:surface",
519
+ },
520
+ "toc": {
521
+ "title_font": "IBM Plex Sans Condensed",
522
+ "title_color": "dd:primary",
523
+ "chapter_font": "IBM Plex Sans Condensed",
524
+ "chapter_color": "dd:primary",
525
+ "section_font": "IBM Plex Serif",
526
+ "section_color": "dd:secondary",
527
+ "subsection_font": "IBM Plex Serif",
528
+ "subsection_color": "dd:text_muted",
529
+ "dot_leader_color": "dd:border",
530
+ "page_number_font": "IBM Plex Mono",
531
+ "page_number_color": "dd:accent",
532
+ },
533
+ "bibliography": {
534
+ "title_font": "IBM Plex Sans Condensed",
535
+ "title_color": "dd:primary",
536
+ "entry_font": "IBM Plex Serif",
537
+ "entry_color": "dd:text",
538
+ "label_color": "dd:blue",
539
+ "label_font": "IBM Plex Mono",
540
+ },
541
+ "index": {
542
+ "title_font": "IBM Plex Sans Condensed",
543
+ "title_color": "dd:primary",
544
+ "entry_font": "IBM Plex Serif",
545
+ "subentry_font": "IBM Plex Serif",
546
+ "letter_group_font": "IBM Plex Sans Condensed",
547
+ "letter_group_color": "dd:orange",
548
+ },
549
+ "glossary": {
550
+ "term_font": "IBM Plex Sans Condensed",
551
+ "term_color": "dd:primary",
552
+ "definition_font": "IBM Plex Serif",
553
+ "definition_color": "dd:text",
554
+ },
555
+ "links": {
556
+ "inner_color": "dd:link",
557
+ "outer_color": "dd:cyan",
558
+ },
559
+ }
560
+
561
+ SOLARIZED_SWIFT_OPTIONS: dict[str, Any] = {
562
+ "accent_color": SOLARIZED_BLUE,
563
+ "secondary_accent": SOLARIZED_ORANGE,
564
+ "background_light": SOLARIZED_BASE3,
565
+ "background_dark": SOLARIZED_BASE03,
566
+ "surface_light": SOLARIZED_BASE2,
567
+ "surface_dark": SOLARIZED_BASE02,
568
+ "text_light": SOLARIZED_BASE00,
569
+ "text_dark": SOLARIZED_BASE0,
570
+ "font_body": SOLARIZED_FONTS.main_font,
571
+ "font_heading": SOLARIZED_FONTS.sans_font,
572
+ "font_mono": SOLARIZED_FONTS.mono_font,
573
+ }
574
+
575
+ SOLARIZED_AI_GUIDANCE = (
576
+ "Doxtr Solarized uses Ethan Schoonover's exact 16-color Solarized palette: "
577
+ f"Light mode anchors on base3 ({SOLARIZED_BASE3}) / base2 ({SOLARIZED_BASE2}) "
578
+ f"with base00/base01 typography; Dark mode anchors on base03 ({SOLARIZED_BASE03}) / "
579
+ f"base02 ({SOLARIZED_BASE02}) with base0/base1 typography. "
580
+ f"Accents use blue ({SOLARIZED_BLUE}), cyan ({SOLARIZED_CYAN}), "
581
+ f"violet ({SOLARIZED_VIOLET}), green ({SOLARIZED_GREEN}), yellow ({SOLARIZED_YELLOW}), "
582
+ f"orange ({SOLARIZED_ORANGE}), red ({SOLARIZED_RED}), and magenta ({SOLARIZED_MAGENTA}), "
583
+ "enforced to WCAG AA (>= 4.5:1) against page and surface backgrounds with "
584
+ "IBM Plex Serif, IBM Plex Sans Condensed, and IBM Plex Mono typography."
585
+ )
586
+
587
+ SOLARIZED_THEME_SPEC = ThemeSpec(
588
+ name="solarized",
589
+ light=SOLARIZED_LIGHT_PALETTE,
590
+ dark=SOLARIZED_DARK_PALETTE,
591
+ fonts=SOLARIZED_FONTS,
592
+ branding=SOLARIZED_BRANDING,
593
+ dark_strategy="auto",
594
+ wcag_level=4.5,
595
+ ai_guidance=SOLARIZED_AI_GUIDANCE,
596
+ html_options=SOLARIZED_HTML_OPTIONS,
597
+ pdf_defaults=SOLARIZED_PDF_DEFAULTS,
598
+ epub_options=SOLARIZED_EPUB_OPTIONS,
599
+ swift_options=SOLARIZED_SWIFT_OPTIONS,
600
+ pygments_style="solarized-light",
601
+ pygments_dark_style="solarized-dark",
602
+ )
603
+
604
+ register_brand_theme(SOLARIZED_THEME_SPEC)
605
+ register_renderer(
606
+ "html",
607
+ "solarized",
608
+ "doxtr_html_theme_aubergine",
609
+ html_theme_name="doxtr_aubergine",
610
+ )
611
+ register_renderer(
612
+ "epub",
613
+ "solarized",
614
+ "doxtr_epub_theme_aubergine",
615
+ html_theme_name="doxtr_epub_aubergine",
616
+ )
617
+ register_renderer(
618
+ "pdf",
619
+ "solarized",
620
+ "doxtr_pdf_theme_aubergine",
621
+ )
622
+
623
+
624
+ def setup(app: Any) -> dict[str, Any]:
625
+ """Sphinx extension entry point orchestrating Solarized across Aubergine renderers."""
626
+ setup_brand_theme(app, "solarized")
627
+ return {
628
+ "version": __version__,
629
+ "parallel_read_safe": True,
630
+ "parallel_write_safe": True,
631
+ }
632
+
633
+
634
+ __all__ = [
635
+ "__version__",
636
+ "PACKAGE_DIR",
637
+ "ASSETS_DIR",
638
+ "FONTS_DIR",
639
+ "SOLARIZED_BASE03",
640
+ "SOLARIZED_BASE02",
641
+ "SOLARIZED_BASE01",
642
+ "SOLARIZED_BASE00",
643
+ "SOLARIZED_BASE0",
644
+ "SOLARIZED_BASE1",
645
+ "SOLARIZED_BASE2",
646
+ "SOLARIZED_BASE3",
647
+ "SOLARIZED_YELLOW",
648
+ "SOLARIZED_ORANGE",
649
+ "SOLARIZED_RED",
650
+ "SOLARIZED_MAGENTA",
651
+ "SOLARIZED_VIOLET",
652
+ "SOLARIZED_BLUE",
653
+ "SOLARIZED_CYAN",
654
+ "SOLARIZED_GREEN",
655
+ "SOLARIZED_SWATCHES",
656
+ "SOLARIZED_LIGHT_PALETTE",
657
+ "SOLARIZED_DARK_PALETTE",
658
+ "SOLARIZED_FONTS",
659
+ "SOLARIZED_BRANDING",
660
+ "SOLARIZED_HTML_OPTIONS",
661
+ "SOLARIZED_EPUB_OPTIONS",
662
+ "SOLARIZED_PDF_DEFAULTS",
663
+ "SOLARIZED_SWIFT_OPTIONS",
664
+ "SOLARIZED_AI_GUIDANCE",
665
+ "SOLARIZED_THEME_SPEC",
666
+ "setup",
667
+ ]
@@ -0,0 +1,93 @@
1
+ Copyright © 2017 IBM Corp. with Reserved Font Name "Plex"
2
+
3
+ This Font Software is licensed under the SIL Open Font License, Version 1.1.
4
+
5
+ This license is copied below, and is also available with a FAQ at: http://scripts.sil.org/OFL
6
+
7
+
8
+ -----------------------------------------------------------
9
+ SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007
10
+ -----------------------------------------------------------
11
+
12
+ PREAMBLE
13
+ The goals of the Open Font License (OFL) are to stimulate worldwide
14
+ development of collaborative font projects, to support the font creation
15
+ efforts of academic and linguistic communities, and to provide a free and
16
+ open framework in which fonts may be shared and improved in partnership
17
+ with others.
18
+
19
+ The OFL allows the licensed fonts to be used, studied, modified and
20
+ redistributed freely as long as they are not sold by themselves. The
21
+ fonts, including any derivative works, can be bundled, embedded,
22
+ redistributed and/or sold with any software provided that any reserved
23
+ names are not used by derivative works. The fonts and derivatives,
24
+ however, cannot be released under any other type of license. The
25
+ requirement for fonts to remain under this license does not apply
26
+ to any document created using the fonts or their derivatives.
27
+
28
+ DEFINITIONS
29
+ "Font Software" refers to the set of files released by the Copyright
30
+ Holder(s) under this license and clearly marked as such. This may
31
+ include source files, build scripts and documentation.
32
+
33
+ "Reserved Font Name" refers to any names specified as such after the
34
+ copyright statement(s).
35
+
36
+ "Original Version" refers to the collection of Font Software components as
37
+ distributed by the Copyright Holder(s).
38
+
39
+ "Modified Version" refers to any derivative made by adding to, deleting,
40
+ or substituting -- in part or in whole -- any of the components of the
41
+ Original Version, by changing formats or by porting the Font Software to a
42
+ new environment.
43
+
44
+ "Author" refers to any designer, engineer, programmer, technical
45
+ writer or other person who contributed to the Font Software.
46
+
47
+ PERMISSION & CONDITIONS
48
+ Permission is hereby granted, free of charge, to any person obtaining
49
+ a copy of the Font Software, to use, study, copy, merge, embed, modify,
50
+ redistribute, and sell modified and unmodified copies of the Font
51
+ Software, subject to the following conditions:
52
+
53
+ 1) Neither the Font Software nor any of its individual components,
54
+ in Original or Modified Versions, may be sold by itself.
55
+
56
+ 2) Original or Modified Versions of the Font Software may be bundled,
57
+ redistributed and/or sold with any software, provided that each copy
58
+ contains the above copyright notice and this license. These can be
59
+ included either as stand-alone text files, human-readable headers or
60
+ in the appropriate machine-readable metadata fields within text or
61
+ binary files as long as those fields can be easily viewed by the user.
62
+
63
+ 3) No Modified Version of the Font Software may use the Reserved Font
64
+ Name(s) unless explicit written permission is granted by the corresponding
65
+ Copyright Holder. This restriction only applies to the primary font name as
66
+ presented to the users.
67
+
68
+ 4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font
69
+ Software shall not be used to promote, endorse or advertise any
70
+ Modified Version, except to acknowledge the contribution(s) of the
71
+ Copyright Holder(s) and the Author(s) or with their explicit written
72
+ permission.
73
+
74
+ 5) The Font Software, modified or unmodified, in part or in whole,
75
+ must be distributed entirely under this license, and must not be
76
+ distributed under any other license. The requirement for fonts to
77
+ remain under this license does not apply to any document created
78
+ using the Font Software.
79
+
80
+ TERMINATION
81
+ This license becomes null and void if any of the above conditions are
82
+ not met.
83
+
84
+ DISCLAIMER
85
+ THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
86
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF
87
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
88
+ OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE
89
+ COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
90
+ INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL
91
+ DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
92
+ FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM
93
+ OTHER DEALINGS IN THE FONT SOFTWARE.
@@ -0,0 +1,60 @@
1
+ Metadata-Version: 2.4
2
+ Name: doxtr-theme-solarized
3
+ Version: 0.1.0
4
+ Summary: Solarized Light & Dark color-scheme brand specification for Doxtr (altercation/solarized palette, IBM Plex typography, and multi-renderer orchestration on Aubergine layouts).
5
+ Author: Jens Frey
6
+ Project-URL: Homepage, https://github.com/doxtr/doxtr-theme-solarized
7
+ Project-URL: Repository, https://github.com/doxtr/doxtr-theme-solarized
8
+ Project-URL: Issues, https://github.com/doxtr/doxtr-theme-solarized/issues
9
+ Classifier: Programming Language :: Python :: 3
10
+ Classifier: Programming Language :: Python :: 3.11
11
+ Classifier: Programming Language :: Python :: 3.12
12
+ Classifier: Framework :: Sphinx :: Extension
13
+ Classifier: License :: OSI Approved :: MIT License
14
+ Classifier: Operating System :: OS Independent
15
+ Classifier: Topic :: Documentation :: Sphinx
16
+ Requires-Python: >=3.11
17
+ Description-Content-Type: text/markdown
18
+ License-File: LICENSE
19
+ Requires-Dist: doxtr-theme-core>=0.4.0
20
+ Requires-Dist: Sphinx>=7.0
21
+ Provides-Extra: aubergine
22
+ Requires-Dist: doxtr-html-theme-aubergine>=0.4.0; extra == "aubergine"
23
+ Requires-Dist: doxtr-epub-theme-aubergine>=0.3.0; extra == "aubergine"
24
+ Requires-Dist: doxtr-pdf-theme-aubergine>=0.3.0; extra == "aubergine"
25
+ Provides-Extra: test
26
+ Requires-Dist: pytest>=7.0; extra == "test"
27
+ Requires-Dist: pillow>=10.0; extra == "test"
28
+ Provides-Extra: all
29
+ Requires-Dist: doxtr-theme-solarized[aubergine,test]; extra == "all"
30
+ Dynamic: license-file
31
+
32
+ # doxtr-theme-solarized
33
+
34
+ Solarized Light and Solarized Dark color-scheme brand package for the
35
+ [Doxtr](https://github.com/doxtr) documentation framework, built directly on
36
+ Ethan Schoonover's official 16-color
37
+ [Solarized](https://github.com/altercation/solarized) palette.
38
+
39
+ ## Architecture & Separation Proof
40
+
41
+ `doxtr-theme-solarized` defines **only** the Solarized color palettes,
42
+ bundled IBM Plex typography (`IBM Plex Serif`, `IBM Plex Sans Condensed`,
43
+ `IBM Plex Mono`), brand assets, and renderer options. It reuses the Aubergine
44
+ layout and structural renderers verbatim across all formats:
45
+
46
+ - HTML: `doxtr_html_theme_aubergine` (`html_theme = "doxtr_aubergine"`)
47
+ - EPUB: `doxtr_epub_theme_aubergine` (`epub_theme = "doxtr_epub_aubergine"`)
48
+ - PDF: `doxtr_pdf_theme_aubergine`
49
+
50
+ ## Quick Start
51
+
52
+ In your Sphinx `conf.py`:
53
+
54
+ ```python
55
+ extensions = ["doxtr_theme_solarized"]
56
+ ```
57
+
58
+ Light mode (`doxtr_color_scheme = "light"`), dark mode (`doxtr_color_scheme = "dark"`),
59
+ and adaptive `auto` mode switch seamlessly between Solarized Light (`#FDF6E3` / `#EEE8D5`)
60
+ and Solarized Dark (`#002B36` / `#073642`) across HTML, EPUB3, and LuaLaTeX PDF.
@@ -0,0 +1,22 @@
1
+ doxtr_theme_solarized/__init__.py,sha256=7PuiAPFEVayVeO6_9hwZ1TakRZ7WHfa56G7uXsEhnsU,23498
2
+ doxtr_theme_solarized/assets/solarized_favicon.png,sha256=tvHb0rH8XHPU99d0TYP1-3iTepjzkdas0KbePjPTdrU,8176
3
+ doxtr_theme_solarized/assets/solarized_logo_dark.png,sha256=TLE9GamJyuItNalZdIrhMoF5qrX63ndoBaCJ8Hbr1uw,20468
4
+ doxtr_theme_solarized/assets/solarized_logo_light.png,sha256=gW4lf-wAkv_pxY3VUgS4Wuf6Koenho8RH3lzjVMT_mY,19985
5
+ doxtr_theme_solarized/fonts/IBMPlexMono-Bold.ttf,sha256=rCer1kUKZN2URnWAoC_mI1FW1bkvKSbrvI50id9k4L4,137784
6
+ doxtr_theme_solarized/fonts/IBMPlexMono-BoldItalic.ttf,sha256=r04Fp2HpjBrfBkxIpjUsm-waatcJgs0qVEFJMjOR-Y4,144512
7
+ doxtr_theme_solarized/fonts/IBMPlexMono-Italic.ttf,sha256=M2L8eRsGUhkzKLhiwcXyOnibxyiLFhf6YzAviGiaKjQ,143920
8
+ doxtr_theme_solarized/fonts/IBMPlexMono-Regular.ttf,sha256=ajQS8FjH2N_ZFwxB6FreSOUVbsuJNWEQylegonc0r0Y,135580
9
+ doxtr_theme_solarized/fonts/IBMPlexSansCondensed-Bold.ttf,sha256=tlSS2GzdXNnUPSZxtV1dNv7DaFn8iwi8arp45EHWyEk,112228
10
+ doxtr_theme_solarized/fonts/IBMPlexSansCondensed-BoldItalic.ttf,sha256=_hmDwHoIb77pOeXw-CblQo99AmZsjju7cpX7NQRZegc,117024
11
+ doxtr_theme_solarized/fonts/IBMPlexSansCondensed-Italic.ttf,sha256=oDIOYMF5JsTiEN_bOxo0aZHzX4O0cdr1VTfuecvLfH8,117128
12
+ doxtr_theme_solarized/fonts/IBMPlexSansCondensed-Regular.ttf,sha256=50N8By7vLvWSrm8r6wAARGKHOFkHq7V6wc8HvLqiqjM,111236
13
+ doxtr_theme_solarized/fonts/IBMPlexSerif-Bold.ttf,sha256=U0wCwpWZndhudwRX7OHUPbDeklbdmL90FCb2OukEIJ4,163800
14
+ doxtr_theme_solarized/fonts/IBMPlexSerif-BoldItalic.ttf,sha256=KjK3asGcGUK_WULbvSoVZuXxrpgz5CHrzzbTUicV4VM,173032
15
+ doxtr_theme_solarized/fonts/IBMPlexSerif-Italic.ttf,sha256=S3Wzi-RnNScjH0nEiBjQkMkT1QQt1cdHtSW_YYXSnss,173004
16
+ doxtr_theme_solarized/fonts/IBMPlexSerif-Regular.ttf,sha256=6ILvqcQZSaUorCNpB57F7wUMHJlrvQuszjwzJtRM-A0,163068
17
+ doxtr_theme_solarized/fonts/OFL.txt,sha256=fmsoGO29j2oBroBkHMjxalEIDQj7TlMr46C290rbB9o,4456
18
+ doxtr_theme_solarized-0.1.0.dist-info/licenses/LICENSE,sha256=IfmgfxInoNRe-I1UbLQzFT5qViGpc0e3YeswZ-G9IWc,1066
19
+ doxtr_theme_solarized-0.1.0.dist-info/METADATA,sha256=-YT6T3GwGfuT4cfdhDYS6qT4Ik-8kwcCHWkLnwc_jrQ,2570
20
+ doxtr_theme_solarized-0.1.0.dist-info/WHEEL,sha256=mOdXR9C3wMVov7cSY8PY-XCzo3SmmWCHvGQr5csJoao,91
21
+ doxtr_theme_solarized-0.1.0.dist-info/top_level.txt,sha256=rWNHLyBug0N2PxIvrYtb6a0paA_zn7rs-ZBbWykgbA4,22
22
+ doxtr_theme_solarized-0.1.0.dist-info/RECORD,,
@@ -0,0 +1,5 @@
1
+ Wheel-Version: 1.0
2
+ Generator: setuptools (84.2.1)
3
+ Root-Is-Purelib: true
4
+ Tag: py3-none-any
5
+
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Jens Frey
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.
@@ -0,0 +1 @@
1
+ doxtr_theme_solarized