blitz-pdf 0.1.2 → 0.1.4
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/README.md +26 -0
- package/THIRD_PARTY_NOTICES.md +5 -2
- package/docs/layout-regressions.md +65 -0
- package/docs/pagination-regressions.md +89 -0
- package/package.json +2 -1
- package/vendor/README.md +35 -0
- package/vendor/blitz-dom/Cargo.toml +113 -0
- package/vendor/blitz-dom/LICENSE-APACHE +176 -0
- package/vendor/blitz-dom/LICENSE-MIT +23 -0
- package/vendor/blitz-dom/assets/default.css +1142 -0
- package/vendor/blitz-dom/assets/moz-bullet-font.otf +0 -0
- package/vendor/blitz-dom/src/accessibility.rs +255 -0
- package/vendor/blitz-dom/src/config.rs +97 -0
- package/vendor/blitz-dom/src/cssom.rs +971 -0
- package/vendor/blitz-dom/src/debug.rs +206 -0
- package/vendor/blitz-dom/src/document.rs +3395 -0
- package/vendor/blitz-dom/src/events/driver.rs +427 -0
- package/vendor/blitz-dom/src/events/focus.rs +40 -0
- package/vendor/blitz-dom/src/events/ime.rs +31 -0
- package/vendor/blitz-dom/src/events/keyboard.rs +174 -0
- package/vendor/blitz-dom/src/events/mod.rs +315 -0
- package/vendor/blitz-dom/src/events/pointer.rs +849 -0
- package/vendor/blitz-dom/src/font_metrics.rs +177 -0
- package/vendor/blitz-dom/src/form.rs +463 -0
- package/vendor/blitz-dom/src/html.rs +38 -0
- package/vendor/blitz-dom/src/iframe.rs +186 -0
- package/vendor/blitz-dom/src/layout/construct.rs +1328 -0
- package/vendor/blitz-dom/src/layout/damage.rs +642 -0
- package/vendor/blitz-dom/src/layout/inline.rs +1160 -0
- package/vendor/blitz-dom/src/layout/list.rs +237 -0
- package/vendor/blitz-dom/src/layout/mod.rs +969 -0
- package/vendor/blitz-dom/src/layout/paint_tree.rs +462 -0
- package/vendor/blitz-dom/src/layout/replaced.rs +439 -0
- package/vendor/blitz-dom/src/layout/table.rs +967 -0
- package/vendor/blitz-dom/src/layout/text_transform.rs +979 -0
- package/vendor/blitz-dom/src/layout/writing_mode.rs +437 -0
- package/vendor/blitz-dom/src/lib.rs +160 -0
- package/vendor/blitz-dom/src/mutator.rs +1818 -0
- package/vendor/blitz-dom/src/net.rs +649 -0
- package/vendor/blitz-dom/src/node/attributes.rs +60 -0
- package/vendor/blitz-dom/src/node/custom_widget.rs +178 -0
- package/vendor/blitz-dom/src/node/element.rs +1106 -0
- package/vendor/blitz-dom/src/node/mod.rs +30 -0
- package/vendor/blitz-dom/src/node/node.rs +2036 -0
- package/vendor/blitz-dom/src/node/scrollbar.rs +237 -0
- package/vendor/blitz-dom/src/node/serialize.rs +225 -0
- package/vendor/blitz-dom/src/node/stylo_data.rs +142 -0
- package/vendor/blitz-dom/src/node/svg.rs +265 -0
- package/vendor/blitz-dom/src/node/text.rs +804 -0
- package/vendor/blitz-dom/src/query_selector.rs +275 -0
- package/vendor/blitz-dom/src/resolve.rs +474 -0
- package/vendor/blitz-dom/src/resolved_style.rs +797 -0
- package/vendor/blitz-dom/src/scrolling.rs +780 -0
- package/vendor/blitz-dom/src/selection.rs +122 -0
- package/vendor/blitz-dom/src/stylo.rs +1518 -0
- package/vendor/blitz-dom/src/stylo_device.rs +88 -0
- package/vendor/blitz-dom/src/stylo_to_cursor_icon.rs +49 -0
- package/vendor/blitz-dom/src/stylo_to_kurbo.rs +129 -0
- package/vendor/blitz-dom/src/stylo_to_parley.rs +655 -0
- package/vendor/blitz-dom/src/traversal.rs +600 -0
- package/vendor/blitz-dom/src/tree.rs +136 -0
- package/vendor/blitz-dom/src/url.rs +63 -0
- package/vendor/blitz-dom/src/util.rs +256 -0
- package/wasm/blitz_pdf_bg.wasm +0 -0
package/README.md
CHANGED
|
@@ -431,6 +431,32 @@ relaxed to make progress. A text line that cannot fit the printable height
|
|
|
431
431
|
fails explicitly. Keep-with-next protects a heading even when the following
|
|
432
432
|
paragraph spans multiple pages.
|
|
433
433
|
|
|
434
|
+
Trailing `<br>` elements and preserved blank lines keep their layout height;
|
|
435
|
+
the extra cursor line emitted by the text engine after a final break is not
|
|
436
|
+
paginated. Overflow clips constrain line, glyph, and table-row fragmentation.
|
|
437
|
+
Fully clipped glyph runs are omitted from the PDF's selectable text.
|
|
438
|
+
|
|
439
|
+
Pagination failures include a code at the start of `Error.message`:
|
|
440
|
+
|
|
441
|
+
- `PAGINATION_LINE_TOO_TALL`: a line exceeds the available printable height.
|
|
442
|
+
- `PAGINATION_NO_PROGRESS`: no valid advancing break exists, including chains
|
|
443
|
+
of overlapping lines that individually fit the page.
|
|
444
|
+
- `PAGINATION_FORCED_BREAK_INTERSECTS_LINE`: an explicit break cuts a line.
|
|
445
|
+
- `PAGINATION_TABLE_GROUPS_TOO_TALL`: repeated groups leave no room for rows.
|
|
446
|
+
|
|
447
|
+
These messages include the zero-based page index, document-space page top,
|
|
448
|
+
available height, and, when associated with a DOM line, element tag/ID, internal
|
|
449
|
+
node ID, zero-based line index and measured visible line range. Coordinates and
|
|
450
|
+
heights are CSS pixels. Painted glyph runs without a DOM association and errors
|
|
451
|
+
without a blocking line report those fields as `unavailable`.
|
|
452
|
+
|
|
453
|
+
The local Blitz layout patch preserves fractional page geometry, corrects
|
|
454
|
+
table-cell line spacing and empty-paragraph margin collapse, and stretches
|
|
455
|
+
`td { max-width: 0 }` cells to the columns allocated by the table. Ordinary
|
|
456
|
+
content inside `display: table` containers receives anonymous row/cell wrappers.
|
|
457
|
+
See the [layout regressions](docs/layout-regressions.md) and
|
|
458
|
+
[pagination investigation](docs/pagination-regressions.md).
|
|
459
|
+
|
|
434
460
|
The first `<thead>` and `<tfoot>` (or elements styled as `table-header-group`
|
|
435
461
|
and `table-footer-group`) repeat on every fragment of their table. Their actual
|
|
436
462
|
layout, column widths, backgrounds, and selectable text are retained. Use
|
package/THIRD_PARTY_NOTICES.md
CHANGED
|
@@ -17,8 +17,11 @@ through crates.io. Stylo 0.22.0 is patched to expose paged-media CSS properties
|
|
|
17
17
|
in its Servo build. Its full modified MPL-2.0 source and license are included in
|
|
18
18
|
`vendor/stylo`. Krilla 0.8.2 is patched for custom XMP extension schemas and
|
|
19
19
|
independent modification dates; its source and MIT/Apache-2.0 licenses are in
|
|
20
|
-
`vendor/krilla`.
|
|
21
|
-
|
|
20
|
+
`vendor/krilla`. Blitz's DOM crate is patched for fractional PDF geometry,
|
|
21
|
+
table-cell sizing/spacing, anonymous table wrappers, and paragraph margin
|
|
22
|
+
collapse; its source and MIT/Apache-2.0 licenses are in `vendor/blitz-dom`.
|
|
23
|
+
`vendor/README.md` lists these patches. Other dependencies are used without
|
|
24
|
+
source modifications.
|
|
22
25
|
|
|
23
26
|
Bundled DejaVu fonts use the Bitstream Vera / DejaVu license reproduced in
|
|
24
27
|
`licenses/DejaVu.txt`. The regular WOFF2 comes from Blitz's
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
# Report margins and spacing
|
|
2
|
+
|
|
3
|
+
`tests/layout.test.ts` exercises the public `renderPdf` API against rebuilt
|
|
4
|
+
WASM. The underlying changes are in the vendored Blitz DOM crate; their
|
|
5
|
+
upstream revision and modified files are listed in `vendor/README.md`.
|
|
6
|
+
|
|
7
|
+
## Fractional geometry
|
|
8
|
+
|
|
9
|
+
Blitz normally rounds layout boxes to integer screen pixels. PDF physical
|
|
10
|
+
lengths need fractional coordinates: a 25 mm offset is about 94.488 CSS pixels,
|
|
11
|
+
not 94. Truncating the content viewport also moves right-aligned and
|
|
12
|
+
percentage-sized content. Body layout and header/footer templates now use the
|
|
13
|
+
exact CSS viewport and preserve box coordinates through painting and pagination.
|
|
14
|
+
Tests allow Stylo's 1/60-pixel length quantization.
|
|
15
|
+
|
|
16
|
+
## Table line heights and empty paragraphs
|
|
17
|
+
|
|
18
|
+
The root text style of an inline formatting context must use baseline
|
|
19
|
+
alignment. A table cell's `vertical-align: middle` belongs to placement inside
|
|
20
|
+
the row; passing it to the text builder inflated the cell's own lines too.
|
|
21
|
+
Tests compare ordinary blocks with cells containing small labels, values, and
|
|
22
|
+
trailing breaks, and retain descendant superscript and cell alignment coverage.
|
|
23
|
+
|
|
24
|
+
An empty paragraph containing a span must allow margins to collapse through it.
|
|
25
|
+
The previous empty-text shortcut reported a non-collapsible box, adding an
|
|
26
|
+
extra paragraph margin. It also bypassed explicit heights. Empty inline
|
|
27
|
+
contexts now follow normal sizing and collapse calculations; explicit
|
|
28
|
+
height, min-height, padding, borders, and real blank lines remain effective.
|
|
29
|
+
|
|
30
|
+
## Table widths and generated wrappers
|
|
31
|
+
|
|
32
|
+
The report's information table uses `max-width: 0` on its cells. That constraint
|
|
33
|
+
affects intrinsic measurement, while the final cells must fill their allocated
|
|
34
|
+
columns. Previously it also clamped the final content width to zero, producing
|
|
35
|
+
character-by-character wrapping. Tests cover auto/fixed tables and both inline
|
|
36
|
+
and block cell contents, including the full text of height-limited tables.
|
|
37
|
+
|
|
38
|
+
The report body uses `display: table` with ordinary headings, paragraphs, and
|
|
39
|
+
nested tables as children. These require anonymous rows and cells under
|
|
40
|
+
[CSS 2.1 section 17.2.1](https://www.w3.org/TR/CSS2/tables.html#anonymous-boxes).
|
|
41
|
+
Blitz previously discarded those children. Layout construction now wraps
|
|
42
|
+
consecutive improper children while preserving the author's DOM for selectors.
|
|
43
|
+
Tests compare implicit and explicit wrappers, whitespace, hidden siblings,
|
|
44
|
+
row inheritance, CSS page-size changes, and pagination with nested content.
|
|
45
|
+
|
|
46
|
+
## Project reproduction
|
|
47
|
+
|
|
48
|
+
The original offer template was expanded with its project's template compiler,
|
|
49
|
+
synthetic offer data, the unmodified DIN stylesheet, and the project's Noto Sans
|
|
50
|
+
font files. The report configuration defaults to `style_din5008`; its export
|
|
51
|
+
call passes `styleFile`, `fontFamily`, and A4 options, without `styleOverwrite`.
|
|
52
|
+
The stylesheet supplies the 27 mm top and 41 mm bottom page margins.
|
|
53
|
+
|
|
54
|
+
The resulting one-page report was rendered with Poppler and inspected, including
|
|
55
|
+
the address block, information table, greeting, line item, totals, and footer
|
|
56
|
+
text. Chromium DOM measurements verified column distribution and margin
|
|
57
|
+
behavior with the same HTML. Against the supplied Chromium PDF, the six shared
|
|
58
|
+
information-table labels have the same 21 pt baseline interval; their absolute
|
|
59
|
+
baselines differ by 0.118 pt. The delivery heading and greeting differ by
|
|
60
|
+
0.137 pt and 0.125 pt respectively, and the body left edge by 0.003 pt.
|
|
61
|
+
|
|
62
|
+
The supplied business PDFs contain different
|
|
63
|
+
data, and normal font metrics can vary across Chromium platforms; this is
|
|
64
|
+
coverage of the project template and layout regressions, not a pixel-equality
|
|
65
|
+
claim for different documents.
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
# Pagination regressions in 0.1.2
|
|
2
|
+
|
|
3
|
+
The regressions are exercised through `renderPdf` in `tests/pagination.test.ts`.
|
|
4
|
+
Rebuild the WASM before running them.
|
|
5
|
+
|
|
6
|
+
## Final breaks and empty lines
|
|
7
|
+
|
|
8
|
+
```js
|
|
9
|
+
await renderPdf("<p>Text<br></p>", { format: "A4" });
|
|
10
|
+
```
|
|
11
|
+
|
|
12
|
+
With the pinned Blitz `e72650a` and Parley 0.12.0, instrumenting this layout
|
|
13
|
+
shows a paragraph height of 19 CSS pixels. Parley supplies two line ranges:
|
|
14
|
+
`[0, 19]` for `Text\n`, and `[19, 38]` with an empty text range and no positioned
|
|
15
|
+
items. Both have a finite, ordinary line height of 19 pixels.
|
|
16
|
+
|
|
17
|
+
Blitz's `packages/blitz-dom/src/layout/inline.rs` excludes that second line
|
|
18
|
+
from the block's height: it exists to position an editor cursor after a final
|
|
19
|
+
newline, not as another CSS line box. Pagination previously kept it. With the
|
|
20
|
+
default paragraph margins, the document ends inside this extra line; repeated
|
|
21
|
+
attempts to move the break backward eventually stop making progress. The old
|
|
22
|
+
error incorrectly classified this as a line taller than A4.
|
|
23
|
+
|
|
24
|
+
`css_lines` now uses the same terminal-line test as Blitz, including for
|
|
25
|
+
keep-with-next edges and widow/orphan counts. A real blank line has a newline in
|
|
26
|
+
its text range and remains in pagination with its measured line box. No text,
|
|
27
|
+
invisible anchor, or other character is inserted. Position assertions cover
|
|
28
|
+
multiple blank lines, table cells, and automatic/forced page boundaries.
|
|
29
|
+
|
|
30
|
+
## Height-limited tables
|
|
31
|
+
|
|
32
|
+
Use the following HTML in both a browser and `renderPdf(html, { format: "A4" })`:
|
|
33
|
+
|
|
34
|
+
```html
|
|
35
|
+
<style>
|
|
36
|
+
.info { width: 75mm; max-height: 75mm; overflow: hidden; }
|
|
37
|
+
.info table { width: 100%; border-collapse: collapse; }
|
|
38
|
+
.info td {
|
|
39
|
+
max-width: 0;
|
|
40
|
+
word-break: break-all;
|
|
41
|
+
overflow-wrap: break-word;
|
|
42
|
+
}
|
|
43
|
+
</style>
|
|
44
|
+
<div class="info">
|
|
45
|
+
<table>
|
|
46
|
+
<tr><td>Text</td><td>Text</td></tr>
|
|
47
|
+
<tr><td>Text</td><td>Text</td></tr>
|
|
48
|
+
<tr><td>Text</td><td>Text</td></tr>
|
|
49
|
+
<tr><td>Text</td><td>Text</td></tr>
|
|
50
|
+
<tr><td>Text</td><td>Text</td></tr>
|
|
51
|
+
<tr><td>Text</td><td>Text</td></tr>
|
|
52
|
+
</table>
|
|
53
|
+
</div>
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
Measured in Chromium 154 on macOS, `getBoundingClientRect()` gives a table
|
|
57
|
+
width of about 283.46 pixels, cell widths of about 141.73 pixels and a total
|
|
58
|
+
height of 123 pixels. Changing `max-width` to `none` produces the same
|
|
59
|
+
dimensions for these equal cell contents.
|
|
60
|
+
|
|
61
|
+
Unpatched Blitz's final cell layout instead has width 2 pixels (zero content width plus
|
|
62
|
+
padding), height 78 pixels, and four 19-pixel lines for `Text`. Its table grid
|
|
63
|
+
adapts cells to grid items while retaining `max_size.width`; the inline layout
|
|
64
|
+
therefore receives a zero-width constraint.
|
|
65
|
+
|
|
66
|
+
The resulting tall table exceeds its container's height. Pagination previously
|
|
67
|
+
used line and row ranges beyond the overflow clip; the document end inside a
|
|
68
|
+
clipped line could cause the same misleading error as the first reproduction.
|
|
69
|
+
Pagination now clips those ranges to the visible padding box and intersects
|
|
70
|
+
glyph bounds with the scene's nested clips. PDF text emission uses the same
|
|
71
|
+
clip bounds to omit fully hidden runs. Regression coverage includes both
|
|
72
|
+
`max-width` values, nested `hidden`/`clip` containers and clipped oversized ink.
|
|
73
|
+
|
|
74
|
+
The subsequent [layout patch](layout-regressions.md) separates the intrinsic
|
|
75
|
+
width constraint from the final allocated column width. The zero-width case
|
|
76
|
+
now renders all twelve cells, and the test requires that content for both
|
|
77
|
+
`max-width` values. This fixes the reproduction without replacing the entire
|
|
78
|
+
table width algorithm.
|
|
79
|
+
|
|
80
|
+
## Diagnostic distinctions
|
|
81
|
+
|
|
82
|
+
`PAGINATION_LINE_TOO_TALL` requires a blocking line whose visible height exceeds
|
|
83
|
+
the available height. `PAGINATION_NO_PROGRESS` covers, for example, staggered
|
|
84
|
+
columns of overlapping 40-pixel lines on an 80-pixel page. A forced break through
|
|
85
|
+
a line has its own `PAGINATION_FORCED_BREAK_INTERSECTS_LINE` code. Tests assert
|
|
86
|
+
the element, page/line indexes, available height and line range, and verify that
|
|
87
|
+
rendering remains usable after an error.
|
|
88
|
+
|
|
89
|
+
The Argon asset-path issue is outside this change.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "blitz-pdf",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.4",
|
|
4
4
|
"description": "Render HTML and CSS to PDF with Blitz and WebAssembly in Node.js, Bun, and browsers.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "MIT",
|
|
@@ -47,6 +47,7 @@
|
|
|
47
47
|
"dist",
|
|
48
48
|
"wasm",
|
|
49
49
|
"src",
|
|
50
|
+
"docs",
|
|
50
51
|
"examples",
|
|
51
52
|
"assets/icon.svg",
|
|
52
53
|
"README.md",
|
package/vendor/README.md
CHANGED
|
@@ -40,3 +40,38 @@ No invoice-specific behavior is added to the engine or public API.
|
|
|
40
40
|
|
|
41
41
|
When upgrading Krilla, review this patch and run `tests/document.test.ts`, the
|
|
42
42
|
Node/browser checks, and `npm run test:pdfa` against the rebuilt WASM.
|
|
43
|
+
|
|
44
|
+
# Blitz print layout patch
|
|
45
|
+
|
|
46
|
+
`blitz-dom/` contains `packages/blitz-dom` from Blitz revision
|
|
47
|
+
`e72650a6e67941852fddf025295cfee30c39ea32`, with its MIT/Apache-2.0 licenses.
|
|
48
|
+
Its standalone manifest expands the upstream workspace dependencies and pins
|
|
49
|
+
the sibling Blitz crates to the same revision.
|
|
50
|
+
|
|
51
|
+
- `config.rs`, `document.rs`, `stylo_device.rs`, `iframe.rs`, `resolve.rs`, and
|
|
52
|
+
`layout/writing_mode.rs`: provide an optional fractional CSS viewport and
|
|
53
|
+
optional layout rounding. Defaults preserve the upstream window behavior.
|
|
54
|
+
The PDF body and margin templates disable rounding and supply the exact
|
|
55
|
+
printable dimensions, including after CSS page setup changes them. Layout,
|
|
56
|
+
transforms, painting, and pagination share the resulting geometry.
|
|
57
|
+
- `layout/construct.rs`: use baseline alignment for the root of an inline
|
|
58
|
+
formatting context. A table cell's `vertical-align: middle` aligns the cell
|
|
59
|
+
content within its row; applying it again to its own text inflated every line.
|
|
60
|
+
Descendant inline alignment and the cell's placement remain intact.
|
|
61
|
+
- `layout/inline.rs`: let empty inline contexts compute their size and margin
|
|
62
|
+
collapse normally. The empty-text shortcut prevented margins from collapsing
|
|
63
|
+
through paragraphs containing empty spans and discarded explicit heights.
|
|
64
|
+
- `layout/table.rs`: keep `max-width` as an intrinsic measurement constraint,
|
|
65
|
+
while allowing the final cell layout to use the width allocated by the grid.
|
|
66
|
+
Generate anonymous row/cell wrappers around improper table children, including
|
|
67
|
+
block content in a `display: table` container. `layout/construct.rs` creates
|
|
68
|
+
the wrappers without altering the DOM; `layout/damage.rs` retains their roles
|
|
69
|
+
and inherited styles when refreshing them. Ownership tracking frees them on
|
|
70
|
+
reconstruction.
|
|
71
|
+
|
|
72
|
+
When upgrading Blitz, review these changes against upstream and run
|
|
73
|
+
`tests/layout.test.ts`, `tests/pagination.test.ts`, and `tests/reports.test.ts`
|
|
74
|
+
against rebuilt WASM. Layout tests check physical margins, fractional viewport
|
|
75
|
+
widths, header/footer geometry, table line spacing, descendant alignment, empty
|
|
76
|
+
paragraphs, explicit empty-box dimensions, exact page-boundary fits, constrained
|
|
77
|
+
table columns, anonymous cells, and inheritance after CSS page-size changes.
|
|
@@ -0,0 +1,113 @@
|
|
|
1
|
+
[package]
|
|
2
|
+
name = "blitz-dom"
|
|
3
|
+
description = "Blitz DOM implementation"
|
|
4
|
+
documentation = "https://docs.rs/blitz-dom"
|
|
5
|
+
version = "0.3.0-beta.3"
|
|
6
|
+
license = "MIT OR Apache-2.0"
|
|
7
|
+
homepage = "https://github.com/dioxuslabs/blitz"
|
|
8
|
+
repository = "https://github.com/dioxuslabs/blitz"
|
|
9
|
+
categories = ["gui"]
|
|
10
|
+
edition = "2024"
|
|
11
|
+
rust-version = "1.91.0"
|
|
12
|
+
|
|
13
|
+
[features]
|
|
14
|
+
default = [
|
|
15
|
+
"svg",
|
|
16
|
+
"woff",
|
|
17
|
+
"accessibility",
|
|
18
|
+
"system-fonts",
|
|
19
|
+
"file-input",
|
|
20
|
+
"custom-widget",
|
|
21
|
+
"text-transform-icu"
|
|
22
|
+
]
|
|
23
|
+
custom-widget = ["dep:anyrender", "accessibility"]
|
|
24
|
+
tracing = ["dep:tracing"]
|
|
25
|
+
svg = ["dep:usvg", "dep:svgtypes"]
|
|
26
|
+
# WOFF decoding (using the "wuff" crate which is pure Rust)
|
|
27
|
+
woff = ["dep:wuff"]
|
|
28
|
+
accessibility = ["accesskit"]
|
|
29
|
+
system-fonts = ["parley/system"]
|
|
30
|
+
# complex-scripts: enable dictionary-based line-breaking
|
|
31
|
+
complex-scripts = ["parley/complex-scripts"]
|
|
32
|
+
# text-transform-icu: language-aware, Unicode-complete case mapping for `text-transform`
|
|
33
|
+
# (otherwise falls back to the standard library's case mapping)
|
|
34
|
+
text-transform-icu = ["dep:icu_casemap", "dep:writeable"]
|
|
35
|
+
autofocus = []
|
|
36
|
+
floats = ["taffy/float_layout", "stylo_taffy/floats"]
|
|
37
|
+
# CSS vertical `writing-mode` support (layout runs in each box's writing-mode frame; see layout/writing_mode.rs)
|
|
38
|
+
writing-mode = ["stylo_taffy/writing-mode"]
|
|
39
|
+
file-input = []
|
|
40
|
+
# Overlay-scrollbar thumb interaction (drag + hover tracking). Normally
|
|
41
|
+
# enabled through `blitz-paint/scrollbars`, which paints the thumbs.
|
|
42
|
+
scrollbars = []
|
|
43
|
+
parallel-construct = []
|
|
44
|
+
log-phase-times = ["debug_timer/enable"]
|
|
45
|
+
|
|
46
|
+
[dependencies]
|
|
47
|
+
# Blitz dependencies
|
|
48
|
+
blitz-traits = { version = "=0.3.0-beta.3", default-features = false, git = "https://github.com/DioxusLabs/blitz", rev = "e72650a6e67941852fddf025295cfee30c39ea32" }
|
|
49
|
+
stylo_taffy = { version = "=0.3.0-beta.3", default-features = false, git = "https://github.com/DioxusLabs/blitz", rev = "e72650a6e67941852fddf025295cfee30c39ea32", features = ["default"] }
|
|
50
|
+
debug_timer = { version = "0.1.2", git = "https://github.com/DioxusLabs/blitz", rev = "e72650a6e67941852fddf025295cfee30c39ea32" }
|
|
51
|
+
|
|
52
|
+
# Servo dependencies
|
|
53
|
+
style = { version = "0.22.0", package = "stylo" }
|
|
54
|
+
selectors = { version = "0.41.0", package = "selectors" }
|
|
55
|
+
cssparser = { version = "0.38.0" }
|
|
56
|
+
style_config = { version = "0.22.0", package = "stylo_static_prefs" }
|
|
57
|
+
style_traits = { version = "0.22.0", package = "stylo_traits" }
|
|
58
|
+
style_dom = { version = "0.22.0", package = "stylo_dom" }
|
|
59
|
+
app_units = { version = "0.7.5" }
|
|
60
|
+
euclid = { version = "0.22" }
|
|
61
|
+
atomic_refcell = { version = "0.1.13" }
|
|
62
|
+
markup5ever = { version = "0.40.0" }
|
|
63
|
+
smallvec = { version = "1" }
|
|
64
|
+
thin-vec = { version = "0.2" }
|
|
65
|
+
|
|
66
|
+
# DioxusLabs dependencies
|
|
67
|
+
taffy = { git = "https://github.com/DioxusLabs/taffy", rev = "6c2106e3df79493d304f954dc2cd4a4a382981d3", default-features = false, features = ["std", "flexbox", "flexbox_balance", "grid", "block_layout", "content_size", "calc", "detailed_layout_info"] }
|
|
68
|
+
anyrender = { version = "0.14.0", optional = true }
|
|
69
|
+
|
|
70
|
+
# Linebender/Fontations dependencies
|
|
71
|
+
accesskit = { version = "0.25", optional = true }
|
|
72
|
+
parley = { version = "0.12", default-features = false, features = ["std"] }
|
|
73
|
+
skrifa = { version = "0.44", default-features = false, features = ["std"] }
|
|
74
|
+
linebender_resource_handle = { version = "0.1" }
|
|
75
|
+
color = { version = "0.3" }
|
|
76
|
+
kurbo = { version = "0.13.1" }
|
|
77
|
+
|
|
78
|
+
# Unicode
|
|
79
|
+
icu_casemap = { version = "2.3", default-features = false, features = ["compiled_data"], optional = true }
|
|
80
|
+
icu_locale_core = { version = "2.3", default-features = false }
|
|
81
|
+
icu_properties = { version = "2.3", default-features = false, features = ["compiled_data"] }
|
|
82
|
+
icu_segmenter = { version = "2.3", default-features = false, features = ["compiled_data"] }
|
|
83
|
+
writeable = { version = "0.6", default-features = false, optional = true }
|
|
84
|
+
|
|
85
|
+
# Other dependencies
|
|
86
|
+
slotmap = { version = "1.0.7" }
|
|
87
|
+
bitflags = { version = "2.8.0" }
|
|
88
|
+
tracing = { version = "0.1.40", optional = true }
|
|
89
|
+
rayon = { version = "1" }
|
|
90
|
+
|
|
91
|
+
# Media & Decoding
|
|
92
|
+
image = { version = "0.25.6", default-features = false }
|
|
93
|
+
usvg = { version = "0.48.1", optional = true }
|
|
94
|
+
svgtypes = { version = "0.16.1", optional = true }
|
|
95
|
+
wuff = { version = "0.2", optional = true }
|
|
96
|
+
html-escape = { version = "0.2.13" }
|
|
97
|
+
percent-encoding = { version = "2.3.1" }
|
|
98
|
+
|
|
99
|
+
# IO & Networking
|
|
100
|
+
url = { version = "2.5.0" }
|
|
101
|
+
|
|
102
|
+
# Input
|
|
103
|
+
keyboard-types = { version = "0.7" }
|
|
104
|
+
cursor-icon = { version = "1" }
|
|
105
|
+
thread_local = { version = "1" }
|
|
106
|
+
|
|
107
|
+
# WASM
|
|
108
|
+
web-time = { version = "1" }
|
|
109
|
+
|
|
110
|
+
# HACK: Blitz doesn't need to depend on objc2 directly. But this feature flag is necessary
|
|
111
|
+
# to prevent debug builds from panicking.
|
|
112
|
+
[target.'cfg(any(target_vendor = "apple"))'.dependencies]
|
|
113
|
+
objc2 = { version = "0.6", features = ["disable-encoding-assertions"] }
|
|
@@ -0,0 +1,176 @@
|
|
|
1
|
+
Apache License
|
|
2
|
+
Version 2.0, January 2004
|
|
3
|
+
http://www.apache.org/licenses/
|
|
4
|
+
|
|
5
|
+
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
|
6
|
+
|
|
7
|
+
1. Definitions.
|
|
8
|
+
|
|
9
|
+
"License" shall mean the terms and conditions for use, reproduction,
|
|
10
|
+
and distribution as defined by Sections 1 through 9 of this document.
|
|
11
|
+
|
|
12
|
+
"Licensor" shall mean the copyright owner or entity authorized by
|
|
13
|
+
the copyright owner that is granting the License.
|
|
14
|
+
|
|
15
|
+
"Legal Entity" shall mean the union of the acting entity and all
|
|
16
|
+
other entities that control, are controlled by, or are under common
|
|
17
|
+
control with that entity. For the purposes of this definition,
|
|
18
|
+
"control" means (i) the power, direct or indirect, to cause the
|
|
19
|
+
direction or management of such entity, whether by contract or
|
|
20
|
+
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
|
21
|
+
outstanding shares, or (iii) beneficial ownership of such entity.
|
|
22
|
+
|
|
23
|
+
"You" (or "Your") shall mean an individual or Legal Entity
|
|
24
|
+
exercising permissions granted by this License.
|
|
25
|
+
|
|
26
|
+
"Source" form shall mean the preferred form for making modifications,
|
|
27
|
+
including but not limited to software source code, documentation
|
|
28
|
+
source, and configuration files.
|
|
29
|
+
|
|
30
|
+
"Object" form shall mean any form resulting from mechanical
|
|
31
|
+
transformation or translation of a Source form, including but
|
|
32
|
+
not limited to compiled object code, generated documentation,
|
|
33
|
+
and conversions to other media types.
|
|
34
|
+
|
|
35
|
+
"Work" shall mean the work of authorship, whether in Source or
|
|
36
|
+
Object form, made available under the License, as indicated by a
|
|
37
|
+
copyright notice that is included in or attached to the work
|
|
38
|
+
(an example is provided in the Appendix below).
|
|
39
|
+
|
|
40
|
+
"Derivative Works" shall mean any work, whether in Source or Object
|
|
41
|
+
form, that is based on (or derived from) the Work and for which the
|
|
42
|
+
editorial revisions, annotations, elaborations, or other modifications
|
|
43
|
+
represent, as a whole, an original work of authorship. For the purposes
|
|
44
|
+
of this License, Derivative Works shall not include works that remain
|
|
45
|
+
separable from, or merely link (or bind by name) to the interfaces of,
|
|
46
|
+
the Work and Derivative Works thereof.
|
|
47
|
+
|
|
48
|
+
"Contribution" shall mean any work of authorship, including
|
|
49
|
+
the original version of the Work and any modifications or additions
|
|
50
|
+
to that Work or Derivative Works thereof, that is intentionally
|
|
51
|
+
submitted to Licensor for inclusion in the Work by the copyright owner
|
|
52
|
+
or by an individual or Legal Entity authorized to submit on behalf of
|
|
53
|
+
the copyright owner. For the purposes of this definition, "submitted"
|
|
54
|
+
means any form of electronic, verbal, or written communication sent
|
|
55
|
+
to the Licensor or its representatives, including but not limited to
|
|
56
|
+
communication on electronic mailing lists, source code control systems,
|
|
57
|
+
and issue tracking systems that are managed by, or on behalf of, the
|
|
58
|
+
Licensor for the purpose of discussing and improving the Work, but
|
|
59
|
+
excluding communication that is conspicuously marked or otherwise
|
|
60
|
+
designated in writing by the copyright owner as "Not a Contribution."
|
|
61
|
+
|
|
62
|
+
"Contributor" shall mean Licensor and any individual or Legal Entity
|
|
63
|
+
on behalf of whom a Contribution has been received by Licensor and
|
|
64
|
+
subsequently incorporated within the Work.
|
|
65
|
+
|
|
66
|
+
2. Grant of Copyright License. Subject to the terms and conditions of
|
|
67
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
68
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
69
|
+
copyright license to reproduce, prepare Derivative Works of,
|
|
70
|
+
publicly display, publicly perform, sublicense, and distribute the
|
|
71
|
+
Work and such Derivative Works in Source or Object form.
|
|
72
|
+
|
|
73
|
+
3. Grant of Patent License. Subject to the terms and conditions of
|
|
74
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
75
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
76
|
+
(except as stated in this section) patent license to make, have made,
|
|
77
|
+
use, offer to sell, sell, import, and otherwise transfer the Work,
|
|
78
|
+
where such license applies only to those patent claims licensable
|
|
79
|
+
by such Contributor that are necessarily infringed by their
|
|
80
|
+
Contribution(s) alone or by combination of their Contribution(s)
|
|
81
|
+
with the Work to which such Contribution(s) was submitted. If You
|
|
82
|
+
institute patent litigation against any entity (including a
|
|
83
|
+
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
|
84
|
+
or a Contribution incorporated within the Work constitutes direct
|
|
85
|
+
or contributory patent infringement, then any patent licenses
|
|
86
|
+
granted to You under this License for that Work shall terminate
|
|
87
|
+
as of the date such litigation is filed.
|
|
88
|
+
|
|
89
|
+
4. Redistribution. You may reproduce and distribute copies of the
|
|
90
|
+
Work or Derivative Works thereof in any medium, with or without
|
|
91
|
+
modifications, and in Source or Object form, provided that You
|
|
92
|
+
meet the following conditions:
|
|
93
|
+
|
|
94
|
+
(a) You must give any other recipients of the Work or
|
|
95
|
+
Derivative Works a copy of this License; and
|
|
96
|
+
|
|
97
|
+
(b) You must cause any modified files to carry prominent notices
|
|
98
|
+
stating that You changed the files; and
|
|
99
|
+
|
|
100
|
+
(c) You must retain, in the Source form of any Derivative Works
|
|
101
|
+
that You distribute, all copyright, patent, trademark, and
|
|
102
|
+
attribution notices from the Source form of the Work,
|
|
103
|
+
excluding those notices that do not pertain to any part of
|
|
104
|
+
the Derivative Works; and
|
|
105
|
+
|
|
106
|
+
(d) If the Work includes a "NOTICE" text file as part of its
|
|
107
|
+
distribution, then any Derivative Works that You distribute must
|
|
108
|
+
include a readable copy of the attribution notices contained
|
|
109
|
+
within such NOTICE file, excluding those notices that do not
|
|
110
|
+
pertain to any part of the Derivative Works, in at least one
|
|
111
|
+
of the following places: within a NOTICE text file distributed
|
|
112
|
+
as part of the Derivative Works; within the Source form or
|
|
113
|
+
documentation, if provided along with the Derivative Works; or,
|
|
114
|
+
within a display generated by the Derivative Works, if and
|
|
115
|
+
wherever such third-party notices normally appear. The contents
|
|
116
|
+
of the NOTICE file are for informational purposes only and
|
|
117
|
+
do not modify the License. You may add Your own attribution
|
|
118
|
+
notices within Derivative Works that You distribute, alongside
|
|
119
|
+
or as an addendum to the NOTICE text from the Work, provided
|
|
120
|
+
that such additional attribution notices cannot be construed
|
|
121
|
+
as modifying the License.
|
|
122
|
+
|
|
123
|
+
You may add Your own copyright statement to Your modifications and
|
|
124
|
+
may provide additional or different license terms and conditions
|
|
125
|
+
for use, reproduction, or distribution of Your modifications, or
|
|
126
|
+
for any such Derivative Works as a whole, provided Your use,
|
|
127
|
+
reproduction, and distribution of the Work otherwise complies with
|
|
128
|
+
the conditions stated in this License.
|
|
129
|
+
|
|
130
|
+
5. Submission of Contributions. Unless You explicitly state otherwise,
|
|
131
|
+
any Contribution intentionally submitted for inclusion in the Work
|
|
132
|
+
by You to the Licensor shall be under the terms and conditions of
|
|
133
|
+
this License, without any additional terms or conditions.
|
|
134
|
+
Notwithstanding the above, nothing herein shall supersede or modify
|
|
135
|
+
the terms of any separate license agreement you may have executed
|
|
136
|
+
with Licensor regarding such Contributions.
|
|
137
|
+
|
|
138
|
+
6. Trademarks. This License does not grant permission to use the trade
|
|
139
|
+
names, trademarks, service marks, or product names of the Licensor,
|
|
140
|
+
except as required for reasonable and customary use in describing the
|
|
141
|
+
origin of the Work and reproducing the content of the NOTICE file.
|
|
142
|
+
|
|
143
|
+
7. Disclaimer of Warranty. Unless required by applicable law or
|
|
144
|
+
agreed to in writing, Licensor provides the Work (and each
|
|
145
|
+
Contributor provides its Contributions) on an "AS IS" BASIS,
|
|
146
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
|
147
|
+
implied, including, without limitation, any warranties or conditions
|
|
148
|
+
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
|
149
|
+
PARTICULAR PURPOSE. You are solely responsible for determining the
|
|
150
|
+
appropriateness of using or redistributing the Work and assume any
|
|
151
|
+
risks associated with Your exercise of permissions under this License.
|
|
152
|
+
|
|
153
|
+
8. Limitation of Liability. In no event and under no legal theory,
|
|
154
|
+
whether in tort (including negligence), contract, or otherwise,
|
|
155
|
+
unless required by applicable law (such as deliberate and grossly
|
|
156
|
+
negligent acts) or agreed to in writing, shall any Contributor be
|
|
157
|
+
liable to You for damages, including any direct, indirect, special,
|
|
158
|
+
incidental, or consequential damages of any character arising as a
|
|
159
|
+
result of this License or out of the use or inability to use the
|
|
160
|
+
Work (including but not limited to damages for loss of goodwill,
|
|
161
|
+
work stoppage, computer failure or malfunction, or any and all
|
|
162
|
+
other commercial damages or losses), even if such Contributor
|
|
163
|
+
has been advised of the possibility of such damages.
|
|
164
|
+
|
|
165
|
+
9. Accepting Warranty or Additional Liability. While redistributing
|
|
166
|
+
the Work or Derivative Works thereof, You may choose to offer,
|
|
167
|
+
and charge a fee for, acceptance of support, warranty, indemnity,
|
|
168
|
+
or other liability obligations and/or rights consistent with this
|
|
169
|
+
License. However, in accepting such obligations, You may act only
|
|
170
|
+
on Your own behalf and on Your sole responsibility, not on behalf
|
|
171
|
+
of any other Contributor, and only if You agree to indemnify,
|
|
172
|
+
defend, and hold each Contributor harmless for any liability
|
|
173
|
+
incurred by, or claims asserted against, such Contributor by reason
|
|
174
|
+
of your accepting any such warranty or additional liability.
|
|
175
|
+
|
|
176
|
+
END OF TERMS AND CONDITIONS
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
Permission is hereby granted, free of charge, to any
|
|
2
|
+
person obtaining a copy of this software and associated
|
|
3
|
+
documentation files (the "Software"), to deal in the
|
|
4
|
+
Software without restriction, including without
|
|
5
|
+
limitation the rights to use, copy, modify, merge,
|
|
6
|
+
publish, distribute, sublicense, and/or sell copies of
|
|
7
|
+
the Software, and to permit persons to whom the Software
|
|
8
|
+
is furnished to do so, subject to the following
|
|
9
|
+
conditions:
|
|
10
|
+
|
|
11
|
+
The above copyright notice and this permission notice
|
|
12
|
+
shall be included in all copies or substantial portions
|
|
13
|
+
of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF
|
|
16
|
+
ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED
|
|
17
|
+
TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A
|
|
18
|
+
PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT
|
|
19
|
+
SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
|
|
20
|
+
CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
|
21
|
+
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR
|
|
22
|
+
IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
|
23
|
+
DEALINGS IN THE SOFTWARE.
|