Skip to content

Commit 9559991

Browse files
authored
Merge pull request #47 from OnedocLabs/add-support-for-specific-descriptors
Adds support for CSS > and :where selectors
2 parents c5fb461 + 0032bfa commit 9559991

File tree

38 files changed

+19
-17
lines changed

38 files changed

+19
-17
lines changed

docs/components/compile/compile.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ A simple function to compile a React component to an HTML string with the Onedoc
1919
const html = await compile(<Component />);
2020
```
2121

22-
<Frame background="subtle"><img src="../../images/previews/compile-c4caf51a/document.1.jpg" style={{ width: '100%', height: 'auto', maxHeight: '500px', borderRadius: "0.25rem", overflow: "hidden", border: '1px solid #E5E4E2' }} /></Frame>
22+
<Frame background="subtle"><img src="../../images/previews/compile-5570a5ba/document.1.jpg" style={{ width: '100%', height: 'auto', maxHeight: '500px', borderRadius: "0.25rem", overflow: "hidden", border: '1px solid #E5E4E2' }} /></Frame>
2323

2424
<div style={{paddingTop: "1rem", paddingBottom: "1rem"}}><CodeBlocks>
2525
<CodeBlock title="template.tsx">

docs/components/signature/field.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ Supported fields:
4646
| signerAttachment | Signer attachment field |
4747
| signerAttachmentOptional | Optional signer attachment field |
4848

49-
<Frame background="subtle"><img src="../../images/previews/field-da48fb0c/document.1.jpg" style={{ width: '100%', height: 'auto', maxHeight: '500px', borderRadius: "0.25rem", overflow: "hidden", border: '1px solid #E5E4E2' }} /></Frame>
49+
<Frame background="subtle"><img src="../../images/previews/field-0dfd9c56/document.1.jpg" style={{ width: '100%', height: 'auto', maxHeight: '500px', borderRadius: "0.25rem", overflow: "hidden", border: '1px solid #E5E4E2' }} /></Frame>
5050

5151
<div style={{paddingTop: "1rem", paddingBottom: "1rem"}}><CodeBlocks>
5252
<CodeBlock title="template.tsx">

docs/components/tailwind/tailwind.mdx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ Support
1616

1717
Use a simple Tailwind tag to support Tailwind in your document.
1818

19-
<Frame background="subtle"><img src="../../images/previews/tailwind-45926711/document.1.jpg" style={{ width: '100%', height: 'auto', maxHeight: '500px', borderRadius: "0.25rem", overflow: "hidden", border: '1px solid #E5E4E2' }} /></Frame>
19+
<Frame background="subtle"><img src="../../images/previews/tailwind-319e2653/document.1.jpg" style={{ width: '100%', height: 'auto', maxHeight: '500px', borderRadius: "0.25rem", overflow: "hidden", border: '1px solid #E5E4E2' }} /></Frame>
2020

2121
<div style={{paddingTop: "1rem", paddingBottom: "1rem"}}><CodeBlocks>
2222
<CodeBlock title="template.tsx">
@@ -57,7 +57,7 @@ body {
5757

5858
You can also pass a custom Tailwind config to the Tailwind component.
5959

60-
<Frame background="subtle"><img src="../../images/previews/tailwind-15d3ba0e/document.1.jpg" style={{ width: '100%', height: 'auto', maxHeight: '500px', borderRadius: "0.25rem", overflow: "hidden", border: '1px solid #E5E4E2' }} /></Frame>
60+
<Frame background="subtle"><img src="../../images/previews/tailwind-bc09d01e/document.1.jpg" style={{ width: '100%', height: 'auto', maxHeight: '500px', borderRadius: "0.25rem", overflow: "hidden", border: '1px solid #E5E4E2' }} /></Frame>
6161

6262
<div style={{paddingTop: "1rem", paddingBottom: "1rem"}}><CodeBlocks>
6363
<CodeBlock title="template.tsx">
Binary file not shown.
Loading

docs/sortedDocs.json

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

docs/ui/templates.mdx

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8,12 +8,12 @@ icon: list
88
<CardGroup>
99
<Card title="Scientific" href="../../../ui/templates/scientific-report">
1010
<div style={{ marginTop: "1rem", borderRadius: "0.25rem", overflow: "hidden" }}>
11-
<img src="../images/previews/ui-templates-scientific-report-de8367bc/document.1.jpg"/>
11+
<img src="../images/previews/ui-templates-scientific-report-131b6f8b/document.1.jpg"/>
1212
</div>
1313
</Card>
1414
<Card title="With charts" href="../../../ui/templates/report-charts">
1515
<div style={{ marginTop: "1rem", borderRadius: "0.25rem", overflow: "hidden" }}>
16-
<img src="../images/previews/ui-templates-report-charts-1339f0ec/document.1.jpg"/>
16+
<img src="../images/previews/ui-templates-report-charts-93a76b2a/document.1.jpg"/>
1717
</div>
1818
</Card>
1919
</CardGroup>
@@ -23,7 +23,7 @@ icon: list
2323
<CardGroup>
2424
<Card title="Receipt" href="../../../ui/templates/receipt">
2525
<div style={{ marginTop: "1rem", borderRadius: "0.25rem", overflow: "hidden" }}>
26-
<img src="../images/previews/ui-templates-receipt-0d823fc6/document.1.jpg"/>
26+
<img src="../images/previews/ui-templates-receipt-976ba276/document.1.jpg"/>
2727
</div>
2828
</Card>
2929
</CardGroup>
@@ -33,7 +33,7 @@ icon: list
3333
<CardGroup>
3434
<Card title="NDA Markdown" href="../../../ui/templates/nda-markdown">
3535
<div style={{ marginTop: "1rem", borderRadius: "0.25rem", overflow: "hidden" }}>
36-
<img src="../images/previews/ui-templates-nda-markdown-daf9ece1/document.1.jpg"/>
36+
<img src="../images/previews/ui-templates-nda-markdown-3a264b41/document.1.jpg"/>
3737
</div>
3838
</Card>
3939
</CardGroup>
@@ -43,12 +43,12 @@ icon: list
4343
<CardGroup>
4444
<Card title="Basic" href="../../../ui/templates/invoice">
4545
<div style={{ marginTop: "1rem", borderRadius: "0.25rem", overflow: "hidden" }}>
46-
<img src="../images/previews/ui-templates-invoice-8da74a96/document.1.jpg"/>
46+
<img src="../images/previews/ui-templates-invoice-068b91ff/document.1.jpg"/>
4747
</div>
4848
</Card>
4949
<Card title="Advanced with QR" href="../../../ui/templates/invoice-advanced">
5050
<div style={{ marginTop: "1rem", borderRadius: "0.25rem", overflow: "hidden" }}>
51-
<img src="../images/previews/ui-templates-invoice-advanced-c81d4542/document.1.jpg"/>
51+
<img src="../images/previews/ui-templates-invoice-advanced-dfd5a7fc/document.1.jpg"/>
5252
</div>
5353
</Card>
5454
</CardGroup>

docs/ui/templates/invoice-advanced.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ icon: file-invoice
44
category: Invoices
55
---
66

7-
<Frame background="subtle"><img src="../../images/previews/ui-templates-invoice-advanced-c81d4542/document.1.jpg" style={{ width: '100%', height: 'auto', maxHeight: '500px', borderRadius: "0.25rem", overflow: "hidden", border: '1px solid #E5E4E2' }} /></Frame>
7+
<Frame background="subtle"><img src="../../images/previews/ui-templates-invoice-advanced-dfd5a7fc/document.1.jpg" style={{ width: '100%', height: 'auto', maxHeight: '500px', borderRadius: "0.25rem", overflow: "hidden", border: '1px solid #E5E4E2' }} /></Frame>
88

99
```jsx
1010
import { Footnote, PageBottom, Tailwind, CSS } from "@fileforge/react-print";

