restty 0.1.16 → 0.1.17

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.
Files changed (43) hide show
  1. package/dist/app/atlas-builder.d.ts +38 -0
  2. package/dist/app/font-sources.d.ts +2 -0
  3. package/dist/app/index.js +234 -90
  4. package/dist/app/pane-app-manager.d.ts +43 -0
  5. package/dist/app/panes-context-menu.d.ts +10 -0
  6. package/dist/app/panes-styles.d.ts +5 -0
  7. package/dist/app/panes-types.d.ts +89 -0
  8. package/dist/app/panes.d.ts +10 -0
  9. package/dist/app/restty.d.ts +20 -0
  10. package/dist/app/session.d.ts +6 -0
  11. package/dist/app/types.d.ts +123 -0
  12. package/dist/fonts/index.js +2 -1
  13. package/dist/fonts/manager.d.ts +25 -0
  14. package/dist/fonts/nerd-constraints.d.ts +4 -0
  15. package/dist/fonts/nerd-ranges.d.ts +2 -0
  16. package/dist/fonts/types.d.ts +51 -0
  17. package/dist/grid/grid.d.ts +22 -0
  18. package/dist/grid/types.d.ts +32 -0
  19. package/dist/ime/ime.d.ts +13 -0
  20. package/dist/ime/types.d.ts +8 -0
  21. package/dist/index.js +234 -90
  22. package/dist/input/ansi.d.ts +3 -0
  23. package/dist/input/index.js +5 -1
  24. package/dist/input/mouse.d.ts +10 -0
  25. package/dist/input/output.d.ts +11 -0
  26. package/dist/input/types.d.ts +7 -0
  27. package/dist/internal.js +234 -90
  28. package/dist/pty/kitty-media.d.ts +3 -0
  29. package/dist/pty/pty.d.ts +11 -0
  30. package/dist/pty/types.d.ts +49 -0
  31. package/dist/renderer/box-drawing-map.d.ts +4 -0
  32. package/dist/renderer/index.js +145 -42
  33. package/dist/renderer/shaders.d.ts +7 -0
  34. package/dist/renderer/shapes.d.ts +43 -0
  35. package/dist/renderer/types.d.ts +43 -0
  36. package/dist/renderer/webgpu.d.ts +11 -0
  37. package/dist/selection/selection.d.ts +24 -0
  38. package/dist/selection/types.d.ts +13 -0
  39. package/dist/theme/catalog.d.ts +5 -0
  40. package/dist/theme/ghostty.d.ts +18 -0
  41. package/dist/wasm/embedded.d.ts +1 -0
  42. package/dist/wasm/runtime.d.ts +29 -0
  43. package/package.json +1 -1
@@ -1,7 +1,12 @@
1
1
  import { type GhosttyTheme } from "./ghostty";
2
2
  import { type BuiltinThemeName } from "./builtin-themes";
3
+ /** String literal union of all builtin theme names. */
3
4
  export type ResttyBuiltinThemeName = BuiltinThemeName;
5
+ /** Return an array of all builtin theme names. */
4
6
  export declare function listBuiltinThemeNames(): ResttyBuiltinThemeName[];
7
+ /** Check if a string is a valid builtin theme name. */
5
8
  export declare function isBuiltinThemeName(name: string): name is ResttyBuiltinThemeName;
9
+ /** Get the raw source text for a builtin theme by name. */
6
10
  export declare function getBuiltinThemeSource(name: string): string | null;
11
+ /** Get the parsed theme object for a builtin theme by name (cached). */
7
12
  export declare function getBuiltinTheme(name: string): GhosttyTheme | null;
@@ -1,23 +1,41 @@
1
+ /** RGBA color with 0-255 byte components. */
1
2
  export type ThemeColor = {
2
3
  r: number;
3
4
  g: number;
4
5
  b: number;
5
6
  a?: number;
6
7
  };
8
+ /**
9
+ * Parsed Ghostty terminal theme with semantic colors and full 256-color palette.
10
+ */
7
11
  export type GhosttyTheme = {
12
+ /** Optional theme name extracted from source. */
8
13
  name?: string;
14
+ /** Semantic colors and ANSI palette entries. */
9
15
  colors: {
16
+ /** Default background color. */
10
17
  background?: ThemeColor;
18
+ /** Default foreground (text) color. */
11
19
  foreground?: ThemeColor;
20
+ /** Cursor fill color. */
12
21
  cursor?: ThemeColor;
22
+ /** Text color under the cursor. */
13
23
  cursorText?: ThemeColor;
24
+ /** Selection background color. */
14
25
  selectionBackground?: ThemeColor;
26
+ /** Selection foreground (text) color. */
15
27
  selectionForeground?: ThemeColor;
28
+ /** 256-color palette (indices 0-255). */
16
29
  palette: Array<ThemeColor | undefined>;
17
30
  };
31
+ /** Original key-value pairs from the theme source. */
18
32
  raw: Record<string, string>;
19
33
  };
34
+ /** Parse a Ghostty color value (hex, rgb/rgba, or named color). */
20
35
  export declare function parseGhosttyColor(value: string): ThemeColor | null;
36
+ /** Convert ThemeColor to normalized RGBA floats (0.0-1.0). */
21
37
  export declare function colorToFloats(color: ThemeColor, alphaOverride?: number): [number, number, number, number];
38
+ /** Convert ThemeColor to packed 24-bit RGB integer (0xRRGGBB). */
22
39
  export declare function colorToRgbU32(color: ThemeColor): number;
40
+ /** Parse a Ghostty theme configuration from key=value format. */
23
41
  export declare function parseGhosttyTheme(text: string): GhosttyTheme;