Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add PDF component library #2488

Closed
wants to merge 1 commit into from
Closed

feat: add PDF component library #2488

wants to merge 1 commit into from

Conversation

Robbert
Copy link
Member

@Robbert Robbert commented Sep 8, 2024

test results:

 PASS  src/Checkbox.test.tsx
  Checkbox
    ✓ renders a <Form> tag (361 ms)

 PASS  src/OrderedList.test.tsx
  Ordered list
    ✓ renders a <L> tag (3 ms)
    list item
      ✓ renders a <LI> tag
      ✓ renders a <Lbl> tag with list item counter
      ✓ renders a <LBody> tag with the text content

 PASS  src/Heading6.test.tsx
  Heading 6
    ✓ renders a <H6> tag (215 ms)

 PASS  src/Page.test.tsx
  Page
    ✓ can be configured to English (217 ms)
    ✓ can be configured to Dutch (203 ms)

 PASS  src/CodeBlock.test.tsx
  Code block
    ✓ renders a <Code> tag (158 ms)

 PASS  src/LangSpan.test.tsx
  Language span
    ✓ renders a <Span> tag (1 ms)
    ✓ renders a <Span> tag with the language set to French

 PASS  src/Heading5.test.tsx
  Heading 5
    ✓ renders a <H5> tag (194 ms)

 PASS  src/Heading3.test.tsx
  Heading 3
    ✓ renders a <H3> tag (261 ms)

 PASS  src/Heading4.test.tsx
  Heading 4
    ✓ renders a <H4> tag (215 ms)

 PASS  src/Link.test.tsx
  Link
    ✓ renders a <Link> tag (188 ms)

 PASS  src/Textbox.test.tsx
  Textbox
    ✓ renders a <Form> tag (135 ms)

 PASS  src/RadioButton.test.tsx
  Radio button
    ✓ renders a <Form> tag (182 ms)

 PASS  src/Paragraph.test.tsx
  Paragraph
    ✓ renders a <P> tag (391 ms)
    paragraph with alternate language
      ✓ Language must be specifiable at tag level, in this case a paragraph with French text. (161 ms)
    paragraph with alternate language and text direction
      ✓ Language and text direction must be specifiable at tag level, in this case a paragraph with Arabic text. (181 ms)
    paragraph that spans multiple pages
      ✓ This PDF document should only contain one paragraph tag, spanning multiple pages. (266 ms)
    empty paragraph for visual space
      ○ skipped PDF ideally contains only two paragraph tags, but an additional tag for the empty paragraph typically is not counted as violation.

 PASS  src/UnorderedList.test.tsx
  Unordered list
    ✓ renders a <L> tag (2 ms)
    list item
      ✓ renders a <LI> tag (1 ms)
      ✓ renders a <Lbl> tag with list item marker
      ✓ renders a <LBody> tag with the text content (1 ms)

 PASS  src/Heading2.test.tsx
  Heading 2
    ✓ renders a <H2> tag (217 ms)

 PASS  src/DataList.test.tsx
  Data list
    ✓ renders a <L> tag (1 ms)
    list item
      ✓ renders a <LI> tag
      ✓ renders a <Lbl> tag with the key (1 ms)
      ✓ renders a <LBody> tag with the value

 PASS  src/Quote.test.tsx
  Quote
    ✓ renders a <Quote> tag (172 ms)

 PASS  src/Code.test.tsx
  Code
    ✓ renders a <Code> tag (150 ms)

 PASS  src/Textarea.test.tsx
  Textarea
    ✓ renders a <Form> tag (302 ms)

 PASS  src/Table.test.tsx
  Table
    ✓ renders a <Table> tag (194 ms)
    table header
      ✓ renders a <THead> tag (176 ms)
    table body
      ✓ renders a <TBody> tag (142 ms)
    table footer
      ✓ renders a <TFoot> tag (205 ms)
    table caption
      ✓ renders a <Caption> tag (175 ms)
    data cell
      ✓ renders a <TD> tag (172 ms)
    table heading cell
      ✓ renders a <TH> tag (182 ms)
      empty cells are always <TD> cells, never <TH> cells.
        ○ skipped renders a <TD> tag

 PASS  src/Section.test.tsx
  Section
    ✓ renders a <Sect> tag (137 ms)

 PASS  src/Article.test.tsx
  Article
    ✓ renders a <Art> tag (129 ms)

 PASS  src/Heading1.test.tsx
  Heading 1
    ✓ renders a <H1> tag (144 ms)

 PASS  src/Blockquote.test.tsx
  Blockquote
    ✓ renders a <BlockQuote> tag (134 ms)