docs/ui/templates/invoice.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ icon: file-invoice
44
category: Invoices
55
---
66

7-
<Frame background="subtle"><img src="../../images/previews/ui-templates-invoice-8da74a96/document.1.jpg" style={{ width: '100%', height: 'auto', maxHeight: '500px', borderRadius: "0.25rem", overflow: "hidden", border: '1px solid #E5E4E2' }} /></Frame>
7+
<Frame background="subtle"><img src="../../images/previews/ui-templates-invoice-068b91ff/document.1.jpg" style={{ width: '100%', height: 'auto', maxHeight: '500px', borderRadius: "0.25rem", overflow: "hidden", border: '1px solid #E5E4E2' }} /></Frame>
88

99
```jsx
1010
import { Footnote, PageBottom, Tailwind } from "@fileforge/react-print";

docs/ui/templates/nda-markdown.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ icon: file-contract
44
category: NDA
55
---
66

7-
<Frame background="subtle"><img src="../../images/previews/ui-templates-nda-markdown-daf9ece1/document.1.jpg" style={{ width: '100%', height: 'auto', maxHeight: '500px', borderRadius: "0.25rem", overflow: "hidden", border: '1px solid #E5E4E2' }} /></Frame>
7+
<Frame background="subtle"><img src="../../images/previews/ui-templates-nda-markdown-3a264b41/document.1.jpg" style={{ width: '100%', height: 'auto', maxHeight: '500px', borderRadius: "0.25rem", overflow: "hidden", border: '1px solid #E5E4E2' }} /></Frame>
88

99
```jsx
1010
import React from "react";

