plexi-sdk 0.4.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,52 @@
1
+ from __future__ import annotations
2
+
3
+ # ── SDK version (single source of truth) ──────────────────────────────────────
4
+ _SDK_VERSION = "0.5.0"
5
+
6
+ # ── Font sizes (float, points) ────────────────────────────────────────────────
7
+ TITLE = 22.0
8
+ HEADING = 18.0
9
+ BODY = 15.0
10
+ CAPTION = 13.0
11
+ HINT = 12.0
12
+ MONO_BODY = 14.0
13
+ MONO_SMALL = 12.0
14
+
15
+ # ── Layout (float, pixels) ────────────────────────────────────────────────────
16
+ PAD = 16.0
17
+ PAD_TIGHT = 8.0
18
+ HEADER_H = 48.0
19
+ STATUS_H = 44.0
20
+
21
+ # ── Colors (hex strings, Catppuccin Mocha) ────────────────────────────────────
22
+ BG = "#1e1e2e"
23
+ SURFACE = "#313244"
24
+ HIGHLIGHT = "#45475a"
25
+ ACCENT = "#89b4fa"
26
+ MUTED = "#6c7086"
27
+ FG = "#cdd6f4"
28
+ RED = "#f38ba8"
29
+ GREEN = "#a6e3a1"
30
+ YELLOW = "#f9e2af"
31
+
32
+ # ── Notification priority tiers ───────────────────────────────────────────────
33
+ # Higher = more urgent. Queue sorts priority DESC, arrival ASC. See the
34
+ # NOTIFICATIONS block in the module docstring for guidance on which tier to
35
+ # pick. Range 0..200 is the "app band" — stay inside it. A future release
36
+ # may reserve priorities above 200 for user overrides so apps can't yell
37
+ # themselves to the top; staying in-band today keeps you forward-compatible.
38
+ PRIORITY_LOW = 0
39
+ PRIORITY_NORMAL = 50
40
+ PRIORITY_HIGH = 100
41
+ PRIORITY_CRITICAL = 200
42
+
43
+
44
+ def rgba(r: int, g: int, b: int, a: int = 255) -> str:
45
+ """Return an 8-digit hex color string #rrggbbaa."""
46
+ return f"#{r:02x}{g:02x}{b:02x}{a:02x}"
47
+
48
+
49
+ def dim(hex_color: str, alpha: int) -> str:
50
+ """Return hex_color with the given alpha (0-255). Strips existing alpha."""
51
+ h = hex_color.lstrip("#")[:6]
52
+ return f"#{h}{alpha:02x}"