jsonresume-theme-signal 1.0.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 Meni Livne
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,137 @@
1
+ # jsonresume-theme-signal
2
+
3
+ > High-signal, print-ready [JSON Resume](https://jsonresume.org) theme with multi-role company grouping, early career partitioning, and pristine typography.
4
+
5
+ [![Validate](https://github.com/menil/jsonresume-theme-signal/actions/workflows/validate.yml/badge.svg)](https://github.com/menil/jsonresume-theme-signal/actions/workflows/validate.yml)
6
+ [![npm version](https://img.shields.io/npm/v/jsonresume-theme-signal.svg)](https://www.npmjs.com/package/jsonresume-theme-signal)
7
+ [![License: MIT](https://img.shields.io/badge/License-MIT-blue.svg)](https://opensource.org/licenses/MIT)
8
+
9
+ ---
10
+
11
+ ## Features
12
+
13
+ - 🎯 **High Signal-to-Noise Ratio**: Designed specifically for senior engineers, tech leads, and executives. Focuses strictly on impact, architecture, and career progression.
14
+ - 🏢 **Multi-Role Company Grouping**: Promoted or transitioned roles at the same organization? Consecutive roles under the same company are grouped under a unified company header instead of duplicating company names.
15
+ - ⏳ **Intelligent Career Partitioning**: Positions older than 10 years are automatically partitioned into a clean, condensed "Early Career History" summary table to preserve page space.
16
+ - 📐 **Dynamic PDF Page-Fitting**: Automatically detects trailing page overflow (e.g. 1.1 or 2.1 pages) and optimizes typography/margins in real time so your resume fits cleanly into an exact number of pages without trailing orphan lines.
17
+ - 📄 **1:1 Print & PDF Optimization**: Uses CSS `@page` and `@media print` rules with strict `break-after: avoid` and `break-inside: avoid` controls to prevent orphaned headers and split roles.
18
+ - 🌐 **Dual Web / PDF Rendering**:
19
+ - **Web view**: Renders clean interactive SVG icon badges for LinkedIn, GitHub, Email, and PDF downloads.
20
+ - **PDF / Print view**: Replaces interactive buttons with clean inline contact text (`phone`, `linkedin.com/in/...`).
21
+
22
+ ---
23
+
24
+ ## Installation & Usage
25
+
26
+ ### 1. Using with [`resumed`](https://github.com/rbardini/resumed) (Recommended)
27
+
28
+ Render to standalone HTML:
29
+ ```bash
30
+ npx resumed render --theme jsonresume-theme-signal resume.json -o resume.html
31
+ ```
32
+
33
+ Export directly to PDF (via Puppeteer):
34
+ ```bash
35
+ npx resumed export --theme jsonresume-theme-signal resume.json -o resume.pdf
36
+ ```
37
+
38
+ ### 2. Using with `resume-cli`
39
+
40
+ ```bash
41
+ npx resume-cli export --theme jsonresume-theme-signal resume.pdf
42
+ ```
43
+
44
+ ### 3. Programmatic API (ESM / TypeScript)
45
+
46
+ Install as a dependency:
47
+ ```bash
48
+ npm install jsonresume-theme-signal
49
+ ```
50
+
51
+ Render HTML programmatically:
52
+ ```ts
53
+ import { render, buildHtml } from "jsonresume-theme-signal";
54
+
55
+ // Render HTML string from JSON Resume object
56
+ const html = render(resumeData, {
57
+ asOfYear: 2026, // optional: custom reference year for 10-year early career cutoff
58
+ is_pdf: true, // optional: format header with textual contact info for PDF generation
59
+ fitPages: "auto", // optional: "auto" | 1 | 2 | 3 | "off"
60
+ density: "normal", // optional: "compact" | "normal" | "spacious"
61
+ });
62
+
63
+ // Or compile directly from a JSON file on disk
64
+ const outputPath = buildHtml("resume.json", "dist/resume.html");
65
+ ```
66
+
67
+ ---
68
+
69
+ ## Theme Options
70
+
71
+ Options can be passed programmatically to `render()` or configured directly inside `resume.json` under `meta.themeOptions`:
72
+
73
+ ```json
74
+ {
75
+ "basics": { ... },
76
+ "meta": {
77
+ "themeOptions": {
78
+ "fitPages": "auto",
79
+ "fitTolerance": 0.28,
80
+ "density": "normal"
81
+ }
82
+ }
83
+ }
84
+ ```
85
+
86
+ | Option | Type | Default | Description |
87
+ |---|---|---|---|
88
+ | `fitPages` | `number \| "auto" \| "off"` | `"off"` | Target page count. When `"auto"` (or an integer such as `1` or `2`), dynamically condenses borderline overflow into the target page count. When `"off"`, preserves default static layout. |
89
+ | `fitTolerance` | `number` | `0.28` | Overflow fraction threshold (e.g. `0.28` = up to 28% spill over a page boundary is compressed to fit). |
90
+ | `density` | `"compact" \| "normal" \| "spacious"` | `"normal"` | Baseline layout density preset. |
91
+ | `asOfYear` | `number` | Current Year | Reference year used to calculate the 10-year cutoff for partitioning early career roles. |
92
+ | `is_pdf` | `boolean` | `false` | When `true`, hides interactive web action icons and renders textual contact info in the header. |
93
+
94
+ ---
95
+
96
+ ## Development & Contributing
97
+
98
+ This project uses [Bun](https://bun.sh) and [Nix](https://nixos.org) for fast, reproducible development.
99
+
100
+ ### Setup
101
+
102
+ ```bash
103
+ # Enter development shell
104
+ nix-shell
105
+
106
+ # Install dependencies
107
+ bun install
108
+ ```
109
+
110
+ ### Commands
111
+
112
+ ```bash
113
+ # Run test suite
114
+ just test
115
+
116
+ # Typecheck TypeScript
117
+ just typecheck
118
+
119
+ # Lint & check formatting
120
+ just lint
121
+ just check-format
122
+
123
+ # Format code
124
+ just format
125
+
126
+ # Build bundle and type declarations
127
+ just build
128
+
129
+ # Run full project validation
130
+ just validate
131
+ ```
132
+
133
+ ---
134
+
135
+ ## License
136
+
137
+ [MIT](LICENSE) © Meni Livne
package/index.d.ts ADDED
@@ -0,0 +1,26 @@
1
+ import type { ResumeData, ThemeOptions } from "./src/types.ts";
2
+
3
+ export * from "./src/types.ts";
4
+
5
+ /**
6
+ * Default Puppeteer PDF rendering options for the resumed CLI.
7
+ */
8
+ export declare const pdfRenderOptions: {
9
+ readonly format: "Letter";
10
+ readonly printBackground: true;
11
+ readonly preferCSSPageSize: true;
12
+ };
13
+
14
+ /**
15
+ * Renders a JSON Resume object to an HTML string.
16
+ */
17
+ export declare function render(resume?: ResumeData, options?: ThemeOptions): string;
18
+
19
+ /**
20
+ * Builds an HTML file from a JSON Resume JSON file on disk.
21
+ */
22
+ export declare function buildHtml(
23
+ inputJsonPath: string,
24
+ outputPath?: string,
25
+ options?: ThemeOptions,
26
+ ): string;