docs/ui/templates/receipt.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ icon: receipt
44
category: Receipts
55
---
66

7-
<Frame background="subtle"><img src="../../images/previews/ui-templates-receipt-0d823fc6/document.1.jpg" style={{ width: '100%', height: 'auto', maxHeight: '500px', borderRadius: "0.25rem", overflow: "hidden", border: '1px solid #E5E4E2' }} /></Frame>
7+
<Frame background="subtle"><img src="../../images/previews/ui-templates-receipt-976ba276/document.1.jpg" style={{ width: '100%', height: 'auto', maxHeight: '500px', borderRadius: "0.25rem", overflow: "hidden", border: '1px solid #E5E4E2' }} /></Frame>
88

99
```jsx
1010
import { Footnote, Tailwind } from "@fileforge/react-print";

docs/ui/templates/report-charts.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ icon: chart-pie
44
category: Reports
55
---
66

7-
<Frame background="subtle"><img src="../../images/previews/ui-templates-report-charts-1339f0ec/document.1.jpg" style={{ width: '100%', height: 'auto', maxHeight: '500px', borderRadius: "0.25rem", overflow: "hidden", border: '1px solid #E5E4E2' }} /></Frame>
7+
<Frame background="subtle"><img src="../../images/previews/ui-templates-report-charts-93a76b2a/document.1.jpg" style={{ width: '100%', height: 'auto', maxHeight: '500px', borderRadius: "0.25rem", overflow: "hidden", border: '1px solid #E5E4E2' }} /></Frame>
88

99
```jsx
1010
import { Footnote, PageBottom, Tailwind, CSS } from "@fileforge/react-print";

docs/ui/templates/scientific-report.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ icon: flask
44
category: Reports
55
---
66

7-
<Frame background="subtle"><img src="../../images/previews/ui-templates-scientific-report-de8367bc/document.1.jpg" style={{ width: '100%', height: 'auto', maxHeight: '500px', borderRadius: "0.25rem", overflow: "hidden", border: '1px solid #E5E4E2' }} /></Frame>
7+
<Frame background="subtle"><img src="../../images/previews/ui-templates-scientific-report-131b6f8b/document.1.jpg" style={{ width: '100%', height: 'auto', maxHeight: '500px', borderRadius: "0.25rem", overflow: "hidden", border: '1px solid #E5E4E2' }} /></Frame>
88

99
```jsx
1010
import React, { createContext, useEffect, useState } from "react";

src/css/css.tsx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@ import { encode } from "html-entities";
44
const allowedEntities = {
55
"&apos;": "'",
66
"&quot;": '"',
7+
"&gt;": ">",
8+
":where": ":is", // This may introduce specificity issues, but there is no workaround supported by the engine.
79
};
810

911
export const CSS = ({ children }: { children: string }) => {

0 commit comments

Comments
 (0)