Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions .github/workflows/browser-starter.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@ name: Browser starter
on:
push:
branches: [main]
paths: ['examples/browser/**', 'tools/check-browser-starter.py', 'tools/browser-requirements.txt', 'tools/starter_standard_fonts.py', 'tools/starter_engine_fixes.py', 'tools/starter-engine-2.5.22.json', 'tools/starter-engine-2.5.24.json', 'tools/starter-engine-2.5.38.json', '.github/workflows/browser-starter.yml']
paths: ['examples/browser/**', 'tools/check-browser-starter.py', 'tools/check-starter-invoices.py', 'tools/starter_invoice.py', 'tools/browser-requirements.txt', 'tools/starter_standard_fonts.py', 'tools/starter_engine_fixes.py', 'tools/starter-engine-2.5.22.json', 'tools/starter-engine-2.5.24.json', 'tools/starter-engine-2.5.38.json', '.github/workflows/browser-starter.yml']
pull_request:
paths: ['examples/browser/**', 'tools/check-browser-starter.py', 'tools/browser-requirements.txt', 'tools/starter_standard_fonts.py', 'tools/starter_engine_fixes.py', 'tools/starter-engine-2.5.22.json', 'tools/starter-engine-2.5.24.json', 'tools/starter-engine-2.5.38.json', '.github/workflows/browser-starter.yml']
paths: ['examples/browser/**', 'tools/check-browser-starter.py', 'tools/check-starter-invoices.py', 'tools/starter_invoice.py', 'tools/browser-requirements.txt', 'tools/starter_standard_fonts.py', 'tools/starter_engine_fixes.py', 'tools/starter-engine-2.5.22.json', 'tools/starter-engine-2.5.24.json', 'tools/starter-engine-2.5.38.json', '.github/workflows/browser-starter.yml']
workflow_dispatch:

permissions:
Expand Down Expand Up @@ -38,6 +38,8 @@ jobs:
- run: python -m pip install -r tools/browser-requirements.txt
- run: python -m playwright install --with-deps ${{ matrix.browser }}
- run: python tools/check-browser-starter.py --dist examples/browser/dist --out output/starter-${{ matrix.browser }} --browser ${{ matrix.browser }}
- name: Verify flowing invoice downloads and every page preview
run: python tools/check-starter-invoices.py --kind browser --dist examples/browser/dist --templates examples/browser/src --out output/starter-${{ matrix.browser }}/invoices --browser ${{ matrix.browser }}
- uses: actions/upload-artifact@v4
if: always()
with:
Expand Down
6 changes: 4 additions & 2 deletions .github/workflows/react-starter.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@ name: React starter
on:
push:
branches: [main]
paths: ['examples/react/**', 'tools/check-react-starter.py', 'tools/check-react-development.py', 'tools/prepare-react-check.mjs', 'tools/react_component_checks.py', 'tools/browser-requirements.txt', 'tools/starter_standard_fonts.py', 'tools/starter_engine_fixes.py', 'tools/starter-engine-2.5.22.json', 'tools/starter-engine-2.5.24.json', 'tools/starter-engine-2.5.38.json', '.github/workflows/react-starter.yml']
paths: ['examples/react/**', 'tools/check-react-starter.py', 'tools/check-starter-invoices.py', 'tools/starter_invoice.py', 'tools/check-react-development.py', 'tools/prepare-react-check.mjs', 'tools/react_component_checks.py', 'tools/browser-requirements.txt', 'tools/starter_standard_fonts.py', 'tools/starter_engine_fixes.py', 'tools/starter-engine-2.5.22.json', 'tools/starter-engine-2.5.24.json', 'tools/starter-engine-2.5.38.json', '.github/workflows/react-starter.yml']
pull_request:
paths: ['examples/react/**', 'tools/check-react-starter.py', 'tools/check-react-development.py', 'tools/prepare-react-check.mjs', 'tools/react_component_checks.py', 'tools/browser-requirements.txt', 'tools/starter_standard_fonts.py', 'tools/starter_engine_fixes.py', 'tools/starter-engine-2.5.22.json', 'tools/starter-engine-2.5.24.json', 'tools/starter-engine-2.5.38.json', '.github/workflows/react-starter.yml']
paths: ['examples/react/**', 'tools/check-react-starter.py', 'tools/check-starter-invoices.py', 'tools/starter_invoice.py', 'tools/check-react-development.py', 'tools/prepare-react-check.mjs', 'tools/react_component_checks.py', 'tools/browser-requirements.txt', 'tools/starter_standard_fonts.py', 'tools/starter_engine_fixes.py', 'tools/starter-engine-2.5.22.json', 'tools/starter-engine-2.5.24.json', 'tools/starter-engine-2.5.38.json', '.github/workflows/react-starter.yml']
workflow_dispatch:

permissions:
Expand Down Expand Up @@ -39,6 +39,8 @@ jobs:
- run: python -m pip install -r tools/browser-requirements.txt
- run: python -m playwright install --with-deps ${{ matrix.browser }}
- run: python tools/check-react-starter.py --dist examples/react/dist --out output/react-${{ matrix.browser }} --browser ${{ matrix.browser }}
- name: Verify flowing invoice downloads and every page preview
run: python tools/check-starter-invoices.py --kind react --dist examples/react/dist --templates examples/react/src --out output/react-${{ matrix.browser }}/invoices --browser ${{ matrix.browser }}
- name: Build React development runtime with StrictMode
if: matrix.browser == 'chrome'
env:
Expand Down
6 changes: 4 additions & 2 deletions .github/workflows/vue-starter.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@ name: Vue starter
on:
push:
branches: [main]
paths: ['examples/vue/**', 'tools/check-vue-starter.py', 'tools/prepare-vue-check.mjs', 'tools/browser-requirements.txt', 'tools/starter_standard_fonts.py', 'tools/starter_engine_fixes.py', 'tools/starter-engine-2.5.22.json', 'tools/starter-engine-2.5.24.json', 'tools/starter-engine-2.5.38.json', '.github/workflows/vue-starter.yml']
paths: ['examples/vue/**', 'tools/check-vue-starter.py', 'tools/check-starter-invoices.py', 'tools/starter_invoice.py', 'tools/prepare-vue-check.mjs', 'tools/browser-requirements.txt', 'tools/starter_standard_fonts.py', 'tools/starter_engine_fixes.py', 'tools/starter-engine-2.5.22.json', 'tools/starter-engine-2.5.24.json', 'tools/starter-engine-2.5.38.json', '.github/workflows/vue-starter.yml']
pull_request:
paths: ['examples/vue/**', 'tools/check-vue-starter.py', 'tools/prepare-vue-check.mjs', 'tools/browser-requirements.txt', 'tools/starter_standard_fonts.py', 'tools/starter_engine_fixes.py', 'tools/starter-engine-2.5.22.json', 'tools/starter-engine-2.5.24.json', 'tools/starter-engine-2.5.38.json', '.github/workflows/vue-starter.yml']
paths: ['examples/vue/**', 'tools/check-vue-starter.py', 'tools/check-starter-invoices.py', 'tools/starter_invoice.py', 'tools/prepare-vue-check.mjs', 'tools/browser-requirements.txt', 'tools/starter_standard_fonts.py', 'tools/starter_engine_fixes.py', 'tools/starter-engine-2.5.22.json', 'tools/starter-engine-2.5.24.json', 'tools/starter-engine-2.5.38.json', '.github/workflows/vue-starter.yml']
workflow_dispatch:

permissions:
Expand Down Expand Up @@ -39,6 +39,8 @@ jobs:
- run: python -m pip install -r tools/browser-requirements.txt
- run: python -m playwright install --with-deps ${{ matrix.browser }}
- run: python tools/check-vue-starter.py --dist examples/vue/dist --out output/vue-${{ matrix.browser }} --browser ${{ matrix.browser }}
- name: Verify flowing invoice downloads and every page preview
run: python tools/check-starter-invoices.py --kind vue --dist examples/vue/dist --templates examples/vue/src --out output/vue-${{ matrix.browser }}/invoices --browser ${{ matrix.browser }}
- uses: actions/upload-artifact@v4
if: always()
with:
Expand Down
13 changes: 13 additions & 0 deletions examples/browser/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,19 @@ Use [supported Fullbleed print CSS](https://docs.fullbleed.dev/css-coverage/).
Document scripts do not run. Supply custom image/font bytes through the SDK's
`assets` and `fonts` options; document URLs do not trigger browser fetches.

## Let an HTML invoice grow

Add or remove rows inside `src/invoice.html`'s `<tbody>` and update both sample
totals. The HTML sample does not calculate amounts. Its stylesheet lets the table
continue onto new pages, repeats column headings, and prints `Page N of M` in the
page margin. The `.closing` group keeps totals and payment details together; it
can move to the next page when there is not enough room.

Keep the flowing `@page` margins and automatic `.page` height when adapting this
layout. The invoice check covers the short sample, 24 rows, wrapped descriptions,
empty rows and page-boundary cases, including final PDF text bounds and every
displayed preview.

## Build and deploy

```sh
Expand Down
28 changes: 21 additions & 7 deletions examples/browser/src/invoice.css
Original file line number Diff line number Diff line change
@@ -1,11 +1,20 @@
@page { size: A4; margin: 0; }
@page {
size: A4; margin: 15mm 16mm 20mm; background: #f8f5ec;
@bottom-left {
content: "NORTHSTAR STUDIO / FICTIONAL INVOICE";
font-family: Inter; font-size: 6.6pt; color: {{ink}};
}
@bottom-right {
content: "Page " counter(page) " of " counter(pages);
font-family: Inter; font-size: 6.6pt; color: {{ink}};
}
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html, body { margin: 0; padding: 0; background: #f8f5ec; }
body { font-family: Inter; font-size: 10pt; line-height: 1.45; color: {{ink}}; }
h1, h2, h3, p, figure { margin: 0; }
h1, h2, h3 { font-weight: 400; }
.page { width: 210mm; height: 296.9mm; padding: 15mm 16mm; position: relative; break-after: page; background: #f8f5ec; }
.page:last-child { break-after: auto; }
.page { width: auto; height: auto; }
.kicker { font-size: 7.2pt; font-weight: 600; letter-spacing: 1.4pt; text-transform: uppercase; }
.serif { font-family: 'DM Serif Display'; font-weight: 400; }
.display { font-family: 'Bebas Neue'; font-weight: 400; }
Expand All @@ -16,7 +25,6 @@ h1, h2, h3 { font-weight: 400; }
.grid-2 { display: grid; grid-template-columns: minmax(0,1fr) minmax(0,1fr); gap: 24pt; }
.grid-2 > * { min-width: 0; }
.grid-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 16pt; }
.footer { position: absolute; left: 16mm; right: 16mm; bottom: 12mm; border-top: .6pt solid #9eafa4; padding-top: 8pt; display: flex; justify-content: space-between; gap: 12pt; font-size: 6.6pt; letter-spacing: .45pt; }
table { width: 100%; border-collapse: collapse; font-size: 9pt; }
th { font-size: 7.5pt; font-weight: 600; text-align: left; }
th, td { padding: 10pt 0; border-bottom: .55pt solid #bdc8bf; vertical-align: top; }
Expand All @@ -37,12 +45,18 @@ a { color: inherit; }
.invoice .details { border-top: .6pt solid #9eafa4; border-bottom: .6pt solid #9eafa4; padding: 15pt 0; margin-bottom: 10pt; }
.invoice .details p { margin-top: 5pt; font-size: 8.2pt; }
.invoice .details > div + div { border-left: .6pt solid #c7cdc4; padding-left: 14pt; }
.invoice table { table-layout: fixed; }
.invoice th { color: #52665a; }
.invoice th:first-child { width: 56%; }
.invoice th:not(:first-child) { width: 14.666%; }
.invoice tr { break-inside: avoid; }
.invoice td { padding: 12pt 0; }
.invoice td:first-child { overflow-wrap: anywhere; }
.invoice .item-note { color: #617069; font-size: 8pt; margin-top: 4pt; }
.invoice .amounts { display: grid; grid-template-columns: 1fr 1.25fr; gap: 27pt; margin-top: 23pt; }
.invoice .closing { break-inside: avoid; }
.invoice .amounts { display: grid; grid-template-columns: 1fr 1.25fr; gap: 27pt; margin-top: 23pt; break-inside: avoid; }
.invoice .thanks { font: italic 22pt/1.2 'DM Serif Display'; color: #b44123; padding-top: 8pt; }
.invoice .summary-line { display: flex; justify-content: space-between; padding: 5pt 0; font-size: 8.5pt; }
.invoice .total { background: {{ink}}; color: #fff8e8; padding: 16pt; margin-top: 9pt; border-left: 4pt solid #d96238; }
.invoice .total .value { font: 38pt/1.1 'Bebas Neue'; margin-top: 7pt; }
.invoice .payment { margin-top: 20pt; padding-top: 12pt; border-top: .6pt solid #9eafa4; display: grid; grid-template-columns: 1fr 1fr; gap: 24pt; font-size: 8pt; }
.invoice .payment { margin-top: 16pt; padding-top: 12pt; border-top: .6pt solid #9eafa4; display: grid; grid-template-columns: 1fr 1fr; gap: 24pt; font-size: 8pt; break-inside: avoid; }
4 changes: 3 additions & 1 deletion examples/browser/src/invoice.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,9 @@
<table aria-label="Invoice line items"><thead><tr><th style="width:56%">DESCRIPTION</th><th class="number">HOURS</th><th class="number">RATE</th><th class="number">AMOUNT</th></tr></thead><tbody>
<tr><td><strong>Discovery &amp; brand workshop</strong><p class='item-note'>Positioning, priorities, and a clear creative direction</p></td><td class='number'>8</td><td class='number'>$125.00</td><td class='number'>$1,000.00</td></tr><tr><td><strong>Digital design &amp; implementation</strong><p class='item-note'>A cohesive visual system, from layout to launch</p></td><td class='number'>6</td><td class='number'>$95.00</td><td class='number'>$570.00</td></tr><tr><td><strong>Review &amp; studio handoff</strong><p class='item-note'>Final refinements, documentation, and delivery</p></td><td class='number'>2</td><td class='number'>$150.00</td><td class='number'>$300.00</td></tr>
</tbody></table>
<div class="closing">
<section class="amounts"><div><p class="thanks">A little clarity.<br>A lot of possibility.</p><p class="small muted" style="margin-top:14pt">Thank you for inviting us<br>to help shape your next chapter.</p></div><div><div class="summary-line"><span>Subtotal</span><span>$1,870.00</span></div><div class="summary-line"><span>Tax · 0% in this sample</span><span>$0.00</span></div><div class="total"><div class="kicker">TOTAL DUE · USD</div><div class="value">$1,870.00</div></div></div></section>
<section class="payment"><div><h2 class="kicker" style="margin-bottom:6pt">Payment details</h2><p>Reference {{reference}} with your payment.<br>Payment instructions are supplied separately.</p></div><div><h2 class="kicker" style="margin-bottom:6pt">A note from the studio</h2><p>Questions about a line item?<br>Write to hello@example.invalid.</p></div></section>
<footer class="footer"><span>NORTHSTAR STUDIO / INVOICE {{reference}}</span><span>FICTIONAL SAMPLE · 01 / 01</span></footer>

</div>
</main></body></html>
13 changes: 13 additions & 0 deletions examples/react/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,19 @@ termination does not provide a native thread-exit promise. The
[browser SDK guide](https://github.com/fullbleed-engine/fullbleed-node/blob/main/docs/browser.md)
covers limits, custom font/image bytes, hosting policy, and structured errors.

## Let an HTML invoice grow

Add or remove rows inside `src/invoice.html`'s `<tbody>` and update both sample
totals. The HTML sample does not calculate amounts. Its stylesheet lets the table
continue onto new pages, repeats column headings, and prints `Page N of M` in the
page margin. The `.closing` group keeps totals and payment details together; it
can move to the next page when there is not enough room.

Keep the flowing `@page` margins and automatic `.page` height when adapting this
layout. The invoice check covers the short sample, 24 rows, wrapped descriptions,
empty rows and page-boundary cases, including final PDF text bounds and every
displayed preview.

## Build and deploy

```sh
Expand Down
28 changes: 21 additions & 7 deletions examples/react/src/invoice.css
Original file line number Diff line number Diff line change
@@ -1,11 +1,20 @@
@page { size: A4; margin: 0; }
@page {
size: A4; margin: 15mm 16mm 20mm; background: #f8f5ec;
@bottom-left {
content: "NORTHSTAR STUDIO / FICTIONAL INVOICE";
font-family: Inter; font-size: 6.6pt; color: {{ink}};
}
@bottom-right {
content: "Page " counter(page) " of " counter(pages);
font-family: Inter; font-size: 6.6pt; color: {{ink}};
}
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html, body { margin: 0; padding: 0; background: #f8f5ec; }
body { font-family: Inter; font-size: 10pt; line-height: 1.45; color: {{ink}}; }
h1, h2, h3, p, figure { margin: 0; }
h1, h2, h3 { font-weight: 400; }
.page { width: 210mm; height: 296.9mm; padding: 15mm 16mm; position: relative; break-after: page; background: #f8f5ec; }
.page:last-child { break-after: auto; }
.page { width: auto; height: auto; }
.kicker { font-size: 7.2pt; font-weight: 600; letter-spacing: 1.4pt; text-transform: uppercase; }
.serif { font-family: 'DM Serif Display'; font-weight: 400; }
.display { font-family: 'Bebas Neue'; font-weight: 400; }
Expand All @@ -16,7 +25,6 @@ h1, h2, h3 { font-weight: 400; }
.grid-2 { display: grid; grid-template-columns: minmax(0,1fr) minmax(0,1fr); gap: 24pt; }
.grid-2 > * { min-width: 0; }
.grid-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 16pt; }
.footer { position: absolute; left: 16mm; right: 16mm; bottom: 12mm; border-top: .6pt solid #9eafa4; padding-top: 8pt; display: flex; justify-content: space-between; gap: 12pt; font-size: 6.6pt; letter-spacing: .45pt; }
table { width: 100%; border-collapse: collapse; font-size: 9pt; }
th { font-size: 7.5pt; font-weight: 600; text-align: left; }
th, td { padding: 10pt 0; border-bottom: .55pt solid #bdc8bf; vertical-align: top; }
Expand All @@ -37,12 +45,18 @@ a { color: inherit; }
.invoice .details { border-top: .6pt solid #9eafa4; border-bottom: .6pt solid #9eafa4; padding: 15pt 0; margin-bottom: 10pt; }
.invoice .details p { margin-top: 5pt; font-size: 8.2pt; }
.invoice .details > div + div { border-left: .6pt solid #c7cdc4; padding-left: 14pt; }
.invoice table { table-layout: fixed; }
.invoice th { color: #52665a; }
.invoice th:first-child { width: 56%; }
.invoice th:not(:first-child) { width: 14.666%; }
.invoice tr { break-inside: avoid; }
.invoice td { padding: 12pt 0; }
.invoice td:first-child { overflow-wrap: anywhere; }
.invoice .item-note { color: #617069; font-size: 8pt; margin-top: 4pt; }
.invoice .amounts { display: grid; grid-template-columns: 1fr 1.25fr; gap: 27pt; margin-top: 23pt; }
.invoice .closing { break-inside: avoid; }
.invoice .amounts { display: grid; grid-template-columns: 1fr 1.25fr; gap: 27pt; margin-top: 23pt; break-inside: avoid; }
.invoice .thanks { font: italic 22pt/1.2 'DM Serif Display'; color: #b44123; padding-top: 8pt; }
.invoice .summary-line { display: flex; justify-content: space-between; padding: 5pt 0; font-size: 8.5pt; }
.invoice .total { background: {{ink}}; color: #fff8e8; padding: 16pt; margin-top: 9pt; border-left: 4pt solid #d96238; }
.invoice .total .value { font: 38pt/1.1 'Bebas Neue'; margin-top: 7pt; }
.invoice .payment { margin-top: 20pt; padding-top: 12pt; border-top: .6pt solid #9eafa4; display: grid; grid-template-columns: 1fr 1fr; gap: 24pt; font-size: 8pt; }
.invoice .payment { margin-top: 16pt; padding-top: 12pt; border-top: .6pt solid #9eafa4; display: grid; grid-template-columns: 1fr 1fr; gap: 24pt; font-size: 8pt; break-inside: avoid; }
4 changes: 3 additions & 1 deletion examples/react/src/invoice.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,9 @@
<table aria-label="Invoice line items"><thead><tr><th style="width:56%">DESCRIPTION</th><th class="number">HOURS</th><th class="number">RATE</th><th class="number">AMOUNT</th></tr></thead><tbody>
<tr><td><strong>Discovery &amp; brand workshop</strong><p class='item-note'>Positioning, priorities, and a clear creative direction</p></td><td class='number'>8</td><td class='number'>$125.00</td><td class='number'>$1,000.00</td></tr><tr><td><strong>Digital design &amp; implementation</strong><p class='item-note'>A cohesive visual system, from layout to launch</p></td><td class='number'>6</td><td class='number'>$95.00</td><td class='number'>$570.00</td></tr><tr><td><strong>Review &amp; studio handoff</strong><p class='item-note'>Final refinements, documentation, and delivery</p></td><td class='number'>2</td><td class='number'>$150.00</td><td class='number'>$300.00</td></tr>
</tbody></table>
<div class="closing">
<section class="amounts"><div><p class="thanks">A little clarity.<br>A lot of possibility.</p><p class="small muted" style="margin-top:14pt">Thank you for inviting us<br>to help shape your next chapter.</p></div><div><div class="summary-line"><span>Subtotal</span><span>$1,870.00</span></div><div class="summary-line"><span>Tax · 0% in this sample</span><span>$0.00</span></div><div class="total"><div class="kicker">TOTAL DUE · USD</div><div class="value">$1,870.00</div></div></div></section>
<section class="payment"><div><h2 class="kicker" style="margin-bottom:6pt">Payment details</h2><p>Reference {{reference}} with your payment.<br>Payment instructions are supplied separately.</p></div><div><h2 class="kicker" style="margin-bottom:6pt">A note from the studio</h2><p>Questions about a line item?<br>Write to hello@example.invalid.</p></div></section>
<footer class="footer"><span>NORTHSTAR STUDIO / INVOICE {{reference}}</span><span>FICTIONAL SAMPLE · 01 / 01</span></footer>

</div>
</main></body></html>
Loading
Loading