Test Suites: 3 skipped, 25 passed, 25 of 28 total
Tests:       5 skipped, 45 passed, 50 total
Snapshots:   0 total
Time:        4.153 s, estimated 5 s
Ran all test suites.

tmp/ dir contents:

-rw-r--r--    1 bobby  staff    12K Sep  9 10:08 pdf-article-1.png
-rw-r--r--    1 bobby  staff   472K Sep  9 10:08 pdf-article.html
-rw-r--r--    1 bobby  staff    13K Sep  9 10:08 pdf-article.log
-rw-r--r--    1 bobby  staff    16K Sep  9 10:08 pdf-article.pdf
-rw-r--r--    1 bobby  staff    64B Sep  9 10:08 pdf-article.pdf.sha256
-rw-r--r--    1 bobby  staff    12K Sep  9 10:08 pdf-blockquote-1.png
-rw-r--r--    1 bobby  staff   472K Sep  9 10:08 pdf-blockquote.html
-rw-r--r--    1 bobby  staff    13K Sep  9 10:08 pdf-blockquote.log
-rw-r--r--    1 bobby  staff    16K Sep  9 10:08 pdf-blockquote.pdf
-rw-r--r--    1 bobby  staff    64B Sep  9 10:08 pdf-blockquote.pdf.sha256
-rw-r--r--    1 bobby  staff   5.7K Sep  9 10:08 pdf-checkbox-1.png
-rw-r--r--    1 bobby  staff   472K Sep  9 10:08 pdf-checkbox.html
-rw-r--r--    1 bobby  staff    13K Sep  9 10:08 pdf-checkbox.log
-rw-r--r--    1 bobby  staff    12K Sep  9 10:08 pdf-checkbox.pdf
-rw-r--r--    1 bobby  staff    64B Sep  9 10:08 pdf-checkbox.pdf.sha256
-rw-r--r--    1 bobby  staff    12K Sep  9 10:08 pdf-code-1.png
-rw-r--r--    1 bobby  staff    26K Sep  9 10:08 pdf-code-block-1.png
-rw-r--r--    1 bobby  staff   472K Sep  9 10:08 pdf-code-block.html
-rw-r--r--    1 bobby  staff    13K Sep  9 10:08 pdf-code-block.log
-rw-r--r--    1 bobby  staff    20K Sep  9 10:08 pdf-code-block.pdf
-rw-r--r--    1 bobby  staff    64B Sep  9 10:08 pdf-code-block.pdf.sha256
-rw-r--r--    1 bobby  staff   472K Sep  9 10:08 pdf-code.html
-rw-r--r--    1 bobby  staff    13K Sep  9 10:08 pdf-code.log
-rw-r--r--    1 bobby  staff    23K Sep  9 10:08 pdf-code.pdf
-rw-r--r--    1 bobby  staff    64B Sep  9 10:08 pdf-code.pdf.sha256
-rw-r--r--    1 bobby  staff    14K Sep  9 10:08 pdf-data-list-1.png
-rw-r--r--    1 bobby  staff   472K Sep  9 10:08 pdf-data-list.html
-rw-r--r--    1 bobby  staff    13K Sep  9 10:08 pdf-data-list.log
-rw-r--r--    1 bobby  staff    24K Sep  9 10:08 pdf-data-list.pdf
-rw-r--r--    1 bobby  staff    64B Sep  9 10:08 pdf-data-list.pdf.sha256
-rw-r--r--    1 bobby  staff    17K Sep  9 10:08 pdf-form-field-textbox-1.png
-rw-r--r--    1 bobby  staff   472K Sep  9 10:08 pdf-form-field-textbox.html
-rw-r--r--    1 bobby  staff    14K Sep  9 10:08 pdf-form-field-textbox.log
-rw-r--r--    1 bobby  staff    47K Sep  9 10:08 pdf-form-field-textbox.pdf
-rw-r--r--    1 bobby  staff    64B Sep  9 10:08 pdf-form-field-textbox.pdf.sha256
-rw-r--r--    1 bobby  staff    20K Sep  9 10:08 pdf-heading-1-1.png
-rw-r--r--    1 bobby  staff   472K Sep  9 10:08 pdf-heading-1.html
-rw-r--r--    1 bobby  staff    13K Sep  9 10:08 pdf-heading-1.log
-rw-r--r--    1 bobby  staff    15K Sep  9 10:08 pdf-heading-1.pdf
-rw-r--r--    1 bobby  staff    64B Sep  9 10:08 pdf-heading-1.pdf.sha256
-rw-r--r--    1 bobby  staff    28K Sep  9 10:08 pdf-heading-2-1.png
-rw-r--r--    1 bobby  staff   472K Sep  9 10:08 pdf-heading-2.html
-rw-r--r--    1 bobby  staff    13K Sep  9 10:08 pdf-heading-2.log
-rw-r--r--    1 bobby  staff    15K Sep  9 10:08 pdf-heading-2.pdf
-rw-r--r--    1 bobby  staff    64B Sep  9 10:08 pdf-heading-2.pdf.sha256
-rw-r--r--    1 bobby  staff    37K Sep  9 10:08 pdf-heading-3-1.png
-rw-r--r--    1 bobby  staff   472K Sep  9 10:08 pdf-heading-3.html
-rw-r--r--    1 bobby  staff    13K Sep  9 10:08 pdf-heading-3.log
-rw-r--r--    1 bobby  staff    28K Sep  9 10:08 pdf-heading-3.pdf
-rw-r--r--    1 bobby  staff    64B Sep  9 10:08 pdf-heading-3.pdf.sha256
-rw-r--r--    1 bobby  staff    43K Sep  9 10:08 pdf-heading-4-1.png
-rw-r--r--    1 bobby  staff   472K Sep  9 10:08 pdf-heading-4.html
-rw-r--r--    1 bobby  staff    13K Sep  9 10:08 pdf-heading-4.log
-rw-r--r--    1 bobby  staff    28K Sep  9 10:08 pdf-heading-4.pdf
-rw-r--r--    1 bobby  staff    64B Sep  9 10:08 pdf-heading-4.pdf.sha256
-rw-r--r--    1 bobby  staff    49K Sep  9 10:08 pdf-heading-5-1.png
-rw-r--r--    1 bobby  staff   472K Sep  9 10:08 pdf-heading-5.html
-rw-r--r--    1 bobby  staff    13K Sep  9 10:08 pdf-heading-5.log
-rw-r--r--    1 bobby  staff    29K Sep  9 10:08 pdf-heading-5.pdf
-rw-r--r--    1 bobby  staff    64B Sep  9 10:08 pdf-heading-5.pdf.sha256
-rw-r--r--    1 bobby  staff    56K Sep  9 10:08 pdf-heading-6-1.png
-rw-r--r--    1 bobby  staff   472K Sep  9 10:08 pdf-heading-6.html
-rw-r--r--    1 bobby  staff    13K Sep  9 10:08 pdf-heading-6.log
-rw-r--r--    1 bobby  staff    29K Sep  9 10:08 pdf-heading-6.pdf
-rw-r--r--    1 bobby  staff    64B Sep  9 10:08 pdf-heading-6.pdf.sha256
-rw-r--r--    1 bobby  staff   8.8K Sep  9 10:08 pdf-link-1.png
-rw-r--r--    1 bobby  staff   472K Sep  9 10:08 pdf-link.html
-rw-r--r--    1 bobby  staff    13K Sep  9 10:08 pdf-link.log
-rw-r--r--    1 bobby  staff    13K Sep  9 10:08 pdf-link.pdf
-rw-r--r--    1 bobby  staff    64B Sep  9 10:08 pdf-link.pdf.sha256
-rw-r--r--    1 bobby  staff    12K Sep  9 10:08 pdf-ordered-list-1.png
-rw-r--r--    1 bobby  staff   472K Sep  9 10:08 pdf-ordered-list.html
-rw-r--r--    1 bobby  staff    13K Sep  9 10:08 pdf-ordered-list.log
-rw-r--r--    1 bobby  staff    16K Sep  9 10:08 pdf-ordered-list.pdf
-rw-r--r--    1 bobby  staff    64B Sep  9 10:08 pdf-ordered-list.pdf.sha256
-rw-r--r--    1 bobby  staff    18K Sep  9 10:08 pdf-page-lang-en-1.png
-rw-r--r--    1 bobby  staff   472K Sep  9 10:08 pdf-page-lang-en.html
-rw-r--r--    1 bobby  staff    13K Sep  9 10:08 pdf-page-lang-en.log
-rw-r--r--    1 bobby  staff    15K Sep  9 10:08 pdf-page-lang-en.pdf
-rw-r--r--    1 bobby  staff    64B Sep  9 10:08 pdf-page-lang-en.pdf.sha256
-rw-r--r--    1 bobby  staff    19K Sep  9 10:08 pdf-page-lang-nl-1.png
-rw-r--r--    1 bobby  staff   472K Sep  9 10:08 pdf-page-lang-nl.html
-rw-r--r--    1 bobby  staff    13K Sep  9 10:08 pdf-page-lang-nl.log
-rw-r--r--    1 bobby  staff    15K Sep  9 10:08 pdf-page-lang-nl.pdf
-rw-r--r--    1 bobby  staff    64B Sep  9 10:08 pdf-page-lang-nl.pdf.sha256
-rw-r--r--    1 bobby  staff    12K Sep  9 10:08 pdf-paragraph-1.png
-rw-r--r--    1 bobby  staff    12K Sep  9 10:08 pdf-paragraph-lang-1.png
-rw-r--r--    1 bobby  staff    12K Sep  9 10:08 pdf-paragraph-lang-dir-1.png
-rw-r--r--    1 bobby  staff   472K Sep  9 10:08 pdf-paragraph-lang-dir.html
-rw-r--r--    1 bobby  staff    14K Sep  9 10:08 pdf-paragraph-lang-dir.log
-rw-r--r--    1 bobby  staff    24K Sep  9 10:08 pdf-paragraph-lang-dir.pdf
-rw-r--r--    1 bobby  staff    64B Sep  9 10:08 pdf-paragraph-lang-dir.pdf.sha256
-rw-r--r--    1 bobby  staff   472K Sep  9 10:08 pdf-paragraph-lang.html
-rw-r--r--    1 bobby  staff    13K Sep  9 10:08 pdf-paragraph-lang.log
-rw-r--r--    1 bobby  staff    16K Sep  9 10:08 pdf-paragraph-lang.pdf
-rw-r--r--    1 bobby  staff    64B Sep  9 10:08 pdf-paragraph-lang.pdf.sha256
-rw-r--r--    1 bobby  staff   325K Sep  9 10:08 pdf-paragraph-multiple-pages-1.png
-rw-r--r--    1 bobby  staff   205K Sep  9 10:08 pdf-paragraph-multiple-pages-2.png
-rw-r--r--    1 bobby  staff   476K Sep  9 10:08 pdf-paragraph-multiple-pages.html
-rw-r--r--    1 bobby  staff    14K Sep  9 10:08 pdf-paragraph-multiple-pages.log
-rw-r--r--    1 bobby  staff    17K Sep  9 10:08 pdf-paragraph-multiple-pages.pdf
-rw-r--r--    1 bobby  staff    64B Sep  9 10:08 pdf-paragraph-multiple-pages.pdf.sha256
-rw-r--r--    1 bobby  staff   472K Sep  9 10:08 pdf-paragraph.html
-rw-r--r--    1 bobby  staff    13K Sep  9 10:08 pdf-paragraph.log
-rw-r--r--    1 bobby  staff    16K Sep  9 10:08 pdf-paragraph.pdf
-rw-r--r--    1 bobby  staff    64B Sep  9 10:08 pdf-paragraph.pdf.sha256
-rw-r--r--    1 bobby  staff    12K Sep  9 10:08 pdf-quote-1.png
-rw-r--r--    1 bobby  staff   472K Sep  9 10:08 pdf-quote.html
-rw-r--r--    1 bobby  staff    13K Sep  9 10:08 pdf-quote.log
-rw-r--r--    1 bobby  staff    16K Sep  9 10:08 pdf-quote.pdf
-rw-r--r--    1 bobby  staff    64B Sep  9 10:08 pdf-quote.pdf.sha256
-rw-r--r--    1 bobby  staff   8.2K Sep  9 10:08 pdf-radio-button-1.png
-rw-r--r--    1 bobby  staff   472K Sep  9 10:08 pdf-radio-button.html
-rw-r--r--    1 bobby  staff    13K Sep  9 10:08 pdf-radio-button.log
-rw-r--r--    1 bobby  staff   6.2K Sep  9 10:08 pdf-radio-button.pdf
-rw-r--r--    1 bobby  staff    64B Sep  9 10:08 pdf-radio-button.pdf.sha256
-rw-r--r--    1 bobby  staff    12K Sep  9 10:08 pdf-section-1.png
-rw-r--r--    1 bobby  staff   472K Sep  9 10:08 pdf-section.html
-rw-r--r--    1 bobby  staff    13K Sep  9 10:08 pdf-section.log
-rw-r--r--    1 bobby  staff    16K Sep  9 10:08 pdf-section.pdf
-rw-r--r--    1 bobby  staff    64B Sep  9 10:08 pdf-section.pdf.sha256
-rw-r--r--    1 bobby  staff    13K Sep  9 10:08 pdf-span-lang-1.png
-rw-r--r--    1 bobby  staff   472K Sep  9 10:08 pdf-span-lang.html
-rw-r--r--    1 bobby  staff    13K Sep  9 10:08 pdf-span-lang.log
-rw-r--r--    1 bobby  staff    14K Sep  9 10:08 pdf-span-lang.pdf
-rw-r--r--    1 bobby  staff    64B Sep  9 10:08 pdf-span-lang.pdf.sha256
-rw-r--r--    1 bobby  staff    12K Sep  9 10:08 pdf-table-1.png
-rw-r--r--    1 bobby  staff    12K Sep  9 10:08 pdf-table-body-1.png
-rw-r--r--    1 bobby  staff   472K Sep  9 10:08 pdf-table-body.html
-rw-r--r--    1 bobby  staff    13K Sep  9 10:08 pdf-table-body.log
-rw-r--r--    1 bobby  staff    16K Sep  9 10:08 pdf-table-body.pdf
-rw-r--r--    1 bobby  staff    64B Sep  9 10:08 pdf-table-body.pdf.sha256
-rw-r--r--    1 bobby  staff    18K Sep  9 10:08 pdf-table-caption-1.png
-rw-r--r--    1 bobby  staff   472K Sep  9 10:08 pdf-table-caption.html
-rw-r--r--    1 bobby  staff    13K Sep  9 10:08 pdf-table-caption.log
-rw-r--r--    1 bobby  staff    27K Sep  9 10:08 pdf-table-caption.pdf
-rw-r--r--    1 bobby  staff    64B Sep  9 10:08 pdf-table-caption.pdf.sha256
-rw-r--r--    1 bobby  staff    12K Sep  9 10:08 pdf-table-cell-1.png
-rw-r--r--    1 bobby  staff   472K Sep  9 10:08 pdf-table-cell.html
-rw-r--r--    1 bobby  staff    13K Sep  9 10:08 pdf-table-cell.log
-rw-r--r--    1 bobby  staff    16K Sep  9 10:08 pdf-table-cell.pdf
-rw-r--r--    1 bobby  staff    64B Sep  9 10:08 pdf-table-cell.pdf.sha256
-rw-r--r--    1 bobby  staff    18K Sep  9 10:08 pdf-table-footer-1.png
-rw-r--r--    1 bobby  staff   472K Sep  9 10:08 pdf-table-footer.html
-rw-r--r--    1 bobby  staff    13K Sep  9 10:08 pdf-table-footer.log
-rw-r--r--    1 bobby  staff    16K Sep  9 10:08 pdf-table-footer.pdf
-rw-r--r--    1 bobby  staff    64B Sep  9 10:08 pdf-table-footer.pdf.sha256
-rw-r--r--    1 bobby  staff    18K Sep  9 10:08 pdf-table-header-1.png
-rw-r--r--    1 bobby  staff   472K Sep  9 10:08 pdf-table-header.html
-rw-r--r--    1 bobby  staff    13K Sep  9 10:08 pdf-table-header.log
-rw-r--r--    1 bobby  staff    27K Sep  9 10:08 pdf-table-header.pdf
-rw-r--r--    1 bobby  staff    64B Sep  9 10:08 pdf-table-header.pdf.sha256
-rw-r--r--    1 bobby  staff    18K Sep  9 10:08 pdf-table-heading-cell-1.png
-rw-r--r--    1 bobby  staff   472K Sep  9 10:08 pdf-table-heading-cell.html
-rw-r--r--    1 bobby  staff    14K Sep  9 10:08 pdf-table-heading-cell.log
-rw-r--r--    1 bobby  staff    27K Sep  9 10:08 pdf-table-heading-cell.pdf
-rw-r--r--    1 bobby  staff    64B Sep  9 10:08 pdf-table-heading-cell.pdf.sha256
-rw-r--r--    1 bobby  staff   472K Sep  9 10:08 pdf-table.html
-rw-r--r--    1 bobby  staff    13K Sep  9 10:08 pdf-table.log
-rw-r--r--    1 bobby  staff    16K Sep  9 10:08 pdf-table.pdf
-rw-r--r--    1 bobby  staff    64B Sep  9 10:08 pdf-table.pdf.sha256
-rw-r--r--    1 bobby  staff   5.8K Sep  9 10:08 pdf-textarea-1.png
-rw-r--r--    1 bobby  staff   472K Sep  9 10:08 pdf-textarea.html
-rw-r--r--    1 bobby  staff    13K Sep  9 10:08 pdf-textarea.log
-rw-r--r--    1 bobby  staff    39K Sep  9 10:08 pdf-textarea.pdf
-rw-r--r--    1 bobby  staff    64B Sep  9 10:08 pdf-textarea.pdf.sha256
-rw-r--r--    1 bobby  staff   5.8K Sep  9 10:08 pdf-textbox-1.png
-rw-r--r--    1 bobby  staff   472K Sep  9 10:08 pdf-textbox.html
-rw-r--r--    1 bobby  staff    13K Sep  9 10:08 pdf-textbox.log
-rw-r--r--    1 bobby  staff    39K Sep  9 10:08 pdf-textbox.pdf
-rw-r--r--    1 bobby  staff    64B Sep  9 10:08 pdf-textbox.pdf.sha256
-rw-r--r--    1 bobby  staff    12K Sep  9 10:08 pdf-unordered-list-1.png
-rw-r--r--    1 bobby  staff   472K Sep  9 10:08 pdf-unordered-list.html
-rw-r--r--    1 bobby  staff    13K Sep  9 10:08 pdf-unordered-list.log
-rw-r--r--    1 bobby  staff    16K Sep  9 10:08 pdf-unordered-list.pdf
-rw-r--r--    1 bobby  staff    64B Sep  9 10:08 pdf-unordered-list.pdf.sha256

Copy link

vercel bot commented Sep 8, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
utrecht ❌ Failed (Inspect) Sep 21, 2024 10:03am

Copy link

codecov bot commented Sep 11, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 97.82%. Comparing base (d9a5161) to head (67fd7de).
Report is 1 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #2488   +/-   ##
=======================================
  Coverage   97.82%   97.82%           
=======================================
  Files         150      150           
  Lines        1152     1152           
  Branches      231      227    -4     
=======================================
  Hits         1127     1127           
  Misses         24       24           
  Partials        1        1           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@Robbert
Copy link
Member Author

Robbert commented Sep 26, 2024

This PR is replaced by #2511

@Robbert Robbert closed this Sep 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant